@font-face { font-family: 'Patrick Hand'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/patrick-hand-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nothing You Could Do'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/nothing-you-could-do-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cherry Bomb One'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/cherry-bomb-one-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/fraunces-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/nunito-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/nunito-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/nunito-sans-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/nunito-sans-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Pinyon Script'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/pinyon-script-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Syncopate'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/syncopate-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'UnifrakturCook'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/unifrakturcook-latin-700-normal.woff2) format('woff2'); }

/* Layout: one phone-width column, like the app it stands in for. Five places in a floating menu; a post opens as four steps with the picture always on top. */
:root {
  --bg: #ffffff; --surface: #ffffff; --soft: #fedfe2; --soft-l: #feeff0; --stage: #f7f1f3;
  --primary: #4a1230; --on-primary: #ffffff; --accent: #b01e57; --on-accent: #ffffff; --cream: #fff7e6;
  --hero: #4a1230; --on-hero: #ffffff; --hero-ring: #fff7e6;
  --ink: #2e0b19; --ink-2: #75606a; --line: rgba(46, 11, 25, 0.12);
  --ring: 0 0 0 1px rgba(46, 11, 25, 0.08), 0 2px 8px rgba(46, 11, 25, 0.06);
  --float: 0 2px 6px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.14);
  --display: 'Fraunces', Georgia, serif;
  --ui: 'Nunito Sans', system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a0a11; --surface: #2c0d1b; --soft: #3a1f2c; --soft-l: #40182c; --stage: #24101a;
    --primary: #fcefd3; --on-primary: #1a0a11; --accent: #f28db0; --on-accent: #1a0a11; --cream: #6a3d4d;
    --hero: #4a1230; --on-hero: #ffffff; --hero-ring: #fcefd3;
    --ink: #ffedf2; --ink-2: #bfa9b2; --line: rgba(255, 237, 242, 0.14);
    --ring: 0 0 0 1px rgba(255, 237, 242, 0.08), 0 2px 10px rgba(0, 0, 0, 0.3);
    --float: 0 0 0 1px rgba(255, 237, 242, 0.08), 0 12px 32px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1a0a11; --surface: #2c0d1b; --soft: #3a1f2c; --soft-l: #40182c; --stage: #24101a;
  --primary: #fcefd3; --on-primary: #1a0a11; --accent: #f28db0; --on-accent: #1a0a11; --cream: #6a3d4d;
  --hero: #4a1230; --on-hero: #ffffff; --hero-ring: #fcefd3;
  --ink: #ffedf2; --ink-2: #bfa9b2; --line: rgba(255, 237, 242, 0.14);
  --ring: 0 0 0 1px rgba(255, 237, 242, 0.08), 0 2px 10px rgba(0, 0, 0, 0.3);
  --float: 0 0 0 1px rgba(255, 237, 242, 0.08), 0 12px 32px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--ui); font-size: 14px; line-height: 1.35; padding-inline: 16px; padding-block: 20px 120px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app { max-width: 480px; margin: 0 auto; }
