:root {
  --bg: #f8f4f1;
  --surface: #ffffff;
  --surface-soft: #fff8f7;
  --ink: #332b2d;
  --muted: #6e6165;
  --line: #eadfdd;
  --accent: #d96f86;
  --accent-deep: #b94f69;
  --accent-soft: #fbe3e8;
  --green: #6d9a7e;
  --green-soft: #e7f2eb;
  --gold: #b9873f;
  --gold-soft: #f8efd9;
  --blue: #6687aa;
  --blue-soft: #e9f0f8;
  --danger: #bc4f5b;
  --danger-soft: #fae6e8;
  --shadow: 0 10px 30px rgba(87, 56, 62, .08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
/* 모든 요소가 본문과 같은 폰트를 쓰도록 (버튼·입력창 포함) */
button, input, select, textarea, .record-title, .rank-main strong, .mx-name strong { font-family: inherit; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
               "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  /* 영문 테마명이 한글보다 굵거나 얇게 보이지 않도록 브라우저의 가짜 굵게 처리를 막습니다 */
  font-synthesis-weight: none;
  font-synthesis: none;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(217,111,134,.24);
  outline-offset: 2px;
}

#app { min-height: 100vh; }
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: max(18px, env(safe-area-inset-top)) 20px 14px;
  background: rgba(248,244,241,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(234,223,221,.8);
}
.eyebrow { margin: 0 0 2px; color: var(--accent-deep); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
h1 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.025em; }
h2, h3, p { margin-top: 0; }
.icon-button {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); box-shadow: 0 4px 14px rgba(87,56,62,.06); cursor: pointer;
}
.main-content { width: min(1120px, 100%); margin: 0 auto; padding: 18px 16px calc(94px + var(--safe-bottom)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 2px 2px 16px; }
.page-head h2 { margin: 0; font-size: 23px; letter-spacing: -.035em; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(6, 1fr);
  padding: 7px 8px calc(7px + var(--safe-bottom));
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(18px);
}
.nav-item { border: 0; background: transparent; padding: 5px 1px; border-radius: 13px; color: #84767a; cursor: pointer; }
.nav-item span { display: block; height: 23px; font-size: 18px; line-height: 23px; }
.nav-item small { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: -.02em; }
.nav-item.active { color: var(--accent-deep); background: var(--accent-soft); }

.hero-card {
  position: relative; overflow: hidden; padding: 22px; border-radius: var(--radius-xl);
  color: #fff; background: linear-gradient(135deg, #d76c84 0%, #b9546c 100%); box-shadow: 0 16px 36px rgba(185,79,105,.22);
}
.hero-card::after { content: ""; position: absolute; width: 160px; height: 160px; right: -50px; top: -60px; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero-card h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.04em; }
.hero-card p { margin: 0 0 18px; color: rgba(255,255,255,.84); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-actions button { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.15); color: #fff; padding: 10px 13px; border-radius: 12px; font-weight: 750; cursor: pointer; }

.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 15px; box-shadow: 0 5px 18px rgba(87,56,62,.04); }
.kpi-card .label { color: var(--muted); font-size: 12px; font-weight: 700; }
.kpi-card .value { margin-top: 4px; font-size: 23px; font-weight: 850; letter-spacing: -.04em; }
.kpi-card .sub { margin-top: 2px; color: var(--muted); font-size: 12px; }

.section { margin-top: 22px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.section-title h3 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.section-title small { color: var(--muted); }
.text-button { border: 0; padding: 5px 0; background: transparent; color: var(--accent-deep); font-weight: 750; cursor: pointer; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 5px 20px rgba(87,56,62,.04); }
.record-list { display: grid; gap: 10px; }
.record-card { padding: 15px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.record-card:active { transform: scale(.99); }
.record-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.record-title { margin: 0; font-size: 16px; font-weight: 820; letter-spacing: -.02em; word-break: keep-all; }
.record-maker { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.rating-badge { flex: 0 0 auto; min-width: 52px; padding: 6px 9px; border-radius: 10px; background: var(--gold-soft); color: #8c6328; text-align: center; font-weight: 850; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.pill { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 4px 8px; border-radius: 999px; background: #f5efed; color: #6e6265; font-size: 11px; font-weight: 650; }
.pill.pink { color: var(--accent-deep); background: var(--accent-soft); }
.pill.green { color: #4f7b62; background: var(--green-soft); }
.pill.blue { color: #536f8e; background: var(--blue-soft); }
.pill.danger { color: var(--danger); background: var(--danger-soft); }
.note-preview { margin: 11px 0 0; color: #5d5254; font-size: 13px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.toolbar { position: sticky; top: 78px; z-index: 12; margin: 0 -2px 12px; padding: 2px 2px 10px; background: linear-gradient(var(--bg) 74%, rgba(248,244,241,0)); }
.search-box { position: relative; }
.search-box input { width: 100%; height: 46px; padding: 0 42px 0 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--ink); box-shadow: 0 4px 16px rgba(87,56,62,.04); }
.search-box::after { content: "⌕"; position: absolute; right: 15px; top: 9px; color: var(--muted); font-size: 22px; }
.filter-row { display: flex; gap: 7px; margin-top: 9px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); padding: 7px 11px; border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.filter-chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }

.primary-button, .secondary-button, .danger-button { border: 0; border-radius: 13px; padding: 11px 15px; font-weight: 800; cursor: pointer; }
.primary-button { background: var(--accent); color: #fff; box-shadow: 0 7px 16px rgba(217,111,134,.22); }
.secondary-button { background: #f3ecea; color: #665b5e; }
.danger-button { background: var(--danger-soft); color: var(--danger); }
.fab { position: fixed; right: 18px; bottom: calc(82px + var(--safe-bottom)); z-index: 25; width: 54px; height: 54px; border: 0; border-radius: 18px; background: var(--accent); color: #fff; font-size: 28px; box-shadow: 0 12px 26px rgba(185,79,105,.3); cursor: pointer; }

.rank-list { display: grid; gap: 8px; }
.rank-item { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 11px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.rank-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-deep); font-size: 12px; font-weight: 850; }
.rank-main strong { display: block; font-size: 13px; }
.rank-main small { color: var(--muted); }
.rank-score { font-weight: 850; color: var(--gold); }

.quick-pick { padding: 17px; background: linear-gradient(145deg, #fff 0%, #fff5f6 100%); }
.quick-pick-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-pick label { color: var(--muted); font-size: 11px; font-weight: 700; }
.quick-pick select { width: 100%; margin-top: 5px; height: 40px; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 0 9px; }
.pick-result { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--accent-soft); }
.pick-result strong { display: block; font-size: 16px; color: var(--accent-deep); }
.pick-result small { color: #79666a; }

.health-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.health-item { padding: 13px 8px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.health-item b { display: block; font-size: 20px; }
.health-item span { color: var(--muted); font-size: 11px; }

.segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(0,1fr)); gap: 5px; padding: 5px; margin-bottom: 15px; border-radius: 15px; background: #eee6e4; }
.segmented button { border: 0; background: transparent; padding: 9px 3px; border-radius: 11px; color: var(--muted); font-size: 11px; font-weight: 750; cursor: pointer; }
.segmented button.active { color: var(--ink); background: #fff; box-shadow: 0 3px 10px rgba(87,56,62,.08); }

.stat-card { padding: 15px; }
.stat-row { display: grid; grid-template-columns: 72px minmax(0,1fr) 46px; align-items: center; gap: 9px; margin: 11px 0; }
.stat-row strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; overflow: hidden; border-radius: 99px; background: #eee7e5; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg,var(--accent),#e9a0b1); }
.stat-row small { text-align: right; color: var(--muted); font-weight: 700; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.data-table th, .data-table td { padding: 11px 10px; border-bottom: 1px solid #f0e7e5; text-align: right; font-size: 12px; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; position: sticky; left: 0; background: #fff; }
.data-table th { color: var(--muted); background: #fbf7f5; font-weight: 750; }

.empty-state { padding: 34px 18px; text-align: center; color: var(--muted); border: 1px dashed #daccca; border-radius: 18px; }
.empty-state b { display: block; margin-bottom: 5px; color: var(--ink); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-end; background: rgba(45,31,35,.42); backdrop-filter: blur(4px); }
.modal-sheet { width: min(760px,100%); max-height: 94vh; overflow-y: auto; padding: 20px 18px calc(22px + var(--safe-bottom)); background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: 0 -12px 44px rgba(45,31,35,.22); }
.modal-handle { width: 42px; height: 4px; margin: -8px auto 14px; border-radius: 99px; background: #d5c6c4; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 21px; }
.modal-close { width: 38px; height: 38px; border: 0; border-radius: 12px; background: #eee6e4; cursor: pointer; }
.form-grid { display: grid; gap: 13px; }
.form-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; color: #6f6265; font-size: 12px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); padding: 11px 12px; }
.field input, .field select { height: 44px; }
.field textarea { min-height: 94px; resize: vertical; }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.check-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.check-chip { position: relative; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span { display: block; padding: 8px 5px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); text-align: center; font-size: 12px; font-weight: 700; }
.check-chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.form-actions { position: sticky; bottom: calc(-22px - var(--safe-bottom)); display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin: 20px -18px calc(-22px - var(--safe-bottom)); padding: 12px 18px calc(14px + var(--safe-bottom)); background: rgba(248,244,241,.96); border-top: 1px solid var(--line); backdrop-filter: blur(12px); }
.player-status-list { display: grid; gap: 7px; max-height: 390px; overflow-y: auto; padding: 2px; }
.player-status-row { display: grid; grid-template-columns: minmax(70px,1fr) 150px; gap: 10px; align-items: center; }
.player-status-row strong { font-size: 13px; }
.player-status-row select { height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 8px; }

.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.detail-item { padding: 11px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.detail-item span { display: block; color: var(--muted); font-size: 10px; }
.detail-item b { display: block; margin-top: 3px; font-size: 13px; word-break: break-word; }
.detail-note { margin-top: 11px; padding: 13px; border-radius: 13px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; color: #5e5356; }
.detail-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin-top: 14px; }

.backup-card { padding: 16px; margin-bottom: 10px; }
.backup-card h3 { margin-bottom: 5px; }
.backup-card p { margin-bottom: 13px; color: var(--muted); font-size: 12px; }
.button-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.storage-note { padding: 13px; border-radius: 13px; background: var(--blue-soft); color: #526b86; font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: calc(88px + var(--safe-bottom)); z-index: 200; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: min(430px,calc(100% - 28px)); padding: 12px 14px; border-radius: 14px; background: #332b2d; color: #fff; box-shadow: 0 12px 30px rgba(45,31,35,.28); }
.toast span { flex: 1; font-size: 12px; }
.toast button { border: 0; background: transparent; color: #ffd1dc; font-weight: 800; cursor: pointer; }

@media (min-width: 720px) {
  .app-header { padding-left: 28px; padding-right: 28px; }
  .main-content { padding-left: 24px; padding-right: 24px; }
  .kpi-grid { grid-template-columns: repeat(6,1fr); }
  .home-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: start; }
  .record-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .health-grid { grid-template-columns: repeat(3,1fr); }
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal-sheet { border-radius: 26px; max-height: min(900px,92vh); }
  .check-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .form-actions { bottom: -22px; }
}

@media (max-width: 420px) {
  .main-content { padding-left: 12px; padding-right: 12px; }
  .hero-card { padding: 19px; }
  .kpi-card { padding: 13px; }
  .kpi-card .value { font-size: 20px; }
  .form-grid.two { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .player-status-row { grid-template-columns: 90px minmax(0,1fr); }
}

.version-chip { display:inline-flex; align-items:center; margin-left:5px; padding:3px 7px; border-radius:999px; background:#fff1f4; color:#b64d66; font-size:10px; font-weight:850; vertical-align:middle; letter-spacing:0; }
.source-toggle { display:grid; grid-template-columns:repeat(2,1fr); gap:7px; margin-top:10px; }
.source-toggle button { min-height:38px; border:1px solid var(--line); border-radius:11px; background:#fff; color:var(--muted); font-weight:750; }
.source-toggle button.active { border-color:#d96f86; background:#fff0f3; color:#b64d66; }
.recommend-summary { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin:10px 0 0; }
.recommend-summary > div { padding:10px; border-radius:12px; background:rgba(255,255,255,.72); border:1px solid var(--line); }
.recommend-summary b { display:block; font-size:18px; }
.recommend-summary span { color:var(--muted); font-size:11px; }
.pick-result { position:relative; }
.pick-result .pick-source { display:inline-flex; margin-bottom:7px; padding:4px 7px; border-radius:999px; background:#f2f5ff; color:#526b9d; font-size:10px; font-weight:800; }
.pick-result-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.pick-result-actions a,.pick-result-actions button { display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:0 10px; border-radius:10px; border:1px solid var(--line); background:#fff; color:var(--text); font-size:11px; font-weight:750; text-decoration:none; }
.catalog-list { display:grid; gap:9px; }
.catalog-card { padding:14px; }
.catalog-card h4 { margin:0 0 3px; font-size:14px; }
.catalog-card p { margin:0; color:var(--muted); font-size:11px; }
.catalog-card .catalog-actions { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:9px; }
.catalog-card a { color:#b64d66; font-size:11px; font-weight:800; text-decoration:none; }
.catalog-status { font-size:10px; color:var(--muted); }
.catalog-refresh { display:flex; align-items:center; gap:7px; }
.catalog-refresh button { border:0; background:transparent; color:#b64d66; font-weight:800; font-size:11px; }
.update-card { border-color:#f1c8d1; background:#fff8fa; }
@media(max-width:420px){.quick-pick-controls{grid-template-columns:1fr}.source-toggle{grid-template-columns:1fr 1fr}.recommend-summary{grid-template-columns:1fr 1fr}}


/* v1.7 */
.arrest-kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.record-title-link { display:block; max-width:100%; padding:0; border:0; background:transparent; color:var(--ink); text-align:left; cursor:pointer; text-decoration:underline; text-decoration-color:rgba(185,79,105,.28); text-underline-offset:4px; }
.record-title-link:active { color:var(--accent-deep); }
.completed-support-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; padding-top:11px; border-top:1px solid #f0e7e5; }
.completed-support-row > span { color:var(--muted); font-size:11px; }
.gm-toggle { flex:0 0 auto; min-height:34px; padding:0 11px; border:1px solid var(--line); border-radius:11px; background:#fff; color:var(--muted); font-size:11px; font-weight:800; cursor:pointer; }
.gm-toggle.active { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-deep); }
.single-check { display:flex !important; align-items:center; gap:9px; min-height:44px; margin:0 !important; padding:0 12px; border:1px solid var(--line); border-radius:12px; background:#fff; cursor:pointer; }
.single-check input { width:18px !important; height:18px !important; margin:0; accent-color:var(--accent); }
.single-check span { color:var(--ink); font-size:13px; font-weight:750; }
@media (min-width:720px) { .arrest-kpi-grid { grid-template-columns:repeat(4,1fr); } }

.play-role-summary { margin: 10px 0 0; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.45; }
.play-gm-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px; padding:13px 14px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.play-gm-row > div { min-width:0; }
.play-gm-row strong { display:block; font-size:13px; color:var(--ink); }
.play-gm-row small { display:block; margin-top:4px; color:var(--muted); font-size:11px; line-height:1.45; }
@media (max-width:420px) { .play-gm-row { align-items:flex-start; flex-direction:column; } .play-gm-row .gm-toggle { width:100%; } }


/* v1.9 GM multi-select */
.gm-picker-field { padding-top:2px; }
.gm-picker-help { display:block; margin:-2px 0 10px; color:var(--muted); line-height:1.55; }
.gm-check-grid { max-height:220px; overflow-y:auto; padding:2px 2px 4px; scrollbar-width:thin; }
.gm-context-card { display:flex; justify-content:space-between; gap:12px; margin-bottom:14px; padding:13px 14px; border:1px solid var(--line); border-radius:14px; background:var(--surface-soft, #fff8f6); color:var(--ink); }
.gm-context-card strong { font-size:13px; }
.gm-context-card span { color:var(--muted); font-size:12px; }
@media (max-width:420px) { .gm-context-card { flex-direction:column; gap:4px; } }

/* v2.0 정렬 옵션 */
.sort-label { flex: 0 0 auto; align-self: center; color: var(--muted); font-size: 11px; font-weight: 800; padding-right: 2px; }

/* v2.1 검거 흐름 */
.streak-card { padding: 16px; }
.streak-top { display: grid; grid-template-columns: auto auto 1fr; gap: 18px; align-items: center; }
.streak-top b { display: block; font-size: 21px; letter-spacing: -.03em; }
.streak-top span { color: var(--muted); font-size: 11px; font-weight: 700; }
.streak-dots { display: flex; gap: 5px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.dot { width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto; }
.dot.win { background: var(--green); }
.dot.lose { background: var(--danger); }
.dots-label { color: var(--muted); font-size: 10px; font-weight: 700; margin-left: 4px; }

/* v2.1 명예의 전당 */
.fame-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.wanted-card { grid-column: 1 / -1; background: linear-gradient(150deg, #3a2c30 0%, #5a3a44 100%); color: #fff; border-radius: var(--radius-lg); padding: 18px 16px; text-align: center; box-shadow: 0 8px 24px rgba(58,44,48,.25); }
.wanted-card small { display: block; letter-spacing: .42em; color: #e8b6c2; font-weight: 800; font-size: 11px; }
.wanted-card b { display: block; font-size: 25px; margin: 7px 0 3px; letter-spacing: -.02em; }
.wanted-card span { color: rgba(255,255,255,.78); font-size: 12px; font-weight: 600; }
.fame-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; }
.fame-item small { color: var(--muted); font-size: 11px; font-weight: 800; display: block; }
.fame-item b { font-size: 15px; display: block; margin-top: 3px; }
.fame-item span { color: var(--muted); font-size: 11px; display: block; margin-top: 2px; }

/* v2.1 탐정 프로필 */
.detective-card { padding: 15px; }
.detective-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.detective-head h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.detective-badge { display: inline-block; margin-top: 5px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-size: 11px; font-weight: 800; }
.stat-line { margin-top: 10px; }
.stat-line-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); font-weight: 700; }
.stat-line-top b { color: var(--ink); font-size: 13.5px; }
.stat-line .bar-track { margin: 4px 0 3px; }
.stat-line small { color: var(--muted); font-size: 10.5px; }
.bar-fill.blue { background: var(--blue); }
.bar-fill.green { background: var(--green); }
.bar-fill.pink { background: var(--accent); }

/* v2.3 데이터 출처 구분 */
.source-block { margin-top: 13px; padding-top: 11px; border-top: 1px dashed var(--line); }
.source-block:first-of-type { border-top: 0; }
.source-head { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.source-head small { color: var(--muted); font-size: 11px; font-weight: 700; }
.source-tag { flex: 0 0 auto; padding: 3px 8px; border-radius: 7px; font-size: 10.5px; font-weight: 850; letter-spacing: -.01em; }
.source-tag.play { background: var(--accent-soft); color: var(--accent-deep); }
.source-tag.arrest { background: var(--blue-soft); color: #4d6a8c; }
.source-empty { margin: 7px 0 2px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.mini-tag { display: inline-block; margin-top: 6px; padding: 2px 7px; border-radius: 6px; font-size: 10px; font-weight: 800; }
.mini-tag.play { background: var(--accent-soft); color: var(--accent-deep); }
.mini-tag.arrest { background: var(--blue-soft); color: #4d6a8c; }

.source-guide { padding: 15px; }
.source-guide h4 { margin: 0 0 11px; font-size: 14px; letter-spacing: -.02em; }
.source-guide-row { display: flex; gap: 9px; align-items: flex-start; margin-top: 9px; }
.source-guide-row b { display: block; font-size: 13px; }
.source-guide-row small { display: block; margin-top: 1px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }

.coverage-card { padding: 15px; }
.coverage-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.coverage-top b { font-size: 21px; letter-spacing: -.03em; }
.coverage-top span { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.coverage-note { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.coverage-note b { color: var(--ink); }

/* v2.4 일행별 지표 비교표 */
.matrix-card { padding: 12px 13px; }
.mx-head, .mx-row { display: grid; grid-template-columns: 86px repeat(3, minmax(0,1fr)); gap: 8px; align-items: center; }
.mx-head { padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.mx-head .mx-name { color: var(--muted); font-size: 11px; font-weight: 800; }
.mx-head .mx-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.mx-col-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: -.03em; }
.mx-head .mini-tag { margin-top: 0; font-size: 9px; padding: 1px 5px; }
.mx-row { padding: 9px 0; border-bottom: 1px solid #f4eeec; }
.mx-row:last-child { border-bottom: 0; }
.mx-name strong { display: block; font-size: 13px; font-weight: 800; letter-spacing: -.02em; }
.mx-name small { display: block; color: var(--muted); font-size: 10.5px; }
.mx-cell { min-width: 0; }
.mx-cell.on { background: #fbf6f4; border-radius: 8px; padding: 3px 5px; margin: -3px -5px; }
.mx-bar { height: 6px; border-radius: 99px; background: #efe8e6; overflow: hidden; }
.mx-bar span { display: block; height: 100%; border-radius: 99px; }
.mx-bar span.pink { background: var(--accent); }
.mx-bar span.blue { background: var(--blue); }
.mx-bar span.green { background: var(--green); }
.mx-cell b { display: block; margin-top: 3px; font-size: 12px; font-weight: 800; letter-spacing: -.02em; }
.mx-cell b.muted { color: #b3a7a9; font-weight: 700; }

/* v2.5 지표 비교표 필터 토글 */
.matrix-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; padding: 11px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.matrix-toggle strong { display: block; font-size: 13px; font-weight: 800; letter-spacing: -.02em; }
.matrix-toggle small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.switch { flex: 0 0 auto; width: 48px; height: 28px; padding: 3px; border: 0; border-radius: 99px; background: #e4dbd9; cursor: pointer; transition: background .18s ease; }
.switch span { display: block; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(87,56,62,.22); transition: transform .18s ease; }
.switch.on { background: var(--accent); }
.switch.on span { transform: translateX(20px); }

/* v2.9 세트 후원 표시 */
.set-box { margin-top: 13px; padding: 12px 13px; background: var(--accent-soft); border-radius: 13px; }
.set-box strong { display: block; margin-bottom: 8px; font-size: 12.5px; color: var(--accent-deep); letter-spacing: -.02em; }
.set-item { display: inline-block; margin: 0 5px 5px 0; padding: 4px 10px; background: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; color: #5d5254; }
.set-item.me { background: var(--accent); color: #fff; }

/* v3.0 미입력 표시 · 백업 리마인더 */
.missing-row span { color: #9a6b10; font-weight: 700; }
.backup-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 13px 15px; background: linear-gradient(135deg, #fdf3e3, #fdeae6); border: 1px solid #f0dcc8; border-radius: var(--radius-lg); }
.backup-banner strong { display: block; font-size: 13.5px; letter-spacing: -.02em; }
.backup-banner small { display: block; margin-top: 3px; color: #8a7663; font-size: 11.5px; line-height: 1.5; }
.backup-banner-actions { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.backup-banner-actions .primary-button { padding: 8px 14px; font-size: 12.5px; }

/* v3.1 칭호 기준 표기 · 칭호 도감 */
.badge-crit { display: block; margin-top: 4px; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: -.01em; }
.title-card { padding: 14px 15px; }
.title-card.locked { opacity: .55; }
.title-head { display: flex; align-items: center; gap: 11px; }
.title-head > div { flex: 1; min-width: 0; }
.title-head h3 { margin: 0; font-size: 15.5px; letter-spacing: -.02em; }
.title-head .badge-crit { margin-top: 2px; }
.title-icon { font-size: 26px; flex: 0 0 auto; }
.title-desc { margin: 9px 0 0; color: #6e6165; font-size: 12.5px; line-height: 1.55; }
.title-holders { margin-top: 9px; }

/* v3.2 칭호 도감 접근성 */
.title-guide-chip { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; font-weight: 800; }
button.detective-badge { border: 0; cursor: pointer; font-family: inherit; }

/* v3.3 브리핑 · 케미 */
.briefing-bar { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 13px; font-size: 13px; line-height: 1.55; color: #4a3840; font-weight: 600; letter-spacing: -.01em; }
.locked-item { opacity: .55; }
