/* 발로바로語 (valovaro) 스타일
   컨셉: 단어장. 종이 바탕에 먹색 글자, 글자 위의 작은 발음 표기(루비)를 사이트 전체의 무늬로 씁니다.
   강조색은 도장 인주 빨강 하나. 보이스 도우미의 상태 표시만 통신 장비처럼 어둡게 둡니다.
   색은 모두 아래 변수로만 쓰고, 밝은 화면과 어두운 화면 값을 따로 둡니다. */

:root {
  color-scheme: light;
  --bg: #f5f0e6;            /* 종이 */
  --surface: #fffdf8;       /* 카드 */
  --surface-2: #eee7d8;     /* 한 단계 눌린 면 */
  --line: #d8cebb;          /* 옅은 줄 */
  --line-strong: #1f1d1a;   /* 먹선 */
  --text: #1f1d1a;
  --muted: #6e675d;
  --faint: #9a9285;
  --accent: #b3261e;        /* 인주 빨강 */
  --accent-ink: #fffdf8;
  --ink: #1f1d1a;           /* 주 버튼 */
  --on-ink: #f5f0e6;
  --mint: #1e6b52;          /* 녹색 잉크: 정상·사용 가능 */
  --amber: #8a4b0b;         /* 갈색 잉크: 발음 표기 */
  --hl: #ffe27a;            /* 형광펜 */
  --topbar-bg: rgba(245, 240, 230, 0.92);

  --console-bg: #141715;    /* 통신 장비 면 (화면 밝기와 무관하게 고정) */
  --console-text: #e9f0ec;
  --console-muted: #7c8983;
  --console-accent: #c8f25c;

  --radius: 8px;
  --font-ko: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --font-ja: "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  --font-serif: "Noto Serif KR", "Noto Serif JP", "Batang", "Yu Mincho", serif;
  --font-ja-serif: "Noto Serif JP", "Yu Mincho", "Noto Serif KR", serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "D2Coding", monospace;
}

/* 어두운 화면: 기기 설정이 어둡거나(직접 밝게 고르지 않았을 때), 직접 어둡게 골랐을 때 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #171512; --surface: #1f1c18; --surface-2: #2a2620; --line: #3b352d; --line-strong: #f1eadc;
    --text: #f1eadc; --muted: #a69d8e; --faint: #7a7266;
    --accent: #e5604f; --accent-ink: #1a0d0a; --ink: #f1eadc; --on-ink: #171512;
    --mint: #62c9a2; --amber: #e2a64c; --hl: rgba(226, 166, 76, 0.38);
    --topbar-bg: rgba(23, 21, 18, 0.92);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171512; --surface: #1f1c18; --surface-2: #2a2620; --line: #3b352d; --line-strong: #f1eadc;
  --text: #f1eadc; --muted: #a69d8e; --faint: #7a7266;
  --accent: #e5604f; --accent-ink: #1a0d0a; --ink: #f1eadc; --on-ink: #171512;
  --mint: #62c9a2; --amber: #e2a64c; --hl: rgba(226, 166, 76, 0.38);
  --topbar-bg: rgba(23, 21, 18, 0.92);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ko);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 900; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* 루비: 글자 위의 작은 읽는 법. 이 사이트의 대표 무늬입니다. */
ruby { ruby-position: over; }
rt {
  font-family: var(--font-ja); font-size: 0.34em; font-weight: 600; letter-spacing: 0.08em;
  color: var(--accent); user-select: none;
}

