:root {
  --ink: #1b2130;
  --ink-2: #4a5468;
  --muted: #7a8396;
  --line: #e3e6ec;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --accent: #b3262e;
  --accent-2: #8f1d24;
  --accent-soft: #fbeced;
  --gold: #d7a326;
  --ok: #2e7d4f;
  --warn: #b26a00;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.5 Inter, system-ui, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg);
  display: flex; flex-direction: column;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small-text { font-size: 12px; }
.spacer { flex: 1; }
h1, h2, h3 { margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 20px; } h3 { font-size: 15px; }
code { background: #f0f1f4; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
kbd { font: 11px Inter, sans-serif; border: 1px solid rgba(255,255,255,.45); border-radius: 4px; padding: 0 5px; margin-left: 6px; opacity: .8; }
button, .btn, .chip, a { touch-action: manipulation; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 18px; min-width: 0;
  height: 60px; padding: 0 20px; background: var(--panel);
  border-bottom: 1px solid var(--line); flex: none; position: relative; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; color: var(--accent); --star-fill: var(--panel); flex: none; }
.proj-title input {
  font: 600 15px Inter, sans-serif; border: 1px solid transparent; border-radius: 8px;
  padding: 5px 8px; width: 210px; background: transparent; color: var(--ink);
}
.proj-title input:hover { border-color: var(--line); }
.proj-title input:focus { outline: none; border-color: var(--accent); background: #fff; }
.steps { display: flex; gap: 4px; margin: 0 auto; background: var(--bg); padding: 4px; border-radius: 10px; }
.steps button {
  border: 0; background: transparent; font: 500 13.5px Inter, sans-serif; color: var(--ink-2); white-space: nowrap;
  padding: 7px 14px; border-radius: 7px; cursor: pointer; display: flex; align-items: center; gap: 7px;
}
.steps button b {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: #dde1e8; color: var(--ink-2); font-size: 11.5px;
}
.steps button:hover { color: var(--ink); }
.steps button.active, .steps button.active:hover { background: var(--accent); color: #fff; box-shadow: 0 1px 4px rgba(179, 38, 46, .35); }
.steps button.active b, .steps button.active.done b { background: #fff; color: var(--accent); }
.progress-pill { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.progress-pill .bar { width: 90px; height: 7px; background: #e9ebf0; border-radius: 4px; overflow: hidden; }
.progress-pill .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .3s; }
.progress-pill.complete { cursor: pointer; }
.progress-pill.complete .bar i { background: var(--ok); }
/* account: one round button with the initial, a small menu with the address, Admin and Sign out */
.account { margin-left: auto; position: relative; flex: none; }
.steps:not(.hidden) ~ .account { margin-left: 0; }
.account > summary { list-style: none; cursor: pointer; }
.account > summary::-webkit-details-marker { display: none; }
/* the account button: a person and "Account" (just the person where the bar is full) */
.acct { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 9px; border-radius: 999px;
  background: #eef0f4; border: 1px solid var(--line); color: var(--ink-2); font: 500 13px Inter, sans-serif; white-space: nowrap; }
.acct svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.account[open] .acct, .account > summary:hover .acct { background: #e3e6ec; color: var(--ink); }
.account > summary:focus-visible { outline: none; }
.account > summary:focus-visible .acct { outline: 2px solid var(--accent); outline-offset: 2px; }
/* the language flags in the top bar: the one in use stands out, the other is a tap away */
.lang-flags { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(120, 128, 140, .12); flex: none; margin-left: auto; }
.lang-flags + .account, .lang-flags + .btn { margin-left: 0 !important; }
.steps:not(.hidden) ~ .lang-flags { margin-left: 0; }
.lang-flags button { display: grid; place-items: center; width: 34px; height: 28px; border: 0; border-radius: 999px;
  background: transparent; cursor: pointer; opacity: .55; filter: saturate(.6); transition: opacity .15s, filter .15s; }
.lang-flags button:hover { opacity: .85; filter: none; }
.lang-flags button[aria-pressed="true"] { background: #fff; opacity: 1; filter: none; box-shadow: 0 1px 2px rgba(0,0,0,.14); }
.lang-flags button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lang-flags .flag { width: 20px; height: auto; border-radius: 2px; box-shadow: 0 0 0 .5px rgba(0,0,0,.2); }
@media (max-width: 1600px) { .steps:not(.hidden) ~ .account .acct-label { display: none; } .steps:not(.hidden) ~ .account .acct { padding: 0 7px; } }
@media (max-width: 999px) {
  .lang-flags button { width: 30px; height: 26px; } .lang-flags .flag { width: 18px; }
}
.account-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .16); padding: 6px; display: flex; flex-direction: column; z-index: 20; }
.account-pop .account-email { padding: 8px 10px 10px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-pop a { padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink); text-decoration: none; cursor: pointer; }
.account-pop a:hover { background: var(--bg); }
.account-pop a.acct-danger { color: var(--accent); }
.admin-link { font-weight: 600; color: var(--accent) !important; }

main { flex: 1; min-height: 0; display: flex; }
.view { flex: 1; min-height: 0; overflow: auto; padding: 24px 28px; }

/* ---------- buttons, fields ---------- */
.btn {
  font: 600 13.5px Inter, sans-serif; border-radius: 9px; padding: 9px 16px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: #c9ced8; background: #fafbfc; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.primary:disabled { background: #d9a7aa; border-color: #d9a7aa; opacity: 1; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--accent); }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn.big { padding: 11px 20px; font-size: 14.5px; }
.btn.wide { width: 100%; }
.link-danger { background: none; border: 0; color: var(--accent); font: 600 12.5px Inter, sans-serif; cursor: pointer; text-decoration: underline; padding: 6px 0; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; }
.field > span, .field > label { color: var(--ink-2); }
.field input:not([type]), .field select, .field input[name], .field input[id]:not([type=range]) {
  font: 14px Inter, sans-serif; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
input[type=range] { accent-color: var(--accent); width: 100%; }
.check, label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatches.small .swatch { width: 26px; height: 26px; }
.swatch.sel { box-shadow: 0 0 0 2px var(--accent); }
.switch { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.switch input { display: none; }
.switch span { width: 32px; height: 18px; border-radius: 9px; background: #cfd4dc; position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { left: 16px; }

/* ---------- home ---------- */
.home-hero { max-width: 760px; margin: 12px auto 28px; text-align: center; }
.home-hero h1 { font-size: 30px; }
.home-hero p { color: var(--ink-2); font-size: 15.5px; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; max-width: 1100px; margin: 0 auto; }
.proj-card {
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  cursor: pointer; border: 1px solid transparent; transition: transform .15s, border-color .15s; position: relative;
}
.proj-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.proj-card.legacy { opacity: .6; cursor: default; }
.proj-card.legacy:hover { transform: none; border-color: transparent; }
.proj-card .cover { height: 150px; background: #eceef2 center/cover; display: grid; place-items: center; }
.proj-card .cover svg { width: 64px; color: #c3c8d2; --star-fill: #eceef2; }
.proj-card .meta { padding: 12px 14px; }
.proj-card .meta b { display: block; font-size: 15px; }
.proj-card .meta span { font-size: 12.5px; color: var(--muted); }
.proj-card .del { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .15s; background: rgba(255,255,255,.92); }
.proj-card:hover .del { opacity: 1; }
.proj-card.new { display: grid; place-items: center; min-height: 214px; border: 2px dashed #cfd4dc; box-shadow: none; background: transparent; color: var(--ink-2); font-weight: 600; }
.proj-card.new:hover { border-color: var(--accent); color: var(--accent); }
.proj-card.new span { font-size: 34px; display: block; text-align: center; line-height: 1; }
.account-line { max-width: 1100px; margin: 26px auto 0; font-size: 12.5px; text-align: center; }
.account-line a { color: var(--accent); }
.account-usage.over { color: var(--accent); font-weight: 600; }

/* ---------- photos ---------- */
.pane-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.pane-head p { margin: 0; }
.photo-goal { display: inline-block; margin-left: 8px; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 12px; background: #fff3dc; color: var(--warn); vertical-align: 3px; }
.photo-goal.ok { background: #e3f3ea; color: var(--ok); }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  border: 2px dashed #cbd0d9; border-radius: var(--radius); background: var(--panel); padding: 34px; cursor: pointer;
  color: var(--ink-2); transition: border-color .15s, background .15s; position: relative;
}
.dropzone svg { width: 34px; height: 34px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dropzone strong { font-size: 15px; color: var(--ink); }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone a { color: var(--accent); }
.dz-touch { display: none; }
.upload-progress { width: 280px; max-width: 100%; margin-top: 10px; font-size: 12px; text-align: center; }
.upload-progress i { display: block; height: 6px; border-radius: 3px; background: var(--accent); width: 0; transition: width .2s; margin-bottom: 4px; }
.upload-problem { margin-top: 12px; padding: 12px 16px; border-radius: 10px; background: #fff1f1; border: 1px solid #f0b9bc; color: #8f1d24; font-size: 14px; font-weight: 500; }
.dup-banner { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: #eef4ff; border: 1px solid #c9d8f5; color: #1d3f7a; font-size: 13.5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.photo-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.photo-tile { position: relative; border-radius: 10px; overflow: hidden; background: #e9ebef; aspect-ratio: 1; box-shadow: var(--shadow); cursor: pointer; outline: 3px solid transparent; outline-offset: -3px; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile .badge { position: absolute; left: 8px; bottom: 8px; background: rgba(20,24,34,.72); color: #fff; font-size: 11.5px; padding: 2px 8px; border-radius: 10px; }
.photo-tile .badge.zero { background: rgba(255,255,255,.9); color: var(--ink-2); }
.photo-tile .tick { position: absolute; top: 7px; left: 7px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.85);
  color: transparent; display: grid; place-items: center; font-size: 13px; font-weight: 700; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.photo-tile.picked { outline-color: var(--accent); }
.photo-tile.picked .tick { background: var(--accent); color: #fff; }
.photo-tile.picked img { opacity: .8; }
.photo-tile .dup { position: absolute; right: 6px; top: 6px; font: 700 10.5px Inter, sans-serif; background: #1d3f7a; color: #fff; padding: 2px 7px; border-radius: 9px; }

/* ---------- place: laptop ---------- */
#view-place { padding: 0; overflow: hidden; position: relative; }
.place-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 360px; height: 100%; }
.tray { border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.tray-head { display: flex; align-items: center; gap: 6px; padding: 14px 12px 8px; }
.tray-list { overflow: auto; padding: 2px 12px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.tray-item { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; cursor: pointer; border: 2px solid transparent; background: #eceef1; padding: 0; }
.tray-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tray-item.used img { filter: grayscale(1); opacity: .45; }
.tray-item.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tray-item.sel img { filter: none; opacity: 1; }
.tray-item .n { position: absolute; right: 4px; bottom: 4px; background: rgba(20,24,34,.78); color: #fff; font: 700 11px Inter, sans-serif; padding: 0 6px; border-radius: 8px; }

.center-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 14px 18px; gap: 10px; }
.point-bar { display: none; }
.place-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.step-title { margin: 0; font-size: 18px; }
.target-info { font-size: 13.5px; color: var(--ink-2); }
.target-info b { color: var(--accent); }
.cropper { flex: 1; min-height: 0; position: relative; background: #2a2f3a; border-radius: var(--radius); overflow: hidden; }
.cropper canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.cropper canvas.dragging { cursor: grabbing; }
.cropper-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #aab1c0; font-size: 15px; }
.crop-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); pointer-events: none; max-width: calc(100% - 32px); text-align: center; line-height: 1.35;
  background: rgba(0,0,0,.45); color: #d9dee8; font-size: 12px; padding: 4px 12px; border-radius: 12px; }
.crop-hint.sa-hide { display: none; }
.crop-locked { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: rgba(255,255,255,.95); color: var(--ink); font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 14px; box-shadow: var(--shadow); max-width: calc(100% - 24px); text-align: center; }
.crop-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rotate-ctl { display: inline-flex; background: #e9ebf0; border-radius: 9px; padding: 3px; gap: 2px; }
.rotate-ctl button { border: 0; background: transparent; border-radius: 7px; padding: 5px 9px; font: 600 15px Inter, sans-serif; color: var(--ink-2); cursor: pointer; min-width: 36px; }
.rotate-ctl button:hover { background: #fff; color: var(--ink); }
.rotate-ctl #rotReset { font-size: 12px; min-width: 48px; }
.rotate-ctl button svg, .pbtn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; vertical-align: -3px; }
.rotate-ctl button.on, .pbtn.on { background: var(--accent); color: #fff; }
.rotate-ctl button.on:hover { background: var(--accent-2); color: #fff; }
.rotate-ctl #rotReset.on { background: #fff; color: var(--accent); box-shadow: var(--shadow); }
.zoom { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 280px; min-width: 90px; }
.place-actions { display: flex; gap: 10px; margin-left: auto; }        /* the actions stay together (wrap as one) */
.place-actions #changePhotoBtn, .place-actions #discardBtn { padding-left: 16px; padding-right: 16px; white-space: nowrap; }
.zoom svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.6; flex: none; }
.res-warn { background: #fff3dc; color: var(--warn); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 12px; white-space: nowrap; }
#placeBtn { min-width: 190px; white-space: nowrap; }

.done-banner {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius);
  background: linear-gradient(90deg, #eaf6ef, #fdf6e4); border: 1.5px solid #9fd0b2; animation: done-in .35s ease-out;
}
.done-icon { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.done-text { flex: 1; display: flex; flex-direction: column; font-size: 12.5px; color: var(--ink-2); line-height: 1.3; }
.done-text b { font-size: 14.5px; color: var(--ink); }
.done-banner .btn { animation: done-pulse 2s ease-in-out 0.4s 3; white-space: nowrap; padding: 8px 14px; font-size: 13.5px; }
@keyframes done-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes done-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 46, .45); } 50% { box-shadow: 0 0 0 9px rgba(179, 38, 46, 0); } }

/* star map column */
.map-col { border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; padding: 12px 14px 16px; }
.sheet-grab, .sheet-close { display: none; }
.map-head { display: flex; align-items: center; gap: 8px; }
.map-head h3 { margin: 0; }
.info-btn { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font: italic 700 12px Georgia, serif; cursor: pointer; }
.map-hint { margin: -6px 0 0; }
.map-explain:not(.show) { display: none; }
.map-explain { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); background: #f6f4ee; border-left: 3px solid var(--gold); padding: 8px 10px; border-radius: 0 8px 8px 0; }
.map-explain b { color: var(--ink); }
.point-rows { display: flex; flex-direction: column; gap: 4px; }
.point-row { display: grid; grid-template-columns: 46px repeat(8, minmax(0, 1fr)); align-items: center; gap: 3px; }
.ring-name { width: 48px; flex: none; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 7px; font: 600 11px Inter, sans-serif; color: var(--ink-2);
  padding: 4px 0; min-width: 0; cursor: pointer; position: relative; text-align: center;
}
.chip.small { border-style: dashed; }
.chip:hover { border-color: var(--accent); }
.chip.done { background: #eef0f3; color: #8a92a3; border-style: solid; }
.chip.done::after { content: "✓"; position: absolute; top: -7px; right: -4px; width: 13px; height: 13px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 8.5px; line-height: 13px; }
.chip.staged { background: #fff6dd; border: 1.5px dashed var(--gold); color: #7a5200; }
.chip.locked::before { content: "🔒"; position: absolute; top: -8px; left: -4px; font-size: 9px; line-height: 1; }
.chip.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.net-caption { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.net-caption b { color: var(--ink); }
.qr-note { color: var(--warn); font-size: 12px; }
.net-view { position: relative; }
.net-view svg { width: 100%; height: 300px; display: block; background: #f3f4f7; border-radius: 10px; }
.net-view.locked svg { background: repeating-linear-gradient(45deg, #eceef2 0 8px, #f3f4f7 8px 16px); }
.net-view .tab { fill: #e2e4e9; }
.net-view .face-outline { fill: none; stroke: rgba(160, 168, 182, .7); stroke-width: .35; }
svg .fan { fill: none; stroke-width: .8; }
svg .fan.empty { stroke: #9aa3b5; stroke-dasharray: 2 1.5; }
svg .fan.done { stroke: transparent; }
svg .fan.staged { stroke: var(--gold); stroke-width: 1.3; stroke-dasharray: 2.5 1.5; }
.staged-badge, .lock-badge { position: absolute; top: 8px; display: flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; box-shadow: var(--shadow); }
.staged-badge { left: 8px; background: #fff6dd; color: #7a5200; border: 1px solid #f0d9a4; }
.lock-badge { right: 8px; background: #fff; color: var(--ink-2); }
.lock-badge svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; background: none; }
.point-panel { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.point-panel-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; font-size: 13px; }
.point-panel-row .check { font-weight: 500; }
.caption-box { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fcfcfd; }
.caption-box[open] { padding-bottom: 12px; }
.caption-box > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; padding: 10px 0; list-style: none; display: flex; justify-content: space-between; }
.caption-box > summary::-webkit-details-marker { display: none; }
.caption-box > summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.caption-box[open] > summary::after { content: "–"; }
.caption-box .field { margin-top: 8px; }
.caption-box details summary { cursor: pointer; font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-top: 10px; }
.caption-box.disabled { opacity: .55; }
.apply-sec { margin-top: 12px; border: 1px dashed #c9ced8; align-self: flex-start; }
.clear-all { align-self: flex-start; margin-top: 4px; }
.phone-bar, .sheet-backdrop { display: none; }
@media (max-height: 820px) and (min-width: 1000px) { .net-view svg { height: 240px; } .map-explain { font-size: 12px; } }

/* ---------- 3D preview ---------- */
#view-preview { padding: 0; overflow: hidden; }
.preview-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; height: 100%; }
.stage { position: relative; background: radial-gradient(ellipse at 50% 40%, #3a4152 0%, #1c2029 70%); min-height: 0; }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); color: #c4cad6; font-size: 12.5px; background: rgba(0,0,0,.3); padding: 5px 12px; border-radius: 14px; pointer-events: none; white-space: nowrap; }
.stage-tip { position: absolute; pointer-events: none; background: #fff; color: var(--ink); font-size: 12px; padding: 4px 9px; border-radius: 6px; box-shadow: var(--shadow); transform: translate(12px, 12px); white-space: nowrap; }
.preview-side { background: var(--panel); border-left: 1px solid var(--line); padding: 14px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.preview-map { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fcfcfd; }
.preview-map[open] { padding-bottom: 12px; }
.preview-map > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; padding: 10px 0; }
.preview-map .point-rows { margin: 6px 0; }
.preview-net { cursor: pointer; }
.view-opts { display: flex; gap: 16px; }
#previewStatus { margin: 0; }
.preview-side #confirmBtn { position: sticky; bottom: 0; box-shadow: 0 -14px 0 4px var(--panel), 0 14px 0 4px var(--panel); margin-top: 6px; }
#previewStatus { margin-bottom: 4px; }

/* ---------- request ---------- */
#view-request { padding: 0; overflow: auto; }
.request-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; padding: 18px 22px; max-width: 1500px; margin: 0 auto; }
.request-sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.request-sheets figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.request-sheets img { width: 100%; display: block; border-radius: 4px; }
.request-sheets figcaption { font-size: 11.5px; color: var(--ink-2); margin-top: 6px; }
.request-side { display: flex; flex-direction: column; gap: 14px; }
.request-form, .request-done, .admin-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.request-form h3, .request-done h3 { margin: 0; }
.request-form input:not([type]), .request-form input[id]:not([type=checkbox]):not([type=radio]), .request-form textarea { font: 14px Inter, sans-serif; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; width: 100%; resize: vertical; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; font-weight: 400; }
.choice b { display: block; font-size: 13.5px; color: var(--ink); }
.choice em { font-style: normal; color: var(--accent); }
.choice small { color: var(--muted); font-size: 12px; line-height: 1.35; display: block; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.approve { font-size: 13px; color: var(--ink); align-items: flex-start; }
.req-item { border-top: 1px solid var(--line); padding-top: 10px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.req-item:first-of-type { border-top: 0; padding-top: 0; }
.req-status { display: inline-block; font-weight: 600; font-size: 12px; padding: 2px 9px; border-radius: 10px; background: #eef0f4; color: var(--ink-2); }
.req-status.done { background: #e3f3ea; color: var(--ok); }
.admin-box { flex-direction: row; align-items: center; flex-wrap: wrap; background: #fff8e8; border-color: #f0d9a4; }
/* test phase: a quiet note on the home page and beside the request form (remove when orders open) */
.test-note { max-width: 760px; margin: 0 auto 22px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px;
  font-size: 14px; color: var(--ink-2); }
.test-note b { color: var(--ink); }
.request-side .test-note { margin: 0 0 14px; }
.requested-banner { background: #e3f3ea; border: 2px solid var(--ok); border-radius: var(--radius); padding: 20px 18px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.requested-banner h3 { margin: 0; font-size: 19px; color: var(--ok); }
.requested-banner p { margin: 0; }
.requested-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 26px; font-weight: 700; display: grid; place-items: center; }
#requestAgainBtn { align-self: center; }

/* ---------- cut files ---------- */
.export-progress { background: var(--panel); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 18px; font-size: 13px; color: var(--ink-2); }
.export-progress .bar { height: 8px; background: #eceef2; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.export-progress .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .4s; }
.cut-layout { display: grid; grid-template-columns: 380px 1fr; gap: 22px; align-items: start; }
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.howto ol { padding-left: 20px; margin: 8px 0; } .howto li { margin: 6px 0; }
.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.sheet-card { background: var(--panel); border-radius: 10px; box-shadow: var(--shadow); padding: 8px; font-size: 11.5px; color: var(--ink-2); }
.sheet-card img { width: 100%; aspect-ratio: 2 / 3; object-fit: contain; background: #eef0f3; border-radius: 6px; cursor: zoom-in; display: block; margin-bottom: 6px; }
.sheet-card b { color: var(--ink); display: block; font-size: 12.5px; }
.sheet-card a { display: block; word-break: break-all; color: var(--accent); font-size: 11px; margin: 2px 0 4px; }
.sheet-card .paper { display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sheet-card .paper.plain { background: #eef0f3; color: var(--ink-2); }

/* ---------- dialogs, toast ---------- */
dialog { border: 0; border-radius: 14px; padding: 0; box-shadow: 0 20px 60px rgba(0,0,0,.25); max-width: 480px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(20, 24, 34, .45); }
dialog form { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
dialog h2 { margin: 0; }
dialog p { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
#lightbox { max-width: 92vw; padding: 12px; text-align: center; background: #fff; }
#lightbox img { max-height: 82vh; max-width: 100%; display: block; margin: 0 auto 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13.5px; opacity: 0; transition: all .25s; pointer-events: none; z-index: 50; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- narrower laptops ---------- */
@media (max-width: 1366px) {
  .proj-title input { width: 150px; }
  .progress-pill span { display: none; }
  .steps button { padding: 6px 10px; }
  .place-layout { grid-template-columns: 180px minmax(0, 1fr) 340px; }
  .preview-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  #placeBtn kbd { display: none; }
}
@media (max-width: 1150px) {
  .progress-pill { display: none !important; }
  .place-layout { grid-template-columns: 150px minmax(0, 1fr) 320px; }
  .tray-list { grid-template-columns: 1fr; }
  .request-layout { grid-template-columns: 1fr; }
}

/* =================== phone and small tablet (< 1000px) =================== */
@media (max-width: 999px) {
  html, body { height: 100%; overflow: hidden; }
  body { height: 100dvh; }
  .topbar { height: 48px; padding: 0 10px; gap: 8px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .brand span { display: none; }
  .proj-title { display: none; }
  .steps { margin: 0 auto; padding: 3px; }
  .steps button { font-size: 12.5px; padding: 6px 8px; gap: 5px; min-height: 36px; }
  .steps button b { width: 18px; height: 18px; font-size: 10.5px; }
  .view { padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
  input, select, textarea, .field input, .field select { font-size: 16px !important; }       /* no zoom on focus in iOS */
  .proj-card .del { opacity: 1; }
  .pane-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .home-hero h1 { font-size: 24px; }
  #view-home:not(.hidden) { display: flex; flex-direction: column; }   /* phone: the video button under the intro, centred */
  #view-home .home-hero { order: 0; margin-bottom: 12px; }
  #view-home .home-top { order: 1; justify-content: center; margin: 0 0 20px; }
  #view-home .home-top .help-btn { width: 100%; max-width: 340px; justify-content: center; min-height: 48px; }
  #view-home .home-grid { order: 2; width: 100%; }
  #view-home .account-line { order: 3; }
  .home-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .proj-card .cover { height: 110px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .dropzone { padding: 22px 16px; }
  .cut-layout { grid-template-columns: 1fr; }

  /* place: one column, the whole screen, nothing scrolls */
  .place-layout { display: flex; flex-direction: column; height: 100%; }
  .tray { order: 2; border: 0; border-bottom: 1px solid var(--line); flex: none; }
  .tray-head { display: none; }
  .tray-list { display: flex; overflow-x: auto; overflow-y: hidden; padding: 6px 10px; gap: 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .tray-item { width: 56px; height: 56px; flex: none; scroll-snap-align: start; }
  .center-col { order: 1; display: contents; }
  .point-bar { order: 1; display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
  .pb-nav { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 24px; line-height: 1; color: var(--ink); cursor: pointer; flex: none; }
  .pb-main { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: 600 15px Inter, sans-serif; color: var(--ink); cursor: pointer; }
  .pb-main small { color: var(--muted); font-weight: 500; }
  #miniNet { width: 40px; height: 40px; }
  #miniNet .tab { fill: #e2e4e9; }
  #miniNet .face-outline { fill: none; stroke: rgba(160, 168, 182, .7); stroke-width: .5; }
  .place-head { display: none; }
  .done-banner { order: 3; margin: 6px 10px 0; flex: none; }
  .done-text span { display: none; }
  .cropper { order: 4; flex: 1; border-radius: 0; margin: 0; min-height: 200px; }
  .crop-hint { display: none; }
  .crop-tools { order: 5; flex: none; padding: 6px 12px; gap: 10px; flex-wrap: nowrap; background: var(--panel); }
  .crop-tools .rotate-ctl { display: none; }
  .crop-tools .zoom { max-width: none; }
  #placeBtn, #changePhotoBtn, #discardBtn { display: none; }        /* the phone bar has them */
  .phone-bar:has(#phDiscard:not(.hidden)) :is(#phFlipH, #phFlipV) { display: none; }   /* room for Discard */
  #phDiscard { height: 46px; padding: 0 12px; flex: none; }
  .phone-bar {
    display: flex; gap: 8px; align-items: center; flex: none;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line);
  }
  #view-place { display: flex; flex-direction: column; }
  #view-place.hidden { display: none; }
  #view-place .place-layout { flex: 1; min-height: 0; }
  .pbtn { min-width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: 600 17px Inter, sans-serif; color: var(--ink); cursor: pointer; padding: 0 10px; }
  #phPoint { font-size: 13.5px; }
  .phone-bar .pbtn { min-width: 42px; padding: 0 8px; }
  #phPlace { flex: 1; height: 46px; padding: 0 10px; white-space: nowrap; }
  body:has(input:focus, textarea:focus) .phone-bar { display: none; }
  body[data-view=place] .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  #miniNet .fan.empty { stroke: #7a8396; stroke-width: 2.2; stroke-dasharray: none; }
  #miniNet .fan.staged { stroke-width: 2.5; }

  /* the star map as a bottom sheet */
  .map-col {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 82dvh; border: 0;
    border-radius: 16px 16px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25);
    transform: translateY(105%); transition: transform .25s ease; visibility: hidden;
    padding: 6px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .map-col.open { transform: none; visibility: visible; }
  .sheet-grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: #d4d8df; margin: 2px auto 4px; flex: none; }
  .sheet-close { display: inline-flex; margin-left: auto; }
  .sheet-backdrop { display: block; position: fixed; inset: 0; background: rgba(20, 24, 34, .4); z-index: 25; }
  .sheet-backdrop.hidden { display: none; }
  .chip { padding: 9px 0; font-size: 11.5px; }
  .point-row { grid-template-columns: 40px repeat(8, minmax(0, 1fr)); }
  .ring-name { font-size: 9px; }
  .net-view svg { height: 34dvh; }
  .side-strip:not(.hidden) { order: 1; display: grid; }
  .pt-stepper { display: none; }
  .point-panel-row .check { min-height: 44px; }
  .clear-all { min-height: 44px; }

  /* 3D preview */
  #view-preview { overflow: auto; }
  .preview-layout { display: flex; flex-direction: column; height: auto; min-height: 100%; }
  .stage { height: 58dvh; flex: none; }
  .stage-hint { font-size: 11.5px; }
  .preview-side { border: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  .preview-net svg { height: 40dvh; }
  #confirmBtn { min-height: 48px; }
  .request-layout { padding: 14px 16px calc(24px + env(safe-area-inset-bottom)); }
  .request-sheets { grid-template-columns: repeat(2, 1fr); }
  .dialog-actions .btn { flex: 1; min-height: 44px; }
}
@media (max-width: 999px) and (min-width: 700px) {
  /* small tablets: photos down the side, map docked beside the cropper is too tight, keep the sheet */
  .tray-item { width: 64px; height: 64px; }
}
@media (max-width: 420px) {
  .steps button { font-size: 0; gap: 0; padding: 6px 9px; }
  .steps button b { font-size: 11px; }
  .steps button.active { font-size: 12px; gap: 5px; }
}
@media (pointer: coarse) {
  .dz-desk { display: none; }
  .dz-touch { display: inline; }
}

/* =================== landing page =================== */
.landing { display: block; height: auto; overflow: auto; background: #fffdf8; }
.landing main { display: block; }
.landing .topbar { position: sticky; top: 0; background: rgba(255, 253, 248, .92); backdrop-filter: blur(8px); }
.landing .topbar .btn { margin-left: auto; }
.l-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: center; max-width: 1180px; margin: 0 auto; padding: 40px 24px 56px; }
.l-kicker { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.l-hero h1 { font: 700 clamp(32px, 4.6vw, 54px)/1.08 "Playfair Display", Georgia, serif; letter-spacing: -.01em; margin: 0 0 16px; }
.l-hero p.lead { font-size: 17.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 24px; max-width: 34em; }
.l-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.l-cta .btn { padding: 14px 24px; font-size: 16px; border-radius: 11px; }
.l-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.l-star { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; justify-self: center; margin: 0 auto; }
.l-star img, .l-star canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: contain; }
.l-star canvas { opacity: 0; transition: opacity .8s; }
.l-star.live canvas { opacity: 1; }
.l-star.live img { opacity: 0; transition: opacity .8s; }
.l-star canvas.fading { opacity: 0 !important; transition: opacity .6s; }
.l-star-name { position: absolute; left: 0; right: 0; bottom: -6px; margin: 0; text-align: center; font: 600 13px Inter, sans-serif; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.l-section { max-width: 1080px; margin: 0 auto; padding: 56px 24px; }
.l-section h2 { font: 700 clamp(26px, 3vw, 36px)/1.15 "Playfair Display", Georgia, serif; margin: 0 0 12px; text-align: center; }
.l-section > p.sub { text-align: center; color: var(--ink-2); font-size: 16px; max-width: 40em; margin: 0 auto 32px; }
.l-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.l-step { background: #fff; border: 1px solid #efe8da; border-radius: 16px; padding: 22px 18px; box-shadow: var(--shadow); }
.l-step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 12px; }
.l-step h3 { font-size: 16px; margin: 0 0 6px; }
.l-step p { margin: 0; color: var(--ink-2); font-size: 14px; }
.l-band { background: linear-gradient(180deg, #7d1f26, #5e161c); color: #fbefe0; }
.l-band .l-section h2, .l-band .l-section > p.sub { color: #fff; }
.l-band .l-section > p.sub { color: #f2dcc8; }
.l-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.l-fact { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 18px; }
.l-fact b { display: block; font-size: 16px; color: #fff; margin-bottom: 4px; }
.l-fact span { font-size: 14px; color: #f2dcc8; }
.l-start { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; align-items: center; }
.l-start h2 { text-align: left; }
.l-section > div > p.l-start-sub, p.l-start-sub { text-align: left; margin: 0 0 12px; color: var(--ink-2); font-size: 16px; }
.l-start ul { padding-left: 20px; color: var(--ink-2); font-size: 15px; line-height: 1.7; }
.l-start .login-card { max-width: none; }
.l-foot { text-align: center; font-size: 12.5px; color: var(--muted); padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid #efe8da; }
.login-card { width: 100%; max-width: 420px; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); padding: 26px 26px 20px; border: 1px solid #efe8da; }
.login-card h3 { font-size: 19px; margin-bottom: 4px; }
.login-card form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.login-card label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.login-card input { font: 16px Inter, sans-serif; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; }
.login-card input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
#code { letter-spacing: 8px; font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.login-links { font-size: 13px; text-align: center; margin: 4px 0 0; }
.login-links a { color: var(--accent); }
.login-msg { min-height: 20px; font-size: 13px; color: var(--ink-2); margin: 12px 0 0; }
.login-msg.bad { color: var(--accent); }
.login-fine { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin: 14px 0 0; }
.google-btn { margin-top: 16px; gap: 10px; border-color: #d6dae1; }
.google-btn svg { width: 20px; height: 20px; }
.login-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 2px; color: var(--muted); font-size: 12.5px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 999px) {
  html:has(body.landing), body.landing { height: auto; overflow: auto; }
  .landing .topbar .brand span { display: inline; }
  .l-hero { grid-template-columns: 1fr; padding: 24px 16px 40px; gap: 24px; text-align: center; }
  .l-hero p.lead { margin-left: auto; margin-right: auto; font-size: 16px; }
  .l-cta { justify-content: center; }
  .l-cta .btn { flex: 1 1 200px; }
  .l-star { max-width: min(340px, 80vw); order: -1; }
  .l-section { padding: 40px 16px; }
  .l-steps { grid-template-columns: 1fr 1fr; gap: 12px; }
  .l-facts { grid-template-columns: 1fr; }
  .l-start { grid-template-columns: 1fr; gap: 20px; }
  .l-start h2 { text-align: center; }
  p.l-start-sub { text-align: center; }
  .l-start ul { max-width: 26em; margin: 0 auto; }
}
@media (max-width: 520px) { .l-steps { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- sharing ---------- */
.share-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.share-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.share-btn svg circle { fill: currentColor; stroke: none; }
.role-note { flex: none; background: var(--accent-soft); color: var(--accent-2); font-size: 13px; padding: 8px 20px; border-bottom: 1px solid #f1d3d5; }
.role-help { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); display: grid; gap: 4px; }
.share-add select, .share-row select { font: 13.5px Inter, sans-serif; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
dialog.share-dialog { max-width: 640px; }
dialog.share-dialog form { padding: 26px 30px; }
.share-add { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.share-add input { grid-column: 1 / -1; font: 15px Inter, sans-serif; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.share-add select { padding: 10px 8px; }
.share-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.why-email { font-size: 13px; color: var(--ink-2); }
.why-email summary { cursor: pointer; color: var(--accent); text-decoration: underline; width: fit-content; list-style: none; }
.why-email summary::-webkit-details-marker { display: none; }
.why-email p { margin: 6px 0 0; padding: 10px 12px; background: var(--bg); border-radius: 8px; line-height: 1.5; }
.share-list { display: grid; gap: 6px; max-height: 240px; overflow-y: auto; }
.share-row .who { flex: 1; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-card .meta .shared-tag { display: block; color: var(--accent); font-weight: 500; }
.proj-card .meta .shared-tag i { font-style: normal; }
.photo-tile.fixed { cursor: default; }
.photo-tile.fixed .tick { display: none; }
/* what an invitee can't do is hidden (the server refuses it anyway) */
body[data-role=view] #dropzone, body[data-role=view] .photo-bar button,
body:is([data-role=view], [data-role=photos]) #toPlaceBtn,
body:is([data-role=view], [data-role=photos]) #steps [data-step=place],
body:not([data-role=owner]) #steps [data-step=request],
body:not([data-role=owner]) #confirmBtn,
body:not([data-role=owner]) .account-usage, body:not([data-role=owner]) .account-usage-sep,
body[data-role=photos] #pickAll, body[data-role=photos] #pickUnused { display: none !important; }
@media (max-width: 999px) {
  dialog.share-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 24px); }
  dialog.share-dialog form { padding: 18px 16px; }
  .share-add { grid-template-columns: 1fr; }
  .share-add .btn { min-height: 44px; }
  .share-row { grid-template-columns: 1fr auto; }
  .share-row .who { grid-column: 1 / -1; }
  .share-btn { padding: 6px 8px; }
  .share-btn span, .role-note { font-size: 12px; }
  .role-note { padding: 6px 12px; }
}
/* inside a star the top bar is full (steps, progress, Share, Admin): the address is on the home page */

/* ---------- how-to video ("How-to video" in the top bar and on Your stars, "See how it works" on the landing page) ---------- */
.help-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.help-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.help-btn svg path { fill: currentColor; stroke: none; }
.steps.hidden ~ .help-btn { display: none; }                   /* home page: the button is in the page's upper right corner instead */
.home-top { display: flex; justify-content: flex-end; margin: 0 0 -8px; }
.home-top .help-btn { padding: 11px 20px; font-size: 15.5px; gap: 9px; border-radius: 999px; border: 1.5px solid var(--accent);
  background: var(--accent-soft); color: var(--accent); }
.home-top .help-btn:hover { background: #f7dfe1; border-color: var(--accent-2); color: var(--accent-2); }
.home-top .help-btn svg { width: 20px; height: 20px; }
.home-top .help-btn.pulse { animation: how-pulse .5s ease-out 3; }      /* when Your stars opens, until the video has been opened (app.js renderHome) */
/* no stars yet: the button under the intro, centred, solid and bigger */
#view-home.first:not(.hidden) { display: flex; flex-direction: column; }
#view-home.first .home-hero { order: 0; margin-bottom: 14px; }
#view-home.first .home-top { order: 1; justify-content: center; margin: 0 0 28px; }
#view-home.first .home-top .help-btn { padding: 15px 30px; font-size: 18px; gap: 11px; min-height: 56px; justify-content: center;
  background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(179, 38, 46, .28); }
#view-home.first .home-top .help-btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
#view-home.first .home-top .help-btn svg { width: 24px; height: 24px; }
#view-home.first .home-grid { order: 2; width: 100%; }
#view-home.first .account-line { order: 3; }
@keyframes how-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(179, 38, 46, .5); }
  45% { transform: scale(1.08); }
  100% { transform: scale(1); box-shadow: 0 0 0 16px rgba(179, 38, 46, 0); }
}
dialog.how-dialog { max-width: 1100px; width: calc(100% - 32px); background: #11151f; color: #fff; }
.how-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.how-head h2 { font-size: 16px; margin: 0; }
.how-dialog video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
@media (max-width: 999px) {
  .help-btn { padding: 6px 8px; }
  .steps:not(.hidden) ~ :is(.help-btn, .share-btn) { font-size: 0; gap: 0; }   /* in a star: icons only, the steps need the room */
  dialog.how-dialog { width: calc(100% - 16px); }
}

/* 3D preview: turn the selected point */
.turn-box { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.turn-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.turn-box p { margin: 0; }
/* the landing page: "why do we ask" right above the sign-in card */
.l-start .login-col { display: grid; gap: 10px; align-content: center; }

/* Place: first draft */
.draft-box { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.draft-box p { margin: 0; }
.draft-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.draft-progress { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.draft-progress .bar { height: 7px; background: #e9ebf0; border-radius: 4px; overflow: hidden; }
.draft-progress .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .4s; }
.tray-item .dup-tag { position: absolute; left: 3px; right: 3px; bottom: 3px; background: rgba(29,63,122,.88); color: #fff; font: 700 9px/1.2 Inter, sans-serif; padding: 2px 3px; border-radius: 6px; text-align: center; }

/* =================== one photo per side, and the simpler Place step (2026-10) =================== */
/* new star: the two ways to put photos on a point, as picture cards */
dialog.new-dialog { max-width: 620px; }
.layout-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.layout-pick legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 8px; }
.layout-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.layout-card:hover { border-color: #c9ced8; }
.layout-card input { position: absolute; opacity: 0; pointer-events: none; }
.layout-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: #f3f4f7; margin-bottom: 8px; }
.layout-card b { font-size: 14.5px; }
.layout-card span { font-size: 12.5px; color: var(--muted); }
.layout-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.layout-card:has(input:checked)::after { content: "✓"; position: absolute; top: 16px; right: 16px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.layout-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.layout-hint { margin-top: -4px !important; }
@media (max-width: 560px) { .layout-pick { gap: 10px; } .layout-card b { font-size: 13px; } .card-pic img { max-height: 34dvh; } }

/* photos: which way the photos go, and a Select mode instead of four buttons always on show */
.layout-line { margin: 6px 0 0 !important; font-size: 13px; color: var(--ink-2); }
.layout-line a { color: var(--accent); }
.select-tools { display: none; align-items: center; gap: 8px; flex-wrap: wrap; }
#view-photos.selecting .select-tools { display: inline-flex; }
#view-photos:not(.selecting) .photo-tile { cursor: default; }
#view-photos:not(.selecting) .photo-tile .tick { display: none; }
#view-photos.selecting #selectToggle { background: var(--ink); color: #fff; border-color: var(--ink); }

/* place */
#placeBtn.done-state, #phPlace.done-state { background: #e9f4ee; border-color: #cfe6d8; color: var(--ok); }
.draft-progress { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.draft-progress .bar { flex: 0 0 160px; height: 6px; background: #e9ebf0; border-radius: 3px; overflow: hidden; }
.draft-progress .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.draft-progress span { flex: 1; min-width: 0; }
.fill-offer { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 32px)); background: var(--panel); border-radius: 16px; padding: 22px 22px 16px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 10px; z-index: 2; }
.fill-offer h3 { font-size: 18px; margin: 0; }
.fill-offer p { margin: 0 0 4px; color: var(--ink-2); font-size: 13.5px; }
.pt-stepper { display: flex; align-items: center; gap: 8px; }
.pt-stepper > span { flex: 1; text-align: center; font-size: 15px; }
.pt-stepper .pb-nav { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 20px; line-height: 1; color: var(--ink); cursor: pointer; }
.pt-stepper .pb-nav:hover { border-color: #c9ced8; }
.all-points { border-top: 1px solid var(--line); padding-top: 8px; }
.all-points > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 2px 0 8px; }
.caption-box > summary small { font-weight: 400; margin-left: auto; margin-right: 10px; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the sides of the point in the star map: click one, or drop a photo on it */
svg .side-hit { fill: transparent; stroke: transparent; stroke-width: 6; cursor: pointer; pointer-events: all; outline: none; }
svg .side-hit:hover, svg .side-hit:focus-visible, body.dragging-photo svg .side-hit.drop { fill: rgba(179, 38, 46, .12); }
svg .side-hit.cur { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linejoin: round; paint-order: stroke; }
svg .side-hit.cur:hover { fill: rgba(179, 38, 46, .08); }
svg .side-hit.edited:not(.cur) { stroke: var(--gold); stroke-width: 1.1; stroke-dasharray: 2.5 1.5; }
svg .side-hit:not(.filled):not(.cur):not(.edited) { stroke: #9aa3b5; stroke-width: .5; stroke-dasharray: 1.6 1.2; }
body.dragging-photo svg .side-hit { fill: rgba(179, 38, 46, .05); }
body[data-layout=side] .net-view svg { height: 380px; }
@media (max-height: 820px) and (min-width: 1000px) { body[data-layout=side] .net-view svg { height: 300px; } }
.side-strip { display: none; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
.side-tab { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: 600 12.5px Inter, sans-serif; color: var(--ink-2); cursor: pointer; }
.side-tab img { width: 12px; height: 36px; object-fit: fill; background: #f3f4f7; border-radius: 2px; flex: none; }
.side-tab.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--ink); }
.side-tab.edited span::after { content: " •"; color: var(--gold); }
#toPlaceBtn { white-space: nowrap; flex: none; }

/* =================== captions, 3D star map, turning example points (2026-10-22) =================== */
#editSideCaptionBtn { align-self: flex-start; }
#sideCaptionText { font: 14px/1.45 Inter, sans-serif; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; width: 100%; resize: none; color: var(--ink); background: #fff; }
#sideCaptionText:focus { outline: none; border-color: var(--accent); }
.side-cap-note { font-weight: 400; }
.side-cap-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
/* the star map: flat net or the point in 3D */
.net-view .net3d { display: none; height: 300px; border-radius: 10px; background: radial-gradient(ellipse at 50% 45%, #ffffff 0%, #eceff3 85%); overflow: hidden; }
.net-view .net3d canvas { display: block; width: 100%; height: 100%; cursor: grab; outline: none; }
.net-view .net3d canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 10px; }
.net-view.is3d svg { display: none; }
.net-view.is3d .net3d { display: block; }
body[data-layout=side] .net-view .net3d { height: 380px; }
@media (max-height: 820px) and (min-width: 1000px) { .net-view .net3d { height: 240px; } body[data-layout=side] .net-view .net3d { height: 300px; } }
@media (max-width: 999px) { .net-view .net3d { height: 34dvh; } .preview-net .net3d { height: 40dvh; } }
/* New star: the example points turn slowly in 3D over their still pictures */
.card-pic { position: relative; display: block; margin-bottom: 8px; }
.card-pic img { margin-bottom: 0 !important; transition: opacity .3s; }
.card3d { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; pointer-events: none; }
.card3d canvas { display: block; width: 100%; height: 100%; }
.layout-card.live .card-pic img { opacity: 0; }
.layout-card.live .card-pic { background: radial-gradient(ellipse at 50% 45%, #ffffff 0%, #eceff3 85%); border-radius: 10px; }

/* =================== used in, fold lines (2026-10-22) =================== */
/* "Used in": the points the photo in the cropper is already on, in the margin left of the photo */
.used-in { position: absolute; left: 12px; top: 12px; z-index: 2; display: flex; flex-direction: column; gap: 6px; max-height: calc(100% - 60px); overflow: auto; }
.used-in > span { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #c4cad6; }
.used-list { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.used-chip { min-width: 52px; min-height: 30px; padding: 4px 10px; border: 1px solid rgba(255,255,255,.28); border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; font: 600 12.5px Inter, sans-serif; cursor: pointer; }
.used-chip:hover { background: rgba(255,255,255,.22); }
.used-chip.cur { background: #fff; color: var(--ink); border-color: #fff; cursor: default; }
@media (pointer: coarse) { .used-chip { min-height: 36px; } }
/* "Show all" (above Used in, and on review cards): the photo's other selections, dimmed; a switch on the dark cropper */
.switch.on-dark { color: #e6e9ef; font-weight: 500; }
.switch.on-dark span { background: rgba(255,255,255,.28); }
.show-all, .rvc-showall { min-height: 30px; padding: 4px 10px; border-radius: 9px; background: rgba(14,17,24,.55); }
.show-all { align-self: flex-start; }
.rvc-showall { position: absolute; left: 8px; top: 8px; z-index: 2; }
/* Show in 3D: a switch over the star map */
.map3d-sw { position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 5px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.92); }
@media (pointer: coarse) { .map3d-sw, .show-all, .rvc-showall { min-height: 40px; } }
/* fold lines: design tiles, colour, width */
.fold-note { margin: 2px 0 8px !important; }
.fold-designs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.fold-tile { display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; font: 500 11px Inter, sans-serif; color: var(--ink-2); }
.fold-tile canvas { width: 100%; height: auto; border-radius: 5px; display: block; }
.fold-tile.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--ink); }
.seg { display: inline-flex; background: #e9ebf0; border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 7px; padding: 5px 12px; font: 600 12.5px Inter, sans-serif; color: var(--ink-2); cursor: pointer; }
.seg button.sel { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* =================== caption review (3D preview) =================== */
.preview-main { display: flex; flex-direction: column; gap: 12px; }
.review-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.review-btns .btn { padding: 9px 8px; }
.review { display: flex; flex-direction: column; gap: 8px; min-height: 100%; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: -14px; z-index: 2; margin: -14px -14px 0; padding: 14px 14px 8px; background: var(--panel); border-bottom: 1px solid var(--line); }
.review h3 { margin: 4px 0 0; font-size: 17px; }
#reviewDone { position: sticky; bottom: 0; box-shadow: 0 -14px 0 4px var(--panel), 0 14px 0 4px var(--panel); margin-top: auto; }
@media (max-width: 999px) { .review-head { top: -12px; margin: -12px -16px 0; padding: 12px 16px 8px; } }

/* =================== review grids: all selections (Place), captions (3D preview) =================== */
.rvg { --card: 340px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--card), 100%), 1fr)); gap: 14px; align-items: start; }
.rvg[data-size="S"] { --card: 240px; }
.rvg[data-size="L"] { --card: 520px; }
.rvc { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.rvc.drop { box-shadow: 0 0 0 2px var(--accent); }
.rvc.cur { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.rvc-head { display: flex; align-items: baseline; gap: 8px; padding: 9px 12px 7px; min-width: 0; }
.rvc-head b { font-size: 14px; white-space: nowrap; }
.rvc-where { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.rvc-state { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.rvc-state.saved { background: #e9f4ee; color: var(--ok); }
.rvc-state.changed { background: #fff3dc; color: var(--warn); }
.rvc-state.empty { background: #eef0f4; color: var(--muted); }
.rvc-state.locked { background: #eef0f4; color: var(--ink-2); }
.rvc.locked .rvc-crop canvas { cursor: default; }
/* a selection card: the cropper, and the result beside it */
.rvc-body { display: grid; grid-template-columns: minmax(0, 1fr) 30%; gap: 0; background: #2a2f3a; }
.rvc-crop { position: relative; aspect-ratio: 4 / 3; }
.rvc-crop canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.rvc.editing .rvc-crop canvas { touch-action: none; }
.rvc.editing { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.rvc-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #aab1c0; font-size: 13px; }
.rvc-result { position: relative; background: #f3f4f7; overflow: hidden; }
.rvc-result img, .rvc-result svg { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }
.rvc-result .tab { fill: #e2e4e9; }
.rvc-result .face-outline { fill: none; stroke: rgba(160,168,182,.7); stroke-width: .35; }
.rvc-tools { display: flex; align-items: center; gap: 8px; padding: 8px 10px; flex-wrap: wrap; }
.rvc-tools .rotate-ctl button { min-width: 32px; font-size: 14px; }
/* the Place step in review mode: the grid replaces the cropper, the panel replaces the star map */
.selrev, .selrev-panel { display: none; }
body.selreview .center-col > :not(#selRev) { display: none !important; }
body.selreview .map-col > :not(#selPanel) { display: none !important; }
body.selreview .selrev { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: auto; gap: 8px; padding-bottom: 20px; }
body.selreview .selrev-panel { display: flex; flex-direction: column; gap: 10px; }
.selrev-panel h3 { margin: 0; font-size: 17px; }
.selrev-bar { display: none; }
.selrev-counts { display: none; margin: 0; }
.rv-size button { display: grid; place-items: center; padding: 5px 10px; }
.rv-size svg { width: 16px; height: 16px; fill: currentColor; }
/* the 3D preview in caption review: big cards on the left, the star small on the right */
.caprev { overflow: auto; padding: 16px 18px 24px; background: var(--bg); min-height: 0; }
.cap-stage { height: 260px; border-radius: 12px; overflow: hidden; flex: none; }
.cap-stage .stage { height: 100%; border-radius: 12px; }
.cap-stage .stage-hint { display: none; }
.rv-ring { grid-column: 1 / -1; margin: 6px 0 -4px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cap-vis { background: #f3f4f7; display: grid; place-items: center; padding: 10px; cursor: pointer; }
.cap-vis svg { width: 100%; aspect-ratio: 4 / 3; height: auto; }
.cap-vis .tab { fill: #e2e4e9; }
.cap-vis .face-outline { fill: none; stroke: rgba(160,168,182,.7); stroke-width: .35; }
.cap-card.side .cap-vis img { width: auto; max-width: 70%; height: auto; max-height: calc(var(--card) * 0.9); display: block; }
.cap-vis img.flip { transform: rotate(180deg); }
.cap-field { padding: 10px 12px 12px; }
.rvc.cap-card .rv-input { width: 100%; }
.rv-input { font: 15px/1.4 Inter, sans-serif; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); min-width: 0; resize: none; }
.rv-input:focus { outline: none; border-color: var(--accent); }
.cap-card.locked { opacity: .65; }
@media (min-width: 1000px) { body.reviewing .preview-layout { grid-template-columns: minmax(0, 1fr) 380px; } }
@media (max-width: 999px) {
  /* phones: cards fill the width (Large 1 per row, Medium 2, Small 3); pinch the grid to change; a bar on top */
  .rvg { gap: 10px; }
  .rvg[data-size="L"] { grid-template-columns: 1fr; }
  .rvg[data-size="M"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rvg[data-size="S"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rvg[data-size="S"] .rvc-where, .rvg[data-size="S"] .rvc-tools, .rvg[data-size="M"] .rvc-where { display: none; }
  .rvg[data-size="S"] .rvc-body, .rvg[data-size="M"] .rvc-body { grid-template-columns: 1fr; }
  .rvg[data-size="S"] .rvc-result, .rvg[data-size="M"] .rvc-result { display: none; }
  body.selreview .selrev { order: 1; padding: 0 10px 20px; }
  body.selreview .tray { order: 2; }
  .selrev-bar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 8px 0; }
  .selrev-bar .rv-size { margin: 0 auto; }
  .selrev-counts { display: block; }
  body.selreview .phone-bar, body.selreview .point-bar, body.selreview .side-strip { display: none !important; }
  body.reviewing .preview-layout { display: flex; flex-direction: column; }
  body.reviewing .caprev { order: 2; padding: 10px 10px 20px; }
  body.reviewing .preview-side { order: 1; }
  .cap-stage { height: 30dvh; }
  .rv-input { font-size: 16px; }
}
@media (max-width: 999px) {
  /* phones: Done stays on screen while the cards scroll */
  body.reviewing #reviewDone { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; z-index: 20; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  body.reviewing .caprev { padding-bottom: 84px; }
}

/* selection review cards as the size icons show: Large 1 per screen, Medium 2 x 2, Small 3 x 3 (sizes set in app.js) */
#selGrid { display: flex; flex-wrap: wrap; gap: 14px; align-content: flex-start; }
#selGrid .sel-card { flex: none; width: var(--card-w, 320px); height: var(--card-h, 300px); }
#selGrid .rvc-body { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) 30%; }
#selGrid .rvc-crop { aspect-ratio: auto; height: 100%; }
@media (max-width: 999px) {
  #selGrid[data-size="M"] .rvc-result { display: block; }
  #selGrid[data-size="M"] .rvc-body { grid-template-columns: minmax(0, 1fr) 30%; }
  #selGrid[data-size="S"] .rvc-body { grid-template-columns: 1fr; }
}
/* caption review: the other kind of caption on this spot, with one-click actions */
.cap-other { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -4px 12px 12px; padding: 8px 10px; border-radius: 9px; background: var(--bg); font-size: 12.5px; color: var(--ink-2); }
.cap-other .co-text { flex: 1 1 180px; }
.co-edit { display: flex; align-items: center; gap: 6px; flex: 1; font-weight: 600; }
.co-edit input { flex: 1; min-width: 0; font: 14px Inter, sans-serif; padding: 5px 8px; border: 1px solid var(--accent); border-radius: 7px; }

/* review cards: just the cropper (the result wedge is gone) */
#selGrid .rvc-body { grid-template-columns: 1fr !important; }
/* Open: one selection in the full cropper, the whole screen */
dialog.full-edit { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; padding: 0; background: var(--bg); }
dialog.full-edit[open] { display: flex; flex-direction: column; }
.fe-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--panel); border-bottom: 1px solid var(--line); }
.fe-head b { font-size: 16px; }
.fe-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.fe-body .cropper { flex: 1; min-height: 0; display: block !important; border-radius: var(--radius); }
.fe-body .crop-tools { display: flex !important; flex-wrap: wrap; }
.fe-body #placeBtn { display: none; }
.fe-body .crop-tools .rotate-ctl { display: inline-flex !important; }
/* point caption review: one caption for many points */
.cap-bulk { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fcfcfd; }
.cap-bulk label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cap-bulk input { font: 14px Inter, sans-serif; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.cap-bulk input:focus { outline: none; border-color: var(--accent); }
.cap-bulk-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cap-bulk-btns .btn { white-space: normal; line-height: 1.25; }
@media (max-width: 999px) { .cap-bulk input { font-size: 16px; } }

/* ---- 2026-10-23: the first draft as the main way on, one star map component, messages that don't cover controls ---- */
/* home: the How-to video sits with the intro, not alone in a corner */
.home-hero .home-top { justify-content: center; margin: 14px 0 0 !important; }
#view-home.first .home-hero .home-top { margin: 18px 0 6px !important; }

/* Photos: the way on (Place them for me / I'll place them myself) */
.next-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.next-actions .btn.pulse, .done-banner .btn.pulse { animation: how-pulse .5s ease-out 3; }
.rights-line { margin: 8px 2px 0; }
.rights-line a { color: inherit; }

/* the first draft runs from any step: a card under the top bar */
.draft-progress { position: fixed; top: calc(64px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 45;
  width: min(560px, calc(100% - 24px)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center;
  padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 34px rgba(16, 24, 40, .16); }
.draft-progress b { font-size: 14px; color: var(--ink); }
.draft-progress .bar { grid-column: 1 / -1; grid-row: 2; flex: none; height: 6px; }
.draft-progress span { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); }
.draft-progress .btn { grid-column: 2; grid-row: 1; }
.draft-dialog .draft-ask-warn { font-size: 13px; background: #fff6dd; border-radius: 8px; padding: 8px 10px; color: #6b4a00; }

/* Place: while placing them for you is offered, nothing else asks for attention */
#view-place.offering .crop-tools, #view-place.offering .phone-bar { visibility: hidden; }

/* 3D preview: after a first draft */
.draft-ready { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--radius); background: linear-gradient(90deg, #eaf6ef, #fdf6e4);
  border: 1.5px solid #9fd0b2; animation: done-in .35s ease-out; font-size: 13px; color: var(--ink-2); }
.draft-ready b { font-size: 15px; color: var(--ink); }
.draft-ready-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }

/* the star map's point picker (Place and 3D preview): ‹ L07 large point › and every point in rows by level */
.point-picker { display: grid; gap: 8px; }
.pp-step { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pp-now { text-align: center; font-size: 13px; color: var(--ink-2); }
.pp-now b { font-size: 16px; color: var(--ink); }
.pp-key { margin: 0; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pp-key span { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.pp-key span:first-child { margin-left: 0; }
.pp-key .k-done { background: #e3f1e8; border: 1px solid #a9d3b9; }
.pp-key .k-cur { background: var(--accent); }
.chip.small { border-style: solid; font-size: 10px; color: var(--muted); }
.chip.done { background: #e3f1e8; color: #1f5a37; border-color: #a9d3b9; }
.chip.done::after { content: none; }
.chip.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip.staged { background: #fff6dd; border: 1.5px dashed var(--gold); color: #7a5200; }
.chip.locked::before { top: -6px; left: -3px; }
@media (max-width: 999px) { #placePicker .pp-step { display: none; } }

/* messages: over the top bar, never over the controls people are using (they let clicks through) */
.toast { top: calc(10px + env(safe-area-inset-top)); bottom: auto; transform: translate(-50%, -16px); box-shadow: 0 8px 26px rgba(16, 24, 40, .22); }
.toast.show { transform: translate(-50%, 0); }
body[data-view] .toast { bottom: auto; }

/* Request: we make it / you make it yourself */
.approve span { line-height: 1.45; }
.approve a { color: var(--accent); }

/* the terms page */
.legal { max-width: 760px; margin: 0 auto; padding: 32px 20px 56px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.legal h1 { font: 700 34px/1.15 "Playfair Display", Georgia, serif; color: var(--ink); margin: 0 0 6px; }
.legal h2 { font-size: 18px; color: var(--ink); margin: 28px 0 6px; }
.legal li { margin: 6px 0; }
.legal b { color: var(--ink); }
/* the legal texts from legal/ (Impressum, privacy policy, terms of sale) */
.legal h3 { font-size: 15.5px; color: var(--ink); margin: 20px 0 4px; }
.legal h4 { font-size: 15px; color: var(--ink-2); margin: 16px 0 2px; }
.legal a { color: var(--accent); overflow-wrap: anywhere; }
.legal-binding { border-left: 3px solid var(--line); padding-left: 10px; }
.legal mark.todo { background: #fff1b8; color: #6b4e00; padding: 0 4px; border-radius: 3px; font-weight: 600; }
.legal-links a { white-space: nowrap; }
.login-fine + .login-fine { border-top: 0; padding-top: 0; margin-top: 8px; }
.login-fine a { color: inherit; }

.choice input[type=radio], .approve input[type=checkbox] { flex: none; width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--accent); }
.choice span { text-align: left; }
.howto a, .cut-layout a { color: var(--accent); }

/* landing: the star in a night window, lit warm from inside, large (2026-10-23: it was small, grey and low in contrast) */
.l-hero { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); max-width: 1240px; }
.l-star { max-width: 620px; border-radius: 28px; overflow: hidden; isolation: isolate;
  background: radial-gradient(circle at 50% 47%, rgba(255, 220, 150, .50) 0%, rgba(232, 176, 70, .20) 24%, rgba(29, 42, 68, 0) 56%),
              radial-gradient(circle at 50% 120%, rgba(179, 38, 46, .30), rgba(179, 38, 46, 0) 55%),
              linear-gradient(165deg, #22324f 0%, #141d31 55%, #0d1322 100%);
  box-shadow: 0 30px 70px rgba(13, 19, 34, .35), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.l-star::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image: radial-gradient(1.2px 1.2px at 12% 18%, #fff8, transparent), radial-gradient(1px 1px at 82% 12%, #fff9, transparent),
    radial-gradient(1.4px 1.4px at 90% 64%, #fff6, transparent), radial-gradient(1px 1px at 8% 76%, #fff7, transparent),
    radial-gradient(1px 1px at 28% 92%, #fff5, transparent), radial-gradient(1.2px 1.2px at 70% 88%, #fff6, transparent); }
.l-star img { opacity: 0; }
.l-star.no3d img { opacity: 1; }
.l-star-name { bottom: 12px; font-size: 12px; color: #f3dca4; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); transition: opacity .6s ease; }
/* each example in a layer of its own: the next fades in over the last (landing.js FADE) */
.l-view { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease-in-out; }
.l-view.on { opacity: 1; }
/* the example's name: quiet serif in soft gold over a fine gold rule, above the invitation */
.l-star-product { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; text-align: center; pointer-events: none;
  font: italic 500 21px/1.2 "Playfair Display", Georgia, serif; letter-spacing: .01em; color: #f6e7c1;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .55); transition: opacity .6s ease; }
.l-star-product:not(:empty)::after { content: ""; display: block; width: 34px; height: 1px; margin: 7px auto 0;
  background: linear-gradient(90deg, transparent, #d7a326, transparent); }
.l-star-product.dim, .l-star-name.dim { opacity: 0; }
.l-star-product span { display: block; margin-top: 2px; font: 500 11px/1.3 Inter, sans-serif; font-style: normal; letter-spacing: .06em;
  color: rgba(246, 231, 193, .72); }
.l-foot a { color: inherit; }
.login-card .why-email { margin-top: 14px; }
@media (max-width: 999px) {
  .l-hero { grid-template-columns: 1fr; }
  .l-star { max-width: min(460px, 100%); border-radius: 22px; }
  .l-star-product { font-size: 18px; bottom: 12px; }
  .l-kicker { font-size: clamp(9px, 2.7vw, 12.5px); letter-spacing: .05em; white-space: nowrap; }   /* the promise on one line */
}

/* New star: under each turning point, what goes on it (one photo round it / four different ones) */
.card-pic { position: relative; display: block; }
.card-src { position: absolute; left: 8px; top: 8px; max-width: calc(100% - 16px); display: flex; align-items: center; gap: 8px; padding: 5px 9px 5px 5px;
  background: rgba(255, 255, 255, .92); border-radius: 9px; box-shadow: 0 1px 6px rgba(16, 24, 40, .12); pointer-events: none; }
.layout-card .card-src img, .layout-card.live .card-src img { opacity: 1; visibility: visible; display: block; flex: none; width: auto; height: 46px; aspect-ratio: auto; margin: 0; border-radius: 4px; object-fit: contain; background: none; }
.layout-card .card-src small { font-size: 11.5px; font-weight: 600; color: var(--ink-2); line-height: 1.2; max-width: 8em; }
@media (max-width: 560px) { .layout-card .card-src img { height: 34px; } .layout-card .card-src small { font-size: 10.5px; } }

/* Review all selections: a card waiting for a photo from "Your photos" (Change photo), flips per card */
.rvc.picking { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.rvc.picking .rvc-crop::after { content: "Click a photo in Your photos"; position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  background: rgba(255, 255, 255, .95); color: var(--ink); font: 600 12.5px Inter, sans-serif; padding: 5px 12px; border-radius: 12px; box-shadow: var(--shadow); white-space: nowrap; pointer-events: none; }
.rvc-crop { position: relative; }
body.picking-photo .tray-item { outline: 2px solid var(--gold); outline-offset: -2px; }
body.picking-photo .tray-item img { filter: none; opacity: 1; }
.rvc-tools .rotate-ctl button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.rvc-tools [data-f][aria-pressed="true"] { background: var(--ink); color: #fff; }
.rvc-swap[aria-pressed="true"] { border-color: var(--gold); background: #fff6dd; }
@media (max-width: 999px) { .rvc.picking .rvc-crop::after { content: "Tap a photo in Your photos"; } }
.draft-dups { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; margin: 0; }
.draft-dups legend { font-weight: 700; font-size: 13.5px; padding: 0 4px; }
.draft-dups .check { font-size: 13px; align-items: flex-start; }

/* 3D preview: the caption reviews side by side on one row, Review all selections on its own row below */
#previewSelBtn { grid-column: 1 / -1; }
.review-btns:has(#reviewSidesBtn.hidden) #reviewPointsBtn { grid-column: 1 / -1; }

/* ---- the three stars side by side, turning, to scale against one ruler (New star sheet, Choose your star) */
dialog.new-dialog:has(#newStep1:not(.hidden)) { max-width: 700px; }
.star-pick { border: 0; padding: 0; margin: 0; }
.star-pick legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 8px; }
.star-row { display: flex; align-items: flex-start; gap: 10px; }
.ruler-col { flex: none; padding-top: 7px; }          /* 0 cm sits level with the bottom of the stars */
.ruler line { stroke: var(--muted); stroke-width: 1; }
.ruler text { font: 500 10px Inter, sans-serif; fill: var(--muted); }
.ruler text.unit { font-size: 9px; }
.star-card { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: center;
  transition: box-shadow .15s, border-color .15s; }
.star-card:hover { border-color: #c9ced8; }
.star-card input { position: absolute; opacity: 0; pointer-events: none; }
.star-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.star-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.star-col { width: 100%; display: flex; align-items: flex-end; margin-bottom: 8px; }
.star-stage { position: relative; display: block; width: 100%; overflow: hidden; }
.star-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.star-card b { font-size: 14px; }
.star-card .star-note { font-size: 12px; color: var(--muted); line-height: 1.35; }
.star-card .view3d { margin-top: 6px; padding: 4px 10px; border: 0; border-radius: 999px; background: var(--accent-soft, #f6e7e9);
  color: var(--accent); font: 600 12px Inter, sans-serif; cursor: pointer; }
.star-card .view3d:hover { filter: brightness(.96); }
.star-card .view3d:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
dialog.star3d-dialog { max-width: 760px; }
.s3-stage { position: relative; height: min(60vh, 560px); border-radius: 12px; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #ffffff, #f1f2f5); }
.s3-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.s3-hint { text-align: center; }
.star-card .view3d { white-space: nowrap; }
@media (max-width: 599px) { .star-card .view3d { padding: 4px 8px; font-size: 11.5px; } }
@media (max-width: 999px) {
  dialog.star3d-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  dialog.star3d-dialog form { height: 100%; box-sizing: border-box; justify-content: center;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  .s3-stage { height: min(calc(100vw - 32px), 62vh); }
  dialog.star3d-dialog .dialog-actions .btn { flex: 1; }
}
.star-all { position: relative; display: flex; flex-direction: column; gap: 2px; margin-top: 12px; padding: 12px 14px;
  border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.star-all:hover { border-color: #c9ced8; }
.star-all input { position: absolute; opacity: 0; pointer-events: none; }
.star-all b { font-size: 14.5px; }
.star-all span { font-size: 12.5px; color: var(--muted); }
.star-all:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.compare { max-width: 980px; margin: 0 auto; padding: 24px 20px 40px; }
.compare h2 { font-size: 20px; margin: 0 0 4px; }
.compare > p { margin: 0 0 18px; max-width: 640px; }
.compare-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
@media (max-width: 999px) {
  .star-row { gap: 6px; }
  .star-card { padding: 8px 4px 10px; }
  .star-card b { font-size: 12.5px; }
  .compare { padding: 16px 16px 96px; }
  .compare-actions { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.94); border-top: 1px solid var(--line); margin: 0; }
  .compare-actions .btn { width: 100%; }
}
#compareAgainBtn { grid-column: 1 / -1; }

/* ---- language: English / Deutsch, a quiet two-part switch (landing and terms footer, account menu) */
.lang-switch { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(120, 128, 140, .12); vertical-align: middle; }
.lang-switch button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 4px 10px;
  background: transparent; color: var(--muted); font: 500 12px Inter, sans-serif; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--ink, #1d2433); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.lang-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lang-switch .flag { width: 16px; height: auto; border-radius: 2px; box-shadow: 0 0 0 .5px rgba(0,0,0,.18); }
.l-foot .lang-switch { margin-left: 10px; }
.account-pop .lang-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.account-pop .lang-row small { color: var(--muted); font-size: 11.5px; }
.home-foot { margin-top: 28px; background: transparent; border-top: 1px solid var(--line); }
#view-home .home-foot { order: 4; }          /* last, also where the phone layout orders the home page */
/* in a star the top bar is full (German labels are longer): make room for the flags and the account button */
@media (max-width: 1600px) { .steps:not(.hidden) ~ .progress-pill span { display: none; } }
@media (max-width: 1366px) { .steps:not(.hidden) ~ :is(.help-btn, .share-btn) { font-size: 0; gap: 0; } }
@media (max-width: 480px) {
  .topbar:has(.steps:not(.hidden)) { gap: 6px; }
  .steps button.active { font-size: 0; gap: 0; }
  .steps button { padding: 6px 8px; }
  .lang-flags button { width: 26px; }
  .lang-flags .flag { width: 17px; }
}
@media (max-width: 380px) {
  .topbar:has(.steps:not(.hidden)) { gap: 4px; padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
  .steps button { padding: 6px 6px; }
  .steps:not(.hidden) ~ :is(.help-btn, .share-btn) { padding: 6px 6px; }
}

/* Delete all my photos (account menu) */
dialog.wipe-dialog { max-width: 560px; }
.wipe-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wipe-lists h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.wipe-lists ul { margin: 0; padding-left: 18px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.wipe-ok { font-weight: 500; }
@media (max-width: 520px) { .wipe-lists { grid-template-columns: 1fr; } }

/* Place: Change this photo (a photo picker) */
dialog.photo-picker { max-width: 860px; width: calc(100% - 32px); }
dialog.photo-picker form { max-height: calc(100dvh - 48px); }
.pp-body { overflow: auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.pp-body h3 { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.pp-item { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; }
.pp-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 2px solid transparent; display: block; background: #eceef1; }
.pp-item:hover img, .pp-item:focus-visible img { border-color: var(--accent); }
.pp-item.cur img { border-color: var(--ink); opacity: .6; }
.pp-item small { font-size: 11.5px; color: var(--muted); line-height: 1.25; min-height: 1em; }
@media (max-width: 520px) { .pp-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }

/* Add new project: star or ornament (step 0), each turning slowly in plain paper */
.family-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.family-pick legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 8px; }
.family-card { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.family-card:hover { border-color: #c9ced8; }
.family-card input { position: absolute; opacity: 0; pointer-events: none; }
.family-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.family-card:has(input:checked)::after { content: "✓"; position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.family-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.family-card b { font-size: 15px; }
.family-card > span:last-child { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.fam-stage { position: relative; display: block; width: 100%; height: 190px; margin-bottom: 8px; border-radius: 10px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #ffffff 0%, #eceff3 85%); }
.fam-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.fam-tag { align-self: flex-start; font-size: 11.5px !important; font-weight: 600; color: var(--ink-2) !important; background: #eef0f3;
  border-radius: 999px; padding: 2px 9px; margin: 2px 0 4px; }
.fam-tag.easy { color: var(--ok, #2e7d4f) !important; background: #e7f3ec; }
@media (max-width: 560px) { .family-pick { gap: 10px; } .fam-stage { height: 130px; } .family-card b { font-size: 14px; } }
/* five ornaments side by side: a wider sheet; on phones three to a row, without the ruler */
dialog.new-dialog:has(#newStars.orn) { max-width: 860px; }
@media (max-width: 599px) {
  .star-row.orn { flex-wrap: wrap; }
  .star-row.orn .ruler-col { display: none; }
  .star-row.orn .star-card { flex: 1 1 30% !important; }
}
