@font-face {
  font-family: 'NeoDunggeunmoPro';
  src:
    url('/assets/fonts/NeoDunggeunmoPro-Regular.woff2') format('woff2'),
    url('/assets/fonts/NeoDunggeunmoPro-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #e7d9b6;
  --surface: #f7efd9;
  --surface-soft: #ddc99a;
  --text: #2c2013;
  --muted: #5f4c30;
  --border: #c3a879;
  --border-strong: #a4884f;
  --accent: #b3821f;
  --accent-strong: #7a5713;
  --accent-ink: #241a04;
  --gold: #b3821f;
  --orange: #b85a24;
  --coral: #a02f2f;
  --radius: 1.25rem;
  --radius-sm: 0.75rem;
  --shadow: 0 10px 30px rgba(50, 36, 8, 0.14);
  --shadow-lg: 0 20px 46px rgba(50, 36, 8, 0.22);
}

:root[data-theme='dark'] {
  --bg: #14111a;
  --surface: #1e1a26;
  --surface-soft: #292233;
  --text: #ece3d0;
  --muted: #a89a8a;
  --border: #3a3244;
  --border-strong: #4e435a;
  --accent: #e0b23f;
  --accent-strong: #f0c968;
  --accent-ink: #241804;
  --gold: #e0b23f;
  --orange: #e3843f;
  --coral: #e2564a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #14111a;
    --surface: #1e1a26;
    --surface-soft: #292233;
    --text: #ece3d0;
    --muted: #a89a8a;
    --border: #3a3244;
    --border-strong: #4e435a;
    --accent: #e0b23f;
    --accent-strong: #f0c968;
    --accent-ink: #241804;
    --gold: #e0b23f;
    --orange: #e3843f;
    --coral: #e2564a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  }
}

/* respect reduced-motion first: neutralize every transition/animation globally,
   the specific rules below just won't visually move for these users */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

* {
  box-sizing: border-box;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}
:where(a) {
  color: var(--accent-strong);
}
:where(:root[data-theme='dark'] a) {
  color: var(--accent);
}
code {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.9em;
}
img.icon-inline {
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.18em;
  image-rendering: pixelated;
  margin-right: 3px;
  transition: filter 0.2s ease;
}
svg.icon-inline {
  width: 0.95em;
  height: 0.95em;
  vertical-align: -0.14em;
  margin-right: 3px;
}
/* our pixel icons are flat black-on-transparent PNGs — invert them in dark mode so they
   don't vanish against a dark background. Excludes .hero-logo/.site-logo, which already
   ship as separate light/dark files. */
:root[data-theme='dark'] img.icon-inline {
  filter: invert(1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) img.icon-inline {
    filter: invert(1);
  }
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px dashed var(--border-strong);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  border-bottom-color: transparent;
}
:root[data-theme='dark'] .site-header.scrolled {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'NeoDunggeunmoPro', inherit;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}
.site-logo img {
  height: 22px;
  width: auto;
  transition: transform 0.25s ease;
}
.site-logo:hover img {
  transform: scale(1.05) rotate(-2deg);
}
.site-logo .logo-dark {
  display: none;
}
:root[data-theme='dark'] .site-logo .logo-light {
  display: none;
}
:root[data-theme='dark'] .site-logo .logo-dark {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .site-logo .logo-light {
    display: none;
  }
  :root:not([data-theme='light']) .site-logo .logo-dark {
    display: block;
  }
}

.hero-logo {
  height: 64px;
  width: auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.4));
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover,
.site-nav a.active {
  background: var(--surface-soft);
  color: var(--accent-strong);
}
.site-nav .discord-link {
  background: #5865f2;
  color: #fff;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.site-nav .discord-link:hover {
  background: #4752c4;
  color: #fff;
  transform: translateY(-1px);
}
.theme-toggle {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
  font-size: 15px;
  color: var(--text);
}
.theme-toggle:hover {
  border-color: var(--accent);
  transform: rotate(-8deg);
}
.theme-toggle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.4s ease;
}

