:root {
  --bg: #121110;
  --bg2: #1c1915;
  --card: #1f1c18;
  --inset: #151412;
  --line: #34302a;
  --text: #ece6da;
  --muted: #9c9383;
  --gold: #d4a72c;
  --gold-ink: #1a1408;
  --gold-soft: rgba(212, 167, 44, .12);
  --blue: #5aa0e6;
  --ok: #5fbf7a;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
button { font: inherit; cursor: pointer; }

.hero { background: linear-gradient(135deg, #1d1a15, #2a2218); border-bottom: 2px solid var(--gold); padding: 34px 0 26px; }
.hero h1 { margin: 0; color: var(--gold); font-size: clamp(26px, 5vw, 34px); letter-spacing: .3px; }
.hero p { margin: 6px 0 0; color: var(--muted); }

main { padding-top: 26px; }

.daily {
  display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  border: 1px solid var(--gold); border-radius: var(--r); background: var(--bg2); padding: 16px 20px;
}
.daily-date { color: var(--gold); font-weight: 700; font-size: 17px; }
.daily-sub { font-size: 13px; color: var(--muted); }
.daily-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn { border-radius: 10px; padding: 10px 16px; font-weight: 700; border: 1px solid var(--line); background: var(--inset); color: var(--text); transition: filter .15s, border-color .15s; }
.btn:hover { filter: brightness(1.15); }
.btn-gold { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.btn-ghost { background: transparent; }
.btn-blue { color: var(--blue); border-color: var(--blue); background: transparent; }
.btn-used { color: var(--ok); border-color: var(--ok); }
.linkbtn { background: none; border: 0; color: var(--gold); padding: 0; font-weight: 600; margin-left: auto; }

.search { margin-top: 18px; display: flex; gap: 10px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font-size: 16px; padding: 14px 0; min-width: 0; }
.search:focus-within { border-color: var(--gold); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.chip.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 700; }
.chips-sm .chip { font-size: 13px; padding: 4px 12px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: 14px; align-items: center; }
.filters label { display: flex; gap: 6px; align-items: center; cursor: pointer; }

.progress { margin-top: 14px; }
.progress-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.progress-row b { color: var(--gold); }
.bar { height: 6px; border-radius: 6px; background: #2a2620; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s; }

.meta { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 14px; padding: 12px 0; font-size: 13px; color: var(--muted); }

.suggest { border: 1px dashed var(--gold); border-radius: var(--r); padding: 12px 16px; margin-bottom: 16px; background: var(--gold-soft); font-size: 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.used { opacity: .62; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 13px; padding: 3px 10px; border-radius: 7px; background: var(--inset); color: var(--muted); }
.badge.gold { background: var(--gold-soft); color: var(--gold); font-weight: 700; }
.badge.ok { color: var(--ok); }
.card h3 { margin: 0; font-size: 19px; line-height: 1.3; text-transform: uppercase; cursor: pointer; }
.card h3:hover { color: var(--gold); }
.sub { color: var(--muted); font-size: 13px; margin-top: -6px; }
.box { background: var(--inset); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.box-h { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.box ol { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.box li { counter-increment: n; display: flex; gap: 12px; padding: 3px 0; font-size: 14.5px; }
.box li::before { content: counter(n); color: var(--gold); font-weight: 700; font-size: 12px; min-width: 10px; padding-top: 2px; }
.box li b { color: var(--muted); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12.5px; color: var(--muted); background: var(--inset); padding: 3px 9px; border-radius: 6px; }
details.expand summary { list-style: none; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 9px; font-weight: 700; color: var(--muted); background: var(--inset); cursor: pointer; }
details.expand summary::-webkit-details-marker { display: none; }
details.expand[open] summary { color: var(--text); }
.steps { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.steps li { background: var(--inset); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.steps li span { color: var(--gold); font-weight: 700; margin-right: 6px; font-size: 12px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.actions .btn { padding: 11px 8px; }
.actions .btn-sm { font-weight: 500; font-size: 14px; }

.more { text-align: center; padding: 24px 0; }
.foot { color: var(--muted); font-size: 12px; padding-bottom: 30px; }
.foot code { color: var(--gold); }

dialog { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: var(--bg2); color: var(--text); border: 1px solid var(--gold); border-radius: 16px; padding: 0; }
dialog::backdrop { background: rgba(0,0,0,.7); }
.modal-head { position: sticky; top: 0; display: flex; justify-content: space-between; gap: 10px; align-items: start; padding: 16px 20px; background: var(--bg2); border-bottom: 1px solid var(--line); z-index: 1; }
.modal-head h2 { margin: 0; font-size: 17px; color: var(--gold); }
.x { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; }
.modal-body { padding: 16px 20px 22px; display: grid; gap: 16px; }
.pblock h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pblock pre { margin: 0; white-space: pre-wrap; word-break: break-word; background: var(--inset); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: 13px/1.55 ui-monospace, Menlo, Consolas, monospace; max-height: 340px; overflow: auto; }
.pblock .btn { padding: 6px 12px; font-size: 13px; }
.guide h3 { color: var(--gold); margin: 8px 0 4px; font-size: 15px; }
.guide p, .guide li { font-size: 14px; color: var(--text); }
.guide ul { padding-left: 18px; margin: 4px 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--gold); color: var(--gold-ink); font-weight: 700; padding: 10px 18px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .card { padding: 16px; }
  .card h3 { font-size: 17px; }
  .linkbtn { margin-left: 0; }
  .daily-actions { width: 100%; }
  .daily-actions .btn { flex: 1; }
}
.suggest[hidden] { display: none; }
