:root {
  --bg: #f3f7fc;
  --bg-soft: #eef4fb;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --text: #1f2937;
  --text-soft: #66758b;
  --heading: #0f172a;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #eef2f7;
  --secondary-hover: #e4ebf5;
  --danger-soft: rgba(239, 68, 68, 0.10);
  --danger-border: rgba(239, 68, 68, 0.18);
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
  color: var(--text);
  font-family:
    "Inter",
    "Hiragino Sans",
    "Yu Gothic UI",
    "Meiryo",
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  padding: 48px 0 88px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.site-header__inner,
.site-footer__inner,
.auth-wrap {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.site-header__inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
}

.header-right {
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.brand__text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__text {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.brand__subtext {
  color: #718198;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  gap: 18px;
  padding-right: 4px;
}

.site-nav a {
  position: relative;
  padding: 8px 2px;
  color: #627086;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: #0f172a;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.site-nav a:hover::after {
  width: 100%;
}

.user-menu {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.user-menu__avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #7dd3fc);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.user-menu__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 90px;
}

.user-menu__label {
  color: #8090a6;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.user-menu__name {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 700;
}

.site-footer {
  background: rgba(255, 255, 255, 0.82);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.site-footer__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #718198;
  font-size: 0.88rem;
}

.footer-sep {
  opacity: 0.45;
}

.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 220px);
}

@media (max-width: 980px) {
  .site-header__inner {
    gap: 16px;
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    min-height: 72px;
    padding: 14px 0;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .user-menu {
    width: 100%;
    justify-content: space-between;
    border-radius: 16px;
  }
}

@media (max-width: 640px) {
  .site-main {
    padding-top: 28px;
  }

  .brand__subtext {
    display: none;
  }

  .site-nav {
    width: 100%;
    gap: 14px;
    flex-wrap: wrap;
  }

  .user-menu {
    align-items: center;
    gap: 10px;
  }

  .user-menu__info {
    min-width: 0;
  }

  .site-footer__inner {
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
  }

  .footer-sep {
    display: none;
  }
}
