/* PhotoGuru app (app.photoguru.ai). Same tokens and feel as the front page: design/DESIGN.md.
   Mobile first: bottom tab bar on phones, top navigation from 900px. */
:root {
  --bg: #0c0b0a;
  --bg-2: #13110f;
  --surface: #1b1815;
  --surface-2: #24201c;
  --line: #2f2a25;
  --line-2: #3d362f;
  --text: #f3eee6;
  --muted: #b9b0a4;
  --accent: #f2b544;
  --accent-hover: #ffc75e;
  --accent-ink: #1a1206;
  --accent-soft: rgba(242,181,68,.12);
  --ok: #7fcf8f;
  --err: #ff8a7a;
  --radius: 16px;
  --radius-sm: 10px;
  --wide: 1240px;
  --col: 760px;
  --top: 60px;
  --tab: 66px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 12px); }
body {
  background: var(--bg); color: var(--text);
  font: 400 18px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom));
}
body.bare, body.has-back { padding-bottom: 0; }
body.prompt-page { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
ul, ol { padding-left: 1.3em; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 6vw, 44px); }
h2 { font-size: 24px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.center { text-align: center; }
.ic { flex: none; }
code { font: 14px/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
.col { max-width: var(--col); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap, .col { padding: 0 28px; } }
main { min-height: calc(100vh - var(--top) - 120px); }
.page { padding-top: 26px; padding-bottom: 48px; }
.page > h1 { margin-bottom: 8px; }
.page-sub { margin-bottom: 22px; }
.sub-h { display: flex; align-items: center; gap: 10px; margin: 40px 0 16px; font-size: 26px; }
.sub-h .ic { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 0 28px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font: 700 19px/1.1 var(--sans); text-decoration: none; text-align: center;
  box-shadow: 0 10px 34px -12px rgba(242,181,68,.6);
  transition: background .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.done { background: var(--ok); box-shadow: 0 10px 34px -12px rgba(127,207,143,.6); }
.btn2 {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font: 600 17px/1.1 var(--sans); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn2:hover { border-color: var(--accent); }
.linkbtn { background: none; border: 0; cursor: pointer; color: var(--accent); font-size: 16px; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
.danger-txt { color: var(--err); }
.row-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.row-btns form { display: contents; }

/* ---------- top bar + tab bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top);
  background: rgba(12,11,10,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; height: 100%; gap: 12px; }
.logo { font: 700 22px/1 var(--serif); color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo i { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffd98a, var(--accent) 45%, #a8741c); box-shadow: 0 0 16px rgba(242,181,68,.55); }
.has-back .logo { margin-left: auto; margin-right: auto; transform: translateX(-28px); }
.backlink { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding-right: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 17px; margin-left: -6px; }
.topnav { display: none; margin-left: auto; gap: 4px; }
.topnav a { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 16px; }
.topnav a:hover { color: var(--text); }
.topnav a.on { color: var(--text); background: var(--surface-2); }
.topnav a.on .ic { color: var(--accent); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tab) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(19,17,15,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
.tabbar a.on { color: var(--accent); }
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  body.prompt-page { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .has-back .logo { margin: 0 0 0 8px; transform: none; }
  .has-back .topnav { margin-left: auto; }
}

.foot { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; padding: 28px 16px 30px; border-top: 1px solid var(--line); color: #8d8478; font-size: 13px; }
.foot a { color: var(--muted); }

/* ---------- messages ---------- */
.flash { margin: 14px auto; max-width: var(--col); padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid; font-size: 17px; }
main > .flash { margin: 14px 16px; }
@media (min-width: 792px) { main > .flash { margin: 14px auto; } }
.flash.ok { border-color: rgba(127,207,143,.45); background: rgba(127,207,143,.1); }
.flash.err { border-color: rgba(255,138,122,.5); background: rgba(255,138,122,.1); }
.flash.warn { border-color: rgba(242,181,68,.5); background: var(--accent-soft); }
.flash a { color: var(--accent); }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab) + 18px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100vw - 32px); padding: 14px 20px; border-radius: 14px;
  background: var(--text); color: #15120f; font-weight: 600; font-size: 17px; box-shadow: 0 14px 40px rgba(0,0,0,.5);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.prompt-page .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .toast, .prompt-page .toast { bottom: 28px; } }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 7px; font-weight: 600; font-size: 16px; }
.form label small { font-weight: 400; color: var(--muted); font-size: 14px; }
.form label.inline, label.inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input:not([type]), select, textarea {
  width: 100%; min-height: 54px; padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font: 400 18px/1.4 var(--sans);
}
textarea { min-height: 0; resize: vertical; }
textarea.mono { font: 15px/1.5 ui-monospace, Menlo, Consolas, monospace; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input:disabled { color: var(--muted); }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }
input[type=file] { font-size: 16px; color: var(--muted); }
.pass { position: relative; display: block; }
.pass input { padding-right: 56px; }
.showpass { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; }
.showpass.on { color: var(--accent); }

/* ---------- login ---------- */
.auth main { display: grid; place-items: start center; padding: 6vh 16px 40px; }
.auth-box { width: 100%; max-width: 440px; padding: 30px 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.auth-box h1 { font-size: 32px; margin-bottom: 8px; }
.auth-box > p { margin-bottom: 18px; }
.auth-box .form { margin-top: 22px; }
.auth-box .flash { margin: 18px 0 0; }
.auth-links { margin-top: 18px; text-align: center; font-size: 17px; }
.auth-note { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 16px; }
@media (min-width: 500px) { .auth-box { padding: 38px 36px; } }

/* ---------- library ---------- */
.lib { padding-top: 22px; padding-bottom: 40px; }
.lib-top h1 { font-size: clamp(27px, 5vw, 40px); margin-bottom: 18px; }
.search { position: relative; display: block; margin-bottom: 14px; }
.search > .ic { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { min-height: 58px; padding-left: 54px; padding-right: 52px; border-radius: 999px; background: var(--surface); font-size: 18px; }
.search input::-webkit-search-cancel-button { display: none; }
.search-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }

.chips { display: flex; gap: 8px; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; scroll-padding: 0 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.multi { flex-wrap: wrap; }
@media (min-width: 900px) { .chips.scroll { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; } }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  min-height: 46px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font: 600 16px/1.1 var(--sans); white-space: nowrap;
  -webkit-tap-highlight-color: transparent; transition: background .12s, border-color .12s;
}
.chip small { font-weight: 500; font-size: 13px; color: var(--muted); }
.chip:hover { border-color: #5a5045; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.on small { color: rgba(26,18,6,.7); }
.chip.sm { min-height: 40px; padding: 0 15px; font-size: 15px; }
.uses-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.uses-row .chips { flex: 1; min-width: 0; margin-left: 0; margin-right: -16px; padding-left: 0; scroll-padding-left: 0; }
.uses-label { flex: none; color: var(--muted); font-size: 15px; font-weight: 600; }
@media (min-width: 900px) { .uses-row .chips { margin-right: 0; } }

.welcome { position: relative; margin-top: 20px; padding: 18px 50px 18px 20px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid rgba(242,181,68,.35); font-size: 17px; }
.welcome ol { margin: 8px 0; }
.welcome li { margin: 2px 0; }
.welcome a { font-weight: 600; }
.welcome-x { position: absolute; top: 8px; right: 8px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }

.count { min-height: 1px; margin: 18px 0 0; color: var(--muted); font-size: 16px; }
.group { margin-top: 34px; }
.group-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.group-h h2 { font-size: 25px; }
.group-h p { font-size: 15px; margin-top: 3px; }
.see-all { flex: none; display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 4px 0 12px; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 16px; cursor: pointer; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sec { grid-column: 1 / -1; margin: 18px 0 -2px; font: 600 14px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.sec:first-child { margin-top: 0; }

/* browse mode: one swipe row per category, section titles hidden */
.mode-browse .grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px; gap: 12px; }
.mode-browse .grid::-webkit-scrollbar { display: none; }
.mode-browse .grid .card { flex: none; width: 44vw; max-width: 230px; scroll-snap-align: start; }
.mode-browse .sec { display: none; }
@media (min-width: 700px) { .mode-browse .grid { margin: 0 -28px; padding: 0 28px 6px; scroll-padding: 0 28px; gap: 16px; } .mode-browse .grid .card { width: 210px; } }
@media (min-width: 900px) { .mode-browse .grid { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; padding-bottom: 12px; } }
.mode-filter .see-all, .mode-filter.one-cat .group-h p { display: none; }
.mode-filter:not(.one-cat) .sec { display: none; }
.mode-filter .group-h { margin-bottom: 12px; }

/* cards */
.card { position: relative; min-width: 0; }
.card-a { display: block; color: var(--text); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.thumb { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.thumb.wide img { position: relative; object-fit: contain; }
.thumb.wide img.bg { position: absolute; inset: 0; object-fit: cover; filter: blur(18px) brightness(.55); transform: scale(1.2); }
.card-a:hover .thumb img:not(.bg) { transform: scale(1.03); }
.thumb .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line-2); }
.ratio { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(12,11,10,.78); font-size: 12px; font-weight: 600; color: var(--text); }
.card-b { padding: 9px 2px 0; }
.card-b b { display: block; font: 600 17px/1.25 var(--sans); }
.uses { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.3; }
.uses .ic { color: var(--accent); }
.fav {
  position: absolute; top: 7px; right: 7px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: rgba(12,11,10,.62); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: transparent;
}
.fav.on { color: #ff6b6b; }
.fav.on .ic, .favbtn.on .ic { fill: currentColor; }
.empty { padding: 50px 0; text-align: center; font-size: 18px; }
.empty p { margin-bottom: 18px; }

/* ---------- prompt page ---------- */
.pp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 18px; padding-bottom: 20px; }
.pp > * { min-width: 0; }
.pp > .flash { margin: 0; max-width: none; }
.crumb { color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none; }
.crumb-sep { margin: 0 7px; color: var(--muted); }
.crumb-sec { color: var(--muted); font-size: 15px; }
.pp-head h1 { margin: 6px 0 8px; font-size: clamp(30px, 6vw, 42px); }
.pp-sum { font-size: 19px; color: #ddd5ca; }
.pp-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; text-decoration: none; }
.pill .ic { color: var(--accent); }
button.pill { cursor: pointer; }
.favbtn.on { border-color: rgba(255,107,107,.5); }
.favbtn.on .ic { color: #ff6b6b; }

.gal { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; align-items: center; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-track figure { flex: none; width: 100%; scroll-snap-align: center; max-height: 78vh; display: flex; justify-content: center; background: #0f0e0c; }
.gal-track .zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gal-track img { width: 100%; height: 100%; object-fit: contain; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; display: none; place-items: center; background: rgba(12,11,10,.72); color: #fff; cursor: pointer; }
.gal-nav.prev { left: 10px; } .gal-nav.next { right: 10px; }
@media (hover: hover) { .gal-nav { display: grid; } }
.gal-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.gal-thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--surface); cursor: pointer; opacity: .7; }
.gal-thumbs button.on { border-color: var(--accent); opacity: 1; }
.gal-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gal-note { margin-top: 10px; font-size: 15px; color: var(--muted); }
.empty-gal { aspect-ratio: 4 / 5; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); }

.pp-steps { display: grid; gap: 16px; min-width: 0; }
.step { padding: 22px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 23px; }
.step h2 .ic { color: var(--accent); }
.num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 700 18px/1 var(--sans); }
.step-sub { margin: -6px 0 16px; font-size: 16px; }
.inputs { display: grid; gap: 10px; }
.input { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.input-ic { flex: none; width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.input-n { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.input b { display: block; font-size: 18px; }
.input p { font-size: 15px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.note { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 15px; color: var(--muted); }
.note .ic { color: var(--accent); margin-top: 2px; }

.field { margin-top: 16px; }
.field:first-of-type { margin-top: 0; }
.field-l { display: block; margin-bottom: 8px; font-weight: 600; font-size: 16px; }
.field .chip { min-height: 44px; font-size: 15.5px; white-space: normal; text-align: left; line-height: 1.2; padding: 8px 16px; }
.field .own-btn { color: var(--muted); }
.field .own-btn.on { color: var(--accent-ink); }
.field textarea.own { margin-top: 10px; min-height: 52px; font-size: 17px; overflow: hidden; }
.field textarea.own.one { margin-top: 0; }

.promptbox {
  padding: 18px; border-radius: 12px; background: var(--bg-2); border: 1px solid rgba(242,181,68,.35);
  font: 400 16.5px/1.6 var(--sans); color: #e9e2d7; white-space: normal; overflow-wrap: anywhere;
  max-height: 420px; overflow-y: auto;
}
.promptbox mark { background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; cursor: pointer; font-weight: 600; }
.promptbox mark.flash-on { background: rgba(242,181,68,.35); }
.actions { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 520px) { .actions { grid-template-columns: 1.4fr 1fr; } }
.how { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.how summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-weight: 600; color: var(--accent); font-size: 17px; }
.how ol { margin-top: 8px; font-size: 16.5px; }
.how li { margin: 6px 0; }

.nexts { list-style: none; padding: 0; display: grid; gap: 10px; }
.nexts li { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.nexts li > div { flex: 1; min-width: 0; }
.nexts b { display: block; font-size: 16.5px; }
.nexts p { font-size: 14.5px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.copy-sm { flex: none; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; width: 64px; min-height: 58px; justify-content: center; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; }
.copy-sm .ic { color: var(--accent); }
.copy-sm.done { border-color: var(--ok); }
.copy-sm.done .ic { color: var(--ok); }
.tips ul { display: grid; gap: 8px; font-size: 16.5px; }
.tips li::marker { color: var(--accent); }

.actbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(19,17,15,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transition: transform .25s;
}
.actbar .btn { min-height: 56px; padding: 0 20px; white-space: nowrap; }
@media (max-width: 419px) { .actbar .btn2 span { display: none; } .actbar .btn2 { width: 56px; padding: 0; } }
.actbar .btn2 { min-height: 56px; padding: 0 18px; }
.actbar.away { transform: translateY(110%); }
@media (min-width: 900px) { .actbar { display: none; } }

.more { padding-top: 26px; padding-bottom: 40px; }
.more h2 { font-size: 28px; margin-bottom: 16px; }

@media (min-width: 900px) {
  .pp { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "media head" "media steps"; grid-template-rows: auto 1fr; gap: 22px 40px; padding-top: 30px; align-items: start; }
  .pp > .flash { grid-column: 1 / -1; }
  .pp-head { grid-area: head; }
  .pp-media { grid-area: media; position: sticky; top: calc(var(--top) + 20px); }
  .pp-steps { grid-area: steps; }
  .step { padding: 26px 26px; }
  .gal-track figure { max-height: calc(100vh - var(--top) - 150px); }
}

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0,0,0,.94); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0,0,0,.9); }
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lb-x { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }

/* ---------- saved / help / account ---------- */
.empty-box { text-align: center; padding: 40px 20px; border-radius: var(--radius); border: 1px dashed var(--line-2); margin-top: 18px; }
.empty-box p { margin: 12px 0 20px; font-size: 18px; }
.empty-ic { display: inline-grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.lead { font-size: 20px; line-height: 1.5; margin: 6px 0 26px; }
.card-box { padding: 22px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; }
.card-box h2 { margin-bottom: 12px; }
.card-box ol { display: grid; gap: 8px; font-size: 17px; }
.help-steps { display: grid; gap: 12px; margin-bottom: 26px; }
.hstep { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.hstep .num { margin-top: 2px; }
.hstep b { font-size: 19px; }
.hstep p { color: #ddd5ca; font-size: 17px; margin-top: 3px; }
.two { display: grid; gap: 0 16px; }
@media (min-width: 700px) { .two { grid-template-columns: 1fr 1fr; } }
.faq { display: grid; gap: 10px; margin-bottom: 26px; }
.faq details { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 18px 18px; color: #ddd5ca; font-size: 17px; }
.account .form { gap: 16px; }
.account .form h2 { margin-bottom: 0; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.plan p { font-size: 16px; }
.empty-page { padding: 60px 16px; text-align: center; }
.empty-page p { margin: 12px 0 24px; }

/* ---------- admin ---------- */
.admin-nav { display: flex; gap: 6px; margin: 14px 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.admin-nav a { padding: 12px 14px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.admin-nav a.on { color: var(--text); border-color: var(--accent); }
.admin-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.admin-bar input[type=search] { flex: 1; min-width: 200px; }
.admin-bar select { width: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font: 700 32px/1.1 var(--serif); color: var(--accent); }
.stat span { color: var(--muted); font-size: 15px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 16px; }
.tbl th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr.off td { opacity: .55; }
.tbl a { color: var(--text); }
.num-c { text-align: right; }
.tbl-img { width: 56px; }
.tbl-img img { width: 48px; height: 60px; object-fit: cover; border-radius: 6px; }
.tbl-actions { white-space: nowrap; }
.tbl-actions form { display: inline; margin-left: 8px; }
.tbl-actions .linkbtn { font-size: 14px; }
@media (max-width: 700px) { .tbl { font-size: 15px; } .prompts-tbl th:nth-child(3), .prompts-tbl td:nth-child(3), .prompts-tbl th:nth-child(4), .prompts-tbl td:nth-child(4) { display: none; } }
.status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.status.published { background: rgba(127,207,143,.15); color: var(--ok); }
.status.draft, .status.blocked { background: var(--accent-soft); color: var(--accent); }
.grid2 { display: grid; gap: 16px; }
@media (min-width: 700px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.admin-form { max-width: 980px; }
.img-admin { display: flex; flex-wrap: wrap; gap: 14px; }
.img-item { display: grid; gap: 6px; width: 150px; font-size: 14px; }
.img-item img { width: 150px; height: 188px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.img-item input[type=number] { width: 80px; min-height: 40px; padding: 6px 10px; font-size: 15px; }
.sticky-save { position: sticky; bottom: calc(var(--tab) + env(safe-area-inset-bottom)); padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .sticky-save { bottom: 0; } }
.danger { margin-top: 30px; }
.add-member { margin-bottom: 18px; }
.add-member summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); }
.add-member .form { margin-top: 16px; }

/* admin: front page visitors (pages/admin/visitors.php) */
.tbl-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
.tbl-wrap .tbl td, .tbl-wrap .tbl th { white-space: nowrap; }
.tbl small { font-size: 13px; }
.vbar { display: inline-block; height: 10px; min-width: 2px; max-width: 70%; border-radius: 5px; background: var(--accent); vertical-align: middle; margin-right: 6px; }
.v-days td:last-child { width: 60%; }
.v-time { color: var(--muted); }
.v-time a { color: var(--text); }
.v-visit td { background: var(--surface); color: var(--accent); font-weight: 600; }
.v-hot td { background: var(--accent-soft); }
.v-info th { width: 170px; text-transform: none; letter-spacing: 0; font-size: 15px; }
.v-info td { word-break: break-word; }
.v-filter { margin-bottom: 14px; }
.v-filter .chip { min-height: 38px; padding: 0 14px; font-size: 15px; text-decoration: none; }
.v-grid { margin-top: 0; }
