/* Mobile first: one column, big touch targets, the download button docked at the bottom.
   From 900px up: settings on the left, the image on the right. */
:root {
  --bg: #080b16;
  --panel: #10152a;
  --panel2: #161d38;
  --line: #242d52;
  --text: #e9ecff;
  --muted: #8b93bd;
  --accent: #ffc457;
  --accent2: #ff8a3d;
  --ok: #57e3a1;
  --danger: #ff5d73;
  --radius: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Inter, "Segoe UI", Roboto, Arial, sans-serif;
}
button, input, select { font: inherit; color: inherit; }

.app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.side { padding: 14px 14px 4px; }
.main { display: flex; flex-direction: column; min-width: 0; flex: 1; }

/* header */
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.logo { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; color: #1b1203;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); text-decoration: none; flex: none; }
h1 { font: 700 24px/1.05 Rajdhani, Inter, sans-serif; margin: 0; letter-spacing: .5px; }
.brand p { margin: 2px 0 0; font-size: 13px; }
.brand a.home { color: var(--accent); text-decoration: none; }
.brand-text { flex: 1; min-width: 0; }
/* language switch: МН | EN */
.lang { display: flex; flex: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0b0b0b; }
.lang button { min-width: 40px; min-height: 36px; padding: 0 9px; border: 0; border-radius: 0; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.lang button + button { border-left: 1px solid var(--line); }
.lang button.on { background: var(--panel2); color: var(--accent); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* the one big button */
.pick { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1b1203; user-select: none;
  box-shadow: 0 8px 24px rgba(255,140,60,.18); transition: transform .1s; }
.pick:active { transform: scale(.98); }
.pick-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 700;
  background: rgba(27,18,3,.14); flex: none; }
.pick b { display: block; font: 700 20px/1.1 Rajdhani, Inter, sans-serif; letter-spacing: .3px; }
.pick small { display: block; font-size: 13px; opacity: .75; }

/* picked screenshots: a scrolling strip */
.picked { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.picked-thumbs { display: flex; gap: 6px; overflow-x: auto; flex: 1; padding-bottom: 4px; scrollbar-width: thin; }
.pthumb { position: relative; flex: none; width: 92px; height: 43px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); background: #0b0b0b; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pthumb.other { border-color: #7a5b1d; }
.pthumb button { position: absolute; top: 0; right: 0; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 0 0 0 7px;
  background: rgba(0,0,0,.65); color: #fff; font-size: 15px; line-height: 1; }

/* what to screenshot: small chips that tick themselves off */
.tips { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; font-size: 12px; color: var(--muted); }
.tips::before { content: attr(data-prefix); align-self: center; margin-right: 2px; }
.tips li { padding: 3px 9px 3px 7px; border: 1px solid var(--line); border-radius: 99px; background: #0b0b0b; white-space: nowrap; }
.tips li::before { content: '○ '; }
.tips li.done { color: var(--ok); border-color: rgba(87,227,161,.35); }
.tips li.done::before { content: '✓ '; }

/* style picker: four small swatches */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.theme { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; min-height: 0; border-radius: 10px;
  background: #0b0b0b; font-size: 12px; color: var(--muted); }
.theme i { width: 100%; height: 22px; border-radius: 6px; border: 1px solid rgba(255,255,255,.12); }
.theme.on { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 1px var(--accent) inset; }

h2 { font: 700 15px/1.2 Rajdhani, Inter, sans-serif; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 10px; }

/* advanced */
.adv summary { cursor: pointer; font: 700 15px/1.2 Rajdhani, Inter, sans-serif; text-transform: uppercase; letter-spacing: 1px; color: var(--muted);
  list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 28px; }
.adv summary::-webkit-details-marker { display: none; }
.adv summary::after { content: '▾'; font-size: 16px; transition: transform .15s; }
.adv[open] summary { color: var(--text); margin-bottom: 12px; }
.adv[open] summary::after { transform: rotate(180deg); }
.adv-h { font: 600 14px/1.2 Inter, sans-serif; margin: 16px 0 8px; display: flex; gap: 8px; align-items: baseline; }

.row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
button, .btn { border: 1px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 10px 14px; min-height: 44px; cursor: pointer;
  transition: background .15s, border-color .15s; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1b1203; border: 0; font-weight: 700; }
button.ghost { background: transparent; }
.small-btn { min-height: 36px; padding: 6px 10px; font-size: 13px; flex: none; }
input[type=number] { width: 84px; }
input, select { background: #0b0b0b; border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 44px; font-size: 16px; }
input:focus, select:focus { outline: 2px solid #5867c9; outline-offset: -1px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.field input, .field select { color: var(--text); width: 100%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; min-height: 40px; }
.check input { width: 20px; height: 20px; min-height: 0; }

.shots { display: flex; flex-direction: column; gap: 6px; }
.shot { display: grid; grid-template-columns: 76px 1fr auto; gap: 8px; align-items: center; background: #0b0b0b; border: 1px solid var(--line); border-radius: 9px; padding: 5px; }
.shot img { width: 76px; height: 35px; object-fit: cover; border-radius: 5px; display: block; }
.shot .meta { min-width: 0; }
.shot .name { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot select { padding: 4px 6px; min-height: 34px; font-size: 14px; width: 100%; }
.shot .x { border: 0; background: transparent; color: var(--muted); padding: 4px 10px; min-height: 34px; font-size: 18px; }
.shot.other select { border-color: #7a5b1d; }

.rev-sec { margin-bottom: 12px; }
.rev-sec h3 { font: 600 13px/1.2 Inter, sans-serif; margin: 0 0 6px; display: flex; justify-content: space-between; }
.rev-sec h3 span { color: var(--muted); font-weight: 400; }
.thumbs { display: flex; flex-wrap: wrap; gap: 4px; }
.thumb { position: relative; border-radius: 5px; overflow: hidden; cursor: pointer; border: 1px solid transparent; line-height: 0; }
.thumb canvas { display: block; }
.thumb.off { opacity: .28; filter: grayscale(1); }
.thumb.off::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 16px; line-height: 1; }
.thumb .tag { position: absolute; left: 2px; bottom: 2px; font-size: 9px; line-height: 1; padding: 2px 3px; border-radius: 3px; background: rgba(0,0,0,.7); color: #ffd36a; }

/* result */
.output { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 16px; align-items: center; flex: 1; }
.page { width: 100%; max-width: 1100px; }
.page img { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #000; }
.page .cap { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.page .cap .actions { display: flex; gap: 8px; }
.page .cap button { min-height: 38px; padding: 6px 12px; font-size: 13px; }
.empty { margin: 24px auto; text-align: center; max-width: 420px; padding: 0 10px; }
.empty-icon { font-size: 48px; color: #2c3770; line-height: 1; }

/* download dock: always reachable with the thumb */
.dock { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(8,11,22,.92); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.dock .status { flex: 1; font-size: 12.5px; min-width: 0; }
.dock button { flex: none; min-width: 132px; min-height: 48px; font-size: 16px; }

.drop { position: fixed; inset: 0; background: rgba(8,11,22,.82); display: grid; place-items: center; z-index: 10; border: 3px dashed var(--accent); }
.drop div { font: 700 28px Rajdhani, sans-serif; color: var(--accent); }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--muted); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 900px) {
  body { font-size: 14px; }
  .app { display: grid; grid-template-columns: 380px 1fr; height: 100vh; }
  .side { overflow-y: auto; padding: 18px 16px 40px; border-right: 1px solid var(--line); background: #000; }
  .main { overflow: auto; }
  .output { padding: 18px; }
  .dock { position: sticky; top: 0; bottom: auto; order: -1; border-top: 0; border-bottom: 1px solid var(--line); padding: 12px 18px; }
  input, select { font-size: 14px; min-height: 38px; padding: 7px 9px; }
  button, .btn { min-height: 38px; padding: 7px 12px; }
  .dock button { min-height: 40px; font-size: 14px; }
}

/* ---- pvp.mn look (2026-12-04): AMOLED black, Golos Text / Unbounded, red accent. Only the page UI;
   the generated image keeps its own themes and fonts (Rajdhani, Exo 2 ...). ---- */
:root { --bg:#000; --panel:#000; --panel2:#0b0b0b; --line:#1f1f1f; --text:#f2f2f2; --muted:#7a7a7a; --accent:#ff3b30; --accent2:#ff3b30; --radius:0px; }
body { font-family:"Golos Text", system-ui, sans-serif; }
h1 { font:800 20px/1.1 Unbounded, sans-serif; letter-spacing:0; }
.logo { background:none; border:1px solid var(--line); color:var(--text); font:800 13px/1 Unbounded, sans-serif; border-radius:0; }
.brand a.home { color:var(--muted); }
.lang { background:#000; border-radius:0; }
summary, .adv-h { font-family:"JetBrains Mono", monospace; font-size:12px; text-transform:uppercase; letter-spacing:.06em; }

/* sell / estimate card */
.sell h2 { font:500 12px/1 "JetBrains Mono", monospace; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; margin:0 0 12px; }
.sell .grid2b { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.sell label.f { display:block; margin-bottom:8px; }
.sell label.f > span { display:block; font:500 11px/1 "JetBrains Mono", monospace; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:6px; }
.sell input, .sell textarea { width:100%; min-height:44px; padding:10px 12px; background:#0b0b0b; border:1px solid var(--line); border-radius:0; outline:none; color:var(--text); font:inherit; }
.sell input:focus, .sell textarea:focus { border-color:#555; }
.sell textarea { min-height:70px; resize:vertical; }
.est-box { border:1px solid var(--line); padding:12px; margin:4px 0 14px; }
.est-mid { font:500 24px/1.1 Unbounded, sans-serif; }
.est-range { font:500 12px/1.4 "JetBrains Mono", monospace; color:var(--muted); margin-top:6px; }
.est-hint { font-size:13px; color:var(--muted); }
.sell-step { border-top:1px solid var(--line); padding-top:14px; margin-top:6px; }
.sell .go { width:100%; min-height:46px; background:var(--accent); color:#000; border:0; font-weight:500; cursor:pointer; margin-top:4px; }
.sell .go:disabled { opacity:.45; cursor:default; }
.sell .msg { font-size:14px; margin-top:8px; }
.sell .msg.err { color:var(--accent); }
.sell .msg a { color:var(--text); }
.sell small.muted { display:block; color:var(--muted); font-size:12px; margin-top:6px; }
/* sign-in box (same as /shared/pvp.css) */
.auth-form { display:grid; gap:8px; }
.auth-form input { width:100%; min-height:44px; padding:10px 12px; background:#0b0b0b; border:1px solid var(--line); border-radius:0; color:var(--text); }
.auth-tabs { display:flex; gap:16px; }
.auth-tabs button { background:none; border:0; padding:4px 0; color:var(--muted); cursor:pointer; font:500 12px/1 "JetBrains Mono", monospace; text-transform:uppercase; border-bottom:1px solid transparent; min-height:0; }
.auth-tabs button.on { color:var(--text); border-color:var(--accent); }
.auth-go { min-height:44px; background:var(--text); color:#000; border:0; cursor:pointer; border-radius:0; }
.auth-err { color:var(--accent); font-size:14px; margin:0; } .auth-err:empty { display:none; }
.auth-hint { color:var(--muted); font-size:12px; margin:0; }
.auth-in { display:flex; align-items:center; gap:12px; font-size:14px; margin-bottom:10px; }
.auth-link { background:none; border:0; color:var(--muted); cursor:pointer; text-decoration:underline; padding:0; min-height:0; }
.pick, button.primary { background:var(--accent); color:#000; border-radius:0; }
.pick-icon { background:rgba(0,0,0,.15); }
button, .btn, input, select, .theme, .theme i, .tips li, .shot, .shot img, .pthumb, .thumb, .page img, .card { border-radius:0; }
.page img { box-shadow:none; border:1px solid var(--line); }
.pick b, button.primary { font-weight:500; }

/* loading symbol over the image area (2026-12-04) */
.main { position:relative; }
.busy { position:sticky; top:0; z-index:4; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px;
  min-height:240px; margin:0 14px; background:rgba(0,0,0,.82); border:1px solid var(--line); }
.big-spin { width:44px; height:44px; border:3px solid #333; border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; }
.busy p { margin:0; font:500 13px/1.4 "JetBrains Mono", monospace; color:var(--text); text-align:center; padding:0 16px; }
@media (prefers-reduced-motion:reduce) { .big-spin { animation-duration:2.4s; } }

/* estimate + sell + sign-in under the finished images */
.sell-main { width:100%; max-width:1100px; margin:8px auto 24px; padding:0 14px; display:grid; grid-template-columns:1fr; gap:24px; }
.sell-main .sell-col { border:1px solid var(--line); padding:16px; }
.sell-main .sell-step { border-top:1px solid var(--line); margin-top:0; padding-top:16px; }
@media (min-width:900px) {
  .busy { margin:18px 18px 0; min-height:320px; }
  .sell-main { grid-template-columns:1fr 1fr; padding:0 18px; align-items:start; }
}
/* automatic role / tier tags (2026-12-04) */
.tags { display:grid; gap:8px; margin:2px 0 12px; }
.tag-row { display:flex; flex-wrap:wrap; gap:6px; }
.tag-row:empty { display:none; }
.tag { font:500 11px/1 "JetBrains Mono", monospace; border:1px solid var(--line); padding:6px 8px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.tag b { color:var(--text); font-weight:500; }
.tag-note { font-size:12px; color:var(--muted); }
.trade { border:0; padding:0; margin:0 0 10px; }
.trade legend { font:500 11px/1 "JetBrains Mono", monospace; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:8px; padding:0; }
.trade label { display:inline-flex; align-items:center; gap:6px; margin-right:14px; min-height:36px; font-size:14px; cursor:pointer; }
.trade input { width:18px; height:18px; min-height:0; accent-color:var(--accent); }

/* screenshot guide (2026-12-04, phone layout redone the same day): the owner's own screenshots, cropped
   to the part that matters. Phone: one swipeable row of cards. Laptop: four columns. */
.empty { text-align:left; padding:0; max-width:none; margin:8px 0 24px; align-self:stretch; width:100%; min-width:0; }
.guide, .guide ol { min-width:0; max-width:100%; }
.guide { max-width:980px; margin:0 auto; padding:4px 0 20px; }
.guide h2 { font:800 18px/1.2 Unbounded, sans-serif; margin:0 0 6px; }
.guide > p { margin:0; }
.guide ol { list-style:none; padding:0 0 6px; margin:14px 0 8px; display:grid; grid-auto-flow:column; grid-auto-columns:72%; gap:10px;
  overflow-x:auto; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
.guide ol::-webkit-scrollbar { display:none; }
.guide li { scroll-snap-align:start; display:flex; flex-direction:column; border:1px solid var(--line); background:#050505; }
.guide img { width:100%; height:200px; object-fit:cover; object-position:top; display:block; border-bottom:1px solid var(--line); }
.guide li > div { padding:10px 12px 12px; }
.guide b { display:block; font:500 14px/1.2 Unbounded, sans-serif; margin-bottom:4px; }
.guide span { color:var(--muted); font-size:13px; line-height:1.45; }
.guide-foot { margin-top:4px !important; }
@media (min-width:900px) {
  .guide { padding:8px 0 24px; }
  .guide h2 { font-size:22px; }
  .guide ol { grid-auto-flow:row; grid-template-columns:repeat(4, minmax(0, 1fr)); grid-auto-columns:auto; overflow:visible; gap:14px; }
  .guide img { height:260px; }
}
.guide-btn { background:none; border:0; color:var(--text); text-decoration:underline; text-underline-offset:3px; padding:0; min-height:32px; margin:2px 0 10px; cursor:pointer; font-size:14px; }
.guide-dlg { border:1px solid var(--line); background:#000; color:var(--text); padding:20px; width:min(820px, 94vw); max-height:92vh; overflow:auto; }
.guide-dlg::backdrop { background:rgba(0,0,0,.85); }
.guide-x { position:sticky; float:right; top:0; width:40px; height:40px; min-height:0; padding:0; background:#000; z-index:2; }
.save-note { grid-column:1 / -1; margin:0; color:var(--muted); font-size:12px; }