/* 상단 바 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line-strong);
}
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo {
  font-family: var(--font-serif); font-weight: 900; font-size: 21px; line-height: 1;
  white-space: nowrap; padding-top: 8px;
}
.logo rt { font-size: 9px; color: var(--muted); letter-spacing: 0.04em; padding-bottom: 2px; }
.logo .go { color: var(--accent); }
.logo .go rt { color: var(--accent); }
.nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; align-self: stretch; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: flex; align-items: center; padding: 0 12px; color: var(--muted);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--text); border-bottom-color: var(--accent); }
.theme-btn {
  flex: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  font: inherit; font-size: 16px; line-height: 1; padding: 0;
}
.theme-btn:hover { background: var(--surface-2); }

/* 홈 히어로 */
.hero { padding: 64px 0 44px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent);
  border: 1.5px solid var(--accent); border-radius: 4px; padding: 3px 10px; transform: rotate(-1.5deg);
}
.hero h1 {
  font-size: clamp(34px, 6.4vw, 60px); line-height: 1.5; margin: 18px 0 14px;
  letter-spacing: -0.02em;
}
/* 형광펜으로 그은 것처럼 */
.hero h1 em { font-style: normal; background: linear-gradient(transparent 58%, var(--hl) 58%, var(--hl) 92%, transparent 92%); }
.hero p { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 0 28px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 700; font-size: 15px;
  padding: 11px 20px; border-radius: 6px; cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* 이름 풀이 (홈) */
.namebox {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 620px; margin-top: 40px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden;
}
.namebox > div { padding: 16px 14px 14px; text-align: center; }
.namebox > div + div { border-left: 1px dashed var(--line-strong); }
.name-word { font-family: var(--font-serif); font-weight: 900; font-size: clamp(24px, 5vw, 34px); line-height: 1.9; }
.name-word rt { font-size: 11px; }
.name-word.go { color: var(--accent); }
.name-note { font-size: 12.5px; color: var(--muted); }

/* 홈 예시 대화: 공책의 빨간 세로줄 */
.demo {
  margin-top: 20px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px double var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; max-width: 620px;
}
.demo-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.demo-line { padding: 12px 0; display: flex; flex-direction: column; }
.demo-line + .demo-line { border-top: 1px dashed var(--line); }
.demo-ja { font-family: var(--font-ja-serif); font-size: 24px; font-weight: 700; }
.demo-read { color: var(--amber); font-size: 13px; font-weight: 600; order: -1; }
.demo-label { order: -2; }
.demo-mean { color: var(--muted); font-size: 14px; }

/* 섹션 */
.section { padding: 44px 0; }
.section h2 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.01em; }
.section .sub { color: var(--muted); margin: 0 0 24px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
/* 카드: 뒤에 한 장 더 겹친 단어 카드 */
.card {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 4px 4px 0 var(--surface-2);
}
a.card:hover { box-shadow: 4px 4px 0 var(--accent); }
.card h3 { margin: 0; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
/* 배지: 도장 */
.badge {
  align-self: flex-start; font-family: var(--font-ko); font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em;
  border: 1.5px solid currentColor; border-radius: 4px; padding: 1px 7px; transform: rotate(-2deg);
  display: inline-block;
}
.badge.live { color: var(--mint); }
.badge.soon { color: var(--faint); }
.badge.proto { color: var(--accent); }
h1 .badge { font-size: 12px; vertical-align: middle; margin-left: 8px; }

/* 페이지 머리: 교재의 단원 제목처럼 먹선으로 닫습니다 */
.page-head { padding: 36px 0 16px; border-bottom: 1px solid var(--line-strong); margin-bottom: 20px; }
.page-head h1 { margin: 0 0 4px; font-size: 32px; letter-spacing: -0.01em; line-height: 1.9; }
.page-head p { margin: 0; color: var(--muted); }

/* 표현집 */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 18px 0 8px; }
.search {
  flex: 1 1 240px; background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font: inherit; padding: 11px 14px; border-radius: 6px; outline: none;
}
.search:focus { border-color: var(--line-strong); box-shadow: 0 0 0 2px var(--hl); }
.search::placeholder { color: var(--faint); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 6px 13px; border-radius: 6px; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip .n { opacity: 0.6; margin-left: 4px; font-weight: 500; }

.cat-desc { color: var(--muted); font-size: 14px; margin: 6px 0 16px; min-height: 22px; }

.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding-bottom: 60px; }
/* 표현 카드: 발음을 일본어 글자 위에 작게 (루비 자리) */
.pcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 2px;
}
.pcard.hear { border-left: 3px solid var(--mint); border-radius: 0 var(--radius) var(--radius) 0; }
.pcard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.p-ja { font-family: var(--font-ja-serif); font-size: 22px; font-weight: 700; line-height: 1.4; word-break: break-all; }
.p-read { color: var(--amber); font-size: 13px; font-weight: 600; order: -1; }
.p-mean { font-size: 15px; }
.tone {
  flex: none; font-size: 11.5px; font-weight: 700; border-radius: 4px; padding: 2px 7px;
  background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.tone.t-strong { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.tone.t-warn { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.tone.t-soft { background: color-mix(in srgb, var(--mint) 14%, transparent); color: var(--mint); }

.p-actions { display: flex; gap: 6px; margin-top: 8px; }
.mini {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 5px; cursor: pointer;
}
.mini:hover { border-color: var(--line-strong); }
.mini.fav.on { color: var(--accent); border-color: var(--accent); }
.mini.done { color: var(--mint); border-color: var(--mint); }

.empty { color: var(--muted); padding: 40px 0; text-align: center; grid-column: 1 / -1; }
.notice {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 14px; color: var(--muted); font-size: 13.5px; margin: 8px 0 0;
}

/* 보이스 도우미 */
.voice-grid {
  display: grid; gap: 16px; align-items: start;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "controls suggest" "log suggest";
}
.v-controls { grid-area: controls; }
.v-suggest { grid-area: suggest; }
.v-log { grid-area: log; }
.v-right { display: grid; gap: 16px; min-width: 0; }
.v-say .manual-row { flex-wrap: wrap; }
.v-say .manual-row .search { flex: 1 1 200px; }
.v-say .form-msg { margin-top: 8px; min-height: 0; }
.v-say .form-msg:empty { display: none; }
.v-say .replies { margin-top: 12px; }
.v-say .replies:empty { display: none; }
#sayMic[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.say-note { color: var(--amber); font-size: 13.5px; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; min-width: 0;
}

/* 상태 표시: 통신 장비 화면 */
.status {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--console-bg); color: var(--console-text);
  font-size: 14px; font-weight: 600; line-height: 1.55;
  padding: 12px 14px; border-radius: 6px;
}
.status .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--console-muted); margin-top: 6px; }
.status .bars { flex: none; display: none; align-items: flex-end; gap: 2px; height: 16px; margin-top: 2px; }
.status .bars i { width: 3px; background: var(--console-accent); height: 30%; }
.status[data-state="live"] .dot { display: none; }
.status[data-state="live"] .bars { display: flex; }
.status[data-state="live"] .bars i { animation: bar 0.9s ease-in-out infinite alternate; }
.status[data-state="live"] .bars i:nth-child(2) { animation-delay: -0.6s; }
.status[data-state="live"] .bars i:nth-child(3) { animation-delay: -0.3s; }
.status[data-state="live"] .bars i:nth-child(4) { animation-delay: -0.75s; }
.status[data-state="live"] .bars i:nth-child(5) { animation-delay: -0.15s; }
.status[data-state="wait"] .dot { background: #f5b84b; }
.status[data-state="error"] .dot { background: #ff6b5c; }
.status[data-state="error"] { color: #ffb4ab; }
@keyframes bar { from { height: 20%; } to { height: 100%; } }
@media (prefers-reduced-motion: reduce) { .status .bars i { animation: none !important; height: 60%; } }

.interim {
  font-family: var(--font-mono); color: var(--console-accent); font-size: 13.5px;
  margin-top: 6px; padding: 8px 14px; background: var(--console-bg); border-radius: 6px;
}
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.consent {
  margin-top: 14px; padding: 14px; border: 1px solid var(--amber); border-radius: 6px;
  background: color-mix(in srgb, var(--amber) 8%, transparent); font-size: 14px;
}
.consent p { margin: 6px 0 0; color: var(--muted); }
.consent a, .doc a, .footer a { color: var(--text); text-decoration: underline; }
.consent .btn-row { margin-top: 12px; }
.footer-links { margin-top: 8px; }

/* 안내 문서 페이지 */
.doc { max-width: 760px; padding-bottom: 60px; }
.doc h2 { font-size: 20px; margin: 32px 0 8px; }
.doc h3 { font-family: var(--font-ko); font-weight: 800; font-size: 16px; margin: 20px 0 6px; }
.doc p, .doc li { color: var(--text); font-size: 15px; }
.doc ul { padding-left: 20px; margin: 8px 0; }
.doc li { margin: 4px 0; }
.doc .todo { border: 1px dashed var(--accent); border-radius: 6px; padding: 12px 14px; color: var(--accent); font-size: 14px; margin: 12px 0; }

.field { margin-top: 18px; }
.field-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.seg button {
  border: 0; background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; font-weight: 700;
  padding: 8px 14px; cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.on { background: var(--ink); color: var(--on-ink); }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.manual-row { display: flex; gap: 8px; }
.manual-row .search { flex: 1 1 auto; min-width: 0; }
.manual-row .btn { flex: none; padding: 10px 16px; }
#samples .chip { font-family: var(--font-ja); font-size: 13px; padding: 5px 11px; }

.checks { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.checks li { display: flex; gap: 8px; padding: 2px 0; }
.checks b { flex: none; width: 108px; color: var(--text); font-weight: 600; }
.checks li.ok span { color: var(--mint); }
.checks li span { min-width: 0; }
.diag { margin-top: 12px; }
.diag pre {
  margin: 10px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: 6px;
  color: var(--muted); font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap; word-break: break-all; user-select: all;
}

.heard { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
.heard-empty { color: var(--muted); font-size: 14.5px; }
.heard-ja { font-family: var(--font-ja-serif); font-size: 26px; font-weight: 700; line-height: 1.4; word-break: break-all; }
.heard-ko { font-size: 18px; margin-top: 4px; }
.heard-nuance { color: var(--amber); font-size: 13.5px; margin-top: 4px; }
.heard-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.src { font-size: 12px; color: var(--muted); }
.src.pending { color: var(--mint); }

.intent { flex: none; font-size: 11.5px; font-weight: 700; border-radius: 4px; padding: 2px 7px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.intent.lv-danger { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.intent.lv-warn { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.intent.lv-ok { background: color-mix(in srgb, var(--mint) 14%, transparent); color: var(--mint); }

.replies { display: grid; gap: 10px; }
.rcard { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 10px; }
.r-read { color: var(--text); font-size: 23px; font-weight: 800; line-height: 1.35; }
.r-ja { font-family: var(--font-ja); font-size: 15px; font-weight: 700; margin-top: 2px; word-break: break-all; color: var(--amber); }
.rcard .p-mean { color: var(--muted); font-size: 14.5px; }
.rcard .mini { background: var(--surface); }

.log-head { display: flex; justify-content: space-between; align-items: center; }
.log-head .field-label { margin: 0; }
.log { margin-top: 10px; display: grid; gap: 6px; max-height: 340px; overflow-y: auto; }
.log-empty { color: var(--muted); font-size: 13.5px; }
.log-row {
  display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%;
  background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--text);
  font: inherit; padding: 8px; cursor: pointer;
}
.log-row:hover { background: var(--surface-2); }
.log-row.on { border-color: var(--line-strong); background: var(--surface-2); }
.log-time { flex: none; color: var(--muted); font-family: var(--font-mono); font-size: 11.5px; margin-top: 4px; }
.log-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.log-ja { font-family: var(--font-ja); font-weight: 700; font-size: 14.5px; word-break: break-all; }
.log-ko { color: var(--muted); font-size: 13px; }

.howto ol { margin: 0 0 14px; padding-left: 20px; color: var(--text); }
.howto li { margin: 4px 0; }
.fine { color: var(--muted); font-size: 13px; max-width: 760px; }

@media (max-width: 820px) {
  .voice-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "controls" "suggest" "log"; }
}

/* 듀오 찾기 */
.duo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.duo-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.lang-seg { flex: none; margin-top: 10px; }
html[lang="ja"] body { font-family: var(--font-ja); }
.duo-form { margin-top: 8px; }
.duo-form summary { cursor: pointer; font-weight: 800; font-size: 16px; }
.duo-form[open] summary { margin-bottom: 16px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.f { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.fgrid + .f, .f + .f { margin-top: 14px; }
.f .search { width: 100%; }
select.search { appearance: none; cursor: pointer; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select.search option { background: var(--surface); color: var(--text); }
.checks-row .chips { margin: 0; }
.chip.pick { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chip.pick input { accent-color: var(--accent); margin: 0; }
.chip.pick:has(input:checked) { color: var(--text); border-color: var(--line-strong); }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.tick { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; cursor: pointer; }
.tick input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.btn:disabled, .mini:disabled { opacity: 0.55; cursor: default; }
.form-msg { min-height: 20px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.form-msg.good { color: var(--mint); }
.form-msg.bad { color: var(--accent); }
.duo-form .fine { margin: 8px 0 0; }

.duo-list-section { padding-top: 32px; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.list-head h2 { margin: 0; }
.count { color: var(--muted); font-family: var(--font-ko); font-size: 16px; font-weight: 600; margin-left: 4px; }
.filters .chips { margin: 10px 0 0; }
.dlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 18px; padding-bottom: 60px; }
.dcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.dcard.mine { border-color: var(--mint); }
.dcard-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.d-id { font-weight: 800; font-size: 17px; word-break: break-all; }
.dtags { display: flex; flex-wrap: wrap; gap: 6px; }
.dtag { font-size: 12px; font-weight: 700; border-radius: 4px; padding: 2px 8px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.dtag.strong { color: var(--text); }
.dtag.me { background: color-mix(in srgb, var(--mint) 14%, transparent); color: var(--mint); }
.d-lang { font-size: 14px; color: var(--muted); }
.d-lang b { color: var(--text); }
.lv { font-weight: 700; }
.lv.lv0, .lv.lv1 { color: var(--muted); }
.lv.lv2 { color: var(--amber); }
.lv.lv3, .lv.lv4 { color: var(--mint); }
.d-memo { font-size: 14.5px; word-break: break-word; }
.dcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.d-time { font-size: 12.5px; color: var(--muted); }
.dcard-foot .p-actions { margin-top: 0; }

/* 장비·감도 */
.calc { margin-top: 8px; }
.calc + .calc { margin-top: 16px; }
.calc h2 { margin: 0 0 14px; font-size: 20px; }
.calc .sub { color: var(--muted); font-size: 14px; margin: -8px 0 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat-label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.stat-value { font-family: var(--font-serif); font-size: 30px; font-weight: 900; color: var(--text); line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: 12.5px; color: var(--muted); }
.calc .mini { margin-top: 12px; }
.calc .notice { margin-top: 12px; }
.gcard { gap: 6px; }
.g-maker { font-size: 12px; font-weight: 700; color: var(--muted); }
.g-name { font-size: 17px; font-weight: 800; line-height: 1.35; }
.g-specs { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; }
.g-specs li { display: flex; gap: 10px; padding: 3px 0; border-top: 1px dashed var(--line); }
.g-specs li:first-child { border-top: 0; }
.g-key { flex: none; width: 72px; color: var(--muted); }
.g-val { min-width: 0; word-break: break-word; }
.g-note { font-size: 13px; color: var(--muted); margin-top: 4px; }
a.mini { display: inline-block; text-decoration: none; }

/* 푸터 */
.footer { border-top: 2px solid var(--line-strong); padding: 24px 0 40px; color: var(--muted); font-size: 13px; }

@media (max-width: 560px) {
  .topbar .wrap { gap: 10px; }
  .hero { padding-top: 40px; }
  .plist { grid-template-columns: 1fr; }
}
