/* 니수와 카르텔 — 2000년대 한국 클랜 홈페이지 (docs/SCREENS.md) */
:root {
  --sky: #0a0b2a;
  --panel: #14164a;
  --well: #0f1140;
  --rule: #3a3d9c;
  --gold: #ffd23f;
  --cyan: #59e3ff;
  --pink: #ff4fb3;
  --txt: #e8e9ff;
  --dim: #b9bbe8;
  --ink: #16181a;
  --body: "Nanum Gothic", Gulim, "굴림", Dotum, "돋움", sans-serif;
  --title: "Black Han Sans", "Nanum Gothic", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  padding: 24px max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left));
  font: 15px/1.6 var(--body);
  color: var(--txt);
  background-color: var(--sky);
  /* 별 무늬 타일 */
  background-image:
    radial-gradient(1.4px 1.4px at 10px 12px, #fff 98%, transparent),
    radial-gradient(1px 1px at 34px 40px, var(--gold) 98%, transparent),
    radial-gradient(1.2px 1.2px at 52px 18px, var(--cyan) 98%, transparent);
  background-size: 64px 56px;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan); }
a:focus-visible, .skip:focus { outline: 3px solid var(--cyan); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 8px 12px; background: var(--gold); color: var(--ink); font-weight: 800;
}
.skip:focus { top: 8px; }

/* 가운데 고정 폭 표 */
.page {
  max-width: 760px; margin: 0 auto;
  border: 3px double var(--gold);
  background: var(--panel);
}

