/* Candour Tribute Video — shared styles. Follows the Candour style guide: Poppins, sharp corners, Dark 50 buttons, sage neutrals. */
:root {
  --ground: #f5f7f2;
  --surface: #ffffff;
  --ink: #23281f;
  --ink-2: #5b6356;
  --rule: #cfd8c7;
  --rule-soft: #e4eadf;
  --dark: #3f4640;
  --dark-ink: #ffffff;
  --leaf: #5e8a52;
  --leaf-soft: #e6efe1;
  --danger: #8a3a2e;
  --danger-soft: #f4e4e0;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: "Poppins", "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--leaf); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
h2 { font-size: 1.15rem; }
p { margin: 0 0 12px; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.eyebrow { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }

.wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px 80px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0 18px; border-bottom: 1px solid var(--rule); margin-bottom: 22px; }
.wordmark { font-weight: 600; letter-spacing: 0.02em; text-decoration: none; }
.wordmark span { color: var(--ink-2); font-weight: 400; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border: 1px solid var(--dark); background: var(--dark); color: var(--dark-ink); font-weight: 500; text-decoration: none; border-radius: 0; min-height: 46px; }
.btn:hover { background: #2f352f; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--rule); }
.btn.secondary:hover { background: var(--ground); }
.btn.big { width: 100%; font-size: 1.05rem; min-height: 56px; }
.btn.danger { background: var(--surface); color: var(--danger); border-color: var(--rule); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.small { padding: 8px 12px; min-height: 36px; font-size: 0.875rem; }
.textlink { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--leaf); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
.textlink::after { content: " →"; }

.card { background: var(--surface); border: 1px solid var(--rule); padding: 18px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.field { display: grid; gap: 6px; }
.field > label { font-size: 0.8rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0.04em; text-transform: uppercase; }
.field input, .field textarea, .field select { padding: 11px 12px; border: 1px solid var(--rule); background: var(--surface); border-radius: 0; width: 100%; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--leaf); outline-offset: 1px; border-color: var(--leaf); }
.field input[type=radio], .field input[type=checkbox] { width: 1.1rem; height: 1.1rem; padding: 0; margin: 0; border: 0; flex: none; accent-color: var(--leaf); }
.field .row { row-gap: 8px; }
.note { background: var(--leaf-soft); border-left: 4px solid var(--leaf); padding: 12px 14px; }
.film { background: #000; border: 1px solid var(--rule); aspect-ratio: 16 / 9; }
.film iframe { width: 100%; height: 100%; border: 0; display: block; }
.film video { width: 100%; height: 100%; display: block; }
.warn { background: var(--danger-soft); border-left: 4px solid var(--danger); padding: 12px 14px; }
.note { background: var(--leaf-soft); border-left: 4px solid var(--leaf); padding: 12px 14px; }
.film { background: #000; border: 1px solid var(--rule); aspect-ratio: 16 / 9; }
.film iframe { width: 100%; height: 100%; border: 0; display: block; }
.film video { width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

/* Upload queue */
.queue { display: grid; gap: 8px; }
.qitem { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--rule); padding: 8px 10px; }
.qitem img { width: 56px; height: 56px; object-fit: cover; background: var(--rule-soft); }
.qitem .name { font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qitem .state { display: grid; gap: 6px; justify-items: end; text-align: right; max-width: 160px; }
.qresume { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; }
.bar { height: 6px; background: var(--rule-soft); margin-top: 6px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--leaf); transition: width 0.2s; }
.tick { color: var(--leaf); font-weight: 600; }

/* Slide grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 6px; } }
.tile { position: relative; background: var(--surface); border: 1px solid var(--rule); aspect-ratio: 1; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.tile .num, .tile .vid, .tile .cap, .tile .first { pointer-events: none; }
.tile .first { position: absolute; top: 6px; right: 6px; background: var(--leaf); color: #fff; font-size: 0.66rem; font-weight: 500; letter-spacing: 0.03em; padding: 2px 6px; }
.howto { display: grid; gap: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); }
.howto b { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; background: var(--leaf); color: #fff; border-radius: 50%; font-size: 0.8rem; margin-right: 8px; }
.thanks { background: var(--leaf-soft); border-left: 4px solid var(--leaf); padding: 14px; }
.tile .num { position: absolute; top: 6px; left: 6px; background: rgba(35,40,31,0.85); color: #fff; font-size: 0.7rem; font-weight: 500; padding: 2px 6px; }
.tile .vid { position: absolute; bottom: 6px; left: 6px; background: rgba(35,40,31,0.85); color: #fff; font-size: 0.7rem; padding: 2px 6px; }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.92); color: var(--ink); font-size: 0.72rem; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.is-hidden { opacity: 0.45; }
.tile.is-hidden::after { content: "Removed"; position: absolute; inset: auto 6px 6px auto; background: var(--danger); color: #fff; font-size: 0.7rem; padding: 2px 6px; }
.tile.pending { cursor: default; }
.tile.pending img { opacity: 0.55; }
.tile.pending .pbar { position: absolute; left: 0; bottom: 0; height: 4px; width: var(--p, 0%); background: var(--leaf); transition: width 0.3s; }
.tile.pending.failed .pbar { background: var(--danger); width: 100%; }
.tile.sortable-ghost { opacity: 0.3; }
.tile.sortable-chosen { outline: 2px solid var(--leaf); }

/* Sheet for editing a slide */
.sheet-bg { position: fixed; inset: 0; background: rgba(35,40,31,0.5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 18px 18px 26px; border-top: 3px solid var(--dark); }
.sheet > img { width: 100%; max-height: 40vh; object-fit: contain; background: var(--ground); display: block; margin-bottom: 12px; }
@media (max-width: 640px) {
  .sheet-bg { align-items: flex-end; padding: 0; }
  .sheet { max-height: 92dvh; padding-bottom: max(26px, env(safe-area-inset-bottom)); }
}
.trim video { width: 100%; max-height: 44vh; background: #000; display: block; }
.trim audio { width: 100%; display: block; }
.tracktitle { margin: 0; font-weight: 500; }
.trimbar { position: relative; height: 44px; margin: 4px 14px 2px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.trimbar .track { position: absolute; left: 0; right: 0; top: 19px; height: 6px; background: var(--rule); }
.trimbar .range { position: absolute; top: 19px; height: 6px; background: var(--leaf); }
.trimbar .playhead { position: absolute; top: 12px; width: 2px; height: 20px; margin-left: -1px; background: var(--ink); pointer-events: none; }
.trimbar .handle { position: absolute; top: 8px; width: 28px; height: 28px; margin-left: -14px; padding: 0; border-radius: 50%; border: 3px solid #fff; background: var(--leaf); box-shadow: 0 1px 4px rgba(35,40,31,0.4); cursor: grab; }
.trimbar .handle.end { background: var(--dark); }
.trimbar .handle:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
.trimrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.trimrow .small b { font-weight: 600; font-variant-numeric: tabular-nums; }
.trimrow .btn { flex: none; }
/* The opening-card frame over the hero photo */
.focus { position: relative; display: inline-block; justify-self: start; max-width: 100%; line-height: 0; overflow: hidden; background: var(--ground); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.focus img { display: block; max-width: 100%; max-height: 44vh; -webkit-user-drag: none; }
.focus .dim { position: absolute; background: rgba(35,40,31,0.55); pointer-events: none; }
.focus .frame { position: absolute; box-sizing: border-box; border: 3px solid #fff; outline: 1px solid rgba(35,40,31,0.6); pointer-events: none; }
.focus .frame::after { content: "Opening card"; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); background: rgba(35,40,31,0.85); color: #fff; font-size: 0.7rem; letter-spacing: 0.04em; padding: 2px 8px; white-space: nowrap; }
.focus.is-flat { cursor: default; }
.focus.is-flat .dim { display: none; }
.focus.is-flat .frame::after { content: "Opening card · the whole photo shows"; }

/* Staff table */
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; background: var(--surface); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
th { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); background: var(--ground); border-bottom: 1px solid var(--rule); }
.pill { display: inline-block; padding: 2px 8px; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; background: var(--leaf-soft); color: var(--ink); }
.pill.locked { background: var(--rule-soft); }
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--dark); color: #fff; padding: 10px 16px; font-size: 0.9rem; z-index: 60; }
#qr img, #qr canvas { border: 1px solid var(--rule); background: #fff; padding: 8px; }

.choice { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; }

/* Preview and Style panel */
.preview { background: #000; border: 1px solid var(--rule); position: relative; }
.preview canvas { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; }
.preview .loadingtag { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 6px 12px; background: rgba(35,40,31,0.7); color: #fff; font-size: 0.85rem; pointer-events: none; }
.preview .sketchtag { position: absolute; top: 8px; left: 8px; padding: 3px 8px; background: rgba(35,40,31,0.7); color: #fff; font-size: 0.7rem; letter-spacing: 0.04em; pointer-events: none; }
.sketchnote { margin: 0; padding: 8px 12px; background: var(--leaf-soft); border-left: 3px solid var(--leaf); }
/* Full screen: the canvas letterboxed on black, controls that appear on hover or tap */
.preview .fsbar { display: none; }
.preview.is-fs, .preview.is-fill { display: flex; align-items: center; justify-content: center; background: #000; border: 0; }
.preview.is-fill { position: fixed; inset: 0; z-index: 60; }
.preview.is-fs canvas, .preview.is-fill canvas { width: auto; height: auto; max-width: 100%; max-height: 100%; aspect-ratio: 16 / 9; }
.preview.is-fs:fullscreen canvas, .preview.is-fs:-webkit-full-screen canvas { width: 100vw; max-height: 100vh; }
.preview.is-fs .fsbar, .preview.is-fill .fsbar { display: flex; align-items: center; gap: 10px; position: absolute; left: 0; right: 0; bottom: 0; padding: 12px max(16px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,0.7)); opacity: 0; transition: opacity 0.2s; }
.preview.is-fs:hover .fsbar, .preview.is-fill:hover .fsbar, .preview.is-fs:focus-within .fsbar, .preview.is-fill:focus-within .fsbar, .preview.show-bar .fsbar { opacity: 1; }
.preview .fsbar input[type=range] { flex: 1; accent-color: var(--leaf); }
.preview .fsbar .time { color: #fff; font-variant-numeric: tabular-nums; font-size: 0.85rem; min-width: 90px; text-align: right; }
.preview .fsbar .btn { white-space: nowrap; }
.preview .fsbar .btn.secondary { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.4); }
body.has-fill { overflow: hidden; }
.controls { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.controls input[type=range] { flex: 1; accent-color: var(--leaf); }
.controls .time { font-variant-numeric: tabular-nums; font-size: 0.85rem; color: var(--ink-2); min-width: 90px; text-align: right; }
.controls [data-act=fs] { white-space: nowrap; }
.controls .fs-short { display: none; font-size: 1.1rem; line-height: 1; }
@media (max-width: 480px) {
  .controls .time { min-width: 0; }
  .controls .fs-long { display: none; }
  .controls .fs-short { display: inline; }
  .controls [data-act=fs] { padding: 8px 10px; }
}
.listen { border: 1px solid var(--rule); background: var(--ground); padding: 10px 12px; display: grid; gap: 6px; }
.listen .controls { padding: 0; }
.listen .now { margin: 0; min-height: 1.2em; }
.tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.track { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--rule); background: var(--surface); counter-increment: track; touch-action: pan-y; }
.track .tgrip { color: var(--rule); cursor: grab; letter-spacing: -2px; user-select: none; -webkit-user-select: none; }
.track .tname { cursor: grab; }
.track.sortable-chosen { border-color: var(--leaf); box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.track .tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track .tname::before { content: counter(track) ". "; color: var(--ink-2); }
.track .tacts { display: flex; gap: 6px; }
.tracks { counter-reset: track; }
@media (max-width: 560px) { .track { grid-template-columns: auto minmax(0, 1fr) auto; } .track .tacts { grid-column: 1 / -1; } }

/* Preview beside the Style panel. The preview stays put while the options are used: pinned beside
   them on a wide screen, pinned to the top of the screen on a phone. */
.previewwrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.previewwrap > .previewcol { position: sticky; top: 16px; }
.previewwrap.watch-only { grid-template-columns: 1fr; }
.previewwrap.watch-only > .previewcol { position: static; }
.previewwrap > .summary-after { display: none; }
@media (max-width: 860px) {
  .previewwrap > .summary-after { display: block; margin: 0; }
  .previewwrap { grid-template-columns: 1fr; gap: 10px; }
  .previewwrap > .previewcol { top: 0; z-index: 5; background: var(--ground); margin: 0 -16px; padding: 0 16px 6px; }
  .previewwrap > .previewcol .timeline-summary { display: none; }
}
.stylepanel { background: var(--surface); border: 1px solid var(--rule); }
.stabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--rule); }
.stab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 11px 8px 9px; font-weight: 500; color: var(--ink-2); border-radius: 0; }
.stab.on { color: var(--ink); border-bottom-color: var(--leaf); }
.sbody { padding: 14px; gap: 14px; }
.srow { display: grid; gap: 6px; }
.slabel { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.shint { font-size: 0.78rem; color: var(--ink-2); min-height: 1.2em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--rule); background: var(--surface); color: var(--ink); padding: 7px 12px; font-size: 0.9rem; line-height: 1.2; border-radius: 999px; white-space: nowrap; }
.chip.on { border-color: var(--dark); background: var(--dark); color: #fff; }
.chip.font { font-size: 1.05rem; padding: 5px 12px; }
.chips.fonts { gap: 6px; }
.tsphotos { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.tsphoto { flex: none; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; }
.tsphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tsphoto.on { border-color: var(--leaf); }
.squote { width: 100%; padding: 9px 10px; border: 1px solid var(--rule); background: var(--surface); border-radius: 0; }
.sown { width: 100%; padding: 9px 10px; border: 1px solid var(--rule); background: var(--surface); border-radius: 0; margin-top: 6px; }
.sfoot { padding: 0 14px 14px; }
@media (max-width: 860px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips.fonts { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
}
.sopts.fonts { flex-direction: column; align-items: stretch; }
.squote, .sown { padding: 9px 10px; border: 1px solid var(--rule); background: var(--surface); border-radius: 0; width: 100%; font-size: 0.9rem; }
.timeline-summary { font-size: 0.85rem; color: var(--ink-2); }
.approve { background: var(--leaf-soft); border-left: 4px solid var(--leaf); padding: 14px; }

/* Render progress */
.rprog { display: grid; gap: 8px; margin-top: 4px; }
.rsteps { display: flex; gap: 4px; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-2); }
.rsteps span { padding: 2px 8px; border: 1px solid var(--rule); background: var(--surface); }
.rsteps span.done { color: var(--leaf); border-color: var(--leaf); }
.rsteps span.now { color: #fff; background: var(--leaf); border-color: var(--leaf); }
.rbar { height: 8px; background: var(--rule-soft); overflow: hidden; }
.rbar > i { display: block; height: 100%; width: 10%; background: repeating-linear-gradient(-45deg, var(--leaf) 0 12px, #7a9a68 12px 24px); background-size: 34px 34px; animation: rmove 1s linear infinite; transition: width 0.6s; }
@keyframes rmove { from { background-position: 0 0; } to { background-position: 34px 0; } }

/* Film list progress */
.step { display: inline-block; margin: 0 6px 4px 0; padding: 2px 8px; border: 1px solid var(--rule); color: var(--ink-2); white-space: nowrap; }
.step.on { color: var(--leaf); border-color: var(--leaf); background: var(--leaf-soft); }
.step.mid { color: var(--ink); border-color: var(--ink-2); }
.step.todo { color: #fff; background: var(--leaf); border-color: var(--leaf); }

.btn.waiting { opacity: 0.75; }

/* Look-alike photos */
.dupgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dupside { margin: 0; display: grid; gap: 8px; align-content: start; }
.dupside img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--rule-soft); border: 1px solid var(--rule); }
@media (max-width: 480px) { .dupgrid { gap: 8px; } .dupside figcaption { font-size: 0.75rem; } }

/* Shared Album fetch */
.albumbox { border: 1px dashed var(--rule); padding: 10px 14px; }
.albumbox summary { cursor: pointer; font-weight: 500; }
/* The staff page: where the film is up to, and the one thing to do next, always in view */
.stagebar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 0; margin: 0 -4px; background: var(--ground); border-bottom: 1px solid var(--rule); }
.stages { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; counter-reset: stage; }
.stages li { counter-increment: stage; }
.stages a { display: inline-block; padding: 8px 10px; font-size: 0.85rem; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.stages a::before { content: counter(stage) " "; font-weight: 500; opacity: 0.7; }
.stages li.done a { color: var(--ink); }
.stages li.done a::before { content: "✓ "; color: var(--leaf); opacity: 1; }
.stages li.now a { color: var(--ink); font-weight: 500; border-color: var(--leaf); }
.stagenext { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.stagenext .btn:disabled { opacity: 0.7; }
.foldcard summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.foldcard summary::-webkit-details-marker { display: none; }
.foldcard summary::before { content: "▸"; color: var(--ink-2); font-size: 0.9rem; transition: transform 0.15s; }
.foldcard[open] summary::before { transform: rotate(90deg); }
.foldcard summary h2 { flex: none; }
.foldcard .foldsum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foldcard[open] .foldsum { display: none; }
.foldcard .foldhint { text-decoration: underline; text-decoration-color: var(--leaf); text-underline-offset: 0.2em; }
.foldcard[open] .foldhint { display: none; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu .menulist { position: absolute; right: 0; top: calc(100% + 4px); z-index: 15; min-width: 260px; background: var(--surface); border: 1px solid var(--rule); box-shadow: 0 6px 20px rgba(35,40,31,0.12); display: flex; flex-direction: column; }
.menu .menulist button { text-align: left; padding: 10px 14px; background: none; border: 0; border-bottom: 1px solid var(--rule-soft); font-size: 0.9rem; }
.menu .menulist button:hover { background: var(--leaf-soft); }
.menu .menulist button:last-child { border-bottom: 0; }
@media (max-width: 640px) {
  .stages a { padding: 8px 6px; font-size: 0.78rem; }
  .stages a::before { content: none; }
  .stages li.done a::before { content: "✓ "; }
  .stagenext { width: 100%; margin-left: 0; justify-content: space-between; }
}
.albumsteps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* Family page steps */
.stepoff { display: none !important; }
.steps { display: flex; gap: 8px; }
.steps .step { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2); font: inherit; font-weight: 500; cursor: pointer; white-space: normal; text-align: left; line-height: 1.2; }
.steps .stepnum { flex: none; }
.steps .step.on { border-color: var(--leaf); color: var(--ink); box-shadow: inset 0 -3px 0 var(--leaf); }
.steps .stepnum { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--rule-soft); color: var(--ink); font-size: 0.8rem; }
.steps .step.on .stepnum { background: var(--leaf); color: #fff; }

/* the quick draft box */
.draftbox .drafttitle { margin: 0; font-size: 1.05rem; }
.draftbox .draftplayer video { max-height: 70vh; }

/* the photo editor */
.ped-bg { position: fixed; inset: 0; background: #14171a; z-index: 60; display: flex; flex-direction: column; color: #fff; user-select: none; -webkit-user-select: none; }
.ped-ring { position: absolute; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,0.6); pointer-events: none; }
.ped { display: flex; flex-direction: column; height: 100%; }
.ped-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #1f2326; padding-top: max(10px, env(safe-area-inset-top)); }
.ped-top b { white-space: nowrap; }
.ped-top .ped-hint { flex: 1; color: #cfd6cb; font-size: 0.85rem; }
.ped-top .btn { flex: none; }
.ped-top .btn.secondary { color: #fff; border-color: #3a4046; background: #23282c; }
.ped-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px; overflow: hidden; }
.ped-canvas { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; touch-action: none; }
.ped-crop { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.5); cursor: move; touch-action: none; }
.ped-crop .hd { position: absolute; width: 26px; height: 26px; background: #fff; border-radius: 50%; border: 2px solid var(--leaf); box-sizing: border-box; }
.ped-crop .nw { left: -13px; top: -13px; cursor: nwse-resize; } .ped-crop .ne { right: -13px; top: -13px; cursor: nesw-resize; }
.ped-crop .sw { left: -13px; bottom: -13px; cursor: nesw-resize; } .ped-crop .se { right: -13px; bottom: -13px; cursor: nwse-resize; }
.ped-crop .n { left: calc(50% - 13px); top: -13px; cursor: ns-resize; } .ped-crop .s { left: calc(50% - 13px); bottom: -13px; cursor: ns-resize; }
.ped-crop .e { right: -13px; top: calc(50% - 13px); cursor: ew-resize; } .ped-crop .w { left: -13px; top: calc(50% - 13px); cursor: ew-resize; }
.ped-busy { position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: grid; place-items: center; font-weight: 500; }
.ped-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 0; }
.ped-tools button { flex: none; font: inherit; font-size: 0.9rem; padding: 8px 12px; border: 1px solid #3a4046; background: #23282c; color: #fff; cursor: pointer; }
.ped-tools button.on { background: var(--leaf); border-color: var(--leaf); }
.ped-panel { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 14px 0; }
.ped-panel label { display: flex; gap: 8px; align-items: baseline; min-width: 110px; color: #cfd6cb; }
.ped-panel input[type=range] { flex: 1; min-width: 140px; accent-color: var(--leaf); }
.ped-panel .btn { color: #fff; border-color: #3a4046; background: #23282c; }
.ped-actions { display: flex; gap: 4px 18px; flex-wrap: wrap; align-items: center; padding: 8px 14px max(10px, env(safe-area-inset-bottom)); }
.ped-link { font: inherit; font-size: 0.85rem; color: #aab3a6; background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ped-link:hover { color: #fff; }
.ped-ask { position: absolute; inset: 0; background: rgba(0,0,0,0.65); display: grid; place-items: center; padding: 16px; z-index: 2; }
.ped-askbox { background: var(--surface); color: var(--ink); padding: 20px; max-width: 420px; width: 100%; border-top: 3px solid var(--dark); }
.ped-askmsg { margin: 0; font-weight: 500; }
.ped-askbtns { display: flex; flex-direction: column; gap: 8px; }
.ped-askbtns .btn { width: 100%; }
.ped-groups { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 8px 12px 0; }
.ped-groups .ped-tools { padding: 0; align-items: center; }
.ped-tools .ped-lbl { flex: none; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: #aab3a6; padding-right: 4px; }
.ped-quick button { background: var(--leaf); border-color: var(--leaf); font-weight: 500; }
.ped-quick button.on { box-shadow: inset 0 0 0 2px #fff; }
.ped-compare { position: absolute; right: 16px; bottom: 16px; padding: 8px 12px; background: rgba(0,0,0,0.62); color: #fff; border: 1px solid rgba(255,255,255,0.55); font: inherit; font-size: 0.85rem; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.ped-compare:hover { background: rgba(0,0,0,0.8); }
.ped-panel .choice { color: #cfd6cb; }
.ped-panel .choice input { accent-color: var(--leaf); }
.ped-panel .btn:not(.secondary) { background: var(--leaf); border-color: var(--leaf); }
.ped-tag { position: absolute; top: 14px; left: 14px; padding: 4px 10px; background: rgba(0,0,0,0.6); color: #fff; font-size: 0.8rem; letter-spacing: 0.04em; pointer-events: none; }
@media (max-width: 640px) {
  .ped-top { flex-wrap: wrap; gap: 8px 10px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  .ped-top b { order: 1; flex: 1; text-align: center; font-size: 1rem; }
  .ped-top [data-act=close] { order: 0; }
  .ped-top [data-act=done] { order: 2; }
  .ped-top .ped-hint { order: 3; flex-basis: 100%; text-align: center; min-height: 1.2em; }
  .ped-groups { flex-direction: column; gap: 8px; padding: 8px 8px 0; }
  .ped-groups .ped-tools { gap: 6px; }
  .ped-tools .ped-lbl { flex-basis: 100%; padding: 0 0 2px; }
  .ped-tools button { flex: 1 1 calc(25% - 6px); min-height: 44px; padding: 8px 4px; font-size: 0.85rem; text-align: center; }
  .ped-compare { right: 10px; bottom: 10px; min-height: 40px; }
  .ped-panel { padding: 8px 10px 0; }
  .ped-panel label { min-width: 0; }
  .ped-panel input[type=range] { min-width: 0; flex-basis: 100%; }
  .ped-actions { justify-content: center; padding-top: 4px; }
}
