:root {
  --bg: #111214; --panel: #18191c; --panel-2: #202226; --line: #2c2f34;
  --text: #eeece8; --muted: #9a9890; --accent: #e8a33d; --accent-ink: #1a1206;
  --bad: #ff6b5b; --ok: #5bd18b; --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.15; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.grow { flex: 1; min-width: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--panel-2); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; white-space: nowrap; min-height: 42px; }
.btn:hover { border-color: #41454c; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 6px 12px; font-size: 14px; min-height: 36px; }
.btn.xs { padding: 4px 8px; font-size: 13px; min-height: 30px; }
.btn.block { width: 100%; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .55; cursor: default; }
.input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; color: var(--text); font: inherit; font-size: 16px; outline: none; }
.input:focus { border-color: var(--accent); }
.input.color { padding: 4px; height: 44px; width: 90px; }
textarea.input { resize: vertical; }
label.field, div.field { display: block; margin-bottom: 14px; }
label.field > span, .field .lbl { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: var(--bad); min-height: 4px; margin: 4px 0 10px; font-size: 14px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); }
.pill.done { background: rgba(91,209,139,.15); color: var(--ok); }

.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; text-decoration: none; }
.logo i { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); position: relative; }
.logo i::after { content: ''; position: absolute; inset: 6px 8px; border: 2.5px solid var(--accent-ink); border-left-width: 3px; border-radius: 0 5px 5px 0; }
.shop-logo { max-height: 34px; max-width: 160px; display: block; }
.shop-logo.big { max-height: 60px; }

#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 99; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast { background: #2a2c30; border: 1px solid var(--line); padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.err { border-color: var(--bad); }

