/* 포켓몬허브 디자인 시스템
   뼈대는 카지노인(casinoin.kr)과 같다: 상단바(로고 | 현재 메뉴 · 알약형 네비) → 서브탭 →
   영문 eyebrow + 큰 제목 → KPI 카드 · 필터 패널 · 목록.
   그 위에 포켓몬 색(피카츄 노랑 · 몬스터볼 빨강 · 파랑)과 둥근 모서리로 귀여움을 얹었다. */

@font-face {
  font-family: 'Hub Numeric';
  src: url('/static/fonts/Montserrat-Variable-Latin.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0024-0025, U+002B-002E, U+0030-0039, U+003A;
}

:root {
  /* 포켓몬 포인트 색 */
  --poke-yellow: #ffcb05;
  --poke-yellow-soft: #fff4c2;
  --poke-red: #ef4444;
  --poke-blue: #3b82f6;
  --poke-green: #22c55e;
  --poke-pink: #f472b6;
  --poke-navy: #2a3a8c;

  /* 라이트 테마 (기본) */
  --bg: #ffffff;
  --surface: #fffcf2;
  --surface-muted: #fff7dc;
  --text: #1c1917;
  --text-2: #57534e;
  --text-3: #78716c;
  --border: #eadfc4;
  --border-strong: #cfc2a0;
  --accent: #1c1917;          /* 활성 네비 알약 */
  --accent-text: #ffcb05;
  --highlight: #2563eb;       /* 링크 · 서브탭 밑줄 */
  --btn-primary-bg: var(--poke-yellow);
  --btn-primary-text: #1c1917;
  --on-primary: #1c1917;      /* 203차: 포인트색(--poke-yellow) 바탕 위 글자 — 라이트 Saffron 은 흰색 */
  --hero-bg: radial-gradient(120% 120% at 50% 0%, #fff6c9 0%, #ffe57a 45%, #ffcb05 100%);
  --hero-text: #1c1917;

  --font-numeric: 'Hub Numeric';
  /* 20차: 제목도 Pretendard (주아체는 57차에 파일까지 지움) */
  --font-cute: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --cute-weight: 800;
  --font-body: var(--font-numeric), 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ja-fallback: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic UI', 'Yu Gothic', Meiryo;

  --text-xs: .75rem;
  --text-sm: .8125rem;
  --text-base: .9375rem;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --shell-max: 1280px;
  --shell-gutter: 24px;
  --focus-ring: 0 0 0 3px rgba(255, 203, 5, .55);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}
@media (max-width: 768px) { :root { --shell-gutter: 16px; } }

/* 200차(사용자): 라이트 모드 색감 shadcn 테마 → 202차 'Saffron Light' — 흰 바탕 · 옅은 회색 카드 · 회색 선 · 주황 포인트.
   되돌리려면 이 블록만 지우면 원래 노란 크림 색감으로 돌아감. 모양(둥근 모서리)은 그대로 */
html:not([data-theme="dark"]) {
  --poke-yellow: #ff7f00;         /* primary */
  --poke-yellow-soft: #fdf1e6;    /* accent */
  --poke-red: #e7000b;            /* destructive */
  --bg: #ffffff;                  /* background */
  --surface: #fafafa;             /* card */
  --surface-muted: #f2f2f2;       /* muted · secondary */
  --text: #171717;
  --text-2: #525252;
  --text-3: #737373;              /* muted-foreground */
  --border: #e5e5e5;              /* border */
  --border-strong: #d4d4d4;
  --accent: #171717;
  --accent-text: #ff7f00;
  --btn-primary-bg: #ff7f00;
  --btn-primary-text: #ffffff;
  --on-primary: #ffffff;
  --focus-ring: 0 0 0 3px rgba(255, 127, 0, .35);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101116;
  --surface: #181a22;
  --surface-muted: #20232d;
  --text: #f4f4f5;
  --text-2: #b4b4bd;
  --text-3: #8f8f9a;
  --border: #2a2d38;
  --border-strong: #3d4150;
  --accent: #ffcb05;
  --accent-text: #1c1917;
  --highlight: #60a5fa;
  --hero-bg: radial-gradient(120% 120% at 50% 0%, #2b2f55 0%, #171a33 55%, #0d0f1d 100%);
  --hero-text: #fdfdfd;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
  transition: background-color .2s ease, color .2s ease;
}
a { color: var(--highlight); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 8px; }
.visually-hidden { position: absolute !important; width: 1px !important; min-width: 0 !important; height: 1px !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }  /* 66차 점검: 칸 너비 규칙(width:100%)이 덮어 화면 밖으로 넘치던 것 */
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 12px; background: var(--accent); color: var(--accent-text); border-radius: 999px; }
.skip-link:focus { left: 8px; }


/* ---------- 상단바 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 28px;
  padding: 14px var(--shell-gutter) 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.brand-link:hover { text-decoration: none; }
.brand-link:hover .brand-ball { transform: rotate(-20deg); }
.brand-ball { color: var(--text); transition: transform .35s var(--ease-bounce); }
.brand-wordmark { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 24px; letter-spacing: -.01em; line-height: 1; }
.topbar-context {
  padding-left: 12px; border-left: 1px solid var(--border-strong);
  color: var(--text-3); font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
}
.topbar-nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 0 1 auto; min-width: 0; }
:lang(ja) .topbar-nav a { padding-inline: 10px; }
@media (min-width: 1101px) {
  .topbar { flex-wrap: nowrap; gap: 6px 20px; }  /* 넓은 화면: 메뉴가 길면(일본어) 줄바꿈 대신 메뉴 칸이 줄어든다 */
  .topbar-brand { flex: none; }
  .topbar-actions { flex: none; }
  :lang(ja) .topbar-nav { gap: 0; }
}
.topbar-nav::-webkit-scrollbar { display: none; }
.topbar-nav a {
  flex: none; padding: 7px 14px; border-radius: 999px;
  color: var(--text-2); font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, transform .25s var(--ease-bounce);
}
.topbar-nav a:hover { color: var(--text); background: var(--surface-muted); text-decoration: none; transform: translateY(-1px); }
.topbar-nav a.active { background: var(--accent); color: var(--accent-text); font-weight: 800; }

.subnav {
  display: flex; justify-content: safe center; gap: 0;
  width: min(var(--shell-max), calc(100% - 2 * var(--shell-gutter))); margin: 0 auto;
  border-bottom: 1px solid var(--border);
  /* 탭이 넘치면 옆으로 밀어 보되 스크롤바는 숨긴다 (밑줄이 아래로 1px 삐져나와 세로 스크롤바가 생기던 것도 막음) */
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a { position: relative; flex: none; padding: 14px 20px; color: var(--text-3); font-size: var(--text-sm); font-weight: 600; }
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a.active { color: var(--text); }
.subnav a.active::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--poke-yellow);
}
/* 153차: 하위 메뉴가 있는 서브탭(▾) + 그 아래 세 번째 줄(작은 알약) */
.subnav-caret {
  display: inline-block; width: 6px; height: 6px; margin-left: 6px; vertical-align: 3px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; opacity: .5;
  transform: rotate(45deg); transition: transform .25s var(--ease-bounce, ease), opacity .2s ease;
}
.subnav a.has-sub.active .subnav-caret { opacity: .9; }
.subnav-sub {
  align-items: center; gap: 6px; padding: 10px 0; border-bottom: 0;
}
.subnav-sub-label {
  flex: none; margin-right: 4px; padding-right: 10px; border-right: 1px solid var(--border);
  color: var(--text-3); font-size: var(--text-xs); font-weight: 700; letter-spacing: .02em;
}
.subnav-sub a { padding: 6px 14px; border-radius: 999px; font-size: var(--text-xs); }
.subnav-sub a:hover { background: var(--surface-muted); }
.subnav-sub a.active { background: var(--poke-yellow); color: var(--on-primary); font-weight: 800; }
.subnav-sub a.active::after { display: none; }
/* 136차: 상단 메뉴에 마우스를 올리면 뜨는 서브메뉴 (카지노인처럼) — 상단바 바로 아래 서브탭 자리에 겹쳐 뜬다.
   상단바(sticky) 안에 있어서 스크롤을 내려도 따라오고, 아래 글은 밀리지 않는다. 글자 위치는 site.js 가 그 메뉴 아래로 맞춘다 */
.topbar-hover-subnav {
  position: absolute; top: calc(100% + 1px); left: 0; right: 0; z-index: 41;
  width: auto; margin: 0; justify-content: flex-start;
  padding-inline: max(var(--shell-gutter), calc((100% - var(--shell-max)) / 2));
  background: var(--bg); box-shadow: 0 14px 24px -20px rgba(0, 0, 0, .45);
  animation: hover-subnav-in .16s ease-out;
}
.topbar-hover-subnav[hidden] { display: none !important; }
@keyframes hover-subnav-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- 본문 껍데기 ---------- */
.page-container { width: min(var(--shell-max), 100%); margin: 0 auto; padding: 28px var(--shell-gutter) 64px; }
.home > .page-container { padding-top: 40px; }
.page-header { margin-bottom: 24px; }
.page-eyebrow {
  margin: 0 0 6px; color: var(--text-3);
  font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
}
.page-header h1 { font-family: var(--font-cute); font-size: clamp(28px, 4vw, 36px); font-weight: var(--cute-weight); }
.page-desc { margin: 8px 0 0; color: var(--text-2); font-size: var(--text-sm); }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2, .panel h2 { font-family: var(--font-cute); font-size: 24px; font-weight: var(--cute-weight); }
.meta { color: var(--text-3); font-size: var(--text-xs); font-weight: 500; }

/* ---------- 카드 · 패널 ---------- */
.panel {
  padding: 24px; border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
}
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-card {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  padding: 20px 22px; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg);
  transition: border-color .2s ease, transform .3s var(--ease-bounce);
  animation: rise .5s var(--ease-bounce) both;
}
.kpi-card:nth-child(2) { animation-delay: 60ms; }
.kpi-card:nth-child(3) { animation-delay: 120ms; }
.kpi-card:nth-child(4) { animation-delay: 180ms; }
.kpi-card:hover { border-color: var(--poke-yellow); transform: translateY(-3px); }
.kpi-card .label { color: var(--text-3); font-size: var(--text-xs); font-weight: 600; }
.kpi-card .value { font-family: var(--font-body); font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.kpi-card .unit { color: var(--text-3); font-size: var(--text-xs); }
.is-skeleton .value { color: var(--text-3); opacity: .6; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 버튼 · 입력 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 18px; border: 1.5px solid var(--border-strong); border-radius: 999px;
  background: var(--bg); color: var(--text); font: 700 var(--text-sm)/1 var(--font-body);
  cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease-bounce), border-color .15s ease, background-color .15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--text); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--btn-primary-bg); border-color: #e0b000; color: var(--btn-primary-text); box-shadow: 0 3px 0 #d4a600; }
.btn-primary:hover { border-color: #c99d00; }
.btn-primary:active { box-shadow: 0 1px 0 #d4a600; transform: translateY(2px); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: var(--text-xs); }
.btn-stack { display: grid; gap: 8px; }

input[type="search"], input[type="text"], input[type="email"], select {
  width: 100%; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--border-strong); border-radius: 999px;
  background: var(--bg); color: var(--text); font: 500 var(--text-base) var(--font-body);
  transition: border-color .15s ease, box-shadow .15s ease;
}
select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
input:focus, select:focus { outline: none; border-color: var(--poke-yellow); box-shadow: var(--focus-ring); }
input[type="range"] { width: 100%; accent-color: var(--poke-yellow); }

.filter-panel {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
  margin-bottom: 28px; padding: 20px; border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
}
.field { display: grid; gap: 6px; min-width: 150px; }
.field.grow { flex: 1 1 260px; }
.field label, .field-label { color: var(--text-3); font-size: var(--text-xs); font-weight: 700; }
.field output { color: var(--text); font-weight: 800; margin-left: 4px; }

/* ---------- 알림 · 빈 상태 ---------- */
.notice {
  margin-bottom: 20px; padding: 16px 20px; border-radius: var(--radius-md);
  background: var(--surface-muted); border: 1.5px dashed var(--border-strong); color: var(--text-2); font-size: var(--text-sm);
}
.notice strong { color: var(--text); margin-right: 6px; }
.notice-warn { border-color: var(--poke-red); color: var(--poke-red); }
.empty-state {
  display: grid; justify-items: center; gap: 10px; padding: 48px 20px; text-align: center;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--text-2);
}
.empty-state h2 { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 22px; color: var(--text); }
.empty-state p { margin: 0; font-size: var(--text-sm); }
.empty-state-lg { margin-top: 40px; padding: 72px 20px; }
.empty-state-lg h1 { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: clamp(26px, 4vw, 34px); }
.empty-state .btn { margin-top: 10px; }

.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--surface-muted); color: var(--text-2); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.hint { margin: 16px 0 0; color: var(--text-3); font-size: var(--text-xs); }
.arrow-link { display: inline-flex; gap: 4px; font-weight: 700; font-size: var(--text-sm); }
.arrow-link span { transition: transform .2s ease; }
.arrow-link:hover span { transform: translateX(4px); }

/* ---------- 몬스터볼 모션 ---------- */
.ball-icon { flex: none; color: #1c1917; }
html[data-theme="dark"] .ball-icon { color: #0d0f1d; }
.bounce { animation: bounce 2.4s var(--ease-bounce) infinite; transform-origin: 50% 100%; }
.wobble { animation: wobble 2.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0) scale(1, 1); }
  15% { transform: translateY(0) scale(1.1, .9); }
  35% { transform: translateY(-18px) scale(.95, 1.05); }
  52% { transform: translateY(0) scale(1.08, .92); }
}
@keyframes wobble {
  0%, 50%, 100% { transform: rotate(0); }
  10% { transform: rotate(-14deg); } 20% { transform: rotate(10deg); }
  30% { transform: rotate(-6deg); } 40% { transform: rotate(3deg); }
}

/* ---------- 홈 히어로 ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 88px var(--shell-gutter) 96px; text-align: center;
  background: var(--hero-bg); color: var(--hero-text);
  border-bottom: 1px solid var(--border);
}
.hero-inner { position: relative; z-index: 1; max-width: min(760px, var(--island-w, 760px)); margin: 0 auto; }  /* 178차: 섬 메뉴 줄 밖으로 안 나감 */
.hero-eyebrow { margin: 0 0 18px; font-size: 13px; font-weight: 800; letter-spacing: .14em; opacity: .7; }
.hero-title {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: clamp(48px, 10vw, 96px); letter-spacing: -.02em; line-height: 1;
  text-shadow: 0 4px 0 rgba(0, 0, 0, .08);
}
.hero-ball .ball-icon { width: clamp(44px, 8vw, 72px); height: auto; }
/* 234차(감사 D-06): 영어 · 일본어 제목(POKEMONHUB)이 'POKEMONHU / B' 로 끊기던 것 — 이름은 한 덩어리 + 폭에 맞춘 크기 */
.hero-title .hero-name { white-space: nowrap; }
.hero-title:not(.is-word) { font-size: clamp(34px, 9vw, 88px); }
.hero-lead { margin: 18px 0 32px; font-size: clamp(15px, 2vw, 18px); font-weight: 600; opacity: .85; }
.hero-search {
  display: flex; gap: 8px; max-width: 560px; margin: 0 auto; padding: 8px;
  border-radius: 999px; background: var(--bg); border: 2px solid #1c1917;
  box-shadow: 0 6px 0 rgba(28, 25, 23, .9);
}
html[data-theme="dark"] .hero-search { border-color: var(--poke-yellow); box-shadow: 0 6px 0 rgba(255, 203, 5, .5); }
.hero-search input { border: 0; min-height: 44px; background: transparent; }
.hero-search input:focus { box-shadow: none; }
.hero-deco { position: absolute; inset: 0; pointer-events: none; }
.dot-grid {
  position: absolute; inset: 0; opacity: .25;
  background-image: radial-gradient(currentColor 1.2px, transparent 1.3px); background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at center, transparent 30%, #000 80%);
}
.spark {
  position: absolute; width: 22px; height: 22px; background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 3s ease-in-out infinite;
}
.spark.s1 { top: 18%; left: 14%; }
.spark.s2 { top: 30%; right: 12%; width: 30px; height: 30px; animation-delay: .8s; }
.spark.s3 { bottom: 18%; left: 24%; width: 16px; height: 16px; animation-delay: 1.6s; }
/* 68차: 히어로 '우주' 배경 (home.html 이 반반 랜덤) — 배경만 바꾸고 글자 · 몬스터볼 · 랭킹 판은 그대로. 글자색만 어두운 하늘에 맞게 흰색 */
.hero.is-space { background: #03060f; color: #fdfdfd; }
.hero-space { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-planet { position: absolute; left: 50%; bottom: -210px; transform: translateX(-50%); width: 160vw; max-width: 1900px; height: 460px; }
.hero-planet span { position: absolute; inset: 0; border-radius: 100%; }
.hero-planet span:first-child {
  background: radial-gradient(ellipse at 50% 100%, rgba(224, 102, 70, .95) 0%, rgba(199, 81, 58, .75) 20%, rgba(67, 142, 145, .5) 42%, rgba(20, 48, 70, .25) 60%, transparent 80%);
  filter: blur(32px);
}
.hero-planet span:last-child {
  opacity: .4; mix-blend-mode: screen; filter: blur(48px);
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 170, 110, .6) 0%, rgba(94, 219, 210, .4) 30%, transparent 65%);
}
@media (max-width: 720px) { .hero-planet { bottom: -170px; height: 340px; } }
/* 68차(2): 라이트모드 = 밝은 새벽 하늘(파스텔) · 글자는 원래 히어로 글자색, 행성 빛은 노랑 · 분홍 · 하늘색 */
html:not([data-theme="dark"]) .hero.is-space {
  background: linear-gradient(180deg, #e9efff 0%, #f3edff 45%, #fff3e3 100%); color: var(--hero-text);
}
html:not([data-theme="dark"]) .hero-planet span:first-child {
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 203, 5, .85) 0%, rgba(255, 150, 120, .6) 22%, rgba(150, 190, 255, .45) 45%, rgba(200, 210, 255, .2) 62%, transparent 80%);
}
html:not([data-theme="dark"]) .hero-planet span:last-child {
  mix-blend-mode: normal; opacity: .5;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 240, 180, .8) 0%, rgba(255, 190, 220, .45) 30%, transparent 65%);
}
/* 176차: 히어로 'DOT' — 카지노인 DOT(점 격자 파도, WebGL · hero-dot.js) 를 옮김 (156차 '소나' 대신).
   다크 = 깊은 남색 바탕 · 회색→흰 점(원본 색), 라이트 = 흰 바탕(#ffffff — 176차 사용자: 크림 → 연보라 → 흰색) · 남색 점.
   `--dot-light` 를 hero-dot.js 가 읽어 섞는 방식을 고름. 글자 · 랭킹 판 뒤는 바탕색으로 옅게 가려 읽기 쉽게 */
.hero.is-dot { --dot-bg: #ffffff; --dot-color: #1e2a78; --dot-light: 1; background: var(--dot-bg); color: var(--hero-text); }
html[data-theme="dark"] .hero.is-dot { --dot-bg: #070a16; --dot-color: #ffffff; --dot-light: 0; }
.hero-dot { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-dot-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; color: var(--dot-color); opacity: 0; transition: opacity 1.1s ease;
  -webkit-mask-image: radial-gradient(ellipse 94% 88% at 50% 46%, #000 0%, rgba(0, 0, 0, .96) 58%, rgba(0, 0, 0, .42) 79%, transparent 100%);
  mask-image: radial-gradient(ellipse 94% 88% at 50% 46%, #000 0%, rgba(0, 0, 0, .96) 58%, rgba(0, 0, 0, .42) 79%, transparent 100%);
}
.hero.is-dot-ready .hero-dot-canvas { opacity: 1; }
.hero.is-dot-fallback .hero-dot { background: radial-gradient(circle, color-mix(in srgb, var(--dot-color) 30%, transparent) 1px, transparent 1.6px) 0 0 / 14px 14px; }
.hero-dot-wash { position: absolute; inset: 0; background: radial-gradient(ellipse 30% 34% at 50% 46%, color-mix(in srgb, var(--dot-bg) 70%, transparent) 0%, transparent 100%); }
@media (max-width: 720px) { .hero-dot-wash { background: radial-gradient(ellipse 70% 40% at 50% 46%, color-mix(in srgb, var(--dot-bg) 70%, transparent) 0%, transparent 100%); } }
/* 227차: 히어로 'Shader'(hero-shader.js, WebGL RGB 빛 선) · 'Dash'(hero-dash.js, 마우스를 피하는 색 막대) — 글자 · 랭킹 판 뒤는 바탕색으로 옅게 가림 */
.hero.is-shader { --shader-bg: #ffffff; --shader-light: 1; background: var(--shader-bg); color: var(--hero-text); }
html[data-theme="dark"] .hero.is-shader { --shader-bg: #000000; --shader-light: 0; }
.hero-shader, .hero-dash { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-shader-canvas, .hero-dash-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .8s ease; }
.hero.is-shader-ready .hero-shader-canvas, .hero.is-dash-ready .hero-dash-canvas { opacity: 1; }
.hero.is-shader-fallback .hero-shader { background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, #6366f1 25%, transparent) 50%, transparent 60%); }
.hero-shader-wash, .hero-dash-wash { position: absolute; inset: 0; background: radial-gradient(ellipse 34% 30% at 50% 40%, color-mix(in srgb, var(--wash-bg) 72%, transparent) 0%, transparent 100%); }
.hero-shader-wash { --wash-bg: var(--shader-bg); }
.hero.is-dash { --dash-bg: #ffffff; background: var(--dash-bg); color: var(--hero-text); }
html[data-theme="dark"] .hero.is-dash { --dash-bg: #09090b; }
.hero-dash-wash { --wash-bg: var(--dash-bg); }
/* 229차: 히어로 'Float'(21st.dev Floating Food Hero) — 유나이트 포켓몬이 둥실 (6초 · 20px, 그림마다 0.3초씩 늦게) + 분홍 소용돌이 선 */
.hero.is-float { background: var(--bg); color: var(--hero-text); }
.hero-float { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-float-swirl { position: absolute; color: #fce7f3; }
.hero-float-swirl.is-a { top: 0; left: 0; transform: translate(-33%, -33%); }
.hero-float-swirl.is-b { bottom: 0; right: 0; transform: translate(25%, 25%); }
html[data-theme="dark"] .hero-float-swirl { color: rgb(131 24 67 / .2); }
.hero-float-img { position: absolute; width: var(--s); height: auto; object-fit: contain; animation: hero-float 6s ease-in-out infinite; filter: drop-shadow(0 10px 18px rgb(0 0 0 / .14)); }
.hero-float-img.is-flip { scale: -1 1; }
@keyframes hero-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@media (max-width: 720px) { .hero-float-img { width: calc(var(--s) * .45); opacity: .55; } .hero-float-img.is-small { display: none; } }
/* 229차: 히어로 'Sonar'(hero-sonar.js, 점 격자 + 소나 물결) — 점 색은 --sonar-color(캔버스 color 로 읽음) */
.hero.is-sonar { --sonar-bg: #ffffff; --sonar-color: #4f46e5; background: var(--sonar-bg); color: var(--hero-text); }
html[data-theme="dark"] .hero.is-sonar { --sonar-bg: #09090b; --sonar-color: #a5b4fc; }
.hero-sonar { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-sonar-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; color: var(--sonar-color); opacity: 0; transition: opacity .8s ease; }
.hero.is-sonar-ready .hero-sonar-canvas { opacity: 1; }
.hero.is-sonar { cursor: crosshair; }
.hero.is-sonar a, .hero.is-sonar button, .hero.is-sonar input, .hero.is-sonar .hero-board { cursor: auto; }
.hero.is-sonar a, .hero.is-sonar button { cursor: pointer; }
.hero-sonar-wash { position: absolute; inset: 0; background: radial-gradient(ellipse 34% 30% at 50% 40%, color-mix(in srgb, var(--sonar-bg) 72%, transparent) 0%, transparent 100%); }
@media (max-width: 720px) { .hero-sonar-wash { background: radial-gradient(ellipse 72% 34% at 50% 34%, color-mix(in srgb, var(--sonar-bg) 72%, transparent) 0%, transparent 100%); } }
@media (max-width: 720px) { .hero-shader-wash, .hero-dash-wash { background: radial-gradient(ellipse 72% 34% at 50% 34%, color-mix(in srgb, var(--wash-bg) 72%, transparent) 0%, transparent 100%); } }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }

.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.feature-card {
  position: relative; display: grid; align-content: start; gap: 6px; min-width: 0;
  padding: 22px 20px 20px; border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text);
  transition: transform .3s var(--ease-bounce), border-color .2s ease;
  animation: rise .5s var(--ease-bounce) both;
}
.feature-card:nth-child(2) { animation-delay: 50ms; }
.feature-card:nth-child(3) { animation-delay: 100ms; }
.feature-card:nth-child(4) { animation-delay: 150ms; }
.feature-card:nth-child(5) { animation-delay: 200ms; }
.feature-card:nth-child(6) { animation-delay: 250ms; }
.feature-card:nth-child(7) { animation-delay: 300ms; }
.feature-card:hover { text-decoration: none; transform: translateY(-5px) rotate(-.6deg); border-color: var(--tone); }
.feature-icon {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 8px; border-radius: 14px;
  background: color-mix(in srgb, var(--tone) 22%, transparent); color: color-mix(in srgb, var(--tone) 70%, var(--text));
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 20px; }
.feature-card small { color: var(--text-3); font-size: var(--text-xs); line-height: 1.5; }
.feature-badge { position: absolute; top: 14px; right: 14px; padding: 2px 8px; border-radius: 999px; background: var(--surface-muted); color: var(--text-3); font-size: 10px; font-weight: 800; }

.home-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.today-card { position: relative; overflow: hidden; }
.today-card::after {
  content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%;
  border: 26px solid color-mix(in srgb, var(--poke-yellow) 30%, transparent); pointer-events: none; z-index: 0;
}
.today-card > * { position: relative; z-index: 1; }  /* 장식 동그라미는 글자 뒤로 */
.today-body { display: flex; align-items: center; gap: 24px; margin-top: 12px; }
.today-sprite {
  display: grid; place-items: center; flex: none; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--bg) 0%, var(--surface-muted) 70%);
  border: 1.5px solid var(--border);
}
.today-sprite img { image-rendering: pixelated; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.today-info { display: grid; gap: 4px; justify-items: start; }
.dex-no { color: var(--text-3); font-size: var(--text-xs); font-weight: 800; letter-spacing: .06em; }
.today-name { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 32px; line-height: 1.1; }
.today-genus { color: var(--text-2); font-size: var(--text-sm); }
.type-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }

/* ---------- 타입 칩 ---------- */
.type-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; padding: 4px 12px; border-radius: 999px;
  background: var(--type-color); color: #fff; font-size: 12px; font-weight: 800;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}
.type-chip.is-button {
  min-height: 38px; border: 2px solid transparent; cursor: pointer; font-family: var(--font-body); font-size: 14px;
  transition: transform .25s var(--ease-bounce), opacity .15s ease, border-color .15s ease;
}
.type-chip.is-button:hover { transform: translateY(-2px) scale(1.04); }
.type-picker.has-selection .type-chip.is-button:not([aria-pressed="true"]) { opacity: .4; }
.type-chip.is-button[aria-pressed="true"] { border-color: var(--text); transform: scale(1.06); }
.type-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 16px; }

.matchup { display: grid; gap: 12px; }
.matchup-row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 16px 20px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  animation: rise .4s var(--ease-bounce) both;
}
.matchup-row .mult { font-family: var(--font-body); font-size: 26px; font-weight: 800; }
.matchup-row .mult small { display: block; color: var(--text-3); font-size: 11px; font-weight: 700; }
.matchup-row.is-weak .mult { color: var(--poke-red); }
.matchup-row.is-resist .mult { color: var(--poke-blue); }
.matchup-row.is-immune .mult { color: var(--text-3); }
.matchup-row .type-row { margin: 0; }

/* ---------- 도감 ---------- */
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.dex-grid.is-loading { min-height: 110vh; }  /* 47차: 카드가 오기 전 자리를 잡아 둬서 푸터가 밀려 내려가는 화면 밀림(CLS)을 막는다 */
.dex-card {
  display: grid; justify-items: center; gap: 4px; padding: 14px 12px 16px; text-align: center;
  border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  transition: transform .3s var(--ease-bounce), border-color .2s ease;
}
.dex-card:hover { transform: translateY(-4px); border-color: var(--poke-yellow); }
.dex-card img { width: 96px; height: 96px; image-rendering: pixelated; }
.dex-card:hover img { animation: hop .5s var(--ease-bounce); }
@keyframes hop { 40% { transform: translateY(-10px); } }
.dex-card .dex-name { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 18px; line-height: 1.2; }
.dex-card .type-row { justify-content: center; margin: 4px 0 0; }
.dex-card .type-chip { min-width: 0; padding: 2px 9px; font-size: 11px; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 24px; }

/* ---------- 새소식 ---------- */
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.account-card {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
}
.account-avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-muted); }
.account-info { display: grid; flex: 1; min-width: 0; }
.account-info a { font-size: var(--text-sm); font-weight: 700; }
.account-info small { color: var(--text-3); font-size: var(--text-xs); }

/* ---------- 아이디 블러 ---------- */
.blur-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.blur-stage { min-width: 0; }
.dropzone {
  display: grid; justify-items: center; gap: 10px; padding: 72px 20px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface);
  transition: border-color .15s ease, background-color .15s ease, transform .25s var(--ease-bounce);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--poke-yellow); background: var(--surface-muted); }
.dropzone.is-over { transform: scale(1.01); }
.dropzone strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 20px; }
.dropzone small { color: var(--text-3); font-size: var(--text-xs); }
.canvas-wrap {
  padding: 12px; border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  background: repeating-conic-gradient(var(--surface-muted) 0 25%, var(--bg) 0 50%) 0 0 / 20px 20px;
}
.canvas-wrap canvas { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; cursor: crosshair; touch-action: none; }
.blur-controls { position: sticky; top: 92px; display: grid; gap: 18px; padding: 20px; }
.blur-controls .field { min-width: 0; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-muted); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span {
  display: block; padding: 8px 0; border-radius: 999px; text-align: center; cursor: pointer;
  color: var(--text-2); font-size: var(--text-xs); font-weight: 700; transition: background-color .15s ease;
}
.segmented input:checked + span { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.segmented input:focus-visible + span { box-shadow: var(--focus-ring); }

/* ---------- 푸터 ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { width: min(var(--shell-max), 100%); margin: 0 auto; padding: 28px var(--shell-gutter) 96px; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.footer-brand strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 18px; }
.footer-brand span { color: var(--text-3); font-size: var(--text-xs); }
.footer-note { margin: 4px 0 0; color: var(--text-3); font-size: 11px; }

/* ---------- 떠 있는 버튼 (카지노인과 같은 자리) ---------- */
.theme-toggle, .scroll-top {
  position: fixed; right: 18px; z-index: 50;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid var(--border-strong); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); color: var(--text); cursor: pointer;
  transition: transform .25s var(--ease-bounce), border-color .15s ease;
}
.theme-toggle { bottom: 18px; height: 42px; padding: 0 16px; border-radius: 999px; font: 800 11px/1 var(--font-body); letter-spacing: .1em; }
.scroll-top { bottom: 70px; width: 42px; height: 42px; border-radius: 50%; }
.theme-toggle:hover, .scroll-top:hover { transform: translateY(-2px); border-color: var(--text); }

/* ---------- 반응형 ---------- */
@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .home-split, .blur-layout { grid-template-columns: 1fr; }
  .blur-controls { position: static; }
  .kpi-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .topbar { gap: 14px 8px; padding-top: 12px; }  /* 83차: 로고 줄 ↔ 메뉴 줄 사이 조금 더 (8 → 14px) */
  .topbar-brand { width: 100%; }
  .brand-wordmark { font-size: 21px; }
  .topbar-nav { width: calc(100% + 2 * var(--shell-gutter)); margin: 0 calc(-1 * var(--shell-gutter)); padding: 0 var(--shell-gutter); --nav-pad: var(--shell-gutter); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 56px var(--shell-gutter) 64px; }
  .hero-search .btn { padding: 0 14px; }
  .today-body { flex-direction: column; text-align: center; }
  .today-info { justify-items: center; }
  .matchup-row { grid-template-columns: 1fr; gap: 8px; }
  .dex-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
  .filter-panel .btn { width: 100%; }
}
@media (max-width: 359px) {
  .feature-grid, .kpi-grid, .kpi-grid-4 { grid-template-columns: 1fr; }
}

/* ---------- 유나이트 플레이어블 포켓몬 ---------- */
.role-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 20px; }
.role-kpi { text-align: left; font: inherit; color: inherit; cursor: pointer; border-top: 4px solid var(--role-color); }
.role-kpi:hover, .role-kpi[aria-pressed="true"] { border-color: var(--role-color); }
.role-kpi[aria-pressed="true"] { background: color-mix(in srgb, var(--role-color) 10%, var(--bg)); }
.role-dot { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 50%; background: var(--role-color); vertical-align: 1px; }
.section-head h2 .role-dot { width: 14px; height: 14px; vertical-align: 2px; }
.unite-role-field { flex: 2 1 480px; }
.role-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.role-tabs label { position: relative; --role-color: var(--text); }
.role-tabs input { position: absolute; opacity: 0; }
.role-tabs span {
  display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--border-strong); background: var(--bg); color: var(--text-2); font-size: var(--text-sm); font-weight: 700;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.role-tabs b { color: var(--text-3); font-weight: 600; font-size: var(--text-xs); }
.role-tabs span:hover { border-color: var(--role-color); color: var(--text); }
.role-tabs input:checked + span { background: var(--role-color); border-color: var(--role-color); color: #fff; }
.role-tabs label:first-child input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.role-tabs input:checked + span b { color: inherit; opacity: .8; }
.role-tabs input:focus-visible + span { box-shadow: var(--focus-ring); }

.unite-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.unite-card {
  display: grid; justify-items: center; gap: 6px; padding: 14px 12px 16px; text-align: center;
  border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  transition: transform .3s var(--ease-bounce), border-color .2s ease;
}
.unite-card:hover { transform: translateY(-4px); border-color: var(--role-color); }
.unite-portrait {
  position: relative; display: grid; place-items: center; width: 116px; height: 116px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--role-color) 22%, var(--bg)) 0%, color-mix(in srgb, var(--role-color) 8%, var(--bg)) 70%);
}
.unite-portrait img { width: 104px; height: 104px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .15)); }
.unite-card:hover .unite-portrait img { animation: hop .5s var(--ease-bounce); }
.form-badge {
  position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; color: #fff; background: #57534e;
}
.form-badge.is-mega { background: linear-gradient(90deg, #7c3aed, #ec4899); }
.form-badge.is-regional { background: #0ea5e9; }
.unite-name { margin-top: 4px; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 18px; line-height: 1.2; }
.role-badge { color: var(--role-color); font-size: 11px; font-weight: 800; }
.unite-card .type-row { justify-content: center; margin: 0; }
.unite-card .type-chip { min-width: 0; padding: 2px 9px; font-size: 11px; }
@media (max-width: 900px) { .role-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .role-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .role-kpis .kpi-card { padding: 12px 14px; }
  .role-kpis .value { font-size: 24px; }
  .role-kpis .unit { display: none; }
  .unite-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
}

/* ---------- 공용: 토스트 · 표 · 폼 그리드 ---------- */
/* 38차: 카지노인처럼 화면 한가운데 알림 카드 (아이콘 · 제목 · 설명 · 닫기). 제목/설명 나누기 · 아이콘 · 닫기는 site.js 가 붙인다 */
.toast-stack { position: fixed; top: 50%; left: 0; right: 0; z-index: 900; transform: translateY(-50%); margin-inline: auto;
  display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 3px 12px;
  padding: 16px 16px 18px; border: 1.5px solid var(--border); border-radius: 20px; background: var(--surface);
  color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 10px 20px -8px rgba(0, 0, 0, .18), 0 24px 44px -16px rgba(0, 0, 0, .22);
  animation: toast-in .42s var(--ease-bounce) both;
}
:root[data-theme="dark"] .toast { box-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 24px -8px rgba(0, 0, 0, .6), 0 24px 46px -16px rgba(0, 0, 0, .55); }
.toast.is-leaving { animation: toast-out .2s ease forwards; }
.toast-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: color-mix(in srgb, var(--toast-color) 16%, transparent); color: var(--toast-color); }
.toast { --toast-color: var(--poke-blue); }
.toast-ok { --toast-color: var(--poke-green); }
.toast-warn, .toast-error { --toast-color: var(--poke-red); }
/* 131차: 로그인 '오늘의 운세' 알림 (base.html · fortune.login_greeting) */
.toast-fortune { --toast-color: #8b5cf6; }
.toast-fortune > p, .toast-fortune > a { grid-column: 2; }
.toast-fortune-score { margin: 0; font-size: 18px; font-weight: 800; color: var(--toast-color); }
.toast-fortune-link { justify-self: start; margin-top: 4px; font-size: var(--text-sm); font-weight: 800; }
.toast-title { grid-column: 2; margin: 6px 0 0; font-size: var(--text-sm); font-weight: 800; line-height: 1.5; overflow-wrap: anywhere; }
.toast-description { grid-column: 2; margin: 0; color: var(--text-2); font-size: var(--text-sm); line-height: 1.6; overflow-wrap: anywhere; }
.toast-close { grid-row: 1; grid-column: 3; display: grid; place-items: center; width: 28px; height: 28px; margin: 2px -4px 0 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; }
.toast-close:hover { background: var(--surface-muted); color: var(--text); }
.toast-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--toast-color); opacity: .55;
  transform-origin: left; animation: toast-timer var(--toast-life, 5s) linear forwards; }
.toast:hover .toast-timer { animation-play-state: paused; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: scale(.97); } }
@keyframes toast-timer { to { transform: scaleX(0); } }
.notice-ok { border-color: var(--poke-green); border-style: solid; }

textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--bg); color: var(--text); font: 500 var(--text-base)/1.6 var(--font-body); resize: vertical;
}
textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus { outline: none; border-color: var(--poke-yellow); box-shadow: var(--focus-ring); }
input[type="number"], input[type="password"] {
  width: 100%; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--border-strong); border-radius: 999px;
  background: var(--bg); color: var(--text); font: 500 var(--text-base) var(--font-body);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid h2 { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 22px; }
.form-grid .field { min-width: 0; }
.span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.profile-form { display: grid; gap: 16px; }
.narrow-form { display: grid; gap: 16px; max-width: 420px; }
.btn-danger { border-color: color-mix(in srgb, var(--poke-red) 60%, transparent); color: var(--poke-red); }
.btn-danger:hover { border-color: var(--poke-red); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > .btn { max-width: 100%; }  /* 66차 점검: 긴 버튼(일본어 등)이 화면 밖으로 */
.tm-presets .btn { white-space: normal; height: auto; min-height: 32px; text-align: left; }
.page-header-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-header-row .page-header { margin-bottom: 24px; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.prose { white-space: pre-line; color: var(--text-2); font-size: var(--text-sm); line-height: 1.8; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.data-table th { padding: 10px 12px; border-bottom: 1.5px solid var(--border-strong); color: var(--text-3); font-size: var(--text-xs); text-align: left; white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); }
.data-table tbody tr:hover { background: var(--surface-muted); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.members-cell { color: var(--text-2); }
.inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline-form input[type="text"] { width: 180px; min-height: 36px; }
.inline-form input[type="number"] { width: 96px; min-height: 36px; }
.danger-zone { border-color: color-mix(in srgb, var(--poke-red) 40%, var(--border)); }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }

/* 칩 라디오/체크 (포지션 고르기) */
.chip-radio, .chip-toggle { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-radio label { position: relative; }
.chip-radio input { position: absolute; opacity: 0; }
.chip-radio span, .chip-toggle .chip {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--border-strong); background: var(--bg); color: var(--text-2); font: 700 var(--text-sm) var(--font-body);
  transition: background-color .15s ease, border-color .15s ease, transform .2s var(--ease-bounce);
}
.chip-radio span:hover, .chip-toggle .chip:hover { border-color: var(--text); transform: translateY(-1px); }
.chip-radio input:checked + span, .chip-toggle .chip.is-on { background: var(--poke-yellow); border-color: #e0b000; color: var(--on-primary); }
.chip-radio input:focus-visible + span { box-shadow: var(--focus-ring); }
.segmented.two { grid-template-columns: repeat(2, 1fr); }

.pokemon-picker { display: flex; align-items: center; gap: 8px; }
.pokemon-picker select { flex: 1; }
.pick-preview { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-muted); }
.pick-preview img { width: 40px; height: 40px; object-fit: contain; }
.sig-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }

/* ---------- 대회 ---------- */
.tab-strip {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0; width: fit-content; max-width: 100%; margin: 0 auto 28px;
  border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); padding: 4px; overflow-x: auto;
}
.tab-strip a { position: relative; padding: 9px 18px; border-radius: 999px; color: var(--text-3); font-size: var(--text-sm); font-weight: 700; white-space: nowrap; }
.tab-strip a:hover { color: var(--text); text-decoration: none; }
.tab-strip a.active { background: var(--bg); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.tab-strip a.active::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 3px; height: 3px; border-radius: 3px; background: var(--poke-yellow); }
.tab-strip .tab-admin { color: var(--poke-red); }

.status-pill { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0; text-transform: none; vertical-align: 1px; background: var(--surface-muted); color: var(--text-2); }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill.is-recruiting { color: #16a34a; background: color-mix(in srgb, #22c55e 14%, var(--bg)); }
.status-pill.is-auction { color: #dc2626; background: color-mix(in srgb, #ef4444 14%, var(--bg)); }
.status-pill.is-auction::before { animation: pulse 1.2s ease-in-out infinite; }
.status-pill.is-ongoing { color: #2563eb; background: color-mix(in srgb, #3b82f6 14%, var(--bg)); }
.status-pill.is-closed { color: #c2410c; background: color-mix(in srgb, #f97316 14%, var(--bg)); }  /* 213차: 모집 마감 */
@keyframes pulse { 50% { opacity: .25; } }
.page-eyebrow .status-pill { margin-left: 6px; }
.live-dot { color: var(--poke-red); font-weight: 800; }
.live-dot::before { content: "● "; animation: pulse 1.2s ease-in-out infinite; }

.tournament-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tournament-card {
  display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text);
  transition: transform .3s var(--ease-bounce), border-color .2s ease;
}
.tournament-card:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--poke-yellow); }
.tournament-card-top { display: flex; align-items: center; justify-content: space-between; }
.tournament-card-top .status-pill { margin-left: 0; }
.tournament-card strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 24px; line-height: 1.25; }
.tournament-card small { color: var(--text-3); }
.tournament-card-stats { display: flex; align-items: center; gap: 16px; margin-top: auto; padding-top: 6px; color: var(--text-3); font-size: var(--text-xs); }
.tournament-card-stats b { color: var(--text); font-size: 18px; margin-right: 2px; }
/* 157차: 대회 목록의 지난 대회 카드 — 회색 바탕 · 옅은 글자로 '끝난 대회' 느낌 (누르면 결과는 그대로 열림). 158차: 상태가 '종료'인 사이트 대회도 같은 is-past */
.tournament-card.is-past { background: color-mix(in srgb, var(--text-3) 10%, var(--surface)); border-style: dashed; color: var(--text-2); }
.tournament-card.is-past strong { color: var(--text-2); }
.tournament-card.is-past .tournament-card-stats b { color: var(--text-2); }
.tournament-card.is-past .tournament-card-cover { filter: grayscale(1); opacity: .55; }
.tournament-card.is-past .status-pill, .tournament-card.is-past .format-pill { filter: grayscale(1); opacity: .8; }
.tournament-card.is-past:hover { border-color: var(--text-3); border-style: solid; }
/* 150차: 지난 대회 (대회 목록 아래 · 상세) */
.past-section { margin-top: 40px; }
.past-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.past-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1.5px dashed var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); transition: transform .3s var(--ease-bounce), border-color .2s ease; }
.past-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--poke-yellow); border-style: solid; }
.past-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--text-xs); }
.past-card strong { font-size: 17px; font-weight: 800; line-height: 1.3; }
.past-winner { color: var(--text-2); font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.past-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 8px; }
.past-players { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.past-table td:nth-child(-n+2) { white-space: nowrap; }
.past-table tr.is-top1 td:first-child b { color: var(--poke-red); }
/* 157차: 지난 대회 회원 연결 (관리자) — 선수 이름 · 회원 찾기 칸 한 줄씩 */
.past-link-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 8px 16px; margin: 12px 0; }
.past-link-row { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-md, 12px); background: var(--surface); }
.past-link-who { display: grid; min-width: 0; }
.past-link-who small { color: var(--text-3); font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.past-link-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-cell a, .rank-history a { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.recent-cell a:hover, .rank-history a:hover { color: var(--text); text-decoration-style: solid; }

.rule-list { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 10px; color: var(--text-2); font-size: var(--text-sm); }
.rule-list b { color: var(--text); }
.rule-list li::marker { color: var(--poke-red); font-weight: 800; }
.leader-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.leader-list a { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 999px; color: var(--text); }
.leader-list a:hover { background: var(--surface-muted); text-decoration: none; }
.leader-list span { display: grid; }
.leader-list small { color: var(--text-3); font-size: var(--text-xs); }

.portrait {
  display: inline-grid; place-items: center; flex: none; width: var(--size); height: var(--size); border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, var(--bg) 0%, var(--surface-muted) 75%); border: 1.5px solid var(--border); overflow: hidden;
}
.portrait img { width: 92%; height: 92%; object-fit: contain; }
.portrait-empty { color: var(--text-3); font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: calc(var(--size) * .4); }
.portrait.is-hero { border-width: 3px; border-color: var(--poke-yellow); background: radial-gradient(circle at 50% 35%, #fff 0%, var(--poke-yellow-soft) 80%); }

.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.profile-card {
  position: relative; display: grid; align-content: start; gap: 14px; padding: 18px; border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); transition: transform .3s var(--ease-bounce), border-color .2s ease;
}
.profile-card:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--poke-yellow); }
.profile-card.is-leader { border-color: color-mix(in srgb, var(--poke-yellow) 70%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--poke-yellow) 16%, var(--surface)) 0%, var(--surface) 60%); }
.profile-card-head { display: flex; align-items: center; gap: 12px; }
.profile-card-title { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.profile-card-title strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 22px; line-height: 1.2; }
.profile-no { color: var(--poke-red); font-size: var(--text-xs); font-weight: 800; }
.profile-card-ratings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.profile-card-ratings span { display: grid; padding: 8px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); }
.profile-card-ratings small { color: var(--text-3); font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-card-ratings b { font-size: 15px; }
.profile-card-sigs { display: flex; gap: 6px; }
.pos-chip { display: inline-flex; white-space: nowrap; padding: 2px 10px; margin: 0 4px 4px 0; border-radius: 999px; background: var(--surface-muted); color: var(--text-2); font-size: 11px; font-weight: 800; }
.pos-chip.is-main { background: var(--poke-yellow); color: var(--on-primary); }
.sold-tag { position: absolute; top: 14px; right: 14px; padding: 3px 10px; border-radius: 999px; background: var(--poke-red); color: #fff; font-size: 11px; font-weight: 800; transform: rotate(4deg); }
.sold-tag.is-unsold { background: var(--text-3); }

.profile-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.profile-sheet-head h1 { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: clamp(32px, 5vw, 48px); }
.profile-sheet-head .profile-no { font-size: .6em; vertical-align: middle; }
.team-tag { display: inline-block; margin: 8px 0 0; padding: 4px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: var(--text-sm); font-weight: 800; }
.info-list { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px 16px; margin: 0; font-size: var(--text-sm); }
.info-list dt { color: var(--text-3); font-weight: 700; }
.info-list dd { margin: 0; }
.info-list ul { margin: 0; padding-left: 18px; }
.sig-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.sig-card { display: grid; justify-items: center; gap: 4px; padding: 14px 8px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--bg); text-align: center; }
.sig-card strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 17px; }
.sig-card span { display: flex; gap: 6px; font-size: var(--text-sm); font-weight: 700; }
.sig-card small { color: var(--text-3); font-weight: 600; }
.appeal .prose { color: var(--text); font-size: var(--text-base); }
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; }
.profile-actions .meta { margin-left: auto; }
.unlock { position: relative; }
.unlock summary { list-style: none; }
.unlock summary::-webkit-details-marker { display: none; }
.unlock form { display: flex; gap: 6px; margin-top: 8px; }
.unlock input { min-height: 36px; }

/* 경매판 */
.team-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.team-col { display: grid; align-content: start; gap: 14px; padding: 18px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.team-col.is-full { border-color: var(--poke-green); }
.team-head { display: flex; align-items: center; gap: 10px; }
.team-head div { display: grid; }
.team-head strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 20px; line-height: 1.2; }
.team-head small { color: var(--text-3); font-size: var(--text-xs); }
.points-row { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--text-xs); color: var(--text-3); font-weight: 700; }
.points-row b { color: var(--text); font-size: 22px; }
.points-row b small { color: var(--text-3); font-size: 11px; margin-left: 2px; }
.points-bar { height: 10px; margin-top: 6px; border-radius: 999px; background: var(--surface-muted); overflow: hidden; }
.points-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffcb05, #ff9f1c); transition: width .6s var(--ease-bounce); }
.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.roster li a { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--text); animation: rise .4s var(--ease-bounce) both; }
.roster li a:hover { text-decoration: none; border-color: var(--poke-yellow); }
.roster-name { display: grid; flex: 1; min-width: 0; font-weight: 700; font-size: var(--text-sm); line-height: 1.2; }
.roster-name small { color: var(--text-3); font-size: 10px; font-weight: 600; }
.price { color: var(--poke-red); font-weight: 800; font-size: var(--text-sm); white-space: nowrap; }
.price.is-draft { color: var(--poke-blue); font-size: 11px; }
.price.is-unsold { color: var(--text-3); }
.empty-slot { display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 999px; border: 1.5px dashed var(--border-strong); color: var(--text-3); font-size: var(--text-xs); }
.admin-console { border-color: color-mix(in srgb, var(--poke-red) 45%, var(--border)); }
.console-grid { display: grid; grid-template-columns: 1.4fr 1fr .8fr; gap: 12px; margin-top: 16px; }
.console-box { display: grid; align-content: start; gap: 12px; padding: 16px; border-radius: var(--radius-md); background: var(--bg); border: 1px solid var(--border); }
.console-box h3 { margin: 0; font-size: 15px; }
.console-box .field { min-width: 0; }
.mini-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mini-list a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: var(--text-sm); font-weight: 700; }
.mini-list a:hover { text-decoration: none; border-color: var(--poke-yellow); }
.mini-list small { color: var(--text-3); font-size: 10px; }
.priority-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: var(--text-sm); }
.priority-list li { padding: 8px 14px; border-radius: 999px; background: var(--surface-muted); }
.priority-list li:first-child { background: var(--poke-yellow); color: var(--on-primary); }
.priority-list small { color: inherit; opacity: .7; margin-left: 6px; }
.auction-log { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: var(--text-sm); }
.auction-log li { padding: 8px 0; border-bottom: 1px dashed var(--border); }

/* 결과 */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; margin-bottom: 12px; }
.podium-card { display: grid; justify-items: center; gap: 8px; padding: 22px 16px; text-align: center; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); animation: rise .5s var(--ease-bounce) both; }
.podium-card.rank-1 { order: 2; padding-top: 36px; border-color: var(--poke-yellow); background: linear-gradient(180deg, color-mix(in srgb, var(--poke-yellow) 22%, var(--surface)), var(--surface)); }
.podium-card.rank-2 { order: 1; }
.podium-card.rank-3 { order: 3; }
.medal { font-size: 40px; line-height: 1; }
.podium-card strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 22px; }
.podium-card small { color: var(--text-3); font-size: var(--text-xs); }
.podium-members { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.match-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.match {
  display: grid; grid-template-columns: 120px 1fr auto 1fr auto; align-items: center; gap: 12px;
  padding: 14px 18px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); font-size: var(--text-sm);
}
.match-stage { display: grid; font-weight: 800; }
.match-stage small { color: var(--text-3); font-weight: 600; }
.match-team { font-weight: 700; color: var(--text-2); }
.match-team:nth-of-type(4) { text-align: right; }
.match-team.is-win { color: var(--text); }
.match-team.is-win::after { content: " 🏆"; }
.match-score { padding: 4px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-weight: 800; font-variant-numeric: tabular-nums; }
.match-note { grid-column: 2 / -1; color: var(--text-3); font-size: var(--text-xs); }
.match-list.compact { margin-top: 16px; }

@media (max-width: 900px) {
  .console-grid { grid-template-columns: 1fr; }
  .podium { grid-template-columns: 1fr; }
  .podium-card.rank-1, .podium-card.rank-2, .podium-card.rank-3 { order: 0; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .sig-row { grid-template-columns: 1fr 1fr; }
  .sig-row .field.grow { grid-column: 1 / -1; }
  /* 66차: 좁은 화면에서도 주력 포켓몬은 이름 오른쪽 위에 작게 (위로 따로 빠지지 않게) */
  .profile-sheet-head { align-items: flex-start; gap: 12px; }
  .profile-sheet-head > div:first-child { flex: 1 1 auto; min-width: 0; }
  .profile-sheet-head .hero-pokemon-link, .profile-sheet-head > .portrait { flex: 0 0 auto; margin-top: 28px; }
  .profile-sheet-head .portrait.is-hero { --size: 84px !important; }
  .sig-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .info-list { grid-template-columns: 80px minmax(0, 1fr); }
  .match { grid-template-columns: 1fr auto 1fr; }
  .match-stage { grid-column: 1 / -1; }
  .match-team:nth-of-type(4) { text-align: right; }
  .match-note { grid-column: 1 / -1; }
  .profile-actions .meta { margin-left: 0; width: 100%; }
}

/* ---------- 회원 ---------- */
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
/* 60차: 방문자 배지 (카지노인) — 라벨 | 값 알약, 좁아지면 메뉴가 먼저라 숨김 */
.visit-counter { display: flex; align-items: center; gap: 6px; margin: 0; }
.visit-badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-3); font-size: 11px; line-height: 1.55; white-space: nowrap; }
.visit-badge-rule { width: 1px; height: 11px; background: var(--border); }
.visit-badge strong { color: var(--text); font-family: var(--font-numeric), var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 1280px) { .visit-counter { display: none; } }
.topbar-login { color: var(--text-2); font-size: var(--text-sm); font-weight: 700; padding: 6px 2px; border-bottom: 1.5px solid var(--border-strong); }
.topbar-login:hover { color: var(--text); text-decoration: none; }
.user-menu { position: relative; }
.user-menu summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1.5px solid var(--border); font-size: var(--text-sm); font-weight: 700; white-space: nowrap; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { border-color: var(--poke-yellow); }
.user-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--poke-yellow); color: var(--on-primary); font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 15px; }
.admin-badge { padding: 1px 7px; border-radius: 999px; background: var(--poke-red); color: #fff; font-size: 10px; }
.admin-badge.is-mod { background: var(--poke-blue); }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 55; display: grid; min-width: 220px; padding: 6px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg); box-shadow: 0 16px 40px rgba(0, 0, 0, .14); }
.user-menu-panel a, .user-menu-panel button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font: 600 var(--text-sm) var(--font-body); text-align: left; cursor: pointer; }
.user-menu-panel a:hover, .user-menu-panel button:hover { background: var(--surface-muted); color: var(--text); text-decoration: none; }
/* 언어 바꾸기 (KO / JA) */
.lang-switch { position: relative; }
.lang-switch summary { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; list-style: none; cursor: pointer; border-radius: 999px; border: 1.5px solid var(--border); font: 800 12px var(--font-body); letter-spacing: .06em; color: var(--text-2); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { border-color: var(--poke-yellow); color: var(--text); }
.lang-switch-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 56; display: grid; min-width: 150px; padding: 6px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg); box-shadow: 0 16px 40px rgba(0, 0, 0, .14); }
.lang-switch-menu a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: var(--text-sm); white-space: nowrap; }
.lang-switch-menu a b { font-size: 11px; letter-spacing: .06em; color: var(--text-3, var(--text-2)); }
.lang-switch-menu a:hover { background: var(--surface-muted); color: var(--text); text-decoration: none; }
.lang-switch-menu a[aria-current] { color: var(--text); background: var(--surface-muted); }
.lang-switch-menu a[aria-current] b { color: var(--poke-red); }
/* 회원 글 번역 */
.translate-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.translate-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2); font: 700 12px var(--font-body); cursor: pointer; }
.translate-btn:hover { border-color: var(--poke-blue); color: var(--text); }
.translate-btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.translated-box { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-muted); border-left: 4px solid var(--poke-blue); }
.translated-box .meta { display: block; margin-bottom: 6px; font-size: 12px; }
.tr-meta { display: block; margin: 0 0 6px; color: var(--text-3, var(--text-2)); font-size: 12px; font-weight: 700; }
.translate-row .tr-meta { display: inline; margin: 0; }
.auth-wrap { max-width: 760px; margin: 0 auto; }
.auth-wrap.narrow { max-width: 460px; }
.narrow-form { max-width: none; }
.narrow-panel { max-width: 760px; }
.code-box { padding: 18px; border-radius: var(--radius-md); background: var(--bg); border: 1.5px dashed var(--border-strong); }
.code-box h2 { margin-bottom: 4px; }
.code-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.code-input { text-transform: uppercase; letter-spacing: .08em; font-weight: 800 !important; }
.code-input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 500; }
.code-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.code-chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: var(--surface-muted); color: var(--text-2); font-size: var(--text-xs); font-weight: 800; letter-spacing: .05em; }
.code-chip.is-main { background: var(--accent); color: var(--accent-text); }
a.code-chip:hover { text-decoration: none; transform: translateY(-1px); }
.code-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.code-list li { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.code-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.code-head .field-label { min-width: 64px; }
.code-request summary { cursor: pointer; color: var(--text-3); font-size: var(--text-xs); font-weight: 700; }
.code-request form { margin-top: 8px; }
.code-list .inline-form input[type="text"] { width: 160px; }
.mini-history { margin: 8px 0 0; padding-left: 18px; font-size: var(--text-sm); color: var(--text-2); }
.check-line { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: var(--poke-yellow); }
.static-value { margin: 0; padding: 10px 0; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 20px; }
.data-table tr.is-muted td { opacity: .5; }
.data-table code, .code-list code { font-weight: 800; letter-spacing: .05em; }

/* ---------- 랭킹 ---------- */
.category-kpis { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 20px; }
.category-kpis .value small { font-size: 16px; margin-left: 2px; }
/* 193차: 순위별 포인트 — 칸마다 순위 · 점수 */
.category-kpis { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.points-card .label { color: var(--text); font-size: var(--text-sm); font-weight: 800; }
.points-card .label em { margin-left: 6px; color: var(--text-3); font-size: var(--text-xs); font-style: normal; font-weight: 600; }
.points-ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.points-ladder li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-muted); }
.points-ladder .pl-place { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.points-ladder .pl-place i { font-style: normal; font-size: 13px; }
.points-ladder b { font-family: var(--font-numeric); font-size: 22px; font-weight: 800; line-height: 1; }
.points-ladder b small { margin-left: 1px; font-family: var(--font-body); font-size: 12px; color: var(--text-3); }
.points-ladder li.is-1 { border-color: color-mix(in srgb, var(--poke-yellow) 65%, var(--border)); background: color-mix(in srgb, var(--poke-yellow) 12%, var(--surface-muted)); }
.points-ladder li.is-2 { border-color: color-mix(in srgb, #94a3b8 55%, var(--border)); }
.points-ladder li.is-3 { border-color: color-mix(in srgb, #d97706 45%, var(--border)); }
.points-ladder li.is-join b { color: var(--text-2); }
.rank-podium { margin-top: 8px; }
.podium-points { font-family: var(--font-body); font-size: 34px; font-weight: 800; line-height: 1; }
.podium-points small { font-size: 14px; margin-left: 2px; color: var(--text-3); }
.podium-points small:first-child { margin: 0 2px 0 0; }
.podium-card strong a { color: var(--text); }
.rank-table td:first-child { width: 64px; font-size: 18px; }
.rank-table tbody tr:nth-child(-n+3) td:first-child b { color: var(--poke-red); }
.recent-cell > div { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); }
.recent-cell small { color: var(--text-3); margin-left: 4px; }
.rank-history { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; font-size: var(--text-sm); }
.rank-history li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.category-form input[type="number"], .category-table input[type="number"] { width: 76px; }
.category-form input[type="text"], .category-table input[type="text"] { width: 200px; }
.category-table td { vertical-align: middle; }
.category-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.category-actions form { margin: 0; }

@media (max-width: 640px) {
  .topbar-actions { position: absolute; top: 12px; right: var(--shell-gutter); }
  .topbar-login + .btn { display: none; }
  .user-menu summary { padding-right: 4px; font-size: 0; gap: 0; }
  .user-menu summary .admin-badge { display: none; }
  .code-inputs { grid-template-columns: 1fr; }
}
.data-table td.btn-row { display: table-cell; white-space: nowrap; }
.data-table td.btn-row .inline-form { margin-right: 4px; }
.rank-table td:nth-child(2) { white-space: nowrap; }
/* 146차: 좁은 화면에서 포지션 칩 · 'S 1,058' 이 두 줄로 깨지지 않게 — 넘치면 표가 가로로 밀림 */
.rank-table td.num { white-space: nowrap; }
@media (max-width: 640px) {
  .rank-table th:last-child, .rank-table td.recent-cell { display: none; }
  .rank-podium .podium-card { padding: 14px; }
  .rank-podium .medal { font-size: 28px; }
}

/* ==========================================================================
   입력 폼 — 카지노인(Vega 컨트롤)과 같은 기하. 색은 포켓몬허브 토큰 그대로.
   높이 36px(모바일 40px) · 모서리 7px · 1px 테두리 · 얕은 그림자 · 포커스 2px 링
   ========================================================================== */
:root {
  --ui-radius: 7px;
  --ui-control-height: 36px;
  --ui-control-height-mobile: 40px;
  --ui-shadow-xs: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent);
  --ui-ring: var(--poke-yellow);
  --ui-transition: 120ms cubic-bezier(0.16, 1, 0.3, 1);
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
select,
textarea {
  max-width: 100%;
  min-height: var(--ui-control-height);
  border: 1px solid var(--border-strong);
  border-radius: var(--ui-radius);
  background-color: var(--bg);
  color: var(--text);
  box-shadow: var(--ui-shadow-xs);
  font: 500 13px/1.4 var(--font-body);
  transition: border-color var(--ui-transition), box-shadow var(--ui-transition), background-color var(--ui-transition);
}
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
select { padding: 0 11px; }
select { padding-right: 32px; background-position: right 11px center; }
textarea { padding: 9px 11px; line-height: 1.6; }
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
select:hover, textarea:hover { border-color: var(--text-3); }
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
select:focus, textarea:focus {
  outline: 2px solid var(--ui-ring);
  outline-offset: 2px;
  border-color: var(--text-3);
  box-shadow: var(--ui-shadow-xs);
}
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: .82; }
input:disabled, select:disabled, textarea:disabled { opacity: .58; cursor: not-allowed; }
.code-input { font-weight: 700 !important; }

/* 체크박스 · 라디오 */
.check-line input[type="checkbox"], .data-table input[type="checkbox"] {
  display: inline-grid; place-content: center; flex: 0 0 16px; width: 16px; height: 16px; margin: 0;
  appearance: none; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--bg); cursor: pointer;
}
.check-line input[type="checkbox"]::before {
  content: ""; width: 8px; height: 4px; border-bottom: 2px solid #1c1917; border-left: 2px solid #1c1917;
  transform: rotate(-45deg) scale(0); transition: transform var(--ui-transition); margin-top: -2px;
}
.check-line input[type="checkbox"]:checked { background: var(--poke-yellow); border-color: #d4a600; }
.check-line input[type="checkbox"]:checked::before { transform: rotate(-45deg) scale(1); }
.check-line input[type="checkbox"]:focus-visible { outline: 2px solid var(--ui-ring); outline-offset: 2px; }

/* 라벨 · 도움말 */
.field { gap: 7px; }
.field label, .field-label { color: var(--text-2); font-size: 12px; font-weight: 700; letter-spacing: 0; }
.field .hint, .field-hint { margin: 0; color: var(--text-3); font-size: 11px; line-height: 1.55; }

/* 버튼: 납작한 사각형 (색은 그대로) */
.btn {
  min-height: var(--ui-control-height); padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-xs); font-size: 13px;
}
.btn:hover { transform: none; border-color: var(--text-3); background: var(--surface-muted); }
.btn:active { transform: none; }
.btn:focus-visible { outline: 2px solid var(--ui-ring); outline-offset: 2px; box-shadow: var(--ui-shadow-xs); }
.btn-primary, .btn-primary:active { box-shadow: var(--ui-shadow-xs); transform: none; }
.btn-primary:hover { background: #f5c000; border-color: #c99d00; }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 12px; }

/* 칩 선택(포지션 · 오더 등): 같은 높이의 사각 토글 */
.chip-radio { gap: 6px; }
.chip-radio span, .chip-toggle .chip {
  min-height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--ui-radius);
  font-size: 12px; box-shadow: var(--ui-shadow-xs);
}
.chip-radio span:hover, .chip-toggle .chip:hover { transform: none; border-color: var(--text-3); }
.chip-radio input:focus-visible + span { box-shadow: none; outline: 2px solid var(--ui-ring); outline-offset: 2px; }
.segmented { border-radius: calc(var(--ui-radius) + 3px); padding: 3px; }
.segmented span { border-radius: var(--ui-radius); padding: 7px 0; }
.role-tabs span { min-height: 32px; border-width: 1px; border-radius: var(--ui-radius); font-size: 12px; }

/* 폼 패널: 1px 테두리 · 단정한 간격 */
.form-grid { gap: 14px 16px; }
.profile-form > .panel, .auth-form, .narrow-form, .filter-panel, .console-box, .code-box {
  border-width: 1px; border-radius: 10px;
}
.profile-form > .panel, .auth-form, .narrow-form { padding: 22px 24px; }
.form-grid h2 { font-size: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 2px; }
.form-grid h2.span-2 + * { margin-top: 2px; }
.code-box { border-style: solid; background: var(--surface); }
.code-box h2 { border-bottom: 0; padding-bottom: 0; }
.filter-panel { padding: 16px; gap: 10px; }
.form-actions { padding-top: 4px; }
.auth-form .form-actions .btn, .narrow-form > .btn-primary { min-height: 42px; }
.narrow-form > .btn-primary { width: 100%; font-size: 14px; }
.pick-preview { width: 36px; height: 36px; border-radius: var(--ui-radius); border: 1px solid var(--border); }
.pick-preview img { width: 32px; height: 32px; }
.inline-form input[type="text"], .inline-form input[type="number"] { min-height: 30px; }

/* 홈 히어로 검색창은 기존 알약 모양 유지 */
.hero-search input:not([type="hidden"]) { min-height: 44px; border: 0; border-radius: 999px; box-shadow: none; background: transparent; font-size: 15px; }
.hero-search input:focus { outline: none; }
.hero-search .btn { border-radius: 999px; min-height: 44px; }

@media (max-width: 640px) {
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  select, .btn { min-height: var(--ui-control-height-mobile); font-size: 16px; }
  .btn { font-size: 14px; }
  .profile-form > .panel, .auth-form, .narrow-form { padding: 18px 16px; }
}

/* ---------- 커스텀 드롭다운 (카지노인 vega-select) ---------- */
:root {
  --ui-option-radius: 5px;
  --ui-shadow-popover: 0 10px 30px color-mix(in srgb, #000 18%, transparent), 0 2px 8px color-mix(in srgb, #000 10%, transparent);
}
.vega-select { position: relative; display: inline-flex; min-width: min(164px, 100%); max-width: 100%; vertical-align: middle; }
.field .vega-select, .pokemon-picker .vega-select, .vega-select.is-fluid { width: 100%; }
.pokemon-picker .vega-select { flex: 1; min-width: 0; }
.vega-select.is-enhanced > select {
  position: absolute !important; width: 1px !important; min-width: 0 !important; height: 1px !important;
  margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important; border: 0 !important; white-space: nowrap !important;
}
.vega-select-trigger {
  display: inline-flex; width: 100%; min-width: 0; height: var(--ui-control-height); align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 10px 0 11px; border: 1px solid var(--border-strong); border-radius: var(--ui-radius); background: var(--bg); color: var(--text);
  box-shadow: var(--ui-shadow-xs); font: 500 13px/1 var(--font-body); text-align: left; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background-color var(--ui-transition), border-color var(--ui-transition);
}
.vega-select-trigger:hover, .vega-select-trigger[aria-expanded="true"] { border-color: var(--text-3); background: var(--surface-muted); }
.vega-select-trigger:focus-visible { outline: 2px solid var(--ui-ring); outline-offset: 2px; }
.vega-select-trigger[aria-invalid="true"] { border-color: var(--poke-red); }
.vega-select-trigger:disabled { opacity: .5; pointer-events: none; }
.vega-select-trigger .ui-icon { width: 15px; height: 15px; flex: 0 0 15px; color: var(--text-3); transition: transform var(--ui-transition); }
.vega-select-trigger[aria-expanded="true"] .ui-icon-chevron-down { transform: rotate(180deg); }
.vega-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vega-select.is-placeholder .vega-select-value { color: var(--text-3); }
.vega-select-content {
  position: fixed; z-index: 1600; display: grid; align-content: start; gap: 2px; min-width: 164px; max-height: min(320px, calc(100dvh - 16px));
  margin: 0; padding: 4px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--border-strong); border-radius: var(--ui-radius);
  background: var(--bg); color: var(--text); box-shadow: var(--ui-shadow-popover); opacity: 0;
  transform: translateY(-3px) scale(.985); transform-origin: var(--vega-transform-origin, top center);
  transition: opacity var(--ui-transition), transform var(--ui-transition);
}
.vega-select-content[data-side="top"] { transform: translateY(3px) scale(.985); }
.vega-select-content[data-state="open"] { opacity: 1; transform: none; }
.vega-select-content[hidden] { display: none; }
.vega-select-search {
  position: sticky; top: -4px; z-index: 1; margin: -4px -4px 4px; width: calc(100% + 8px) !important; min-height: 38px !important;
  border: 0 !important; border-bottom: 1px solid var(--border) !important; border-radius: var(--ui-radius) var(--ui-radius) 0 0 !important;
  box-shadow: none !important; outline: none !important; background: var(--bg) !important; padding: 0 12px !important;
}
.vega-select-group { padding: 8px 9px 3px; color: var(--text-3); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.vega-select-group[hidden] { display: none; }
.vega-select-option {
  position: relative; display: flex; min-height: 34px; align-items: center; gap: 8px; padding: 6px 9px 6px 30px;
  border-radius: var(--ui-option-radius); color: var(--text); font-size: 13px; font-weight: 500; line-height: 1.25;
  cursor: default; user-select: none; outline: none;
}
.vega-select-option[hidden] { display: none; }
.vega-select-option:hover, .vega-select-option.is-active, .vega-select-option:focus-visible { background: var(--surface-muted); }
.vega-select-option[aria-selected="true"] { font-weight: 700; }
.vega-select-option[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.vega-select-option .ui-icon-check { position: absolute; left: 9px; width: 14px; height: 14px; opacity: 0; }
.vega-select-option[aria-selected="true"] .ui-icon-check { opacity: 1; }
.vega-option-sprite { width: 24px; height: 24px; flex: none; object-fit: contain; }
@media (max-width: 640px) {
  .vega-select-trigger { height: var(--ui-control-height-mobile); font-size: 15px; }
  .vega-select-option { min-height: 40px; font-size: 15px; }
}
.vega-select-value { display: inline-flex; align-items: center; gap: 8px; }
.vega-select-trigger .vega-option-sprite { width: 26px; height: 26px; margin: -4px 0 -4px -3px; }
.pokemon-picker .pick-preview { display: none; }

/* ---------- 프로필 입력 화면: 섹션 머리 · 미리보기 · 하단 고정 저장 ---------- */
.profile-form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.form-section-head { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.form-section-head h2 { margin: 0; padding: 0; border: 0; font-size: 20px; }
.form-section-head p { margin: 3px 0 0; color: var(--text-3); font-size: 12px; }
.step-no {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px;
  background: var(--poke-yellow); color: var(--on-primary); font: 800 12px/1 var(--font-body); letter-spacing: .02em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.profile-form > .panel { transition: border-color .2s ease; }
.profile-form > .panel:focus-within { border-color: color-mix(in srgb, var(--poke-yellow) 70%, var(--border)); }
.profile-form > .panel:focus-within .step-no { animation: hop .45s var(--ease-bounce); }
.sticky-actions {
  position: sticky; bottom: 12px; z-index: 30; align-items: center; gap: 8px; padding: 10px 12px; margin-top: 4px;
  border: 1px solid var(--border-strong); border-radius: 12px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}
.sticky-actions .meta { margin-right: auto; }
.profile-preview { position: sticky; top: 86px; display: grid; gap: 12px; }
.profile-preview .page-eyebrow { margin: 0; }
.preview-card { pointer-events: none; animation: none; }
.preview-card .portrait img[hidden], .preview-card .portrait-empty[hidden] { display: none; }
.preview-subs { display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; }
.preview-subs:empty { display: none; }
.preview-subs .pos-chip { margin: 0; }
.profile-card-sigs:empty { display: none; }
.preview-checklist { list-style: none; margin: 0; padding: 14px 16px; display: grid; gap: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 12px; font-weight: 700; color: var(--text-3); }
.preview-checklist li { display: flex; align-items: center; gap: 8px; transition: color .2s ease; }
.preview-checklist li::before {
  content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--border-strong);
  transition: background-color .25s var(--ease-bounce), border-color .2s ease, transform .25s var(--ease-bounce);
}
.preview-checklist li.is-done { color: var(--text); }
.preview-checklist li.is-done::before {
  border-color: #d4a600; transform: scale(1.1);
  background: var(--poke-yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c1917' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 10px no-repeat;
}
@media (max-width: 1100px) {
  .profile-form-layout { grid-template-columns: 1fr; }
  .profile-preview { position: static; order: -1; grid-template-columns: minmax(0, 1fr); }
  .preview-checklist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sticky-actions .meta { display: none; }
  .sticky-actions { bottom: 8px; }
  .sticky-actions .btn { flex: 1; }
  .preview-checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-section-head h2 { font-size: 18px; }
}
@media (max-width: 640px) {
  body:has(.sticky-actions) .theme-toggle { bottom: 76px; }
  body:has(.sticky-actions) .scroll-top { bottom: 128px; }
  .profile-preview > .meta { display: none; }
}

/* ---------- 상단바 전적 검색 ---------- */
.topbar-search {
  position: relative; display: flex; align-items: center; flex: 0 1 260px; min-width: 160px; margin-left: auto;
}
.topbar-search input[type="search"] { width: 100%; min-height: 34px; padding: 0 30px 0 32px; border-radius: 999px; background: var(--surface); font-size: 13px; }
.topbar-search kbd {
  position: absolute; right: 9px; padding: 1px 6px; border: 1px solid var(--border-strong); border-radius: 5px;
  color: var(--text-3); font: 700 10px/1.4 var(--font-body); pointer-events: none;
}
.topbar-search input:focus + kbd, .topbar-search input:not(:placeholder-shown) + kbd { display: none; }
.topbar-search + .topbar-actions { margin-left: 0; }
/* 62차: 평소엔 돋보기 버튼만 → 누르면 입력칸이 열림 (site.js) */
.topbar-search { flex: 0 0 auto; min-width: 0; }
.topbar-search-btn { position: relative; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1.5px solid var(--border);
  border-radius: 999px; background: var(--surface); color: var(--text-2); cursor: pointer; transition: transform .2s var(--ease-bounce), border-color .15s; }
.topbar-search-btn:hover { transform: scale(1.06); border-color: var(--poke-yellow); color: var(--text); }
.topbar-search:not(.is-open) input[type="search"], .topbar-search:not(.is-open) kbd { display: none; }
.topbar-search { margin-left: 0; }
@media (min-width: 641px) {  /* 넓은 화면: 열리면 오른쪽 버튼들 위에 덮어서 (메뉴가 밀리지 않게) */
  .topbar-actions { position: relative; }
  .topbar-search.is-open { position: absolute; z-index: 30; top: 50%; right: 0; width: min(320px, 70vw); transform: translateY(-50%);
    padding: 4px; border-radius: 999px; background: var(--bg); box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
  .topbar-search.is-open .topbar-search-btn { left: 6px; }
}
@media (max-width: 640px) {  /* 좁은 화면: 열리면 상단에 덮는 검색창 */
  .topbar-search.is-open { position: fixed; z-index: 60; top: 8px; left: var(--shell-gutter); right: var(--shell-gutter); width: auto;
    padding: 6px; border-radius: 999px; background: var(--bg); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
  .topbar-search.is-open .topbar-search-btn { left: 8px; }
}
.topbar-search.is-open .topbar-search-btn { position: absolute; left: 2px; width: 32px; height: 32px; border-color: transparent; background: transparent; }
.topbar-search.is-open .topbar-search-btn:hover { transform: none; }
.topbar-search.is-open input[type="search"] { animation: ph-search-open .22s var(--ease-bounce); }
@keyframes ph-search-open { from { opacity: 0; transform: scaleX(.6); transform-origin: left; } to { opacity: 1; transform: none; } }

/* ---------- 홈 히어로: 랭킹 TOP 5 ---------- */
.hero-board {
  max-width: 560px; margin: 0 auto; padding: 16px 18px 12px; text-align: left;
  border: 2px solid #1c1917; border-radius: 18px; background: var(--bg); color: var(--text);
  box-shadow: 0 6px 0 rgba(28, 25, 23, .9);
}
html[data-theme="dark"] .hero-board { border-color: var(--poke-yellow); box-shadow: 0 6px 0 rgba(255, 203, 5, .45); }
.hero-board-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hero-board-title { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 19px; }
.hero-board-head a { font-size: 12px; font-weight: 700; white-space: nowrap; }
.hero-board-head { gap: 8px; }
.hero-board-empty { margin: 8px 0; color: var(--text-3); font-size: var(--text-sm); }
.top5 { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.top5-row {
  display: grid; grid-template-columns: 30px 28px minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px; animation: rise .45s var(--ease-bounce) both;
}
.top5-row:nth-child(2) { animation-delay: 60ms; } .top5-row:nth-child(3) { animation-delay: 120ms; }
.top5-row:nth-child(4) { animation-delay: 180ms; } .top5-row:nth-child(5) { animation-delay: 240ms; }
.top5-row:hover { background: var(--surface-muted); }
.top5-row.rank-1 { background: color-mix(in srgb, var(--poke-yellow) 22%, transparent); }
.top5-rank {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-muted);
  font: 800 13px/1 var(--font-body);
}
.top5-row.rank-1 .top5-rank { background: var(--poke-yellow); color: var(--on-primary); }
.top5-row.rank-2 .top5-rank { background: #d6d3d1; color: #1c1917; }
.top5-row.rank-3 .top5-rank { background: #f0b27a; color: #1c1917; }
.top5-name { overflow: hidden; color: var(--text); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.top5-name:hover { text-decoration: none; color: var(--highlight); }
.top5-meta { color: var(--text-3); font-size: 11px; }
.top5-points { font: 800 18px/1 var(--font-body); }
/* 메인 TOP5: 승점 · 우승 · W(승수) · 승률 */
.top5-stats { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 4px 8px; color: var(--text-3); font-size: 11px; font-weight: 700; }
.top5-stats b { color: var(--text); font-size: 13px; font-weight: 800; }
.top5-stats span + span::before, .top5-stats b + span::before { content: "·"; margin-right: 8px; color: var(--border-strong); }
.top5-points small { margin-left: 1px; color: var(--text-3); font-size: 11px; }
.demo-tag { display: inline-flex; padding: 1px 6px; border-radius: 5px; background: var(--surface-muted); color: var(--text-3); font-size: 10px; font-weight: 800; vertical-align: 1px; }

/* ---------- 포켓몬별 순위 ---------- */
.poke-rank-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.poke-rank-card {
  display: grid; gap: 12px; padding: 16px; border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); transition: transform .3s var(--ease-bounce), border-color .2s ease;
}
.poke-rank-card:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--role-color); }
.poke-rank-head { display: flex; align-items: center; gap: 12px; }
.poke-rank-head div { display: grid; }
.poke-rank-head strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 21px; line-height: 1.2; }
.poke-rank-head small { color: var(--text-3); font-size: 12px; font-weight: 700; }
.poke-rank-portrait {
  display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--role-color) 22%, var(--bg)), color-mix(in srgb, var(--role-color) 6%, var(--bg)) 75%);
}
.poke-rank-portrait img { width: 58px; height: 58px; object-fit: contain; }
.poke-rank-card:hover .poke-rank-portrait img { animation: hop .5s var(--ease-bounce); }
.poke-rank-portrait.is-big { width: 120px; height: 120px; }
.poke-rank-portrait.is-big img { width: 108px; height: 108px; }
.poke-rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.poke-rank-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; background: var(--bg); }
.poke-rank-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poke-rank-list span:last-child { color: var(--text-3); font-size: 11px; font-weight: 700; }
.medal-sm { font-size: 15px; }
.poke-rank-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.poke-picker { position: sticky; top: 86px; display: grid; gap: 4px; max-height: calc(100vh - 110px); overflow: auto; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.poke-picker a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 8px; color: var(--text); font-size: 13px; font-weight: 700; }
.poke-picker a:hover { background: var(--surface-muted); text-decoration: none; }
.poke-picker a.active { background: color-mix(in srgb, var(--role-color) 16%, var(--bg)); box-shadow: inset 3px 0 0 var(--role-color); }
.poke-picker img { width: 36px; height: 36px; object-fit: contain; }
.poke-picker small { color: var(--text-3); font-size: 11px; }
.poke-rank-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.poke-rank-hero h2 { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 32px; }
.poke-rank-hero .page-eyebrow .role-dot { background: var(--role-color); }
.winrate-bar { display: inline-block; width: 60px; height: 6px; margin-right: 8px; border-radius: 999px; background: var(--surface-muted); vertical-align: middle; overflow: hidden; }
.winrate-bar i { display: block; height: 100%; border-radius: inherit; background: var(--role-color, var(--poke-yellow)); }

@media (max-width: 1100px) { .poke-rank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .poke-rank-layout { grid-template-columns: minmax(0, 1fr); }
  .poke-picker { position: static; display: flex; max-height: none; overflow-x: auto; }
  .poke-picker a { grid-template-columns: 36px auto auto; flex: none; }
}
@media (max-width: 640px) {
  .poke-rank-grid { grid-template-columns: 1fr; }
  .top5-meta { display: none; }
  .top5-row { grid-template-columns: 30px 28px minmax(0, 1fr) auto; }
  .top5-stats { grid-column: 3 / -1; justify-content: flex-start; }
  .hero-board { padding: 12px; }
  .topbar-search kbd { display: none; }
}
.topbar-search input[type="search"] { padding-left: 34px !important; padding-right: 30px !important; }

/* ---------- 주간 가능 시간표 ---------- */
.avail-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.avail-toolbar .field-label { margin-right: 4px; }
.chip-btn {
  min-height: 30px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--ui-radius);
  background: var(--bg); color: var(--text-2); font: 700 12px var(--font-body); cursor: pointer; box-shadow: var(--ui-shadow-xs);
}
.chip-btn:hover { border-color: var(--text-3); color: var(--text); background: var(--surface-muted); }
.chip-btn.is-ghost { color: var(--text-3); box-shadow: none; }
.avail-scroll { overflow-x: auto; padding-bottom: 4px; }
.avail-grid { border-collapse: separate; border-spacing: 2px; user-select: none; touch-action: none; }
.avail-grid thead th { height: 16px; color: var(--text-3); font-size: 10px; font-weight: 700; text-align: left; padding: 0; }
.avail-grid tbody th { padding: 0 4px 0 0; }
.avail-day {
  width: 30px; height: 26px; border: 0; border-radius: 6px; background: var(--surface-muted); color: var(--text-2);
  font: 800 12px var(--font-body); cursor: pointer;
}
.avail-day:hover { background: var(--poke-yellow-soft); color: var(--text); }
.avail-grid td { padding: 0; }
.avail-cell {
  display: block; width: 26px; height: 26px; padding: 0; border: 1px solid var(--border); border-radius: 5px;
  background: var(--bg); cursor: pointer; transition: background-color .08s ease, transform .15s var(--ease-bounce);
}
.avail-grid tr td:nth-child(6n + 2) .avail-cell { margin-left: 3px; }
.avail-cell:hover { border-color: var(--text-3); }
.avail-cell.is-on { background: var(--poke-yellow); border-color: #d4a600; }
.avail-cell.is-on:hover { background: #f5c000; }
.avail-cell:focus-visible { outline: 2px solid var(--highlight); outline-offset: 1px; }
.avail-summary { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--surface-muted); color: var(--text); font-size: 13px; font-weight: 700; }
.avail-line { margin: 0 0 8px; font-weight: 700; }
.avail-mini { display: grid; grid-template-columns: 18px repeat(24, minmax(0, 1fr)); gap: 2px; max-width: 420px; }
.avail-mini i { display: block; height: 10px; border-radius: 2px; background: var(--surface-muted); }
.avail-mini i.on { background: var(--poke-yellow); }
.avail-mini-day, .avail-mini-hour { color: var(--text-3); font-size: 9px; font-weight: 700; line-height: 10px; }
.now-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--poke-green) 16%, var(--bg)); color: #15803d; font-size: 11px; font-weight: 800; white-space: nowrap;
}
.now-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--poke-green); animation: pulse 1.4s ease-in-out infinite; }
html[data-theme="dark"] .now-badge { color: #4ade80; }
.card-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.card-chips .pos-chip { margin: 0; }

/* ---------- 디스코드 ---------- */
.discord-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px 0 8px; border: 0; border-radius: 999px;
  background: #5865f2; color: #fff; font: 700 12px var(--font-body); cursor: pointer; text-decoration: none;
  transition: transform .2s var(--ease-bounce), background-color .15s ease;
}
.discord-chip:hover { background: #4752c4; text-decoration: none; transform: translateY(-1px); color: #fff; }
.discord-chip b { padding-left: 6px; border-left: 1px solid rgba(255, 255, 255, .35); font-size: 11px; }
.discord-box h2 { margin-bottom: 4px; }
.howto { margin-top: 10px; font-size: 12px; color: var(--text-2); }
.howto summary { cursor: pointer; color: var(--highlight); font-weight: 700; }
.howto ol { margin: 8px 0; padding-left: 18px; }
.howto p { margin: 0; color: var(--text-3); }
@media (max-width: 640px) {
  .avail-cell { width: 22px; height: 24px; }
  .avail-day { width: 26px; height: 24px; }
}
.avail-mini { grid-template-columns: 20px repeat(24, minmax(0, 1fr)); gap: 2px 2px; margin-bottom: 6px; }
.avail-mini i { height: 13px; }
.avail-mini-day { font-size: 10px; line-height: 13px; text-align: center; }
.avail-mini-hour { font-size: 10px; line-height: 14px; white-space: nowrap; overflow: visible; }

/* ---------- 회원 카드 (전적검색 · 같이하기) ---------- */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.member-card {
  display: grid; align-content: start; gap: 12px; padding: 16px; border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); transition: border-color .2s ease, transform .3s var(--ease-bounce);
}
.member-card:hover { border-color: var(--poke-yellow); transform: translateY(-3px); }
.member-card-head { display: flex; align-items: center; gap: 12px; color: var(--text); }
.member-card-head:hover { text-decoration: none; }
.member-card-head > div { display: grid; gap: 4px; flex: 1; min-width: 0; }
.member-card-head strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 21px; line-height: 1.2; }
.member-rank { display: grid; justify-items: end; padding: 6px 10px; border-radius: 10px; background: var(--poke-yellow-soft); color: #1c1917; }
html[data-theme="dark"] .member-rank { background: color-mix(in srgb, var(--poke-yellow) 20%, var(--bg)); color: var(--text); }
.member-rank b { font-size: 15px; line-height: 1.1; }
.member-rank small { font-size: 11px; font-weight: 700; opacity: .75; }
.member-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; }  /* 62차: 시즌 레이팅 · 점수 · 판수 · 승률 = 2×2 */
.member-stats div { padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.member-stats dt { color: var(--text-3); font-size: 10px; font-weight: 700; }
.member-stats dd { margin: 0; font-size: 15px; font-weight: 800; }
.member-sigs { display: flex; flex-wrap: wrap; gap: 6px; }
.member-sig { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); }
.member-sig small { font-size: 11px; font-weight: 700; color: var(--text-2); }
.member-avail { margin: 0; color: var(--text-2); font-size: 12px; font-weight: 700; }
.member-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--border); }
.member-actions .arrow-link { margin-left: auto; }

/* ---------- 같이하기 ---------- */
.match-filter { align-items: flex-end; }
.match-filter .field { min-width: 0; }
.match-now { margin-left: auto; }
.match-now .btn { gap: 6px; }
.match-now .live-dot::before { content: "●"; color: var(--poke-red); animation: pulse 1.2s ease-in-out infinite; }
.today-dot { display: inline-block; width: 5px; height: 5px; margin-left: 3px; border-radius: 50%; background: var(--poke-red); vertical-align: 3px; }
.hour-chart { padding: 16px 18px 12px; }
.hour-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.hour-bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; height: 120px; align-items: end; }
.hour-bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; padding-bottom: 16px; border-radius: 6px; color: var(--text-3); }
.hour-bar:hover { background: var(--surface-muted); text-decoration: none; }
.hour-bar-fill { display: block; min-height: 3px; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--poke-yellow) 55%, var(--surface-muted)); transition: height .4s var(--ease-bounce); }
.hour-bar.is-active .hour-bar-fill { background: var(--poke-yellow); box-shadow: 0 0 0 2px #d4a600 inset; }
.hour-bar small { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 700; }
.hour-bar em { position: absolute; top: -2px; left: 0; right: 0; text-align: center; font-size: 10px; font-style: normal; font-weight: 800; color: var(--text-2); }
.hour-bar.is-active small { color: var(--text); }
@media (max-width: 640px) {
  .match-now { margin-left: 0; }
  .hour-bars { gap: 1px; height: 100px; }
  .hour-bar em { display: none; }
  .member-grid { grid-template-columns: 1fr; }
}

/* ---------- 홈: 진행 중인 대회 ---------- */
.live-tournaments { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.live-tournament {
  position: relative; display: grid; gap: 8px; padding: 20px 22px; overflow: hidden;
  border: 2px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text);
  transition: transform .3s var(--ease-bounce), border-color .2s ease;
}
.live-tournament:hover { text-decoration: none; transform: translateY(-4px); }
.live-tournament.is-auction { border-color: color-mix(in srgb, var(--poke-red) 55%, var(--border)); background: linear-gradient(150deg, color-mix(in srgb, var(--poke-red) 9%, var(--surface)), var(--surface) 60%); }
.live-tournament.is-recruiting { border-color: color-mix(in srgb, var(--poke-green) 50%, var(--border)); }
.live-tournament.is-ongoing { border-color: color-mix(in srgb, var(--poke-blue) 50%, var(--border)); }
.live-tournament.is-closed { border-color: color-mix(in srgb, #f97316 45%, var(--border)); }
.live-tournament-top { display: flex; align-items: center; justify-content: space-between; }
.live-tournament-top .status-pill { margin-left: 0; }
.live-tournament strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 22px; line-height: 1.25; }
.live-tournament-stats { display: flex; gap: 14px; color: var(--text-3); font-size: 12px; }
.live-tournament-stats b { color: var(--text); font-size: 16px; margin-right: 2px; }
.live-tournament-cta { margin-top: 4px; color: var(--highlight); font-size: 13px; font-weight: 800; }

/* ---------- 유나이트 포켓몬 상세: 기술 · 빌드 ---------- */
.unite-card { position: relative; color: var(--text); }
.unite-card:hover { text-decoration: none; }
.moves-badge {
  position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--role-color) 16%, var(--surface)); color: var(--role-color);
  font-size: 10px; font-weight: 800;
}
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; color: var(--text-3); font-size: 12px; font-weight: 700; }
.crumbs a { color: var(--text-2); }

.unite-hero {
  display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; margin-bottom: 28px; padding: 24px 28px;
  border: 2px solid color-mix(in srgb, var(--role-color) 40%, var(--border)); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--role-color) 12%, var(--surface)), var(--surface) 65%);
}
.unite-hero-portrait {
  position: relative; display: grid; place-items: center; width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--role-color) 30%, var(--bg)), color-mix(in srgb, var(--role-color) 8%, var(--bg)) 72%);
}
.unite-hero-portrait img { width: 190px; height: 190px; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .18)); animation: hop 1s var(--ease-bounce) .1s; }
.unite-hero-info { display: grid; gap: 16px; justify-items: start; }
.unite-hero-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.role-chip { padding: 4px 12px; border-radius: 999px; background: var(--role-color); color: #fff; font-size: 12px; font-weight: 800; }
.unite-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; margin: 0; }
.unite-facts div { padding: 10px 14px; border-radius: var(--radius-md); background: var(--surface-muted); }
.unite-facts dt { color: var(--text-3); font-size: 11px; font-weight: 700; }
.unite-facts dd { margin: 2px 0 0; font-weight: 800; font-size: 15px; }
.evo-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.evo-chain li { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface-muted); }
.evo-chain li.evo-arrow { padding: 0 2px; background: none; color: var(--text-3); font-weight: 800; }
.evo-chain img { width: 40px; height: 40px; image-rendering: pixelated; }
.evo-chain span { display: grid; line-height: 1.15; }
.evo-chain small { color: var(--text-3); font-size: 11px; font-weight: 700; }

.move-card {
  display: grid; align-content: start; gap: 8px; padding: 16px 18px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  transition: transform .3s var(--ease-bounce), border-color .2s ease;
}
.move-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.move-card header { display: grid; gap: 4px; }
.move-card h3 { margin: 0; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 20px; line-height: 1.2; }
.move-label { color: var(--text-3); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.move-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.move-tag, .move-cd { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--surface-muted); color: var(--text-2); }
.move-cd { background: color-mix(in srgb, var(--poke-blue) 12%, var(--surface)); color: var(--poke-blue); }
.move-desc { white-space: pre-line; margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.move-upgrade {
  margin: 0; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; line-height: 1.55;
  background: color-mix(in srgb, var(--poke-yellow) 16%, var(--surface)); color: var(--text);
}
.move-upgrade b { display: block; margin-bottom: 2px; color: #b45309; font-size: 11px; }
.move-note { margin: 0; color: var(--text-3); font-size: 11.5px; }

.move-basics { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 18px; }
.move-card.is-passive { border-color: color-mix(in srgb, var(--poke-blue) 35%, var(--border)); }
.move-rows { display: grid; gap: 14px; margin-bottom: 18px; }
.move-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 2.1fr); gap: 10px; align-items: stretch;
  padding: 14px; border-radius: var(--radius-lg); background: var(--surface-muted);
}
.move-row > .move-col.is-choice:only-child { grid-column: 1 / -1; }
.move-col { display: grid; grid-template-rows: auto 1fr; gap: 8px; min-width: 0; }
.move-col-label { margin: 0; color: var(--text-3); font-size: 12px; font-weight: 800; }
.move-col-label span { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--poke-yellow) 22%, var(--surface)); color: #b45309; font-size: 11px; }
.move-arrow { display: grid; place-items: center; color: var(--text-3); font-size: 22px; font-weight: 800; }
.move-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.move-card.is-unite {
  position: relative; overflow: hidden; padding: 20px 22px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(120deg, var(--poke-yellow), #f472b6, #a78bfa) border-box;
}
.move-card.is-unite::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--poke-yellow) 22%, transparent), transparent 45%);
}
.move-card.is-unite .move-label { color: #db2777; }
.move-card.is-unite h3 { font-size: 26px; }

.build-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.build-card h3 { margin: 0 0 12px; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 20px; }
.build-card dl { display: grid; gap: 8px; margin: 0; }
.build-card dl > div { display: grid; grid-template-columns: 76px 1fr; gap: 8px; align-items: baseline; }
.build-card dt { color: var(--text-3); font-size: 12px; font-weight: 700; }
.build-card dd { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.build-chip { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); font-size: 12px; font-weight: 700; }
.build-chip.is-move { border-color: color-mix(in srgb, var(--role-color) 45%, var(--border)); background: color-mix(in srgb, var(--role-color) 10%, var(--surface)); }
.build-chip.is-lane { background: var(--surface-muted); }
.build-chip.is-medal { border-style: dashed; }

.unite-pager { display: flex; justify-content: space-between; gap: 8px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); font-weight: 800; font-size: 14px; }
.unite-pager a { color: var(--text-2); }

.import-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.import-steps li { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--surface-muted); font-size: 13px; font-weight: 600; }
.import-steps li > b { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--poke-yellow); color: var(--on-primary); font-size: 13px; }
.import-steps li > span { min-width: 0; }
@media (max-width: 720px) { .import-steps { grid-template-columns: minmax(0, 1fr); } }
.import-steps kbd { white-space: nowrap;  padding: 1px 6px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface); font: 700 11px var(--font-body); }
.import-form { display: grid; gap: 10px; }
.import-form textarea { min-height: 320px; font-size: 12px; line-height: 1.5; }

@media (max-width: 900px) {
  .move-row { grid-template-columns: 1fr; }
  .move-arrow { transform: rotate(90deg); height: 20px; }
}
@media (max-width: 640px) {
  .unite-hero { grid-template-columns: 1fr; justify-items: center; padding: 18px 16px; }
  .unite-hero-info { justify-items: stretch; width: 100%; }
  .unite-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .move-basics, .move-choices, .import-steps { grid-template-columns: 1fr; }
  .build-card dl > div { grid-template-columns: 1fr; gap: 4px; }
}
.move-row.is-unite-moves { margin-top: 12px; background: color-mix(in srgb, #f472b6 8%, var(--surface-muted)); }
.move-col.is-choice .move-choices:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.import-results { margin-bottom: 14px; }
.import-results h2 { margin: 0 0 10px; font-size: 16px; }
.import-results ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.import-results li.is-ok b { color: #16a34a; }
.import-results li.is-fail b { color: #dc2626; }
.import-results li span { color: var(--text-3); margin-left: 6px; }
.missing-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.missing-chips a { color: var(--text); }
a.sig-card, a.member-sig { color: inherit; text-decoration: none; }
a.sig-card { transition: transform .3s var(--ease-bounce), border-color .2s ease; }
a.sig-card:hover { transform: translateY(-3px); border-color: var(--poke-yellow); }
a.member-sig:hover small { color: var(--text); text-decoration: underline; }
.hero-pokemon-link { display: grid; justify-items: center; gap: 6px; color: var(--text-2); font-size: 12px; font-weight: 800; text-decoration: none; }
.hero-pokemon-link:hover { color: var(--text); }
.hero-pokemon-link:hover .portrait img { animation: hop .5s var(--ease-bounce); }
.move-ref { color: var(--highlight); font-weight: 700; }
.move-card { scroll-margin-top: 90px; }
.move-card:target { border-color: var(--poke-yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--poke-yellow) 40%, transparent); }
a.build-chip { color: inherit; text-decoration: none; }
a.build-chip.is-move:hover { border-color: var(--role-color); }
.move-col-label a { color: var(--highlight); }

/* ---------- 대회 대진표 (토너먼트 트리) ---------- */
.bracket-wrap { overflow-x: auto; padding-bottom: 6px; }
.bracket { --gap: 32px; display: grid; grid-template-columns: repeat(var(--rounds), minmax(190px, 1fr)); column-gap: var(--gap); min-width: calc(var(--rounds) * 210px); }
.bk-round { display: flex; flex-direction: column; }
.bk-round-name { margin: 0 0 10px; text-align: center; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 18px; color: var(--text-2); }
.bk-round.is-final .bk-round-name { color: var(--text); }
.bk-round.is-final .bk-round-name::before { content: "🏆 "; }
.bk-slots { flex: 1; display: flex; flex-direction: column; }
.bk-slot { flex: 1; display: flex; align-items: center; position: relative; padding: 8px 0; }
/* 다음 라운드로 이어지는 선: 짝(위·아래 경기)을 세로로 묶고, 다음 칸 앞에 가로선 */
.bk-round:not(:last-child) .bk-slot::after { content: ""; position: absolute; right: calc(var(--gap) / -2); width: calc(var(--gap) / 2); border-color: var(--border-strong, var(--border)); border-style: solid; border-width: 0; }
.bk-round:not(:last-child) .bk-slot:nth-child(odd)::after { top: 50%; bottom: 0; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 10px; }
.bk-round:not(:last-child) .bk-slot:nth-child(even)::after { top: 0; bottom: 50%; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 10px; }
.bk-round:not(:first-child) .bk-slot::before { content: ""; position: absolute; left: calc(var(--gap) / -2); width: calc(var(--gap) / 2); top: 50%; border-top: 2px solid var(--border-strong, var(--border)); }
.bk-match { display: grid; width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; color: var(--text-2); transition: transform .2s var(--ease-bounce), border-color .2s; }
a.bk-match:hover { transform: translateY(-2px) scale(1.02); border-color: var(--poke-yellow); }
.bk-match.is-empty { border-style: dashed; background: transparent; color: var(--text-3); }
.bk-team { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; font-size: var(--text-sm); font-weight: 700; }
.bk-team + .bk-team { border-top: 1px solid var(--border); }
.bk-team.is-win { color: var(--text); background: color-mix(in srgb, var(--poke-yellow) 16%, transparent); }
.bk-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-score { min-width: 26px; padding: 2px 8px; border-radius: 999px; text-align: center; background: var(--surface-muted); font-variant-numeric: tabular-nums; }
.bk-team.is-win .bk-score { background: var(--accent); color: var(--accent-text); }
a.match-score:hover { filter: brightness(1.08); }

/* ---------- 경기 상세 ---------- */
.match-hero { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-bottom: 8px; text-align: center; }
.match-hero-team { display: grid; justify-items: center; gap: 6px; color: var(--text-2); }
.match-hero-team strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 24px; }
.match-hero-team.is-win { color: var(--text); }
.win-badge { padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: var(--text-xs); font-weight: 800; }
.match-hero-score { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; }
.match-hero-score span { margin: 0 10px; color: var(--text-3); }
.match-hero-note { grid-column: 1 / -1; margin: 0; color: var(--text-3); font-size: var(--text-sm); }
.game-list { display: grid; gap: 14px; }
.game-card { padding: 18px 20px; animation: rise .45s var(--ease-bounce) both; }
.game-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.game-card h3 { margin: 0; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 20px; }
.game-card header form { margin-left: auto; }
.game-winner { padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: var(--text-xs); font-weight: 800; }
.game-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.game-side { padding: 12px; border: 1.5px solid var(--border); border-radius: var(--radius-md); }
.game-side.is-win { border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 8%, transparent); }
.game-side-name { margin: 0 0 8px; font-weight: 800; }
.game-side.is-win .game-side-name::after { content: " 🏆"; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pick-list li { display: flex; align-items: center; gap: 10px; }
.pick-list li span { display: grid; line-height: 1.25; }
.pick-list small { color: var(--text-3); font-size: var(--text-xs); }
.pick-poke { border-radius: 50%; transition: transform .2s var(--ease-bounce); }
.pick-poke:hover { transform: scale(1.12) rotate(-4deg); }
.game-form-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.game-form fieldset { margin: 0; padding: 12px; border: 1.5px solid var(--border); border-radius: var(--radius-md); }
.game-form legend { padding: 0 6px; font-weight: 800; }
.game-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.game-form-foot { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 14px; }
.game-form-foot label { display: grid; gap: 4px; font-size: var(--text-sm); font-weight: 700; }
.game-form-foot label:nth-child(2) { flex: 1; min-width: 180px; }
@media (max-width: 640px) {
  .game-sides, .game-form-sides { grid-template-columns: 1fr; }
  .match-hero-team strong { font-size: 18px; }
  .match-hero-score { font-size: 36px; }
}

/* ---------- 회원 아바타 (프로필 사진 → 대표 포켓몬 → 몬스터볼) ---------- */
.avatar { --size: 40px; display: inline-grid; place-items: center; flex: none; width: var(--size); height: var(--size); border-radius: 50%; overflow: hidden; background: var(--surface-muted); border: 2px solid var(--border); color: var(--text); vertical-align: middle; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.is-pokemon img { object-fit: contain; padding: 8%; }
.avatar.is-photo { border-color: var(--poke-yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--poke-yellow) 28%, transparent); }
.avatar.is-large { box-shadow: 0 0 0 5px color-mix(in srgb, var(--poke-yellow) 22%, transparent); animation: rise .5s var(--ease-bounce) both; }
.avatar.is-title { margin-right: 12px; }
.member-title { display: flex; align-items: center; }
.user-dot.has-photo { overflow: hidden; padding: 0; }
.user-dot.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-panel { display: flex; align-items: center; gap: 22px; margin-bottom: 20px; }
.avatar-panel-body { flex: 1; min-width: 0; }
.avatar-panel-body h2 { margin: 2px 0 6px; }
.avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.avatar-actions input[type="file"], .avatar-field input[type="file"] { max-width: 100%; font-size: var(--text-sm); }
.avatar-field { display: flex; align-items: center; gap: 16px; }
.avatar-field > div { display: grid; gap: 6px; min-width: 0; }
@media (max-width: 640px) {
  .avatar-panel { flex-direction: column; text-align: center; }
  .avatar-actions { justify-content: center; }
}

/* ---------- 게시판 ---------- */
.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.board-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.board-row + .board-row { border-top: 1px solid var(--border); }
.board-row-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 14px 18px; color: var(--text); transition: background .15s; }
a.board-row-link:hover { background: color-mix(in srgb, var(--poke-yellow) 10%, transparent); }
.board-row.is-locked .board-row-link { color: var(--text-3); }
.board-row-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.board-row-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-count { color: var(--poke-red); font-size: var(--text-sm); font-weight: 800; }
.board-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-3); font-size: var(--text-xs); font-weight: 600; }
.board-status { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--surface-muted); color: var(--text-2); border: 1px solid var(--border); }
.board-status.is-progress { background: color-mix(in srgb, var(--poke-blue, #3b82f6) 18%, transparent); color: var(--text); }
.board-status.is-done { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.board-lock { flex: none; }
/* 156차: 자유게시판 표 (사용자가 준 'Settings64' 결제 내역 표 모양) — 카드 안 표 · 머리줄 옅은 바탕 · 줄마다 위에 올리면 옅게 · 분류는 색 알약 */
.ftable-card { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.ftable { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.ftable thead tr { background: color-mix(in srgb, var(--surface-muted) 60%, transparent); }
.ftable th { height: 44px; padding: 0 16px; text-align: left; color: var(--text-3); font-size: var(--text-xs); font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--border); }
.ftable td { padding: 13px 16px; vertical-align: middle; border-bottom: 1px solid var(--border); }
.ftable tbody tr:last-child td { border-bottom: 0; }
.ftable-row { position: relative; transition: background .15s ease; }
.ftable-row:hover { background: color-mix(in srgb, var(--surface-muted) 55%, transparent); }
.ftable-row.is-locked { color: var(--text-3); }
.ftable-date { width: 92px; white-space: nowrap; }
.ftable-date b { display: block; font-weight: 700; }
.ftable-date small { display: block; margin-top: 2px; color: var(--text-3); font-size: 11px; font-weight: 600; }
.ftable-title { min-width: 0; }
.ftable-link { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: var(--text); text-decoration: none; }
.ftable-link b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
a.ftable-link::after { content: ""; position: absolute; inset: 0; }  /* 줄 전체가 링크 */
a.ftable-link:hover { text-decoration: none; }  /* 157차: 밑줄은 제목 글자에만 한 줄 (링크 밑줄과 겹쳐 두 줄이던 것)
*/
a.ftable-link:hover b { text-decoration: underline; text-underline-offset: 3px; }
.ftable-count { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--poke-yellow); color: var(--on-primary); font-size: 11px; font-weight: 800; }
.ftable-author { width: 1%; white-space: nowrap; }
.ftable-who { display: inline-flex; align-items: center; gap: 6px; max-width: 420px; overflow: hidden; color: var(--text-2); font-weight: 600; }  /* 227차: 뱃지가 넘쳐도 옆 칸을 덮지 않게 */
.ftable-cat { width: 1%; text-align: center; white-space: nowrap; }
.ftable-cat th, th.ftable-cat { text-align: center; }
.ftable-views, th.ftable-views { width: 1%; text-align: right; white-space: nowrap; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ftable-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);  /* 204차: 추천사이트처럼 분류는 회색 (색 알약 → 무채색) */
  color: var(--text-2); font-size: 12px; font-weight: 600;
}
.ftable-badge.is-emerald { --tone: #10b981; } .ftable-badge.is-sky { --tone: #0ea5e9; } .ftable-badge.is-amber { --tone: #f59e0b; }
.ftable-badge.is-violet { --tone: #8b5cf6; } .ftable-badge.is-rose { --tone: #f43f5e; } .ftable-badge.is-plain { --tone: #94a3b8; }
@media (max-width: 720px) {  /* 휴대폰: 표 대신 카드 줄 — 제목 위, 분류 · 글쓴이 · 날짜 · 조회 아래 한 줄 */
  .ftable thead { display: none; }
  .ftable, .ftable tbody { display: block; }
  .ftable-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
  .ftable tbody tr:last-child { border-bottom: 0; }
  .ftable td { padding: 0; border: 0; width: auto; }
  .ftable-title { order: -1; flex: 1 0 100%; }
  .ftable-cat { order: 0; } .ftable-author { order: 1; } .ftable-date { order: 2; } .ftable-views { order: 3; margin-left: auto; }
  .ftable-date b, .ftable-date small { display: inline; margin: 0; color: var(--text-3); font-size: var(--text-xs); font-weight: 600; }
  .ftable-date small { display: none; }
  .ftable-who { font-size: var(--text-xs); }
}
/* 157차: 분류 선 아이콘 (이모지 대신) — 글자 앞에 살짝 */
.cat-icon { flex: none; margin-right: 5px; vertical-align: -2px; opacity: .85; }
.board-cats a .cat-icon { vertical-align: -2.5px; }
.board-cats a.is-active .cat-icon { opacity: 1; }
.ftable-badge .cat-icon, .board-cat-tag .cat-icon { margin-right: 3px; }
.ftable-eye { vertical-align: -2px; margin-right: 2px; opacity: .7; }
.notice-rail .cat-icon { margin: 0; opacity: 1; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
.pager a { min-width: 34px; padding: 6px 10px; border-radius: 999px; text-align: center; border: 1.5px solid var(--border); color: var(--text-2); font-weight: 700; }
.pager a.active { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.board-form { display: grid; gap: 14px; }
.board-form textarea { min-height: 280px; resize: vertical; line-height: 1.6; }
.board-ref { margin: 0; padding: 10px 14px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--poke-yellow) 12%, transparent); font-size: var(--text-sm); overflow-wrap: anywhere; }
/* 182차: 공지 ↔ 일정 달력 — 글쓰기 칸(날짜 · 달력용 제목) · 글 위 '📅 일정 달력에서 보기' */
.notice-cal-fields { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 10px 14px; margin: 0; padding: 14px 16px; border: 1.5px dashed var(--border); border-radius: var(--radius-md); }
.notice-cal-fields legend { padding: 0 6px; font-weight: 800; }
.notice-cal-fields .field { margin: 0; }
.notice-cal-fields > small { grid-column: 1 / -1; }
@media (max-width: 560px) { .notice-cal-fields { grid-template-columns: 1fr; } }
.notice-cal-link { background: color-mix(in srgb, #ef4444 10%, transparent); }
.board-post { display: grid; gap: 16px; }
.board-post-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: clamp(22px, 3.4vw, 30px); }
.board-author { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.board-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; font-size: 15px; min-height: 80px; }
.board-post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--border); }
.board-status-form { margin-left: auto; }
.comment-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.comment { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.comment.is-admin { border-color: var(--poke-yellow); }
.comment-main { flex: 1; min-width: 0; }
.comment-meta { margin: 0 0 4px; font-size: var(--text-sm); }
.comment-meta span:last-child { color: var(--text-3); font-size: var(--text-xs); margin-left: 4px; white-space: nowrap; }  /* 57차: 날짜가 '10-' / '05 19:41' 로 갈라지지 않게 */
.comment-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.link-btn { border: 0; background: none; padding: 0; color: var(--text-3); font: inherit; font-size: var(--text-xs); cursor: pointer; }
.link-btn:hover { color: var(--poke-red); }
.comment-form { display: grid; gap: 8px; }
.comment-form button { justify-self: end; }

/* ---------- 하단 (카지노인 legal footer 구조: 브랜드 + 안내 · 정책 · 고객지원) ---------- */
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start; }
.footer-cols { display: grid; grid-template-columns: repeat(3, auto); gap: 40px; }
.footer-col { display: grid; align-content: start; gap: 8px; }
.footer-col h2 { margin: 0 0 4px; color: var(--text); font-size: var(--text-xs); font-weight: 800; letter-spacing: .08em; }
.footer-col a { color: var(--text-3); font-size: var(--text-sm); }
.footer-col a:hover { color: var(--text); }
.footer-col a b { color: var(--text-2); }
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

/* ---------- 안내 · 정책 페이지 ---------- */
.info-groups, .policy-sections { display: grid; gap: 14px; }
.sitemap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.info-group h2, .policy-section h2 { margin: 0 0 12px; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 22px; }
.license-list, .sitemap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
/* 62차: 설명이 길어도 라이선스 알약은 늘 오른쪽 위 (좁은 화면에선 설명 아래 왼쪽) */
.license-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.license-chip { white-space: nowrap; justify-self: end; }
@media (max-width: 640px) { .license-list li { grid-template-columns: minmax(0, 1fr); } .license-chip { justify-self: start; } }
.license-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.license-list p { margin: 4px 0 0; color: var(--text-2); font-size: var(--text-sm); line-height: 1.6; }
.license-chip { flex: none; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--border); color: var(--text-2); font-size: var(--text-xs); font-weight: 700; }
a.license-chip:hover { border-color: var(--poke-yellow); color: var(--text); }
.sitemap-list li { display: grid; gap: 2px; }
.sitemap-list a { font-weight: 800; color: var(--text); }
.sitemap-list a:hover { color: var(--poke-red); }
.sitemap-list small { color: var(--text-3); font-size: var(--text-xs); }
.policy-date { margin: -6px 0 14px; color: var(--text-3); font-size: var(--text-sm); font-weight: 700; }
.policy-summary { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 10%, var(--surface)); }
.policy-summary > span { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 22px; }
.policy-summary h2 { margin: 0 0 6px; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 20px; }
.policy-summary p, .policy-section p { margin: 0 0 8px; color: var(--text-2); line-height: 1.75; }
.policy-section ul { margin: 0; padding-left: 20px; color: var(--text-2); line-height: 1.75; }
.policy-other { margin-top: 18px; text-align: center; }

/* ---------- 공지사항 타임라인 (카지노인 아카이브 타임라인 뷰를 옮긴 것: 날짜 | 세로선 + 분류 이모지 | 내용) ---------- */
.notice-timeline { max-width: 1040px; }
.notice-entry { display: grid; grid-template-columns: 92px 48px minmax(0, 1fr); align-items: stretch; min-width: 0; }
.notice-entry > time { display: grid; align-content: start; justify-items: end; gap: 2px; padding: 8px 8px 0 0; color: var(--text-3); font-family: var(--font-numeric), var(--font-body); }
.notice-entry > time strong { color: var(--text); font-size: 26px; font-weight: 800; line-height: 1; }
.notice-entry > time span { font-size: 10px; letter-spacing: .06em; }
.notice-rail { position: relative; display: flex; justify-content: center; min-height: 160px; }
.notice-rail::before { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--border); content: ""; transform: translateX(-50%); }
.notice-entry:first-child .notice-rail::before { top: 20px; }
.notice-entry:last-child .notice-rail::before { bottom: calc(100% - 21px); }
.notice-rail > span { position: relative; z-index: 1; display: grid; width: 40px; height: 42px; place-items: center; background: var(--bg); font-size: 24px; line-height: 1; }
.notice-content { min-width: 0; padding: 4px 0 48px 12px; }
.notice-cat-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; }
.notice-author { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; font-weight: 700; }
.notice-cat { display: inline-flex; padding: 2px 9px; border-radius: 999px; background: var(--surface-muted); border: 1px solid var(--border); color: var(--text-2); font-size: 11px; font-weight: 800; }
.notice-content h3 { margin: 0 0 16px; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: clamp(20px, 2.4vw, 26px); line-height: 1.3; }
.notice-content h3 a { color: var(--text); }
.notice-content h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.notice-more { display: inline-block; margin-top: 10px; color: var(--text-3); font-size: var(--text-xs); font-weight: 700; }
.notice-more:hover { color: var(--text); }
.timeline-excerpt { --timeline-collapse-height: 360px; position: relative; min-width: 0; }
.timeline-excerpt > .community-markdown { color: var(--text-2); font-size: 14px; line-height: 1.75; }
.timeline-excerpt > .community-markdown img { max-height: 520px; object-fit: contain; }
.timeline-excerpt.is-collapsible:not(.is-expanded) { box-sizing: content-box; max-height: var(--timeline-collapse-height); padding-bottom: 54px; overflow: hidden; }
.timeline-excerpt.is-collapsible:not(.is-expanded)::after { position: absolute; z-index: 1; right: 0; bottom: 0; left: 0; height: 108px; background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--bg) 84%, transparent) 48%, var(--bg) 82%); content: ""; pointer-events: none; }
.timeline-expand { display: none; }
.timeline-excerpt.is-collapsible .timeline-expand { display: inline-flex; z-index: 2; }
.timeline-excerpt.is-collapsible:not(.is-expanded) .timeline-expand { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); }
.timeline-excerpt.is-expanded .timeline-expand { margin: 12px auto 0; display: flex; width: max-content; }
.board-markdown { font-size: 15px; line-height: 1.8; }
.community-markdown img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
@media (max-width: 620px) {
  .notice-entry { grid-template-columns: 62px 38px minmax(0, 1fr); }
  .notice-entry > time strong { font-size: 20px; }
  .notice-rail > span { width: 32px; height: 36px; font-size: 20px; }
  .timeline-excerpt { --timeline-collapse-height: 280px; }
}

/* ---------- 포켓몬 정보: 공격 유형 뱃지만 색, 나머지 뱃지(역할 · 타입 · 폼 · 기술)는 색 없이 ---------- */
.attack-badge {
  display: inline-flex; align-items: center; gap: 3px; padding: 3px 10px; border-radius: 999px;
  color: #fff; font-size: 11px; font-weight: 800; white-space: nowrap;
}
.attack-badge.is-physical { background: #ef4444; }
.attack-badge.is-special { background: #6366f1; }
.unite-hero .attack-badge { padding: 4px 12px; font-size: 12px; }
.unite-card-badges { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; }
.unite-card .role-badge { padding: 2px 8px; border-radius: 999px; background: var(--surface-muted); color: var(--text-2); }
.unite-card .type-chip, .unite-hero .type-chip,
.unite-card .form-badge, .unite-hero .form-badge {
  background: var(--surface-muted); color: var(--text-2); text-shadow: none; border: 1px solid var(--border);
}
.unite-card .moves-badge { background: var(--surface-muted); color: var(--text-3); }
.unite-hero .role-chip { background: var(--surface-muted); color: var(--text); border: 1px solid var(--border); }

/* 대회 목록: 관리자 삭제 버튼 (카드 링크 밖에 둔다) */
.tournament-card-wrap { display: grid; grid-template-rows: 1fr auto; gap: 6px; }  /* 128차: 같은 줄 카드 높이를 맞춤 (이름이 두 줄이어도) — 숫자 줄은 맨 아래 */
.tournament-card-wrap > .tournament-card { height: 100%; }
.tournament-card-wrap form { justify-self: end; }
.danger-zone { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.danger-zone h2 { flex-basis: 100%; }

/* 랭킹: 선수 이름 옆 프로필 사진 */
.rank-player { display: inline-flex; align-items: center; gap: 8px; }
.rank-player > a { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.podium-card .podium-avatar { margin: 2px auto 4px; }

/* ---------- 지닌물건 칩 + 설명 말풍선 (마우스 오버 · 탭 · 키보드 포커스) ---------- */
.item-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.item-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
  font-size: 12px; font-weight: 700; cursor: help; outline: none;
  transition: border-color .15s ease, transform .25s var(--ease-bounce);
}
.item-chip > img { width: 28px; height: 28px; object-fit: contain; }
.item-chip:hover, .item-chip:focus-visible, .item-chip:focus { z-index: 31; border-color: var(--poke-yellow); transform: translateY(-1px); }
.item-tip {
  position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; display: none; gap: 6px;
  width: min(300px, 80vw); padding: 12px 14px; border: 1.5px solid var(--poke-yellow); border-radius: 14px;
  background: var(--surface); color: var(--text); box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
  font-size: 12px; font-weight: 500; line-height: 1.55; text-align: left; cursor: auto;
}
.item-tip::before {
  content: ""; position: absolute; top: -7px; left: 18px; width: 12px; height: 12px; transform: rotate(45deg);
  background: var(--surface); border-left: 1.5px solid var(--poke-yellow); border-top: 1.5px solid var(--poke-yellow);
}
.item-tip b { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; }
.item-tip b img { width: 36px; height: 36px; object-fit: contain; }
.item-tip b small { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--surface-muted); color: var(--text-3); font-size: 10px; }
.item-tip em { color: var(--text-3); font-size: 10px; font-style: normal; }
.item-chip:hover .item-tip, .item-chip:focus .item-tip, .item-chip:focus-within .item-tip { display: grid; animation: rise .2s var(--ease-bounce) both; }

/* ---------- 관리자 · 운영진 전용 메뉴: 앞에 작은 자물쇠 (30차: 나만 보는 개인보관함 메뉴도 .nav-lock) ---------- */
.admin-lock::before, .nav-lock::before {
  content: ""; display: inline-block; flex: none; width: .82em; height: .82em; margin-right: 5px; vertical-align: -1px;
  background: currentColor; opacity: .75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- 일반 대회 (팀 신청제) ---------- */
.format-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--poke-blue) 14%, var(--surface)); color: var(--poke-blue); font-size: 11px; font-weight: 800; letter-spacing: 0; vertical-align: middle; }
.kpi-text { font-size: 18px !important; line-height: 1.3; }
.nested-grid { padding: 0; }
.format-pick { border: 0; margin: 0; padding: 0; }
.format-pick legend { margin-bottom: 6px; font-weight: 700; font-size: var(--text-sm); }
.my-team-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; border: 2px solid var(--poke-yellow); }
.my-team-card h2 { margin: 2px 0 6px; }
.next-match { margin: 0; font-weight: 800; }
.next-match.is-champion { color: var(--poke-red); }
.event-at { margin: 0 0 8px; }
.schedule-text { white-space: pre-line; }
.team-entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.team-entry header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.team-entry header > div { flex: 1; min-width: 0; }
.team-entry h2 { margin: 0; font-size: 20px; }
.team-entry header p { margin: 2px 0 0; }
.team-rank { font-size: 22px; }
.roster-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.roster-list li { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--surface-muted); }
.roster-list li.is-leader { background: color-mix(in srgb, var(--poke-yellow) 20%, var(--surface)); }
.roster-list li.is-sub { opacity: .9; border: 1px dashed var(--border); }
.roster-slot { color: var(--text-3); font-size: 11px; font-weight: 800; }
.roster-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: inherit; }
.roster-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-who { display: flex; align-items: center; gap: 6px; min-width: 0; }  /* 127차(2): 이름 옆에 '초대중' — 칸이 넘쳐 줄바꿈되던 것 */
.roster-who .pill { flex: none; white-space: nowrap; padding: 2px 8px; font-size: 10px; }
.roster-list .invite-actions { grid-column: 2 / -1; }
.roster-code { font-size: 11px; color: var(--text-2); }
.lineup-locked { margin: 0 0 10px; padding: 14px; border-radius: 12px; background: var(--surface-muted); color: var(--text-2); text-align: center; font-weight: 700; }
.team-form .section-title { margin: 22px 0 4px; font-size: 18px; }
.roster-form { display: grid; gap: 10px; margin-top: 10px; }
.roster-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 0; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); }
.roster-row.is-leader { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-color: var(--poke-yellow); }
.roster-row legend { padding: 0 6px; font-weight: 800; font-size: 13px; }
.member-search-field { position: relative; }
.member-results { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 4px; list-style: none; border: 1.5px solid var(--poke-yellow); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 24px rgba(0, 0, 0, .14); }
.member-results button { width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.member-results button:hover, .member-results button:focus { background: var(--surface-muted); }
.member-results li.meta { padding: 7px 10px; font-size: 12px; }
.linked-badge { margin-left: 6px; color: #16a34a; font-size: 11px; font-weight: 800; }
@media (max-width: 720px) { .roster-row, .roster-row.is-leader { grid-template-columns: 1fr; } }
.roster-chip { display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 999px; background: var(--surface-muted); font-size: 12px; }
.roster-chip.is-leader { background: color-mix(in srgb, var(--poke-yellow) 24%, var(--surface)); font-weight: 700; }
.roster-chip code { font-size: 10px; color: var(--text-3); }
.request-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.request-item { padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 14px; }
.request-item > p { margin: 0 0 8px; }
.request-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.request-diff > div { padding: 10px; border-radius: 10px; background: var(--surface-muted); }
.request-diff > div:last-child { background: color-mix(in srgb, var(--poke-yellow) 16%, var(--surface)); }
.request-diff p { margin: 2px 0 6px; }
@media (max-width: 720px) { .request-diff { grid-template-columns: 1fr; } }
.manual-draw summary { cursor: pointer; font-weight: 800; margin: 6px 0 10px; }
.manual-draw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.manual-draw-grid fieldset { display: grid; gap: 6px; margin: 0; padding: 10px; border: 1.5px solid var(--border); border-radius: 12px; }
.manual-draw-grid legend { padding: 0 4px; font-size: 12px; font-weight: 800; }
.round-title { margin: 16px 0 8px; font-size: 16px; }
.progress-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.progress-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 12px; }
.progress-item.is-ready { border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 8%, var(--surface)); }
.progress-item.is-done { opacity: .85; }
.progress-pos { color: var(--text-3); font-size: 12px; font-weight: 800; }
.progress-teams { flex: 1; min-width: 200px; }
.progress-teams .vs { margin: 0 6px; color: var(--text-3); font-size: 12px; }
.progress-teams b.is-win { color: var(--poke-red); }
.score-form input[type="number"] { width: 64px; }
.bk-match.is-pending { opacity: .85; }
.attack-tabs label:nth-child(2) { --role-color: #ef4444; }
.attack-tabs label:nth-child(3) { --role-color: #6366f1; }

/* ---------- 디스코드 친구추가 안내 팝업 ---------- */
.discord-pop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(15, 15, 20, .45); animation: fade-in .15s ease both; }
.discord-pop-card {
  position: relative; width: min(380px, 100%); padding: 30px 24px 22px; border: 2px solid var(--poke-yellow); border-radius: 22px;
  background: var(--surface); color: var(--text); text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  animation: pop-in .35s var(--ease-bounce) both;
}
.discord-pop-badge { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #5865f2; font-size: 26px; box-shadow: 0 6px 16px rgba(88, 101, 242, .4); }
.discord-pop-card h2 { margin: 6px 0 6px; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 26px; }
.discord-pop-name { margin: 0 0 14px; color: var(--text-2); font-size: 14px; word-break: break-all; }
.discord-pop-steps { margin: 0 0 18px; padding: 12px 14px 12px 32px; border-radius: 14px; background: var(--surface-muted); text-align: left; font-size: 13px; line-height: 1.8; }
.discord-pop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
@keyframes pop-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.mode-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chip-link { display: inline-flex; align-items: center; padding: 7px 14px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 700; }
.chip-link:hover { color: var(--text); border-color: var(--poke-yellow); text-decoration: none; }
.chip-link.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

/* ---------- 포켓몬 정보: 장인글 ---------- */
.guide-panel { margin-top: -8px; }
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; }
.guide-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 150px; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--border); }
.guide-row:last-child { border-bottom: 0; }
.guide-title { min-width: 0; color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-title:hover { color: var(--poke-blue); }
.guide-date { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.guide-author { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-author a { display: inline-flex; align-items: center; gap: 6px; color: inherit; font-weight: 700; }
.guide-edit { grid-column: 1 / -1; }
.guide-edit summary, .guide-add summary { cursor: pointer; color: var(--text-3); font-size: 12px; font-weight: 800; }
.guide-add { margin-top: 14px; }
.guide-add summary { font-size: 14px; color: var(--text-2); margin-bottom: 10px; }
.guide-form { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.guide-form input { flex: 1 1 140px; }
.guide-edit form[data-confirm] { display: inline; }
@media (max-width: 640px) { .guide-row { grid-template-columns: 1fr auto; } .guide-author { grid-column: 1 / -1; } }

/* ---------- 서클 ---------- */
.circle-mine-note { margin: 0 0 16px; color: var(--text-2); font-size: 14px; }
.circle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.circle-card { display: grid; align-content: start; gap: 10px; padding: 16px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); transition: transform .3s var(--ease-bounce), border-color .2s ease; }
.circle-card:hover { transform: translateY(-3px); border-color: var(--poke-yellow); }
.circle-card.is-mine { border-color: var(--poke-yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--poke-yellow) 25%, transparent); }
.circle-card-main { display: flex; align-items: center; gap: 14px; color: var(--text); }
a.circle-card-main:hover { text-decoration: none; }
.circle-logo { display: grid; place-items: center; flex: none; width: 72px; height: 72px; border-radius: 18px; overflow: hidden; background: var(--surface-muted); border: 1.5px solid var(--border); }
.circle-logo img { width: 100%; height: 100%; object-fit: contain; }
.circle-logo b { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 32px; color: var(--text-2); }
.circle-info { display: grid; gap: 3px; min-width: 0; }
.circle-info strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 21px; }
.circle-info small { color: var(--text-2); font-size: 13px; }
.circle-meta { color: var(--text-3); font-size: 12px; font-weight: 700; }
.circle-go { color: var(--poke-blue); }
.circle-members { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.circle-admin summary { cursor: pointer; color: var(--text-3); font-size: 12px; font-weight: 800; }
.circle-admin .circle-form { margin: 10px 0; }
.withdraw-panel { border-color: color-mix(in srgb, var(--poke-red) 30%, var(--border)); }
.withdraw-notes { margin: 0 0 14px; padding-left: 18px; color: var(--text-2); font-size: 13px; line-height: 1.8; }

/* ---------- 대회 상금 ---------- */
.prize-fields { border: 0; margin: 0; padding: 0; }
.prize-fields legend { margin-bottom: 6px; font-weight: 700; font-size: var(--text-sm); }
.prize-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.prize-grid .field span { font-size: 12px; font-weight: 700; color: var(--text-2); }
@media (max-width: 720px) { .prize-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prize-grid .field, .prize-grid input { min-width: 0; width: 100%; }
.prize-panel { border: 2px solid color-mix(in srgb, var(--poke-yellow) 70%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--poke-yellow) 14%, var(--surface)), var(--surface) 70%); }
.prize-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.prize-list li { display: grid; gap: 2px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.prize-label { color: var(--text-3); font-size: 12px; font-weight: 800; }
.prize-list b { font-size: 15px; }

/* ---------- 서클 뱃지 · 가입 · 서클원 ---------- */
.circle-badge { --cc: var(--circle-color, var(--poke-blue)); display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; padding: 1px 8px 1px 2px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--cc) 40%, var(--border)); background: color-mix(in srgb, var(--cc) 12%, var(--surface)); color: color-mix(in srgb, var(--cc) 85%, var(--text)); font-size: 11px; font-weight: 800; font-style: normal; line-height: 18px; white-space: nowrap; vertical-align: middle; }
.circle-badge:hover { text-decoration: none; border-color: var(--cc); }
/* 218차: 글자가 알약 밖으로 튀어나오던 것 — 줄 안에서 줄어들지 않게, 글자 칸 폭은 글자대로(늦게 받은 글꼴이 더 넓어도 알약이 따라 늘게) */
.circle-badge, .user-badge { flex-shrink: 0; max-width: none; }
.circle-badge > span, .user-badge > span { flex: none; min-width: max-content; }
.circle-badge img { width: 16px; height: 16px; border-radius: 50%; object-fit: contain; background: var(--surface); }
.circle-badge i { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--cc); color: #fff; font-style: normal; font-size: 9px; }
.circle-badge.is-plain { padding: 1px 8px; }
.member-circle { margin: 4px 0 0; }
.circle-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.circle-actions .btn { flex: none; height: auto; }
.circle-recruit { color: #16a34a; }
.circle-members { display: grid; gap: 6px; }
.circle-members-title { margin: 0; color: var(--text-3); font-size: 12px; font-weight: 800; }
.circle-member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.circle-member-list a { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 2px; border-radius: 999px; background: var(--surface-muted); color: var(--text); font-size: 12px; font-weight: 700; }
.circle-member-list a:hover { text-decoration: none; background: color-mix(in srgb, var(--poke-yellow) 25%, var(--surface)); }
.circle-info .circle-badge { margin-left: 0; }

/* ---------- 대회 경기 정보 · 규정 ---------- */
.detail-fields { border: 1.5px dashed var(--border); border-radius: 14px; padding: 10px 14px; }
.detail-fields summary { cursor: pointer; font-weight: 800; font-size: var(--text-sm); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 10px; }
.detail-grid .field span { font-size: 12px; font-weight: 700; color: var(--text-2); }
.detail-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; } }
.match-timeline { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.match-timeline li { display: grid; gap: 2px; padding: 10px 14px; border-radius: 14px; background: var(--surface-muted); border-left: 4px solid var(--poke-yellow); }
.match-timeline li.is-start { border-left-color: var(--poke-red); background: color-mix(in srgb, var(--poke-red) 8%, var(--surface)); }
.match-timeline b { font-size: 13px; }
.match-timeline time { font-weight: 800; font-size: 15px; }
.match-timeline small { color: var(--text-3); font-size: 12px; }
.match-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 0 0 12px; }
.match-facts > div { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.match-facts > div.is-wide { grid-column: 1 / -1; }
.match-facts dt { color: var(--text-3); font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.match-facts dd { margin: 0; font-weight: 600; }
.pre-line { white-space: pre-line; line-height: 1.7; }
.ban-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ban-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 2px; border-radius: 999px; background: color-mix(in srgb, var(--poke-red) 12%, var(--surface)); color: var(--text); font-size: 13px; font-weight: 800; text-decoration: line-through; text-decoration-color: var(--poke-red); }
.ban-chip img { width: 28px; height: 28px; object-fit: contain; }
.rules-full summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; }
.rules-full summary::-webkit-details-marker { display: none; }
.rules-full summary h2 { margin: 0; }
.rules-full .community-markdown { margin-top: 12px; }
.bulk-form textarea { width: 100%; font-family: inherit; }
.bulk-form summary, #bulk summary { cursor: pointer; }

/* ---------- 결승 리그전 ---------- */
.league-pairs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.league-pairs li > a, .league-pairs li { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; color: var(--text); }
.league-pairs li { padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); font-weight: 700; }
.league-pairs li > a:hover { text-decoration: none; }
.league-pairs b { padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: 13px; }
.league-pairs .is-win { color: var(--poke-red); }
.league-pairs small { flex-basis: 100%; text-align: center; color: var(--text-3); font-size: 11px; }
.league-table tr.is-champion td { background: color-mix(in srgb, var(--poke-yellow) 18%, transparent); }
.league-form label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.league-form input[type="number"] { width: 58px; }

/* UniteAPI 전적 붙여넣기 */
.uniteapi-form { display: grid; gap: 10px; margin-top: 12px; }
.uniteapi-form textarea { width: 100%; min-height: 120px; resize: vertical; font-size: var(--text-sm); }
.circle-group + .circle-group { margin-top: 28px; }
.circle-group-title { font-family: var(--font-cute); font-weight: var(--cute-weight); margin: 2px 0 12px; }
.circle-pending-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.circle-pending-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-muted); }
.circle-pending-list form { display: inline; }
.uniteapi-panel { margin-bottom: 20px; }
.circle-rank-table tr.is-me td { background: color-mix(in srgb, var(--poke-yellow) 16%, transparent); }
.circle-rank-name { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
.kpi-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .kpi-grid-3 { grid-template-columns: 1fr; } }
.circle-note-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.circle-note-form input[name="note"] { flex: 1 1 180px; min-width: 140px; }
.circle-manage-table td { vertical-align: middle; }
.admin-badge.is-leader { background: var(--poke-yellow); color: var(--on-primary); }
.circle-leader-row { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; }
.war-circle { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; flex-wrap: wrap; }
.profile-report { margin: 10px 0 0; }

/* 관리자 페이지 */
.admin-subnav { margin: -8px 0 18px; border-bottom: 1px solid var(--border); }
.admin-todo { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.admin-todo a { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-muted); color: var(--text); }
.admin-todo a:hover { border-color: var(--poke-yellow); text-decoration: none; }
.admin-todo b { display: block; font-size: 26px; line-height: 1.1; }
.kpi-card.is-alert { border-color: color-mix(in srgb, var(--poke-red) 60%, var(--border)); }
.admin-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; margin-top: 14px; }
.admin-bar-day { display: grid; justify-items: center; gap: 4px; }
.admin-bar-pair { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.admin-bar { width: 14px; min-height: 2px; border-radius: 6px 6px 2px 2px; }
.admin-bar.is-members, .admin-legend.is-members { background: var(--poke-yellow); }
.admin-bar.is-posts, .admin-legend.is-posts { background: var(--poke-blue); }
.admin-legend { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: middle; }
/* 60차: 방문자 통계 */
.visit-bars { grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; }
.visit-bars .admin-bar-pair { height: 140px; gap: 2px; }
.visit-bars .admin-bar { width: 100%; max-width: 12px; }
.visit-bars small { font-size: 10px; writing-mode: vertical-rl; transform: rotate(180deg); }
.visit-bars .admin-bar-day:not(:nth-child(5n)):not(:last-child) small { visibility: hidden; }
.visit-hours { grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; }
.visit-hours .admin-bar-pair { height: 90px; gap: 1px; }
.visit-hours .admin-bar { width: 100%; max-width: 8px; }
.visit-hours small { font-size: 10px; }
.admin-bar.is-today, .admin-legend.is-today { background: var(--poke-red); }
.visit-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.visit-share { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-muted); margin: 10px 0 6px; }
.visit-share > span { background: var(--poke-yellow); }
/* 137차: 30일 · 시간대 막대가 안 보이던 것 — 막대가 width: 100% 인데 감싸는 칸(.admin-bar-pair)이 내용만큼(=0)이라 폭 0 이었다 */
.visit-bars .admin-bar-day, .visit-hours .admin-bar-day, .visit-weekdays .admin-bar-day { position: relative; justify-items: stretch; min-width: 0; }
.visit-bars .admin-bar-pair, .visit-hours .admin-bar-pair, .visit-weekdays .admin-bar-pair { width: 100%; justify-content: center; }
.visit-bars small, .visit-hours small, .visit-weekdays small { text-align: center; color: var(--text-3); }
.visit-bars .admin-bar-day.is-weekend small, .visit-weekdays .admin-bar-day.is-weekend small { color: var(--poke-red); }
.visit-bars .admin-bar-day.is-today small { color: var(--text); font-weight: 800; }
.visit-weekdays { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.visit-weekdays .admin-bar-pair { height: 90px; }
.visit-weekdays .admin-bar { width: 100%; max-width: 28px; }
.admin-bar-day[data-tip] { cursor: default; outline: none; border-radius: 6px; }
.admin-bar-day[data-tip]:hover, .admin-bar-day[data-tip]:focus-visible { background: var(--surface-muted); }
.admin-bar-day[data-tip]:hover::after, .admin-bar-day[data-tip]:focus::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5;
  padding: 6px 10px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 700;
  white-space: nowrap; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.visit-bars .admin-bar-day:nth-child(-n+5):hover::after, .visit-bars .admin-bar-day:nth-child(-n+5):focus::after { left: 0; transform: none; }
.visit-bars .admin-bar-day:nth-last-child(-n+5):hover::after, .visit-bars .admin-bar-day:nth-last-child(-n+5):focus::after { left: auto; right: 0; transform: none; }
.visit-delta { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.visit-delta.is-up { color: var(--poke-green); }
.visit-delta.is-down { color: var(--poke-red); }
.visit-periods { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.visit-rank { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.visit-rank li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(60px, 1fr) 52px 44px; align-items: center; gap: 10px; font-size: 14px; }
.visit-rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--text); }
.visit-rank-bar { display: block; height: 10px; border-radius: 999px; background: var(--surface-muted); overflow: hidden; }
.visit-rank-bar > span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, var(--poke-yellow), #ff9f1c); }
.visit-rank .num { text-align: right; }
.visit-pct { min-width: 140px; white-space: nowrap; }
.visit-pct .visit-rank-bar { display: inline-block; width: 80px; vertical-align: middle; margin-right: 6px; }
.visit-pages code { font-size: 12px; }
.visit-sub { margin: 18px 0 0; font-size: 15px; }
.visit-details { margin-top: 12px; }
.visit-details summary { cursor: pointer; color: var(--text-2); font-size: 13px; }
@media (max-width: 640px) {
  .visit-bars { gap: 1px; }
  .visit-rank li { grid-template-columns: minmax(0, 1fr) 70px 46px; }
  .visit-rank li small { display: none; }
}
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill.is-danger { background: color-mix(in srgb, var(--poke-red) 18%, var(--surface)); color: var(--poke-red); }
.admin-owner-form { display: inline-flex; gap: 6px; align-items: center; }
.admin-owner-form input { width: 170px; }
.admin-circle-table tr.is-pending td { background: color-mix(in srgb, var(--poke-yellow) 12%, transparent); }
.admin-user-filter, .admin-log-filter { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.admin-user-filter .field, .admin-log-filter .field { flex: 1 1 180px; }
.data-table tr.is-alert td { background: color-mix(in srgb, var(--poke-red) 6%, transparent); }
.admin-ip-form { margin-top: 10px; }

/* 메인 페이지 공지사항 3개 */
.home-notice-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.home-notice-list li { min-width: 0; }
.home-notice-list a { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1.5px solid var(--border);
  border-radius: 16px; background: var(--surface); color: var(--text); transition: transform .3s var(--ease-bounce), border-color .2s ease; }
.home-notice-list a:hover { text-decoration: none; border-color: var(--poke-yellow); transform: translateY(-2px); }
.home-notice-list strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-notice-cat { flex: none; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--poke-yellow) 22%, var(--surface)); font-size: var(--text-xs); font-weight: 700; }
.home-notice-list time { flex: none; }
@media (max-width: 560px) { .home-notice-list time { display: none; } }

/* 관리 표: 모바일에서 칸이 좁아져 글자가 세로로 쪼개지지 않게 — 최소 폭을 두고 표 안에서 옆으로 스크롤 */
@media (max-width: 720px) {
  .data-table.table-wide { min-width: 680px; }
  .data-table.table-wide td, .data-table.table-wide th { word-break: keep-all; }
}

/* 회원 조회 칸 (member_picker) */
.member-picker { position: relative; min-width: 0; }
.member-picker-q { width: 100%; }
.member-picker .is-stale { opacity: .5; }  /* 226차: 새 검색 결과가 오기 전 옛 목록 */
.member-picker-chosen { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 6px 4px 6px; border: 1.5px solid var(--poke-yellow); border-radius: 12px; background: color-mix(in srgb, var(--poke-yellow) 10%, var(--surface)); }
.member-picker-chosen > span, .member-picker-list button > span { display: grid; min-width: 0; line-height: 1.25; }
.member-picker-chosen b, .member-picker-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); }
.member-picker-chosen small, .member-picker-list small { color: var(--text-3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-picker img, .member-picker-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--surface-muted); }
.member-picker-dot { display: block; }
.member-picker .circle-badge { margin-left: auto; }
.member-picker-clear { margin-left: auto; flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); cursor: pointer; }
.member-picker-chosen .circle-badge + .member-picker-clear { margin-left: 4px; }
.member-picker-clear:hover { background: var(--surface-muted); color: var(--text); }
.member-picker-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; display: grid; max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg); box-shadow: 0 16px 40px rgba(0, 0, 0, .14); }
.member-picker-list li.meta { padding: 8px 10px; }
.member-picker-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.member-picker-list button:hover, .member-picker-list button:focus-visible { background: var(--surface-muted); }
.notice-box { display: grid; gap: 8px; justify-items: start; margin-bottom: 14px; border-left: 4px solid var(--poke-yellow); }
.notice-box.is-warn { border-left-color: var(--poke-red); }
.notice-box p { margin: 0; color: var(--text-2); font-size: var(--text-sm); }
.circle-leader-mark { font-size: 11px; margin-left: -2px; }
.circle-more summary { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; color: var(--text-2); font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; border: 1px dashed var(--border-strong); }
.circle-more summary::-webkit-details-marker { display: none; }
.circle-more[open] summary { margin-bottom: 6px; }
/* 서클 뱃지 색 고르기 */
.color-field { border: 0; padding: 0; margin: 0; }
.color-field legend { margin-bottom: 6px; font-size: var(--text-sm); font-weight: 700; color: var(--text-2); }
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.color-swatch { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sw, var(--surface-muted)); border: 2px solid var(--border); cursor: pointer; }
.color-swatch input[type="radio"] { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.color-swatch:has(input[type="radio"]:checked) { outline: 3px solid var(--text); outline-offset: 2px; }
.color-swatch:has(input[type="radio"]:focus-visible) { outline: 3px solid var(--poke-yellow); outline-offset: 2px; }
.color-swatch.is-default { width: auto; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface); }
.color-swatch.is-custom { background: conic-gradient(#ef4444, #f59e0b, #eab308, #22c55e, #3b82f6, #8b5cf6, #ec4899, #ef4444); }
.color-swatch.is-custom input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.color-swatch.is-custom[style*="--sw"] { background: var(--sw); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.circle-manage-name { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; }
.circle-logo.is-sm { width: 40px; height: 40px; border-radius: 12px; }
.rejoin-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.rejoin-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-muted); }
.rejoin-list .btn-row { margin-left: auto; }
.pill.is-hot { background: color-mix(in srgb, var(--poke-red) 15%, var(--surface)); color: var(--poke-red); }
.pill.is-wait { background: color-mix(in srgb, var(--poke-yellow) 22%, var(--surface)); color: var(--text); }
.join-requests { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-muted); }
.join-requests ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.join-requests li, .invite-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.join-requests .btn-row { margin-left: auto; }
/* 210차: 꽉 찬 명단에서 '받기' → 바꿀 사람 고르기 */
.join-swap { position: relative; }
.join-swap summary { list-style: none; cursor: pointer; }
.join-swap summary::-webkit-details-marker { display: none; }
.join-swap-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; display: grid; gap: 4px; width: 250px; margin: 0; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 30px rgba(0, 0, 0, .16); }
.join-swap-pop .meta { margin: 0 0 4px; font-size: 12px; }
.join-swap-pick { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.join-swap-pick:hover { background: var(--surface-muted); }
.join-swap-pick .roster-slot { min-width: 48px; color: var(--text-3); font-size: 12px; }
.join-swap-pick .pill { margin-left: auto; }
.join-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
/* 전적 자동 입력: 복사 방법 · 예시 그림 */
.uniteapi-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.uniteapi-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-sm); color: var(--text-2); }
.uniteapi-steps li > b { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--poke-yellow); color: var(--on-primary); font-size: 12px; }
.uniteapi-steps em { font-style: normal; font-weight: 800; color: var(--text); }
.uniteapi-steps kbd { padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); font-size: 11px; white-space: nowrap; }
.uniteapi-example { margin-top: 12px; }
.uniteapi-example summary { cursor: pointer; font-weight: 700; font-size: var(--text-sm); color: var(--text-2); }
.uapi-mock { --sel: #1d4ed8; margin-top: 10px; padding: 16px; border-radius: 16px; background: #1e2433; color: #e5e7eb; display: grid; gap: 12px; max-width: 640px; }
.uapi-mock .sel { background: var(--sel); color: #fff; padding: 0 3px; border-radius: 2px; }
.uapi-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.uapi-avatar { position: relative; width: 56px; height: 56px; border-radius: 12px; background: var(--sel); }
.uapi-avatar i { position: absolute; right: -4px; bottom: -4px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font: 700 10px var(--font-body); font-style: normal; }
.uapi-who, .uapi-tier > div, .uapi-stats > div, .uapi-poke { display: grid; gap: 3px; justify-items: start; }
.uapi-who b { font-size: 18px; }
.uapi-who small, .uapi-tier small, .uapi-stats small, .uapi-fav small, .uapi-poke small { font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.uapi-tier { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.uapi-cup { width: 36px; height: 36px; border-radius: 8px; background: var(--sel); }
.uapi-fav { font-size: 13px; }
.uapi-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 10px; border-radius: 10px; background: #262d3d; text-align: center; }
.uapi-stats > div { justify-items: center; }
.uapi-stats b { font-size: 15px; }
.uapi-poke { padding: 10px; border-radius: 10px; background: #262d3d; font-size: 13px; }
.uapi-caption { margin: 0; font-size: 12px; color: #cbd5e1; }
@media (max-width: 520px) { .uapi-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .uapi-tier { margin-left: 0; } }
/* 게시판 사진 첨부 · 끌어다 놓기 */
.md-attach { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 14px; border: 1.5px dashed var(--border-strong); border-radius: 14px; background: var(--surface-muted); transition: border-color .15s ease, background-color .15s ease; }
.md-attach.is-over { border-color: var(--poke-blue); background: color-mix(in srgb, var(--poke-blue) 10%, var(--surface)); }
.md-attach-btn { cursor: pointer; }
.md-attach-hint { color: var(--text-3); font-size: 12px; }
.lang-flag { flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1px var(--border); }
.lang-switch-menu .lang-flag { width: 22px; height: 22px; }
.translate-note { margin: -4px 0 14px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-muted); color: var(--text-2); font-size: 12px; }

/* 옆으로 넘치는 메뉴(상단 메뉴 · 서브탭): 스크롤바 · 줄바꿈 없이, 더 있는 쪽 끝을 흐리게 하고 › ‹ 를 띄운다.
   js(site.js)가 넘침 상태에 따라 .has-more-right / .has-more-left 를 붙인다. */
.topbar-nav::before, .topbar-nav::after, .subnav::before, .subnav::after {
  content: ""; position: sticky; z-index: 2; flex: none; align-self: stretch; width: 44px;
  display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .2s ease;
  color: var(--text-2); font: 800 18px/1 var(--font-body);
}
.topbar-nav::before, .subnav::before { left: calc(-1 * var(--nav-pad, 0px)); margin-right: -44px; order: -1; justify-items: start; padding-left: 4px;
  background: linear-gradient(to left, transparent, var(--bg) 60%); }
.topbar-nav::after, .subnav::after { right: calc(-1 * var(--nav-pad, 0px)); margin-left: -44px; order: 99; justify-items: end; padding-right: 4px;
  background: linear-gradient(to right, transparent, var(--bg) 60%); }
.topbar-nav.has-more-left::before, .subnav.has-more-left::before { content: "‹"; opacity: 1; }
.topbar-nav.has-more-right::after, .subnav.has-more-right::after { content: "›"; opacity: 1; }
.link-member { margin-top: 8px; }
.link-member summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--text-2); }
.link-member-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: start; margin-top: 8px; }
@media (max-width: 760px) { .link-member-form { grid-template-columns: 1fr; } }

/* 추천사이트 (카지노인 '관련 사이트' 구성) */
.site-admin-panel { margin: 0 0 16px; padding: 0; overflow: hidden; }
.site-admin-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.site-admin-row > .site-admin-panel { margin: 0; }
.site-admin-row > .site-admin-panel[open] { grid-column: 1 / -1; order: 1; }  /* 205차: 펼친 칸은 닫힌 칸들 아래 한 줄 전체 */
@media (max-width: 640px) { .site-admin-row { grid-template-columns: 1fr; } }
.site-admin-panel > summary { padding: 16px 20px; cursor: pointer; font-weight: 800; }
.site-admin-panel[open] > summary { border-bottom: 1.5px solid var(--border); }
.site-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.site-form .field { min-width: 0; }
.site-form .wide { grid-column: 1 / -1; }
.site-form input:not([type=checkbox]), .site-form select, .site-form textarea, .site-category-form input { width: 100%; box-sizing: border-box; }
.site-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.site-form .req, .site-category-form .req { color: var(--poke-red); }
.site-category-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; padding: 20px; }
.site-category-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 20px; }
/* 199차: 분류 칩 | 작은 검색창 한 줄 · 카드 3개씩 */
.site-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 14px; }
.site-toolbar .board-cats { margin: 0; flex: 1 1 auto; min-width: 0; }
.site-search { display: flex; align-items: center; gap: 6px; flex: 0 1 280px; min-width: 200px; margin-left: auto; }
.site-search input#site-q { flex: 1; min-width: 0; height: 38px; padding: 0 14px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13px; }
.site-search input#site-q:focus { outline: none; border-color: var(--poke-yellow); }
.site-search-btn { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--poke-yellow); color: var(--on-primary); cursor: pointer; transition: transform .2s var(--ease-bounce); }
.site-search-btn:hover { transform: translateY(-2px); }
.site-search-reset { flex: none; color: var(--text-3); font-size: 12px; font-weight: 700; }
.site-result-line { display: flex; justify-content: space-between; gap: 16px; margin: 0 2px 16px; }
.site-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 820px) { .site-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }  /* 205차: 3개씩을 더 넓게 유지 */
/* 201차: Stats 카드 + 링크 단축기 위젯 (주소 복사 · 등장) */
.site-card { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); transition: transform .25s var(--ease-bounce), border-color .2s, box-shadow .2s; animation: site-card-in .6s ease-out backwards; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes site-card-in { from { opacity: 0; transform: translateY(50px) scale(.95); } }
.site-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .08), 0 4px 6px -4px rgba(0, 0, 0, .08); }
.site-card-body { display: grid; align-content: start; gap: 10px; flex: 1; padding: 22px 24px; }
.site-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.site-card-cat { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; color: var(--text-3); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.site-card-badges { display: inline-flex; gap: 6px; flex: none; }
.site-card-badges b { font-size: 12px; font-weight: 700; color: var(--text-3); }
.site-card-badges b.is-pin { color: color-mix(in srgb, var(--poke-yellow) 70%, var(--text)); }
.site-card-head { margin: 2px 0 0; }
.site-card-head > strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 21px; line-height: 1.3; color: var(--text); }
.site-card-description { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.6; white-space: pre-line; }
.site-card-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.site-card-tags i { color: var(--text-3); font-size: 12px; font-style: normal; }
.site-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); }
.site-card-url { display: inline-flex; align-items: center; gap: 2px; min-width: 0; padding-left: 24px; color: var(--text-3); font-size: 12px; }
.site-card-url > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-copy { position: relative; z-index: 1; display: grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--text-3); cursor: pointer; transition: background-color .2s, color .2s, transform .2s var(--ease-bounce); }
.site-copy:hover { background: color-mix(in srgb, var(--poke-yellow) 12%, transparent); color: var(--poke-yellow); transform: scale(1.1); }
.site-copy:active { transform: scale(.9); }
.site-copy .is-check, .site-copy.is-copied .is-copy { display: none; }
.site-copy.is-copied .is-check { display: block; color: var(--poke-green); animation: site-copied .2s ease-out; }
@keyframes site-copied { from { opacity: 0; transform: scale(.5); } }
.site-card-open { flex: none; padding: 12px 24px; color: color-mix(in srgb, var(--poke-yellow) 75%, var(--text)); font-size: 14px; font-weight: 700; }
.site-card-open:hover { text-decoration: none; opacity: .85; }
.site-card-open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.site-card-open span { display: inline-block; transition: transform .2s var(--ease-bounce); }
.site-card:hover .site-card-open span { transform: translateX(3px); }
.site-admin-actions { position: relative; z-index: 1; }
.site-admin-actions { display: flex; align-items: flex-start; gap: 10px; padding: 12px 20px; border-top: 1.5px solid var(--border); }
.site-admin-actions > details { flex: 1; min-width: 0; }
.site-admin-actions summary { cursor: pointer; font-size: 13px; color: var(--text-3); padding-top: 6px; }
.site-form.compact { margin-top: 12px; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--bg); }
@media (max-width: 760px) {
  .site-form, .site-card-grid, .site-category-form { grid-template-columns: 1fr; }
  .site-search { flex-basis: 100%; }
}

/* 일정 게시판 (카지노인 '나라별 연휴' 달력 모양) */
.sched-h { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 22px; margin: 0 0 12px; }
.sched-upcoming { margin-bottom: 18px; }
.sched-upcoming ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.sched-upcoming a { display: grid; gap: 4px; height: 100%; box-sizing: border-box; padding: 12px 14px; border: 1.5px solid var(--border); border-left: 5px solid var(--ev); border-radius: var(--radius-md); background: var(--surface); color: inherit; text-decoration: none; transition: transform .25s var(--ease-bounce); }
.sched-upcoming a:hover { transform: translateY(-2px); text-decoration: none; }
.sched-dday { justify-self: start; padding: 1px 8px; border-radius: 999px; background: var(--ev); color: #fff; font-size: 11px; font-weight: 800; }
.sched-upcoming b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-upcoming small { color: var(--text-3); font-size: 12px; }
.sched-month { padding: 18px; margin-bottom: 8px; }
.sched-month-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.sched-month-head h2 { margin: 0 6px; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 26px; }
.sched-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; font-size: 12px; color: var(--text-2); font-weight: 700; }
.sched-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 50%; background: var(--ev); }
.sched-weekdays, .sched-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.sched-weekdays span { padding: 6px 8px; color: var(--text-3); font-size: 12px; font-weight: 800; text-align: center; }
.sched-days { border-top: 1.5px solid var(--border); border-left: 1.5px solid var(--border); }
.sched-day { display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 96px; padding: 6px; border-right: 1.5px solid var(--border); border-bottom: 1.5px solid var(--border); }
.sched-day > b { font-size: 13px; color: var(--text-2); }
.sched-day.is-outside { background: var(--surface-muted); }
.sched-day.is-outside > b { opacity: .45; }
.is-sun > b, .sched-weekdays .is-sun { color: var(--poke-red); }
.is-sat > b, .sched-weekdays .is-sat { color: var(--poke-blue); }
.sched-day.is-today > b { display: inline-grid; place-items: center; align-self: flex-start; min-width: 24px; height: 24px; border-radius: 999px; background: var(--poke-yellow); color: var(--on-primary); }
.sched-chip { display: block; overflow: hidden; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--ev) 18%, transparent); border-left: 3px solid var(--ev); color: var(--text); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.sched-chip:hover { text-decoration: none; background: color-mix(in srgb, var(--ev) 30%, transparent); }
.sched-more { color: var(--text-3); font-size: 11px; font-weight: 700; }
.sched-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sched-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 16px; border: 1.5px solid var(--border); border-left: 5px solid var(--ev); border-radius: var(--radius-lg); background: var(--surface); scroll-margin-top: 90px; }
.sched-item:target { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ev) 40%, transparent); }
.sched-item-date { display: grid; justify-items: center; align-content: start; }
.sched-item-date strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 30px; line-height: 1; }
.sched-item-date span { color: var(--text-3); font-size: 12px; font-weight: 700; }
.sched-item-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; color: var(--text-3); font-size: 12px; font-weight: 700; }
.sched-cat { color: var(--ev); }
.sched-item h3 { margin: 4px 0 6px; font-size: 17px; }
.sched-desc { margin: 0 0 8px; color: var(--text-2); white-space: pre-line; line-height: 1.6; }
.sched-admin { margin: 10px -16px -16px; }
@media (max-width: 760px) {
  .sched-month { padding: 12px; }
  .sched-legend { margin-left: 0; width: 100%; }
  .sched-day { min-height: 54px; padding: 4px; }
  .sched-chip { padding: 0; height: 6px; border-left: 0; background: var(--ev); font-size: 0; }
  .sched-more { font-size: 10px; }
  .sched-upcoming li:nth-child(n+4) { display: none; }
}
.gem-won { display: block; margin-top: 2px; color: var(--poke-blue); font-weight: 800; font-size: 13px; }
.gem-won-pay { display: block; color: var(--text-3); font-size: 11px; line-height: 1.4; }

/* 게시판 카테고리 · 보기 방식 · 갤러리 (카지노인 갤러리) */
.board-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.board-cats a { padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 700; text-decoration: none; transition: transform .2s var(--ease-bounce); }
.board-cats a:hover { transform: translateY(-2px); border-color: var(--poke-yellow); text-decoration: none; }
.board-cats a.is-active { background: var(--poke-yellow); border-color: var(--poke-yellow); color: var(--on-primary); }
.board-cats .board-cats-manage { margin-left: auto; border-style: dashed; }
.view-switch { display: inline-flex; margin-left: auto; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.view-switch a { padding: 5px 12px; border-radius: 999px; color: var(--text-2); font-size: 12px; font-weight: 800; text-decoration: none; }
.view-switch a.is-active { background: var(--poke-yellow); color: var(--on-primary); }
/* 204차: 게시판 제목에 마우스를 올리면 추천사이트 '사이트 열기'와 같은 포인트색 */
.ftable-row:hover .ftable-link b, .board-row-link:hover .board-row-title b { color: color-mix(in srgb, var(--poke-yellow) 75%, var(--text)); }
.board-cat-tag { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--surface-muted); color: var(--text-2); font-size: 11px; font-weight: 800; }
.board-has-pic { font-size: 12px; }
.board-gallery { columns: 3 240px; column-gap: 16px; }
.board-gallery-item { position: relative; display: block; overflow: hidden; margin: 0 0 16px; padding: 8px; break-inside: avoid; border-radius: var(--radius-lg); background: var(--surface); border: 1.5px solid var(--border); color: #fff; text-decoration: none; transition: transform .45s var(--ease-bounce), box-shadow .3s; }
.board-gallery-item:nth-child(3n+1) { transform: rotate(-1.2deg); }
.board-gallery-item:nth-child(3n+2) { transform: rotate(.9deg); }
.board-gallery-item:nth-child(3n) { transform: rotate(-.5deg); }
.board-gallery-item:hover, .board-gallery-item:focus-visible { z-index: 2; transform: rotate(0) translateY(-6px); box-shadow: 0 14px 34px rgba(0, 0, 0, .22); text-decoration: none; }
.board-gallery-item img { display: block; width: 100%; height: auto; min-height: 160px; max-height: 520px; border-radius: 14px; object-fit: cover; }
.board-gallery-item::after { content: ""; position: absolute; inset: 55% 8px 8px; border-radius: 0 0 14px 14px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .75)); }
.board-gallery-item span { position: absolute; z-index: 1; left: 22px; right: 22px; bottom: 20px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 19px; line-height: 1.3; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.board-gallery-item em { position: absolute; z-index: 1; top: 18px; left: 18px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: 11px; font-style: normal; font-weight: 800; }
@media (max-width: 760px) {
  .board-gallery { columns: 2 130px; column-gap: 10px; }
  .board-gallery-item { margin-bottom: 10px; padding: 5px; }
  .board-gallery-item img { min-height: 110px; }
  .board-gallery-item span { left: 12px; right: 12px; bottom: 12px; font-size: 14px; }
  .board-gallery-item em { top: 10px; left: 10px; }
  .board-toolbar { flex-wrap: wrap; }
}
/* 카테고리 관리 */
.cat-create { margin-bottom: 16px; }
.cat-list { display: grid; gap: 8px; }
.cat-row-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border-radius: var(--radius-md); }
.cat-list .cat-row-form { border: 1.5px solid var(--border); }
.cat-row-form.is-inactive { opacity: .6; }
.cat-row-form input[name=name] { flex: 1 1 160px; }
.cat-row-form .cat-emoji { width: 56px; text-align: center; }
.cat-order, .cat-actions { display: inline-flex; gap: 4px; }
.cat-actions { margin-left: auto; }
/* 사진 크게 보기 */
.board-markdown img, .community-markdown img, .comment-body img { cursor: zoom-in; }
.board-markdown img.emoticon, .community-markdown img.emoticon, .comment-body img.emoticon { cursor: default; }
.has-lightbox { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 48px 16px; background: rgba(8, 8, 12, .88); animation: rise .2s ease-out; cursor: zoom-out; }
.lightbox img { width: auto; height: auto; min-height: min(72vh, 720px); max-width: min(1400px, 100%); max-height: 100%; border-radius: 12px; object-fit: contain; background: var(--surface); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); cursor: default; }
.lightbox-close, .lightbox-nav { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px; cursor: pointer; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, .28); }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-nav.is-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.is-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-count { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .8); font-size: 13px; font-weight: 700; }
/* 메인: 자유게시판 인기글 */
.home-hot-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.home-hot-list a { display: flex; align-items: center; gap: 12px; height: 100%; box-sizing: border-box; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-decoration: none; transition: transform .25s var(--ease-bounce), border-color .2s; }
.home-hot-list a:hover { transform: translateY(-3px); border-color: var(--poke-yellow); text-decoration: none; }
.home-hot-rank { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--poke-yellow); color: var(--on-primary); font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 17px; }
.home-hot-list li:nth-child(n+2) .home-hot-rank { background: var(--surface-muted); color: var(--text-2); }
.home-hot-thumb { flex: none; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.home-hot-main { display: grid; gap: 4px; min-width: 0; }
.home-hot-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.home-hot-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .home-hot-list { grid-template-columns: 1fr; } }

/* 랜덤 팀 생성기 */
.tm { display: grid; gap: 16px; }
.tm > * { min-width: 0; }
.tm-table .tm-skill, .tm-table .tm-tag { box-sizing: border-box; }
.tm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tm-head h2, .tm-head h3 { margin: 0; }
.tm-head h3 { font-size: 15px; }
.tm-bulk { margin-bottom: 12px; }
.tm-bulk > summary { cursor: pointer; font-weight: 800; padding: 6px 0; }
.tm-bulk textarea { width: 100%; box-sizing: border-box; }
.tm-member-search { position: relative; margin-bottom: 12px; }
.tm-member-search input { width: 100%; box-sizing: border-box; }
.tm-member-search .member-picker-list { position: absolute; z-index: 20; left: 0; right: 0; }
.tm-table-wrap { overflow-x: auto; }
.tm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tm-table th { padding: 6px; color: var(--text-3); font-size: 12px; text-align: left; white-space: nowrap; }
.tm-table td { padding: 5px 6px; border-top: 1px solid var(--border); vertical-align: middle; }
.tm-name { width: 100%; min-width: 110px; box-sizing: border-box; }
.tm-skill { width: 58px; }
.tm-tag { width: 58px; }
.tm-pos-chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 220px; }
.tm-pos-chip { padding: 3px 9px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-3); font: 700 11px var(--font-body); cursor: pointer; }
.tm-pos-chip.is-on { background: var(--poke-blue); border-color: var(--poke-blue); color: #fff; }
.tm-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 12px; }
.tm-settings-grid .chip-toggle { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; font-weight: 700; }
.tm-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin-bottom: 14px; }
.tm-positions { padding: 14px; border: 1.5px dashed var(--border); border-radius: var(--radius-md); }
.tm-positions.is-off { opacity: .45; }
.tm-positions .is-over { color: var(--poke-red); }
.tm-pos-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 10px; }
.tm-pos-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); font-weight: 700; font-size: 13px; }
.tm-pos-item input { width: 52px; padding: 4px 6px; }
.tm-pos-add { display: flex; gap: 8px; max-width: 360px; }
.tm-pos-add input { flex: 1; }
.tm-go { margin-top: 14px; }
.tm-go-btn { font-size: 16px; padding: 12px 28px; }
.tm-warnings { list-style: none; margin: 0 0 10px; padding: 0; color: var(--poke-red); font-size: 13px; font-weight: 700; }
.tm-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tm-team { padding: 14px; border: 1.5px solid var(--border); border-top: 5px solid hsl(var(--tm-hue) 75% 55%); border-radius: var(--radius-lg); background: var(--surface); animation: rise .35s var(--ease-bounce) both; }
.tm-team header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tm-team h3 { margin: 0; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 20px; }
.tm-team ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.tm-team li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tm-team li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-team li small { margin-left: auto; color: var(--text-3); font-weight: 700; }
.tm-team li em { color: var(--poke-red); font-size: 11px; font-style: normal; font-weight: 800; }
.tm-team li.is-sixth { padding-top: 5px; border-top: 1px dashed var(--border); }
.tm-slot { flex: none; min-width: 52px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, hsl(var(--tm-hue) 75% 55%) 16%, var(--surface)); color: var(--text-2); font-size: 11px; font-weight: 800; text-align: center; }
.tm-bench { margin-top: 14px; padding: 12px 16px; border: 1.5px dashed var(--border); border-radius: var(--radius-md); }
.tm-bench h3 { margin: 0 0 4px; font-size: 14px; }
.tm-bench p { margin: 0; color: var(--text-2); }
@media (max-width: 760px) {
  .tm-settings-grid, .tm-options { grid-template-columns: 1fr; }
  .tm-table-wrap { overflow: visible; }
  .tm-table thead { display: none; }
  .tm-table, .tm-table tbody { display: block; }
  .tm-table tr { display: grid; grid-template-columns: repeat(4, auto) 1fr auto; align-items: center; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--border); }
  .tm-table td { display: contents; border: 0; padding: 0; }
  .tm-table td:first-child > input { grid-column: 1 / 6; min-width: 0; }
  .tm-table td:last-child > button { grid-column: 6; grid-row: 1; }
  .tm-table td:nth-child(2) > div { grid-column: 1 / -1; min-width: 0; }
  .tm-table td[data-label]::before { content: attr(data-label); color: var(--text-3); font-size: 11px; font-weight: 800; white-space: nowrap; }
  .tm-table td[data-label] { display: flex; align-items: center; gap: 4px; }
  .tm-skill, .tm-tag { width: 44px; padding: 4px 6px; }
  .tm-go-btn { width: 100%; }
}

/* 회원 뱃지 (관리자가 주는 표시) */
.user-badge { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 1px 8px 1px 6px; border: 1.5px solid color-mix(in srgb, var(--badge-color) 55%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--badge-color) 14%, var(--surface)); color: color-mix(in srgb, var(--badge-color) 70%, var(--text)); font-size: 11px; font-weight: 800; line-height: 1.6; vertical-align: middle; white-space: nowrap; }
.user-badge i { font-style: normal; font-size: 11px; }
/* 193차(사용자: 'Grand Masters 뱃지가 다크 모드에서 잘 안 보임'): 어두운 색 뱃지도 다크에서 읽히게 — 글자 · 테두리를 흰색 쪽으로 */
html[data-theme="dark"] .user-badge { border-color: color-mix(in srgb, var(--badge-color) 65%, #ffffff); background: color-mix(in srgb, var(--badge-color) 30%, var(--surface)); color: color-mix(in srgb, var(--badge-color) 35%, #ffffff); }
.member-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.member-badges .user-badge { margin-left: 0; font-size: 12px; }
.badge-grant-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: start; }
.badge-admin-list { display: grid; gap: 10px; }
.badge-admin-item { padding: 6px; border: 1.5px solid var(--border); border-radius: var(--radius-md); }
.badge-admin-item.is-inactive { opacity: .6; }
.badge-admin-item input[type=color] { width: 44px; height: 36px; padding: 2px; }
.badge-holders { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 8px 6px; }
.badge-holder { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--surface-muted); font-size: 12px; font-weight: 700; }
@media (max-width: 760px) { .badge-grant-form { grid-template-columns: 1fr; } }

/* 젬 계산기 */
.gem { display: grid; gap: 16px; }
.gem > * { min-width: 0; }
.gem-tabs { justify-self: start; margin-left: 0; }
.gem-panel .field input { width: 100%; max-width: 320px; font-size: 18px; font-weight: 800; }
.gem-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.gem-pokemon { margin-top: 12px; }
.gem-pokemon > summary { cursor: pointer; font-weight: 800; padding: 6px 0; }
.gem-poke-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.gem-poke { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text); font: 700 12px var(--font-body); cursor: pointer; transition: transform .2s var(--ease-bounce), border-color .2s; }
.gem-poke:hover { transform: translateY(-3px); border-color: var(--poke-yellow); }
.gem-poke:active { transform: scale(.95); }
.gem-poke small { color: var(--poke-blue); font-weight: 800; }
.gem-cart { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.gem-cart-item { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 4px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface-muted); color: var(--text); font: 700 12px var(--font-body); cursor: pointer; }
.gem-cart-sum { margin-left: auto; font-weight: 800; color: var(--poke-blue); }
.gem-result:not(:empty) { margin-top: 16px; padding: 18px; border: 2px solid var(--poke-yellow); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--poke-yellow) 10%, var(--surface)); animation: rise .3s var(--ease-bounce) both; }
.gem-big { display: grid; gap: 2px; }
.gem-big small { color: var(--text-3); font-weight: 800; }
.gem-big strong { font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 38px; line-height: 1.1; }
.gem-combo { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.gem-pack { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--border); font-size: 13px; font-weight: 700; }
.gem-pack em { color: var(--poke-red); font-style: normal; font-weight: 800; }
.gem-facts { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.gem-table td, .gem-table th { white-space: nowrap; }

/* 내 계정 소속: 서클 / 고정팟 / 크루 칸을 한 줄씩 나눠서 */
.affil-field { padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--bg); }
.affil-field label { font-family: var(--font-cute); font-size: 16px; font-weight: var(--cute-weight); color: var(--text); }
.affil-field { display: grid; gap: 6px; }
.rename-user { margin-top: 4px; }
.rename-user summary { cursor: pointer; font-size: 11px; color: var(--text-3); }
.rename-user form { display: flex; gap: 4px; margin-top: 4px; }
.rename-user input { width: 9em; min-width: 0; padding: 4px 8px; font-size: 12px; }

/* ---------- 로그인 (카지노인 로그인 화면 구조) ---------- */
.login-page { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0 40px; }
.login-locked { width: min(420px, 100%); }
.login-card {
  display: grid; width: min(420px, 100%); padding: 32px 28px 24px; border: 1.5px solid var(--border);
  border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-md, 0 12px 32px rgba(0, 0, 0, .08));
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 26px; color: var(--text); }
.login-eyebrow { margin: 0 0 18px; color: var(--text-3); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.login-label { margin: 10px 0 6px; color: var(--text-2); font-size: 12px; font-weight: 700; }
.login-card .login-input { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; font-size: 15px; }
/* 230차: 로그인 · 가입 카드 위 몬스터볼 친구 (accounts/_login_buddy.html + js/login-buddy.js) — 아랫부분이 카드 뒤로 살짝 숨음 */
.login-buddy-stage { --lb-red: #ee3b2f; --lb-white: #fbfbf8; --lb-ink: #22201c; position: relative; width: min(420px, 100%); padding-top: 150px; }
html[data-theme="dark"] .login-buddy-stage { --lb-white: #f4f3ef; --lb-ink: #0d0d0f; }
.login-buddy-stage.is-wide { width: 100%; }
.login-buddy-stage > form { position: relative; z-index: 1; }
.login-buddy-stage > .login-card { width: 100%; }
.login-buddy { position: absolute; top: 0; left: 50%; z-index: 0; width: 200px; height: 167px; margin-left: -100px; overflow: visible; pointer-events: none; }
.login-buddy .lb-red { fill: var(--lb-red); }
.login-buddy .lb-white { fill: var(--lb-white); }
.login-buddy .lb-ink { fill: var(--lb-ink); }
.login-buddy .lb-stroke { stroke: var(--lb-ink); }
.login-buddy .lb-spark { stroke: var(--poke-yellow); opacity: 0; transition: opacity .2s; }
.login-buddy .lb-head { transform-box: view-box; transform-origin: 120px 190px; transition: transform .25s ease-out; }
.login-buddy .lb-face { transition: transform .18s; }
.login-buddy .lb-eyes { transition: transform .12s, opacity .12s; }
.login-buddy .lb-eye { transform-box: fill-box; transform-origin: center; transition: transform .16s, opacity .12s; }
.login-buddy .lb-eye.is-blink { animation: lb-blink .14s; }
.login-buddy .lb-shut path, .login-buddy .lb-happy { opacity: 0; transition: opacity .12s; }
.login-buddy.is-shut .lb-eye { transform: scaleY(.08); opacity: 0; }
.login-buddy.is-shut .lb-shut path { opacity: 1; }
.login-buddy.is-shut.is-peek .lb-eye-r { transform: scaleY(.55); opacity: 1; }
.login-buddy.is-shut.is-peek .lb-shut-r { opacity: 0; }
.login-buddy.is-happy .lb-happy, .login-buddy.is-happy .lb-spark { opacity: 1; }
.login-buddy.is-happy .lb-eyes, .login-buddy.is-happy .lb-shut { opacity: 0; }
.login-buddy.is-shake { animation: lb-shake .55s; }
.login-buddy.is-jump { animation: lb-jump .6s var(--ease-bounce, ease-out); }
@keyframes lb-blink { 50% { transform: scaleY(.1); } }
@keyframes lb-shake { 15%, 55% { transform: translateX(-9px); } 35%, 75% { transform: translateX(9px); } }
@keyframes lb-jump { 40% { transform: translateY(-22px); } }
.login-pw-row { position: relative; }
.login-pw-row .login-input { padding-right: 70px; }
.login-pw-peek {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%); padding: 5px 10px; border: 0; border-radius: 8px;
  background: var(--bg); color: var(--text-2); font-size: 12px; font-weight: 700; cursor: pointer;
}
.login-pw-peek:hover, .login-pw-peek[aria-pressed="true"] { color: var(--text); }
@media (max-width: 480px) { .login-buddy-stage { padding-top: 126px; } .login-buddy { width: 168px; height: 140px; margin-left: -84px; } }
.remember-login {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 14px; background: var(--bg); cursor: pointer;
}
.remember-login > span { display: grid; gap: 3px; }
.remember-login strong { color: var(--text); font-size: 13px; }
.remember-login small, .remember-login-warning { color: var(--text-3); font-size: 11px; line-height: 1.55; }
.remember-login-warning { margin: 8px 2px 0; }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { position: relative; flex: 0 0 44px; height: 26px; border-radius: 999px; background: var(--border); transition: background .2s ease; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease-bounce);
}
.switch-input:checked + .switch { background: var(--poke-yellow); }
.switch-input:checked + .switch::after { transform: translateX(18px); }
.switch-input:focus-visible + .switch { outline: 2px solid var(--poke-blue, #3b82f6); outline-offset: 2px; }
.login-button { width: 100%; height: 50px; margin-top: 18px; font-size: 16px; }
.login-links { display: flex; justify-content: center; gap: 8px; margin: 16px 0 0; font-size: 13px; }
.login-links span { color: var(--text-3); }
.login-help { margin: 8px 0 0; color: var(--text-3); font-size: 11px; text-align: center; }
.login-guest {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(420px, 100%); padding: 14px 18px;
  border: 1.5px dashed var(--border); border-radius: 16px; color: var(--text); text-decoration: none;
  transition: border-color .15s ease, transform .2s var(--ease-bounce);
}
.login-guest:hover { border-color: var(--poke-yellow); text-decoration: none; transform: translateY(-2px); }
.login-guest strong { font-size: 13px; }
.login-guest span { color: var(--text-3); font-size: 11px; }
@media (max-width: 480px) { .login-card { padding: 24px 18px 20px; } .login-guest { flex-direction: column; align-items: flex-start; gap: 2px; } }
.discord-chip.is-locked { opacity: .75; text-decoration: none; filter: grayscale(.6); }
.discord-chip.is-locked:hover { opacity: 1; text-decoration: none; }

/* 로고 (static/img/logo-wordmark.webp, 검정 · 투명 배경) — 다크 모드에서는 흰색으로. 147차: 117차 컬러 로고 → 다시 이 로고(사용자) */
.logo-img { display: block; width: auto; max-width: 100%; }
.brand-logo { height: 28px; transition: transform .35s var(--ease-bounce); }
.brand-link:hover .brand-logo { transform: translateY(-1px) rotate(-2deg); }
.footer-logo { height: 20px; }
.login-logo { height: 35px; }
html[data-theme="dark"] .logo-img { filter: invert(1); }
@media (max-width: 720px) { .brand-logo { height: 22px; } }

/* ---------- 푸터 (카지노인 legal footer 구조) ---------- */
.site-footer { margin-top: 48px; border-top: 0; background: transparent; }
.footer-shell {
  position: relative; display: grid; grid-template-columns: 1fr 2fr; gap: 32px; align-items: start;
  width: calc(min(var(--shell-max), 100%) - 2 * var(--shell-gutter)); margin: 0 auto; padding: 44px 28px 96px;
  border: 1px solid var(--border); border-bottom: 0; border-radius: 40px 40px 0 0;
  background: radial-gradient(35% 128px at 50% 0%, color-mix(in srgb, var(--poke-yellow) 14%, transparent), transparent), var(--surface);
}
.footer-shell::before {
  content: ""; position: absolute; top: -1px; left: 50%; transform: translate(-50%, -50%); width: 33%; height: 2px;
  border-radius: 999px; background: var(--poke-yellow); filter: blur(2.5px); opacity: .6; pointer-events: none;
}
.footer-brand-col { display: grid; gap: 10px; justify-items: start; }
.footer-logo { height: 21px; margin-bottom: 4px; }
.footer-copyright { margin: 4px 0 0; color: var(--text-3); font-size: 10px; letter-spacing: .02em; }
.footer-shell .footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-shell .footer-col { display: grid; gap: 9px; align-content: start; justify-items: start; }
.footer-shell .footer-col h2 { margin: 0 0 4px; color: var(--text-2); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.footer-shell .footer-col a { color: var(--text-3); font-size: 12px; transition: color .3s; }
.footer-shell .footer-col a:hover { color: var(--text); text-decoration: none; }
/* 251차: 운영자의 다른 사이트 로고 줄 — 푸터 맨 아래 가운데, 아주 옅게. 그림은 마스크로만 쓰고 색은 글자색(다크/라이트 따라감) */
.footer-shell { padding-bottom: 40px; }
.footer-family {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 28px;
  width: calc(min(var(--shell-max), 100%) - 2 * var(--shell-gutter)); margin: 0 auto; padding: 4px 16px 96px;
  border: 1px solid var(--border); border-top: 0; border-bottom: 0; background: var(--surface);
}
.footer-family-link { display: inline-flex; align-items: center; color: var(--text); opacity: .25; transition: opacity .3s ease; }
.footer-family-link:hover, .footer-family-link:focus-visible { opacity: .7; text-decoration: none; }
.footer-family-logo {
  display: block; height: 18px; background: currentColor;
  -webkit-mask: var(--family-logo) center / contain no-repeat; mask: var(--family-logo) center / contain no-repeat;
}
.footer-family-link.is-casinoin .footer-family-logo { --family-logo: url("../img/family/casinoin.svg"); width: 88px; }  /* 그림 비율 1705:350 */
.footer-family-link.is-alldock .footer-family-logo { --family-logo: url("../img/family/alldock.svg"); width: 100px; height: 16px; }  /* 글자 로고 1324:213 - 다른 로고보다 굵어 조금 낮게 */
@media (max-width: 760px) {
  .footer-shell { grid-template-columns: 1fr; gap: 26px; padding: 36px 20px 32px; border-radius: 28px 28px 0 0; }
  .footer-shell .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 메인 도구 링크 ---------- */
.home-tools { margin-top: 12px; padding: 16px; }
.home-tools .page-eyebrow { margin: 0 0 10px; }
.home-tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.home-tool-grid a {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: 12px; background: var(--bg); color: var(--text); font-size: 13px; font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; transition: border-color .15s ease, transform .2s var(--ease-bounce);
}
.home-tool-grid a:hover { border-color: var(--poke-yellow); text-decoration: none; transform: translateY(-2px); }
.home-tool-grid span { flex: none; font-size: 16px; }
@media (max-width: 480px) { .home-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 사이트맵 (카지노인 트리) ---------- */
.sitemap-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 8px; align-items: start; }
.sitemap-section { padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.sitemap-section-head { display: grid; gap: 4px; padding: 8px 12px; border-radius: 10px; color: var(--text); }
.sitemap-section-head:hover { background: color-mix(in srgb, var(--text) 5%, transparent); text-decoration: none; }
.sitemap-section-head strong { font-family: var(--font-cute); font-size: 18px; font-weight: var(--cute-weight); }
.sitemap-section-head small, .sitemap-leaf small { display: block; color: var(--text-3); font-size: 10px; line-height: 1.5; font-weight: 500; }
.sitemap-branch { display: grid; gap: 2px; margin: 4px 0 0 16px; padding-left: 8px; border-left: 2px solid var(--border); }
.sitemap-branch .sitemap-branch { margin-left: 12px; }
.sitemap-leaf {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border-radius: 10px;
  color: var(--text-2); font-size: 13px; font-weight: 600; transition: background .12s ease, color .12s ease;
}
.sitemap-leaf:hover { background: color-mix(in srgb, var(--poke-yellow) 18%, transparent); color: var(--text); text-decoration: none; }
.sitemap-leaf.is-current, .sitemap-section-head.is-current { background: color-mix(in srgb, var(--poke-yellow) 26%, transparent); color: var(--text); font-weight: 800; }
.sitemap-leaf[data-locked] { opacity: .6; }
.sitemap-leaf i { font-style: normal; font-size: 11px; }

/* ---------- 구글 로그인 (카지노인 버튼 · 구분선) ---------- */
.google-login-button {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 48px; padding: 0 16px;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: border-color .15s ease, transform .2s var(--ease-bounce);
}
.google-login-button:hover { border-color: var(--poke-yellow); text-decoration: none; transform: translateY(-1px); }
.google-login-button.is-inline { width: auto; margin-top: 8px; }
.google-login-button.is-naver { margin-top: 8px; }  /* 97차: 네이버 버튼 (같은 모양, 초록 N 아이콘) */
.google-login-button.is-naver:hover { border-color: #03c75a; }
.login-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; color: var(--text-3); font-size: 11px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.google-signup-note { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--poke-yellow); border-radius: 12px; background: color-mix(in srgb, var(--poke-yellow) 12%, var(--surface)); font-size: 13px; }

/* 내 계정: 카드를 2개씩 (좁은 화면은 1개) */
.account-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; margin-top: 16px; align-items: start; }
.account-cards > .acc-card { max-width: none; margin: 0; }
.account-cards .form-grid { grid-template-columns: 1fr; }
.account-cards .form-grid .span-2 { grid-column: auto; }

/* 메인: 두 주제씩 나란히 (하나만 있으면 한 줄 전체) */
.home-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px; align-items: start; }
.home-pair > .section { min-width: 0; margin-top: 0; }
.home-pair { margin-top: 32px; }

/* 내 포켓몬 티어 (나의 전적 · 공개 프로필) */
.my-tier-panel { margin-bottom: 16px; }
.my-tier-form { flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.my-tier-form select { min-width: 220px; }
.member-tier-board { display: grid; gap: 6px; margin-top: 10px; }
.member-tier-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; align-items: stretch; }
.member-tier-row > b { display: grid; place-items: center; border-radius: 10px; background: var(--tier-color, #adb5bd); color: #1f1300; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 20px; }
.member-tier-row > div { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--bg); }
.member-tier-row img { width: 44px; height: 44px; object-fit: contain; }
/* 메인 두 주제 칸: 비었어도 칸을 채운다 */
.home-pair > .section { display: flex; flex-direction: column; }
.home-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 220px; padding: 28px 20px; text-align: center; }
.home-empty-icon { font-size: 34px; line-height: 1; }
.home-empty h2 { margin: 0; font-size: 19px; }
.home-pair { align-items: stretch; }

/* 일본어 페이지: 기본 Pretendard (가나 포함), 한자는 일본어 시스템 글꼴로 — 중국식 한자 모양이 섞이지 않게 */
:root:lang(ja) {
  --font-cute: 'Pretendard Variable', Pretendard, var(--font-ja-fallback), sans-serif;
  --font-body: var(--font-numeric), 'Pretendard Variable', Pretendard, var(--font-ja-fallback), sans-serif;
}
/* 20차 내 계정 순서: 소속(한 줄 길게) → 구글 · 메일 · 비밀번호 → 디스코드 · 탈퇴 */
.account-stack { display: grid; gap: 14px; margin-top: 16px; }
.account-stack > .account-cards { margin-top: 0; }
.account-stack > .acc-wide { margin: 0; max-width: none; }
.account-cards.acc-cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.affil-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; align-items: start; }
@media (max-width: 760px) { .affil-grid { grid-template-columns: 1fr !important; } }
.affil-grid .affil-field { display: grid; gap: 6px; }
.affil-grid > .span-2, .affil-grid > .field-hint, .affil-grid > .form-actions { grid-column: 1 / -1; }
/* 21차: 인기글도 공지처럼 한 줄 목록 */
.home-hot-meta { flex: none; white-space: nowrap; }
/* 한국어 메인 히어로 글씨 — 105차: 210 싸나이 Bold 로 그린 글자 모양 그림(hero-word.webp, 1584×320 = 4.95em × 1em)을 마스크로.
   색은 글자색(currentColor, 테마 · 우주 배경 그대로), 그림자는 바깥 span 의 drop-shadow (마스크 안쪽 filter 는 잘려서) */
.hero-word { display: inline-block; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .08)); line-height: 0; }
.hero-word-ink { display: inline-block; width: 4.95em; height: 1em; background: currentColor;
  -webkit-mask: url("/static/img/hero-word.webp") center / contain no-repeat; mask: url("/static/img/hero-word.webp") center / contain no-repeat; }
/* 23차: 포켓몬 정보 좋아요 · 코멘트 */
.like-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 2px; }
.like-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 2px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: 700 14px var(--font-body); cursor: pointer; transition: transform .25s var(--ease-bounce), border-color .2s, background .2s; }
.like-btn:hover { transform: translateY(-2px); border-color: #ff6b8a; }
.like-btn.is-liked { border-color: #ff6b8a; background: color-mix(in srgb, #ff6b8a 14%, var(--surface)); }
.like-btn b { font-variant-numeric: tabular-nums; }
.like-heart { font-size: 17px; line-height: 1; }
.like-btn.is-pop .like-heart { animation: like-pop .45s var(--ease-bounce); }
@keyframes like-pop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
.unite-like-count { font-size: var(--text-xs); font-weight: 700; color: var(--text-2); }
.unite-sort-hint { margin: 10px 0 0; }
.poke-comments .comment-meta a { color: inherit; }
.poke-comments-empty { margin: 0 0 12px; }
/* 26차 서클 카드: 뱃지 줄은 오른쪽 위, 관리자 · 소속은 줄을 나눠서 */
.circle-top-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; margin-bottom: -2px; }
.circle-top-badges .circle-badge { margin-left: 0; }
.circle-pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--surface-muted); color: var(--text-2); font-size: 12px; font-weight: 800; white-space: nowrap; }
.circle-pill.is-recruit { background: color-mix(in srgb, #22c55e 18%, var(--surface)); color: color-mix(in srgb, #15803d 80%, var(--text)); }
.circle-line-label { margin: 0; color: var(--text-3); font-size: 12px; font-weight: 800; }
.circle-leader-line { display: grid; gap: 4px; margin: 0; }
.circle-leader-line a { display: inline-flex; align-items: center; gap: 5px; justify-self: start; padding: 2px 10px 2px 2px; border-radius: 999px; background: color-mix(in srgb, var(--poke-yellow) 22%, var(--surface)); color: var(--text); font-size: 12px; font-weight: 800; }
.circle-leader-line a:hover { text-decoration: none; }
.circle-members { display: grid; gap: 4px; }
/* 27차: 로고 없는 서클은 아주 옅은 회색 몬스터볼만 · 오른쪽 위 뱃지 줄은 한 줄(길면 …) */
.circle-logo-ball { color: var(--border); opacity: .55; filter: grayscale(1); }
.circle-logo-ball circle, .circle-logo-ball path { fill: var(--surface); }
.circle-top-badges { flex-wrap: nowrap; min-width: 0; overflow: hidden; }
.circle-top-badges > * { flex: none; }
.circle-top-badges .circle-badge { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.circle-top-badges .circle-badge span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.circle-top-badges .circle-badge img, .circle-top-badges .circle-badge i { flex: none; }
/* 27차: 도구 › 지닌물건 */
.hi-calc { display: grid; gap: 14px; }
.hi-calc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.hi-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.hi-result-grid .value { font-size: 26px; }
.hi-won .value { font-size: 20px; }
.hi-milestones { display: flex; flex-wrap: wrap; gap: 6px; }
.hi-table-wrap summary { cursor: pointer; font-weight: 800; font-size: var(--text-sm); }
.hi-table { margin-top: 8px; }
.hi-table tr.is-milestone td { font-weight: 800; background: color-mix(in srgb, var(--poke-yellow) 14%, transparent); }
.hi-filter { margin-top: 20px; }
.hi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.hi-card { display: grid; align-content: start; gap: 10px; padding: 16px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.hi-card-head { display: flex; align-items: center; gap: 12px; }
.hi-card-head img { flex: none; width: 56px; height: 56px; border-radius: 14px; background: var(--surface-muted); }
.hi-card-head h3 { margin: 0; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 19px; }
.hi-effect { margin: 0; font-size: var(--text-sm); line-height: 1.6; color: var(--text-2); }
.hi-levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hi-levels li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px; font-size: 13px; line-height: 1.5; }
.hi-levels b { color: var(--text-3); font-size: 12px; }
.hi-bonus { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.hi-bonus-title { width: 100%; color: var(--text-3); font-size: 12px; font-weight: 800; }
.hi-bonus-chip { padding: 2px 8px; border-radius: 999px; background: var(--surface-muted); font-size: 12px; }
.hi-bonus-chip b { color: var(--text-3); }
.hi-tip { margin: 0; padding: 8px 10px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--poke-yellow) 12%, var(--surface)); font-size: 13px; line-height: 1.5; }
.hi-source { margin-top: 20px; }
.table-scroll { overflow-x: auto; }
/* 27차: 개인보관함 (카지노인 업무노트 '메모' 보기 참고 — 네모 메모 카드) */
.vault-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.vault-toolbar .view-switch { margin-left: 0; }
.vault-filter { margin-bottom: 14px; }
.vault-count { margin: 0 0 10px; }
.vault-memo, .vault-detail, .vault-gallery-card, .vault-list li { --memo: #ffe066; }
.is-yellow { --memo: #ffe066; } .is-blue { --memo: #74c0fc; } .is-green { --memo: #8ce99a; } .is-pink { --memo: #faa2c1; } .is-purple { --memo: #b197fc; } .is-gray { --memo: #ced4da; }
.vault-memo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.vault-memo { display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; aspect-ratio: 1 / 1; min-height: 220px; padding: 14px 16px; overflow: hidden;
  border: 1.5px solid color-mix(in srgb, var(--memo) 55%, var(--border)); border-top: 6px solid var(--memo); border-radius: 14px;
  background: color-mix(in srgb, var(--memo) 14%, var(--surface)); box-shadow: 0 2px 0 color-mix(in srgb, var(--memo) 35%, transparent);
  transition: transform .25s var(--ease-bounce); }
.vault-memo:hover { transform: translateY(-3px) rotate(-.4deg); }
.vault-memo.is-pinned { box-shadow: 0 0 0 3px color-mix(in srgb, var(--memo) 45%, transparent); }
.vault-memo header { display: flex; justify-content: space-between; gap: 8px; color: var(--text-3); font-size: 12px; font-weight: 800; }
.vault-memo h3 { margin: 0; font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.vault-memo h3 a { color: var(--text); }
.vault-memo-body { min-height: 0; overflow: hidden; font-size: 13px; line-height: 1.6; color: var(--text-2);
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.vault-memo-body img { max-height: 110px; border-radius: 8px; }
.vault-memo footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.vault-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.vault-tags a { padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--memo, var(--poke-yellow)) 30%, var(--surface)); color: var(--text-2); font-size: 11px; font-weight: 800; }
.vault-tags a:hover { text-decoration: none; }
.vault-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.vault-gallery-card { display: grid; gap: 6px; padding: 10px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); }
.vault-gallery-card:hover { text-decoration: none; border-color: var(--memo); }
.vault-gallery-thumb { display: grid; place-items: center; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; background: color-mix(in srgb, var(--memo) 22%, var(--surface)); font-size: 40px; }
.vault-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vault-gallery-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.vault-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vault-list a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text); }
.vault-list a:hover { text-decoration: none; border-color: var(--memo); }
.vault-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--memo); }
.vault-list-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.vault-list-main strong, .vault-list-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-list-side { display: flex; align-items: center; gap: 6px; flex: none; }
@media (max-width: 560px) { .vault-list-side .pill { display: none; } }
.vault-detail { border-top: 6px solid var(--memo); }
.vault-detail-head h1 { margin: 0 0 6px; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: clamp(24px, 4vw, 32px); overflow-wrap: anywhere; }
.vault-url { margin: 6px 0; overflow-wrap: anywhere; font-size: var(--text-sm); }
.vault-detail-body { margin-top: 16px; }
.vault-detail-actions { margin-top: 20px; flex-wrap: wrap; }
.vault-colors { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; }
.vault-colors legend { margin-bottom: 6px; font-size: var(--text-sm); font-weight: 800; }
.vault-color { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; border: 1.5px solid var(--border); cursor: pointer; font-size: 13px; }
.vault-color::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--memo); }
.vault-color input { position: absolute; opacity: 0; pointer-events: none; }
.vault-color:has(input:checked) { border-color: var(--text); font-weight: 800; }
.vault-color:has(input:focus-visible) { box-shadow: var(--focus-ring); }
/* 28차: 가입 가능(숨 쉬는 점) · 가입 마감 */
.circle-pill.is-recruit { gap: 5px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: pulse 1.6s ease-in-out infinite; }
.circle-pill.is-closed { background: var(--surface-muted); color: var(--text-3); }
/* 28차: 메인 공지 · 인기글이 3개보다 적으면 옅은 회색 빈 칸으로 채움 */
.home-placeholder span { display: block; height: 53px; border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--border) 70%, transparent); background: color-mix(in srgb, var(--surface-muted) 55%, transparent); }
.gem-bad-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--poke-red) 16%, var(--surface)); color: var(--poke-red); font-size: 11px; font-weight: 800; white-space: nowrap; }

/* 29차: 서클 카드 — 가입하기 · 게시판 버튼은 카드 맨 아래 오른쪽 */
.circle-card { display: flex; flex-direction: column; }
.circle-card > .circle-actions { margin-top: auto; justify-content: flex-end; }

/* 29차: 추천사이트 아이콘 (올린 그림 · 기본 아이콘 · 옅은 포켓몬볼) */
.site-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-card-head > strong { min-width: 0; overflow-wrap: anywhere; }
.site-icon { display: inline-grid; place-items: center; flex: none; width: var(--size, 44px); height: var(--size, 44px); border-radius: 12px; overflow: hidden; background: var(--bg); border: 1.5px solid var(--border); box-sizing: border-box; }
.site-icon img { width: 100%; height: 100%; object-fit: contain; }
.site-icon.is-ball { background: var(--surface); }
.site-icon.is-discord { background: #5865f2; border-color: #5865f2; }
.site-icon.is-chzzk { background: #000; border-color: #000; }
html[data-theme="dark"] .site-icon.is-chzzk { border-color: #444; }
.site-icon.is-x { background: #000; border-color: #000; }
html[data-theme="dark"] .site-icon.is-x { border-color: #444; }
.site-icon.is-youtube { background: #ff0033; border-color: #ff0033; }
.site-icon.is-cafe { background: #fff; }
.site-icon.is-kakao { background: #fee500; border-color: #f2d900; }
.site-icon.is-web { background: var(--poke-blue); border-color: var(--poke-blue); }
.site-icon-field { border: 0; padding: 0; margin: 0; }
.site-icon-field legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.site-icon-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.site-icon-choice { position: relative; display: grid; justify-items: center; gap: 4px; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-md); cursor: pointer; font-size: 12px; font-weight: 700; color: var(--text-2); }
.site-icon-choice input { position: absolute; opacity: 0; pointer-events: none; }
.site-icon-choice:has(input:checked) { border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 14%, transparent); color: var(--text); }
.site-icon-choice:has(input:focus-visible) { outline: 2px solid var(--poke-blue); outline-offset: 2px; }
.site-icon-upload { display: grid; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--text-2); }

/* 30차: 대회 임시저장 · 노출일 · 글로벌 밴 없음 */
.hidden-pill { background: var(--surface-2, var(--bg)); color: var(--text-2); border: 1.5px dashed var(--border); font-size: 11px; }
.hidden-note { padding: 10px 14px; border: 1.5px dashed var(--poke-yellow); border-radius: var(--radius-md); background: color-mix(in srgb, var(--poke-yellow) 10%, transparent); font-weight: 700; }
.ban-input { display: flex; align-items: center; gap: 10px; }
.ban-input > input { flex: 1; min-width: 0; }
.ban-input .check-line { flex: none; white-space: nowrap; }
.ban-none { color: var(--text-2); font-weight: 700; }

/* 30차: 아이디 블러 — 유나이트 결과 화면 자동 가리기 */
.blur-auto-note { margin: 0 0 10px; padding: 10px 14px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--poke-yellow) 16%, var(--surface)); border: 1.5px solid var(--poke-yellow); font-weight: 700; font-size: 14px; }
.blur-auto-line { display: block; margin-bottom: 12px; line-height: 1.5; }
.blur-auto-line small { display: block; }

/* 31차: 파일 고르기 버튼을 게시판 '📎 사진 첨부'와 같은 모양으로 */
.file-pick { position: relative; }
.file-pick:focus-within { outline: 2px solid var(--poke-blue); outline-offset: 2px; }
.file-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 4px; }
.file-pick-name { max-width: 220px; overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.file-pick-name.is-picked { color: var(--text); font-weight: 700; }
.avatar-actions .inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* 31차: 추천사이트 기본 아이콘 관리 */
.site-preset-help { margin: 0; padding: 14px 20px 0; }
.site-preset-list { display: grid; gap: 8px; margin: 0; padding: 14px 20px; list-style: none; }
.site-preset.is-hidden { opacity: .55; }
.site-preset-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.site-preset-form input[name=label] { flex: 1 1 160px; width: auto; min-width: 0; }
.site-preset-form input.site-preset-order { flex: none; width: 76px; }
.site-preset-new { margin: 0 20px 20px; padding: 12px 14px; border: 1.5px dashed var(--border-strong); border-radius: 14px; background: var(--surface-muted); }
.site-icon.is-photo { background: var(--surface); }

/* 전적검색: 자주 찾는 회원 (프로필 조회 순) */
.profile-views { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--surface-muted); color: var(--text-2); font-size: 11px; letter-spacing: 0; text-transform: none; }
.popular-members { margin-bottom: 24px; }
.popular-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.popular-list a { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: inherit; text-decoration: none; transition: transform .25s var(--ease-bounce), border-color .2s; }
.popular-list a:hover { transform: translateY(-3px); border-color: var(--poke-yellow); }
.popular-rank { flex: none; width: 22px; color: var(--poke-red); font-size: 18px; font-weight: 900; text-align: center; }
.popular-list li:nth-child(n+4) .popular-rank { color: var(--text-3); }
.popular-name { display: grid; min-width: 0; }
.popular-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popular-name small { color: var(--text-3); font-size: 12px; }
@media (max-width: 900px) { .popular-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .popular-list { grid-template-columns: 1fr; } }

/* 32차: 공개 프로필 좋아요 (포켓몬 정보 좋아요 버튼과 같은 모양) */
.profile-like { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; }
.profile-like .like-btn:disabled { cursor: default; opacity: .7; }

/* 33차: 블러 → 개인보관함에 저장 결과 줄 */
.blur-vault-note { margin: 10px 0 0; padding: 8px 12px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--poke-blue) 10%, var(--surface)); font-size: 13px; font-weight: 700; }
.blur-vault-note.is-error { background: color-mix(in srgb, var(--poke-red) 12%, var(--surface)); color: var(--poke-red); }

/* ---------- 33차: 상단 프로필 팝업 (카지노인처럼 사진 위 · 인사) ---------- */
.user-menu-panel { min-width: 260px; padding: 0 6px 6px; overflow: hidden; }
.user-menu-hero { display: grid; justify-items: center; gap: 12px; margin: 0 -6px 6px; padding: 26px 18px 18px; border-bottom: 1.5px solid var(--border); background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--poke-yellow) 22%, transparent), transparent 70%); text-align: center; }
.user-dot.is-big { width: 72px; height: 72px; font-size: 30px; box-shadow: 0 0 0 3px var(--bg); }
.user-menu-greeting { max-width: 230px; overflow-wrap: anywhere; color: var(--text); font-size: 15px; line-height: 1.45; }
.user-menu-role { padding: 2px 10px; border-radius: 999px; background: var(--surface-muted); color: var(--text-2); font-size: 11px; font-weight: 800; }
.user-menu-role.is-leader { background: color-mix(in srgb, var(--poke-yellow) 26%, var(--surface)); color: var(--text); }
.user-menu-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 240px; margin-top: -6px; }  /* 129차: 받은 뱃지도 인사 아래에 */
.user-menu-badges .user-badge { margin-left: 0; }
.user-menu-soon { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--surface-muted); color: var(--text-3); font-size: 10px; font-weight: 800; }
.user-menu-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font: 600 var(--text-sm) var(--font-body); cursor: pointer; }
.user-menu-switch:hover { background: var(--surface-muted); color: var(--text); }
.user-menu-switch input { appearance: none; position: relative; flex: none; width: 36px; height: 20px; margin: 0; border-radius: 999px; background: var(--border-strong); cursor: pointer; transition: background .2s; }
.user-menu-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease-bounce); }
.user-menu-switch input:checked { background: var(--poke-yellow); }
.user-menu-switch input:checked::after { transform: translateX(16px); }
.user-menu-switch input:focus-visible { outline: 2px solid var(--poke-blue); outline-offset: 2px; }
/* 165차: 받을 수 없는 회원 — 흐린 꺼진 스위치 + 마우스를 올리거나 눌러 초점이 가면 위에 안내 말풍선 */
.user-menu-switch.is-locked { position: relative; cursor: help; color: var(--text-3); }
.user-menu-switch.is-locked input { cursor: not-allowed; opacity: .45; }
.user-menu-tip {
  position: absolute; right: 8px; bottom: calc(100% + 4px); z-index: 5; width: max-content; max-width: 230px; padding: 7px 10px; border-radius: 10px;
  background: var(--text); color: var(--bg); font: 600 12px/1.45 var(--font-body); box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s ease, transform .2s var(--ease-bounce), visibility .15s;
  pointer-events: none;
}
.user-menu-switch.is-locked:hover .user-menu-tip, .user-menu-switch.is-locked:focus .user-menu-tip, .user-menu-switch.is-locked:focus-within .user-menu-tip { opacity: 1; visibility: visible; transform: none; }

/* ---------- 33차: 프로필 효과 — 돌아가는 무지개 고리 + 숨 쉬는 빛 (카지노인 profile-aura 를 옮김) ----------
   135차: 그라데이션 각도(@property)를 매 프레임 바꾸던 것 → 동그란 고리 자체를 돌린다(rotate). 보이는 모습은 같고,
   GPU 가 돌려서 화면이 매 프레임 다시 그려지지 않는다(배터리 · 입력 반응). */
.profile-fx { position: relative; display: inline-grid; flex: none; place-items: center; border-radius: 50%; isolation: isolate; vertical-align: middle;
  --profile-ring-width: 2.5px; --profile-glow-spread: 14px; --profile-ring-glow: 8px; --profile-ring-speed: 4s;
  --profile-ring-colors: #f94144, #f3722c, #f8961e, #f9844a, #f9c74f, #90be6d, #43aa8b, #4d908e, #277da1, #577590, #f94144; }
.profile-fx > * { position: relative; z-index: 2; }
.profile-fx.is-on::after { content: ""; position: absolute; inset: calc(var(--profile-ring-width) * -1); z-index: 3; border: var(--profile-ring-width) solid transparent; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--profile-ring-colors)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); mask-composite: exclude;
  animation: profile-ring-turn var(--profile-ring-speed) linear infinite; }
.profile-fx.is-on::before { content: ""; position: absolute; inset: calc(var(--profile-glow-spread) * -1); z-index: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .95) 20%, rgba(255, 255, 255, .42) 38%, rgba(255, 255, 255, .12) 56%, rgba(255, 255, 255, 0) 74%), conic-gradient(var(--profile-ring-colors));
  -webkit-mask: radial-gradient(closest-side, #000 28%, rgba(0, 0, 0, .78) 44%, rgba(0, 0, 0, .42) 60%, rgba(0, 0, 0, .18) 74%, rgba(0, 0, 0, .06) 86%, transparent 100%);
  mask: radial-gradient(closest-side, #000 28%, rgba(0, 0, 0, .78) 44%, rgba(0, 0, 0, .42) 60%, rgba(0, 0, 0, .18) 74%, rgba(0, 0, 0, .06) 86%, transparent 100%);
  filter: blur(var(--profile-ring-glow)) saturate(1.9) brightness(1.3); opacity: .9;
  animation: profile-ring-turn var(--profile-ring-speed) linear infinite, profile-glow-breathe 3.4s ease-in-out infinite; }
.profile-fx.is-big, .profile-fx.is-title { --profile-ring-width: 3.5px; --profile-glow-spread: 34px; --profile-ring-glow: 16px; }
.profile-fx.is-large { --profile-ring-width: 4px; --profile-glow-spread: 46px; --profile-ring-glow: 20px; }
.profile-fx.is-title { margin-right: 14px; }
.profile-fx.is-title .avatar.is-title { margin-right: 0; }
@keyframes profile-ring-turn { to { rotate: 1turn; } }
@keyframes profile-glow-breathe { 0%, 100% { scale: 1; opacity: .85; } 50% { scale: 1.09; opacity: 1; } }
.topbar { overflow-x: clip; overflow-clip-margin: 16px; }
/* 233차(사용자: 휴대폰에서 언어 · 프로필 메뉴가 뒤로 가서 안 보임): 휴대폰 상단바는 잘라내기(clip) · 흐림(backdrop-filter)을 빼고
   메뉴를 화면 고정(fixed)으로 — 아이폰 사파리는 흐림 · 잘라내기가 걸린 상단바 밖으로 나온 메뉴를 가리거나 아래 층에 그렸다.
   열린 동안은 상단바를 맨 위 층으로(site.js .has-open-menu), 긴 프로필 메뉴는 화면 안에서 스크롤 */
@media (max-width: 767.98px) {
  .topbar { overflow: visible; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
  .topbar.has-open-menu { z-index: 1150; }
  .topbar .user-menu-panel, .topbar .lang-switch-menu {
    position: fixed; top: var(--topbar-menu-top, 64px); right: max(10px, env(safe-area-inset-right)); z-index: 1150;
    max-height: calc(100dvh - var(--topbar-menu-top, 64px) - 12px); overflow-y: auto; overscroll-behavior: contain;
  }
}

/* ---------- 33차: 메신저 알림 (회원 설정 · 관리자) ---------- */
.msg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.msg-card { display: grid; align-content: start; gap: 10px; min-height: 100%; }  /* 94차: 두 카드 높이 같게 (grid stretch) */
.msg-grid > .msg-card { margin: 0; }  /* 98차: '.panel + .panel' 위 여백 16px 이 둘째 카드에만 붙어 어긋나던 것 */
.msg-h { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 18px; }
.msg-h3 { margin: 18px 0 8px; font-size: 15px; }
.msg-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; overflow: hidden; }
.msg-icon.is-telegram { border-radius: 50%; }
.msg-icon.is-discord { border-radius: 10px; background: #5865f2; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }
.msg-icon.is-kakao { border-radius: 10px; background: #fee500; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08); }
.msg-h-sub { margin-top: 2px; }  /* 94차: 텔레그램 · 카카오톡 한 카드 */
.msg-divider { width: 100%; margin: 4px 0; border: 0; border-top: 1.5px dashed var(--border); }
.msg-prefs-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }  /* 94차: 받을 주제 / 받는 곳 나란히 */
@media (max-width: 720px) { .msg-prefs-cols { grid-template-columns: 1fr; } }
.msg-kakao-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.btn.btn-kakao { background: #fee500; border-color: #fee500; color: #191919; }
.btn.btn-kakao:hover { background: #f5dc00; border-color: #f5dc00; color: #191919; }
.msg-kakao-copy { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.msg-template { white-space: pre-wrap; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--surface-muted); border: 1px solid var(--border); }
.msg-state { margin: 0; color: var(--text-2); font-weight: 700; }
.msg-state.is-on { color: var(--text); }
.msg-wait { color: var(--poke-blue); }
.msg-prefs { display: grid; gap: 10px; }
.msg-topic-list { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-topic { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); font-weight: 700; cursor: pointer; }
.msg-topic:has(input:checked) { border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 14%, var(--surface)); }
.msg-topic:has(input:disabled) { opacity: .5; cursor: not-allowed; }
/* 62차: 받을 주제 · 받는 곳 = 한 줄씩 토글 스위치 */
.msg-switch-list { display: grid; gap: 8px; max-width: 520px; }
.msg-switch { position: relative; display: flex; justify-content: space-between; gap: 12px; }
.msg-switch > span:first-child { min-width: 0; }
.msg-test { margin-top: 12px; }
.msg-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.msg-dot { display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 50%; background: var(--border-strong); vertical-align: 1px; }
.msg-dot.is-ok { background: #22c55e; }
.msg-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.msg-settings { display: grid; gap: 10px; }
.msg-account-list { display: grid; gap: 8px; }
.msg-account { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.msg-account.is-off { opacity: .6; }
.msg-account input:not([type=checkbox]) { flex: 1 1 140px; width: auto; min-width: 0; }
.msg-account select { flex: 0 0 auto; width: auto; }
.msg-handle { font-weight: 800; }
.msg-account-state { flex-basis: 100%; }
.msg-account-new { margin-top: 10px; border-style: dashed; background: var(--surface-muted); }
.msg-post-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.msg-post-list li { display: grid; gap: 6px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.msg-post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.msg-post-text { margin: 0; color: var(--text-2); white-space: pre-line; }
.msg-post-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-compose { display: grid; gap: 10px; }
.msg-compose textarea, .msg-compose select, .msg-compose input { width: 100%; box-sizing: border-box; }
.msg-original p { white-space: pre-line; color: var(--text-2); }
.msg-sent-list { display: grid; gap: 6px; margin: 0; padding-left: 18px; font-size: 13px; }
.msg-setup ol { display: grid; gap: 6px; margin: 0; padding-left: 20px; }
.msg-setup code { font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 720px) { .msg-grid { grid-template-columns: 1fr; } }

/* 34차: 내 계정 — 닉네임 · 아이디 바꾸기 */
.names-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
.names-form { display: grid; align-content: start; gap: 8px; }
.names-form input { width: 100%; box-sizing: border-box; }
.names-pending { margin: 0; font-weight: 700; }
@media (max-width: 720px) { .names-grid { grid-template-columns: 1fr; } }
.msg-diag-list { display: grid; gap: 6px; margin: 0; padding-left: 18px; font-size: 14px; }
.msg-diag-list code { font-size: 12px; overflow-wrap: anywhere; }
.circle-pill.is-mine-pill { background: color-mix(in srgb, #22c55e 16%, var(--surface)); color: var(--text); }

/* 35차: 메신저 알림 — 디스코드 ID 칸 · 찾는 법 */
.msg-discord-form { display: grid; gap: 8px; }
.msg-discord-form input:not([type="checkbox"]):not([type="radio"]) { width: 100%; box-sizing: border-box; }  /* 98차: 체크박스까지 100% 라 글자가 깨지던 것 */
.msg-guide { margin-top: 6px; padding: 10px 14px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-muted); }
.msg-guide summary { font-weight: 800; cursor: pointer; }
.msg-guide-steps { display: grid; gap: 12px; margin: 10px 0; padding-left: 20px; }
.msg-guide-steps p { margin: 0 0 6px; }
.msg-guide-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 10px 0; }
.msg-guide-way { padding: 12px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--border); }
.msg-guide-way h3 { margin: 0 0 4px; font-size: 15px; }
.msg-guide-way .msg-guide-steps { margin: 6px 0 10px; gap: 4px; }
.msg-guide-way img { display: block; max-width: 100%; border: 1.5px solid var(--border); border-radius: 12px; }
/* 디스코드 화면 흉내 (캡처 대신, 색은 디스코드 다크 테마라 고정) */
.dc-mock { position: relative; border-radius: 14px; overflow: hidden; background: #232428; color: #dbdee1; font-size: 13px; }
.dc-mock-top { height: 46px; background: linear-gradient(120deg, #f7c548, #5865f2); display: flex; justify-content: flex-end; align-items: start; padding: 8px; }
.dc-mock-dots { display: grid; place-items: center; width: 30px; height: 26px; border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-weight: 900; outline: 2px solid #fff; animation: dc-blink 1.4s ease-in-out infinite; }
.dc-mock-profile { display: grid; padding: 0 12px 6px; margin-top: -18px; }
.dc-mock-avatar { width: 40px; height: 40px; border-radius: 50%; background: #dbdee1; border: 4px solid #232428; }
.dc-mock-profile b { color: #fff; font-size: 15px; }
.dc-mock-profile small { color: #949ba4; }
.dc-mock-menu { list-style: none; margin: 4px 10px 10px; padding: 4px; border-radius: 10px; background: #2b2d31; }
.dc-mock.is-mobile .dc-mock-menu { position: absolute; top: 40px; right: 10px; margin: 0; min-width: 62%; background: #313338; box-shadow: 0 8px 20px rgba(0, 0, 0, .45); border: 1px solid #3f4147; }
.dc-mock-menu li { padding: 7px 10px; border-radius: 6px; }
.dc-mock-menu li.is-pick { background: #5865f2; color: #fff; font-weight: 800; animation: dc-blink 1.4s ease-in-out infinite; }
@keyframes dc-blink { 50% { filter: brightness(1.25); } }
.msg-guide-steps img { display: block; max-width: 100%; border: 1.5px solid var(--border); border-radius: 12px; }

/* 39차: 페이지 이동 로딩 게이지 (카지노인 loading-progress.js) — 0.35초 넘게 걸릴 때만 맨 위 4px, 끝에 구르는 몬스터볼 */
.site-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 2100; height: 4px; opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
.site-progress.is-active { opacity: 1; }
.site-progress i { position: relative; display: block; width: 0; height: 100%; border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, var(--poke-yellow), #ffb000 60%, var(--poke-red));
  box-shadow: 0 0 10px color-mix(in srgb, var(--poke-yellow) 70%, transparent); transition: width 420ms cubic-bezier(.22, 1, .36, 1); }
.site-progress-ball { position: absolute; right: -7px; top: -1px; width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(var(--poke-red) 0 45%, #222 45% 55%, #fff 55%); border: 1.5px solid #222;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3); animation: progress-roll .6s linear infinite; }
.site-progress-ball::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px;
  border-radius: 50%; background: #fff; border: 1px solid #222; }
@keyframes progress-roll { to { transform: rotate(360deg); } }

/* 40차: 확인 창 (브라우저 기본 confirm 대신) — 알림 카드와 같은 모양 */
.ph-confirm { padding: 0; border: 0; background: transparent; max-width: min(420px, calc(100vw - 32px)); width: 100%; overflow: visible; }
.ph-confirm::backdrop { background: rgba(10, 12, 20, .38); backdrop-filter: blur(2px); }
.ph-confirm[open] .ph-confirm-card { animation: toast-in .32s var(--ease-bounce) both; }
.ph-confirm-card { --toast-color: var(--poke-blue); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; align-items: start;
  padding: 18px 18px 16px; border: 1.5px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 10px 20px -8px rgba(0, 0, 0, .18), 0 24px 44px -16px rgba(0, 0, 0, .22); }
.ph-confirm.is-danger .ph-confirm-card { --toast-color: var(--poke-red); }
.ph-confirm.is-warn .ph-confirm-card { --toast-color: #e0a800; }  /* 49차: 안내 창(phAlert) — 노란 느낌표, 글자 대비 위해 조금 진한 노랑 */
.ph-confirm-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ph-confirm-actions .btn { min-width: 76px; }
.ph-confirm-copy { grid-column: 1 / -1; width: 100%; margin-top: 8px; font: 13px/1.5 var(--font-body); resize: vertical; }
/* 42차: 박스끼리 딱 붙지 않게 — 페이지 본문에서 박스(패널 · KPI 줄 · 필터 · 표 · 카드)가 연달아 오면 16px 띄운다.
   :where 로 우선순위 0 → 이미 간격을 정해 둔 곳(.section 36px 등)은 그대로, 아무 간격이 없던 곳만 채워진다. */
:where(main) :where(.panel, .kpi-grid, .filter-panel, .table-wrap, .empty-state, .msg-grid, .notice-line, .btn-row, form.panel, .card-grid, .chip-row)
  + :where(.panel, .kpi-grid, .filter-panel, .table-wrap, .empty-state, .msg-grid, form.panel, .card-grid) { margin-top: 16px; }
/* 50차: 그리드 · 플렉스 안의 카드끼리는 gap 이 간격을 맡는다 — 위 규칙이 두 번째 카드부터 16px 밀어 첫 카드만 크기가 달라 보이던 것 막기 */
:where(main) :where(.team-entry-grid, .home-split, .build-grid, .gem, .tm, .ut-result-grid, .info-groups, .policy-sections, .card-grid, .account-cards, .account-stack, .ctool-doc-grid)
  > :where(.panel, .kpi-grid, .filter-panel, .table-wrap, .empty-state, .msg-grid, form.panel, .card-grid) { margin-top: 0; }
:where(.move-card) + :where(.move-card) { margin-top: 12px; }

/* 41 · 42차: 메인 '오늘의 포켓몬' 카드 높이 = '진행 중인 대회' 카드 한 장 높이 (대회 카드를 오늘의 포켓몬에 맞춰 늘림).
   대회가 없으면 빈 칸 안내도 같은 높이. 모바일은 오늘의 포켓몬을 가로 배치 · 작은 그림으로 대회 카드와 맞춘다 */
.home-pair.is-even { --home-card-h: 222px; align-items: start; }
.home-pair.is-even .live-tournament,
.home-pair.is-even .empty-state { min-height: var(--home-card-h); }
.home-pair.is-even .today-card { min-height: var(--home-card-h); display: flex; flex-direction: column; justify-content: center; }
.home-pair.is-even .today-body { margin-top: 0; }
@media (max-width: 640px) {
  .home-pair.is-even { --home-card-h: 184px; }
  .home-pair.is-even .today-body { flex-direction: row; text-align: left; gap: 16px; }
  .home-pair.is-even .today-info { justify-items: start; }
  .home-pair.is-even .today-sprite { width: 112px; height: 112px; }
  .home-pair.is-even .today-sprite img { width: 96px; height: 96px; }
  .home-pair.is-even .today-name { font-size: 24px; }
}

/* 48차: 이모티콘 */
img.emoticon { display: inline-block; width: 72px; height: 72px; object-fit: contain; vertical-align: bottom; margin: 2px 1px; border: 0; border-radius: 0; box-shadow: none; background: none; }
.board-markdown img.emoticon, .community-markdown img.emoticon { width: 96px; height: 96px; max-width: 96px; }
.emo-row { display: flex; gap: 6px; margin: 6px 0 2px; }
.emo-open[aria-expanded="true"] { border-color: var(--poke-yellow); }
.emo-panel { position: fixed; z-index: 1200; width: min(380px, calc(100vw - 16px)); max-height: min(420px, 70vh); display: flex; flex-direction: column;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 40px rgba(0, 0, 0, .22); overflow: hidden;
  animation: emo-pop .18s var(--ease-bounce, ease-out); }
.emo-panel.is-sheet { left: 8px !important; right: 8px; bottom: 8px; top: auto !important; width: auto; max-height: 60vh; }
@keyframes emo-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.emo-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; }
.emo-title { font-size: 14px; }
.emo-close { border: 0; background: none; color: var(--text-3); font-size: 16px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.emo-close:hover { background: var(--surface-muted); }
.emo-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; padding: 4px 10px 10px; min-height: 140px; align-content: start; }
.emo-cell { position: relative; }
.emo-pick { width: 100%; aspect-ratio: 1; border: 0; background: none; border-radius: 12px; padding: 4px; cursor: pointer; transition: transform .15s var(--ease-bounce, ease-out), background .15s; }
.emo-pick:hover, .emo-pick:focus-visible { background: var(--surface-muted); transform: scale(1.06); }
.emo-pick img { width: 100%; height: 100%; object-fit: contain; display: block; }
.emo-star { position: absolute; top: 0; right: 0; border: 0; background: var(--surface); color: var(--text-3); border-radius: 999px; width: 22px; height: 22px;
  font-size: 13px; line-height: 22px; padding: 0; cursor: pointer; opacity: 0; transition: opacity .15s; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.emo-cell:hover .emo-star, .emo-star:focus-visible, .emo-star.is-on { opacity: 1; }
.emo-star.is-on { color: #f5b400; }
@media (hover: none) { .emo-star { opacity: .85; } }
.emo-empty { grid-column: 1 / -1; margin: 28px 8px; text-align: center; color: var(--text-3); font-size: 13px; }
.emo-tabs { display: flex; gap: 2px; overflow-x: auto; padding: 6px 8px; border-top: 1px solid var(--border); background: var(--surface-muted); scrollbar-width: thin; }
.emo-tab { flex: 0 0 auto; width: 40px; height: 36px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-size: 18px; display: grid; place-items: center; position: relative; }
.emo-tab img { width: 28px; height: 28px; object-fit: contain; }
.emo-tab.is-active { background: var(--surface); box-shadow: inset 0 -3px 0 var(--poke-yellow); }
.emo-tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.md-attach .emo-editor-btn[aria-expanded="true"] { border-color: var(--poke-yellow); background: var(--surface-muted); }
/* 편집기 · 읽는 화면의 사진 매트(editor.css)를 이모티콘에는 안 씌운다 */
.sun-editor-editable img[src*="/img/emoticons/"],
html[data-theme] .community-markdown img.emoticon, html[data-theme] .board-markdown img.emoticon, html[data-theme] .tip-body img.emoticon {
  display: inline-block; width: 96px; height: 96px; max-width: 96px; max-height: 96px; object-fit: contain; vertical-align: bottom;
  margin: 2px; border: 0; border-radius: 0; background: none; box-shadow: none; }
html[data-theme] .sun-editor-editable img[src*="/img/emoticons/"] { border: 0; background: none; box-shadow: none; }
@media (max-width: 640px) { html[data-theme] .community-markdown img.emoticon, html[data-theme] .board-markdown img.emoticon { width: 80px; height: 80px; } }
@media (max-width: 640px) { img.emoticon { width: 60px; height: 60px; } .board-markdown img.emoticon, .community-markdown img.emoticon { width: 80px; height: 80px; } }

/* 49차: 알림 — 프로필 사진 위 빨간 점 · 팝업 목록 · 알림 화면 */
.user-menu summary { position: relative; }
.notif-dot { position: absolute; top: -4px; left: 22px; z-index: 2; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--poke-red, #ef4444); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg); animation: notif-pop .4s var(--ease-bounce, ease-out); }
@keyframes notif-pop { from { transform: scale(.4); } to { transform: scale(1); } }
.user-menu-panel { max-height: min(80vh, 640px); overflow-y: auto; }
.notif-box { margin: 4px 0 6px; padding: 8px 6px 6px; border-radius: 12px; background: var(--surface-muted); }
.notif-head { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 0 4px 6px; font-size: 13px; }
.notif-head b { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.user-menu-panel .notif-head a { display: inline; width: auto; margin-left: auto; padding: 0; font-size: 12px; font-weight: 700; color: var(--highlight); background: none; }
.notif-count { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--poke-red, #ef4444); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.notif-list a { display: flex; gap: 8px; align-items: flex-start; padding: 7px 6px; border-radius: 10px; color: var(--text); text-decoration: none; white-space: normal; }
.notif-list a:hover { background: var(--surface); }
.notif-list li.is-unread a { background: var(--surface); }
.notif-list li.is-unread .notif-text b::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--poke-red, #ef4444); vertical-align: 2px; }
.notif-icon { flex: 0 0 auto; font-size: 15px; line-height: 1.3; }
.notif-text { display: block; font-size: 12.5px; line-height: 1.45; font-weight: 500; overflow-wrap: anywhere; }
.notif-text em { font-style: normal; color: var(--text-2); }
.notif-text small { display: block; margin-top: 2px; color: var(--text-3); font-size: 11px; }
.notif-empty { margin: 4px; padding: 10px 4px; font-size: 12px; color: var(--text-3); white-space: normal; text-align: center; }  /* 58차: 가운데 */
.notif-list li.is-read a { opacity: .55; }  /* 58차: 확인한 알림은 흐리게 (30일 보관) */
.notif-list li.is-read a:hover { opacity: .85; }
.notif-list.is-page { padding: 8px; }
.notif-list.is-page a { padding: 12px 10px; align-items: center; }
.notif-list.is-page .notif-text { flex: 1; font-size: 14px; }
.notif-list.is-page .notif-icon { font-size: 20px; }

/* 50차: 댓글 좋아요 */
.comment-like { display: inline-block; margin: 4px 0 0; }
.comment-like-btn { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text-2); font: 700 12px var(--font-body); cursor: pointer; transition: transform .2s var(--ease-bounce), border-color .2s, background .2s; }
.comment-like-btn:hover:not(:disabled) { transform: translateY(-1px); border-color: #ff6b8a; }
.comment-like-btn.is-liked { border-color: #ff6b8a; background: color-mix(in srgb, #ff6b8a 12%, var(--surface)); color: var(--text); }
.comment-like-btn:disabled { cursor: default; opacity: .75; }
.comment-like-btn b { font-variant-numeric: tabular-nums; }
.comment-like-btn.is-pop .like-heart { display: inline-block; animation: like-pop .45s var(--ease-bounce); }

/* 51차: 프로필 팝업 · 알림 — 이모지 대신 미니멀 선 아이콘 (_icons.html) */
.ui-icon { flex: 0 0 auto; vertical-align: -3px; }
.user-menu-panel > a, .user-menu-panel form > button { display: flex; align-items: center; gap: 10px; }
.user-menu-panel > a > .ui-icon, .user-menu-panel form > button > .ui-icon, .user-menu-switch .ui-icon { color: var(--text-3); }
.user-menu-panel > a:hover > .ui-icon, .user-menu-panel form > button:hover > .ui-icon { color: var(--text); }
.user-menu-panel > a.admin-lock::before { order: 3; margin: 0 0 0 auto; }  /* 자물쇠는 오른쪽 끝 — 아이콘 줄이 맞게 */
.user-menu-switch > span { display: inline-flex; align-items: center; gap: 10px; }
.notif-head b .ui-icon { color: var(--text-2); }
.notif-icon { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-muted); color: var(--text-2); }
.notif-list li .notif-icon { background: var(--bg); }
.notif-icon.is-heart { color: #f0587a; }
.notif-icon.is-message, .notif-icon.is-pen { color: var(--highlight); }
.notif-list.is-page .notif-icon { width: 34px; height: 34px; }

/* 57차 디자인 전수검사: 패널(grid) 안의 긴 코드 블록 · 표가 패널을 화면 밖으로 밀어내지 않게 (grid 자식 min-width 기본값 auto 때문) */
.panel > *, .board-post > * { min-width: 0; }
.community-markdown, .board-markdown { min-width: 0; max-width: 100%; }
.community-markdown table, .board-markdown table { display: block; max-width: 100%; overflow-x: auto; }
/* 50차: 개인보관함 메모 자동 저장 상태 */
.vault-autosave { align-self: center; font-size: 12px; font-weight: 700; }
.vault-autosave.is-error { color: var(--poke-red); }
/* 51차: 개인보관함 메모 공유 */
.vault-share { display: grid; gap: 10px; margin-top: 16px; padding: 12px 14px; border: 1.5px dashed var(--border); border-radius: var(--radius-md); }
.vault-share.is-on { border-style: solid; border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 8%, var(--surface)); }
.vault-share-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; }
.vault-share-url { display: flex; flex-wrap: wrap; gap: 6px; }
.vault-share-url input { flex: 1 1 240px; min-width: 0; min-height: 34px; font-size: 13px; }
/* 51차: 서클관리도구 */
.ctool-new h2 { margin: 0 0 10px; font-size: 16px; }
.ctool-new-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ctool-new-row input[name="title"] { flex: 1 1 220px; min-width: 0; }
.ctool-kind-pick { display: flex; gap: 6px; margin: 0; padding: 0; border: 0; }
.ctool-kind-pick label { position: relative; cursor: pointer; }
.ctool-kind-pick input { position: absolute; opacity: 0; }
.ctool-kind-pick span { display: inline-block; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 800; }
.ctool-kind-pick input:checked + span { border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 22%, var(--surface)); }
.ctool-kind-pick input:focus-visible + span { outline: 2px solid var(--poke-blue); outline-offset: 2px; }
.ctool-doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.ctool-doc-card { display: grid; gap: 6px; color: var(--text); text-decoration: none; transition: transform .2s var(--ease-bounce), border-color .15s; }
.ctool-doc-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--poke-yellow); }
.ctool-doc-card strong { font-size: 17px; }
.ctool-doc-kind { font-size: 12px; font-weight: 800; color: var(--text-2); }
.ctool-doc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ctool-head { margin: 8px 0 16px; }
.ctool-head h1 { margin: 2px 0 4px; }
.ctool-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ctool-stats h3 { margin: 18px 0 8px; font-size: 14px; }
.ctool-stat-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 24px; }
.ctool-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ctool-bars li { display: grid; grid-template-columns: 84px minmax(0, 1fr) 36px; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.ctool-bars i { display: block; height: 10px; width: var(--w); min-width: 4px; border-radius: 999px; background: var(--poke-yellow); }
.ctool-bars b { text-align: right; }
.ctool-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; }
.ctool-month { display: grid; justify-items: center; gap: 2px; font-size: 11px; }
.ctool-month-bar { position: relative; display: flex; align-items: flex-start; justify-content: center; width: 100%; height: 90px; border-radius: 8px 8px 4px 4px;
  background: linear-gradient(to top, color-mix(in srgb, var(--poke-blue) 55%, transparent) var(--h), var(--surface-muted) var(--h)); }
.ctool-month-bar b { margin-top: 2px; font-size: 11px; }
.ctool-month-delta em { font-style: normal; font-weight: 800; margin: 0 1px; }
.ctool-month-delta .is-up { color: var(--poke-green, #2e9d5b); }
.ctool-month-delta .is-down { color: var(--poke-red); }
.ctool-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.ctool-search { flex: 1 1 180px; min-width: 0; min-height: 34px; }
.ctool-filter [data-grp-filter].is-active { border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 24%, var(--surface)); }
.ctool-save-status { font-size: 12px; font-weight: 700; }
.ctool-save-status.is-error { color: var(--poke-red); }
.ctool-match-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.ctool-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ctool-table th, .ctool-table td { padding: 6px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; white-space: nowrap; }
.ctool-table th { font-size: 12px; color: var(--text-2); }
.ctool-table tr.is-left td { opacity: .55; }
.ctool-table.is-edit input, .ctool-table.is-edit select { width: 100%; min-width: 64px; min-height: 30px; padding: 3px 6px; font-size: 13px; }
.ctool-table.is-edit input[name="ord"] { min-width: 52px; width: 56px; }
.ctool-table.is-edit input[name="nickname"] { min-width: 120px; }
.ctool-table.is-edit input[name="memo"] { min-width: 160px; }
/* 222차: 편집 표는 6칸 — 폭을 정해 줄을 맞춤 */
.ctool-table.is-edit td:has(> input[name="grp"]) { width: 110px; }
.ctool-table.is-edit td:has(> select[name="role"]) { width: 120px; }
.ctool-table.is-edit td:has(> select[name="lane"]) { width: 96px; }
.ctool-table.is-edit td:has(> select[name="position"]) { width: 116px; }
.ctool-table.is-edit td:has(> input[name="code"]) { width: 150px; }
.ctool-table.is-edit td.ctool-row-actions { width: 1%; white-space: nowrap; }
.ctool-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ctool-member-link, .ctool-link-btn { display: inline-block; margin-top: 2px; font-size: 11px; font-weight: 800; }
.ctool-role.is-lead { border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 25%, var(--surface)); }
.ctool-row-actions { display: flex; gap: 4px; }
.ctool-add-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; align-items: end; }
.ctool-add-form .form-actions { grid-column: 1 / -1; }
.ctool-add-form.is-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }  /* 222차: 한 명 넣기 = 3칸 × 2줄 */
@media (max-width: 640px) { .ctool-add-form.is-grid { grid-template-columns: 1fr; } }
details.ctool-settings > summary { list-style: none; cursor: pointer; }
details.ctool-settings > summary::-webkit-details-marker { display: none; }
details.ctool-settings > summary h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0; }
details.ctool-settings > summary h2::after { content: "▾"; margin-left: auto; font-size: 12px; font-weight: 700; color: var(--text-3); }
details.ctool-settings[open] > summary h2::after { content: "▴"; }
details.ctool-settings[open] > summary { margin-bottom: 14px; }
/* 218차: 명단 등록 신청 — 신청 칸(로봇 막는 숨은 칸) · 편집 권한의 받기/거절 목록 */
.ctool-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ctool-join { position: relative; }
.ctool-requests { border-color: color-mix(in srgb, var(--poke-yellow) 55%, var(--border)); }
.ctool-requests h2 small { margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--poke-yellow); color: var(--on-primary); font-size: 12px; }
.ctool-request-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.ctool-request-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ctool-request-who { min-width: 0; }
.ctool-request-who p { margin: 4px 0 0; }
.ctool-request-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ctool-request-form input { width: 120px; }
.ctool-pending { color: var(--poke-red, #ef4444); }
.ctool-import { margin-top: 14px; }
.ctool-import summary { cursor: pointer; font-weight: 800; }
.ctool-import textarea { width: 100%; font: 13px/1.5 var(--font-body); }
.ctool-link-cat { margin: 16px 0 8px; font-size: 15px; }
.ctool-link-cat:first-of-type { margin-top: 0; }
.ctool-link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ctool-link-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border-radius: var(--radius-md); background: var(--surface-muted); }
.ctool-link-list li input { flex: 1 1 140px; min-width: 0; min-height: 30px; font-size: 13px; }
.ctool-link-list li input[name="url"] { flex-basis: 240px; }
.ctool-link-name { font-weight: 800; }
.ctool-link-url { flex-basis: 100%; color: var(--text-3); font-size: 11px; overflow-wrap: anywhere; }
.ctool-settings h3 { margin: 22px 0 8px; font-size: 14px; }
.ctool-settings-form { display: grid; gap: 12px; }
.ctool-grants { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.ctool-grant-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ctool-grant-form .member-picker { flex: 1 1 240px; }
.ctool-share-url { margin-top: 10px; }
.ctool-danger { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--border); }
@media (max-width: 640px) {
  .ctool-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ctool-months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ctool-bars li { grid-template-columns: 70px minmax(0, 1fr) 30px; }
}
.ctool-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ctool-add-form .field { display: grid; gap: 4px; min-width: 0; margin: 0; }
.ctool-add-form .field > span { font-size: 12px; font-weight: 800; color: var(--text-2); }
.ctool-add-form .field input, .ctool-add-form .field select { width: 100%; min-width: 0; }
.ctool-settings-form .field { display: grid; gap: 4px; }
/* 52차: 서클관리도구 보기 화면(기본) · 수정 버튼 · 공유 링크 · 메모 */
.ctool-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
.ctool-head-actions { display: flex; gap: 8px; }
.ctool-share { margin: 0 0 16px; }
.ctool-memo-title { margin: 0 0 8px; font-size: 15px; }
.ctool-memo { border-left: 4px solid var(--poke-yellow); }
.ctool-memo.is-main { border-left-width: 1px; }
.ctool-memo-edit h2 { margin: 0 0 10px; font-size: 16px; }
.ctool-table.is-view th, .ctool-table.is-view td { padding: 9px 10px; }
.ctool-table.is-view tbody tr:hover td { background: var(--surface-muted); }
.ctool-table.is-view .is-num { width: 1%; text-align: right; }
.ctool-table.is-view .ctool-grp { color: var(--text-2); font-weight: 700; }
.ctool-table.is-view .ctool-nick b { font-size: 14px; }
.ctool-table.is-view code { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--surface-muted); }
.ctool-table.is-view .ctool-memo-cell { white-space: normal; min-width: 160px; color: var(--text-2); }
.ctool-no-result { padding: 16px 4px; text-align: center; }
.ctool-link-list.is-view { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ctool-link-list.is-view li { display: block; padding: 0; background: none; }
.ctool-link-card { position: relative; display: grid; gap: 3px; height: 100%; padding: 12px 34px 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text); text-decoration: none; transition: transform .2s var(--ease-bounce), border-color .15s; }
a.ctool-link-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--poke-yellow); }
.ctool-link-card.is-dead { border-style: dashed; color: var(--text-2); }
.ctool-link-card .ctool-link-name { font-weight: 800; overflow-wrap: anywhere; }
.ctool-link-memo { color: var(--text-2); font-size: 12px; }
.ctool-link-card .ctool-link-url { flex-basis: auto; }
.ctool-link-go { position: absolute; top: 12px; right: 12px; color: var(--text-3); font-weight: 800; }
.ctool-link-group[hidden] { display: none; }
.ctool-link-group + .ctool-link-group { margin-top: 18px; }
/* 52차: 토글 스위치(ut-toggle)를 사이트 공용으로 — 도구 CSS 가 없는 보관함 · 서클관리도구에서도 보이게 */
.ut-toggle { position: relative; display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text-2); font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.ut-toggle .switch { flex-basis: 38px; width: 38px; height: 22px; }
.ut-toggle .switch::after { width: 16px; height: 16px; }
.ut-toggle .switch-input:checked + .switch::after { transform: translateX(16px); }
.ut-toggle:has(.switch-input:checked) { color: var(--text); }
.ctool-links .ctool-link-cat { margin: 0 0 8px; font-size: 15px; color: var(--text-2); }
/* 53차: 서클 페이지 · 공유 화면(사이트 메뉴 없이 Powered by 만) */
.ctool-standalone main { padding-top: 28px; }
.ctool-powered { margin: 40px auto 28px; text-align: center; font-size: 12px; }
.ctool-powered a { color: var(--text-3); text-decoration: none; letter-spacing: .02em; }
.ctool-powered a:hover { color: var(--text); }
.ctool-powered b { font-weight: 800; }
.ctool-hub-back a { font-weight: 800; }
.ctool-page-grid { margin-top: 16px; }
.ctool-pick-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.ctool-pick-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: var(--radius-md); background: var(--surface-muted); }
.ctool-pick-list input[type="number"] { width: 64px; min-height: 30px; }
.ctool-page-pick h2 { margin: 0 0 6px; font-size: 16px; }
/* 54차: 서클관리도구 목록 맨 위 '내 서클 페이지' */
.ctool-page-panel { display: grid; gap: 10px; border-style: dashed; }
.ctool-page-panel.is-on { border-style: solid; border-color: var(--poke-yellow); }
.ctool-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ctool-page-head h2 { margin: 0; font-size: 17px; }
.ctool-page-head h2 small { margin-left: 6px; font-weight: 700; }
.ctool-page-panel > p { margin: 0; }
.ctool-page-shared h3 { margin: 4px 0 6px; font-size: 13px; }
.ctool-shared-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ctool-shared-list a { display: inline-block; padding: 6px 12px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13px; text-decoration: none; }
.ctool-shared-list a:hover { border-color: var(--poke-yellow); text-decoration: none; }
.ctool-page-edit summary { cursor: pointer; font-weight: 800; font-size: 13px; }
.ctool-page-edit form { margin-top: 10px; }
.ctool-page-edit textarea { width: 100%; }
/* 55차: 서클관리도구 '✏️ 수정' · '👀 보기로' 버튼은 늘 보이게 (오른쪽 아래, 맨 위로 버튼 위) */
/* 82차: 다크/라이트 버튼(.theme-toggle, 오른쪽 아래 높이 42px) 바로 왼쪽에 나란히 */
.ctool-fab { position: fixed; right: 128px; bottom: 18px; z-index: 50; }
.ctool-fab .btn { min-height: 42px; }
@media (max-width: 640px) { body:has(.sticky-actions) .ctool-fab { bottom: 76px; } }
.ctool-hub-back a { display: inline-flex; align-items: center; gap: 6px; }
.ctool-hub-logo { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; overflow: hidden; font-size: 17px; line-height: 1; }
.ctool-hub-logo img { width: 100%; height: 100%; object-fit: cover; }
.cpage-logo-row { display: flex; align-items: center; gap: 12px; }
.cpage-logo-preview { flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); font-size: 26px; }
.cpage-logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.cpage-logo-upload { display: grid; gap: 6px; font-size: 12px; color: var(--text-3); }
.ctool-fab .btn { box-shadow: 0 6px 18px rgb(0 0 0 / .18); border-radius: 999px; padding-inline: 18px; }
/* 222차: 수정 · 보기로 버튼은 머리 오른쪽 (다른 게시판 '글쓰기'처럼) */
.ctool-edit-toggle { margin-left: auto; }
/* 222차: 휴대폰에서 설정 칸이 판 밖으로 튀어나가던 것 — 긴 스위치 글 · 칸 · 표가 판 폭을 넘지 않게 */
.ctool-settings, .ctool-add, .ctool-roster, .csite-set { min-width: 0; max-width: 100%; box-sizing: border-box; }
.ctool-settings-form, .ctool-settings-form > *, .ctool-settings .field, .ctool-settings fieldset { min-width: 0; max-width: 100%; box-sizing: border-box; }
.ctool-settings-form input:not([type="radio"]):not([type="checkbox"]), .ctool-settings-form textarea, .ctool-settings-form select { width: 100%; max-width: 100%; box-sizing: border-box; }
.ctool-settings .check-line { display: flex; align-items: flex-start; gap: 8px; text-align: left; line-height: 1.45; }
.ctool-settings .check-line input { flex: none; width: auto; margin-top: 3px; }
.ctool-settings .ut-toggle, .ctool-roster .ut-toggle { white-space: normal; align-items: flex-start; line-height: 1.45; }
.ctool-settings .ut-toggle .switch { flex: none; }
.ctool-grant-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ctool-grant-form > * { min-width: 0; max-width: 100%; }
@media (max-width: 640px) {
  .ctool-grant-form > .member-picker, .ctool-grant-form > div { flex: 1 1 100%; }
  .ctool-settings .check-line { white-space: normal; }
  .ctool-head-actions .btn { min-height: 38px; }
}
/* 60차: 도구 › 메달 시뮬레이터 (em-) */
.em-layout { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
:where(main) :where(.em-layout) > :where(.panel) { margin-top: 0; }
.em-board { position: sticky; top: 12px; display: grid; gap: 12px; }
.em-board-head { display: flex; align-items: center; gap: 8px; }
.em-title { flex: 1; min-width: 0; min-height: 38px; font-weight: 800; }
.em-count { font-weight: 800; white-space: nowrap; }
.em-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.em-slot { aspect-ratio: 3 / 4; border: 1.5px dashed var(--border); border-radius: 14px; display: grid; place-items: center; background: var(--surface); }
.em-slot.is-filled { border-style: solid; }
.em-slot > button { all: unset; box-sizing: border-box; display: grid; justify-items: center; align-content: center; gap: 2px; width: 100%; height: 100%; padding: 4px; cursor: pointer; border-radius: 14px; }
.em-slot > button:hover { background: color-mix(in srgb, var(--poke-red) 10%, transparent); }
.em-slot > button:focus-visible { outline: 2px solid var(--poke-blue); }
.em-view .em-slot { display: grid; justify-items: center; align-content: center; gap: 2px; padding: 4px; }
.em-slot-empty { color: var(--text-3); font-weight: 800; font-size: 13px; }
.em-slot-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; }
.em-medal { position: relative; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--g, #e3b505);
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--g, #e3b505) 18%, var(--surface)), var(--surface)); }
.em-medal img { width: 44px; height: 44px; image-rendering: pixelated; }
.em-medal b { position: absolute; right: -4px; bottom: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--g, #e3b505); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.em-medal.grade-A { --g: #e3b505; }
.em-medal.grade-B { --g: #9aa3ad; }
.em-medal.grade-C { --g: #b87333; }
.em-dots { display: inline-flex; gap: 3px; }
.em-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgb(0 0 0 / .12); }
.em-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.em-save-note { margin: 0; font-size: 12px; min-height: 1em; }
.em-sub { margin: 4px 0 0; font-size: 14px; }
.em-totals, .em-sets { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.em-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.em-totals li, .em-sets li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.em-totals .is-up b { color: var(--poke-green, #2e9d5b); }
.em-totals .is-down b { color: var(--poke-red); }
.em-totals .is-zero b { color: var(--text-3); }
.em-sets li { justify-content: flex-start; }
.em-sets li i { flex: 0 0 12px; height: 12px; border-radius: 50%; background: var(--c); }
.em-sets li span { flex: 1; }
.em-sets li b { font-size: 12px; color: var(--text-3); text-align: right; }
.em-sets li.is-on b { color: var(--text); }
.em-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.em-search { flex: 1 1 180px; min-width: 0; min-height: 36px; }
.em-grades { display: flex; gap: 4px; }
.em-grades .is-active, .em-color-chip.is-active { border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 24%, var(--surface)); }
.em-colors { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.em-color-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 800; cursor: pointer; }
.em-color-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.em-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; max-height: 70vh; overflow-y: auto; }
.em-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px 6px 6px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; transition: transform .15s var(--ease-bounce), border-color .15s; }
.em-item:hover { transform: translateY(-1px); border-color: var(--poke-yellow); }
.em-item.is-used { opacity: .55; }
.em-item.is-on { opacity: 1; border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 14%, var(--surface)); }
.em-item .em-medal { flex: 0 0 auto; width: 44px; height: 44px; }
.em-item .em-medal img { width: 36px; height: 36px; }
.em-item-text { flex: 1; min-width: 0; display: grid; }
.em-item-text b { font-size: 13px; }
.em-item-text small { font-size: 11px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-mine { margin-top: 16px; }
.em-mine h2 { margin: 0 0 10px; font-size: 16px; }
.em-mine-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.em-mine-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--radius-md); background: var(--surface-muted); }
.em-credit { margin-top: 14px; font-size: 12px; text-align: center; }
.em-share { margin-top: 4px; }
@media (max-width: 860px) {
  .em-layout { grid-template-columns: 1fr; }
  .em-board { position: static; }
  .em-list { max-height: none; }
}
.em-slot { aspect-ratio: auto; min-height: 96px; }
.em-view .em-slot .em-medal img { width: 44px; height: 44px; }
/* 61차: 서브탭 오른쪽 위 작은 표시 (서클관리도구 BETA) */
.nav-badge { position: relative; top: -.7em; margin-left: 2px; padding: 1px 4px; border-radius: 6px; background: var(--poke-yellow); color: var(--on-primary); font: 800 8px/1.2 var(--font-body); letter-spacing: .06em; vertical-align: baseline; }
.nav-badge.is-hot { background: #ef4444; color: #fff; }  /* 190차: HOT (티어 메이커 · 종합 시뮬레이터 · 아이디 블러 · 일정) */
/* 61차: 포켓몬 레벨별 능력치 · 비교 (us-) */
.us { display: grid; gap: 14px; }
.us-level { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.us-level label { font-size: 15px; }
.us-level output { display: inline-block; min-width: 2ch; font: 800 22px/1 var(--font-num, inherit); color: var(--text); }
.us-level input[type="range"] { flex: 1 1 200px; accent-color: var(--poke-yellow); }
.us-quick { display: flex; gap: 4px; }
.us-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.us-legend:empty { display: none; }
.us-key { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; border: 2px solid var(--c); font-size: 13px; }
.us-key img { width: 28px; height: 28px; object-fit: contain; }
.us-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.us-rows li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: center; }
.us-name { font-size: 13px; font-weight: 800; color: var(--text-2); }
.us-bars { display: grid; gap: 3px; }
.us-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; }
.us-bar i { display: block; height: 12px; width: var(--w); min-width: 3px; border-radius: 999px; background: var(--c); transition: width .25s var(--ease-bounce); }
.us-bar b { font-size: 13px; text-align: right; min-width: 56px; }
.us-bar.is-best b::after { content: " ▲"; color: var(--poke-green, #2e9d5b); font-size: 10px; }
.us-grow { grid-column: 1 / -1; color: var(--poke-green, #2e9d5b); font-size: 11px; font-weight: 700; }
.us-compare-form select { max-width: 280px; }
.us-table summary { cursor: pointer; font-weight: 800; }
.us-table table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.us-table th, .us-table td { padding: 5px 6px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.us-table thead th { color: var(--text-2); }
.us-table tr.is-on { background: color-mix(in srgb, var(--poke-yellow) 18%, transparent); }
.us-pick-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.us-pick-form .field { display: grid; gap: 4px; margin: 0; }
.us-pick-form .field span { font-size: 12px; font-weight: 800; color: var(--text-2); }
:where(main) :where(.us-pick) + :where(.us-panel) { margin-top: 16px; }
@media (max-width: 640px) { .us-pick-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .us-rows li { grid-template-columns: 70px minmax(0, 1fr); } }
/* 61차: 메달 그림 = 게임 메달 그림 (등급 테두리가 그림에 들어 있음) · 색은 세트 아이콘 */
.em-medal, .em-item .em-medal { width: 52px; height: 52px; border: 0; border-radius: 0; background: none; }
.em-medal img, .em-item .em-medal img, .em-view .em-slot .em-medal img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.em-item .em-medal { width: 46px; height: 46px; }
.em-dots { align-items: center; }
.em-dots img { width: 16px; height: 16px; }
.em-sets li img { flex: 0 0 18px; }
.em-color-chip img { width: 18px; height: 18px; }
/* 61차: 지닌물건 강화 레벨 슬라이더 · 레벨별 부가 능력치 */
.hi-filter { align-items: end; }
.hi-level-field { flex: 2 1 360px; }
.hi-level-field output { font: 800 18px/1 var(--font-num, inherit); margin-left: 4px; }
.hi-level-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.hi-level-row input[type="range"] { flex: 1 1 140px; accent-color: var(--poke-yellow); }
.hi-levels li.is-on { background: color-mix(in srgb, var(--poke-yellow) 22%, transparent); border-radius: 8px; }
.hi-live { display: grid; gap: 4px; padding: 8px 10px; border-radius: 12px; background: var(--surface-muted); }
.hi-live .hi-bonus-title b { color: var(--text); }
.hi-live ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hi-live li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.hi-live li b { color: var(--poke-green, #2e9d5b); }
/* 61차: 메달 세트 커뮤니티 · 인기 카드 */
.em-community-banner { margin-bottom: 16px; }
.em-banner-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.em-h { margin: 0 0 10px; font-size: 16px; }
.em-banner-head .em-h { margin: 0; }
.em-card-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.em-card { position: relative; display: grid; gap: 6px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text); text-decoration: none; transition: transform .2s var(--ease-bounce), border-color .15s; }
.em-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--poke-yellow); }
.em-card-medals { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 2px; }
.em-card-medals img { width: 100%; height: auto; }
.em-card small { color: var(--text-2); font-size: 12px; }
.em-rank { position: absolute; top: -8px; left: -8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--poke-yellow); color: var(--on-primary); font: 800 12px/24px var(--font-body); text-align: center; }
.em-like-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 6px; }
.em-public { margin-top: -4px; }
.em-community .panel + .panel { margin-top: 16px; }
.em-community-actions { margin-bottom: 14px; }
:where(main) :where(.em-community-banner) + :where(.em) { margin-top: 0; }
/* 62차: 티어 메이커 인기 티어표 머리줄 (메달 시뮬레이터와 같은 모양) */
.ut-popular-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ut-popular-head .ut-h3 { margin: 0; }
.ut-popular-head.is-slim { justify-content: flex-end; margin-bottom: 12px; }
/* 62차: 능력치 박스 다음 장인글 — 장인글의 -8px(소개 바로 밑에 붙이던 것) 때문에 겹치던 것 */
.us-panel + .guide-panel { margin-top: 24px; }
/* 62차: 능력치 비교 — 카드가 오른쪽으로 붙음 · 카드마다 레벨 */
.usc-grid { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.usc-grid[data-count="1"] { --n: 1; } .usc-grid[data-count="2"] { --n: 2; } .usc-grid[data-count="3"] { --n: 3; } .usc-grid[data-count="4"] { --n: 4; }
:where(main) :where(.usc-grid) > :where(.panel) { margin-top: 0; }
.usc-card { display: grid; align-content: start; gap: 10px; border-top: 4px solid var(--c, var(--border)); min-width: 0; }
.usc-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.usc-head img { width: 48px; height: 48px; object-fit: contain; }
.usc-head select { min-width: 0; font-weight: 800; }
.usc-remove { width: 28px; height: 28px; border: 1.5px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text-2); cursor: pointer; }
.usc-remove:hover { border-color: var(--poke-red); color: var(--poke-red); }
.usc-level { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.usc-level b { white-space: nowrap; font-size: 14px; }
.usc-level output { font: 800 18px/1 var(--font-num, inherit); }
.usc-level input[type="range"] { width: 100%; accent-color: var(--poke-yellow); }
.usc-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.usc-stats li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; font-size: 13px; }
.usc-stats li span { color: var(--text-2); font-weight: 700; }
.usc-stats li b { text-align: right; }
.usc-stats li i { grid-column: 1 / -1; display: block; height: 7px; width: var(--w); min-width: 3px; border-radius: 999px; background: var(--c, var(--poke-yellow)); transition: width .25s var(--ease-bounce); }
.usc-stats li.is-best b { color: var(--poke-green, #2e9d5b); }
.usc-stats li.is-best b::after { content: " ▲"; font-size: 10px; }
.usc-card.is-add { place-items: center; border-style: dashed; border-top-width: 1.5px; min-height: 220px; }
.usc-card.is-add label { display: grid; justify-items: center; gap: 8px; color: var(--text-2); font-weight: 800; }
.usc-plus { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-muted); font-size: 28px; }
@media (max-width: 760px) { .usc-grid { grid-template-columns: repeat(var(--n, 2), minmax(200px, 78vw)); } }
.usc-head .vega-select, .usc-head select, .usc-head .vega-select-trigger { width: 100%; min-width: 0; }
.usc-card.is-add .vega-select { min-width: 160px; }
@media (max-width: 760px) {
  .usc-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80vw; scroll-snap-type: x mandatory; }
  .usc-card { scroll-snap-align: start; }
}
/* 63차: 지닌물건 시뮬레이터 (bs-) — 메달 시뮬레이터(em-) 뼈대를 같이 씀 */
.bs .em-layout { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); }
.bs-right { display: grid; gap: 16px; align-content: start; }
:where(main) :where(.bs-right) > :where(.panel) { margin-top: 0; }
.bs-pokemon { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
.bs-pokemon img { width: 64px; height: 64px; object-fit: contain; }
.bs-pokemon .vega-select, .bs-pokemon select { width: 100%; }
.bs-poke-name { font-size: 18px; }
.bs-level { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.bs-section { display: grid; gap: 8px; margin: 0; }
.bs-move-slot { display: grid; gap: 4px; }
.bs-move-label { font-size: 12px; font-weight: 800; color: var(--text-2); }
.bs-move-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bs-move { display: grid; gap: 2px; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.bs-move small { color: var(--text-3); font-size: 11px; }
.bs-move.is-on { border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 22%, var(--surface)); }
.bs-view .bs-move { cursor: default; opacity: .55; }
.bs-view .bs-move.is-on { opacity: 1; }
.bs-move-desc { margin: 0; font-size: 12px; color: var(--text-2); line-height: 1.5; }
.bs-unite { margin: 0; font-size: 12px; }
.bs-recs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bs-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bs-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 6px 8px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); }
.bs-view .bs-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
.bs-view .bs-item:has(.bs-stack-pill) { grid-template-columns: 44px minmax(0, 1fr) auto auto; }  /* 61차: 스택 알약이 그림 칸으로 밀려 세로로 늘어지던 것 */
.bs-item .pill { white-space: nowrap; }
.bs-item.is-empty { grid-template-columns: 44px 1fr; border-style: dashed; min-height: 58px; }
.bs-item-empty { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-muted); color: var(--text-3); font-weight: 800; }
.bs-item img { width: 44px; height: 44px; object-fit: contain; }
.bs-item-text { display: grid; min-width: 0; }
.bs-item-text b { font-size: 13px; }
.bs-item-text small { font-size: 11px; color: var(--poke-green, #2e9d5b); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.bs-view .bs-item-text small { color: var(--text-2); font-weight: 400; white-space: normal; }
.bs-item select { min-height: 32px; font-size: 12px; }
.bs-battle select { width: 100%; }
.bs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bs-table th, .bs-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.bs-table th:first-child, .bs-table tbody th { text-align: left; color: var(--text-2); }
.bs-table thead th { font-size: 12px; color: var(--text-3); }
.bs-table tr.is-up .bs-plus { color: var(--poke-green, #2e9d5b); font-weight: 800; }
.bs-extra { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.bs-extra li { display: flex; justify-content: space-between; font-size: 13px; }
.bs-extra b { color: var(--poke-green, #2e9d5b); }
.bs-catalog { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.bs-cat-item { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 8px 4px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: 12px; transition: transform .15s var(--ease-bounce), border-color .15s; }
.bs-cat-item:hover { transform: translateY(-1px); border-color: var(--poke-yellow); }
.bs-cat-item.is-on { border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 20%, var(--surface)); }
.bs-cat-item img { width: 40px; height: 40px; object-fit: contain; }
.bs-card-row { display: flex; align-items: center; gap: 6px; }
.bs-card-poke { width: 40px; height: 40px; object-fit: contain; }
.bs-card-item { position: relative; }
.bs-card-item img { width: 32px; height: 32px; object-fit: contain; }
.bs-card-item small { position: absolute; right: -4px; bottom: -4px; padding: 0 3px; border-radius: 6px; background: var(--poke-yellow); color: var(--on-primary); font-size: 9px; font-weight: 800; }
.bs-filter { align-items: center; }
.bs-filter .vega-select { min-width: 180px; }
@media (max-width: 860px) { .bs .em-layout { grid-template-columns: 1fr; } }
.hi-sim-link { margin: 0 0 16px; }
.hi-sim-link .btn { max-width: 100%; white-space: normal; text-align: center; height: auto; line-height: 1.4; padding-block: 10px; }  /* 66차 점검: 모바일 가로 넘침 */
/* 55차(2): 시뮬레이터 › 종합 시뮬 (cs-) — 지닌물건(bs-) · 메달(em-) 편집기를 한 화면에 */
.cs-final { margin-bottom: 20px; border: 2px solid color-mix(in srgb, var(--poke-yellow) 60%, var(--border)); }
.cs-final-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; }
.cs-final-left { display: grid; gap: 10px; align-content: start; }
.cs-who { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 10px; }
.cs-who img { width: 56px; height: 56px; object-fit: contain; }
.cs-who small { display: block; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cs-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 4px; border-radius: 999px; background: var(--surface-muted); font-size: 12px; }
.cs-chip img { width: 24px; height: 24px; object-fit: contain; }
.cs-load { display: grid; gap: 6px; }
.cs-load .vega-select, .cs-load select { width: 100%; }
.cs-sets { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.cs-sets li { display: flex; align-items: center; gap: 6px; }
.cs-step { margin: 26px 0 12px; font-size: 18px; }
.cs-part + .cs-part { margin-top: 8px; }
.cs-medals { margin-top: 4px; }
@media (max-width: 860px) { .cs-final-grid { grid-template-columns: 1fr; } }
.bs-table .bs-plus.is-down, .bs-table tr.is-up .bs-plus.is-down { color: var(--poke-red); }

/* 64차: 기술 그림 (unite-db.com 그림, scripts/fetch_move_images.py) */
.move-card header.has-icon { grid-template-columns: 56px minmax(0, 1fr); column-gap: 12px; align-items: center; }
.move-card header.has-icon > :not(.move-icon) { grid-column: 2; }
.move-icon { grid-row: 1 / span 3; width: 56px; height: 56px; border-radius: 50%; background: #111; }
.move-card.is-unite .move-icon { width: 64px; height: 64px; box-shadow: 0 0 0 3px color-mix(in srgb, #db2777 35%, transparent); }
.move-card.is-unite header.has-icon { grid-template-columns: 64px minmax(0, 1fr); }
.bs-move:has(.bs-move-icon) { grid-template-columns: 32px minmax(0, 1fr); column-gap: 8px; align-items: center; }
.bs-move:has(.bs-move-icon) > :not(.bs-move-icon) { grid-column: 2; }
.bs-move-icon { grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 50%; background: #111; }
.build-chip.is-move:has(img) { display: inline-flex; align-items: center; gap: 4px; padding-left: 3px; }
.build-chip.is-move img { width: 20px; height: 20px; border-radius: 50%; background: #111; }

/* 64차: UniteAPI 코드로 자동 가져오기 */
.uniteapi-fetch { display: grid; gap: 6px; justify-items: start; margin: 12px 0 4px; padding: 14px 16px; border: 1.5px dashed color-mix(in srgb, var(--poke-yellow) 60%, var(--border)); border-radius: 16px; background: color-mix(in srgb, var(--poke-yellow) 8%, var(--surface)); }
.uniteapi-fetch .field-hint { margin: 0; }
.uniteapi-or { margin: 14px 0 6px; font-weight: 800; }

/* 56차: 배틀아이템 그림 버튼 · 지닌물건 스택 */
.bs-battle-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.bs-battle-pick { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: transform .2s var(--ease-bounce), border-color .15s; }
.bs-battle-pick:hover { transform: translateY(-2px); }
.bs-battle-pick img { width: 40px; height: 40px; }
.bs-battle-pick small { font-size: 11px; font-weight: 700; line-height: 1.2; text-align: center; }
.bs-battle-pick.is-on { border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 22%, var(--surface)); }
.bs-battle-none { display: grid; place-items: center; width: 40px; height: 40px; color: var(--text-3); font-weight: 800; }
.bs-battle-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

.bs-stack { display: flex; align-items: center; justify-content: space-between; gap: 8px; grid-column: 1 / -1; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--poke-red) 8%, var(--surface)); font-size: 12px; font-weight: 800; }
.bs-stack small { font-weight: 600; }
.bs-stack > span:first-child { min-width: 0; flex: 1 1 200px; }
.bs-stack-pill { background: color-mix(in srgb, var(--poke-red) 14%, var(--surface)); }

/* 57차: UniteAPI 자동 전적 업데이트 · 인증 표시 */
.uniteapi-auto { display: grid; gap: 6px; margin: 12px 0 4px; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface); }
.uniteapi-auto.is-on { border-color: color-mix(in srgb, #22c55e 55%, var(--border)); background: color-mix(in srgb, #22c55e 7%, var(--surface)); }
.uniteapi-auto-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.uniteapi-auto-head .btn:first-of-type { margin-left: auto; }
.uniteapi-switch { gap: 10px; align-items: center; }  /* 94차: 켜기/끄기 버튼 → 스위치 */
.uniteapi-auto .field-hint, .uniteapi-auto .meta { margin: 0; }
.is-on-pill { background: color-mix(in srgb, #22c55e 20%, var(--surface)); }
.uapi-verified { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #15803d; background: color-mix(in srgb, #22c55e 16%, var(--surface)); border: 1px solid color-mix(in srgb, #22c55e 45%, transparent); }
:root[data-theme="dark"] .uapi-verified { color: #4ade80; }
/* 64차: 미인증 전적 — 순위 제외 */
.uapi-unverified { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #b45309; background: color-mix(in srgb, #f59e0b 16%, var(--surface)); border: 1px solid color-mix(in srgb, #f59e0b 45%, transparent); white-space: nowrap; }
:root[data-theme="dark"] .uapi-unverified { color: #fbbf24; }
.uapi-verified-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.bs-stack { flex-wrap: wrap; }
.bs-stack-level { flex: 1 1 220px; margin: 0; }
.bs-stack-level b { min-width: 3.4em; }

/* 62차: 전적검색 리포트 — UniteAPI 전적 | 포켓몬허브 기록 */
.record-report { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 18px; }
.record-col { display: grid; align-content: start; gap: 12px; margin: 0; }
.record-col.is-uapi { border-top: 4px solid var(--poke-blue); }
.record-col.is-site { border-top: 4px solid var(--poke-yellow); }
.record-col-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.record-col-head .page-eyebrow { flex-basis: 100%; margin: 0; }
.record-col-head h3 { margin: 0; font-size: 19px; }
.record-col-head > :last-child:not(h3) { margin-left: auto; }
.record-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 0; }
.record-kpis div { padding: 10px 12px; border-radius: 14px; background: var(--surface-muted); }
.record-kpis dt { color: var(--text-3); font-size: 12px; font-weight: 700; }
.record-kpis dd { margin: 2px 0 0; font: 800 18px/1.2 var(--font-numeric), var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record-sigs, .record-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.record-sigs li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.record-sigs small { color: var(--text-2); font-weight: 700; }
.record-recent li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.record-recent li:last-child { border-bottom: 0; }
.record-recent small { color: var(--text-3); }
.record-recent .pill { margin-left: auto; white-space: nowrap; }
.record-col .meta { margin: 0; }
.pill.is-gold { background: var(--poke-yellow); color: var(--on-primary); }
@media (max-width: 900px) { .record-report { grid-template-columns: minmax(0, 1fr); } }


/* 62차: 회원 프로필 kpi 5칸 (시즌 레이팅 · 시즌 점수 · 판수 · 승률) */
.kpi-grid.kpi-grid-wrap { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.kpi-grid.kpi-grid-wrap .value { white-space: nowrap; }
@media (max-width: 640px) { .kpi-grid.kpi-grid-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 66차: 서브 지닌물건 (교체 후보, 능력치엔 안 더함) */
.bs-subs-box { margin-top: 8px; padding: 8px 10px; border: 1.5px dashed var(--border); border-radius: 12px; }
.bs-subs-head { margin: 0 0 6px; font-size: 13px; }
.bs-subs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bs-sub { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 12px; font-weight: 700; }
.bs-sub span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.bs-sub img { width: 28px; height: 28px; object-fit: contain; }
.bs-sub.is-empty { justify-content: center; border-style: dashed; min-height: 38px; }
.bs-sub .usc-remove { width: 22px; height: 22px; font-size: 11px; }
.bs-add-mode { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.bs-subs-view { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; }
.bs-sub-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-weight: 700; }

/* 70차: 전적검색 상단 디스코드 봇 추가 + 사용법 */
.discord-bot-box { margin-bottom: 14px; padding: 14px 16px; }
.discord-bot-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.discord-bot-head > div { display: grid; gap: 2px; min-width: 0; }
.discord-bot-head strong { font-size: 16px; }
.discord-bot-head span { color: var(--text-2); font-size: var(--text-sm); }
.discord-bot-btn { display: inline-flex; align-items: center; gap: 8px; background: #5865f2; border-color: #5865f2; color: #fff; white-space: nowrap; }
.discord-bot-btn:hover { background: #4752c4; border-color: #4752c4; color: #fff; text-decoration: none; }
.discord-bot-help { margin-top: 10px; font-size: var(--text-sm); }
.discord-bot-help summary { cursor: pointer; font-weight: 700; color: var(--text-2); }
.discord-bot-help ol { margin: 10px 0 8px; padding-left: 20px; display: grid; gap: 4px; }
.discord-bot-commands { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.discord-bot-commands li { display: flex; gap: 8px; flex-wrap: wrap; }
.discord-bot-commands span { color: var(--text-2); }
@media (max-width: 560px) { .discord-bot-btn { width: 100%; justify-content: center; } }

/* 72차: 메인 히어로 랭킹 판 아래 버튼 둘 (판과 같은 굵은 테두리 · 그림자) */
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 22px;
  border: 2px solid #1c1917; border-radius: 999px; background: var(--bg); color: var(--text);
  box-shadow: 0 5px 0 rgba(28, 25, 23, .9); font-weight: 800; font-size: 15px; text-decoration: none;
  transition: transform .15s var(--ease-bounce), box-shadow .15s;
}
.hero-action:hover { transform: translateY(-2px); text-decoration: none; color: var(--text); }
.hero-action:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(28, 25, 23, .9); }
.hero-action.is-bot { background: #5865f2; color: #fff; }
.hero-action.is-bot:hover { color: #fff; }
.hero-action.is-cafe { background: #03c75a; color: #fff; }
.hero-action.is-cafe:hover { color: #fff; }
html[data-theme="dark"] .hero-action { border-color: var(--poke-yellow); box-shadow: 0 5px 0 rgba(255, 203, 5, .45); }
@media (max-width: 420px) { .hero-action { flex: 1 1 100%; } }

/* 76차: 관리자 디스코드 봇 사용 현황 */
.discord-bars { grid-template-columns: repeat(14, minmax(0, 1fr)); }
.discord-guild { display: inline-flex; align-items: center; gap: 8px; margin-right: 6px; }
.discord-guild img { border-radius: 50%; }

/* 77차: 관리자 › 메인 디자인 켜고 끄기 */
.hero-design-form { display: grid; gap: 14px; max-width: 720px; }
.hero-design-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hero-design-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.hero-design-list li > div { display: grid; gap: 2px; min-width: 0; }

/* 79 · 80차: 서클 페이지(서클관리도구 공유 화면) — 카지노인 스타트페이지처럼 시계 · 검색 · 아이콘 타일. 테마 색은 --cp-* (서클장이 고름) */
.cpage { --cp-from: #ef4444; --cp-to: #f97316; --cp-accent: #ef4444; --cp-ink: #fff; }
.cstart { position: relative; max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; padding: 0 0 20px; }
.cstart-body main { padding-top: 0; }
.cstart-glow { position: fixed; inset: 0 0 auto; height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 100% at 20% 0%, color-mix(in srgb, var(--cp-from) 30%, transparent), transparent 70%),
              radial-gradient(50% 90% at 85% 0%, color-mix(in srgb, var(--cp-to) 26%, transparent), transparent 70%); }
.cstart-head { display: flex; align-items: center; gap: 14px; padding-top: 22px; }
.cstart-badge { flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; overflow: hidden; font-size: 28px; line-height: 1;
  background: linear-gradient(135deg, var(--cp-from), var(--cp-to)); }
.cstart-badge img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
/* 218차: 올린 로고는 그림자 · 뒤 판 없이 그대로 (떠 보이지 않게) */
.cstart-badge.has-logo { background: none; border-radius: 12px; }
.cstart-badge.has-logo img { object-fit: contain; background: none; }
.cstart-name { min-width: 0; flex: 1; }
.cstart-name h1 { margin: 0; font-size: clamp(19px, 3.4vw, 24px); line-height: 1.2; word-break: keep-all; overflow-wrap: anywhere; }
.cstart-name p { margin: 2px 0 0; color: var(--text-3); font-size: 13px; font-weight: 600; }
.cstart-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cstart-stats li { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); font-size: 12px; font-weight: 700; }
.cstart-stats b { color: var(--cp-accent); font-family: Montserrat, var(--font-sans, sans-serif); font-weight: 800; }
.cstart-clock { margin: 18px 0 0; text-align: center; color: var(--text-3); font-size: 14px; font-weight: 600; }
.cstart-clock strong { display: block; color: var(--text); font-family: Montserrat, var(--font-sans, sans-serif); font-size: clamp(54px, 12vw, 92px); font-weight: 800;
  font-variant-numeric: tabular-nums; letter-spacing: .01em; line-height: 1.05; }
.cstart-clock span { display: block; margin-top: 6px; }
.cstart-search { display: flex; align-items: center; gap: 4px; width: min(620px, 100%); height: 52px; margin: 0 auto; padding: 0 8px 0 6px; box-sizing: border-box;
  border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .12); transition: border-color .15s, box-shadow .15s; }
.cstart-search:focus-within { border-color: var(--cp-accent); box-shadow: 0 6px 22px -10px var(--cp-accent); }
.cstart .cstart-search input { flex: 1; min-width: 0; height: 100%; border: 0 !important; border-radius: 0; box-shadow: none !important; outline: 0 !important; background: transparent !important; color: var(--text); font: inherit; font-size: 15px; padding: 0 6px; }
.cstart-engine { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; }
.cstart-go { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--text-3); cursor: pointer; }
.cstart-go:hover { background: var(--surface-2, rgba(127, 127, 127, .1)); color: var(--text); }
.cstart-go svg { width: 20px; height: 20px; }
/* 218차: 바로가기 버튼 (누르면 그 주소로 바로) */
.cstart-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cstart-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 18px 6px 8px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--cp-accent) 45%, var(--border)); background: color-mix(in srgb, var(--cp-accent) 10%, var(--surface));
  color: var(--text); font-size: 14px; font-weight: 700; text-decoration: none; transition: transform .2s var(--ease-bounce), border-color .15s ease; }
.cstart-button:hover, .cstart-button:focus-visible { text-decoration: none; border-color: var(--cp-accent); transform: translateY(-2px); }
.cstart-button-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  background: var(--tile-color, var(--cp-accent)); color: #fff; }
.cstart-button-icon.site-icon { width: 30px; height: 30px; border-radius: 50%; }
.cstart-folder { display: grid; gap: 10px; }
.cstart-folder[hidden] { display: none; }
.cstart-folder > h2 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 4px; color: var(--text-2, var(--text)); font-size: 14px; font-weight: 800; }
.cstart-folder > h2 small { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--cp-accent) 16%, transparent); color: var(--cp-accent); font-size: 11px; font-weight: 800; }
.cstart-grid { --tile-icon: 56px; --tile-min: 96px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile-min), 1fr)); gap: 14px; }
.cstart-grid[data-size="small"] { --tile-icon: 44px; --tile-min: 82px; }
.cstart-grid[data-size="large"] { --tile-icon: 68px; --tile-min: 112px; }
.cstart-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding: 10px 6px; border-radius: 16px; color: var(--text); text-align: center;
  text-decoration: none; transition: background-color .15s, transform .2s var(--ease-bounce); -webkit-tap-highlight-color: transparent; }
.cstart-tile[hidden] { display: none; }
.cstart-tile:hover, .cstart-tile:focus-visible { text-decoration: none; background: color-mix(in srgb, var(--cp-accent) 9%, transparent); }
.cstart-tile:hover .cstart-icon { transform: translateY(-3px); }
.cstart-tile:active { transform: scale(.96); }
.cstart-tile:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: 2px; }
.cstart-icon { display: grid; place-items: center; flex: none; width: var(--tile-icon); height: var(--tile-icon); border-radius: 24%; overflow: hidden; box-sizing: border-box;
  border: 1px solid var(--border); background: var(--tile-color, var(--surface)); color: #fff; font-family: Montserrat, var(--font-sans, sans-serif);
  font-size: calc(var(--tile-icon) * .42); font-weight: 800; box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .4); transition: transform .2s var(--ease-bounce); }
.cstart-icon[style*="--tile-color"] { border-color: transparent; }
.cstart-icon.is-doc { background: var(--surface); font-size: calc(var(--tile-icon) * .46); }
/* 218차: 문서 칸 — 가운데 정렬 · 선 아이콘(포인트 색) */
.cstart-folder.is-docs .cstart-grid { display: flex; flex-wrap: wrap; justify-content: center; }
.cstart-folder.is-docs .cstart-tile { flex: 0 1 var(--tile-min); }
.cstart-icon.is-doc { color: var(--cp-accent); }
.cstart-icon.is-doc .ui-icon { width: 44%; height: 44%; stroke-width: 1.75; }
.cstart-icon.site-icon { width: var(--tile-icon); height: var(--tile-icon); border-radius: 24%; }
.cstart-tile-name { max-width: 100%; overflow: hidden; font-size: 12.5px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.cstart-tile-sub { max-width: 100%; overflow: hidden; color: var(--text-3); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cstart-grid[data-view="icon"] .cstart-tile-name, .cstart-grid[data-view="icon"] .cstart-tile-sub, .cstart-grid[data-view="icon-name"] .cstart-tile-sub { display: none; }
.cstart-grid[data-view="card"] { --tile-min: 200px; gap: 10px; }
.cstart-grid[data-view="card"] .cstart-tile { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 12px; row-gap: 1px;
  padding: 12px; border: 1px solid var(--border); background: var(--surface); text-align: left; }
.cstart-grid[data-view="card"] .cstart-tile:hover { border-color: var(--cp-accent); }
.cstart-grid[data-view="card"] .cstart-icon { grid-row: 1 / 3; width: min(var(--tile-icon), 44px); height: min(var(--tile-icon), 44px); font-size: 19px; }
.cstart-grid[data-view="card"] .cstart-tile-name, .cstart-grid[data-view="card"] .cstart-tile-sub { justify-self: start; }
.cstart-none { margin: 0; color: var(--text-3); font-size: 13px; text-align: center; }
.cstart-intro { padding: 20px 22px; border-radius: 20px; border: 1px solid var(--border); border-left: 5px solid var(--cp-accent); background: var(--surface); }
.cstart-intro h2 { margin: 0 0 8px; font-size: 16px; }
@media (max-width: 600px) {
  .cstart-head { flex-wrap: wrap; }
  .cstart-stats { width: 100%; }
  .cstart-grid { --tile-icon: 50px; --tile-min: 76px; gap: 8px; }
  .cstart-grid[data-view="card"] { --tile-min: 150px; }
}
/* 79차: 서클관리도구 › 페이지 꾸미기 편집 */
.cpage-theme-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.cpage-theme-list label { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border: 2px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 700; }
.cpage-theme-list input { position: absolute; opacity: 0; pointer-events: none; }
.cpage-theme-list label:has(input:checked) { border-color: var(--text); }
.cpage-theme-list label:has(input:focus-visible) { outline: 2px solid var(--poke-yellow); }
.cpage-swatch { width: 22px; height: 22px; border-radius: 50%; }
.cpage-edit-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.cpage-edit-row .field { flex: 1 1 160px; }
.cpage-edit-row input[type="color"] { width: 56px; height: 40px; padding: 2px; border-radius: 10px; }

/* 88차: 관리자 › 서클 관리 '가입 신청 N' */
.pill-warn { background: color-mix(in srgb, var(--poke-yellow) 30%, transparent); color: var(--text); font-weight: 800; text-decoration: none; }
.pill-warn:hover { text-decoration: none; background: var(--poke-yellow); }

/* 89차: 관리자 › 회원 관리 — 처리할 신청 칸은 작은 카드로 한 줄에 4개, 신청이 있는 칸(표)은 한 줄 전체 */
.admin-req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; align-items: start; margin-bottom: 24px; }
.admin-req-grid > .panel { margin: 0; min-width: 0; padding: 14px 18px; border-radius: 16px; }
.admin-req-grid > .panel.is-wide { grid-column: 1 / -1; padding: 20px 22px; }
.admin-req-grid > .panel .page-eyebrow { margin: 0 0 2px; font-size: 10px; }
.admin-req-grid > .panel h2 { margin: 0; font-size: 15px; }
.admin-req-grid .admin-req-empty { margin: 4px 0 0; font-size: 12px; }

/* 99차: 익명 게시판(버그신고 및 문의) 글쓴이 · 댓글 표시 */
.board-anon { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--text-2); }
.comment-anon { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: var(--surface-muted); font-size: 16px; }

/* 100차: 프로필 팝업 알림 '읽음 처리'(모두 보기 옆) — 팝업 목록을 비운다(알림 화면엔 흐리게 남음) */
.notif-actions { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.notif-readall { margin: 0; display: inline; }
.notif-readall button { padding: 0; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.notif-readall button:hover { color: var(--highlight); }
.notif-sep { color: var(--text-3); font-size: 12px; }

/* ---------- 101차 접근성 (100차 전수조사 C12-3 · C12-4 · C12-5) — 색 정체성은 그대로, 글자 · 초점만 또렷하게 ---------- */
/* 키보드 초점이 고정 상단바 · 오른쪽 아래 테마 버튼 밑에 가려지지 않게 (상단바 높이는 site.js 가 --topbar-h 로) */
html { scroll-padding-top: calc(var(--topbar-h, 96px) + 8px); scroll-padding-bottom: 72px; }
/* 라이트 테마 초점 표시: 노랑만으로는 흰 바탕 대비 1.3:1 → 안쪽에 진한 테두리를 겹친다 */
html:not([data-theme="dark"]) { --focus-ring: 0 0 0 2px var(--text), 0 0 0 5px var(--poke-yellow); --ui-ring: #92400e; }
/* 가로로 넘기는 메뉴(상단 · 서브탭) 안에서는 바깥 링이 잘리니 안쪽으로 그린다 */
.topbar-nav a:focus-visible, .subnav a:focus-visible { box-shadow: inset 0 0 0 2px var(--text), inset 0 0 0 4px var(--poke-yellow); }
/* 글자 대비 4.5:1 이상 */
html:not([data-theme="dark"]) .btn-danger { color: #b91c1c; }
html:not([data-theme="dark"]) .status-pill.is-recruiting { color: #166534; }
html[data-theme="dark"] .status-pill.is-recruiting { color: #4ade80; }
html[data-theme="dark"] .status-pill.is-auction { color: #f87171; }
html[data-theme="dark"] .status-pill.is-ongoing { color: #60a5fa; }
html[data-theme="dark"] .status-pill.is-closed { color: #fb923c; }
html[data-theme="dark"] .move-upgrade b { color: #fbbf24; }
/* 105차(사용자 요청): 히어로 네이버 카페 버튼 글자는 흰색 — 101차의 짙은 초록 글씨를 되돌림 */
input::placeholder, textarea::placeholder { opacity: 1; }
/* 102차: 서버가 알려 준 틀린 칸 */
[aria-invalid="true"] { border-color: var(--poke-red) !important; }
.field-error { margin: 6px 0 0; color: #b91c1c; font-size: var(--text-sm); font-weight: 700; }
html[data-theme="dark"] .field-error { color: #f87171; }
/* 106차: 대진 짜기 안내 한 줄 · 리그 라운드 제목 */
.draw-plan { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface-muted); }
.league-day { margin: 16px 0 6px; font-size: 15px; }
.league-day small { font-weight: 600; margin-left: 6px; }
/* 106차(2): 새 경기 방식 — 진출 줄 · 우승 · 부전승/미정 흐리게 · 방식 추천 표 */
.stage-section { margin-top: 18px; }
.stage-champion { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: var(--surface-muted); font-size: 16px; }
.league-table tr.is-advance td:first-child { box-shadow: inset 4px 0 0 var(--poke-yellow); }
.progress-teams .is-bye, .progress-teams .is-tbd { color: var(--text-3); font-weight: 600; }
.bracket-guide { margin-top: 8px; }
.bracket-guide summary { cursor: pointer; font-weight: 700; color: var(--text-2); }
.bracket-guide-table { margin-top: 8px; }
.bracket-guide-table td { vertical-align: top; }
.bracket-guide-desc { font-size: var(--text-sm); color: var(--text-2); line-height: 1.55; min-width: 260px; }
.bracket-opts { border: 1.5px dashed var(--border); border-radius: 14px; padding: 10px 14px 4px; }
.bracket-opts legend { padding: 0 6px; font-weight: 800; }
.bracket-guide-line { margin: 0 0 12px; }
.ladder-form { margin-top: 10px; flex-wrap: wrap; }

/* 108차: 단계별(라운드마다 다른 방식) — 설정의 단계 줄 · 단계 머리 · 세트 수 뱃지 */
.stage-builder { margin: 6px 0 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.stage-builder-head { margin: 0 0 4px; }
.stage-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; margin: 8px 0; border-radius: 12px; background: var(--surface-muted); }
.stage-row label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: var(--text-sm); font-weight: 700; color: var(--text-2); white-space: nowrap; }
.stage-row label small { font-weight: 600; }
.stage-row select { width: auto; min-width: 104px; }
.stage-row .vega-select { flex: none; width: auto; min-width: 124px; }
.stage-row input[type="number"] { width: 72px; }
.stage-no { min-width: 48px; font-weight: 800; color: var(--text); }
.stage-section.is-stage-head { margin-top: 26px; padding-top: 12px; border-top: 2px solid var(--poke-yellow); }
.bo-pill { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--poke-yellow); color: var(--on-primary); font-size: 11px; font-weight: 800; }
@media (max-width: 640px) { .stage-row { padding: 10px; } .stage-row label { width: 100%; justify-content: space-between; } .stage-row label.check-line { justify-content: flex-start; } }
.hide-toggle { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; margin: 0 0 12px; }
.hide-toggle.is-hidden { justify-content: space-between; }
.hide-toggle .notice-line { flex: 1 1 320px; margin: 0; }
/* 109차: 대진표를 가로로 — 리그 · 스위스 라운드 열 · 토너먼트 나무(패자조처럼 칸 수가 그대로인 라운드는 곧은 선) */
.round-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 14px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 14px; scroll-snap-type: x proximity; }
.round-col { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: var(--surface-muted); scroll-snap-align: start; }
.round-col .bk-round-name { margin: 0; }
.round-rest, .round-wait { margin: -4px 0 0; text-align: center; font-size: 12px; color: var(--text-3); font-weight: 600; }
.bk-foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 10px; border-top: 1px dashed var(--border); font-size: 11px; color: var(--text-3); font-weight: 600; }
.bk-foot .bo-pill { margin: 0; }
.bk-team.is-bye, .bk-team.is-tbd { color: var(--text-3); font-weight: 600; }
.bk-team.is-bye .bk-name { font-style: italic; }
.bk-slot.is-void::before, .bk-slot.is-void::after { display: none; }
.bk-round.is-straight:not(:last-child) .bk-slot::after { top: 50%; bottom: auto; height: 0; border-width: 2px 0 0 0; border-radius: 0; }
.bk-extra { max-width: 260px; margin: 14px 0 0 auto; display: grid; gap: 8px; }
.stage-section .bracket-wrap { margin-bottom: 6px; }
@media (max-width: 640px) { .round-cols { grid-auto-columns: minmax(190px, 82%); } }
.stage-section .bracket { max-width: calc(var(--rounds) * 340px); }
.table-wrap + .round-cols { margin-top: 12px; }
/* 109차(3): 선공 · 후공 */
.side-pill { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--poke-blue, #3b82f6); color: #fff; font-size: 10px; font-weight: 800; vertical-align: middle; }
.side-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; }
.side-label { font-size: 11px; font-weight: 800; color: var(--text-3); }
.side-btn { padding: 3px 9px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 700; cursor: pointer; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-btn:hover { border-color: var(--poke-blue, #3b82f6); }
.side-btn.is-on { background: var(--poke-blue, #3b82f6); border-color: var(--poke-blue, #3b82f6); color: #fff; }
.side-btn.is-coin { padding: 3px 7px; }
/* 110차: 게시판 새 글 알림 설정 */
.board-alert-list { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 6px 0 10px; }
/* 111차: 대회 결과 — 선수 사진 · 이름을 누르면 프로필 */
.member-face { display: inline-flex; border-radius: 50%; transition: transform .2s var(--ease-bounce); }
.member-face:hover { transform: translateY(-2px) scale(1.08); }
.member-face:focus-visible { outline: 2px solid var(--poke-yellow); outline-offset: 2px; }
.member-name-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.member-name-link:hover { color: var(--text); text-decoration-style: solid; }
/* 112차: 비회원 글쓰기 · 비밀번호로 열기 */
.guest-fields { border: 1.5px dashed var(--border); border-radius: 14px; padding: 10px 14px 4px; margin: 12px 0; }
.guest-fields legend { padding: 0 6px; font-weight: 800; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.guest-unlock { max-width: 460px; }
.guest-fields .form-grid { align-items: start; }
/* 113차: 이미지 저장 — 앱 안 브라우저용 크게 보기 (길게 눌러 저장) */
.ph-image-viewer { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg, 0 20px 50px rgba(0,0,0,.3)); }
.ph-image-viewer::backdrop { background: rgba(0, 0, 0, .55); }
.ph-image-card { display: grid; gap: 12px; padding: 16px; }
.ph-image-hint { margin: 0; font-weight: 800; text-align: center; }
.ph-image-card img { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 12px; background: var(--surface-muted); -webkit-touch-callout: default; user-select: auto; }

/* 121차: 포켓몬 상세 '최근 밸런스 패치' (상향 초록 · 하향 빨강 · 버그 수정 회색) */
.patch-panel { margin-top: 24px; }
.patch-entry + .patch-entry { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.patch-head { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.patch-kind { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: var(--text-xs); font-weight: 800; background: var(--surface-2, var(--bg)); color: var(--text-2); }
.patch-entry.is-buff .patch-kind { background: color-mix(in srgb, #22c55e 18%, transparent); color: #15803d; }
.patch-entry.is-nerf .patch-kind { background: color-mix(in srgb, #ef4444 16%, transparent); color: #b91c1c; }
html[data-theme="dark"] .patch-entry.is-buff .patch-kind { color: #4ade80; }
html[data-theme="dark"] .patch-entry.is-nerf .patch-kind { color: #f87171; }
.patch-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.patch-list li.is-fix { color: var(--text-3); }
.patch-list a { font-weight: 700; }

/* 130차: 관리자 › 랭킹 비율 */
.rank-weights-form { display: grid; gap: 16px; }
/* 196차: 관리자 › 금지어 */
.banned-form { display: grid; gap: 14px; }
.banned-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.banned-grid > .panel { margin: 0; }
.banned-grid textarea { width: 100%; min-height: 320px; margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-muted); color: var(--text); font: 600 14px/1.6 var(--font-body); resize: vertical; }
.rank-weights-set { margin: 0; }
.rank-weights-set h2 { margin: 0 0 4px; }
.rank-weights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 12px; }
.rank-weights-grid .field > span:first-child { font-weight: 800; font-size: var(--text-sm); }
.rank-weights-input { display: flex; align-items: center; gap: 6px; }
.rank-weights-input input { width: 100%; }
.rank-weights-sum { margin: 12px 0 0; font-weight: 800; }
.rank-weights-sum.is-off b { color: var(--poke-red); }

/* 134차(2): 공개 프로필 이름 아래 — 뱃지 · 소속 / 디스코드 · 코드 · 랭킹 / 좋아요 · 신고 세 줄, 줄마다 같은 높이 · 글자 크기 · 왼쪽 맞춤 */
.member-meta { display: grid; gap: 10px; margin-top: 12px; }
.member-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.member-tags .user-badge, .member-tags .circle-badge, .member-leader {
  box-sizing: border-box; display: inline-flex; align-items: center; gap: 5px; height: 28px; margin: 0; padding: 0 11px;
  border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1; white-space: nowrap; vertical-align: middle; }
.member-tags .user-badge { border-width: 1.5px; }
.member-tags .circle-badge { padding-left: 4px; border-width: 1.5px; }
.member-tags .circle-badge img, .member-tags .circle-badge i { width: 20px; height: 20px; font-size: 10px; }
.member-leader { border: 1.5px solid color-mix(in srgb, var(--poke-yellow) 60%, var(--border));
  background: color-mix(in srgb, var(--poke-yellow) 16%, var(--surface)); color: var(--text); }
.member-meta .code-row { margin: 0; }
.member-meta .code-row > .discord-chip, .member-meta .code-chip { box-sizing: border-box; height: 32px; min-height: 32px; font-size: 12px; }
.member-meta .code-chip { gap: 5px; padding: 0 13px; }
.member-meta .code-chip.is-rank { border: 1.5px solid color-mix(in srgb, var(--poke-yellow) 70%, var(--border));
  background: color-mix(in srgb, var(--poke-yellow) 22%, var(--surface)); color: var(--text); letter-spacing: .02em; }
.member-meta .code-chip.is-rank i { font-style: normal; }
.member-meta-actions .profile-like { margin: 0; }
.member-meta-actions .like-btn, .member-meta-actions .profile-report { box-sizing: border-box; height: 36px; min-height: 36px; margin: 0; padding: 0 14px; font-size: 13px; }
.member-meta-actions .like-btn { border-width: 1.5px; }
.member-meta-actions .like-heart { font-size: 15px; }

/* 137차: 마우스 스포트라이트 (static/js/spotlight-cursor.js) — 화면 맨 위 막, 누르기는 통과. 라이트 = 옅은 포켓몬 노랑, 다크 = 흰 빛 */
.spotlight-cursor {
  --spot-x: -1000px; --spot-y: -1000px; --spot-size: 120px; --spot-color: rgba(255, 203, 5, .16);
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .25s ease;
  background: radial-gradient(circle var(--spot-size) at var(--spot-x) var(--spot-y), var(--spot-color), transparent 100%);
}
.spotlight-cursor.is-on { opacity: 1; }
html[data-theme="dark"] .spotlight-cursor { --spot-color: rgba(255, 255, 255, .11); }
@media print { .spotlight-cursor { display: none; } }

/* 138차: 대회 포스터 — 목록 카드는 윗부분만 띠로(아래로 갈수록 카드 색으로 흐려짐), 상세는 오른쪽 칸에 전체 (휴대폰은 맨 위) */
.tournament-card.has-cover { overflow: hidden; }
.tournament-card-cover {
  position: relative; margin: -22px -22px 6px; aspect-ratio: 2 / 1; overflow: hidden;
  background: radial-gradient(circle at 50% 120%, var(--poke-yellow-soft), var(--surface-muted) 70%);
  border-bottom: 1.5px solid var(--border);
}
.tournament-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-bounce); }
.tournament-card-cover:not(.is-empty)::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(to bottom, transparent, var(--surface)); pointer-events: none; }
.tournament-card-cover:not(.is-empty) { border-bottom: 0; }
.tournament-card:hover .tournament-card-cover img { transform: scale(1.04); }
.tournament-card-cover.is-empty { display: grid; place-items: center; color: var(--text-3); }
.tournament-card-cover.is-empty .ball-icon { opacity: .55; }

.tourney-hero { display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 30vw, 380px); gap: 28px; align-items: start; }
.tourney-hero-main { grid-column: 1; grid-row: 1; min-width: 0; }
.tourney-hero-main > .page-header:first-child { margin-top: 0; }
.tourney-poster { grid-column: 2; grid-row: 1; position: sticky; top: 84px; margin: 18px 0 0; }
.tourney-poster-img {
  display: block; width: 100%; height: auto; border-radius: var(--radius-lg); border: 1.5px solid var(--border);
  background: var(--surface-muted); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .45); cursor: zoom-in;
  transition: transform .3s var(--ease-bounce);
}
.tourney-poster-img:hover { transform: translateY(-3px); }
.tourney-poster figcaption { margin-top: 8px; text-align: center; font-size: 12px; }
@media (max-width: 900px) {
  .tourney-hero { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tourney-poster { grid-column: 1; position: static; width: 100%; max-width: 520px; margin: 14px auto 32px; }  /* 140차: 아래 제목 글자와 띄움 */
  .tourney-hero-main { grid-row: auto; }
}
.poster-manage { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 12px; }
.poster-manage-preview .tournament-card-cover { margin: 6px 0 8px; border: 1.5px solid var(--border); border-radius: var(--radius-md, 14px); }
.poster-manage-preview .tournament-card-cover.is-empty { display: grid; place-items: center; }
.poster-form { display: grid; gap: 10px; justify-items: start; }
.poster-form input[type="range"] { width: 100%; max-width: 420px; accent-color: var(--poke-yellow); }
.poster-form-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 720px) { .poster-manage { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) { .tourney-hero-main .home-split { grid-template-columns: minmax(0, 1fr); } }
html[data-theme="dark"] .tournament-card-cover { background: radial-gradient(circle at 50% 120%, rgba(255, 203, 5, .10), var(--surface-muted) 70%); }
.tournament-card-cover .cover-badge { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 3px 9px; border-radius: 999px; background: rgba(17, 17, 20, .72); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.tourney-poster-media { position: relative; }
.tourney-poster-video { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); border: 1.5px solid var(--border); background: #111; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .45); }
.poster-video-form { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
.poster-manage-video { width: 180px; max-height: 320px; border-radius: 12px; background: #111; }
/* 139차: 영상 포스터 버튼 — 영상 위 오른쪽 아래 둥근 아이콘 두 개 (소리 · 크게 보기) */
.tourney-poster-controls { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.tourney-poster-btn {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px;
  background: rgba(17, 17, 20, .55); color: #fff; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .6); transition: transform .25s var(--ease-bounce), background .2s ease;
}
.tourney-poster-btn:hover { transform: scale(1.08); background: rgba(17, 17, 20, .78); }
.tourney-poster-btn:focus-visible { outline: 2px solid var(--poke-yellow); outline-offset: 2px; }
.tourney-poster-btn[data-poster-sound] .is-on, .tourney-poster-btn[data-poster-sound][aria-pressed="true"] .is-off { display: none; }
.tourney-poster-btn[data-poster-sound][aria-pressed="true"] .is-on { display: block; }
.tourney-poster-btn[data-poster-sound][aria-pressed="true"] { background: var(--poke-yellow); border-color: transparent; color: var(--on-primary); }
.tourney-poster-media.has-native-controls .tourney-poster-controls { top: 12px; bottom: auto; }  /* 움직임 줄이기: 브라우저 재생 막대와 안 겹치게 위로 */

/* 142차: 터치 화면(손가락)에서 작은 독립 버튼의 누르는 영역 — 보이는 아이콘 크기는 그대로, 둘레에 보이지 않는 영역을 더한다
   (회원 연결 해제 ✕ 28px · 이모티콘 즐겨찾기 ☆ 22px · 티어 열 지우기 24px). 즐겨찾기는 이모티콘 버튼 위라 조금만 키움 */
@media (pointer: coarse) {
  .member-picker-clear { position: relative; width: 36px; height: 36px; }
  .member-picker-clear::after { content: ""; position: absolute; inset: -4px; }
  .emo-star { width: 28px; height: 28px; font-size: 14px; }
}

/* 143차: 휴대폰(손가락)에서 가능 시간표 칸 22×24 → 34×36 (요일 버튼도) — 칸에서 시작하면 끌어 칠하기,
   시간 머릿줄 · 요일 칸에서 시작하면 표를 옆으로 밀어 넘김(전엔 표 전체가 touch-action: none 이라 못 넘겼다) */
@media (pointer: coarse) and (max-width: 640px) {
  .avail-grid { touch-action: pan-x pan-y; }
  .avail-cell { width: 34px; height: 36px; touch-action: none; }
  .avail-day { width: 34px; height: 36px; }
}
@media (pointer: coarse) {
  .avail-grid .avail-cell { touch-action: none; }
  .toast-close { position: relative; }
  .toast-close::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; }  /* 143차: 알림 닫기 누르는 영역 44px (보이는 28px 그대로) */
}

/* 145차: 포켓몬 MBTI — 공개 프로필 카드 · 검사 화면 '내 저장된 결과' */
.member-mbti { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.member-mbti-card { display: flex; align-items: center; gap: 14px; flex: 1 1 320px; min-width: 0; color: inherit; text-decoration: none; }
.member-mbti-card:hover { text-decoration: none; }
.member-mbti-card img, .mbti-mine img { flex: none; border-radius: 16px; background: var(--surface-muted); object-fit: contain; }
.member-mbti-text { display: grid; gap: 2px; min-width: 0; }
.member-mbti-text .page-eyebrow { margin: 0; }
.member-mbti-text b { font-size: 18px; font-weight: 800; }
.member-mbti-card .arrow-link { margin-left: auto; white-space: nowrap; }
.member-mbti-hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.mbti-mine { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; color: inherit; text-decoration: none; }
.mbti-mine:hover { text-decoration: none; border-color: var(--poke-yellow); }
.mbti-mine > span:not(.arrow-link) { display: grid; gap: 2px; }
.mbti-mine b { font-size: 17px; font-weight: 800; }
.mbti-mine .arrow-link { margin-left: auto; }
.mbti-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.mbti-save-text { margin: 0; flex: 1 1 260px; }
.mbti-save-form, .mbti-save-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; width: 100%; }
.mbti-save-form .mbti-save-text { flex-basis: 100%; }
.member-mbti-code { display: inline-block; margin-right: 4px; padding: 1px 10px; border-radius: 999px; background: var(--poke-yellow); color: var(--on-primary); font-size: 14px; font-weight: 900; letter-spacing: .05em; vertical-align: 2px; }
/* 144차(2): 휴대폰 메인 TOP 5 — 다섯 칸(종합 · 우승 · 승점 · S · 승률)이 한 줄에 들어가게 아바타 칸부터 넓게 · 간격 좁게 */
@media (max-width: 640px) {
  .top5-stats { grid-column: 2 / -1; gap: 2px 5px; font-size: 10.5px; }
  .top5-stats b { font-size: 12px; }
  .top5-stats span + span::before, .top5-stats b + span::before { margin-right: 5px; }
}

/* 160차: 진행 중인 대회 카드 테두리에 도는 빛 — 사용자가 준 React 'BorderBeam'(Hyperiux Vault, md · colorful · 3.3초 · 두께 2)을
   React · Tailwind 없이 CSS 로 옮김. 그리는 방법 · 색 · 투명도는 원본 그대로, 다크/라이트는 OS 대신 사이트 테마를 따른다.
   카드에 `beam-border` + 안에 `<span class="beam-glow">` — ::after 테두리 빛 · ::before 안쪽 번짐 · .beam-glow 꼬리 빛.
   카드 자기 테두리 위에 겹쳐 그리려고 --beam-edge(카드 테두리 두께)만큼 바깥으로 넓힌다. 163차: 운영체제 '동작 줄이기'여도 그대로 */
@property --beam-angle { syntax: "<angle>"; initial-value: 0deg; inherits: true; }
.beam-border {
  --beam-angle: 0deg; --beam-bw: 2px; --beam-edge: 1.5px; --beam-dur: 3.3s; --beam-hue-dur: 12s;
  --beam-stroke: .8; --beam-inner: .85; --beam-bloom: .95; --beam-bright: 1.6; --beam-sat: 2;
  --beam-hi: 0, 0, 0; --beam-hi-a: .55;
  position: relative; isolation: isolate; overflow: visible;
  animation: beam-spin var(--beam-dur) linear infinite;
}
html[data-theme="dark"] .beam-border {
  --beam-stroke: 1; --beam-inner: .6; --beam-bloom: .45; --beam-bright: 1.6; --beam-sat: 1.4;  /* 원본(.26 · .42 · .24 · 1.3 · 1.2)은 어두운 카드 위에서 거의 안 보여 올림 */
  --beam-hi: 255, 255, 255; --beam-hi-a: .75;
}
.beam-border::after, .beam-border::before, .beam-border > .beam-glow {
  content: ""; position: absolute; inset: calc(-1 * var(--beam-edge)); border-radius: inherit;
  clip-path: inset(0 round var(--radius-lg)); pointer-events: none;
}
/* 테두리 빛 — 흰(라이트는 검은) 하이라이트 + 가장자리 색 덩어리, 도는 원뿔 마스크로 둘레의 2/3 만 */
.beam-border::after {
  z-index: 2; padding: var(--beam-bw);
  background:
    conic-gradient(from var(--beam-angle), transparent 0%, transparent 54%,
      rgba(var(--beam-hi), calc(var(--beam-hi-a) * .13)) 57%, rgba(var(--beam-hi), calc(var(--beam-hi-a) * .4)) 60%,
      rgba(var(--beam-hi), calc(var(--beam-hi-a) * .8)) 63%, rgba(var(--beam-hi), var(--beam-hi-a)) 66%,
      rgba(var(--beam-hi), calc(var(--beam-hi-a) * .8)) 69%, rgba(var(--beam-hi), calc(var(--beam-hi-a) * .4)) 72%,
      rgba(var(--beam-hi), calc(var(--beam-hi-a) * .13)) 75%, transparent 78%, transparent 100%),
    radial-gradient(ellipse 130px 65px at 12% 1%, rgb(40, 140, 255), transparent),
    radial-gradient(ellipse 150px 75px at 33% 0%, rgb(255, 50, 100), transparent),
    radial-gradient(ellipse 46px 130px at 2.1% 68.3%, rgb(50, 200, 80), transparent),
    radial-gradient(ellipse 24px 68px at 2.1% 68.3%, rgb(30, 185, 170), transparent),
    radial-gradient(ellipse 280px 56px at 74.4% 100%, rgb(100, 70, 255), transparent),
    radial-gradient(ellipse 150px 50px at 55% 100%, rgb(40, 140, 255), transparent),
    radial-gradient(ellipse 150px 82px at 93.9% 1%, rgb(255, 120, 40), transparent),
    radial-gradient(ellipse 30px 80px at 100% 27.1%, rgb(240, 50, 180), transparent),
    radial-gradient(ellipse 56px 92px at 100% 27.1%, rgb(180, 40, 240), transparent);
  -webkit-mask:
    conic-gradient(from var(--beam-angle), transparent 0%, transparent 30%, rgba(255, 255, 255, .1) 36%, rgba(255, 255, 255, .35) 44%,
      #fff 52%, #fff 80%, rgba(255, 255, 255, .35) 86%, rgba(255, 255, 255, .1) 92%, transparent 95%, transparent 100%),
    linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: source-in, xor;
  mask:
    conic-gradient(from var(--beam-angle), transparent 0%, transparent 30%, rgba(255, 255, 255, .1) 36%, rgba(255, 255, 255, .35) 44%,
      #fff 52%, #fff 80%, rgba(255, 255, 255, .35) 86%, rgba(255, 255, 255, .1) 92%, transparent 95%, transparent 100%),
    linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: intersect, exclude;
  opacity: var(--beam-stroke);
  animation: beam-hue var(--beam-hue-dur) ease-in-out infinite;
}
/* 안쪽 번짐 — 같은 색 덩어리를 옅게(0.45) · 조금 작게, 가장자리 420px 안에서만 */
.beam-border::before {
  z-index: 1;
  background:
    radial-gradient(ellipse 117px 59px at 12% 1%, rgba(40, 140, 255, .45), transparent),
    radial-gradient(ellipse 135px 68px at 33% 0%, rgba(255, 50, 100, .45), transparent),
    radial-gradient(ellipse 41px 117px at 2.1% 68.3%, rgba(50, 200, 80, .45), transparent),
    radial-gradient(ellipse 22px 61px at 2.1% 68.3%, rgba(30, 185, 170, .45), transparent),
    radial-gradient(ellipse 252px 50px at 74.4% 100%, rgba(100, 70, 255, .45), transparent),
    radial-gradient(ellipse 135px 45px at 55% 100%, rgba(40, 140, 255, .45), transparent),
    radial-gradient(ellipse 135px 74px at 93.9% 1%, rgba(255, 120, 40, .45), transparent),
    radial-gradient(ellipse 27px 72px at 100% 27.1%, rgba(240, 50, 180, .45), transparent),
    radial-gradient(ellipse 50px 83px at 100% 27.1%, rgba(180, 40, 240, .45), transparent);
  -webkit-mask-image:
    conic-gradient(from var(--beam-angle), transparent 0%, transparent 30%, rgba(255, 255, 255, .1) 36%, rgba(255, 255, 255, .35) 44%,
      #fff 52%, #fff 80%, rgba(255, 255, 255, .35) 86%, rgba(255, 255, 255, .1) 92%, transparent 95%, transparent 100%),
    linear-gradient(#fff, transparent 420px, transparent calc(100% - 420px), #fff),
    linear-gradient(to right, #fff, transparent 420px, transparent calc(100% - 420px), #fff);
  -webkit-mask-composite: source-in, source-over;
  mask-image:
    conic-gradient(from var(--beam-angle), transparent 0%, transparent 30%, rgba(255, 255, 255, .1) 36%, rgba(255, 255, 255, .35) 44%,
      #fff 52%, #fff 80%, rgba(255, 255, 255, .35) 86%, rgba(255, 255, 255, .1) 92%, transparent 95%, transparent 100%),
    linear-gradient(#fff, transparent 420px, transparent calc(100% - 420px), #fff),
    linear-gradient(to right, #fff, transparent 420px, transparent calc(100% - 420px), #fff);
  mask-composite: intersect, add;
  opacity: var(--beam-inner);
  animation: beam-hue var(--beam-hue-dur) ease-in-out infinite;
}
/* 꼬리 빛 — 하이라이트 끝의 밝은 점을 크게 흐려 테두리 안에만 */
.beam-border > .beam-glow {
  z-index: 3; padding: var(--beam-bw);
  background: conic-gradient(from var(--beam-angle), transparent 0%, transparent 50%,
    rgba(0, 0, 0, .02) 55%, rgba(0, 0, 0, .08) 60%, rgba(0, 0, 0, .2) 65%, rgba(0, 0, 0, .4) 68%, rgba(0, 0, 0, .6) 70%,
    rgba(0, 0, 0, .6) 71%, rgba(0, 0, 0, .4) 74%, rgba(0, 0, 0, .2) 78%, rgba(0, 0, 0, .08) 83%, rgba(0, 0, 0, .02) 88%, transparent 93%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  filter: blur(20px) brightness(var(--beam-bright)) saturate(var(--beam-sat));
  opacity: var(--beam-bloom);
}
html[data-theme="dark"] .beam-border > .beam-glow {
  background: conic-gradient(from var(--beam-angle), transparent 0%, transparent 58%,
    rgba(255, 255, 255, .03) 62%, rgba(255, 255, 255, .08) 65%, rgba(255, 255, 255, .2) 67%, rgba(255, 255, 255, .45) 69%,
    rgba(255, 255, 255, .85) 70%, rgba(255, 255, 255, .85) 70.5%, rgba(255, 255, 255, .45) 71.5%, rgba(255, 255, 255, .2) 73%,
    rgba(255, 255, 255, .08) 75%, rgba(255, 255, 255, .03) 78%, transparent 82%);
}
@keyframes beam-spin { to { --beam-angle: 360deg; } }
@keyframes beam-hue {
  0%, 100% { filter: blur(9px) hue-rotate(-30deg) brightness(var(--beam-bright)) saturate(var(--beam-sat)); }
  50% { filter: blur(9px) hue-rotate(30deg) brightness(var(--beam-bright)) saturate(var(--beam-sat)); }
}
/* 대회 목록 카드는 포스터 띠 때문에 overflow 를 잘랐었다 — 빛이 테두리 위에 겹치도록 풀고, 포스터 띠 윗모서리를 직접 둥글게 */
.tournament-card.has-cover.beam-border { overflow: visible; }
.tournament-card.beam-border .tournament-card-cover { border-radius: calc(var(--radius-lg) - 1.5px) calc(var(--radius-lg) - 1.5px) 0 0; }
.live-tournament.beam-border { --beam-edge: 2px; }

/* 161차: 추천사이트 맨 위(제목 아래) 작은 ON AIR 줄 — 치지직에서 지금 포켓몬 유나이트 방송 중인 위 2개 (onair.js · /api/onair).
   알약 하나 = 채널 · 제목(말줄임) · 시청자. 바깥 그림은 CSP 로 안 쓰니 글자만, 휴대폰은 알약이 한 줄씩 */
.onair-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; font-size: 12.5px; }
.onair-strip[hidden] { display: none; }
.onair-label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: #e5243b; color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .08em; }
.onair-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s ease-in-out infinite; }
.onair-list { display: contents; }
.onair-item {
  display: inline-flex; align-items: center; gap: 7px; max-width: 340px; padding: 5px 12px 5px 10px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  transition: transform .25s var(--ease-bounce), border-color .2s ease;
}
.onair-item:hover { text-decoration: none; transform: translateY(-2px); border-color: #00ffa3; }
.onair-channel { flex: none; font-weight: 800; }
.onair-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-2); }
.onair-viewers { flex: none; display: inline-flex; align-items: center; gap: 3px; color: #e5243b; font-weight: 800; }
.onair-viewers::before {
  content: ""; width: 12px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 560px) { .onair-item { max-width: 100%; flex: 1 1 100%; } .onair-viewers { margin-left: auto; } }

/* 166차: 대회 › 스크림 — 한 줄 = 날짜 · A팀 VS B팀(이긴 쪽 노란 칩) · 점수/상태, 상세는 양 팀 카드 + 결과 캡처 */
.scrim-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.scrim-item { display: grid; gap: 6px; }
.scrim-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-md, 16px); background: var(--surface); color: var(--text);
  transition: transform .25s var(--ease-bounce), border-color .2s ease;
}
.scrim-row:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--poke-yellow); }
.scrim-item.is-pending .scrim-row { border-style: dashed; }
.scrim-date { display: grid; font-weight: 800; font-size: 15px; line-height: 1.1; }
.scrim-date small { color: var(--text-3); font-size: 11px; font-weight: 600; }
.scrim-team { display: grid; gap: 2px; min-width: 0; }
.scrim-team.is-b { text-align: right; justify-items: end; }
.scrim-team-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.scrim-team.is-b .scrim-team-name { flex-direction: row-reverse; }
.scrim-team b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scrim-team:not(.is-win) b { color: var(--text-2); }
.scrim-names { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.scrim-crown { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--poke-yellow); color: var(--on-primary); font-size: 11px; font-weight: 800; }
.scrim-lose { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--surface-muted); color: var(--text-3); font-size: 11px; font-weight: 800; }
.scrim-vs { font-weight: 900; font-size: 12px; letter-spacing: .08em; color: var(--text-3); }
.scrim-vs.is-big { align-self: center; font-size: 18px; }
.scrim-points { font-weight: 800; }
.scrim-reason { margin: 0 4px; color: var(--poke-red); font-size: var(--text-sm); }
.scrim-approve, .scrim-reject { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scrim-approve label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 700; }
.scrim-approve input[type="number"] { width: 84px; }
.scrim-reject { margin-top: 10px; }
.scrim-reject input { flex: 1 1 220px; }
.scrim-board { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; }
.scrim-side-card h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 20px; }
.scrim-side-card.is-win { border-color: var(--poke-yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--poke-yellow) 25%, transparent); }
.scrim-member-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-weight: 700; }
.scrim-shot { display: block; max-width: 100%; max-height: 640px; border-radius: 12px; border: 1.5px solid var(--border); }
.scrim-shots { display: grid; gap: 12px; }  /* 185차: 캡처 여러 장 — 위에서 아래로 */
.scrim-memo { white-space: pre-wrap; margin: 0; }
.scrim-winner { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 6px; font-weight: 700; }
.scrim-team-field { border: 1.5px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.scrim-team-field legend { padding: 0 6px; font-weight: 800; }
.scrim-team-field > input[type="text"] { width: 100%; margin-bottom: 8px; }
.scrim-pickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
@media (max-width: 640px) {
  .scrim-row { grid-template-columns: 52px minmax(0, 1fr); }
  .scrim-row .scrim-vs { display: none; }
  .scrim-row .scrim-team.is-b { grid-column: 2; text-align: left; justify-items: start; }
  .scrim-row .scrim-team.is-b .scrim-team-name { flex-direction: row; }
  .scrim-row .scrim-side { grid-column: 2; }
  .scrim-board { grid-template-columns: 1fr; }
  .scrim-vs.is-big { justify-self: center; }
}

/* 167차: 랭킹 › 종합 순위 1등 카드 뒤에 번지는 무지개 빛 — 사용자가 준 React 'GlowEffect'(static · blur medium · 파랑 → 보라 → 빨강 → 주황)를 CSS 로.
   카드가 스스로 쌓임 맥락(isolation)을 만들고 ::before = 흐린 빛(z -2), ::after = 원래 카드 바탕(z -1) — 빛은 카드 둘레로만 번진다.
   (등장 애니메이션 rise 의 transform 이 있어도 빛이 카드 위로 올라오지 않게 카드 안에서 겹침) */
.rank-podium .podium-card.rank-1 { position: relative; isolation: isolate; background: transparent; }
.rank-podium .podium-card.rank-1::before,
.rank-podium .podium-card.rank-1::after { content: ""; position: absolute; inset: 0; border-radius: calc(var(--radius-lg) - 1.5px); pointer-events: none; }
.rank-podium .podium-card.rank-1::before { z-index: -2; inset: -3px; background: linear-gradient(to right, #0894ff, #c959dd, #ff2e54, #ff9004); filter: blur(12px); opacity: .9; }
.rank-podium .podium-card.rank-1::after { z-index: -1; background: linear-gradient(180deg, color-mix(in srgb, var(--poke-yellow) 22%, var(--surface)), var(--surface)); }

/* 188차: AEOS 디코 BOT 안내 /ranking/discord-bot */
.dbot-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 22px; padding: 24px; }
.dbot-hero-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: #5865f2; color: #fff; }
.dbot-hero-text h2 { margin: 0 0 6px; font-size: 20px; font-family: var(--font-cute); font-weight: var(--cute-weight); }
.dbot-hero-text p { margin: 0; color: var(--text-2); font-size: var(--text-sm); }
.dbot-hero-actions { display: flex; flex-direction: column; gap: 8px; }
.dbot-hero-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.dbot-add { background: #5865f2; border-color: #5865f2; color: #fff; }
.dbot-add:hover { background: #4752c4; border-color: #4752c4; color: #fff; }
.dbot-h { margin: 0 0 12px; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: 20px; }
.dbot-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: dbot; }
.dbot-steps li { position: relative; display: grid; gap: 6px; padding: 18px 18px 18px 58px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); counter-increment: dbot; }
.dbot-steps li::before { content: counter(dbot); position: absolute; left: 18px; top: 16px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--poke-yellow); color: var(--on-primary); font-weight: 800; }
.dbot-steps span { color: var(--text-2); font-size: var(--text-sm); }
.dbot-commands { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dbot-cmd { display: grid; align-content: start; gap: 6px; padding: 16px 18px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.dbot-cmd.is-main { border-color: color-mix(in srgb, #5865f2 55%, var(--border)); }
.dbot-cmd h3 { margin: 0; font-size: 16px; }
/* 197차(사용자): 명령어 이름 · 예시도 고정폭 대신 프리텐다드 */
.dbot-cmd code { font-family: var(--font-cute); }
.dbot-cmd h3 code { color: #5865f2; background: none; padding: 0; font-weight: 800; }
html[data-theme="dark"] .dbot-cmd h3 code { color: #8b95ff; }
.dbot-cmd-desc { margin: 0; font-size: var(--text-sm); }
.dbot-cmd-example { margin: 2px 0 0; font-size: 12.5px; }
.dbot-cmd-example span { padding: 1px 6px; border-radius: 6px; background: var(--surface-muted); color: var(--text-3); font-weight: 800; font-size: 11px; }
.dbot-cmd .meta { margin: 0; }
.dbot-notes ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--text-2); font-size: var(--text-sm); }
@media (max-width: 760px) {
  .dbot-hero { grid-template-columns: auto minmax(0, 1fr); }
  .dbot-hero-actions { grid-column: 1 / -1; }
  .dbot-steps { grid-template-columns: 1fr; }
}

/* 208차: 쪽지 → 209차: 메신저처럼 (왼쪽 대화 목록 · 오른쪽 말풍선 대화창, 760px 아래는 한 칸씩) */
.dm-app { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: clamp(460px, calc(100dvh - 310px), 760px); overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm, none); }
.dm-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); background: var(--surface); }
.dm-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.dm-side-head b { font-size: 15px; }
.dm-convos { flex: 1; min-height: 0; margin: 0; padding: 6px; overflow-y: auto; list-style: none; }
.dm-convo { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; color: var(--text); text-decoration: none; transition: background .15s; }
a.dm-convo:hover { background: var(--surface-muted); text-decoration: none; }
.dm-convo.is-active { background: color-mix(in srgb, var(--poke-yellow) 14%, transparent); }
.dm-convo.is-gone { opacity: .55; }
.dm-convo .avatar { flex: none; }
.dm-convo-main { display: grid; flex: 1; gap: 3px; min-width: 0; }
.dm-convo-top, .dm-convo-bottom { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dm-convo-top b { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.dm-convo-top time { flex: none; color: var(--text-3); font-size: 11px; }
.dm-convo-last { flex: 1; min-width: 0; overflow: hidden; color: var(--text-2); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.dm-convo.is-unread .dm-convo-last { color: var(--text); font-weight: 700; }
.dm-me { color: var(--text-3); font-weight: 600; }
.dm-unread { display: inline-grid; flex: none; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--poke-red); color: #fff; font-size: 11px; font-weight: 800; }
.dm-side-empty { margin: 0; padding: 28px 18px; color: var(--text-3); font-size: 13px; line-height: 1.7; text-align: center; }

.dm-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.dm-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.dm-back { display: none; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--text); }
.dm-back:hover { background: var(--surface-muted); }
.dm-head-who { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; color: var(--text); text-decoration: none; }
.dm-head-who:hover { text-decoration: none; }
.dm-head-who span { display: grid; min-width: 0; line-height: 1.25; }
.dm-head-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-head-who small { color: var(--text-3); font-size: 12px; }
.dm-menu { position: relative; }
.dm-menu summary { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--text-2); cursor: pointer; list-style: none; }
.dm-menu summary::-webkit-details-marker { display: none; }
.dm-menu summary:hover, .dm-menu[open] summary { background: var(--surface-muted); color: var(--text); }
.dm-menu-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; display: grid; min-width: 170px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 30px rgba(0, 0, 0, .14); }
.dm-menu-pop form { margin: 0; }
.dm-menu-pop button { width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.dm-menu-pop button:hover { background: var(--surface-muted); }
.dm-menu-pop button.is-danger { color: var(--poke-red); }

.dm-thread { display: flex; flex: 1; flex-direction: column; gap: 4px; min-height: 0; padding: 16px 18px; overflow-y: auto; overscroll-behavior: contain; }
.dm-thread-empty { margin: auto; color: var(--text-3); font-size: 13px; text-align: center; }
.dm-day { display: flex; align-items: center; gap: 10px; margin: 12px 0 8px; color: var(--text-3); font-size: 11px; font-weight: 700; }
.dm-day::before, .dm-day::after { flex: 1; height: 1px; background: var(--border); content: ""; }
.dm-msg { display: flex; align-items: flex-end; gap: 6px; max-width: 78%; margin-top: 6px; }
.dm-msg.is-cont { margin-top: 0; }
.dm-msg.is-mine { flex-direction: row-reverse; align-self: flex-end; }
.dm-msg.is-theirs { align-self: flex-start; }
.dm-msg-avatar { flex: none; align-self: flex-start; width: 32px; }
.dm-msg.is-cont .dm-msg-avatar { visibility: hidden; height: 0; }
.dm-bubble { padding: 9px 13px; border-radius: 18px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; animation: dm-pop .22s var(--ease-bounce, ease-out); }
.dm-msg.is-mine .dm-bubble { border-bottom-right-radius: 6px; background: var(--poke-yellow); color: var(--on-primary, #1c1917); }
.dm-msg.is-theirs .dm-bubble { border: 1px solid var(--border); border-bottom-left-radius: 6px; background: var(--surface); color: var(--text); }
.dm-msg.is-mine.is-cont .dm-bubble { border-top-right-radius: 6px; }
.dm-msg.is-theirs.is-cont .dm-bubble { border-top-left-radius: 6px; }
.dm-msg-meta { display: grid; flex: none; justify-items: end; gap: 1px; color: var(--text-3); font-size: 10px; line-height: 1.2; white-space: nowrap; }
.dm-msg.is-theirs .dm-msg-meta { justify-items: start; }
.dm-unread-mark { color: var(--poke-yellow); font-size: 11px; font-weight: 800; }
@keyframes dm-pop { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }

.dm-blocked { margin: 0; padding: 8px 16px; border-top: 1px solid var(--border); background: var(--surface-muted); color: var(--text-2); font-size: 12px; }
.dm-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.dm-compose textarea { flex: 1; min-height: 42px; max-height: 160px; padding: 10px 14px; border-radius: 21px; line-height: 1.45; resize: none; }
.dm-send { display: grid; flex: none; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--poke-yellow); color: var(--on-primary, #1c1917); cursor: pointer; transition: transform .15s var(--ease-bounce, ease-out), opacity .15s; }
.dm-send:hover { transform: scale(1.06); }
.dm-send:disabled { opacity: .5; cursor: progress; }

.dm-idle { display: grid; flex: 1; place-content: center; justify-items: center; gap: 12px; padding: 24px; color: var(--text-3); text-align: center; }
.dm-idle p { margin: 0; font-size: 14px; }
.dm-idle-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--surface-muted); color: var(--poke-yellow); }
.dm-pick { display: grid; gap: 12px; max-width: 440px; padding: 24px 20px; }
.dm-pick label { font-weight: 700; }
.dm-pick .btn { justify-self: start; }

@media (max-width: 760px) {
  .dm-app { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 190px); min-height: 420px; border-radius: 14px; }
  .dm-app.is-thread .dm-side, .dm-app:not(.is-thread) .dm-main { display: none; }
  .page-container:has(.dm-app.is-thread) .page-header { display: none; }  /* 대화창은 화면을 넓게 */
  .dm-app.is-thread { height: calc(100dvh - 130px); }
  body:has(.dm-app.is-thread) .theme-toggle { display: none; }  /* 보내기 버튼을 가리지 않게 */
  .dm-side { border-right: 0; }
  .dm-back { display: grid; }
  .dm-msg { max-width: 86%; }
  .dm-thread { padding: 12px; }
}

/* 212차: 프로필 비공개 */
.check-hint { display: block; margin-top: 3px; color: var(--text-3); font-size: 12px; font-weight: 500; line-height: 1.5; }
.privacy-panel p { margin: 0 0 10px; line-height: 1.6; }
.profile-private { display: grid; justify-items: center; gap: 12px; max-width: 520px; margin: 24px auto; padding: 36px 24px; text-align: center; }
.profile-private h1 { margin: 0; }
.profile-private .lock { font-size: 34px; }
.profile-private p { margin: 0; color: var(--text-2); }
.profile-private-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--surface-muted); color: var(--text-2); font-size: 13px; }

/* 215차: 대표 뱃지 고르기 */
.rep-badge-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.rep-badge-opt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: 13px; }
.rep-badge-opt:has(input:checked) { border-color: var(--poke-yellow); box-shadow: 0 0 0 2px color-mix(in srgb, var(--poke-yellow) 30%, transparent); }
.rep-badge-opt input { margin: 0; accent-color: var(--poke-yellow); }
/* 216차: 대화창 '이전 메시지 더 보기' */
.dm-older { align-self: center; margin: 4px auto 8px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 700; cursor: pointer; }
.dm-older:hover { color: var(--text); border-color: var(--text-3); }
.dm-older:disabled { opacity: .5; cursor: wait; }

/* 218차: 서클관리도구 › 페이지 꾸미기 — 서클 홈페이지 주소 · 테마 1~5 고르기 */
.csite-setup { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); }
.csite-setup legend { padding: 0 6px; font-weight: 800; }
.csite-slug-input { display: flex; align-items: center; gap: 4px; }
.csite-slug-input input { flex: 1; min-width: 0; }
.csite-theme-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.csite-theme-pick { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-size: 13px; }
.csite-theme-pick:has(input:checked) { border-color: var(--p); box-shadow: 0 0 0 2px color-mix(in srgb, var(--p) 35%, transparent); }
.csite-theme-pick input { margin: 0; }
.csite-theme-sw { display: inline-flex; gap: 3px; }
.csite-theme-sw i { width: 14px; height: 14px; border: 1px solid var(--b); border-radius: min(var(--r), 4px); background: var(--p); }
.csite-theme-sw i:nth-child(2) { background: var(--s); }
.csite-theme-sw i:nth-child(3) { background: var(--a); }
.csite-set-sub { margin: 18px 0 8px; font-size: 14px; }  /* 225차: 테마 칸 안 '홈 히어로' */

/* 220차: 서클관리도구 맨 위 '서클 홈페이지' 카드 · 홈페이지 설정 화면 */
.csite-home-card { display: grid; gap: 12px; }
.csite-home-card.is-on { border-color: color-mix(in srgb, var(--poke-yellow) 55%, var(--border)); }
.csite-home-card-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.csite-home-card-head > div { flex: 1; min-width: 220px; }
.csite-home-card-head h2 { margin: 0; }
.csite-home-card-head p { margin: 4px 0 0; }
.csite-home-card-logo { display: grid; place-items: center; flex: none; width: 48px; height: 48px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-muted); font-size: 26px; }
.csite-home-card-logo img { width: 100%; height: 100%; object-fit: contain; }
.csite-settings { display: grid; gap: 16px; }
.csite-settings .panel { display: grid; gap: 12px; margin: 0; }
.csite-settings .panel h2 { margin: 0; }
.csite-settings-save { justify-content: flex-start; }
/* 222차: 홈페이지 설정 — 칸을 줄이고 2열로 맞춤 */
.csite-set h2 { font-size: 17px; }
.csite-set .field { display: grid; gap: 6px; margin: 0; }
.csite-set .field > span:first-child { font-size: 13px; font-weight: 800; color: var(--text-2); }
.csite-set .field input:not([type="file"]), .csite-set .field textarea { width: 100%; box-sizing: border-box; }
.csite-set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
.csite-set .csite-slug-input input, .csite-set-grid input { height: 40px; }
.csite-set-grid .is-wide { grid-column: 1 / -1; }
.csite-set .cpage-logo-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 180px; gap: 16px; align-items: center; }
@media (max-width: 640px) { .csite-set-grid, .csite-set .cpage-logo-row { grid-template-columns: 1fr; } }

/* ---------- 227차(사용자: '토글은 다 이렇게'): 접었다 펴는 칸(details) = FAQ 아코디언 모양 ----------
   밑줄 한 줄로 나뉜 줄 · 제목 줄 오른쪽 ⌄ (펴면 뒤집힘) · 마우스를 올리면 밑줄 · 열고 닫을 때 높이가 부드럽게(site.js).
   드롭다운 메뉴(프로필 · 언어 · 섬 검색 · 메신저 메뉴)는 빼고, :where 라 각 화면의 원래 모양(색 · 글자 크기 · 패널)이 이김 */
:where(details:not(.user-menu, .lang-switch, .island-search, .dm-menu)) { border-bottom: 1px solid var(--border); }
:where(details:not(.user-menu, .lang-switch, .island-search, .dm-menu)) > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0;
  list-style: none; cursor: pointer; font-weight: 700; transition: color .15s ease;
}
:where(details:not(.user-menu, .lang-switch, .island-search, .dm-menu)) > summary::-webkit-details-marker { display: none; }
:where(details:not(.user-menu, .lang-switch, .island-search, .dm-menu)) > summary::after {
  content: ""; flex: none; width: 16px; height: 16px; margin-left: auto; background: currentColor; opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s ease;
}
:where(details:not(.user-menu, .lang-switch, .island-search, .dm-menu))[open] > summary::after { transform: rotate(180deg); }
@media (hover: hover) { :where(details:not(.user-menu, .lang-switch, .island-search, .dm-menu)) > summary:hover { text-decoration: underline; text-underline-offset: 4px; } }  /* 휴대폰은 누른 뒤 밑줄이 남아서 마우스만 */
:where(details.is-acc-animating) { overflow: hidden; }
:where(details[open]:not(.user-menu, .lang-switch, .island-search, .dm-menu)) > :not(summary) { animation: acc-fade .25s ease-out; }
@keyframes acc-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- 227차(사용자: '모바일에서 = 누르면 세로메뉴로'): 휴대폰 상단바 ☰ → 오른쪽 세로 메뉴 (_mobile_menu.html · site.js) ---------- */
.mnav-open, .mnav { display: none; }
@media (max-width: 767.98px) {
  .topbar-nav { display: none; }  /* 가로 알약 메뉴 대신 ☰ (서브탭은 그대로) */
  /* 227차(사용자 '오른쪽 위 아이콘들이 삐져나와'): 메뉴 줄이 없어져 로고 줄 하나만 남으니 아이콘도 같은 줄에 (전엔 absolute 로 두 줄 높이에 기댔음) */
  .topbar { flex-wrap: nowrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .topbar-brand { width: auto; flex: 1 1 auto; min-width: 0; }
  .topbar-actions { position: relative; top: auto; right: auto; flex: none; gap: 6px; margin-left: auto; }
  .mnav-open {
    display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; padding: 0; cursor: pointer;
    border: 1.5px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text);
  }
  .mnav-open:hover, .mnav-open[aria-expanded="true"] { border-color: var(--poke-yellow); }
  .mnav {
    display: flex; flex-direction: column; position: fixed; inset: 0 0 0 auto; z-index: 1200; width: min(86vw, 360px);
    background: var(--bg); border-left: 1px solid var(--border); box-shadow: -18px 0 48px rgba(0, 0, 0, .18);
    transform: translateX(104%); transition: transform .28s var(--ease-bounce, ease);
  }
  html.is-mnav-open .mnav { transform: none; }
  html.is-mnav-open { overflow: hidden; }
  .mnav-scrim { position: fixed; inset: 0; z-index: 1199; background: rgba(10, 10, 20, .42); }
}
.mnav-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.mnav-brand img { display: block; height: 24px; width: auto; }
.mnav-icon { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; }
.mnav-icon:hover { background: var(--surface-muted); }
.mnav-body { flex: 1; overflow-y: auto; padding: 4px 18px 28px; overscroll-behavior: contain; }
.mnav-link { display: block; padding: 16px 0; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 800; font-size: 17px; text-decoration: none; }
.mnav-link.is-current { color: var(--highlight, var(--text)); }
.mnav-group > summary { padding: 16px 0; font-size: 17px; font-weight: 800; }
.mnav-group-name { display: grid; gap: 2px; }
.mnav-group-name small { color: var(--text-3); font-size: 12px; font-weight: 600; }
.mnav-items { display: grid; gap: 2px; padding: 0 0 14px; }
.mnav-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; color: var(--text); text-decoration: none; }
.mnav-item:hover { background: var(--surface-muted); text-decoration: none; }
.mnav-item-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-muted); color: var(--text-2); }
.mnav-item-text { display: grid; gap: 1px; min-width: 0; }
.mnav-item-text b { font-size: 15px; font-weight: 700; }
.mnav-item-text small { color: var(--text-3); font-size: 12px; }
.mnav-all { display: inline-flex; align-items: center; gap: 4px; justify-self: start; margin: 4px 8px 0; color: var(--text-2); font-size: 13px; font-weight: 700; }

/* ---------- 227차(사용자 '허브 프로필 사진 이렇게 수정할 수 있게'): 내 계정 › 프로필 사진 › 포켓몬 그림으로 고르기 ----------
   21st.dev Logo Cloud 모양(테두리 칸 격자 · 한 칸 걸러 옅은 바탕 · 네 모서리에서 뻗는 점선)을 CSS 로 */
.avatar-pick { margin-top: 14px; text-align: left; }
.avatar-pick > summary { font-size: var(--text-sm); }
.avatar-cloud-wrap { position: relative; margin: 26px 26px 10px; }
.avatar-cloud {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  max-height: 440px; overflow-y: auto; overscroll-behavior: contain;
}
@media (min-width: 640px) { .avatar-cloud { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .avatar-cloud { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.avatar-cloud-cell {
  display: grid; justify-items: center; gap: 4px; padding: 14px 4px 10px; border: 0; border-radius: 0; cursor: pointer;
  background: transparent; color: var(--text-2); font: 700 11px/1.25 var(--font-body);
  box-shadow: 1px 0 0 var(--border), 0 1px 0 var(--border); transition: background-color .15s ease, color .15s ease;
}
.avatar-cloud-cell:nth-child(odd) { background: color-mix(in srgb, var(--surface-muted) 60%, transparent); }
.avatar-cloud-cell img { width: 56px; height: 56px; object-fit: contain; transition: transform .2s var(--ease-bounce, ease); }
.avatar-cloud-cell span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-cloud-cell:hover, .avatar-cloud-cell:focus-visible { background: color-mix(in srgb, var(--poke-yellow) 16%, var(--surface)); color: var(--text); }
.avatar-cloud-cell:hover img, .avatar-cloud-cell:focus-visible img { transform: scale(1.12) translateY(-2px); }
.avatar-cloud-tick { position: absolute; pointer-events: none; border: 0 dashed var(--border-strong, var(--border)); }
.avatar-cloud-tick[class*="-x"] { width: 24px; border-bottom-width: 1px; }
.avatar-cloud-tick[class*="-y"] { height: 24px; border-left-width: 1px; }
.avatar-cloud-tick.is-tl-x, .avatar-cloud-tick.is-bl-x { left: 0; transform: translateX(-100%); -webkit-mask-image: linear-gradient(to left, #000, transparent); mask-image: linear-gradient(to left, #000, transparent); }
.avatar-cloud-tick.is-tr-x, .avatar-cloud-tick.is-br-x { right: 0; transform: translateX(100%); -webkit-mask-image: linear-gradient(to right, #000, transparent); mask-image: linear-gradient(to right, #000, transparent); }
.avatar-cloud-tick.is-tl-x, .avatar-cloud-tick.is-tr-x { top: -1px; }
.avatar-cloud-tick.is-bl-x, .avatar-cloud-tick.is-br-x { bottom: 0; }
.avatar-cloud-tick.is-tl-y, .avatar-cloud-tick.is-bl-y { left: 0; }
.avatar-cloud-tick.is-tr-y, .avatar-cloud-tick.is-br-y { right: -1px; }
.avatar-cloud-tick.is-tl-y, .avatar-cloud-tick.is-tr-y { top: 0; transform: translateY(-100%); -webkit-mask-image: linear-gradient(to top, #000, transparent); mask-image: linear-gradient(to top, #000, transparent); }
.avatar-cloud-tick.is-bl-y, .avatar-cloud-tick.is-br-y { bottom: 0; transform: translateY(100%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent); mask-image: linear-gradient(to bottom, #000, transparent); }
.avatar-pick-note { margin: 0 26px 6px; }
@media (max-width: 640px) { .avatar-cloud-wrap { margin: 20px 16px 10px; } .avatar-cloud-tick[class*="-x"] { width: 14px; } .avatar-cloud-tick[class*="-y"] { height: 14px; } .avatar-pick-note { margin: 0 16px 6px; } }

/* ---------- 227차(사용자 '이거 적용해줘' — 21st.dev File Upload 05): 프로필 사진 자르기 창 (static/js/avatar-crop.js) ---------- */
html.is-acrop-open { overflow: hidden; }
.acrop { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; padding: 16px; background: rgba(10, 10, 20, .45); }
.acrop[hidden] { display: none; }
.acrop-card {
  width: min(100%, 384px); padding: 18px 24px 24px; border: 1px solid var(--border); border-radius: 18px;
  background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
}
.acrop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.acrop-head h2 { margin: 0; font-size: 16px; font-weight: 800; }
.acrop-x { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); cursor: pointer; }
.acrop-x:hover { background: var(--surface-muted); color: var(--text); }
.acrop-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px 0 0; text-align: center; animation: acrop-in .3s ease-out; }
.acrop-stage[hidden] { display: none; }
@keyframes acrop-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
.acrop-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; max-width: 100%;
  border: 2px dashed color-mix(in srgb, var(--text-3) 35%, transparent); border-radius: 50%; cursor: pointer;
  color: var(--text-3); font-size: 12px; font-weight: 600; transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.acrop-drop p { margin: 0; }
.acrop-drop:hover, .acrop-drop:focus-visible { border-color: color-mix(in srgb, var(--text-3) 60%, transparent); outline: none; }
.acrop-drop.is-active { border-color: var(--poke-yellow); background: color-mix(in srgb, var(--poke-yellow) 8%, transparent); transform: scale(1.02); }
.acrop-drop-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px dashed color-mix(in srgb, var(--text-3) 45%, transparent); border-radius: 50%; background: var(--bg); }
.acrop-help { max-width: 230px; margin: 0; color: var(--text-3); font-size: 12px; }
.acrop-frame {
  position: relative; max-width: 100%; overflow: hidden; border: 2px dashed color-mix(in srgb, var(--poke-yellow) 60%, transparent); border-radius: 50%;
  background: var(--surface-muted); cursor: grab; touch-action: none; user-select: none;
}
.acrop-frame.is-dragging { cursor: grabbing; }
.acrop-frame img { position: absolute; left: 50%; top: 50%; max-width: none; pointer-events: none; transition: transform .15s ease-out; }
.acrop-frame.is-dragging img { transition: none; }
.acrop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); pointer-events: none; }
.acrop-zoom { display: flex; align-items: center; gap: 10px; width: 100%; color: var(--text-3); }
.acrop-zoom input { flex: 1; accent-color: var(--poke-yellow); }
.acrop-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.acrop-actions > span { display: flex; gap: 6px; }
.acrop-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.acrop-ghost { border-color: transparent; background: transparent; }
.acrop-result { position: relative; }
.acrop-result img { display: block; border: 1px solid var(--border); border-radius: 50%; object-fit: cover; }
.acrop-check {
  position: absolute; right: 4px; bottom: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: #2dd4bf; color: #fff; animation: acrop-in .3s ease-out;
}
.acrop-done-title { margin: 0; font-size: 14px; font-weight: 700; }

/* ---------- 227차(사용자 '종합 점수도 나타나게'): 회원 프로필 종합 점수 칸 — 한 줄 전체 ---------- */
.kpi-card.kpi-overall { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--poke-yellow) 55%, var(--border)); background: color-mix(in srgb, var(--poke-yellow) 8%, var(--surface)); }
.kpi-overall .value small { margin-left: 4px; color: var(--text-3); font-size: .45em; font-weight: 700; }
.kpi-overall-note { display: block; margin-top: 6px; color: var(--text-3); font-size: 12px; line-height: 1.5; }

/* ---------- 227차(사용자 '아래거 적용' — 21st.dev Context Menu): 오른쪽 클릭 메뉴 (_context_menu.html · js/context-menu.js) ----------
   메뉴 판 = 테두리 + 그림자 · 열 때 0.18초 커지며 나타남 · 줄 높이 36px · 고른 줄은 옅은 바탕 */
.ctx-menu {
  position: fixed; z-index: 1400; min-width: 13rem; padding: 4px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 18px 48px -24px rgba(0, 0, 0, .4);
  opacity: 0; transform: scale(.96); transition: opacity .18s cubic-bezier(.23, 1, .32, 1), transform .18s cubic-bezier(.23, 1, .32, 1);
}
.ctx-menu.is-open { opacity: 1; transform: none; }
.ctx-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); font: 500 14px/1.2 var(--font-body); text-align: left; text-decoration: none; cursor: default;
  transition: background-color .1s ease-out;
}
.ctx-item svg { flex: none; color: var(--text-3); }
.ctx-item:hover, .ctx-item.is-active, .ctx-item:focus-visible { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); text-decoration: none; outline: none; }
.ctx-item:disabled { opacity: .45; pointer-events: none; }
.ctx-item kbd { margin-left: auto; padding-left: 16px; border: 0; background: none; color: var(--text-3); font: 500 11px var(--font-body); letter-spacing: .02em; }
.ctx-sep { height: 1px; margin: 4px 0; background: var(--border); }
.ctx-hint { margin: 2px 10px 4px; color: var(--text-3); font-size: 11px; }
/* 228차: 메인 디자인 — 다크 · 라이트 따로 켜기 */
.hero-design-modes { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: flex-end; flex-shrink: 0; }
@media (max-width: 560px) { .hero-design-list li { flex-direction: column; align-items: stretch; } .hero-design-modes { justify-content: flex-start; } }

/* ---------- 227차(사용자 '뱃지가 너무 많으면 겹쳐'): 좁은 자리 뱃지는 종류마다 하나 + 나머지 '+N' (_macros.html compact_badges) ---------- */
.badge-more {
  display: inline-flex; align-items: center; height: 20px; margin-left: 4px; padding: 0 7px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-muted); color: var(--text-2); font: 700 11px/1 var(--font-body); white-space: nowrap; cursor: default; vertical-align: middle;
}