.view { display: flex; flex-direction: column; gap: 14px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: -0.3px; line-height: 1.15; text-wrap: balance; }
h2 { margin: 0; font-size: 17px; font-weight: 800; }
p { margin: 0; }
.hint { font-size: 12.5px; color: var(--ink-2); }
.sub { font-size: 13.5px; color: var(--ink-2); }
.av { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #ae94a2; color: #2e0b19; font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.btn { min-height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: var(--soft); color: var(--ink); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.btn.main { background: var(--primary); color: var(--on-primary); }
.btn.quiet { background: var(--surface); box-shadow: var(--ring); }
.btn.text { background: transparent; color: var(--ink-2); padding: 0 10px; }
.btn.small { min-height: 36px; padding: 0 12px; border-radius: 18px; font-size: 12.5px; }
.btn.big { min-height: 48px; border-radius: 24px; font-size: 15px; }
.btn.grow { flex: 1; }
.btn:disabled { opacity: 0.45; cursor: default; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row.center { justify-content: center; }
.row.between { justify-content: space-between; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: var(--ring); color: var(--ink); font-weight: 700; font-size: 13px; }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.tag { padding: 2px 9px; border-radius: 999px; background: var(--soft); font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag.warn { background: var(--cream); color: var(--accent); }
.card { background: var(--surface); box-shadow: var(--ring); border-radius: 22px; overflow: hidden; }
.pad { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.hero { padding: 16px 18px; border-radius: 24px; background: var(--hero); color: var(--on-hero); display: flex; align-items: center; gap: 16px; }
.hero .lab { font-size: 12px; font-weight: 700; color: var(--hero-ring); }
.hero .big { font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: -0.3px; line-height: 1.15; }
.ringbox { position: relative; width: 76px; height: 76px; flex-shrink: 0; }
.ringbox span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; }
.cover { position: relative; line-height: 0; }
.cover canvas { width: 100%; aspect-ratio: 4 / 5; height: auto; display: block; background: var(--soft); }
.cover.crop canvas { aspect-ratio: auto; height: 330px; object-fit: cover; object-position: top; }
.cover .over { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; line-height: 1.35; }
.cover .over .tag { background: #ffffff; color: #2e0b19; padding: 3px 10px; }
.cover .over .tag.dark { background: #4a1230; color: #ffffff; }
.item { display: flex; align-items: center; gap: 12px; padding: 9px 12px 9px 9px; border: 0; border-radius: 20px; background: var(--surface); box-shadow: var(--ring); text-align: left; width: 100%; color: var(--ink); }
.item canvas, .item img, .item .sw { width: 40px; height: 50px; border-radius: 10px; flex-shrink: 0; background: var(--soft); object-fit: cover; display: block; }
.item .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .txt b { font-size: 14px; font-weight: 800; }
.item .txt span { font-size: 12px; color: var(--ink-2); }
.list { display: flex; flex-direction: column; gap: 8px; }
.drop { border: 2px dashed #ae94a2; border-radius: 22px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--soft); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.tile b { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.1; }
.tile span { font-size: 12px; line-height: 1.3; }
.tile.dark { background: var(--hero); color: var(--on-hero); }
.tile.dark span { color: var(--hero-ring); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ph { padding: 0; border: 0; border-radius: 10px; background: var(--soft); position: relative; line-height: 0; aspect-ratio: 3 / 4; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .n { position: absolute; left: 5px; top: 5px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 800; line-height: 22px; text-align: center; }
.ph.used { box-shadow: 0 0 0 3px var(--primary); }
.ph .t { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 11.5px; font-weight: 700; line-height: 1.2; color: #ffffff; text-align: left; background: linear-gradient(rgba(30, 8, 18, 0), rgba(30, 8, 18, 0.72)); }
.bubble { align-self: flex-start; max-width: 92%; background: var(--soft); border-radius: 20px 20px 20px 6px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; line-height: 1.4; }
.feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; border-radius: 22px; overflow: hidden; }
.cell { padding: 0; border: 0; position: relative; line-height: 0; background: var(--soft); }
.cell canvas { width: 100%; aspect-ratio: 3 / 4; height: auto; display: block; object-fit: cover; }
.cell .tag { position: absolute; left: 6px; top: 6px; line-height: 1.35; background: var(--primary); color: var(--on-primary); }
.cell .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 6px 5px; font-size: 11.5px; font-weight: 700; line-height: 1.2; color: #ffffff; text-align: left; background: linear-gradient(rgba(30, 8, 18, 0), rgba(30, 8, 18, 0.72)); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.steps button { width: 100%; padding: 0 0 6px; border: 0; background: transparent; display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: left; min-height: 40px; }
.steps button i { height: 5px; border-radius: 3px; background: var(--soft); display: block; }
.steps button.done i, .steps button[aria-current="step"] i { background: var(--primary); }
.steps button[aria-current="step"] { color: var(--ink); font-weight: 800; }
.stagewrap { background: var(--stage); border-radius: 22px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
#stage { width: 100%; max-width: 360px; aspect-ratio: 4 / 5; height: auto; border-radius: 6px; touch-action: none; cursor: grab; background: var(--soft); box-shadow: 0 0 0 1px var(--line), 0 10px 28px rgba(46, 11, 25, 0.16); }
.strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mini { padding: 0; border: 0; border-radius: 8px; background: var(--soft); line-height: 0; }
.mini canvas { width: 50px; height: 62px; border-radius: 8px; display: block; }
.mini[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--primary); }
.mini.add { width: 50px; height: 62px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 600; color: var(--primary); line-height: 1; }
.tplrow { display: flex; gap: 10px; overflow-x: auto; padding: 4px; margin: -4px; scroll-snap-type: x proximity; }
.tpl { flex: 0 0 104px; padding: 0; border: 0; background: transparent; display: flex; flex-direction: column; gap: 5px; text-align: left; font-weight: 700; font-size: 12px; color: var(--ink); scroll-snap-align: start; }
.tpl canvas { width: 104px; height: 130px; border-radius: 12px; background: var(--soft); display: block; object-fit: cover; }
.tpl[aria-pressed="true"] canvas { box-shadow: 0 0 0 3px var(--primary); }
.tplgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tplgrid .tpl { flex: none; cursor: default; }
.tplgrid .tpl canvas { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .lab { font-size: 12.5px; font-weight: 700; }
.fieldhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fieldhead output { font-weight: 800; font-variant-numeric: tabular-nums; }
textarea, select, input[type="text"] { width: 100%; border: 0; border-radius: 14px; background: var(--soft-l); padding: 10px 12px; font-size: 15px; font-weight: 600; min-height: 44px; }
textarea { min-height: 72px; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--primary); margin: 0; min-height: 28px; }
.swc { width: 36px; height: 36px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px var(--line); padding: 0; }
.swc[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--primary); }
.check { display: flex; align-items: center; gap: 8px; min-height: 36px; font-weight: 700; font-size: 13px; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }
.why { background: var(--soft); border-radius: 22px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.why ul { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.note { background: var(--cream); border-radius: 20px; padding: 12px 16px; font-size: 12.5px; line-height: 1.45; }
.sortphoto { height: min(54vh, 460px); background: var(--stage); border-radius: 22px; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: pan-y; }
.sortphoto img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; -webkit-user-drag: none; user-select: none; }
.sortcats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sortcats .btn { min-height: 48px; }
.sortcats .btn.sug { box-shadow: inset 0 0 0 2px var(--primary); }
.sortcats .btn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.navx { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); width: min(448px, calc(100% - 32px)); height: 70px; border-radius: 35px; background: var(--surface); box-shadow: var(--float); display: flex; align-items: center; justify-content: space-around; padding: 0 6px; z-index: 5; }
.navx button { width: 62px; padding: 6px 0; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.navx button[aria-current="page"] { color: var(--primary); font-weight: 800; }
.navx button.plus { width: 52px; height: 52px; padding: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); justify-content: center; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 94px); max-width: min(420px, calc(100% - 32px)); background: var(--ink); color: var(--bg); border-radius: 18px; padding: 10px 16px; font-size: 13px; font-weight: 700; z-index: 30; text-align: center; }
.savebox { position: fixed; inset: 0; z-index: 40; background: rgba(30, 8, 18, 0.6); display: flex; align-items: center; justify-content: center; padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px); }
.savecard { background: var(--surface); color: var(--ink); border-radius: 22px; padding: 16px; max-width: 420px; width: 100%; max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.savecard img { width: 100%; border-radius: 10px; display: block; }
#file, .filehide { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .btn, .chip { transition: background-color 0.15s; } }

/* ---------- standalone app: page shell, sign-in, account ---------- */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; padding-top: calc(env(safe-area-inset-top, 0px) + 20px); overscroll-behavior-y: none; }
[hidden] { display: none !important; }
.auth { max-width: 400px; margin: 9vh auto 0; display: flex; flex-direction: column; gap: 14px; }
.auth .word { margin: 0 0 6px; line-height: 0; }
.auth .mark { width: 190px; height: auto; display: block; }
.auth h1 { font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: -0.3px; line-height: 1.15; margin: 6px 0 0; }
.auth form { display: flex; flex-direction: column; gap: 12px; }
.auth input { width: 100%; border: 0; border-radius: 14px; background: var(--soft-l); padding: 10px 12px; font-size: 16px; font-weight: 600; min-height: 48px; }
.auth .msg { min-height: 20px; color: var(--accent); font-weight: 600; margin: 0; }
.acct { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pend { border-radius: 18px; background: var(--soft-l); padding: 14px 16px; }
.pend b { display: block; margin-bottom: 4px; }

/* ---------- Idag: every picture of a post in a row, and the box for moving one ---------- */
.minis { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 2px; scroll-snap-type: x proximity; scrollbar-width: none; }
.minis::-webkit-scrollbar { display: none; }
.mini { position: relative; flex: 0 0 56px; padding: 0; border: 0; background: transparent; border-radius: 9px; scroll-snap-align: start; }
.mini canvas { width: 56px; height: 70px; border-radius: 9px; display: block; background: var(--soft); object-fit: cover; }
.mini .n { position: absolute; left: 4px; top: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: rgba(46, 11, 25, 0.74); color: #ffffff; font-size: 10.5px; font-weight: 800; line-height: 16px; text-align: center; }
.seg { display: flex; gap: 6px; }
.seg .chip { min-height: 32px; padding: 0 12px; }
#movePrev canvas { width: 100%; max-width: 200px; height: auto; aspect-ratio: 4 / 5; margin: 0 auto; border-radius: 12px; display: block; background: var(--soft); }
.tpl .hint { font-weight: 400; line-height: 1.3; }

/* ---------- the feed, moved by hand ---------- */
.feed .cell { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: pan-y; will-change: transform; }
.cell.ghost { aspect-ratio: 3 / 4; background: var(--soft-l); outline: 2px dashed var(--line); outline-offset: -2px; }
.cell.drag, .cell.drop { z-index: 30; pointer-events: none; border-radius: 12px; overflow: hidden; }
.cell.drag { scale: 1.07; box-shadow: 0 14px 34px rgba(30, 8, 18, 0.38); transition: scale 160ms ease-out, box-shadow 160ms ease-out; cursor: grabbing; }
.cell.drop { transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), scale 220ms ease-out, box-shadow 220ms ease-out; }
.cell .many { position: absolute; right: 6px; top: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(30, 8, 18, 0.72); color: #ffffff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .cell.drag, .cell.drop { transition: none; } }

/* ---------- Idag, two posts in a row ---------- */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pair > .row { grid-column: 1 / -1; }
.scard { padding: 0 0 4px; border: 0; background: transparent; color: var(--ink); text-align: left; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.scard .pic { position: relative; display: block; line-height: 0; border-radius: 18px; overflow: hidden; background: var(--soft); box-shadow: var(--ring); margin-bottom: 4px; }
.scard canvas { width: 100%; height: auto; aspect-ratio: 4 / 5; display: block; }
.scard b { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard > span:last-child { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard .many { position: absolute; right: 8px; top: 8px; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: rgba(30, 8, 18, 0.72); color: #ffffff; font-size: 12px; font-weight: 800; line-height: 22px; text-align: center; }
/* the label on a picture in the feed says where the post stands */
.cell .tag.draft { background: #ffffff; color: #2e0b19; }
.cell .tag.ready { background: #4a1230; color: #ffffff; }
.cell .tag.saved { background: #b01e57; color: #ffffff; }

/* ---------- writing on the picture: the picture on top, a small sheet below ---------- */
body.textmode { overflow: hidden; }
.textmode { position: fixed; left: 0; right: 0; top: 0; height: 100%; z-index: 45; background: var(--stage); display: flex; flex-direction: column; }
.tmstage { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px; }
.tmstage #stage { max-width: none; flex: none; }
.tmsheet { flex: none; position: relative; margin-top: -14px; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -1px 0 var(--line), 0 -12px 30px rgba(30, 8, 18, 0.14); padding: 12px 12px calc(env(safe-area-inset-bottom, 0px) + 12px); display: flex; flex-direction: column; gap: 10px; max-width: 520px; width: 100%; align-self: center; }
.tmrow { display: flex; gap: 8px; align-items: flex-end; }
.tmrow textarea { flex: 1; min-width: 0; min-height: 46px; max-height: 92px; font-size: 16px; resize: none; }
.tmscroll { display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; padding: 3px; margin: -3px; }
.tmscroll::-webkit-scrollbar { display: none; }
.tmscroll > * { flex: none; }
.tmscroll .chip { font-weight: 400; min-height: 38px; }
.tmgroup { display: flex; gap: 6px; align-items: center; padding-right: 8px; border-right: 1px solid var(--line); }
.tmgroup[hidden] { display: none; }
.tmsheet .swc { width: 32px; height: 32px; }
.ibtn { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: var(--soft-l); color: var(--ink); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.ibtn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.toast { z-index: 60; }

/* a message that can be taken back */
.toast { display: flex; align-items: center; justify-content: center; gap: 14px; }
.tact { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 6px 2px; min-height: 32px; }

/* ---------- Stil: the photos of a theme, and templates in rows ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.theme { display: flex; flex-direction: column; gap: 8px; }
.theme .txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.theme .txt b { font-size: 15px; font-weight: 800; }
.tplrow.wide .tpl { flex-basis: 150px; cursor: default; }
.tplrow.wide .tpl canvas { width: 150px; height: 188px; }
.tplgrid button.tpl { cursor: pointer; }

.thead { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.thead .more { font-size: 12.5px; font-weight: 800; color: var(--accent); white-space: nowrap; }

/* ---------- Idag: two small boxes on top ---------- */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { border: 0; margin: 0; text-align: left; border-radius: 22px; padding: 14px 16px; background: var(--soft); color: var(--ink); display: flex; flex-direction: column; gap: 1px; min-height: 108px; }
.stat b { font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1.05; letter-spacing: -0.3px; }
.stat span { font-size: 13.5px; font-weight: 700; }
.stat small { font-size: 12px; margin-top: auto; padding-top: 8px; color: var(--ink-2); }
.stat.dark { background: var(--hero); color: var(--on-hero); }
.stat.dark small { color: var(--hero-ring); }
button.stat:not(:disabled) small { color: var(--accent); font-weight: 800; }
button.stat:disabled { cursor: default; }

/* ---------- stories are tall ---------- */
.cover.story { background: var(--stage); display: flex; justify-content: center; padding: 14px 0; }
.cover.story canvas { width: 56%; aspect-ratio: 9 / 16; border-radius: 14px; box-shadow: 0 8px 24px rgba(46, 11, 25, 0.16); }
.scard.story canvas { aspect-ratio: 9 / 16; }
.minis.story .mini canvas, .stagewrap.story .mini canvas { height: 100px; }
.stagewrap.story #stage { max-width: 250px; }
.tmstage #stage { max-width: none; }
.stagewrap.story ~ #st3 .tpl canvas, .tplrow.tall .tpl canvas { height: auto; aspect-ratio: 9 / 16; }
#movePrev canvas { aspect-ratio: auto; }
.cell canvas, .item canvas { object-fit: cover; }
/* A story is narrow, so its other pictures sit beside it and the tools below stay within reach. */
.stagewrap.story { flex-direction: row; align-items: flex-start; justify-content: center; }
.stagewrap.story #stage { flex: 0 1 250px; min-width: 0; }
.stagewrap.story .strip { flex-direction: column; flex-wrap: nowrap; flex: none; max-height: 444px; overflow-y: auto; padding: 2px; }
/* Arrows, sparkles and line drawings: the sheet has no text field for them, only shape, colour and size. */
.tmrow { justify-content: flex-end; }
.ibtn.dood { width: 40px; height: 40px; }
.ibtn.dood .ico { width: 22px; height: 22px; }
.ibtn.dood[aria-pressed="true"] { background: var(--primary); color: var(--on-primary, #fff); }
/* Stickers: each one on a soft tile, with a small button to throw it away. */
.cuttile { position: relative; aspect-ratio: 1; border-radius: 12px; background: var(--soft-l); overflow: hidden; }
.cuttile .pick { width: 100%; height: 100%; padding: 0; border: 0; background: transparent; line-height: 0; }
.cuttile canvas { width: 100%; height: 100%; display: block; }
.cuttile .x { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 18px; line-height: 1; box-shadow: 0 1px 4px rgba(30, 8, 18, 0.25); }
#cutBox { z-index: 50; }