/* ---------- landing ---------- */
.wrap {
  width: min(1000px, 100%);
  margin: 0 auto;
  padding: 0 18px;
}
.hero-section {
  position: relative;
  padding: 90px 18px 70px;
  text-align: center;
  overflow: hidden;
  color: #fff8ea;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: -4%;
  z-index: 0;
  background: linear-gradient(rgba(20, 16, 8, 0.42), rgba(20, 16, 8, 0.72)), url('/assets/hero.jpg');
  background-size: cover;
  background-position: center 30%;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-section::before {
    animation: hero-kenburns 36s ease-in-out infinite alternate;
  }
}
@keyframes hero-kenburns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.09);
  }
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * {
    animation: hero-rise 0.7s ease both;
  }
  .hero-inner > *:nth-child(1) {
    animation-delay: 0.05s;
  }
  .hero-inner > *:nth-child(2) {
    animation-delay: 0.13s;
  }
  .hero-inner > *:nth-child(3) {
    animation-delay: 0.21s;
  }
  .hero-inner > *:nth-child(4) {
    animation-delay: 0.29s;
  }
  .hero-inner > *:nth-child(5) {
    animation-delay: 0.37s;
  }
}
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(20, 16, 8, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  color: #ffe9b3;
  font-size: 13px;
  font-weight: 700;
}
.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999;
  transition: background-color 0.3s ease;
}
.badge .dot.online {
  background: #9ccc65;
  box-shadow: 0 0 0 rgba(156, 204, 101, 0.7);
}
@media (prefers-reduced-motion: no-preference) {
  .badge .dot.online {
    animation: dot-pulse 2.2s ease-out infinite;
  }
}
@keyframes dot-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(156, 204, 101, 0.55);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(156, 204, 101, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(156, 204, 101, 0);
  }
}
.badge .dot.offline {
  background: var(--coral);
}
.hero-inner h1 {
  margin: 20px 0 0;
  line-height: 1.25;
}
.hero-tagline {
  margin: 8px 0 0;
  color: rgba(255, 248, 234, 0.75);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.subtitle {
  margin: 14px auto 0;
  max-width: 480px;
  color: rgba(255, 248, 234, 0.88);
  font-size: 15.5px;
  line-height: 1.75;
}

.address-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(20, 16, 8, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  cursor: pointer;
  font-size: 13.5px;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.address-chip:hover {
  border-color: #ffd766;
  transform: translateY(-1px);
}
.address-chip:active {
  transform: translateY(0);
}
.address-chip .domain {
  font-weight: 800;
}
.address-chip .version,
.address-chip .hint {
  color: rgba(255, 248, 234, 0.7);
}
.address-copied {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #9ccc65;
  color: #16240a;
  font-weight: 800;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.address-copied.show {
  opacity: 1;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.cta:hover {
  transform: translateY(-2px);
}
.cta.discord {
  background: #5865f2;
  color: #fff;
  box-shadow: 0 10px 22px rgba(88, 101, 242, 0.35);
}
.cta.ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}
.cta img.icon-inline {
  filter: brightness(0) invert(1);
}

.features-band {
  background: var(--surface-soft);
  padding: 8px 0 48px;
}
.features-band h3.section-title {
  text-align: center;
  font-family: 'NeoDunggeunmoPro', inherit;
  font-size: 22px;
  color: var(--text);
  margin: 0 0 24px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(155deg, var(--surface-soft), color-mix(in srgb, var(--accent) 12%, var(--surface-soft)));
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent), inset 0 2px 3px rgba(0, 0, 0, 0.18);
  margin-bottom: 14px;
  transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.card-icon img {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
}
.card:hover .card-icon {
  transform: rotate(-6deg) scale(1.08);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-soft));
  border-color: var(--accent);
}
.card h2 {
  margin: 0 0 8px;
  font-family: 'NeoDunggeunmoPro', inherit;
  font-size: 20px;
  color: var(--text);
}
.card > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s ease, transform 0.15s ease;
}
.button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateX(2px);
}
.button.primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  animation: cta-glow 2.6s ease-in-out infinite;
}
.button.primary:hover {
  background: var(--accent-strong);
  color: var(--accent-ink);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 55%, transparent);
  animation-play-state: paused;
}
@keyframes cta-glow {
  0%,
  100% {
    box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent);
  }
  50% {
    box-shadow: 0 4px 22px color-mix(in srgb, var(--accent) 55%, transparent);
  }
}
.button .arrow {
  opacity: 0.65;
  font-size: 12px;
  transition: transform 0.15s ease;
}
.button:hover .arrow {
  transform: translateX(2px);
}

/* scroll-reveal (JS adds .reveal-init on load, then .revealed once in view;
   opacity-only on .card since it already animates transform on :hover) */