.center-card { max-width: 400px; margin: 10vh auto; padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.center-card h2 { margin: 18px 0 18px; }
@media (max-width: 480px) { .center-card { margin: 0; min-height: 100vh; border-radius: 0; border: 0; } }

/* modal: bottom sheet on phones */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 18px 20px 22px; }
.modal-head { display: flex; align-items: center; margin-bottom: 12px; }
.modal-head h3 { margin: 0; flex: 1; font-size: 20px; }
@media (max-width: 600px) {
  .modal-back { place-items: end stretch; padding: 0; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* landing */
nav.top { display: flex; align-items: center; gap: 14px; padding: 14px 20px; max-width: 1080px; margin: 0 auto; }
nav.top a:not(.btn) { text-decoration: none; }
.landing { background: radial-gradient(900px 520px at 85% -5%, rgba(232,163,61,.16), transparent 60%); }
.l-hero { max-width: 1080px; margin: 0 auto; padding: 8vh 20px 6vh; }
.kicker { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; margin: 0 0 12px; }
.l-hero h1 { font-size: clamp(38px, 7vw, 76px); margin: 0; max-width: 900px; letter-spacing: -.04em; line-height: 1; }
.l-hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: #c9c6bf; max-width: 640px; margin: 22px 0 28px; }
.cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.steps, .why, .pricing { max-width: 1080px; margin: 0 auto; padding: 24px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; margin-bottom: 12px; }
.step b { display: block; font-size: 18px; margin-bottom: 6px; }
.step p, .why p { margin: 0; color: var(--muted); }
.why h3 { margin: 0 0 6px; font-size: 18px; }
.why > div { padding: 6px 2px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.plan.hot { border-color: var(--accent); }
.plan b { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.price { font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0; }
.price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan p { margin: 0; color: #c9c6bf; }
.l-foot { text-align: center; padding: 40px 20px; font-size: 13px; }

/* shop app */
.wrap { max-width: 860px; margin: 0 auto; padding: 8px 20px 80px; }
.page-head { display: flex; align-items: center; gap: 12px; margin: 8px 0 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: clamp(24px, 4vw, 32px); }
.page-head p { margin: 4px 0 0; }
.back { display: inline-block; margin-top: 6px; text-decoration: none; font-size: 14px; }
.builds { display: grid; gap: 12px; }
.build-card { display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.build-card:hover { border-color: #41454c; }
.bc-thumb { width: 92px; height: 70px; flex: none; border-radius: 10px; background: var(--panel-2) center/cover; display: grid; place-items: center; font-size: 28px; }
.bc-meta { display: grid; gap: 3px; min-width: 0; }
.bc-meta b { font-size: 17px; }
.bc-meta .muted { font-size: 13px; }
.empty { text-align: center; padding: 50px 20px; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty .big { font-size: 46px; }
.empty.small { padding: 26px 20px; }
.plan-note { margin-top: 18px; }
.link-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); flex-wrap: wrap; }
.link-bar .grow { display: grid; }
.add-update { margin: 16px 0 22px; font-size: 17px; min-height: 54px; }
.updates { display: grid; gap: 14px; }
.update { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.update header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.update p { margin: 10px 0 0; white-space: pre-wrap; }
.stage { background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.update time, .o-when time { color: var(--muted); font-size: 13px; }
.hrs { color: var(--accent); font-weight: 700; font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 12px; }
.tile { position: relative; }
.tile-img { display: grid; place-items: center; width: 100%; aspect-ratio: 4/3; border: 0; border-radius: 10px; background: var(--panel-2) center/cover; overflow: hidden; padding: 0; font-size: 12px; color: var(--muted); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; }
.tile.pending { opacity: .6; }
.tile-actions { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; }
.tile-actions .btn { background: rgba(0,0,0,.6); min-height: 28px; padding: 2px 7px; }
.play { background: rgba(0,0,0,.65); color: #fff; padding: 5px 11px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.danger-zone { display: flex; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.logo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* composer */
.pick-btn { width: 100%; padding: 22px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg); font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.pick-btn:hover { border-color: var(--accent); }
.picked { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; margin-bottom: 14px; }
.pick { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--panel-2); }
.pick img, .pick video { width: 100%; height: 100%; object-fit: cover; }
.pick .x { position: absolute; top: 3px; right: 3px; border: 0; background: rgba(0,0,0,.7); border-radius: 50%; width: 24px; height: 24px; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: var(--bg); padding: 7px 12px; border-radius: 999px; font-size: 14px; }
.chips button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.upload-status { display: grid; gap: 6px; font-size: 14px; margin-bottom: 6px; }
.bar { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 80vh; border-radius: 8px; }
.lightbox > .btn { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; }
.lightbox p { max-width: 700px; text-align: center; color: #ddd; margin: 0; }

/* owner page */
.owner { min-height: 100vh; }
.o-hero { position: relative; min-height: 64vh; padding: 28px 24px 40px; display: flex; flex-direction: column; justify-content: flex-end; background: radial-gradient(900px 520px at 85% 0%, rgba(232,163,61,.2), transparent 60%), var(--panel) center/cover; }
.o-shop { position: absolute; top: 22px; left: 24px; font-size: 17px; }
.o-hero h1 { margin: 0; font-size: clamp(36px, 8vw, 78px); letter-spacing: -.04em; line-height: 1; max-width: 920px; }
.o-for { margin: 12px 0 0; font-size: 17px; color: #ddd9d0; }
.stats { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.stat b { display: block; font-size: 32px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: #c2bfb7; font-size: 13px; }
.o-intro { max-width: 760px; margin: 0 auto; padding: 40px 24px 0; font-size: 18px; line-height: 1.65; white-space: pre-wrap; }
.o-timeline { max-width: 900px; margin: 0 auto; padding: 16px 24px 30px; }
.chapter { margin-top: 38px; padding-left: 24px; border-left: 2px solid var(--line); position: relative; }
.chapter::before { content: ''; position: absolute; left: -8px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.chapter h2 { margin: 0 0 14px; font-size: 24px; }
.o-entry { margin-bottom: 26px; }
.o-when { display: flex; gap: 10px; align-items: center; }
.o-entry p { margin: 4px 0 10px; font-size: 16px; white-space: pre-wrap; }
.o-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.o-grid.one { grid-template-columns: minmax(0, 560px); }
.o-media { display: grid; place-items: center; width: 100%; aspect-ratio: 4/3; border: 0; padding: 0; border-radius: 12px; background: var(--panel-2) center/cover; overflow: hidden; cursor: zoom-in; }
.o-media img { width: 100%; height: 100%; object-fit: cover; }
.o-next { margin-top: 10px; padding-left: 26px; }
.o-foot { text-align: center; padding: 30px 24px calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; justify-items: center; }
.o-foot a { color: var(--accent); font-weight: 700; }
@media (max-width: 600px) {
  .o-hero { min-height: 56vh; padding: 20px 16px 28px; }
  .o-shop { left: 16px; }
  .o-intro, .o-timeline { padding-left: 16px; padding-right: 16px; }
  .chapter { padding-left: 18px; }
  .o-grid { grid-template-columns: 1fr 1fr; }
  .o-grid.one { grid-template-columns: 1fr; }
  .wrap { padding: 4px 16px 80px; }
  nav.top { padding: 12px 16px; }
  .two { grid-template-columns: 1fr; }
  .link-bar .btn { flex: 1; }
}
