:root {
  --ink: #17233b;
  --navy: #1d3a5f;
  --gold: #e8a812;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --line: #d9e0ea;
  --muted: #5b6b82;
  --green: #1c7a3f;
  --red: #b3372f;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.45; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
a { color: var(--navy); }

.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; padding-bottom: 10px; }
.brand { font-weight: 800; font-size: 1.15rem; }
.site-header nav a { color: #dbe6f4; margin-left: 16px; text-decoration: none; font-size: .95rem; }

.hero { background: linear-gradient(160deg, #1d3a5f, #122740); color: #fff; padding: 42px 0 34px; }
.hero h1 { font-size: 1.9rem; margin: 0 0 10px; line-height: 1.2; }
.hero .sub { font-size: 1.05rem; color: #d7e3f2; max-width: 640px; }
.fineprint { font-size: .82rem; color: #93a5bd; }
.hero .fineprint { color: #9db1c9; }

.btn { display: inline-block; background: var(--navy); color: #fff; border: none; border-radius: 8px; padding: 9px 16px; font-size: .95rem; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.12); }
.btn-big { padding: 12px 22px; font-size: 1.05rem; font-weight: 700; }
.btn-small { padding: 6px 11px; font-size: .88rem; }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn-gold { background: var(--gold); color: #241a00; font-weight: 700; }

.app-shell { padding-top: 18px; padding-bottom: 10px; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.app-topbar label { font-size: .85rem; color: var(--muted); margin-right: 6px; }
select, input, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
textarea { width: 100%; }
.pro-status { font-weight: 700; margin-right: 8px; }
.pro-status.is-pro { color: var(--green); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.panel h2 { margin: 0 0 10px; font-size: 1.15rem; }
.pro-panel { border-color: var(--gold); background: #fffaf0; }
.key-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.key-row input { flex: 1 1 240px; }
.license-msg { font-size: .92rem; min-height: 1.2em; }
.license-msg.ok { color: var(--green); }
.license-msg.bad { color: var(--red); }

.row { display: flex; gap: 8px; align-items: center; }
.wrap-row { flex-wrap: wrap; }
.hint { color: var(--muted); font-size: .9rem; margin: 4px 0 10px; }
.empty-note { color: var(--muted); padding: 12px; border: 1px dashed var(--line); border-radius: 8px; }

.player-card { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: #fbfcfe; }
.player-card .pname { font-weight: 700; }
.player-card .pstats { font-size: .85rem; color: var(--muted); }
.player-card .pactions { white-space: nowrap; }
.flag { display: inline-block; background: #fdf0d3; color: #7a5b00; border-radius: 6px; padding: 0 6px; font-size: .75rem; font-weight: 700; margin-left: 6px; }

.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.grid-form label { font-size: .82rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.grid-form input { width: 100%; }

.slider-row { display: grid; grid-template-columns: 130px 1fr 28px; align-items: center; gap: 10px; margin-bottom: 8px; }
.slider-row label { font-weight: 600; font-size: .95rem; }
.slider-row output { font-weight: 800; text-align: right; }
input[type=range] { width: 100%; accent-color: var(--navy); }
.settings-row { gap: 18px; margin-top: 10px; }
.settings-row label { font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.settings-row input[type=number] { width: 70px; }

.spot { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: #fbfcfe; cursor: pointer; }
.spot.selected { border-color: var(--gold); box-shadow: 0 0 0 2px #f6d67a; }
.spot .num { font-size: 1.25rem; font-weight: 800; color: var(--navy); min-width: 26px; }
.spot .sname { font-weight: 700; }
.spot .swhy { font-size: .85rem; color: var(--muted); }
.spot .stag { font-size: .72rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: #e8eef7; color: var(--navy); margin-left: 6px; }
.spot .stag.locked { background: #d7f0e0; color: var(--green); }
.spot .stag.override { background: #fde3e0; color: var(--red); }
.spot .lockbtn { margin-left: auto; }

.save-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.save-row input { flex: 1 1 130px; }

.how-built { margin-top: 12px; }
.how-built table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.how-built th, .how-built td { border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: right; }
.how-built th:first-child, .how-built td:first-child { text-align: left; }

.card-view { border: 2px solid var(--ink); border-radius: 8px; padding: 16px; background: #fff; margin-top: 12px; }
.card-view h3 { margin: 0 0 4px; }
.card-view ol { margin: 8px 0; padding-left: 24px; }
.card-view li { padding: 3px 0; border-bottom: 1px dotted var(--line); }

.saved-item { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.saved-item .smeta { font-size: .85rem; color: var(--muted); }

.pricing { padding: 26px 0; }
.price-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.price-card.featured { border-color: var(--gold); box-shadow: 0 4px 18px rgba(232,168,18,.18); }
.price-card .price { font-size: 2rem; font-weight: 800; margin: 4px 0 8px; }
.price-card .price span { font-size: 1rem; color: var(--muted); }
.price-card ul { padding-left: 18px; margin: 0 0 12px; }
@media (max-width: 620px) { .price-cards { grid-template-columns: 1fr; } }

.faq { padding: 10px 0 30px; }
.faq details, .how-built { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }

.site-footer { background: var(--navy); color: #c8d6e8; padding: 16px 0; font-size: .88rem; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .92rem; z-index: 50; max-width: 92vw; text-align: center; }
.import-preview table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: 10px 0; }
.import-preview th, .import-preview td { border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: right; }
.import-preview th:first-child, .import-preview td:first-child { text-align: left; }

@media print {
  .site-header, .hero, .pricing, .faq, .site-footer, .app-topbar, .no-print { display: none !important; }
}