.banner {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 16px 12px;
  border-bottom: 3px double var(--gold);
  background: linear-gradient(#1c1f6b, #0f1146);
}
.banner img { width: 64px; height: 64px; flex: none; }
.banner h1 {
  display: grid; justify-items: center; gap: 2px;
  font: 400 clamp(32px, 7vw, 52px)/1.1 var(--title);
  color: var(--gold);
  -webkit-text-stroke: 2px #7a2a00;
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--pink);
  letter-spacing: .02em;
}
.banner .sub {
  font: 800 12px/1.2 var(--body);
  letter-spacing: .14em;
  color: var(--cyan);
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.menu {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px;
  padding: 6px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px; font-weight: 800;
}
.menu a {
  display: inline-block; padding: 6px 8px;
  color: var(--cyan); text-decoration: none;
}
.menu a:hover { color: #fff; text-decoration: underline; }
.menu a[aria-current] { color: var(--gold); outline: 1px dashed var(--gold); outline-offset: -3px; }
.menu a[aria-current]:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* 움직이는 점선 구분선. 5초 뒤 멈춘다(WCAG 2.2.2). */
.divider {
  height: 6px;
  background: repeating-linear-gradient(90deg,
    var(--gold) 0 10px, transparent 10px 16px, var(--pink) 16px 26px, transparent 26px 32px);
  animation: march 1s linear 5;
}
@keyframes march { to { background-position: 32px 0; } }

/* 본문: PC는 왼쪽 정보 칸 + 오른쪽 본문 */
.body {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-areas: "side tools" "side join" "side corps";
  align-items: start;
}
.tools-sec { grid-area: tools; }
.side { grid-area: side; }
.join { grid-area: join; }
.corps { grid-area: corps; }

.tools-sec, .join, .corps { padding: 14px 16px; }
.tools-sec h2, .join h2, .corps h2 {
  margin-bottom: 10px;
  font-size: 16px; font-weight: 800; color: var(--gold);
}
.tools-sec h2::before, .join h2::before, .corps h2::before { content: "★ "; color: var(--pink); }

.side {
  align-self: stretch;
  display: grid; gap: 10px; align-content: start;
  padding: 14px 12px;
  border-right: 1px solid var(--rule);
  font-size: 13px;
}
.box { border: 1px solid var(--rule); background: var(--well); padding: 8px 10px; }
.box-h { margin-bottom: 4px; font-size: 13px; font-weight: 800; color: var(--gold); }
.box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
.box dt { color: var(--dim); }
.box dd { margin: 0; font-weight: 700; }
.counter-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.counter {
  display: inline-block; padding: 2px 6px;
  font: 700 20px/1.2 "Courier New", ui-monospace, monospace;
  letter-spacing: .12em; color: var(--gold); background: #000;
  border: 1px inset #555;
  font-variant-numeric: tabular-nums;
}

/* 도구 줄 */
.tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tool {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--rule); background: var(--well);
  font-size: 13px;
}
.tool img { width: 120px; height: 60px; object-fit: cover; border: 1px solid var(--gold); }
.tool h3 { font-size: 15px; font-weight: 800; color: #fff; }
.tool .url { color: var(--dim); font-family: ui-monospace, "Courier New", monospace; font-size: 12px; overflow-wrap: anywhere; }
.tool .lock { color: var(--pink); font-weight: 700; font-size: 12.5px; }
.tool .lock::before { content: "▶ "; font-size: 10px; }
.go {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 6px 14px;
  font-weight: 800; color: var(--ink); background: var(--gold);
  border: 2px outset #ffe58a;
  text-decoration: none; white-space: nowrap;
}
.go:hover { background: #fff07a; }
.go:active { border-style: inset; }

/* 가입 안내 */
.join { border-top: 1px solid var(--rule); }
.join > :not(h2) { margin-top: 6px; }
.join > p:first-of-type { font-weight: 800; }
.blink { color: var(--gold); animation: blink 1s steps(2) 5; }
@keyframes blink { 50% { opacity: 0; } }
.cta {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; margin-top: 12px; padding: 10px 16px;
  font-size: 16px; font-weight: 800; text-decoration: none;
  color: #fff; background: #3d2a8c;
  border: 2px solid var(--pink);
  box-shadow: 3px 3px 0 var(--pink);
}
.cta::before { content: "♥"; margin-right: .4em; color: var(--pink); }
.cta:hover { background: #4f37b0; }
.cta:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pink); }
.join .note { font-size: 12.5px; color: var(--dim); text-align: center; }

/* 소속 꼽 표 */
.corps { border-top: 1px solid var(--rule); }
.status { margin-bottom: 8px; font-size: 12.5px; color: var(--dim); }
.status.stale { color: var(--pink); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--well); }
th, td { padding: 5px 8px; border: 1px solid var(--rule); text-align: left; vertical-align: middle; }
thead th { white-space: nowrap; background: #1c1f6b; color: var(--gold); font-weight: 800; }
td:first-child { width: 44px; }
td img { width: 32px; height: 32px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tfoot th, tfoot td { background: #1c1f6b; color: var(--gold); font-weight: 800; }
.tag {
  display: inline-block; margin-left: 4px; padding: 0 5px;
  font-size: 11px; font-weight: 800; color: var(--ink); background: var(--cyan);
  white-space: nowrap;
}

.foot { padding: 12px 16px 14px; font-size: 12px; color: var(--dim); text-align: center; }
.foot p + p { margin-top: 4px; }
.foot [lang="en"] { font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  .divider, .blink { animation: none; }
}

/* 휴대폰: 표가 화면 폭을 채우고, 정보 칸은 도구 아래로 */
@media (max-width: 640px) {
  body { padding-top: 0; padding-bottom: 24px; padding-left: 0; padding-right: 0; }
  .page { border-left: 0; border-right: 0; }
  .banner { gap: 10px; padding: 12px 8px; }
  .banner img { width: 40px; height: 40px; }
  .banner h1 { font-size: clamp(28px, 9vw, 40px); }
  .menu { gap: 0 2px; font-size: 14px; }
  .menu a { padding: 8px 6px; }

  .body { grid-template-columns: 1fr; grid-template-areas: "tools" "side" "join" "corps"; }
  .side {
    grid-template-columns: 1fr 1fr; align-items: start;
    border-right: 0; border-top: 1px solid var(--rule);
    padding: 12px 16px;
  }
  .tool { grid-template-columns: 96px 1fr; gap: 6px 10px; }
  .tool img { width: 96px; height: 48px; }
  .go { grid-column: 1 / -1; min-height: 44px; font-size: 15px; }
}

@media (max-width: 360px) {
  .side { grid-template-columns: 1fr; }
}
