/* 모바일 전용 레이아웃 — 데스크탑 분기 없음. 폭은 폰 기준(최대 480px)으로 고정 */
:root {
  color-scheme: dark; /* 이미 어두운 화면이라고 브라우저에 알림: 삼성 인터넷·크롬의 "웹 페이지 다크 모드"가 그림(포로 등) 색을 바꾸지 않게 */
  --bg: #0e1116;
  --surface: #171b22;
  --surface-2: #1f2530;
  --line: #2a313d;
  --text: #e8ebf0;
  --muted: #8b95a5;
  --accent: #d6a84a;
  --accent-ink: #1a1408;
  --danger: #e5534b;
  --radius: 14px;
  --tap: 48px;
  --nav-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --fury: #e5534b;
  --calm: #3fb27f;
  --mind: #4c8dea;
  --body: #e68a3a;
  --chaos: #a86ee0;
  --order: #e2c541;
  --colorless: #8b95a5;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* 상단 바 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 18px; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  min-width: var(--tap); height: var(--tap); border: 0; border-radius: 12px;
  background: transparent; font-size: 22px; display: grid; place-items: center;
}

/* 하단 탭 */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar a { display: grid; place-items: center; align-content: center; gap: 2px; font-size: 12px; color: var(--muted); }
.tabbar a span { font-size: 22px; line-height: 1; }
.tabbar a span .ui-ic { width: 22px; height: 22px; stroke-width: 1.8; }
.tabbar .tab-ic { height: 24px; width: auto; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.tabbar a:not([aria-current]) .tab-ic { opacity: .7; }
.tabbar a[aria-current="page"] { color: var(--accent); }
.with-tabbar { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }

/* 공통 */
.wrap { padding: 12px 16px; }
.muted { color: var(--muted); }
.btn {
  height: var(--tap); padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; width: 100%;
}
.btn:disabled { opacity: .5; }
.field {
  width: 100%; height: var(--tap); padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); outline: none;
  font-size: 16px; /* iOS 확대 방지 */
}
.field:focus { border-color: var(--accent); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* 로그인 */
.login { min-height: 100dvh; display: grid; place-content: center; gap: 14px; padding: 24px; }
.login h1 { margin: 0; font-size: 26px; text-align: center; }
.login p { margin: 0 0 8px; text-align: center; }
.notice-box {
  max-width: 320px; margin-top: 4px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  font-size: 13px; line-height: 1.55; color: var(--muted, #9aa4b2); word-break: keep-all;
}
.notice-box strong { display: block; margin-bottom: 4px; color: var(--danger); font-size: 14px; }
.error { color: var(--danger); min-height: 1.5em; text-align: center; margin: 0; }

/* 검색 + 필터 */
.sticky-head { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.sticky-head .topbar { position: static; border-bottom: 0; }
.search { padding: 4px 16px 6px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 16px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 14px; white-space: nowrap;
}
.chip small { font-size: 11px; opacity: .8; }
#sets { padding-bottom: 0; padding-top: 9px; }
#sets .chip { position: relative; }
/* 세트 칩 오른쪽 위 보라색 '미리보기' 꼬리표 (한국판 미발매 세트) */
.chip-pv { position: absolute; top: -8px; right: -2px; padding: 0 6px; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 15px;
  background: linear-gradient(90deg, #8b5cf6, #c084fc); color: #fff; pointer-events: none; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 8px; }
.filter-row select { height: 40px; font-size: 15px; padding: 0 10px; }
.result-count { padding: 0 16px 6px; font-size: 13px; }

/* 카드 목록 */
.card-list { list-style: none; margin: 0; padding: 0 16px; display: grid; gap: 10px; }
.card-row {
  display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center;
  padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  min-height: 92px;
}
.card-row:active { background: var(--surface-2); }
.thumb { width: 64px; aspect-ratio: 744 / 1039; border-radius: 6px; background: var(--surface-2); object-fit: cover; }
.card-row .name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.card-row .name-en { font-size: 12px; color: var(--muted); line-height: 1.3; }
.card-row .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card-row .snippet {
  font-size: 13px; color: var(--muted); margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dots { display: inline-flex; gap: 4px; vertical-align: middle; margin-right: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--colorless); }
/* 한국판 미발매 · 비공식 번역 미리보기: 눈에 띄게 보라색 */
.badge-preview { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; margin-left: 6px; vertical-align: 2px;
  background: linear-gradient(90deg, #8b5cf6, #c084fc); color: #fff; letter-spacing: -.2px; }
.thumb-wrap { position: relative; flex: none; }
.thumb-wrap .thumb-pv { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9.5px; font-weight: 800; text-align: center; color: #fff; background: rgba(139, 92, 246, .92); border-radius: 0 0 6px 6px; padding: 1px 0; }
.preview-banner { margin: 12px 16px 0; padding: 12px 14px; border-radius: var(--radius); border: 2px solid #a78bfa;
  background: linear-gradient(135deg, rgba(139, 92, 246, .22), rgba(192, 132, 252, .08)); font-size: 13.5px; line-height: 1.55; }
.preview-banner b.pv-t { display: block; font-size: 16px; color: #d8b4fe; margin-bottom: 4px; }
.badge-ban {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px;
  background: var(--danger); color: #fff; margin-left: 6px; vertical-align: 2px;
}

/* 카드 상세 */
.hero { display: grid; justify-items: center; padding: 12px 16px 4px; }
/* 카드 상세: 검색 목록의 이전·다음 카드로 */
.card-nav { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 16px 2px; }
.card-nav-btn { width: 48px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
.card-nav-btn:disabled { opacity: .3; cursor: default; }
.card-nav-n { min-width: 72px; text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hero img { width: 78%; max-width: 320px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.hero img.landscape { width: 100%; max-width: none; }
.one-liner { margin: 10px 0 0; padding: 8px 14px; max-width: 320px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--line); text-align: center; font-size: 14px; line-height: 1.5; word-break: keep-all; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 12px 16px 0; }
.stat { padding: 6px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.section {
  margin: 14px 16px 0; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.section h2 { font-size: 15px; margin: 0 0 8px; color: var(--accent); }
.section.ban { border-color: var(--danger); }
.section.ban h2 { color: var(--danger); }
.rules-text { white-space: pre-wrap; }
.flavor { font-style: italic; color: var(--muted); margin-top: 10px; }
.md p { margin: 0 0 8px; }
.md ul { margin: 0 0 8px; padding-left: 20px; }
.md li { margin: 2px 0; }
.md h3, .md h4 { margin: 10px 0 6px; font-size: 15px; }
.md code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: 14px; }
.variants { display: flex; gap: 8px; overflow-x: auto; }
.variants img { width: 72px; border-radius: 6px; }
.ask-btn { margin: 16px 16px 0; width: calc(100% - 32px); }

/* 채팅 */
.chat-page { display: flex; flex-direction: column; height: 100dvh; }
.chat-log {
  flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px;
  overscroll-behavior: contain;
}
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; word-break: break-word; }
.bubble.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.bubble.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.assistant.pending::after { content: "▍"; animation: blink 1s steps(1) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.suggestions { display: grid; gap: 8px; margin-top: 8px; }
.suggestions button {
  text-align: left; min-height: 44px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); font-size: 14px;
}
.composer {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 12px calc(10px + var(--safe-b));
  background: var(--surface); border-top: 1px solid var(--line);
  margin-bottom: calc(var(--nav-h) + var(--safe-b));
}
.composer textarea {
  flex: 1; min-height: var(--tap); max-height: 140px; resize: none; padding: 12px 14px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--bg); outline: none; font-size: 16px;
}
.composer .btn { width: auto; flex: none; }

/* 카드 상세 안 질문 */
.section.pitfalls { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.section.counter { border-color: color-mix(in srgb, #4f8cff 50%, var(--line)); }
.qa-log { display: flex; flex-direction: column; gap: 8px; }
.qa-log:empty { display: none; }
.qa .suggestions { margin: 0 0 10px; }
.qa-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.qa-form textarea {
  flex: 1; min-height: var(--tap); max-height: 120px; resize: none; padding: 12px 14px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--bg); outline: none; font-size: 16px;
}
.qa-form .btn { width: auto; flex: none; }
.qa-clear { background: none; border: 0; font-size: 13px; margin-top: 8px; padding: 6px 0; text-decoration: underline; }

/* 카드 기호 아이콘 (Riot 공식 glyph) */
.g { white-space: nowrap; }
.glyph { height: 1.15em; width: auto; vertical-align: -0.2em; margin: 0 2px 0 1px; }
.g-label { font-size: .92em; font-weight: 600; }
.glyph + .g-only-fallback { display: none; } /* 에너지: 아이콘이 있으면 숫자 아이콘만 */

/* 공식 아이콘 (영역·타입·수치) */
.ic { height: 1.15em; width: auto; vertical-align: -0.22em; }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 6px; align-items: center; }
.dots .ic { height: 16px; }
.stat-ic { white-space: nowrap; }
.stat-ic .ic { margin-right: 2px; }
.meta .ic { height: 1.2em; }

/* 준비 중 안내 */
.coming-soon { text-align: center; padding: 28px 16px; }
.coming-soon .cs-icon { font-size: 36px; margin-bottom: 8px; }
.coming-soon p { margin: 6px 0 0; font-size: 14px; }

/* 상단 마스코트 포로 (직접 그린 32x29 도트 SVG, scripts/draw-poro.py): 통통 튀며 좌우로 오감, 누르면 크게 점프 */
.topbar:has(.mascot) h1 { flex: 0 1 auto; min-width: 0; }
.mascot { --w: 48px; flex: 1; min-width: calc(var(--w) + 8px); height: 44px; position: relative; overflow: visible; container-type: inline-size; }
.mascot .walker { position: absolute; bottom: 0; left: 0; animation: mascot-walk 10s linear infinite; }
.mascot .bouncer { display: block; transform-origin: 50% 100%; }
.mascot .bouncer { animation: poro-bounce .55s ease-in infinite alternate; }
.mascot img { display: block; width: 48px; height: 44px; image-rendering: pixelated; cursor: pointer; }
@keyframes mascot-walk {
  0%   { transform: translateX(0) scaleX(1); }
  48%  { transform: translateX(calc(100cqw - var(--w))) scaleX(1); }
  50%  { transform: translateX(calc(100cqw - var(--w))) scaleX(-1); }
  98%  { transform: translateX(0) scaleX(-1); }
  100% { transform: translateX(0) scaleX(1); }
}
@keyframes poro-bounce {
  0%   { transform: translateY(-7px) scale(.96, 1.04); }
  85%  { transform: translateY(0) scale(1, 1); }
  100% { transform: translateY(0) scale(1.12, .86); }
}
.mascot img.hop { animation: poro-hop .6s ease-out; }
@keyframes poro-hop { 40% { transform: translateY(-12px) rotate(-12deg); } 70% { transform: translateY(-4px) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .mascot .walker, .mascot .bouncer { animation: none; } }

/* 추천 대응 카드 */
.counter-title { font-size: 14px; margin: 14px 0 8px; color: var(--muted); }
.counter-cards { display: grid; gap: 8px; }
.counter-cards a { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.counter-cards img { width: 48px; aspect-ratio: 744 / 1039; object-fit: cover; border-radius: 4px; flex: none; }
.counter-cards span { display: grid; gap: 2px; min-width: 0; }
.counter-cards b { font-size: 14px; }
.counter-cards small { font-size: 12px; color: var(--muted); }

/* 맨 아래 작은 법적 고지 */
.legal { max-width: 480px; margin: 24px auto 0; padding: 12px 16px; font-size: 10.5px; line-height: 1.5; color: var(--muted); opacity: .75; word-break: keep-all; }
.legal p { margin: 0 0 6px; text-align: left; }
.login .legal, body > .legal:first-of-type { margin-top: 8px; }

/* 상단 제목 아이콘 */
.title-ic { height: 1.15em; width: auto; vertical-align: -0.2em; }

/* 방문자 수 */


/* 룰 퀴즈 */
.quiz { padding: 12px 16px; display: grid; gap: 10px; }
.quiz-progress { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.quiz-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.quiz-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.quiz-card { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.quiz-card img { width: 56px; aspect-ratio: 744 / 1039; object-fit: cover; border-radius: 5px; flex: none; }
.quiz-q { font-size: 16px; line-height: 1.5; font-weight: 700; word-break: keep-all; margin: 0; }
.quiz-ox { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-ox button { font-size: 26px; line-height: 1; font-weight: 800; padding: 9px 0; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); color: var(--text, #e6e9ef); }
.quiz-ox button.o { color: #4ea1ff; }
.quiz-ox button.x { color: var(--danger); }
.quiz-ox button.pick { border-color: var(--accent); }
.quiz-ox button:disabled { opacity: .55; }
.quiz-ox button.answer { opacity: 1; border-color: currentColor; background: color-mix(in srgb, currentColor 12%, var(--surface)); }
.quiz-result { padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); line-height: 1.6; font-size: 14px; word-break: keep-all; }
.quiz-result b { font-size: 16px; }
.quiz-score { text-align: center; padding: 8px 0; }
.quiz-score .big { font-size: 48px; font-weight: 800; color: var(--accent); }
.quiz-wrong { display: grid; gap: 8px; }
.quiz-big { margin: 0; display: grid; justify-items: center; gap: 6px; }
.quiz-big button { padding: 0; border: 0; background: none;
  /* 문제를 풀 때는 글씨가 읽히게 크게: 화면 높이에서 나머지 요소 몫(약 350px)을 뺀 만큼 */
  width: min(82vw, 340px, calc((100vh - 350px) * .716)); width: min(82vw, 340px, calc((100dvh - 350px) * .716)); }
/* 정답을 고른 뒤에는 해설이 한 화면에 들어오게 작게 */
.quiz-big.small button { width: min(40vw, 170px, 21vh); }
.quiz-big.wide button { width: min(92vw, 440px); }
.quiz-big img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.quiz-big figcaption { font-size: 13px; text-align: center; }
.quiz-big figcaption a { color: var(--accent); font-weight: 700; }
.quiz-zoom { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.88); display: grid; place-items: center; align-content: center; gap: 10px; padding: 16px; }
.quiz-zoom img { max-width: 100%; max-height: 82vh; border-radius: 12px; }
.quiz-zoom > span { color: #ccc; font-size: 13px; }
@media (max-height: 720px) { .quiz-big.small button { width: min(40vw, 17vh); } .quiz { gap: 8px; } }
.quiz-terms { margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); display: grid; gap: 2px; font-size: 13px; }
.quiz-terms dt { font-weight: 700; color: var(--accent); margin-top: 4px; }
.quiz-terms dd { margin: 0; color: var(--muted); line-height: 1.5; }
.kw { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.kw summary { cursor: pointer; padding: 6px 0; font-size: 14px; font-weight: 700; color: var(--muted); list-style: none; }
.kw summary::-webkit-details-marker { display: none; }
.kw summary::after { content: ' ▸'; }
.kw[open] summary::after { content: ' ▾'; }
.kw-names { font-weight: 400; font-size: 12.5px; color: var(--accent); }
.kw .kw-terms { margin-top: 4px; }
.kw-terms { margin: 0; display: grid; gap: 2px; font-size: 13.5px; }
.kw-terms dt { font-weight: 700; color: var(--accent); margin-top: 6px; }
.kw-terms dd { margin: 0; line-height: 1.55; }

/* 찜 */
.fav-btn { font-size: 22px; color: var(--accent); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 60;
  max-width: min(92vw, 440px); padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px; line-height: 1.45; text-align: center; box-shadow: 0 6px 18px rgba(0,0,0,.4); word-break: keep-all; }
.card-list li { position: relative; }
.row-fav { position: absolute; top: 6px; right: 6px; z-index: 2; width: 36px; height: 36px; border: 0; background: none; font-size: 20px; color: var(--muted); }
.row-fav[aria-pressed="true"] { color: var(--accent); }
.fav-panel { margin: 8px 16px 0; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; display: grid; gap: 8px; word-break: keep-all; }
.fav-panel .row { display: flex; gap: 8px; }
.fav-panel .row button { flex: 1; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 13px; }
.fav-panel .warn { color: var(--danger); }
#fav-toggle[aria-pressed="true"] { color: var(--accent); }
.card-list .card-row { padding-right: 40px; }

/* 봇 확인(Turnstile) 체크 상자: 필요할 때만 뜸. 입력창·하단 탭 위 가운데 */
.ts-box { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 80px); z-index: 70; }
.ts-box:empty { display: none; }

/* 관리자 방문자 통계 (/stats) */
.admin-stats { padding: 12px 16px; display: grid; gap: 12px; }
.stats-key { display: grid; gap: 10px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stats-key p { margin: 0; font-size: 14px; }
.admin-stats .stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.admin-stats .stat-tiles div { padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; }
.admin-stats .stat-tiles small { font-size: 11.5px; color: var(--muted); }
.admin-stats .stat-tiles b { font-size: 24px; font-variant-numeric: tabular-nums; }
.admin-stats .chart { padding-top: 6px; }
.admin-stats .bars { height: 160px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line); }
.admin-stats .bars.dense { gap: 0; }
.admin-stats .bar { flex: 1; height: 100%; padding: 0; border: 0; background: none; display: flex; align-items: flex-end; cursor: pointer; min-width: 0; }
.admin-stats .bar i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .85; }
.admin-stats .bars.dense .bar i { border-radius: 1px 1px 0 0; }
.admin-stats .bar.now i { opacity: .5; }
.admin-stats .bar.on i, .admin-stats .bar:hover i { opacity: 1; outline: 2px solid var(--text); outline-offset: -2px; }
.admin-stats .ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.admin-stats .chart-tip { font-size: 12.5px; margin: 8px 0 0; min-height: 1.4em; color: var(--text); }
.stats-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.stats-table td:last-child, .stats-table th:last-child { text-align: right; }
.stats-note { font-size: 12px; line-height: 1.5; margin: 0; }
.admin-stats .section { margin: 0; }
#range { font-size: 14px; width: auto; padding: 0 10px; }

/* 클로즈드 베타 안내 · 오류/의견 오픈채팅 안내 */
.notice-box.beta { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.notice-box.beta strong { color: var(--accent); }
.notice-box .feedback { display: block; margin-top: 8px; color: var(--text); }
.legal .feedback-line { text-align: center; font-size: 12px; opacity: 1; color: var(--text); margin-bottom: 12px; }
.copy-kw { margin-left: 4px; min-height: 32px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 11.5px; }

/* 🎬 영상 탭: 전설별 RiftTube 바로가기 */
.videos { padding: 12px 16px; display: grid; gap: 12px; }
.videos-intro { padding: 10px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 13px; line-height: 1.55; color: var(--muted); word-break: keep-all; }
.videos-intro b { color: var(--text); }
.legend-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.legend-card { display: grid; gap: 6px; padding: 8px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.legend-card img { width: 100%; aspect-ratio: 744 / 1039; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.legend-card b { font-size: 13.5px; line-height: 1.35; word-break: keep-all; }
.legend-card .links { display: grid; gap: 6px; }
.legend-card .links a { display: block; text-align: center; padding: 7px 4px; border-radius: 10px; font-size: 12.5px; text-decoration: none; }
.legend-card .links a.match { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.legend-card .links a.guide { border: 1px solid var(--line); color: var(--text); }
.videos-more { text-align: center; font-size: 13px; }
.videos-more a { color: var(--accent); }

/* 질문에 사진 붙이기 */
.photo-btn { flex: none; width: var(--tap); height: var(--tap); border-radius: 14px; border: 1px solid var(--line); background: var(--bg); font-size: 20px; line-height: 1; }
.photo-chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 12px; color: var(--muted); background: var(--surface); }
.photo-chip img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.photo-chip span { flex: 1; }
.photo-chip button { background: none; border: 0; font-size: 16px; color: var(--muted); padding: 6px; }
.qa .photo-chip { padding: 6px 0; background: none; }
.photo-tag { font-size: 12px; opacity: .85; margin-bottom: 4px; }
.photo-tag img { display: block; max-width: 160px; max-height: 160px; border-radius: 10px; }

/* 선 아이콘 (이모지 대신). 글자 크기에 맞춰 줄 높이 가운데 */
.ui-ic { width: 1.05em; height: 1.05em; vertical-align: -0.16em; flex: none; }
h1 .ui-ic, .section h2 .ui-ic { stroke-width: 2.2; }
.fav-btn .ui-ic, .row-fav .ui-ic { width: 22px; height: 22px; vertical-align: middle; }
.photo-btn .ui-ic { width: 22px; height: 22px; vertical-align: middle; color: var(--muted); }
.photo-chip button .ui-ic { width: 18px; height: 18px; vertical-align: middle; }
.coming-soon .cs-icon .ui-ic { width: 40px; height: 40px; color: var(--muted); }
.one-liner .quote-ic { width: .9em; height: .9em; opacity: .55; vertical-align: -0.05em; }
.quiz-result .res-ok { color: #3fb950; }
.quiz-result .res-no { color: var(--danger); }
.icon-btn .ui-ic { width: 20px; height: 20px; vertical-align: middle; }

/* 관리자 통계: 많이 물어본 카드·용어 */
.topic-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: t; }
.topic-list li { display: grid; grid-template-columns: 7.5em 1fr 3em; align-items: center; gap: 8px; font-size: 13px; counter-increment: t; }
.topic-list .t-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-list .t-name::before { content: counter(t) ". "; color: var(--muted); }
.topic-list .t-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.topic-list .t-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.topic-list .t-n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 퀴즈: 카드 없는 룰 문제 표시 */
.quiz-rule-badge { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 2px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--surface); }

/* 게임 순서 연습판 (tutorial.html) */
.tut { padding: 10px 12px 24px; display: grid; gap: 10px; }
.tut-count { font-size: 12px; margin-left: auto; white-space: pre; text-align: right; line-height: 1.35; }
/* 좁은 화면: 긴 퍼즐 제목이 잘리지 않게 두 줄까지 */
@media (max-width: 430px) {
  .topbar:has(.tut-count) h1 { font-size: 16px; white-space: normal; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
.tphase { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.tphase.me b { color: var(--accent); }
.tphase.opp b { color: #ff8a80; }
.tphase ol { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.tphase li { padding: 2px 7px; border-radius: 999px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); }
.tphase li.past { opacity: .55; }
.tphase li.now { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.tboard { display: grid; gap: 8px; }
.tp { padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tp.opp { border-color: color-mix(in srgb, #ff8a80 35%, var(--line)); }
.tp.me { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tp-head { display: flex; gap: 8px; align-items: baseline; font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.tp-score { font-weight: 800; font-size: 15px; padding: 0 6px; border-radius: 6px; }
.tp-row { display: flex; gap: 8px; align-items: flex-start; }
.tz { display: grid; gap: 3px; justify-items: start; }
.tz.grow { flex: 1; min-width: 0; }
.tz small, .th small { font-size: 11px; color: var(--muted); }
.tz-units { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; min-height: 30px; font-size: 12px; }
.tc { margin: 0; width: 44px; display: grid; gap: 2px; justify-items: center; }
.tc img, .tc-blank { width: 44px; height: 61px; object-fit: cover; border-radius: 5px; background: var(--surface-2); display: block; }
.tc figcaption { font-size: 10px; line-height: 1.2; text-align: center; color: var(--muted); max-width: 52px; word-break: keep-all; }
.tc-empty { width: 44px; height: 61px; border: 1px dashed var(--line); border-radius: 5px; font-size: 10px; color: var(--muted); display: grid; place-items: center; text-align: center; }
.tu { position: relative; display: grid; justify-items: center; width: 52px; transition: transform .2s; }
.tu.ex .tc { transform: rotate(14deg); opacity: .8; }
.tu-name { font-size: 10px; line-height: 1.2; text-align: center; word-break: keep-all; margin-top: 2px; }
.tu-m { position: absolute; top: 40px; right: -2px; min-width: 22px; padding: 0 4px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; font-weight: 800; text-align: center; }
.tu-m.down { color: #ff8a80; border-color: #ff8a80; }
.tu-m s { font-weight: 400; color: var(--muted); font-size: 10px; }
.tu-dmg { position: absolute; top: 2px; left: -2px; font-size: 10px; padding: 0 4px; border-radius: 6px; background: var(--danger); color: #fff; }
.tu-ex { font-size: 9px; color: var(--muted); }
.tr-runes { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; padding: 3px 4px; border-radius: 8px; }
.tr-label { color: var(--muted); margin-right: 4px; }
.rune { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); }
.rune .ic { width: 16px; height: 16px; }
.rune.ex { transform: rotate(90deg); opacity: .4; }
.tb { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tbf { position: relative; overflow: hidden; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-height: 120px; }
.tbf-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .18; }
.tbf > :not(.tbf-img) { position: relative; }
.tbf-head { display: grid; gap: 2px; font-size: 12px; margin-bottom: 6px; }
.tbf-ctl { font-size: 11px; width: fit-content; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tbf-ctl.me { color: var(--accent); border-color: var(--accent); }
.tbf-ctl.opp { color: #ff8a80; border-color: #ff8a80; }
.th { padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.th-cards { display: flex; gap: 6px; overflow-x: auto; padding-top: 4px; }
.tboard .hi, .tbf.hi, .th.hi, .tr-runes.hi { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.tbf.hi { border-radius: 12px; }
.tnote { padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); line-height: 1.6; font-size: 14px; word-break: keep-all; }
.tnote h2 { font-size: 16px; margin: 0 0 6px; color: var(--accent); }
.tnote p { margin: 0 0 8px; }
.tnote-rule { font-size: 12px; }
.demo-log { display: block; margin-top: 2px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border-left: 3px solid var(--accent); font-size: 13px; line-height: 1.55; color: var(--text); }
.tq { margin-top: 10px; display: grid; gap: 8px; }
.tq-opts { display: grid; gap: 6px; }
.tq-opts button { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.4; }
.tq-opts button.right { border-color: #3fb950; background: color-mix(in srgb, #3fb950 14%, var(--bg)); }
.tq-opts button.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--bg)); }
.tq-why { font-size: 13px; }
.tq-why.ok { color: #3fb950; }
.tq-why.no { color: #ff8a80; }
.tnav { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 12px; }
.tnav .btn { width: 100%; display: grid; place-items: center; text-decoration: none; }
.btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.tq-restart { margin-top: 8px; background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 13px; padding: 6px 0; }
.tut-entry { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.45; }
.tut-entry .ui-ic { width: 26px; height: 26px; color: var(--accent); flex: none; }
.tut-entry small { color: var(--muted); }
.tu.opp .tc img, .tu.opp .tc-blank { box-shadow: 0 0 0 2px #ff8a80; }
.tu.opp .tu-name { color: #ff8a80; }

/* 연습판 덱 화면 */
.tdeck-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tdeck-btns button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; }
.tdeck-btns .ui-ic { color: var(--accent); }
.tc[data-zoom] { cursor: zoom-in; }
.dk { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.dk.opp { border-color: color-mix(in srgb, #ff8a80 35%, var(--line)); }
.dk.me { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.dk h2 { margin: 0; font-size: 16px; }
.dk small { font-size: 11px; color: var(--muted); }
.dk-top { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: start; }
.dk-top > div { display: grid; gap: 3px; }
.dk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.dk-runes .dk-grid { grid-template-columns: repeat(2, 58px); }
.dk-bf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dk-card { position: relative; padding: 0; border: 0; background: none; color: var(--text); display: grid; gap: 2px; justify-items: center; cursor: zoom-in; }
.dk-card img, .dk-card .tc-blank { width: 100%; max-width: 72px; aspect-ratio: 744 / 1039; height: auto; object-fit: cover; border-radius: 5px; background: var(--surface-2); }
.dk-bf .dk-card img, .dk-bf .dk-card .tc-blank { max-width: 100%; aspect-ratio: 1039 / 744; }
.dk-n { position: absolute; top: 2px; right: 2px; padding: 0 5px; border-radius: 999px; background: rgba(0,0,0,.75); color: #fff; font-size: 11px; font-weight: 800; }
.dk-name { font-size: 10px; line-height: 1.2; text-align: center; word-break: keep-all; color: var(--muted); }
.dk-sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; }
.dk-sheet-in { width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; background: var(--bg); border-radius: 16px 16px 0 0; padding: 10px 12px calc(16px + var(--safe-b)); }
.dk-tabs { position: sticky; top: -10px; z-index: 1; display: flex; gap: 6px; padding: 6px 0 8px; background: var(--bg); }
.dk-tabs button { flex: 1; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; }
.dk-tabs button.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.dk-tabs .dk-close { flex: none; width: 36px; display: grid; place-items: center; }
.quiz-zoom { z-index: 60; }

/* 연습판: 카드 움직임 */
.tut { padding-bottom: calc(80px + var(--safe-b)); }
.piles { justify-items: center; }
.pile { position: relative; width: 30px; height: 42px; border-radius: 4px; background: url(/card-back.svg) center / cover, var(--surface-2); box-shadow: 2px 2px 0 var(--line), 4px 4px 0 var(--surface-2); display: grid; place-items: center; }
.pile span { font-size: 11px; font-weight: 800; color: #fff; background: rgba(0,0,0,.65); border-radius: 999px; padding: 0 5px; }
.pile.trash { background: var(--surface-2); box-shadow: none; border: 1px dashed var(--line); }
.pile.trash span { background: none; color: var(--muted); }
.pile.rdeck { width: auto; height: auto; padding: 2px 6px; margin-left: auto; font-size: 11px; color: var(--muted); background: var(--surface-2); box-shadow: none; border: 1px solid var(--line); border-radius: 999px; }
.opp-hand { display: flex; gap: 3px; margin: -2px 0 6px; min-height: 22px; }
.opp-hand .cb { width: 16px; height: 22px; border-radius: 3px; background: url(/card-back.svg) center / cover, var(--surface-2); box-shadow: 0 0 0 1px var(--line); }
.fly-card { position: absolute; z-index: 40; pointer-events: none; } /* 문서 기준: 날아가는 중에 스크롤해도 판과 함께 */
.fly-card .tu-name, .fly-card .tu-m, .fly-card .tu-ex, .fly-card .tu-dmg { display: none; }
.cast { position: fixed; z-index: 45; width: 120px; pointer-events: none; display: grid; gap: 6px; justify-items: center; }
.cast img { width: 120px; border-radius: 8px; box-shadow: 0 0 0 2px #ff8a80, 0 10px 30px rgba(0,0,0,.6); }
.cast b { font-size: 13px; padding: 2px 8px; border-radius: 999px; background: #ff8a80; color: #1a0a08; }
.tnav-fixed { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 6px); z-index: 30; width: min(480px, 100%); padding: 0 12px; display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.tnav-fixed:has(> :only-child) { grid-template-columns: 1fr; } /* 카드 체험 마지막 단계: 이전 버튼만 */
.tnav-fixed .btn { box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.tnav-fixed .btn:disabled { opacity: .85; background: var(--surface-2); color: var(--muted); }
.btn.pulse { animation: tut-pulse 1s ease-in-out 2; }
@keyframes tut-pulse { 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .btn.pulse { animation: none; } .tu { transition: none; } }

/* ===== 연습판 v3: 실제 플레이매트 배치 ===== */
.board { display: grid; gap: 6px; }
.mat { padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: radial-gradient(120% 90% at 50% 0%, #1d2430 0%, var(--surface) 60%); transition: box-shadow .3s; }
.mat.me { background: radial-gradient(120% 90% at 50% 100%, #26221a 0%, var(--surface) 60%); }
.mat.active.me { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(214,168,74,.25); }
.mat.active.opp { border-color: #ff8a80; box-shadow: 0 0 0 1px #ff8a80, 0 0 18px rgba(255,138,128,.22); }
.mat-tag { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.fb { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.fb.first { background: var(--accent); color: var(--accent-ink); }
.fb.second { background: #5b6b82; color: #fff; }
.fb.hi { outline: 2px solid #fff; outline-offset: 2px; }
.now-turn { font-size: 11px; padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); animation: now-blink 1.6s ease-in-out infinite; }
.mat.opp .now-turn { background: rgba(255,138,128,.18); color: #ff8a80; }
@keyframes now-blink { 50% { opacity: .45; } }
.sc { margin-left: auto; font-size: 20px; font-weight: 900; line-height: 1; padding: 2px 6px; border-radius: 8px; }
.sc small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 1px; }
.sc.hi { outline: 2px solid var(--accent); }
.mat-row { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; }
.zn { display: grid; gap: 2px; justify-items: center; flex: none; }
.zn.grow { flex: 1; min-width: 0; justify-items: stretch; }
.zn small { font-size: 10px; color: var(--muted); text-align: center; white-space: nowrap; }
.zn.hi, .rz.hi { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.units, .runes { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 66px; padding: 3px; border-radius: 8px; background: rgba(255,255,255,.03); border: 1px dashed var(--line); }
.runes { min-height: 40px; gap: 2px; }
.zone-empty { font-size: 11px; color: var(--muted); padding: 0 4px; }
.slot-empty { width: 36px; height: 50px; border-radius: 4px; border: 1px dashed var(--line); }
.pls { display: flex; gap: 4px; }
.pl { position: relative; width: 30px; height: 42px; border-radius: 4px; background: url(/card-back.svg) center / cover, var(--surface-2); box-shadow: 1px 1px 0 #0a0d12, 2px 2px 0 var(--line), 3px 3px 0 #0a0d12; display: grid; place-items: center; }
.pl-n { font-size: 11px; font-weight: 800; color: #fff; background: rgba(0,0,0,.7); border-radius: 999px; padding: 0 5px; }
.pl.trash-pile { background: var(--surface-2); box-shadow: none; border: 1px dashed var(--line); }
.pl.trash-pile .pl-n { background: none; color: var(--muted); }
.pl.rune-pile { width: 24px; height: 34px; }
.ohand { display: flex; justify-content: center; gap: 2px; min-height: 24px; margin-top: 4px; }
.ohand .cb { width: 17px; height: 24px; border-radius: 3px; background: url(/card-back.svg) center / cover, var(--surface-2); box-shadow: 0 0 0 1px var(--line); }

/* 카드: 크기별 (u 유닛, m 전설·챔피언, r 룬, h 손패). 탈진하면 완전히 90도 */
.cw { --w: 40px; --h: 56px; position: relative; width: var(--w); flex: none; display: grid; justify-items: center; align-content: start; }
.cw.m { --w: 36px; --h: 50px; }
.cw.r { --w: 22px; --h: 31px; }
.cw.h { --w: 46px; --h: 64px; }
.cw.ex { width: var(--h); }
.cd { position: relative; width: var(--w); height: var(--h); border-radius: 4px; background: var(--surface-2); display: grid; place-items: center; cursor: zoom-in; transform-origin: 50% 50%; }
.cw.ex .cd { transform: rotate(90deg); }
.cd img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; display: block; }
.cd-txt { font-size: 9px; line-height: 1.15; text-align: center; padding: 2px; word-break: keep-all; color: var(--muted); }
.cd-back { position: absolute; inset: 0; border-radius: 4px; background: url(/card-back.svg) center / cover, #1a2233; opacity: 0; pointer-events: none; }
.cw.opp .cd { box-shadow: 0 0 0 2px #ff8a80; }
.cw.me.u .cd { box-shadow: 0 0 0 1px var(--accent); }
.cw.hi .cd { outline: 2px solid var(--accent); outline-offset: 2px; }
.cap { font-size: 9px; line-height: 1.15; text-align: center; max-width: 52px; word-break: keep-all; margin-top: 2px; }
.cw.opp .cap { color: #ff8a80; }
.cw.ex::after { content: '탈진'; font-size: 9px; color: var(--muted); }
.cw.r.ex::after { content: none; }
.cw.ex .cd { margin: calc((var(--w) - var(--h)) / 2) 0; }
.mg { position: absolute; right: -5px; bottom: -5px; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 999px; background: #0e1116; border: 1px solid var(--line); font-size: 11px; font-weight: 900; display: grid; place-items: center; color: var(--text); }
.mg.down { color: #ff8a80; border-color: #ff8a80; }
.mg s { font-size: 8px; color: var(--muted); font-weight: 400; margin-right: 1px; }
.dm { position: absolute; left: -5px; top: -5px; padding: 0 4px; border-radius: 6px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; }
.cw.ex .mg, .cw.ex .dm { transform: rotate(-90deg); }

/* 전장: 위쪽은 상대 유닛, 아래쪽은 내 유닛 */
.arena { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bf { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; grid-template-rows: auto 1fr 1fr; min-height: 168px; }
.bf.hi { outline: 2px solid var(--accent); outline-offset: 2px; }
.bf.ctl-me { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.bf.ctl-opp { border-color: color-mix(in srgb, #ff8a80 60%, var(--line)); }
.bf-art { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .3; }
.bf > :not(.bf-art) { position: relative; }
.bf-name { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 4px 6px; background: rgba(0,0,0,.5); cursor: zoom-in; }
.flag { font-size: 10px; font-weight: 600; padding: 0 5px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.ctl-me .flag { color: var(--accent); border-color: var(--accent); }
.ctl-opp .flag { color: #ff8a80; border-color: #ff8a80; }
.lane { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-items: center; padding: 4px; min-height: 64px; }
.lane.opp { border-bottom: 1px dashed rgba(255,255,255,.12); }
.hand { padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.hand.hi { outline: 2px solid var(--accent); outline-offset: 2px; }
.hand small { font-size: 11px; color: var(--muted); }
.fan { display: flex; justify-content: center; padding-top: 6px; }
.fan .cw + .cw { margin-left: -8px; }
.fan .cw:hover, .fan .cw.hi { z-index: 2; transform: translateY(-6px); }

/* 연출 */
.tbanner { position: fixed; left: 50%; top: 40%; z-index: 60; padding: 14px 24px; border-radius: 16px; font-size: 26px; font-weight: 900; text-align: center; white-space: nowrap; background: rgba(14,17,22,.93); border: 2px solid var(--accent); color: var(--accent); pointer-events: none; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.tbanner small { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-top: 2px; }
.tbanner.opp { border-color: #ff8a80; color: #ff8a80; }
.tbanner.clash { border-color: var(--danger); color: #ff5a50; }
/* 카드 체험: 전장을 가리지 않게 작게, 머리글 바로 아래 */
.tbanner.mini { top: calc(var(--top-h, 60px) + 26px); padding: 5px 14px; font-size: 17px; border-radius: 12px; border-width: 1.5px; }
.tbanner.mini small { font-size: 11px; margin-top: 0; }
.tbanner.coinb { font-size: 20px; color: var(--text); }
.tbanner.coinb b { color: var(--accent); }
.coin { display: inline-block; width: 34px; height: 34px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: radial-gradient(circle at 35% 35%, #ffe7a3, #d6a84a 60%, #8a6420); animation: coin-spin .45s linear 3; }
@keyframes coin-spin { to { transform: rotateY(360deg); } }
.tpop { position: absolute; z-index: 61; font-weight: 900; font-size: 18px; pointer-events: none; white-space: nowrap; text-shadow: 0 2px 6px rgba(0,0,0,.7); }
.tpop.score { color: var(--accent); }
.tpop.dmg { color: #ff5a50; font-size: 24px; }
.tpop.buff { color: #5be37d; font-size: 26px; }
.tut .mg.flash { background: #1f9d48; color: #fff; z-index: 3; transform: scale(1.45); box-shadow: 0 0 0 2px #fff, 0 0 16px #5be37d; animation: mg-flash .45s ease-out 3; }
@keyframes mg-flash { 0% { transform: scale(1); } 50% { transform: scale(1.8); } 100% { transform: scale(1.45); } }
.hitflash { position: fixed; z-index: 61; width: 64px; height: 64px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, #fff 0%, #ff8a80 35%, transparent 70%); }
.cast { width: 150px; }
.cast img, .cast-blank { width: 150px; border-radius: 8px; }
.cast-blank { height: 209px; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; box-shadow: 0 0 0 2px #ff8a80; }
.fly-card .cap, .fly-card:not(.keep-mg) .mg, .fly-card .dm { display: none; }
.fly-card.keep-mg .mg { min-width: 22px; height: 22px; font-size: 13px; right: -6px; bottom: -6px; }
.mg.ally { background: #8a6a1f; color: #fff; border-color: #fff; z-index: 3; transform: scale(1.45); box-shadow: 0 0 14px #d6a84a; animation: mg-flash .45s ease-out 3; }
.mg.foe { background: #b3261e; color: #fff; border-color: #fff; z-index: 3; transform: scale(1.45); box-shadow: 0 0 14px #ff5a50; animation: mg-flash .45s ease-out 3; }
.fly-card .cw::after { content: none; }
/* 덱(뒷면 더미) vs 폐기장(앞면, 붉은 점선 칸) 구분 */
.deckz small { color: #8fb4ff; }
.trashz small { color: #ff8a80; }
.pl.deck-pile { box-shadow: 1px 1px 0 #0a0d12, 2px 2px 0 #3d5a8a, 3px 3px 0 #0a0d12, 4px 4px 0 #3d5a8a; }
.pl.trash-pile { position: relative; overflow: hidden; background: rgba(229,83,75,.08); border: 1px dashed #ff8a80; box-shadow: none; }
.pl.trash-pile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.7) brightness(.75); }
.pl.trash-pile.has { cursor: zoom-in; border-style: solid; }
.pl.trash-pile .pl-n { position: relative; background: rgba(120,20,15,.85); color: #fff; }
.pl-empty { font-size: 8px; line-height: 1.15; text-align: center; color: #ff8a80; opacity: .8; white-space: nowrap; word-break: keep-all; }
.mg.up { color: #5fd38d; border-color: #5fd38d; }
.tg { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); white-space: nowrap; font-size: 9px; font-weight: 800; padding: 0 4px; border-radius: 6px; background: #2b2140; color: #e7d3ff; border: 1px solid #8e6cd8; }
.cw.ex .tg { transform: translateX(-50%) rotate(-90deg); }
.cast.me img { box-shadow: 0 0 0 2px var(--accent), 0 10px 30px rgba(0,0,0,.6); }
.cast.me b { background: var(--accent); color: var(--accent-ink); }

/* 상황 퍼즐: 전장에 숨긴 카드(뒷면) */
.cw.facedown .cd-back { opacity: 1; }
.cw.facedown .cd { outline: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
/* 퀴즈 첫 화면: 상황 퍼즐 목록 */
.puz-list { display: grid; gap: 8px; margin-top: 10px; }
.puz-list h3 { margin: 6px 0 0; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.puz-list h3 .ui-ic { width: 18px; height: 18px; color: var(--accent); }
.puz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.puz { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 13px; line-height: 1.35; min-width: 0; }
.puz .n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.puz.done .n { background: var(--accent); color: #111; }
.puz b { display: block; overflow-wrap: anywhere; }
.puz small { color: var(--muted); }
.puz-sub { margin: 8px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.puz.done { opacity: .78; border-style: dashed; }
.puz-solved { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 700; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.puz-solved .ui-ic { width: 11px; height: 11px; }
.topbar h1 .puz-solved { margin: 0 0 0 6px; vertical-align: middle; }
/* 연습판·퍼즐 아래 질문하기 (고정 이전/다음 버튼과 탭바에 가리지 않게) */
.tut-qa { margin: 0 12px 150px; }
.tut-qa h2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tut-qa-note { font-size: 12px; margin: -4px 0 8px; }
/* 행동·반응 언제 쓰나 정리표 (룰 용어 화면·퀴즈·카드 해설) */
.timing { margin-top: 10px; font-size: 13px; }
.timing-h { display: block; margin-bottom: 6px; color: var(--accent); }
.timing table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.timing th, .timing td { border: 1px solid var(--line); padding: 6px 4px; text-align: center; line-height: 1.35; }
.timing th { background: var(--surface); font-size: 12px; }
.timing th:first-child, .timing td:first-child { text-align: left; width: 46%; padding-left: 8px; }
.timing td.y { color: var(--accent); font-weight: 700; }
.timing td.n { color: var(--muted); }
.timing small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.5; }
.terms-page { padding: 10px 12px 24px; display: grid; gap: 12px; }
.terms-search { width: 100%; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 15px; }
.terms-list dt { font-size: 15px; }
.kw-more { display: inline-block; margin-top: 4px; padding: 6px 0; font-size: 13px; color: var(--accent); }
.terms-page + .tut-qa { margin-bottom: 24px; }
/* 퍼즐 난이도 */
.puz-sub.lv-0 { color: #3fb950; } .puz-sub.lv-1 { color: var(--accent); } .puz-sub.lv-2 { color: #ff8a80; } .puz-sub.lv-3 { color: #c597ff; }
.puz-sub small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.puz-kind { display: inline-block; margin: 4px 4px 0 0; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-style: normal; border: 1px solid var(--line); color: var(--muted); }
.puz-lv { margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; vertical-align: middle; border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
/* 승리 조건 정리 (마지막 1점 퍼즐·룰 용어 화면) */
.victory { font-size: 13px; line-height: 1.6; }
.victory ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.victory ol { margin: 2px 0 0; padding-left: 18px; }
.victory small { display: block; margin-top: 6px; color: var(--muted); }
.victory-box { margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.victory-box summary { cursor: pointer; font-weight: 700; color: var(--accent); font-size: 13px; }
.victory-box .timing-h { display: none; }
/* 관리자: 번역 검토 결과 */
.review-list { margin: 10px 0; padding-left: 20px; display: grid; gap: 10px; font-size: 13.5px; line-height: 1.55; }
.review-list .rv { font-size: 11px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line); }
.review-list .rv.mismatch { color: #ff8a80; border-color: #ff8a80; }
.review-list .rv.unclear { color: var(--accent); border-color: var(--accent); }
.rv-phrase { color: var(--muted); }
.rv-text { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
/* 카드 화면: 번역·해석 주의 */
.reading-note { border-left: 3px solid var(--accent); }
.reading-note.unverified { border-left-color: var(--line); }
.reading-note h2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rn-badge { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.rn-phrase { color: var(--muted); margin: 0 0 6px; }
.rn-src { font-size: 12px; margin: 6px 0 0; }
/* 카드 목록: 번역·해석 주의 표시 */
.badge-note { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 600; vertical-align: 2px; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); }
/* 학습용 예시 안내 (연습판·상황 퍼즐) */
.tut-disclaimer { margin: 0 16px 150px; font-size: 12px; line-height: 1.5; text-align: center; } /* 아래 고정 버튼에 가리지 않게 */
.tut-disclaimer:has(~ .tut-qa:not([hidden])), .tut-disclaimer:has(~ .puz-cards:not([hidden])) { margin-bottom: 12px; } /* 아래 칸이 이어지면 마지막 칸이 여백을 가짐 */
.puz-cards:has(+ .tut-qa[hidden]) { margin-bottom: 150px; }
.puz-note { margin: -2px 0 2px; font-size: 12px; line-height: 1.5; }

/* 연습판: 카드 비용 읽는 법 그림 */
.cost-fig { margin: 4px 0 8px; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.cf-card { position: relative; width: 200px; flex: none; border-radius: 8px; overflow: hidden; }
.cf-card img { width: 100%; display: block; aspect-ratio: 1488 / 2079; background: var(--surface-2, #1b2230); }
.cf-m { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: #e5484d; color: #fff; font-size: 13px; font-weight: 700; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.cost-fig figcaption { flex: 1 1 180px; font-size: 13px; line-height: 1.7; }

/* 연습판: 각 진영 위의 단계 표시 */
.mphase { display: flex; gap: 3px; list-style: none; margin: 2px 0 6px; padding: 0; flex-wrap: wrap; }
.mphase li { padding: 1px 6px; border-radius: 999px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); }
.mphase.on li.past { opacity: .55; }
.mphase.on li.now { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.mat.opp .mphase.on li.now { background: #ff8a80; border-color: #ff8a80; color: #2a0f0d; }
.mphase.off { opacity: .45; }
.mphase.off li.wait { border-style: dashed; }

/* 연습판: 행동·반응을 쓸 수 있는 순간 안내 */
.tchance { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 200, 60, .08); border: 1px dashed var(--accent); font-size: 13px; line-height: 1.6; }
.tresume { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.tresume button { flex: none; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }
.tchance .ui-ic { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }

/* 연습하기: 처음이세요 · OX 퀴즈 · 상황 퍼즐 구역 나누기 */
.prac-jump { display: flex; gap: 4px; min-width: 0; position: sticky; top: 0; z-index: 3; padding: 6px 0; background: var(--bg); }
.prac-jump a { flex: 1 1 auto; min-width: 0; text-align: center; padding: 7px 2px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-size: 12.5px; white-space: nowrap; letter-spacing: -.3px; overflow: hidden; text-overflow: ellipsis; }
.prac-jump b { display: inline-block; width: 16px; height: 16px; line-height: 16px; border-radius: 50%; font-size: 11px; margin-right: 2px; color: #111; }
.prac-jump .j1 b { background: #e8b84a; } .prac-jump .j2 b { background: #6cb6ff; } .prac-jump .j3 b { background: #57d38c; } .prac-jump .j4 b { background: #c792ea; }
.prac-sec { display: grid; gap: 8px; margin-top: 14px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); border-top: 4px solid var(--sec); background: color-mix(in srgb, var(--sec) 5%, transparent); scroll-margin-top: 52px; }
.prac-sec.s1 { --sec: #e8b84a; } .prac-sec.s2 { --sec: #6cb6ff; } .prac-sec.s3 { --sec: #57d38c; } .prac-sec.s4 { --sec: #c792ea; }
.prac-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.prac-head h3 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 6px; }
.prac-head h3 .ui-ic { width: 18px; height: 18px; color: var(--sec); }
.prac-n { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--sec); color: #111; font-weight: 800; display: grid; place-items: center; font-size: 15px; }
.prac-sec.puz-list { margin-top: 14px; }

/* 카드 상세: 이 카드가 나오는 상황 퍼즐 */
.puz-links { display: grid; gap: 6px; }
.puz-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.35; }
.puz-link small { display: block; color: var(--muted); font-size: 12px; }
.puz-link > span:nth-child(2) { flex: 1; }
.puz-link .go { color: var(--muted); font-size: 18px; }
.demo-btn { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--accent); color: var(--text); text-decoration: none; line-height: 1.35; }
.demo-btn small { display: block; color: var(--muted); font-size: 12px; }
.demo-btn > span:nth-child(2) { flex: 1; }
.demo-btn .go { color: var(--muted); font-size: 18px; }
.demo-play { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 14px; }
.puz-lv { flex: none; font-size: 11px; padding: 2px 7px; border-radius: 999px; border: 1px solid currentColor; }
.puz-lv.lv-0 { color: #57d38c; } .puz-lv.lv-1 { color: #6cb6ff; } .puz-lv.lv-2 { color: #ff8a80; } .puz-lv.lv-3 { color: #c597ff; } .puz-lv.lv-4 { color: var(--accent); }
.puz-more summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 2px; }

/* 퍼즐: 이 퍼즐에 나오는 카드 */
.puz-cards { margin: 10px 12px 0; }
.puz-cards h2 small { font-size: 12px; font-weight: 400; }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.pc { display: grid; gap: 4px; text-decoration: none; color: var(--text); font-size: 11px; line-height: 1.3; text-align: center; word-break: keep-all; }
.pc img, .pc-blank { width: 100%; aspect-ratio: 744 / 1039; object-fit: cover; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); display: block; }

/* 접기 제목(영문 원문 등)은 손가락으로 누르기 쉽게 */
details > summary { padding-block: 6px; }

/* 카드 상세: 이 카드로 연습하기 (OX 1문제 + 상황 퍼즐) */
.practice { display: grid; gap: 12px; }
.practice h2 { margin-bottom: 0; }
.pr-sub { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.pr-sub small { font-weight: 400; }
.pr-ox { display: grid; gap: 8px; }
.pr-q { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); }
.pr-q p { margin: 0; flex: 1; font-size: 14px; line-height: 1.5; word-break: keep-all; }
.pr-btns { display: flex; gap: 6px; flex: none; }
.pr-btns button { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--line); background: var(--surface); font-size: 20px; font-weight: 800; }
.pr-btns button.o { color: #4ea1ff; } .pr-btns button.x { color: var(--danger); }
.pr-btns button:disabled { opacity: .5; }
.pr-btns button.answer { opacity: 1; border-color: currentColor; }
.cq-res { display: grid; gap: 8px; justify-items: start; }
.cq-res:empty { display: none; }

/* 첫 방문 안내 팝업 */
.welcome { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.65); display: grid; place-items: center; padding: 16px; }
.welcome-in { width: 100%; max-width: 360px; display: grid; gap: 10px; padding: 20px 18px 16px; border-radius: 18px; background: var(--bg); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.welcome-poro { width: 72px; height: 72px; margin: 0 auto -4px; }
.welcome h2 { margin: 0; font-size: 19px; }
.welcome p { margin: 0; font-size: 14px; line-height: 1.6; word-break: keep-all; }
.welcome .btn { display: grid; place-items: center; text-decoration: none; }
.welcome-note { font-size: 12px !important; }

/* 바닥글 맨 아래 작은 시뮬레이터 입구 (비밀번호 필요) */
.legal .sim-door { text-align: right; margin: 4px 0 0; font-size: 10px; opacity: .55; }
.legal .sim-door a { color: inherit; text-decoration: none; padding: 6px 4px; }
.badge-ban.soft { background: transparent; color: var(--muted); border: 1px solid var(--line); }

/* 오늘의 퍼즐 */
.daily { display: grid; gap: 4px; margin: 0 0 14px; padding: 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1.5px solid var(--accent); color: var(--text); text-decoration: none; line-height: 1.4; }
.daily.done { border-color: var(--line); background: var(--surface); }
.daily-top { display: flex; justify-content: space-between; align-items: center; color: var(--accent); font-size: 14px; }
.daily-top small { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.daily-title { font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.daily-st { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; margin-top: 4px; flex-wrap: wrap; }
.daily-st small { color: var(--muted); font-weight: 400; }
.daily-st em { margin-left: auto; font-style: normal; color: var(--accent); }
.daily-tag { display: inline-block; font-size: 11px; padding: 1px 7px; margin-right: 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink, #111); vertical-align: middle; }
.daily-end { display: grid; gap: 4px; margin-top: 10px; padding: 12px; border-radius: var(--radius); border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); text-align: center; }

/* 대회 일정 */
.events-page { padding: 0 16px 24px; max-width: 720px; margin: 0 auto; }
.ev-title { font-size: 16px; margin: 4px 0 10px; }
.ev { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.ev.live { border-color: var(--accent); }
.ev.past { opacity: .65; }
.ev-head { display: flex; align-items: center; gap: 8px; }
.ev-head h2 { font-size: 17px; margin: 0; }
.ev-d { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); white-space: nowrap; }
.ev-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 10px 0 6px; font-size: 14px; line-height: 1.45; }
.ev-info dt { color: var(--muted); }
.ev-info dd { margin: 0; }
.ev-src { margin: 4px 0 0; }
.small-ev p { margin: 4px 0 0; font-size: 14px; }
.ev-note { margin: 4px 0 0; }
.ev-banner { display: flex; align-items: center; gap: 8px; margin: 8px 16px 0; padding: 9px 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--text); text-decoration: none; font-size: 13px; line-height: 1.4; }
.ev-banner .ui-ic { width: 18px; height: 18px; color: var(--accent); flex: none; }
.ev-banner b { color: var(--accent); }

/* 매장 대회 목록 */
.op-filters { display: grid; gap: 8px; margin-bottom: 10px; }
.op-filters .chips { padding: 0; }
.op-day { font-size: 14px; margin: 14px 0 6px; color: var(--accent); }
.op-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; line-height: 1.4; }
.op-time { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 42px; }
.op-body { flex: 1; min-width: 0; font-size: 14px; }
.op-body small { font-size: 12px; }
.op-tag { font-size: 11px; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); white-space: nowrap; }
.op-tag.sq { background: color-mix(in srgb, #6aa8ff 25%, transparent); color: #8fbcff; }
.op-go { color: var(--muted); font-size: 18px; }
.op-wrap { margin-bottom: 8px; }
.op-wrap .op-item { margin-bottom: 0; }
.op-su { display: inline-flex; align-items: center; gap: 4px; margin: 4px 0 0 12px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none;
  background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.op-unsure { margin-top: 8px; }
.op-region { margin: 0 0 6px; }
.op-region.sub .chip { font-size: 12px; padding: 4px 9px; }
.op-soon { color: var(--accent); font-weight: 700; }
.op-group { margin: 14px 0 6px; font-size: 15px; }
.op-reg.no { border-color: color-mix(in srgb, #ff8a80 55%, transparent); color: #ff9e96; }
.op-unsure summary { cursor: pointer; padding: 8px 0; font-size: 14px; color: var(--muted); }
.op-reg { font-size: 11px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.op-reg.ok { border-color: color-mix(in srgb, #5bd28a 60%, transparent); color: #6fe09b; }
.op-su.off { font-weight: 500; background: none; color: var(--muted); border-color: var(--line); }

/* 퍼즐 상대 말풍선: 상대 판 오른쪽 위에서 아래로 꼬리. 상대 판이 화면 밖이면 화면 위에 고정 */
.mat.opp { position: relative; }
.pz-bubble { position: absolute; right: 10px; top: -6px; transform: translateY(-100%); z-index: 6; max-width: min(78%, 280px); padding: 7px 11px; border-radius: 14px;
  background: #2a1d1c; border: 1px solid #ff8a80; color: var(--text); font-size: 13px; line-height: 1.4; box-shadow: 0 6px 18px rgba(0,0,0,.45); animation: pz-pop .25s ease-out; }
.pz-bubble b { color: #ff8a80; font-size: 11px; margin-right: 4px; }
.pz-bubble::after { content: ''; position: absolute; right: 22px; bottom: -7px; width: 12px; height: 12px; background: #2a1d1c; border-right: 1px solid #ff8a80; border-bottom: 1px solid #ff8a80; transform: rotate(45deg); }
.pz-bubble.float { position: fixed; top: 80px; right: 50%; transform: translateX(50%); }
.pz-bubble.float::after { display: none; }
@keyframes pz-pop { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
@media (prefers-reduced-motion: reduce) { .pz-bubble { animation: none; } }

/* ---------- 자유게시판 ---------- */
.board-page { padding: 12px 16px 24px; max-width: 760px; margin: 0 auto; }
.bd-top { display: flex; gap: 8px; align-items: center; }
.bd-search { flex: 1; min-width: 0; }
.bd-write { width: auto; flex: none; }
.bd-rule { font-size: 12px; margin: 8px 0 4px; }
.bd-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); }
.bd-list li { border-bottom: 1px solid var(--line); }
.bd-list a { display: block; padding: 12px 2px; color: inherit; text-decoration: none; }
.bd-t { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-t em { font-style: normal; color: var(--accent); font-size: 13px; }
.bd-m { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.bd-nick { color: var(--text); font-weight: 600; }
.bd-nick.admin { color: var(--accent); }
.bd-nick small { font-size: 10px; border: 1px solid var(--accent); border-radius: 4px; padding: 0 3px; }
.bd-pages { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 16px 0; }
.bd-back { margin-bottom: 10px; }
.bd-post h2 { font-size: 18px; margin: 4px 0; word-break: break-word; }
.bd-body { white-space: pre-wrap; word-break: break-word; line-height: 1.6; margin: 12px 0; font-size: 15px; }
.bd-body a { color: var(--accent); }
.bd-post.hidden .bd-body, .bd-c.hidden .bd-body { color: var(--muted); font-style: italic; }
.bd-acts { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.bd-cmts h3 { font-size: 15px; margin: 14px 0 6px; }
.bd-cmts ul { list-style: none; margin: 0; padding: 0; }
.bd-c { padding: 8px 0; border-bottom: 1px solid var(--line); }
.bd-c .bd-body { margin: 4px 0 0; font-size: 14px; }
.bd-c.gone { color: var(--muted); font-size: 13px; }
.bd-c-acts { float: right; }
.linkish { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 0 0 0 8px; text-decoration: underline; }
.bd-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.bd-who { display: flex; gap: 8px; }
.bd-who .field { min-width: 0; }
.bd-ta { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; font-family: inherit; }
.bd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.bd-toast { position: fixed; left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto; padding: 12px 14px; border-radius: 12px; background: #1d2330; border: 1px solid var(--line); color: var(--text); font-size: 14px; z-index: 50; text-align: center; }
.bd-back { width: auto; display: inline-flex; align-items: center; }
.tabbar a span { position: relative; }
.tab-new { position: absolute; top: -7px; left: 50%; margin-left: 6px; padding: 1px 4px; border-radius: 6px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 900; line-height: 1.2; letter-spacing: .3px; }
.bd-ask { display: block; width: 100%; text-align: left; margin: 10px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--text); font-size: 14px; }
.bd-ask small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.feedback-line a { color: var(--accent); }
.bd-admin-bar { max-width: 760px; margin: 8px auto 0; padding: 8px 16px; font-size: 12px; color: var(--accent); }
.bd-admin-link { text-align: center; margin: 0 0 8px; }
.bd-pics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bd-pics:empty { display: none; }
.bd-pics figure { position: relative; margin: 0; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.bd-pics img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bd-pics button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; }
.bd-pic-add { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.bd-pic-add[hidden] { display: none; }
.bd-imgs { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.bd-imgs img { max-width: 100%; max-height: 70vh; border-radius: 10px; border: 1px solid var(--line); display: block; }
/* 게시판 목록: 글을 카드처럼 크게, 건의 안내는 작은 버튼으로 */
.bd-sub { display: flex; align-items: center; justify-content: space-between; margin: 10px 2px 2px; font-size: 13px; }
.bd-idea { border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.bd-list { border-top: 0; display: flex; flex-direction: column; gap: 8px; }
.bd-list li { border-bottom: 0; }
.bd-list a.bd-item { position: relative; display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.bd-list a.bd-item:active { border-color: var(--accent); }
.bd-item.admin { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.bd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bd-list .bd-t { font-size: 16px; font-weight: 700; color: var(--text); }
.bd-pv { font-size: 13px; color: color-mix(in srgb, var(--text) 70%, var(--muted)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-list .bd-m { margin: 2px 0 0; }
.bd-cc { color: var(--accent); font-weight: 700; }
.bd-thumb { flex: none; width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.bd-thumb-n { position: absolute; right: 18px; bottom: 18px; font-style: normal; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .7); color: #fff; padding: 0 5px; border-radius: 6px; }
.bd-rule { margin-top: 14px; }

/* 카드 체험(연습판 ?demo=): 판·손패 카드를 시뮬레이터와 같은 크기·비율로 (public/sim/sim.css 의 .sim 판 규칙과 같게 유지) */
.tut.simsize .hand .fan { justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; gap: 8px; padding: 6px 2px 8px; -webkit-overflow-scrolling: touch; }
.tut.simsize .hand .fan .cw + .cw { margin-left: 0; }
.tut.simsize .hand .fan .cw:hover, .tut.simsize .hand .fan .cw.hi { transform: none; }
.tut.simsize .hand .cw.h { --w: 96px; --h: 134px; scroll-snap-align: start; }
.tut.simsize .hand .cw.h .cd { border-radius: 6px; }
.tut.simsize .hand .cw.h .cap { font-size: 11px; max-width: 96px; margin-top: 4px; }
.tut.simsize .hand .cw.h .cd-txt { font-size: 12px; padding: 4px; text-align: center; }
.tut.simsize .hand .cw.h .tg { font-size: 11px; top: -6px; }
.tut.simsize .hand { overflow: hidden; }
.tut.simsize .hand > small.muted { display: block; margin-top: 2px; }
.tut.simsize .board .cw.u { --w: 58px; --h: 81px; }
.tut.simsize .board .cw.m { --w: 46px; --h: 64px; }
.tut.simsize .board .cw.u .cap { font-size: 10px; max-width: 64px; }
.tut.simsize .board .cw.u .mg { min-width: 22px; height: 22px; font-size: 13px; right: -6px; bottom: -6px; }
.tut.simsize .board .cw.u .dm { font-size: 12px; padding: 1px 5px; white-space: nowrap; }
.tut.simsize .board .cw.u .tg { font-size: 10px; }
.tut.simsize .board .cw.ex::after { font-size: 10px; }
.tut.simsize .lane { min-height: 96px; gap: 6px; }
.tut.simsize .units { min-height: 96px; gap: 6px; }
.tut.simsize .lane { align-content: center; }
.tut.simsize .board .cw.u .tg { top: 4px; z-index: 2; box-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.tut.simsize .board .cw.u.ex .tg { left: 12px; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); }

/* 카드 체험 첫 장면: 카드 이미지 */
.demo-card { display: block; width: min(220px, 60%); aspect-ratio: 744 / 1039; object-fit: cover; margin: 4px auto 8px; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.demo-card.wide { width: min(340px, 92%); aspect-ratio: 1039 / 744; } /* 전장 카드는 가로 */

/* 카드 체험 판: 시뮬레이터와 같은 룬 칩·넓은 화면 크기 (public/sim/sim.css 와 맞춤) */
.tut.simsize .cd[class*="rune-"] .cd-txt { font-weight: 900; font-size: 11px; }
.tut.simsize .rune-Fury { background: #7a2a2a; } .tut.simsize .rune-Calm { background: #2a6a55; } .tut.simsize .rune-Mind { background: #2a4a7a; }
.tut.simsize .rune-Body { background: #7a5a2a; } .tut.simsize .rune-Chaos { background: #5a2a7a; } .tut.simsize .rune-Order { background: #7a7a2a; }
/* 재활용돼 날아가는 룬 칩: 판의 칩과 같은 색·크기 (판 밖이라 위 규칙이 안 닿음) */
.fly-card.rune-ghost .cw.r, .fly-card.rune-ghost .cw.r .cd { width: 100%; height: 100%; transform: none; margin: 0; }
.fly-card.rune-ghost .cd { border-radius: 6px; display: grid; place-items: center; }
.fly-card.rune-ghost .cd-txt { font-weight: 900; font-size: 11px; color: #fff; }
.fly-card .rune-Fury { background: #7a2a2a; } .fly-card .rune-Calm { background: #2a6a55; } .fly-card .rune-Mind { background: #2a4a7a; }
.fly-card .rune-Body { background: #7a5a2a; } .fly-card .rune-Chaos { background: #5a2a7a; } .fly-card .rune-Order { background: #7a7a2a; }
@media (min-width: 640px) {
  .tut.simsize .board .cw.u { --w: 80px; --h: 112px; }
  .tut.simsize .board .cw.m { --w: 60px; --h: 84px; }
  .tut.simsize .board .cw.u .cap { font-size: 12px; max-width: 88px; }
  .tut.simsize .board .cw.u .mg { min-width: 26px; height: 26px; font-size: 15px; }
  .tut.simsize .hand .cw.h { --w: 124px; --h: 173px; }
  .tut.simsize .hand .cw.h .cap { font-size: 13px; max-width: 124px; }
  .tut.simsize .arena { gap: 10px; }
}

/* 카드 체험: 설명 칸을 아래 버튼 바로 위에 붙여, 판과 설명이 한 화면에 보이게 */
.tut.simsize .tnote { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 66px); z-index: 45; /* 날아가는 카드(.fly-card 40)보다 위 — 설명 글이 가려지지 않게 */ max-height: 36vh; overflow: auto; overscroll-behavior: contain; box-shadow: 0 -10px 24px rgba(0,0,0,.5); }
.tut.simsize .tnote h2 { margin-top: 0; }
.tut.simsize .tnote { transition: max-height .35s ease; }
.tut.simsize .tnote.tuck { max-height: 46px; overflow: hidden; cursor: pointer; }
.tut.simsize .demo-card { float: left; width: 92px; margin: 2px 12px 6px 0; border-radius: 6px; }
.tut.simsize .tnote::after { content: ''; display: block; clear: both; }
/* 카드 체험: 낸 카드를 가운데에 크게, 눌러야 이어서 진행 */
.demo-pop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; align-content: center; gap: 12px; background: rgba(0,0,0,.72); cursor: pointer; animation: demo-pop .35s ease-out; }
.demo-pop > img { width: min(360px, 84vw); max-height: 72vh; object-fit: contain; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.demo-pop > span { color: #fff; font-size: 14px; opacity: .85; }
@keyframes demo-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .demo-pop { animation: none; } }
/* 카드 체험 신고 */
.demo-report { margin-top: 4px; padding-bottom: 14px; }
.demo-report p { margin: 0 0 6px; }
.demo-report form { display: grid; gap: 8px; margin-top: 8px; }
.demo-report select, .demo-report textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; }
.fly-ghost .cw::after { display: none; } /* 날아가는 복사본엔 '탈진' 글씨 없이 */
.demo-pop .pop-note { color: #fff; background: rgba(0,0,0,.55); border: 1px solid var(--accent); border-radius: 999px; padding: 6px 14px; font-size: 15px; font-weight: 800; text-align: center; max-width: 88vw; } /* 크게 뜬 카드가 무엇인지 */
.tut.simsize .board .lane.many .cw.u { --w: 40px; --h: 56px; } /* 한 줄에 카드가 많으면(3장+) 작게 — 전장 칸 밖으로 넘치거나 겹치지 않게 */
.tut.simsize .board .lane.many .cw.u .cap { display: none; }
@media (min-width: 640px) { .tut.simsize .board .lane.many .cw.u { --w: 60px; --h: 84px; } }
/* 카드 체험 기지·전장: 카드 윗선을 맞추고, 탈진(가로) 카드도 세로 카드와 같은 높이 칸 가운데에 놓아 높이가 어긋나지 않게 */
.tut .units { align-items: flex-start; }
.tut .units .cw.ex .cd { margin: 0; }

/* 연습하기 구역 새 디자인 (시안 B 중 연습하기만): 위 굵은 색 띠·테두리 없이 납작한 판, 안쪽 입구는 파란 테두리 */
.prac-sec { border: 0; border-radius: 10px; background: #1b1e26; }
.prac-head h3 { font-weight: 800; letter-spacing: -0.4px; }
.prac-sec .tut-entry { border-radius: 8px; background: #171a22; border-color: color-mix(in srgb, #4c8dea 60%, var(--line)); }
.prac-sec .tut-entry .ui-ic { color: #4c8dea; }
.prac-sec .puz { background: #242833; border-color: transparent; border-radius: 8px; }

/* 한국판 미발매 카드: 영문 이미지 위 한글 덧씌우기 (public/ko-card.js) */
.kc { position: relative; display: block; container-type: inline-size; line-height: 0; }
.kc > img { display: block; width: 100%; height: auto; }
.kc-o { position: absolute; display: flex; align-items: center; overflow: hidden; line-height: 1.32; word-break: keep-all; overflow-wrap: anywhere; }
.kc-name { padding: 0 3cqw; background: rgba(10, 8, 16, .42); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); color: #fff; font-weight: 800; font-size: 5.4cqw; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.kc-text { padding: 1.6cqw 3cqw; background: rgba(12, 10, 18, .74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #f4f1ea; font-size: 3.7cqw; }
.kc-light .kc-text { background: rgba(250, 248, 243, .96); color: #1b1916; }
.kc-fit { width: 100%; }
.kc-flip { transform: rotate(180deg); }
.kc-wide .kc-name { font-size: 3.9cqw; }
.kc-wide .kc-text { font-size: 2.7cqw; }
.kc .g-label { display: none; }
.kc .kc-o img.glyph { display: inline; height: 1.2em; width: auto; max-width: none; margin: 0 1px; border-radius: 0; box-shadow: none; vertical-align: -0.22em; }
.kc-kw { display: inline-block; padding: 0 .35em; margin-right: .15em; border-radius: .25em; background: #3a3550; color: #fff; font-size: .86em; font-weight: 800; line-height: 1.35; }
.kc-light .kc-kw { background: #2e2a40; }
.kc-tag { position: absolute; right: 3%; top: 2.2%; padding: .3cqw 1.6cqw; border-radius: 99px; background: rgba(0,0,0,.6); color: #ffd98a; font-size: 2.6cqw; font-weight: 700; line-height: 1.4; }
.kc-wide .kc-tag { top: .8%; font-size: 2cqw; }
.hero .kc { width: 78%; max-width: 320px; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.hero .kc.kc-wide { width: 100%; max-width: none; }
.hero .kc > img { width: 100%; max-width: none; border-radius: 0; box-shadow: none; }
.demo-kc { width: min(220px, 60%); margin: 4px auto 8px; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.35); cursor: zoom-in; }
.demo-kc.kc-wide { width: min(340px, 92%); }
.demo-kc > img.demo-card { width: 100%; margin: 0; border-radius: 0; box-shadow: none; aspect-ratio: auto; }
.tut.simsize .demo-kc { float: left; width: 92px; margin: 2px 12px 6px 0; border-radius: 6px; }
.quiz-zoom .kc { width: min(92vw, calc(82vh * 744 / 1039)); border-radius: 12px; overflow: hidden; }
.quiz-zoom .kc.kc-wide { width: min(96vw, calc(70vh * 1039 / 744)); }
.quiz-zoom .kc > img { max-width: none; max-height: none; border-radius: 0; }
.kc.kc-off .kc-o, .kc.kc-off .kc-tag { display: none; }
.demo-pop .kc { width: min(360px, 84vw, calc(72vh * 744 / 1039)); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.demo-pop .kc.kc-wide { width: min(560px, 94vw); }
/* 작은 카드(보드·손패·폐기장·덱 보기·카드 목록): 이름은 크게, 딱지는 숨김 */
.kc-mini { border-radius: inherit; overflow: hidden; }
.kc-mini .kc-tag { display: none; }
.kc-mini .kc-name { font-size: 7.5cqw; padding: 0 2cqw; }
.kc-mini .kc-text { padding: 1cqw 2cqw; }
.cd .kc-mini { width: 100%; height: 100%; }
.cd .kc-mini > img { height: 100%; object-fit: cover; }
.pl.trash-pile .kc-mini { position: absolute; inset: 0; filter: grayscale(.7) brightness(.75); }
.pl.trash-pile .kc-mini > img { position: static; height: 100%; object-fit: cover; filter: none; }
.dk-card .kc-mini { width: 100%; max-width: 72px; border-radius: 5px; }
.dk-bf .dk-card .kc-mini { max-width: 100%; }
.dk-card .kc-mini > img { aspect-ratio: auto; border-radius: 0; }
.pc .kc-mini { border-radius: 6px; border: 1px solid var(--line); }
.pc .kc-mini > img { aspect-ratio: auto; border: 0; border-radius: 0; }
.cast .kc-mini { width: 150px; border-radius: 8px; }
.cast .kc-mini > img { width: 100%; border-radius: 0; box-shadow: none; }
.badge-ban.soon { background: transparent; color: var(--danger); border: 1px dashed var(--danger); } /* 금지 예정 (적용일 전) */
