/* SafariRate editor — a financial document: pages, cells, formulas, three templates.
   Contrast (WCAG, computed 2026-10-12):
     chrome: ink #1D1B18 on cream #F7F1E6 16.1 · ink-2 #5B5249 7.0 · ink-3 #6F6359 5.4 · cream on oxblood #6E2C27 9.3
     classic page #F0EADE: text #3B3530 10.4 · room cells #D8C8BE text #3B3530 7.2 · season text picks ink/white by luminance
     ledger page #FFFFFF: ink 17.4 · #5B5249 7.6 · header #1D1B18 with #FBF8F2 17.0 · row numbers #8A7F73 3.9 (large, non-essential)
     editorial page #FBF8F2: ink 16.9 · #5B5249 7.4
     night desk #1B1815: #EDE6DA 14.8 · amber #E2A65A 8.4
   No green in our palette. A camp's imported season colours are its own, and editable. */
@font-face { font-family: "Cormorant Garamond"; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant-italic.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url(/fonts/inter.woff2) format("woff2"); }
@font-face { font-family: "Azeret Mono"; font-weight: 400 700; font-display: swap; src: url(/fonts/azeretmono.woff2) format("woff2"); }
@font-face { font-family: "IM Fell DW Pica"; font-weight: 400; font-display: swap; src: url(/fonts/imfelldwpica-400.woff2) format("woff2"); }
@font-face { font-family: "Averia Serif Libre"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/averiaseriflibre-400i.woff2) format("woff2"); }
@font-face { font-family: "PT Sans"; font-weight: 400; font-display: swap; src: url(/fonts/ptsans-400.woff2) format("woff2"); }
@font-face { font-family: "PT Sans"; font-weight: 700; font-display: swap; src: url(/fonts/ptsans-700.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 300 800; font-display: swap; src: url(/fonts/opensans.woff2) format("woff2"); }

:root {
  --cream: #F7F1E6; --ivory: #FBF8F2; --sand: #EDE3D3; --linen: #EFE6D6;
  --ink: #1D1B18; --ink-2: #5B5249; --ink-3: #6F6359; --hair: rgba(29, 27, 24, .12); --hair-2: rgba(29, 27, 24, .06);
  --oxblood: #6E2C27; --oxblood-2: #8A3A33; --terracotta: #B4552F; --amber: #E2A65A;
  --night: #1B1815; --night-2: #26211D; --night-ink: #EDE6DA; --night-ink-2: #B9AE9F;
  --accent: #B4552F; --sel: #2F6FDB;
  --ui: "Inter", system-ui, sans-serif; --display: "Cormorant Garamond", Georgia, serif; --mono: "Azeret Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .33 0 0 0 0 .25 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 160px; }
body { margin: 0; min-height: 100dvh; font: 400 16px/1.55 var(--ui); color: var(--ink); background: var(--cream); }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { margin: 0; font: 600 12px/1.3 var(--ui); letter-spacing: .22em; text-transform: uppercase; color: var(--oxblood); }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 2px; border-radius: 4px; }

/* desk */
.ground { position: fixed; inset: 0; z-index: -1; background: var(--grain), #E9E2D6; }
body[data-ground="linen"] .ground { background: repeating-linear-gradient(90deg, rgba(120, 96, 66, .05) 0 1px, transparent 1px 4px), repeating-linear-gradient(0deg, rgba(120, 96, 66, .045) 0 1px, transparent 1px 5px), #E4D9C6; }
body[data-ground="night"] .ground { background: radial-gradient(1200px 700px at 70% -10%, #2C2520, transparent 60%), var(--night); }
body[data-ground="photo"] .ground { background: var(--photo) center / cover no-repeat; }
body[data-ground="photo"] .ground::after { content: ""; position: absolute; inset: 0; backdrop-filter: blur(22px) saturate(.8); background: rgba(240, 233, 222, .66); }

/* chrome */
.bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 clamp(10px, 2vw, 20px); background: rgba(251, 248, 242, .92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--hair); }
.bar-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ivory); border: 1px solid var(--hair); flex: none; }
.bar-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.bar-title input { font: 600 20px/1.2 var(--display); min-width: 120px; max-width: 320px; }
.bar-status { display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font: 600 12px/1 var(--ui); background: var(--hair-2); color: var(--ink-2); white-space: nowrap; }
.pill.draft { background: #F3E2CA; color: #7A4410; } .pill.live { background: var(--ink); color: var(--amber); } .pill.sample { background: #E3EBF0; color: #2E4656; } .pill.warn { background: #F4D9D2; color: #7E2A1C; }
.bar-tools { display: flex; align-items: center; gap: 6px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--hair-2); border: 1px solid var(--hair); }
.seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 7px; font: 600 13px/1 var(--ui); cursor: pointer; color: var(--ink-2); transition: background .25s var(--ease), color .25s, box-shadow .25s; }
.seg button[aria-pressed="true"] { background: #FFF; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.grounds { display: inline-flex; gap: 4px; }
.grounds button { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--hair); cursor: pointer; transition: transform .2s var(--ease); }
.grounds button:hover { transform: scale(1.15); }
.grounds button[aria-pressed="true"] { outline: 2px solid var(--oxblood); outline-offset: 2px; }
.grounds [data-v="paper"] { background: #E9E2D6; } .grounds [data-v="linen"] { background: #E4D9C6; } .grounds [data-v="night"] { background: var(--night); } .grounds [data-v="photo"] { background: url(/img/acacia-sunset-900.webp) center / cover; }
.fx-pick select { font: 600 13px/1 var(--ui); padding: 7px 8px; border-radius: 8px; border: 1px solid var(--hair); background: #FFF; color: var(--ink); }
.tool { position: relative; width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent; cursor: pointer; font-size: 17px; transition: background .2s; }
.tool:hover { background: var(--hair-2); border-color: var(--hair); }
.tool:disabled { opacity: .35; cursor: default; }
.count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font: 700 12px/18px var(--ui); background: var(--ink-2); color: var(--ivory); }
.count:empty { display: none; } .count.hot { background: var(--terracotta); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--hair); background: #FFF; color: var(--ink); font: 600 14px/1 var(--ui); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .2s var(--ease), box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(60, 40, 20, .14); }
.btn:active { transform: none; box-shadow: none; }
.btn-accent { background: var(--oxblood); color: var(--ivory); border-color: var(--oxblood); }
.btn-accent:hover { background: var(--oxblood-2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.link { border: 0; background: none; padding: 0; color: var(--oxblood); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }

/* the ribbon: Excel's formula bar, Σ, the tier chips */
.ribbon { position: sticky; top: 56px; z-index: 35; display: flex; align-items: center; gap: 12px; padding: 7px clamp(10px, 2vw, 20px); background: rgba(251, 248, 242, .94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hair); }
.fxbar { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.addr { flex: none; min-width: 180px; max-width: 300px; padding: 6px 10px; border-radius: 7px; background: #FFF; border: 1px solid var(--hair); font: 500 13px/1.2 var(--mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-sign { font: italic 600 15px/1 Georgia, serif; color: var(--ink-3); }
#fx { flex: 1; min-width: 120px; height: 32px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--hair); background: #FFF; font: 500 14px/1 var(--mono); color: var(--ink); }
#fx:focus { outline: none; border-color: var(--sel); box-shadow: 0 0 0 3px rgba(47, 111, 219, .15); }
.ribbon-right { display: flex; align-items: center; gap: 10px; }
.stats { display: flex; gap: 10px; font: 500 12px/1 var(--ui); color: var(--ink-3); white-space: nowrap; }
.stats b { font: 600 12px/1 var(--mono); color: var(--ink); }
.tierbar { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--hair-2); border: 1px solid var(--hair); }
.tierbar button { border: 0; background: transparent; padding: 6px 10px; border-radius: 7px; font: 600 13px/1 var(--ui); color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .25s var(--ease), color .25s; }
.tierbar button em { font: 600 12px/1 var(--mono); font-style: normal; color: var(--terracotta); }
.tierbar button[aria-pressed="true"] { background: var(--ink); color: var(--ivory); }
.tierbar button[aria-pressed="true"] em { color: var(--amber); }

/* page tabs */
.tabs { position: sticky; top: 103px; z-index: 30; display: flex; gap: 2px; padding: 0 clamp(10px, 2vw, 20px); overflow-x: auto; scrollbar-width: none; background: rgba(247, 241, 230, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--hair); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 11px 12px 10px; font: 500 14px/1 var(--ui); color: var(--ink-3); text-decoration: none; white-space: nowrap; transition: color .25s; }
.tabs a:hover, .tabs a.on { color: var(--ink); }
.pn { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--hair-2); font: 600 12px/1 var(--mono); }
.tabs a.on .pn { background: var(--ink); color: var(--ivory); }
.tab-ink { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--oxblood); transition: transform .45s var(--ease), width .45s var(--ease); }
body[data-ground="night"] .bar, body[data-ground="night"] .ribbon, body[data-ground="night"] .tabs { background: rgba(27, 24, 21, .9); color: var(--night-ink); border-color: rgba(255, 255, 255, .1); }
body[data-ground="night"] .tabs a { color: var(--night-ink-2); } body[data-ground="night"] .tabs a.on, body[data-ground="night"] .tabs a:hover { color: var(--night-ink); }
body[data-ground="night"] .seg button { color: var(--night-ink-2); } body[data-ground="night"] .seg button[aria-pressed="true"] { color: var(--ink); }
body[data-ground="night"] .pill.live { background: var(--amber); color: #1B1815; }

/* the document: pages */
.doc { width: min(940px, 100% - 28px); margin: 26px auto 140px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; }
.doc > * { min-width: 0; }
.loading { color: var(--ink-3); }
.banner { padding: 12px 16px; border-radius: 10px; background: #E8EEF1; color: #22333E; font-size: 15px; }
.banner.warn { background: #F5E5CC; color: #4D2F0C; }
.page { position: relative; padding: clamp(22px, 4.6vw, 52px) clamp(16px, 4.6vw, 52px) 22px; background: var(--ivory); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 24px 60px rgba(50, 32, 16, .14); border-radius: 3px; view-transition-name: none; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.pg-head { display: flex; justify-content: space-between; gap: 12px; margin: calc(-1 * clamp(22px, 4.6vw, 52px)) calc(-1 * clamp(16px, 4.6vw, 52px)) 26px; padding: 14px clamp(16px, 4.6vw, 52px); font: 600 12px/1.3 var(--ui); letter-spacing: .26em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--hair); }
.pg-num { position: absolute; right: 14px; bottom: 10px; font: 500 12px/1 var(--mono); color: var(--ink-3); }
.pg-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--hair); text-align: center; font: 400 12px/1.8 var(--ui); letter-spacing: .06em; color: var(--ink-3); }
.pg-foot a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.pg-foot a:hover { color: var(--oxblood); border-color: currentColor; }
.pg-foot i { font-style: normal; margin: 0 12px; opacity: .5; }
.addressed { margin: -8px 0 18px; padding: 8px 12px; border-radius: 6px; background: #F3E2CA; font: 600 12px/1.4 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #6B3A10; }
.sec-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 28px 0 12px; font: 500 26px/1.15 var(--display); }
.sec-h:first-child { margin-top: 0; }
.mini-h { margin: 10px 0 4px; font: 600 12px/1.3 var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }

/* editable text: no boxes, a whisper on hover */
.bare { font: inherit; color: inherit; background: transparent; border: 0; border-radius: 4px; padding: 1px 3px; margin: -1px -3px; width: 100%; resize: none; overflow: hidden; transition: background .2s, box-shadow .2s; }
.bare.fit { width: auto; max-width: 100%; }
.bare::placeholder { color: color-mix(in srgb, currentColor 42%, transparent); }
.bare:not([readonly]):hover { background: rgba(180, 85, 47, .06); }
.bare:not([readonly]):focus { outline: none; background: #FFF; box-shadow: 0 0 0 1px var(--hair), 0 4px 14px rgba(60, 40, 20, .1); }
textarea.bare { display: block; line-height: 1.55; }
.x { width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 14px; line-height: 1; opacity: 0; transition: opacity .2s, background .2s, color .2s; flex: none; }
*:hover > .x, tr:hover .x, .term:hover .x, .x:focus-visible { opacity: 1; }
.x:hover { background: var(--hair-2); color: var(--terracotta); }
@media (hover: none) { .x { opacity: .6; } }
.add { border: 1px dashed var(--hair); background: transparent; color: var(--ink-3); padding: 6px 12px; border-radius: 7px; font: 500 13px/1 var(--ui); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.add:hover { border-color: var(--oxblood); color: var(--oxblood); background: rgba(110, 44, 39, .04); }
.add.quiet { border-color: transparent; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.round { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 var(--ui); color: var(--ink-3); }
.round select { font: 500 13px/1 var(--ui); padding: 5px 6px; border-radius: 6px; border: 1px solid var(--hair); background: #FFF; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* cover */
.cover-tools, .band-tools { position: absolute; z-index: 3; display: flex; align-items: center; gap: 3px; padding: 4px; border-radius: 9px; background: rgba(29, 27, 24, .82); color: #FBF8F2; font: 600 12px/1 var(--ui); opacity: 0; transform: translateY(-4px); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.cover-tools span, .band-tools span { padding: 0 6px; letter-spacing: .08em; text-transform: uppercase; }
.cover-tools button, .band-tools button { border: 0; min-width: 26px; height: 26px; border-radius: 6px; background: transparent; color: inherit; font: 600 12px/1 var(--mono); cursor: pointer; }
.cover-tools button[aria-pressed="true"], .band-tools button[aria-pressed="true"] { background: #FBF8F2; color: #1D1B18; }
.cover-tools { top: 14px; right: 14px; }
.page:hover .cover-tools, .cover-tools:focus-within { opacity: 1; transform: none; }
.cv-photos { display: grid; gap: 10px; margin-bottom: 10px; view-transition-name: cover-photos; }
.cv-triptych { grid-template-columns: repeat(3, 1fr); } .cv-triptych .slot { aspect-ratio: 3 / 4.4; }
.cv-duo { grid-template-columns: 1.4fr 1fr; } .cv-duo .slot { aspect-ratio: 4 / 3.6; }
.cv-hero .slot { aspect-ratio: 21 / 10; }
.cv-mosaic { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; } .cv-mosaic .slot:first-child { grid-row: span 2; } .cv-mosaic .slot { aspect-ratio: 4 / 3; } .cv-mosaic .slot:first-child { aspect-ratio: auto; } .cv-mosaic .slot:nth-child(4) { grid-column: 2 / 4; aspect-ratio: auto; }
.slot { position: relative; margin: 0; overflow: hidden; background: var(--sand); border-radius: 2px; }
.slot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.slot:hover img { transform: scale(1.03); }
.slot-empty { display: block; width: 100%; height: 100%; min-height: 120px; background: repeating-linear-gradient(45deg, rgba(29, 27, 24, .04) 0 10px, transparent 10px 20px); }
.slot-pick { position: absolute; left: 50%; bottom: 12px; transform: translate(-50%, 6px); border: 0; padding: 7px 12px; border-radius: 8px; background: rgba(29, 27, 24, .82); color: #FBF8F2; font: 600 12px/1 var(--ui); cursor: pointer; opacity: 0; transition: opacity .25s, transform .25s var(--ease); }
.slot:hover .slot-pick, .slot-pick:focus-visible { opacity: 1; transform: translate(-50%, 0); }
.slot-empty + .slot-pick { opacity: 1; transform: translate(-50%, 0); }
.cv-band { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 48px; padding: clamp(20px, 4vw, 40px); background: var(--accent); color: #FFFDF8; border-radius: 2px; }
.cv-year { display: grid; gap: 4px; min-width: 200px; }
.cv-year .num { font: 600 14px/1 var(--mono); letter-spacing: .3em; }
.cv-year .bare:not(.num):not(.cv-valid) { font: 400 20px/1.2 var(--ui); letter-spacing: .1em; text-transform: uppercase; }
.cv-valid { font: 400 13px/1.3 var(--ui) !important; opacity: .85; }
.cv-camps { display: flex; flex-wrap: wrap; gap: 14px 40px; }
.cv-camp { display: inline-grid; justify-items: end; }
.cv-name .bare { font: italic 600 clamp(28px, 3.6vw, 42px)/1.05 var(--display); letter-spacing: .05em; }
.cv-place .bare { font: 500 12px/1.4 var(--ui); letter-spacing: .2em; text-transform: uppercase; text-align: right; }
.toc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 18px 0 0; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.toc .eyebrow { margin-right: 6px; }
.toc a { font-size: 14px; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--hair); transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--oxblood); border-color: currentColor; }
.cv-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin-top: 20px; }
.field { display: grid; gap: 6px; font: 600 12px/1.3 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.field .bare, .field select, .field input:not(.bare) { font: 500 15px/1.4 var(--ui); letter-spacing: 0; text-transform: none; color: var(--ink); }
.field select, .field input:not(.bare) { padding: 9px 11px; border-radius: 8px; border: 1px solid var(--hair); background: #FFF; }
.tiers-edit, .links-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.tiers-edit .eyebrow, .links-edit .eyebrow { flex-basis: 100%; }
.links-edit { grid-column: 1 / -1; }
.links-edit .bare { flex: 1 1 200px; border-bottom: 1px solid var(--hair); border-radius: 0; padding: 4px 2px; font-size: 14px; }
.tier { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 8px; background: var(--hair-2); }
.tier .bare { width: 9em; font-weight: 600; }
.tier-pct { display: inline-flex; align-items: center; gap: 1px; font: 600 14px/1 var(--mono); color: var(--terracotta); white-space: nowrap; }
.tier-pct .bare { width: 2.6em; text-align: right; }

/* camp header */
.camp-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 24px; }
.camp-id { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.camp-head h2 { margin: 0; }
.camp-name { font: 500 clamp(36px, 4.6vw, 56px)/1 var(--display); }
.camp-place .bare { font: italic 500 22px/1 var(--display); color: var(--accent); }

/* boards & the grid */
.board { margin-bottom: 34px; }
.board-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; }
.board-name { font: 500 26px/1.15 var(--display); }
.board-unit { font: 500 12px/1.3 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.board-body { display: grid; gap: 14px; }
.incl { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; order: 2; font-size: 14px; color: var(--ink-2); }
.incl-h { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 13px; color: var(--ink); }
.copy { border: 1px solid var(--hair); background: transparent; border-radius: 6px; padding: 2px 8px; font: 500 12px/1.4 var(--ui); color: var(--ink-3); cursor: pointer; opacity: .7; transition: opacity .2s, color .2s; }
.copy:hover { opacity: 1; color: var(--oxblood); }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.grid th, .grid td { padding: 0; }
.grid .corner { width: 26%; }
.grid .season { padding: 9px 6px 7px; text-align: center; vertical-align: bottom; min-width: 9em; }
.season-in { display: flex; align-items: center; justify-content: center; gap: 2px; }
.season .bare { font: 600 13px/1.2 var(--ui); text-align: center; }
.swatch { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--sc); border: 2px solid #FFF; box-shadow: 0 0 0 1px var(--hair); cursor: pointer; flex: none; opacity: 0; transition: opacity .2s; }
.season:hover .swatch, .season:focus-within .swatch { opacity: 1; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.rule-tag { display: block; margin-top: 3px; font: italic 500 12px/1.2 var(--ui); color: var(--ink-3); white-space: nowrap; }
.grid .dates td { text-align: center; padding: 4px 4px 8px; }
.grid .dates button { white-space: nowrap; border: 0; background: none; cursor: pointer; font: 500 12px/1.65 var(--ui); letter-spacing: .04em; color: var(--ink-2); padding: 3px 6px; border-radius: 5px; }
.grid .dates button:not(:disabled):hover { background: rgba(180, 85, 47, .08); }
.grid .sub th { padding: 7px 4px; font: 600 12px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; }
.grid th.room { text-align: left; padding: 0 6px 0 10px; height: 42px; font-weight: 500; white-space: nowrap; }
.grid th.room > .bare { width: calc(100% - 28px); min-width: 12ch; }
.grid th.room .rule-tag { display: block; margin: 0 0 4px; }
.grid th.room { padding-top: 6px; }
.grid td.c { position: relative; text-align: center; }
.grid td.f::after { content: "ƒ"; position: absolute; top: 2px; right: 4px; font: italic 600 12px/1 Georgia, serif; color: var(--ink-3); opacity: .6; pointer-events: none; }
.grid td.tv { text-align: center; font: 400 13px/1 var(--ui); color: var(--ink-2); }
.cell { width: 100%; min-width: 4.8ch; height: 40px; border: 0; background: transparent; font: 600 16px/1 var(--mono); color: inherit; text-align: center; padding: 0 6px; cursor: cell; caret-color: transparent; transition: background .18s, box-shadow .18s; }
.cell:focus { outline: none; }
.cell.sel { background: rgba(47, 111, 219, .12); }
.cell.act { box-shadow: inset 0 0 0 2px var(--sel); background: rgba(47, 111, 219, .06); }
.cell.editing { background: #FFF; box-shadow: inset 0 0 0 2px var(--sel), 0 6px 18px rgba(47, 111, 219, .18); cursor: text; caret-color: auto; position: relative; z-index: 2; }
td.f .cell { color: var(--ink-2); font-style: italic; font-weight: 500; }
.cell.moved { text-decoration: underline 2px var(--amber); text-underline-offset: 4px; }
.cell.flash { animation: flash 1.1s var(--ease); }
@keyframes flash { 0% { background: rgba(226, 166, 90, .55); } 100% { background: transparent; } }

/* ── template: CLASSIC — the camp's own sheet (Nyumbani's fonts and colours) ── */
body[data-template="classic"] .page { background: var(--grain), #F0EADE; color: #3B3530; font-family: "Open Sans", var(--ui); }
body[data-template="classic"] .pg-head { border: 0; justify-content: flex-end; }
body[data-template="classic"] .pg-head span:first-child { display: none; }
body[data-template="classic"] .pg-head span:last-child { padding: 12px 26px; background: rgba(216, 200, 190, .55); color: #FFF; font: 400 20px/1 "IM Fell DW Pica", serif; letter-spacing: .3em; text-shadow: none; color: #6B5A4E; }
body[data-template="classic"] .camp-head { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 16px 26px; background: #E9E1D7; margin: -10px 0 24px; }
body[data-template="classic"] .camp-name { font: 400 26px/1 "IM Fell DW Pica", serif; letter-spacing: .32em; text-transform: uppercase; color: var(--accent); }
body[data-template="classic"] .camp-place .bare { font: italic 400 18px/1 "Averia Serif Libre", serif; letter-spacing: .2em; color: #6B5C4F; }
/* letter-spaced capitals are wider than the field's character count — size them by it */
body[data-template="classic"] .camp-name.fit { width: calc(var(--n) * 1.12em); }
body[data-template="classic"] .board-name.fit { width: calc(var(--n) * 1.1em); }
body[data-template="classic"] .grid .season .bare.fit { width: calc(var(--n) * 1em); }
body[data-template="classic"] .camp-head .eyebrow { color: #3B3530; letter-spacing: .18em; }
body[data-template="classic"] .board-head { justify-content: center; flex-direction: column; align-items: center; gap: 2px; background: #F2EAE2; padding: 14px 10px 10px; margin: 0; }
body[data-template="classic"] .board-name { font: 400 19px/1.2 "IM Fell DW Pica", serif; letter-spacing: .34em; text-transform: uppercase; text-align: center; }
body[data-template="classic"] .board-unit { font: 400 12px/1.3 "PT Sans", var(--ui); color: #5E554C; }
body[data-template="classic"] .incl-cell { width: 30%; vertical-align: top; text-align: left; background: #F6F7F5; padding: 16px 14px !important; }
body[data-template="classic"] .incl { grid-template-columns: 1fr; gap: 10px; align-content: start; font: 400 13px/1.5 "Open Sans", var(--ui); color: #3B3530; }
body[data-template="classic"] .grid { border-spacing: 3px; font-family: "PT Sans", var(--ui); }
body[data-template="classic"] .grid .season { background: var(--sc); color: var(--st); padding: 13px 6px; }
body[data-template="classic"] .grid .season .bare { font: 700 12px/1.2 "PT Sans", var(--ui); letter-spacing: .14em; text-transform: uppercase; color: inherit; }
body[data-template="classic"] .grid .season .rule-tag { color: inherit; opacity: .85; }
body[data-template="classic"] .grid .dates td { background: #FFF; padding: 16px 4px; }
body[data-template="classic"] .grid .dates button { font: 400 12px/1.75 "PT Sans", var(--ui); letter-spacing: .1em; color: #3B3530; }
body[data-template="classic"] .grid .sub th { background: var(--sc); color: var(--st); font-family: "PT Sans", var(--ui); }
body[data-template="classic"] .grid tbody th.room { background: #D8C8BE; font: 400 13px/1.3 "PT Sans", var(--ui); letter-spacing: .08em; color: #3B3530; }
body[data-template="classic"] .grid tbody td { background: #FFF; }
body[data-template="classic"] .cell { font: 400 14px/1 "PT Sans", var(--ui); color: #3B3530; }
body[data-template="classic"] .grid td.tv { font-family: "PT Sans", var(--ui); }
/* the room labels sit in their own column beside the table, like the printed sheet */
body[data-template="classic"] .grid tbody th.room { width: 30%; }
body[data-template="classic"] .sec-h { font: 400 14px/1.4 "Open Sans", var(--ui); letter-spacing: .3em; text-transform: uppercase; color: #7A4A2E; }
body[data-template="classic"] .cv-name .bare { font: italic 400 clamp(26px, 3.4vw, 38px)/1.05 "Averia Serif Libre", serif; }
body[data-template="classic"] .cv-year .bare:not(.num):not(.cv-valid) { font-family: "Open Sans", var(--ui); }
body[data-template="classic"] table.list td, body[data-template="classic"] table.list th { background: #F6F5F2; border: 0; }
body[data-template="classic"] table.list { border-spacing: 3px; border-collapse: separate; }
body[data-template="classic"] .info-card { background: #E2D6CC; padding: 16px 18px; }
body[data-template="classic"] .terms, body[data-template="classic"] .pay { background: #E2D6CC; padding: 26px 28px; }
body[data-template="classic"] .notes-box { background: #E2D6CC; border-radius: 0; }
body[data-template="classic"] .info-card h4 { font: italic 400 22px/1.1 "Averia Serif Libre", serif; }

/* ── template: LEDGER — strict, financial, a printed spreadsheet ── */
body[data-template="ledger"] .page { background: #FFF; border-radius: 0; }
body[data-template="ledger"] .board-name, body[data-template="ledger"] .camp-name, body[data-template="ledger"] .sec-h { font-family: var(--ui); font-weight: 700; letter-spacing: -.01em; }
body[data-template="ledger"] .camp-name { font-size: clamp(28px, 3.6vw, 40px); }
body[data-template="ledger"] .board-name { font-size: 18px; }
body[data-template="ledger"] .sec-h { font-size: 18px; text-transform: uppercase; letter-spacing: .08em; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
body[data-template="ledger"] .camp-place .bare { font: 600 14px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
body[data-template="ledger"] .grid { border: 1px solid #D9D3C8; }
body[data-template="ledger"] .grid .letters th { padding: 3px; background: #F4F1EB; font: 500 12px/1 var(--mono); color: #8A7F73; text-align: center; border-bottom: 1px solid #E4DFD6; }
body[data-template="ledger"] .grid .season { background: var(--ink); color: #FBF8F2; border-top: 4px solid var(--sc); }
body[data-template="ledger"] .grid .season .bare { color: #FBF8F2; letter-spacing: .04em; }
body[data-template="ledger"] .grid .season .rule-tag { color: #CFC6B8; }
body[data-template="ledger"] .grid .dates td { background: #F8F6F1; border-bottom: 1px solid #E4DFD6; }
body[data-template="ledger"] .grid .sub th { background: #F8F6F1; color: var(--ink-2); border-bottom: 1px solid #D9D3C8; }
body[data-template="ledger"] .grid tbody tr:nth-child(even) td, body[data-template="ledger"] .grid tbody tr:nth-child(even) th { background: #FAF8F4; }
body[data-template="ledger"] .grid tbody td, body[data-template="ledger"] .grid tbody th { border-bottom: 1px solid #ECE7DE; }
body[data-template="ledger"] .grid tbody td + td { border-left: 1px solid #ECE7DE; }
body[data-template="ledger"] .cell { text-align: right; padding-right: 12px; font-size: 15px; }
body[data-template="ledger"] .grid td.tv { text-align: right; padding-right: 12px; font-family: var(--mono); font-size: 13px; }
body[data-template="ledger"] .rownum { display: inline-block; width: 22px; margin-right: 6px; font: 500 12px/1 var(--mono); color: #8A7F73; }
body[data-template="ledger"] .grid thead tr:not(.letters) > th:first-child { background: var(--ink); }
body[data-template="ledger"] .grid thead tr.dates > th:first-child, body[data-template="ledger"] .grid thead tr.sub > th:first-child { background: #F8F6F1; border-bottom: 1px solid #E4DFD6; }
body[data-template="ledger"] .cv-band { background: var(--ink); }
body[data-template="ledger"] .cv-name .bare { font: 700 clamp(24px, 3vw, 34px)/1.1 var(--ui); font-style: normal; letter-spacing: 0; }
body[data-template="ledger"] .slot { border-radius: 0; }
body[data-template="ledger"] .pg-head { background: var(--ink); color: #FBF8F2; border: 0; }

/* ── template: EDITORIAL — SafariRate's own ── */
body[data-template="editorial"] .page { background: var(--ivory); }
body[data-template="editorial"] .grid .season .season-in { padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--sc) 15%, transparent); }
body[data-template="editorial"] .grid .season .bare { color: color-mix(in srgb, var(--sc) 70%, var(--ink)); }
body[data-template="editorial"] .grid tbody tr { transition: background .2s; }
body[data-template="editorial"] .grid tbody tr:hover { background: var(--hair-2); }
body[data-template="editorial"] .grid tbody td, body[data-template="editorial"] .grid tbody th { border-top: 1px solid var(--hair); }
body[data-template="editorial"] .cell { font-size: 18px; height: 46px; }
body[data-template="editorial"] .grid .sub th { color: var(--ink-3); }
body[data-template="editorial"] .cv-photos .slot { border-radius: 14px; }
body[data-template="editorial"] .cv-band { background: transparent; color: var(--ink); padding: 18px 0 0; }
body[data-template="editorial"] .cv-name .bare { font-style: normal; font-weight: 500; letter-spacing: 0; font-size: clamp(32px, 4.4vw, 52px); }
body[data-template="editorial"] .cv-place .bare { text-align: left; color: var(--accent); }
body[data-template="editorial"] .cv-camp { justify-items: start; }

/* lists, info, fees, policies, terms, payment */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 6px; }
.list th, .list td { padding: 10px 8px; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
.list thead th { font: 600 12px/1.3 var(--ui); letter-spacing: .06em; color: var(--ink-2); }
.list td.n, .list th.n { width: 130px; text-align: right; }
.list td.n .bare { text-align: right; }
.list .tools { width: 90px; text-align: right; white-space: nowrap; }
.list-price { width: 42%; white-space: nowrap; }
.list-price .cur { font: 600 14px/1 var(--mono); }
.list-price .amt { width: 5ch !important; text-align: right; font-weight: 600; }
.list-price .unit { width: auto; min-width: 8ch; margin-left: .5ch; color: var(--ink-2); }
.list-price .cur { margin-right: .2ch; }
.list-price { display: table-cell; }
.list tr:hover td, .list tr:hover th { background: var(--hair-2); }
.pols th { width: 34%; font: 600 13px/1.4 var(--ui); letter-spacing: .06em; text-transform: uppercase; }
.bank th { width: 34%; font-weight: 600; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 8px; }
.info-card h4 { margin: 0 0 6px; font: 500 24px/1.1 var(--display); }
.info-card h4 span { font: italic 500 16px/1 var(--display); color: var(--accent); margin-left: 6px; }
.items { margin: 4px 0; padding-left: 20px; }
.items li { margin: 1px 0; }
.items li::marker { color: var(--accent); }
.items textarea { line-height: 1.5; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: 14px; }
dt { font-weight: 600; } dd { margin: 0; }
.notes-box { margin: 14px 0; padding: 12px 14px; border-radius: 8px; background: var(--hair-2); font-size: 14px; }
.terms { display: grid; gap: 16px; }
.term-head { display: flex; align-items: center; gap: 6px; }
.term-head .bare { font: 700 15px/1.3 var(--ui); }
.term .tools { display: flex; }
.term textarea { font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.pay { display: grid; gap: 12px; font-size: 14px; }
.sign { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 16px; }
.sign div { display: grid; gap: 26px; }
.sign span { border-bottom: 1px solid currentColor; padding-bottom: 4px; font: 500 12px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; opacity: .7; }

/* photo bands at the foot of a page — optional; without one the page closes up */
.band { position: relative; margin-top: 22px; }
.band-row { display: grid; gap: 10px; view-transition-name: none; }
.band-wide .band-row { grid-template-columns: 1fr; } .band-wide .slot { aspect-ratio: 21 / 7; }
.band-two .band-row { grid-template-columns: 1fr 1fr; } .band-three .band-row { grid-template-columns: repeat(3, 1fr); } .band-four .band-row { grid-template-columns: repeat(4, 1fr); }
.band-two .slot, .band-three .slot, .band-four .slot { aspect-ratio: 4 / 3; }
.band-tools { top: 10px; left: 10px; }
.band:hover .band-tools, .band-tools:focus-within { opacity: 1; transform: none; }
.band-none { height: 0; margin: 0; }
.band-none .band-tools { top: 6px; left: 50%; transform: translate(-50%, 0); position: absolute; }
.page:hover .band-none .band-tools { opacity: .9; }

/* hover label */
.tip { position: fixed; left: 0; top: 0; z-index: 80; max-width: 320px; padding: 10px 12px; border-radius: 10px; background: var(--ink); color: #F3ECE0; font: 400 13px/1.45 var(--ui); pointer-events: none; opacity: 0; transition: opacity .16s; box-shadow: 0 14px 34px rgba(0, 0, 0, .28); }
.tip.show { opacity: 1; }
.tip b { color: #FFF; }
.tip-sub { display: block; color: #C9BEAE; }
.tip-grid { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(255, 255, 255, .14); }
.tip-grid b { font-family: var(--mono); color: var(--amber); }
.tip-fx { display: block; margin-top: 6px; color: #C9BEAE; font-family: var(--mono); font-size: 12px; }
.tip-hint { display: block; margin-top: 6px; color: #A99D8D; font-size: 12px; }

/* the change panel */
.pop { position: fixed; z-index: 60; width: min(420px, calc(100vw - 24px)); padding: 18px; border-radius: 16px; background: var(--ivory); color: var(--ink); border: 1px solid var(--hair); box-shadow: 0 30px 70px rgba(40, 24, 10, .28); opacity: 0; transform: translateY(8px) scale(.97); transform-origin: top center; transition: opacity .22s var(--ease), transform .28s var(--ease); }
.pop.show { opacity: 1; transform: none; }
.pop.as-sheet { left: 50% !important; top: auto !important; bottom: 12px; transform: translate(-50%, 16px); }
.pop.as-sheet.show { transform: translate(-50%, 0); }
.pop-head { display: grid; gap: 2px; position: relative; margin-bottom: 12px; padding-right: 28px; }
.pop-head b { font: 600 22px/1.15 var(--display); }
.pop-head span:not(.eyebrow) { font-size: 13px; color: var(--ink-3); }
.pop-head .x { position: absolute; right: -4px; top: -4px; opacity: 1; }
.seg.small button { padding: 7px 11px; font-size: 13px; }
.pop-value { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; }
.pop-value input { width: 120px; font: 600 26px/1 var(--mono); padding: 8px 10px; border-radius: 10px; border: 1px solid var(--hair); background: #FFF; color: var(--ink); }
.pop-value > span { font: 600 18px/1 var(--mono); color: var(--ink-3); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.quick button { border: 1px solid var(--hair); background: transparent; border-radius: 7px; padding: 6px 9px; font: 600 12px/1 var(--mono); cursor: pointer; }
.quick button:hover { background: var(--sand); }
.scopes { display: grid; gap: 3px; margin: 8px 0 14px; max-height: 40vh; overflow: auto; }
.scope { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 9px; cursor: pointer; font-size: 14px; transition: background .2s; }
.scope:hover { background: var(--hair-2); } .scope.on { background: #F3E2CA; }
.scope input { accent-color: var(--oxblood); margin: 0; } .scope span { flex: 1; }
.scope em { font: 600 12px/1 var(--mono); font-style: normal; color: var(--ink-3); }
.pop-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--hair); }
.pop-foot select { font: 500 13px/1 var(--ui); padding: 7px 8px; border-radius: 7px; border: 1px solid var(--hair); background: #FFF; }
.pop-sum { flex: 1; font-size: 13px; color: var(--ink-2); min-width: 140px; }
.err { color: #9B2F1E; font-weight: 600; margin: 0; }

.smart { position: fixed; left: 50%; bottom: 22px; z-index: 55; width: min(660px, calc(100vw - 24px)); padding: 13px 15px; border-radius: 14px; background: var(--ink); color: #F3ECE0; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); opacity: 0; transform: translate(-50%, 24px); transition: opacity .3s var(--ease), transform .4s var(--ease); }
.smart.show { opacity: 1; transform: translate(-50%, 0); }
.smart p { margin: 0 0 9px; font-size: 14px; } .spark { color: var(--amber); }
.smart-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.smart-opts button { border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #FFF; border-radius: 8px; padding: 7px 11px; font: 500 13px/1 var(--ui); cursor: pointer; }
.smart-opts button:hover { background: rgba(226, 166, 90, .25); }
.smart-opts em { font: 600 12px/1 var(--mono); font-style: normal; color: var(--amber); margin-left: 4px; }
.smart-opts .quiet { border-color: transparent; color: #C9BEAE; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(400px, 100vw); padding: 20px; overflow: auto; background: var(--ivory); color: var(--ink); border-left: 1px solid var(--hair); box-shadow: -24px 0 60px rgba(40, 24, 10, .16); transform: translateX(104%); transition: transform .45s var(--ease); }
.drawer.show { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer-head h2 { font: 500 28px/1 var(--display); margin: 0; } .drawer-head .x { opacity: 1; }
.note { display: grid; grid-template-columns: 28px 1fr; gap: 4px 10px; padding: 13px 0; border-bottom: 1px solid var(--hair); }
.note p { margin: 0; font-size: 14px; }
.note-i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font: 700 12px/1 var(--ui); background: var(--hair-2); }
.note.fix .note-i { background: #F4D9D2; color: #7E2A1C; } .note.idea .note-i { background: #F3E2CA; color: #7A4410; } .note.remind .note-i { background: #E3EBF0; color: #2E4656; }
.note-acts { grid-column: 2; display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 13px; }
.calm { color: var(--ink-3); }
.drawer h3 { font: 600 12px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin: 22px 0 8px; }
.memory { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.memory li { display: grid; grid-template-columns: 56px 1fr; padding: 5px 0; }
.memory span { color: var(--ink-3); font: 500 12px/1.8 var(--mono); }

/* dialogs */
.sheet-back { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; padding: 16px; background: rgba(29, 27, 24, .42); opacity: 0; transition: opacity .25s; }
.sheet-back.show { opacity: 1; }
.sheet { width: min(760px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; border-radius: 16px; background: var(--ivory); color: var(--ink); box-shadow: 0 40px 90px rgba(0, 0, 0, .3); }
.sheet.wide { width: min(980px, 100%); }
.sheet h2 { font: 500 32px/1.1 var(--display); margin: 0 0 6px; }
.sheet p { color: var(--ink-2); } .fine { font-size: 13px; color: var(--ink-3); }
.sheet-actions { position: sticky; bottom: -24px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 16px; padding: 12px 0 4px; background: var(--ivory); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.win { margin-bottom: 8px; } .win input { padding: 9px 11px; border-radius: 8px; border: 1px solid var(--hair); font-size: 16px; background: #FFF; }
.check { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin: 10px 0; font-weight: 500; }
.check input[type=checkbox], .check input[type=radio] { width: 18px; height: 18px; accent-color: var(--oxblood); }
.check select, .check input.num { padding: 6px 8px; border-radius: 7px; border: 1px solid var(--hair); background: #FFF; font: 500 14px/1 var(--ui); }
.rule-box { padding: 12px 14px; margin: 10px 0; border-radius: 10px; background: var(--hair-2); }
.menu { display: grid; gap: 2px; }
.menu button, .menu a { text-align: left; padding: 11px 13px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font: 500 15px/1.3 var(--ui); color: var(--ink); text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--hair-2); }
.menu .eyebrow { padding: 12px 13px 2px; }
.file-row { display: flex; align-items: center; gap: 8px; padding: 6px 13px; font-size: 14px; } .file-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.qt { width: 100%; border-collapse: collapse; font-size: 14px; }
.qt th, .qt td { padding: 7px 8px; border-bottom: 1px solid var(--hair); text-align: left; }
.qt .n { text-align: right; font-family: var(--mono); }
.qt tr.fee td { color: var(--ink-2); font-style: italic; }
.qt .up { color: #7A4410; font-weight: 700; } .qt .down { color: #9B2F1E; font-weight: 700; }
.q-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.q-wide { grid-column: span 3; }
.q-tot { grid-template-columns: 1fr auto; max-width: 420px; margin: 14px 0 0 auto; font-size: 15px; }
.q-tot dd { text-align: right; font-family: var(--mono); }
.q-tot .grand { padding-top: 8px; border-top: 2px solid var(--ink); font-size: 18px; font-weight: 700; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 14px 0; }
.pick { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--sand); cursor: pointer; transition: border-color .2s, transform .2s var(--ease); }
.pick:hover { border-color: var(--oxblood); transform: translateY(-2px); }
.pick img { width: 100%; height: 100%; object-fit: cover; }
.pick-up { display: grid; place-items: center; border: 2px dashed var(--hair); font: 600 14px/1.3 var(--ui); color: var(--ink-2); }
.drop { display: grid; place-items: center; gap: 6px; padding: 36px 18px; border: 1.5px dashed var(--hair); border-radius: 14px; text-align: center; cursor: pointer; transition: background .2s, border-color .2s; }
.drop:hover, .drop.over { background: #F3E2CA; border-color: var(--oxblood); }
.drop b { font: 600 20px/1.2 var(--display); }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; margin: 14px 0; }
.rv { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; background: var(--hair-2); font-size: 14px; cursor: pointer; }
.rv span { flex: 1; } .rv em { font: 600 12px/1 var(--mono); font-style: normal; color: var(--oxblood); }
.rv.none { opacity: .55; cursor: default; } .rv.none em { color: var(--ink-3); }
.rv input { accent-color: var(--oxblood); }
.rv-camp { font-size: 14px; margin: 4px 0; }
.fine-list { padding-left: 18px; font-size: 13px; color: var(--ink-3); }
.reading { display: flex; gap: 8px; padding: 18px 0; }
.reading span { width: 10px; height: 10px; border-radius: 50%; background: var(--oxblood); animation: bob 1s infinite var(--ease); }
.reading span:nth-child(2) { animation-delay: .15s; } .reading span:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 50% { transform: translateY(-8px); opacity: .5; } }
.preview-frame { width: 100%; height: 66vh; border: 0; border-radius: 10px; background: #FFF; }
.vrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.vrow span { flex: 1; font-size: 14px; color: var(--ink-2); }

.toast { position: fixed; left: 50%; top: 152px; z-index: 75; max-width: calc(100vw - 24px); padding: 11px 16px; border-radius: 12px; background: var(--ink); color: #F3ECE0; font: 500 14px/1.4 var(--ui); box-shadow: 0 16px 40px rgba(0, 0, 0, .3); opacity: 0; visibility: hidden; transform: translate(-50%, -12px); transition: opacity .3s var(--ease), transform .35s var(--ease), visibility .3s; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast b { color: var(--amber); }
.exit-preview { position: fixed; right: 18px; bottom: 18px; z-index: 45; border: 0; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--ivory); font: 600 14px/1 var(--ui); cursor: pointer; box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }

/* preview: the document exactly as operators see it — no editing chrome at all */
body.preview .ribbon, body.preview .row-actions, body.preview .add, body.preview .x, body.preview .copy, body.preview .cover-tools, body.preview .band-tools, body.preview .swatch, body.preview .cv-settings, body.preview .bar-tools .seg, body.preview .bar-tools .grounds { display: none !important; }
body.preview .tabs { top: 56px; }
body.preview .cell { cursor: default; }

/* view transitions: template and layout switches crossfade like slides */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }

.dock { display: none; }
@media (max-width: 980px) {
  .bar { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .bar-title { flex-basis: calc(100% - 46px); flex-wrap: wrap; row-gap: 4px; }
  .bar-title input { width: 100%; max-width: none; }
  .bar-status { flex-wrap: wrap; }
  .tier .bare { width: 6.5em; }
  .bar-tools { flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .bar-tools [data-act="undo"], .bar-tools [data-act="redo"], .bar-tools #publish, .bar-tools [data-act="notes"], .bar-tools [data-act="more"] { display: none; }
  .bar, .ribbon { position: relative; top: 0; }
  .ribbon { flex-wrap: wrap; }
  .addr { min-width: 0; max-width: 46%; }
  .ribbon-right { flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .stats { display: none; }
  .tabs { top: 0; }
  html { scroll-padding-top: 60px; }
  .toast { top: 70px; }
  .dock { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 40; display: flex; gap: 4px; padding: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom)); border-radius: 18px; background: rgba(251, 248, 242, .95); backdrop-filter: blur(14px); border: 1px solid var(--hair); box-shadow: 0 14px 40px rgba(40, 24, 10, .2); }
  .dock button { flex: 1; display: grid; justify-items: center; gap: 2px; min-height: 52px; padding: 6px 2px; border: 0; border-radius: 13px; background: transparent; color: var(--ink); font: 600 12px/1 var(--ui); cursor: pointer; }
  .dock button span { font-size: 18px; }
  .dock .accent { background: var(--oxblood); color: var(--ivory); }
  .smart { bottom: 84px; } .exit-preview { bottom: 84px; }
  .cv-settings, .incl, .two, .sign, .q-grid { grid-template-columns: 1fr; }
  .q-wide { grid-column: auto; }
  .doc { width: calc(100% - 16px); margin-top: 12px; }
}
@media (max-width: 560px) {
  .cv-triptych { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .cv-mosaic { grid-template-columns: 1fr 1fr; } .cv-mosaic .slot:first-child { grid-row: auto; grid-column: span 2; aspect-ratio: 16 / 9; } .cv-mosaic .slot:nth-child(4) { grid-column: span 2; aspect-ratio: 16 / 9; }
  .band-four .band-row { grid-template-columns: 1fr 1fr; }
  .camp-name { font-size: 36px; }
  .list-price { white-space: normal; }
  .grid .corner { width: auto; }
  .grid th.room { min-width: 190px; }
  body[data-template="classic"] table.grid { min-width: 640px; }
  body[data-template="classic"] .incl-cell { width: 32%; }
  .pg-head span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } .reveal { opacity: 1; transform: none; } }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #FFF; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bar, .ribbon, .tabs, .dock, .drawer, .pop, .smart, .toast, .tip, .banner, .add, .x, .copy, .row-actions, .ground, .cv-settings, .cover-tools, .band-tools, .swatch, .exit-preview, .slot-pick, .band-none { display: none !important; }
  .doc { width: 100%; margin: 0; gap: 0; display: block; }
  .page { break-after: page; box-shadow: none !important; border-radius: 0; opacity: 1 !important; transform: none !important; min-height: 297mm; padding: 14mm 14mm 10mm; }
  .page:last-child { break-after: auto; }
  .bare { padding: 0; margin: 0; } .cell.sel, .cell.act { background: none; box-shadow: none; }
  .grid-wrap { overflow: visible; }
}
