/* 그림·소리 창고 — 게임과 같은 겨울 빛깔(얼음 · 금 · 꽃분홍 · 잎) */
:root {
  --bg: #eef3f7;
  --paper: #ffffff;
  --ink: #26364a;
  --soft: #5d7088;
  --line: #cfdbe6;
  --ice: #dfeaf3;
  --gold: #f2b632;
  --bloom: #e8558f;
  --leaf: #5e9a45;
  --sky: #2f74b5;
  --ok-bg: #e4f2dc;
  --ok: #3d7329;
  --temp-bg: #fdf1d6;
  --temp: #8f6200;
  --miss-bg: #fde4ec;
  --miss: #b0284f;
  --new-bg: #dcebfb;
  --new: #1f5f99;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.6 -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; background: var(--bg); color: var(--ink); }
#app { max-width: 880px; margin: 0 auto; padding: 0 16px 80px; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--sky); }
.gate { max-width: 420px; margin: 20vh auto; text-align: center; color: var(--soft); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 10px; }
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand b { font-size: 20px; letter-spacing: -0.02em; }
.brand span { color: var(--soft); font-size: 15px; }
.me { font-size: 13px; color: var(--soft); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }

.sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 10px; }
.sum button { display: grid; gap: 0; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); }
.sum b { font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.sum span { font-size: 12px; color: var(--soft); }
.sum .need b { color: var(--miss); }
.sum .temp b { color: var(--temp); }
.sum .new b { color: var(--new); }
.sum button.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.how { margin: 0 0 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; font-size: 14px; }
.how summary { cursor: pointer; color: var(--soft); }
.how p { margin: 8px 0; }

.tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; margin: 0 -16px; padding-inline: 16px; background: var(--bg); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; font-weight: 600; }
.tabs button small { font-weight: 400; color: var(--soft); font-variant-numeric: tabular-nums; }
.tabs button i { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--miss); border-radius: 999px; padding: 0 6px; line-height: 17px; }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tabs button.on small { color: #c7d3e0; }

.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 4px; }
.seg { display: flex; gap: 2px; padding: 3px; background: var(--ice); border-radius: 12px; }
.seg button { border: 0; background: none; height: 30px; padding: 0 10px; border-radius: 9px; font-size: 13px; color: var(--soft); font-weight: 600; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
#q { flex: 1 1 140px; min-width: 0; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); }

.sub { margin: 18px 0 6px; font-size: 13px; font-weight: 700; color: var(--soft); letter-spacing: 0.02em; }
.sub small { font-weight: 400; }
.empty { color: var(--soft); text-align: center; padding: 40px 0; }

.row { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px; margin: 0 0 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.th { width: 76px; height: 76px; border-radius: 12px; background: repeating-conic-gradient(#eef2f6 0% 25%, #f9fbfc 0% 50%) 50% / 14px 14px; display: grid; place-items: center; overflow: hidden; }
.th img { max-width: 100%; max-height: 100%; object-fit: contain; }
.th.icon { background: var(--ice); font-size: 28px; color: var(--soft); }
.body { min-width: 0; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.head b { font-size: 16px; margin-right: 2px; }
.body p { margin: 3px 0 0; font-size: 13px; color: var(--soft); overflow-wrap: anywhere; }
.body p em { font-style: normal; font-weight: 700; color: var(--ink); margin-right: 6px; font-size: 12px; }
.body audio, .body video { display: block; width: 100%; max-width: 420px; margin-top: 8px; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; line-height: 18px; white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.temp { background: var(--temp-bg); color: var(--temp); }
.chip.miss { background: var(--miss-bg); color: var(--miss); }
.chip.new { background: var(--new-bg); color: var(--new); }
.chip.soft { background: var(--ice); color: var(--soft); font-weight: 600; }

.acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.btn { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn:disabled { opacity: 0.5; }
label.btn { cursor: pointer; }

.prog { position: relative; height: 22px; margin-top: 8px; border-radius: 8px; background: var(--ice); overflow: hidden; font-size: 12px; }
.prog i { position: absolute; inset: 0 auto 0 0; width: 0; background: #b9d6ef; transition: width 0.2s; }
.prog span { position: relative; padding-left: 8px; line-height: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }

.up { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; margin-top: 10px; padding: 8px; border-radius: 12px; background: #f5f9fc; border: 1px dashed var(--line); }
.up img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: #fff; }
.up audio, .up video { grid-column: 1 / -1; margin: 0; }
.upmeta { display: grid; gap: 2px; font-size: 12px; color: var(--soft); min-width: 0; overflow-wrap: anywhere; }
.upmeta .chip { justify-self: start; }

.notes { margin-top: 10px; padding: 10px; border-radius: 12px; background: #f7f9fb; border: 1px solid var(--line); }
.note { margin: 0 0 8px; font-size: 14px; color: var(--ink) !important; white-space: pre-wrap; }
.note b { margin-right: 6px; }
.note span { color: var(--soft); font-size: 12px; margin-right: 8px; }
.noteform { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: end; }
.noteform textarea { width: 100%; min-width: 0; resize: vertical; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.hist { margin-top: 8px; font-size: 13px; }
.hist p { margin: 2px 0; }

.lead { color: var(--soft); font-size: 14px; margin: 10px 0; }
.lineup { display: flex; align-items: flex-end; gap: 10px; overflow-x: auto; padding: 16px 12px 8px; margin: 0 0 12px; background: linear-gradient(#f7fbfe, #e3edf5); border: 1px solid var(--line); border-radius: 16px; border-bottom: 3px solid #b8c9d8; }
.lineup figure { flex: none; margin: 0; display: grid; justify-items: center; gap: 4px; }
.lineup figure img { display: block; width: auto; }
.lineup figure.unset img { opacity: 0.35; }
.lineup figcaption { font-size: 12px; text-align: center; line-height: 1.3; }
.lineup figcaption small { display: block; color: var(--soft); font-variant-numeric: tabular-nums; }
.sizes { display: grid; gap: 6px; }
.size { display: grid; grid-template-columns: 48px 1fr 88px; gap: 10px; align-items: center; padding: 8px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.size img { width: 48px; height: 48px; object-fit: contain; }
.size div { display: grid; min-width: 0; }
.size div span { font-size: 12px; color: var(--soft); }
.size div span.by { color: var(--sky); }
.size input { width: 100%; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; font-size: 16px; }
.size input:disabled { background: var(--ice); color: var(--soft); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 6px 20px rgba(20, 30, 45, 0.25); z-index: 20; }

@media (max-width: 480px) {
  .row { grid-template-columns: 60px 1fr; gap: 10px; padding: 10px; }
  .th { width: 60px; height: 60px; }
  .sum b { font-size: 19px; }
}