@media (prefers-reduced-motion: no-preference) {
  .reveal-init {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal-init.revealed {
    opacity: 1;
  }
  .docs-main article.reveal-init,
  .docs-main article > section.reveal-init {
    transform: translateY(18px);
  }
  .docs-main article.reveal-init.revealed,
  .docs-main article > section.reveal-init.revealed {
    transform: translateY(0);
  }
  .docs-main article > section.reveal-init {
    transition-duration: 0.5s;
  }
  .grid .card.reveal-init:nth-child(1) {
    transition-delay: 0s;
  }
  .grid .card.reveal-init:nth-child(2) {
    transition-delay: 0.08s;
  }
  .grid .card.reveal-init:nth-child(3) {
    transition-delay: 0.16s;
  }
  .grid .card.reveal-init:nth-child(4) {
    transition-delay: 0.24s;
  }
}

footer.site-footer {
  text-align: center;
  margin-top: 50px;
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
footer.site-footer p {
  margin: 0 0 8px;
}
footer.site-footer p:last-child {
  margin-bottom: 0;
}

/* ---------- docs shell ---------- */
.docs-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px 60px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 200px;
  gap: 36px;
}
.docs-sidebar {
  padding-top: 32px;
}
.docs-sidebar-group {
  margin-bottom: 22px;
}
.docs-sidebar-group h4 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.docs-sidebar-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.docs-sidebar-group a {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.docs-sidebar-group a:hover {
  background: var(--surface-soft);
  transform: translateX(2px);
}
.docs-sidebar-group a.active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.docs-main {
  padding-top: 32px;
  min-width: 0;
}
.docs-breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.docs-main h1 {
  text-align: left;
  font-family: 'NeoDunggeunmoPro', inherit;
  font-size: 32px;
  color: var(--text);
  margin-bottom: 8px;
}
.docs-lead {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 28px;
  line-height: 1.7;
}
.docs-main article {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 32px;
  box-shadow: var(--shadow);
}
.docs-main article::before,
.card::before,
.auth-card::before,
.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}
.card,
.auth-card,
.profile-card {
  position: relative;
}
.docs-main article > section + section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px dashed var(--border);
}
.docs-main h2 {
  font-size: 19px;
  margin: 0 0 10px;
  color: var(--accent-strong);
  scroll-margin-top: 90px;
}
.docs-main p {
  line-height: 1.8;
  font-size: 15px;
  margin: 0 0 4px;
}
.docs-main ul {
  line-height: 1.9;
  padding-left: 20px;
}
.docs-main .callout {
  background: var(--surface-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  margin-top: 10px;
}
.docs-main table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13.5px;
}
.docs-main th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--border-strong);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.docs-main td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.docs-main td:first-child {
  font-weight: 700;
  white-space: nowrap;
  color: var(--accent-strong);
}
.docs-main h3 {
  font-size: 15px;
  margin: 18px 0 4px;
  color: var(--text);
}
.mod-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 6px;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.mod-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.mod-search {
  flex: 1;
  max-width: 320px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.mod-search:focus {
  outline: none;
  border-color: var(--accent);
}
.mod-search-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mod-table tbody tr {
  transition: background-color 0.15s ease;
}
.mod-table tbody tr:hover {
  background: var(--surface-soft);
}
.mod-table tbody tr:hover td:first-child {
  color: var(--accent);
}

.docs-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}
.docs-pager a {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.docs-pager a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.docs-pager .dir {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}
.docs-pager .next {
  text-align: right;
}

.docs-toc {
  padding-top: 32px;
  font-size: 13px;
}
.docs-toc h4 {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.docs-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.docs-toc a {
  display: block;
  padding: 5px 0 5px 14px;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.docs-toc a:hover {
  color: var(--text);
}
.docs-toc a.active {
  color: var(--accent-strong);
  border-left-color: var(--accent);
  font-weight: 600;
}

@media (max-width: 980px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }
  .docs-toc {
    display: none;
  }
  .docs-sidebar {
    padding-top: 20px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 16px;
    margin-bottom: 8px;
  }
  .docs-sidebar-group {
    margin-bottom: 12px;
  }
}
@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .site-nav a span.label-full {
    display: none;
  }
  .hero-logo {
    height: 44px;
  }
}

/* ---- auth / mypage / console ---- */
.auth-wrap {
  max-width: 420px;
  margin: 64px auto;
  padding: 0 20px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 9px 12px;
  border-radius: calc(var(--radius-sm) - 4px);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
  user-select: none;
}
.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
}
.form-error {
  background: color-mix(in srgb, var(--coral) 12%, transparent);
  border: 1px solid var(--coral);
  color: var(--coral);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.form-error.show {
  display: block;
}
.submit-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.submit-btn:hover {
  background: var(--accent-strong);
}
.submit-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.mypage-wrap {
  max-width: 720px;
  margin: 48px auto;
  padding: 0 20px;
}
.mypage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.mypage-header h1 {
  font-size: 22px;
  margin: 0;
}
.link-out {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.link-out:hover {
  border-color: var(--coral);
  color: var(--coral);
}
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.profile-identity img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  image-rendering: pixelated;
  border: 1px solid var(--border);
}
.profile-identity .name {
  font-size: 19px;
  font-weight: 700;
}
.profile-identity .sub {
  color: var(--muted);
  font-size: 13px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.stat-tile {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.stat-tile .label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.stat-tile .value {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.visibility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.visibility-row:first-of-type {
  border-top: none;
}
.switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .track {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.switch .track::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.15s ease;
}
.switch input:checked + .track {
  background: var(--accent);
}
.switch input:checked + .track::before {
  transform: translateX(18px);
}
.verify-code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--surface-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  margin: 16px 0;
  color: var(--accent-strong);
}

.console-wrap {
  max-width: 960px;
  margin: 40px auto;
  padding: 0 20px;
}
.console-terminal {
  background: #12100c;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.console-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #1c1913;
  border-bottom: 1px solid #2c2820;
}
.console-titlebar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.console-titlebar span.title {
  margin-left: 8px;
  color: #8a8373;
  font-size: 12px;
  font-family: 'SFMono-Regular', Consolas, monospace;
}
.console-output {
  height: 60vh;
  overflow-y: auto;
  padding: 16px;
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #d8d3c4;
  white-space: pre-wrap;
  word-break: break-all;
}
.console-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #2c2820;
  background: #16130e;
}
.console-input-row .prompt {
  color: #e0b23f;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 13px;
}
.console-input-row input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #f0ede2;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 13px;
}
.console-status {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
