:root {
  --bg: #14110f; --bg2: #1d1915; --card: #25201b; --line: #3a332b; --text: #f1e6cf; --muted: #a09584; --accent: #e0a43a; --accent-ink: #1a1305; --paper: #f1e6cf; --paper-ink: #2a2118;
  --danger: #e5604d; --ok: #5fb376; --blue: #5b9bd5;
  --radius: 14px; --pad: 16px; --hit: 44px; --focus: #4aa3ff;
  color-scheme: dark;
}
:root[data-scheme=light] { --bg: #efe8da; --bg2: #e6dec9; --card: #fbf7ec; --line: #d4c9b0; --text: #2a2118; --muted: #756a58; --accent: #b87a10; --accent-ink: #ffffff; --paper: #fbf7ec; --paper-ink: #2a2118; color-scheme: light; }
/* Before the app sets data-scheme, follow the device. */
@media (prefers-color-scheme: light) { :root:not([data-scheme]) { --bg: #efe8da; --bg2: #e6dec9; --card: #fbf7ec; --line: #d4c9b0; --text: #2a2118; --muted: #756a58; --accent: #b87a10; --accent-ink: #ffffff; --paper: #fbf7ec; --paper-ink: #2a2118; color-scheme: light; } }
:root[data-palette=noir] { --bg: #0b0b0c; --bg2: #141416; --card: #1b1b1e; --line: #2c2c31; --text: #f2f2f2; --muted: #9a9aa2; --accent: #e8412c; --accent-ink: #ffffff; --paper: #ececec; --paper-ink: #121214; }
:root[data-palette=noir][data-scheme=light] { --bg: #f3f3f4; --bg2: #e9e9ec; --card: #ffffff; --line: #d6d6dc; --text: #151518; --muted: #6b6b74; --accent: #d2321e; --accent-ink: #ffffff; --paper: #ffffff; --paper-ink: #151518; }
:root[data-palette=forest] { --bg: #0f1712; --bg2: #16211a; --card: #1d2b22; --line: #2d4034; --text: #e9f0e4; --muted: #93a596; --accent: #c9b23a; --accent-ink: #141a0a; --paper: #e9f0e4; --paper-ink: #1a2a1f; }
:root[data-palette=forest][data-scheme=light] { --bg: #e9efe5; --bg2: #dde6d7; --card: #f7faf4; --line: #c6d3bf; --text: #1b2a20; --muted: #5f7064; --accent: #7a8a13; --accent-ink: #ffffff; --paper: #f7faf4; --paper-ink: #1b2a20; }
:root[data-palette=ocean] { --bg: #0d141c; --bg2: #142030; --card: #1a2a3d; --line: #2b4258; --text: #e6eef5; --muted: #90a4b8; --accent: #3cc1b8; --accent-ink: #06211f; --paper: #e6eef5; --paper-ink: #13263a; }
:root[data-palette=ocean][data-scheme=light] { --bg: #e7eef3; --bg2: #dbe5ec; --card: #f9fbfd; --line: #c3d2de; --text: #13263a; --muted: #5a6f82; --accent: #0f8f87; --accent-ink: #ffffff; --paper: #f9fbfd; --paper-ink: #13263a; }
:root[data-palette=plum] { --bg: #17101a; --bg2: #221826; --card: #2b1f31; --line: #44304c; --text: #f3e8f5; --muted: #ad9bb3; --accent: #e07ab0; --accent-ink: #2a0a1c; --paper: #f3e8f5; --paper-ink: #2b1a30; }
:root[data-palette=plum][data-scheme=light] { --bg: #f1e9f3; --bg2: #e8dcec; --card: #fcf8fd; --line: #d8c6dd; --text: #2b1a30; --muted: #74607b; --accent: #b23c7f; --accent-ink: #ffffff; --paper: #fcf8fd; --paper-ink: #2b1a30; }
:root[data-palette=mono] { --bg: #121212; --bg2: #1a1a1a; --card: #222222; --line: #343434; --text: #eeeeee; --muted: #9a9a9a; --accent: #e6e6e6; --accent-ink: #111111; --paper: #eeeeee; --paper-ink: #111111; }
:root[data-palette=mono][data-scheme=light] { --bg: #f4f4f4; --bg2: #eaeaea; --card: #ffffff; --line: #d4d4d4; --text: #111111; --muted: #666666; --accent: #222222; --accent-ink: #ffffff; --paper: #ffffff; --paper-ink: #111111; }

/* Camera-brand inspired palettes (not affiliated with the brands) */
:root[data-palette=sony] { --bg: #0f0f10; --bg2: #171718; --card: #1f1f21; --line: #323235; --text: #f2f2f2; --muted: #9c9ca2; --accent: #ff7a1a; --accent-ink: #1a0d00; --paper: #f3efe6; --paper-ink: #24211d; }
:root[data-palette=sony][data-scheme=light] { --bg: #f4f4f5; --bg2: #eaeaec; --card: #ffffff; --line: #d5d5da; --text: #1a1a1c; --muted: #66666d; --accent: #c04f00; --accent-ink: #ffffff; --paper: #fbf9f4; --paper-ink: #24211d; color-scheme: light; }
:root[data-palette=canon] { --bg: #141011; --bg2: #1d1718; --card: #261f20; --line: #3b3032; --text: #f5efef; --muted: #a69a9b; --accent: #e2231a; --accent-ink: #ffffff; --paper: #f3efe6; --paper-ink: #24211d; }
:root[data-palette=canon][data-scheme=light] { --bg: #f7f3f3; --bg2: #eee6e6; --card: #ffffff; --line: #dccfcf; --text: #241a1a; --muted: #71615f; --accent: #c0130b; --accent-ink: #ffffff; --paper: #fbf9f4; --paper-ink: #24211d; color-scheme: light; }
:root[data-palette=nikon] { --bg: #121210; --bg2: #1a1a16; --card: #23231d; --line: #383830; --text: #f4f3ea; --muted: #a3a194; --accent: #ffe100; --accent-ink: #1a1700; --paper: #f3efe6; --paper-ink: #24211d; }
:root[data-palette=nikon][data-scheme=light] { --bg: #f6f5ec; --bg2: #ecebdd; --card: #fffffa; --line: #d9d7c2; --text: #201f16; --muted: #6b6957; --accent: #d6b400; --accent-ink: #1a1700; --paper: #fbf9f4; --paper-ink: #24211d; color-scheme: light; }
:root[data-palette=fujifilm] { --bg: #0f1512; --bg2: #161f1a; --card: #1d2922; --line: #2f4036; --text: #eef5f0; --muted: #97a79d; --accent: #1fbf74; --accent-ink: #04170c; --paper: #f3efe6; --paper-ink: #24211d; }
:root[data-palette=fujifilm][data-scheme=light] { --bg: #eef4f0; --bg2: #e1eae4; --card: #fafdfb; --line: #c8d8ce; --text: #162019; --muted: #5f7066; --accent: #007a44; --accent-ink: #ffffff; --paper: #fbf9f4; --paper-ink: #24211d; color-scheme: light; }
:root[data-palette=lumix] { --bg: #0e1220; --bg2: #161b2c; --card: #1e2438; --line: #30395a; --text: #eef0f8; --muted: #9aa1bb; --accent: #4d86ff; --accent-ink: #031033; --paper: #f3efe6; --paper-ink: #24211d; }
:root[data-palette=lumix][data-scheme=light] { --bg: #eef1f8; --bg2: #e1e6f2; --card: #fbfcff; --line: #c9d2e6; --text: #171b2a; --muted: #5e6680; --accent: #0041c0; --accent-ink: #ffffff; --paper: #fbf9f4; --paper-ink: #24211d; color-scheme: light; }
:root[data-palette=blackmagic] { --bg: #131313; --bg2: #1b1b1b; --card: #242424; --line: #373737; --text: #f1f1f1; --muted: #9d9d9d; --accent: #ff8a2b; --accent-ink: #1c0e00; --paper: #f3efe6; --paper-ink: #24211d; }
:root[data-palette=blackmagic][data-scheme=light] { --bg: #f2f2f2; --bg2: #e8e8e8; --card: #ffffff; --line: #d3d3d3; --text: #1b1b1b; --muted: #666666; --accent: #b84f00; --accent-ink: #ffffff; --paper: #fbf9f4; --paper-ink: #24211d; color-scheme: light; }
:root[data-palette=red] { --bg: #0d0d0d; --bg2: #161616; --card: #1f1f1f; --line: #333333; --text: #f3f3f3; --muted: #9b9b9b; --accent: #e5001f; --accent-ink: #ffffff; --paper: #f3efe6; --paper-ink: #24211d; }
:root[data-palette=red][data-scheme=light] { --bg: #f5f2f2; --bg2: #ebe5e5; --card: #ffffff; --line: #d8cfcf; --text: #1c1818; --muted: #6d6262; --accent: #c0001a; --accent-ink: #ffffff; --paper: #fbf9f4; --paper-ink: #24211d; color-scheme: light; }
:root[data-palette=arri] { --bg: #0c1424; --bg2: #131d31; --card: #1a2640; --line: #2c3b5c; --text: #edf2fa; --muted: #98a5bf; --accent: #5aa9ff; --accent-ink: #02132b; --paper: #f3efe6; --paper-ink: #24211d; }
:root[data-palette=arri][data-scheme=light] { --bg: #edf2f9; --bg2: #dfe7f3; --card: #fbfdff; --line: #c7d3e6; --text: #141c2c; --muted: #5b6a85; --accent: #1f4e9c; --accent-ink: #ffffff; --paper: #fbf9f4; --paper-ink: #24211d; color-scheme: light; }
:root[data-palette=leica] { --bg: #0c0c0c; --bg2: #151515; --card: #1e1e1e; --line: #313131; --text: #f4f4f4; --muted: #9a9a9a; --accent: #e2001a; --accent-ink: #ffffff; --paper: #f3efe6; --paper-ink: #24211d; }
:root[data-palette=leica][data-scheme=light] { --bg: #f4f4f4; --bg2: #eaeaea; --card: #ffffff; --line: #d4d4d4; --text: #161616; --muted: #656565; --accent: #cf0014; --accent-ink: #ffffff; --paper: #fbf9f4; --paper-ink: #24211d; color-scheme: light; }
:root[data-palette=gopro] { --bg: #0b1220; --bg2: #13203a; --card: #1a2a46; --line: #2d4466; --text: #eaf3fb; --muted: #93aac0; --accent: #19b0ff; --accent-ink: #001a2b; --paper: #f3efe6; --paper-ink: #24211d; }
:root[data-palette=gopro][data-scheme=light] { --bg: #eaf4fa; --bg2: #dbe9f3; --card: #f9fdff; --line: #c2d7e6; --text: #12202c; --muted: #54707f; --accent: #006fa6; --accent-ink: #ffffff; --paper: #fbf9f4; --paper-ink: #24211d; color-scheme: light; }
:root[data-palette=dji] { --bg: #111314; --bg2: #191c1e; --card: #212528; --line: #353b3f; --text: #eff2f3; --muted: #9ba5aa; --accent: #9ec5d6; --accent-ink: #08181f; --paper: #f3efe6; --paper-ink: #24211d; }
:root[data-palette=dji][data-scheme=light] { --bg: #eef1f3; --bg2: #e1e6e9; --card: #fbfcfd; --line: #cbd4d9; --text: #171c1f; --muted: #5f6b72; --accent: #3b6b85; --accent-ink: #ffffff; --paper: #fbf9f4; --paper-ink: #24211d; color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 100%; }
html[data-text=large] { font-size: 118%; } html[data-text=xlarge] { font-size: 138%; }
html[data-targets=large] { --hit: 54px; }
@media (pointer: coarse) { :root { --hit: 48px; } html[data-targets=large] { --hit: 58px; } }
body { margin: 0; -webkit-tap-highlight-color: transparent; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overscroll-behavior-y: none; }
#app { max-width: 720px; margin: 0 auto; padding: 0 var(--pad) 48px; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 8px; }
h4 { font-size: .85rem; color: var(--accent); margin: 10px 0 4px; }
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .prewrap { white-space: pre-wrap; }
.spacer, .grow { flex: 1; }
[hidden] { display: none !important; }

/* header */
.top { display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 0 6px; }
.brand { font-weight: 800; letter-spacing: .14em; display: flex; align-items: center; gap: 8px; }
.brand small { font-weight: 500; letter-spacing: .04em; color: var(--muted); text-transform: lowercase; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.cloud { min-height: var(--hit); background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.cloud[data-state=synced] .cloud-ico { color: var(--ok); } .cloud[data-state=error] .cloud-ico, .cloud[data-state=needs-permission] .cloud-ico { color: var(--danger); } .cloud[data-state=saving] .cloud-ico { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* rolodex */
.rolodex { position: sticky; top: 0; z-index: 20; background: linear-gradient(var(--bg) 82%, transparent); padding-bottom: 14px; }
.binder { position: relative; }
.binder::before, .binder::after { content: ''; position: absolute; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #cfc6b4, #6e665a); box-shadow: 0 2px 4px #0008; z-index: 3; }
.binder::before { left: -2px; } .binder::after { right: -2px; }
.drum { height: 128px; perspective: 520px; perspective-origin: 50% 50%; overflow: hidden; position: relative; touch-action: pan-x pinch-zoom; user-select: none; -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.ring { position: absolute; left: 22px; right: 22px; top: 50%; height: 0; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.2, .9, .25, 1.05); }
.tab { position: absolute; left: 0; right: 0; top: -27px; height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 100%, #fff 0%), color-mix(in srgb, var(--paper) 88%, #000 12%)); color: var(--paper-ink); border: 0; border-radius: 12px; font: inherit; cursor: pointer; box-shadow: inset 0 -2px 0 #0002; transition: opacity .4s, filter .4s; }
.tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; border-radius: 0 0 12px 12px; background: var(--accent); opacity: .85; }
.tab[data-d="0"] { box-shadow: 0 6px 18px #0007, inset 0 -2px 0 #0002; }
.tab:not([data-d="0"]) { opacity: .55; filter: brightness(.85); }
.tab[data-d="3"] { opacity: 0; pointer-events: none; }
.tab-ico { font-size: 1.4rem; width: 1.8rem; text-align: center; } .tab-name { font-weight: 700; font-size: 1.05rem; flex: 1; text-align: left; letter-spacing: .02em; } .tab-no { font-variant-numeric: tabular-nums; opacity: .5; font-size: .8rem; margin-right: calc(var(--hit) - 4px); }
.drum-btn { position: absolute; right: 6px; z-index: 4; width: var(--hit); height: var(--hit); display: grid; place-items: center; border: 0; background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--text); border-radius: 8px; cursor: pointer; font-size: .75rem; }
.drum-btn.up { top: calc(50% - var(--hit) - 2px); } .drum-btn.down { top: calc(50% + 2px); }
.drum-btn:hover { background: var(--accent); color: var(--accent-ink); }
.tab:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.page { outline: none; perspective: 1100px; }
.page-card { transform-origin: 50% 0; backface-visibility: hidden; }

/* common */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 0 12px; }
.btn { min-height: var(--hit); justify-content: center; font: inherit; font-weight: 600; border: 1px solid transparent; border-radius: 10px; padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; color: inherit; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.small { padding: 6px 12px; font-size: .9rem; } .btn:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn { background: transparent; border: 0; color: var(--muted); font-size: 1.15rem; cursor: pointer; width: var(--hit); height: var(--hit); border-radius: 10px; flex: none; } .icon-btn:hover { color: var(--accent); background: var(--bg2); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; display: block; width: 100%; text-align: left; color: inherit; font: inherit; }
.card.tap { cursor: pointer; } .card.tap:hover { border-color: var(--accent); }
.card.hero { border-left: 4px solid var(--accent); display: grid; gap: 4px; }
.card.center { text-align: center; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list { display: grid; gap: 0; } .list > .card { margin-bottom: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .actions.center { justify-content: center; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; border: 1px dashed var(--line); border-radius: var(--radius); display: grid; gap: 12px; justify-items: center; }
.empty p { margin: 0; max-width: 34ch; }
.warn { background: color-mix(in srgb, var(--danger) 16%, transparent); border: 1px solid var(--danger); border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: .9rem; }
.pill { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--bg2); color: var(--muted); border: 1px solid var(--line); }
.pill.st-confirmed { color: var(--ok); border-color: var(--ok); } .pill.st-enquiry { color: var(--accent); border-color: var(--accent); } .pill.st-shot { color: var(--blue); border-color: var(--blue); } .pill.st-cancelled { color: var(--danger); border-color: var(--danger); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; } .stat b { font-size: 1.15rem; } .stat span { font-size: .75rem; color: var(--muted); }
.search, input, select, textarea { min-height: var(--hit); font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; min-width: 0; }
.search { margin-bottom: 8px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 4px; scrollbar-width: none; }
.chip { flex: none; min-height: var(--hit); background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .85rem; cursor: pointer; } .chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; flex: none; } .avatar.big { width: 58px; height: 58px; font-size: 1.3rem; }
.crew-card .card-row { justify-content: flex-start; } .crew-card .icon-btn { margin-left: auto; }
.bk-list { margin: 8px 0 0; padding-left: 18px; font-size: .9rem; }
.kv { display: grid; gap: 4px; margin: 8px 0 0; } .kv > div { display: flex; justify-content: space-between; gap: 12px; }
.gear-line { padding: 5px 0; border-bottom: 1px solid var(--line); font-size: .95rem; } .gear-line.clash { color: var(--danger); } .clash-note { font-style: normal; font-size: .8rem; }
.sunline { font-size: .9rem; margin: 0 0 10px; }
.block { margin-bottom: 6px; }

/* calendar */
.cal-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .cal-title { flex: 1; font-weight: 700; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.wd { text-align: center; font-size: .7rem; color: var(--muted); padding: 4px 0; text-transform: uppercase; letter-spacing: .06em; }
.day { min-height: 62px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; font: inherit; color: var(--text); cursor: pointer; text-align: left; overflow: hidden; }
.day.blank { background: transparent; border-color: transparent; cursor: default; }
.day:not(.blank):hover { border-color: var(--accent); }
.day .num { font-size: .8rem; font-weight: 600; } .day.today .num { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 6px; align-self: flex-start; }
.day.has { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.mini { display: none; font-size: .72rem; padding: 1px 4px; border-radius: 4px; background: var(--bg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--muted); }
.mini.st-confirmed, .dots i.st-confirmed { border-color: var(--ok); background-color: color-mix(in srgb, var(--ok) 20%, transparent); } .mini.st-enquiry { border-color: var(--accent); } .mini.st-shot { border-color: var(--blue); } .mini.st-cancelled { border-color: var(--danger); text-decoration: line-through; }
.more { font-size: .65rem; color: var(--muted); }
.dots { display: flex; gap: 3px; margin-top: auto; } .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); } .dots i.st-confirmed { background: var(--ok); } .dots i.st-enquiry { background: var(--accent); } .dots i.st-shot { background: var(--blue); } .dots i.st-cancelled { background: var(--danger); }
@media (min-width: 560px) { .mini { display: block; } .dots { display: none; } .day { min-height: 84px; } }

/* forms / sheets */
.sheet-back { position: fixed; inset: 0; background: #000a; z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--bg); border: 1px solid var(--line); border-radius: 18px 18px 0 0; width: min(640px, 100%); max-height: 92vh; display: flex; flex-direction: column; animation: rise .22s cubic-bezier(.2, .9, .3, 1); }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@media (min-width: 700px) { .sheet-back { align-items: center; } .sheet { border-radius: 18px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 6px; } .sheet-body { overflow: auto; padding: 8px 16px 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .field { display: grid; gap: 4px; align-content: start; } .field.wide, .form-actions { grid-column: 1 / -1; } .field > label { font-size: .8rem; color: var(--muted); font-weight: 600; }
@media (max-width: 480px) { .form { grid-template-columns: 1fr; } }
.field textarea { resize: vertical; }
.rows { display: grid; gap: 6px; margin-bottom: 6px; } .row-edit { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.checks { display: grid; gap: 6px; max-height: 240px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 10px; }
fieldset { border: 0; margin: 0; padding: 0; } legend { font-size: .75rem; color: var(--accent); font-weight: 700; padding: 4px 0; }
.check { display: flex; gap: 12px; align-items: center; padding: 6px 4px; min-height: var(--hit); cursor: pointer; } .check input { width: 26px; height: 26px; accent-color: var(--accent); flex: none; } .check em { color: var(--muted); font-style: normal; font-size: .85rem; }
.form-actions { display: flex; gap: 8px; position: sticky; bottom: -20px; background: var(--bg); padding: 10px 0; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; z-index: 200; font-size: .9rem; animation: rise .25s; max-width: 90vw; } .toast.out { opacity: 0; transition: opacity .4s; }
.stack { display: grid; gap: 8px; } .storage hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.status-line[data-state=synced] { color: var(--ok); } .status-line[data-state=error] { color: var(--danger); }
.file-btn input { display: none; } .note { color: var(--muted); font-size: .9rem; }

/* me */
.id-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.id-card { text-align: center; } .id-card .id-top { text-align: left; }
.seg { display: inline-grid; grid-auto-flow: column; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; margin-bottom: 12px; }
.seg button { min-height: calc(var(--hit) - 6px); border: 0; background: transparent; color: var(--text); font: inherit; font-size: .9rem; padding: 7px 14px; border-radius: 8px; cursor: pointer; } .seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.seg.tools { display: grid; grid-auto-flow: unset; grid-template-columns: repeat(4, 1fr); } .seg.tools button { padding: 8px 4px; font-size: .8rem; }
.qr { width: min(260px, 100%); margin: 0 auto; background: #fff; border-radius: 14px; padding: 10px; color: #333; min-height: 120px; display: grid; place-items: center; font-size: .9rem; } .qr svg { width: 100%; height: auto; display: block; }
.qr-cap { margin: 8px 0 12px; font-size: .85rem; word-break: break-all; }

/* field tools */
.locbar { margin-bottom: 10px; font-size: .9rem; } .locbar .manual { margin-top: 8px; }
.sun-svg { width: 100%; height: auto; display: block; margin: 8px 0; } .sun-svg .below { fill: color-mix(in srgb, var(--bg) 70%, #000); } .sun-svg .horizon { stroke: var(--muted); stroke-width: 1; } .sun-svg .tick { stroke: var(--line); stroke-dasharray: 3 3; } .sun-svg .curve { fill: none; stroke: var(--accent); stroke-width: 2.5; } .sun-svg .sun-dot { fill: #ffd25a; stroke: var(--accent-ink); stroke-width: 2; } .sun-svg .axis { fill: var(--muted); font-size: 10px; }
input[type=range] { min-height: var(--hit); padding: 0; accent-color: var(--accent); background: none; border: 0; }
.sun-now { display: grid; gap: 6px; } .readouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .readout { display: grid; background: var(--bg2); border-radius: 10px; padding: 6px 8px; text-align: left; } .readout span { font-size: .72rem; } .readouts.big .readout b { font-size: 1.3rem; }
.times { display: grid; gap: 2px; } .time-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); } .time-row:last-of-type { border: 0; } .time-row b { font-variant-numeric: tabular-nums; }
.decl { display: flex; gap: 6px; align-items: center; } .decl input { width: 80px; }
.finder { margin-top: 10px; text-align: center; display: grid; gap: 4px; justify-items: center; } .finder.lock { color: var(--ok); font-weight: 700; } .finder .arrow { font-size: 2.2rem; transition: transform .15s linear; }
.cam-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 4/3; } .cam { width: 100%; height: 100%; object-fit: cover; display: block; }
.reticle { position: absolute; left: 50%; top: 50%; width: 18%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(1.78); border: 2px solid #fff; box-shadow: 0 0 0 1px #000a, 0 0 0 9999px #0004; border-radius: 6px; }
.reticle { transform: translate(-50%, -50%); width: 18%; height: auto; }
.wb-panel { display: flex; gap: 14px; align-items: center; margin-top: 12px; } .swatch { width: 64px; height: 64px; border-radius: 12px; border: 2px solid var(--line); background: #777; flex: none; }
.kelvin { font-size: 2rem; font-weight: 800; }
.db { font-size: 3.4rem; font-weight: 800; font-variant-numeric: tabular-nums; } .db-label { min-height: 1.4em; margin: 6px 0 10px; }
.meter { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--ok), var(--accent) 60%, var(--danger)); position: relative; overflow: hidden; }
.meter i { position: absolute; right: 0; top: 0; bottom: 0; display: block; width: 100%; background: var(--bg2); transition: width .1s; }
.spark { width: 100%; height: 70px; margin-top: 10px; background: var(--bg2); border-radius: 10px; }
.provider { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.help summary { cursor: pointer; color: var(--accent); font-size: .85rem; } .help div { margin-top: 6px; word-break: break-word; }
.kit-line { font-size: .9rem; margin-top: 6px; }

/* accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 300; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px; font-weight: 700; } .skip:focus { top: 8px; }
.top-actions { display: flex; gap: 8px; }
button, .btn, a.btn, .chip, .check, .day, .tab, summary { touch-action: manipulation; }
.btn, .chip, .icon-btn, .day, .card.tap, .seg button, .tab, .tc-badge, .sc-badge { transition: transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease, filter .15s ease; }
.btn:active, .chip:active, .icon-btn:active, .day:active, .card.tap:active, .seg button:active, .tc-badge:active, .sc-badge:active { transform: scale(.96); }
@media (hover: hover) { .card.tap:hover { transform: translateY(-1px); box-shadow: 0 4px 14px #0002; } .btn.primary:hover { filter: brightness(1.06); } .day:not(.blank):hover { transform: scale(1.03); } .icon-btn:hover { transform: scale(1.08); } }
.card.tap { min-height: var(--hit); }
.req { color: var(--danger); }
.actions .btn, .card-row .btn { flex: none; }
.actions { gap: 10px; }
.card .actions .btn { flex: 1 1 auto; justify-content: center; }
@media (min-width: 560px) { .card .actions .btn { flex: 0 0 auto; } }
.seg.wide { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; margin: 0; } .pref-label { font-weight: 700; margin-bottom: 6px; } .pref { margin-bottom: 4px; }
.stack .btn, .stack .file-btn { width: 100%; }
.help summary { min-height: var(--hit); display: flex; align-items: center; }
.form-actions .btn { min-width: 96px; }
.page-head .btn { min-width: 88px; }
html[data-contrast=high] { --muted: color-mix(in srgb, var(--text) 82%, var(--bg)); --line: color-mix(in srgb, var(--text) 55%, var(--bg)); --focus: #ffd400; }
html[data-contrast=high] .btn.ghost, html[data-contrast=high] .chip, html[data-contrast=high] .card, html[data-contrast=high] input, html[data-contrast=high] select, html[data-contrast=high] textarea { border-width: 2px; }
html[data-contrast=high] .pill { border-width: 2px; color: var(--text); }
html[data-contrast=high] .tab:not([data-d="0"]) { opacity: .8; }
/* Motion. Default ("soft"): the Rolodex spins, page content fades in, and small touches below run.
   "bar": only the Rolodex. "off": nothing. The device's reduce-motion setting wins over all of them. */
.fade-in { animation: softIn .35s ease-out both; }
@keyframes softIn { from { opacity: 0; } to { opacity: 1; } }
html[data-motion=bar] *:not(.ring):not(.tab), html[data-motion=bar] *::before, html[data-motion=bar] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-motion=off] *, html[data-motion=off] *::before, html[data-motion=off] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .tab, .btn, .chip, .card { border: 1px solid CanvasText; } }
.cloud, .chip { min-width: var(--hit); justify-content: center; }
.seg button { min-height: var(--hit); }
.kv a { min-height: var(--hit); display: inline-flex; align-items: center; }
.card.kv > div { align-items: center; }

.check-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.check-row .check { flex: 1; min-width: 0; }
.stepper { display: flex; align-items: center; flex: none; }
.stepper input { width: 3.2rem; text-align: center; padding-left: 4px; padding-right: 4px; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .icon-btn { border: 1px solid var(--line); color: var(--text); font-size: 1.3rem; }
.qty { color: var(--accent); }

/* venues & maps */
.card-main { all: unset; box-sizing: border-box; display: grid; gap: 4px; width: 100%; cursor: pointer; min-height: var(--hit); } .card-main:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 8px; }
.venue-card { display: grid; gap: 6px; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.perm { font-size: .78rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); white-space: nowrap; }
.perm b { font-weight: 800; }
.perm-allowed { color: var(--ok); border-color: var(--ok); } .perm-ask { color: var(--accent); border-color: var(--accent); } .perm-no { color: var(--danger); border-color: var(--danger); }
.stale { color: var(--danger); }
.matrix { display: grid; gap: 8px; } .matrix-row { display: grid; grid-template-columns: 1fr minmax(9rem, 11rem); gap: 10px; align-items: center; } .matrix-row label { color: var(--text); font-size: .95rem; }
.place { display: grid; gap: 8px; }
.minimap { display: block; position: relative; height: 190px; border-radius: var(--radius); overflow: hidden; background: var(--bg2); border: 1px solid var(--line); margin-bottom: 4px; }
.map-inner { position: absolute; left: 50%; top: 50%; width: 0; height: 0; } .map-inner img { position: absolute; width: 256px; height: 256px; max-width: none; user-select: none; -webkit-user-drag: none; }
.pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); font-size: 2rem; filter: drop-shadow(0 2px 2px #0006); }
.attrib { position: absolute; right: 0; bottom: 0; font-size: .65rem; background: #ffffffcc; color: #333; padding: 1px 5px; }
.v { margin-left: 8px; text-align: right; }

/* timecode notes */
.tc-mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.tc-clock { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; font-size: clamp(2.2rem, 11vw, 3.4rem); font-weight: 700; letter-spacing: .06em; text-align: center; margin: 10px 0 2px; color: var(--accent); }
.tc-clock.unsynced { color: var(--muted); }
.tc-head .muted.small { text-align: center; }
.tc-composer { display: grid; gap: 8px; }
.tc-compose { min-height: 3.2rem; resize: vertical; }
.tc-stamp { color: var(--accent); font-weight: 700; }
.tc-notes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.tc-note { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 10px; }
.tc-badge { background: var(--bg2); border: 1px solid var(--line); color: var(--accent); font-weight: 700; border-radius: 8px; padding: 6px 8px; font-size: .9rem; cursor: pointer; min-height: var(--hit); }
.tc-text { min-height: var(--hit); padding: 8px 4px; outline: none; border-radius: 6px; white-space: pre-wrap; word-break: break-word; } .tc-text:focus { background: var(--bg2); box-shadow: 0 0 0 2px var(--focus); }
.tc-input { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 1.3rem; letter-spacing: .08em; text-align: center; }
.tc-live { text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; }
.tc-cam { aspect-ratio: 16/9; }
.tc-reticle { position: absolute; left: 10%; top: 41%; width: 80%; height: 18%; border: 2px solid #fff; border-radius: 6px; box-shadow: 0 0 0 9999px #0005; }
.tc-scan-result { margin-top: 8px; }
.export-preview { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: .8rem; white-space: pre-wrap; max-height: 40vh; overflow: auto; }
.tc-clock.held { color: var(--text); }
.rollcut { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.rec-btn { min-width: 9rem; font-size: 1.1rem; font-weight: 800; }
.rec-btn.roll { background: var(--danger); color: #fff; border-color: var(--danger); }
.rec-btn.cut { background: var(--text); color: var(--bg); border-color: var(--text); }
.tc-note.take { border-left: 4px solid var(--danger); }
.tc-body { min-width: 0; display: grid; } .tc-dur { padding: 0 4px 4px; }

/* script view */
.tc-views { margin: 10px 0; }
.tc-quote { all: unset; display: block; cursor: pointer; color: var(--accent); font-size: .85rem; padding: 6px 4px 0; min-height: 0; } .tc-quote:focus-visible { outline: 3px solid var(--focus); border-radius: 6px; }
.sc-head { margin: 4px 0 8px; flex-wrap: wrap; } .sc-head .actions { margin: 0; }
.sc-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 10px 8px; display: grid; gap: 2px; user-select: text; -webkit-user-select: text; -webkit-touch-callout: none; }
.sc-para { display: grid; grid-template-columns: 2.6rem 1fr; gap: 4px; padding: 6px 4px; border-radius: 8px; border-left: 3px solid transparent; cursor: pointer; line-height: 1.5; }
.sc-para:hover { background: var(--bg2); }
.sc-para.sel { background: color-mix(in srgb, var(--accent) 16%, var(--card)); border-left-color: var(--accent); }
.sc-para.flash { background: color-mix(in srgb, var(--accent) 30%, var(--card)); }
.sc-text { grid-column: 2; white-space: pre-wrap; word-break: break-word; min-width: 0; }
.sc-gutter { grid-column: 1; grid-row: 1; display: grid; gap: 3px; align-content: start; }
.sc-para > .sc-text:only-child { grid-column: 2; }
.kind-heading .sc-text { font-weight: 800; text-transform: uppercase; letter-spacing: .03em; margin-top: 8px; }
.kind-character .sc-text { text-transform: uppercase; font-weight: 700; padding-left: 22%; margin-top: 4px; }
.kind-paren .sc-text { padding-left: 16%; color: var(--muted); font-style: italic; }
.kind-dialogue .sc-text { padding-left: 10%; padding-right: 6%; }
.kind-transition .sc-text { text-align: right; text-transform: uppercase; color: var(--muted); }
.sc-mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; padding: 1px 0; box-shadow: 0 2px 0 var(--accent); }
.sc-badge { all: unset; display: inline-block; cursor: pointer; font-size: .68rem; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 5px; padding: 1px 5px; margin: 0 3px 0 0; vertical-align: text-top; user-select: none; -webkit-user-select: none; line-height: 1.5; white-space: nowrap; }
.sc-badge:focus-visible { outline: 3px solid var(--focus); }
.sc-gutter .sc-badge { font-size: .62rem; padding: 2px 3px; margin: 0; }
.sc-bar { position: sticky; bottom: 0; z-index: 5; margin-top: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px #0004; }
.sc-bar .actions { margin-top: 8px; } .sc-bar .actions .btn { flex: 1 1 auto; justify-content: center; }
.sc-target { min-width: 0; word-break: break-word; }
.import-preview { display: grid; gap: 6px; } .import-sample { border-left: 3px solid var(--line); padding-left: 10px; display: grid; gap: 2px; }

/* install */
.install-steps { padding-left: 1.3rem; display: grid; gap: 10px; margin: 0; }

/* desktop / tablet layout: same app, more room */
.rolodex { max-width: 720px; margin: 0 auto; }
@media (min-width: 760px) {
  .list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 12px; }
  .stats { max-width: 560px; }
}
@media (min-width: 1000px) {
  #app { max-width: 1120px; }
  .page-card { max-width: 1120px; margin: 0 auto; }
  .page-head h1 { font-size: 1.7rem; }
  /* bookings month: calendar left, what's next right */
  .bk-month { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto auto 1fr; column-gap: 28px; align-items: start; }
  .bk-month > .page-head { grid-column: 1 / -1; }
  .bk-month > .cal-nav { grid-column: 1; grid-row: 2; } .bk-month > .cal { grid-column: 1; grid-row: 3; }
  .bk-month > h3 { grid-column: 2; grid-row: 2; margin: 0; align-self: center; } .bk-month > .list, .bk-month > .empty { grid-column: 2; grid-row: 3; grid-template-columns: 1fr; }
  .bk-month .day { min-height: 110px; }
  /* booking detail: two columns of sections under the header */
  .bk-detail { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; align-items: start; }
  .bk-detail > .page-head, .bk-detail > .hero, .bk-detail > .sunline { grid-column: 1 / -1; }
  .bk-detail .block .list { grid-template-columns: 1fr; }
  /* timecode notes: script beside notes */
  .tc-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 28px; align-items: start; }
  .tc-pane { min-width: 0; }
  .tc-pane > h3 { margin-top: 8px; }
  .tc-head .tc-clock { font-size: 3.6rem; }
  .sc-bar { box-shadow: 0 -6px 18px #0002; }
  /* field tools and forms get a sensible width instead of stretching */
  .tool-body, .locbar { max-width: 760px; }
  .cam-wrap { max-height: 56vh; }
  .sheet { width: min(760px, 100%); }
}

/* device link */
.link-code { width: min(300px, 100%); margin: 0 auto; background: #fff; border-radius: 14px; padding: 10px; display: grid; place-items: center; } .link-code svg { width: 100%; height: auto; display: block; }
.link-text { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .7rem; word-break: break-all; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; user-select: all; -webkit-user-select: all; }
.link-steps { display: grid; gap: 10px; }
.link-state { text-align: center; font-weight: 700; }
.link-state[data-s=connected] { color: var(--ok); }
.scan-wrap { aspect-ratio: 1; max-width: 360px; margin: 0 auto; }
.scan-reticle { position: absolute; left: 12%; top: 12%; width: 76%; height: 76%; border: 2px solid #fff; border-radius: 12px; box-shadow: 0 0 0 9999px #0005; }
.scan-status { text-align: center; margin-top: 6px; }
.linked-pill { color: var(--ok); border-color: var(--ok); }
@media (max-width: 460px) { .brand small { display: none; } }

/* small touches */
.pop-in { animation: popIn .25s cubic-bezier(.2, .8, .3, 1.25) both; }
@keyframes popIn { from { opacity: 0; scale: .94; } to { opacity: 1; scale: 1; } } /* `scale`, not `transform`, so centred elements keep their translate */
.pill.rec { animation: recBlink 1.3s ease-in-out infinite; }
@keyframes recBlink { 50% { opacity: .45; } }
.check input { transition: transform .12s ease; } .check input:active { transform: scale(.9); }
.stat b { display: inline-block; animation: popIn .3s ease-out both; }
.toast { animation: rise .25s cubic-bezier(.2, .9, .3, 1); }

/* tour */
.tour { position: fixed; inset: 0; z-index: 150; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px #000a; transition: top .4s cubic-bezier(.2, .8, .2, 1), left .4s cubic-bezier(.2, .8, .2, 1), width .4s cubic-bezier(.2, .8, .2, 1), height .4s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.tour-spot.center { top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; }
.tour-spot.tour-pulse::after { content: ''; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--accent); animation: tourPulse 1.4s ease-out 2; }
@keyframes tourPulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.12); } }
.tour-card { position: fixed; left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 32px)); background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: 0 12px 40px #0006; animation: popIn .25s ease-out both; }
.tour-card.center { top: 50%; transform: translate(-50%, -50%); }
.tour-card h2 { font-size: 1.15rem; margin: 2px 0 6px; } .tour-card p { margin: 0 0 12px; line-height: 1.45; }
.tour-actions { display: flex; gap: 8px; align-items: center; }

/* range finder & AR */
.seg.tools { grid-template-columns: repeat(5, 1fr); } .seg.tools button { padding: 8px 2px; font-size: .78rem; white-space: nowrap; }
.range-read { font-size: clamp(2rem, 10vw, 3rem); margin: 6px 0 0; }
.range-cam { aspect-ratio: 3/4; max-height: 42vh; margin: 8px 0; }
.xr-crosshair { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; transform: translate(-50%, -50%); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #0008; }
.xr-crosshair::before, .xr-crosshair::after { content: ''; position: absolute; background: #fff; }
.xr-crosshair::before { left: 50%; top: -10px; width: 2px; height: 48px; margin-left: -1px; } .xr-crosshair::after { top: 50%; left: -10px; height: 2px; width: 48px; margin-top: -1px; }
.xr-overlay { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; padding: env(safe-area-inset-top, 0px) 16px env(safe-area-inset-bottom, 0px); }
.xr-top { text-align: center; padding-top: 18px; color: #fff; text-shadow: 0 1px 3px #000; }
.xr-readout { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 2.6rem; font-weight: 800; }
.xr-sub { font-size: .9rem; opacity: .9; }
.xr-bar { display: flex; gap: 10px; justify-content: center; padding-bottom: 24px; pointer-events: auto; } .xr-bar .btn { min-width: 6rem; justify-content: center; }
.xr-overlay .btn.ghost { background: #0008; color: #fff; border-color: #fff8; }

/* settings */
.settings-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.settings-section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px; min-height: var(--hit); font-weight: 700; }
.settings-section > summary::-webkit-details-marker { display: none; }
.settings-section > summary::after { content: '›'; margin-left: auto; color: var(--muted); font-size: 1.3rem; transition: transform .15s ease; }
.settings-section[open] > summary::after { transform: rotate(90deg); }
.settings-section > summary:focus-visible { outline: 3px solid var(--focus); border-radius: var(--radius); }
.ss-status { font-weight: 500; }
.ss-body { padding: 0 14px 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.ss-body .provider, .ss-body .card { background: var(--bg2); }
@media (min-width: 1000px) { .settings-section { max-width: 760px; } }

/* twirl-downs (settings lists) */
.twirl { border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); margin-bottom: 8px; }
.twirl > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 12px; min-height: var(--hit); }
.twirl > summary > span:nth-child(3) { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.twirl > summary::-webkit-details-marker { display: none; }
.twirl > summary::after { content: '›'; color: var(--muted); font-size: 1.2rem; transition: transform .15s ease; }
.twirl[open] > summary::after { transform: rotate(90deg); }
.twirl > summary:focus-visible { outline: 3px solid var(--focus); border-radius: 12px; }
.twirl-ico { font-size: 1.3rem; width: 1.8rem; text-align: center; }
.twirl-name { font-weight: 700; } .twirl-sub { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.twirl-body { padding: 0 12px 12px; display: grid; gap: 8px; }
.twirl .tag { display: inline-block; font-size: .7rem; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.twirl .tag.ok { color: var(--ok); border-color: var(--ok); } .twirl .tag.no { color: var(--danger); border-color: var(--danger); }
.swatches { display: inline-flex; gap: 3px; } .swatches i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #0003; display: inline-block; }
.theme-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; min-height: var(--hit); text-align: left; }
.theme-row[aria-checked=true] { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.theme-row .check { font-weight: 800; color: var(--accent); }
.theme-list { display: grid; gap: 6px; }

/* clock bar */
.clockbar { margin: -4px 0 12px; }
.clock { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 8px; }
.clock.working { border-color: var(--ok); } .clock.on-break { border-color: var(--accent); }
.clock-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.clock-title { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.clock .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.clock.working .dot { background: var(--ok); animation: recBlink 1.3s ease-in-out infinite; } .clock.on-break .dot { background: var(--accent); }
.clock-sub { font-variant-numeric: tabular-nums; }
.clock-btns { display: flex; gap: 8px; align-items: center; } .clock-btns .btn { flex: 1 1 auto; justify-content: center; }
.clock-btns .btn.over { border-color: var(--danger); color: var(--danger); }
.clock-break.overrun { color: var(--danger); font-weight: 700; }
.clock select { width: auto; max-width: 60%; }

/* hours */
.hours .stats { grid-template-columns: repeat(3, 1fr); }
.hours .stat small { font-size: .7rem; }
.hrs-chart-wrap { position: relative; }
.hrs-chart { width: 100%; height: auto; display: block; }
.hrs-chart .grid { stroke: var(--line); stroke-width: 1; }
.hrs-chart .tick { fill: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.hrs-chart .val { fill: var(--text); font-size: 11px; font-weight: 700; }
.hrs-chart .mark { fill: var(--accent); }
.hrs-chart .hit { fill: transparent; }
.hrs-chart .bar:hover .mark, .hrs-chart .bar:focus .mark { filter: brightness(1.15); }
.hrs-chart .bar:focus { outline: none; } .hrs-chart .bar:focus-visible .hit { stroke: var(--focus); stroke-width: 2; fill: color-mix(in srgb, var(--focus) 10%, transparent); }
.hrs-tipwrap { position: relative; height: 0; }
.hrs-tip { position: absolute; top: 0; transform: translateX(-20%); background: var(--text); color: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: .85rem; z-index: 3; white-space: nowrap; pointer-events: none; }
.hrs-tip .muted { color: color-mix(in srgb, var(--bg) 70%, var(--text)); }
.hrs-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 6px; } .hrs-table th, .hrs-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; } .hrs-table th { color: var(--muted); font-weight: 600; }
.hrs-projects { display: grid; gap: 6px; }
.hrs-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 2fr auto; gap: 10px; align-items: center; font-size: .9rem; }
.hrs-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrs-track { height: 12px; background: var(--bg2); border-radius: 0 4px 4px 0; overflow: hidden; } .hrs-track i { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; max-width: 100%; }
.hrs-val { font-variant-numeric: tabular-nums; color: var(--muted); }
.hrs-shift { margin-bottom: 8px; }

.subactions { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 10px; }
@media (min-width: 1000px) { .bk-month > .subactions { grid-column: 1 / -1; } }

.break-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.break-grid .btn { flex-direction: column; gap: 2px; padding: 14px 10px; font-size: 1.05rem; }
.break-grid .btn small { font-weight: 500; font-size: .75rem; opacity: .8; }

/* workflow */
.pill.st-quoted { color: var(--accent); border-color: var(--accent); } .pill.st-prepped { color: var(--ok); border-color: var(--ok); } .pill.st-in-post { color: var(--blue); border-color: var(--blue); } .pill.st-archived { color: var(--muted); }
.mini.st-quoted { border-color: var(--accent); } .mini.st-prepped { border-color: var(--ok); } .mini.st-in-post { border-color: var(--blue); } .dots i.st-quoted { background: var(--accent); } .dots i.st-prepped { background: var(--ok); } .dots i.st-in-post { background: var(--blue); }
.stage-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.stage { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; min-height: 36px; }
.stage.past { color: var(--text); } .stage.now { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.stage-no { font-size: .72rem; font-weight: 800; width: 1.2rem; height: 1.2rem; border-radius: 50%; display: inline-grid; place-items: center; background: color-mix(in srgb, currentColor 18%, transparent); }
.progress { height: 6px; background: var(--bg2); border-radius: 3px; overflow: hidden; margin: 8px 0 10px; } .progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.checklist { display: grid; gap: 2px; }
.check-item { display: flex; align-items: center; gap: 6px; } .check-item .check { flex: 1; min-width: 0; } .check-item.done .check span { color: var(--muted); text-decoration: line-through; }
.workflow .help summary { margin-top: 6px; }
.sub { margin-top: 12px; display: grid; gap: 6px; } .sub h4 { margin: 4px 0 2px; }
.crew-line { display: grid; gap: 6px; } .crew-line select { width: auto; flex: 1; } .crew-line input[type=time] { width: auto; }
.media-grid { display: grid; gap: 4px; font-size: .85rem; }
.media-head, .media-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(5, 1fr) auto; gap: 4px; align-items: center; }
.media-head { color: var(--muted); font-size: .68rem; text-align: center; } .media-head span:first-child { text-align: left; }
.media-row input[type=checkbox] { width: 22px; height: 22px; margin: 0 auto; accent-color: var(--accent); } .media-row.safe .media-label::after { content: ' ✓'; color: var(--ok); }
.media-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overdue { color: var(--danger); font-weight: 700; }
.pipeline { display: grid; gap: 14px; } .pipe-col h3 { margin-top: 0; }
@media (min-width: 1000px) { .pipeline { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: start; } .sheet.wide-sheet { width: min(1100px, 100%); } }
.callsheet { font-size: .82rem; max-height: 50vh; }
.hours .tag { font-size: .7rem; border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; color: var(--muted); font-weight: 500; }

/* ------------------------------ app lock ------------------------------ */
.lock { position: fixed; inset: 0; z-index: 300; background: var(--bg); color: var(--text); display: flex; align-items: center; justify-content: center; padding: 24px max(16px, env(safe-area-inset-left, 0px)); overflow: auto; }
.lock-card { width: min(380px, 100%); text-align: center; }
.lock-card .brand { justify-content: center; margin-bottom: 8px; }
.lock h1 { font-size: 1.25rem; margin: 8px 0 4px; }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin: 14px 0 6px; min-height: 18px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); display: inline-block; }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); }
.lock-msg { min-height: 1.4em; color: var(--danger); font-size: .9rem; margin: 4px 0 8px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px auto 14px; max-width: 320px; }
.keypad .key { min-height: max(64px, var(--hit)); font: inherit; font-size: 1.5rem; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.keypad .key.soft { background: var(--bg2); font-size: 1.3rem; }
.keypad .key:active { transform: scale(.96); }
.lock-bio { width: 100%; margin-bottom: 8px; }
.lock-forgot { text-align: left; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.lock.shake .pin-dots { animation: shake .4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
html[data-motion=off] .lock.shake .pin-dots { animation: none; }
.sheet-back.behind-lock { visibility: hidden; }
.pin-input { font-size: 1.3rem; letter-spacing: .3em; text-align: center; }

/* ------------------------------ call sheet ------------------------------ */
.cs-paper { background: var(--paper); color: var(--paper-ink); border-radius: 10px; padding: 14px; font-size: .84rem; line-height: 1.4; overflow: auto; max-height: 60vh; border: 1px solid var(--line); }
.cs-paper .cs-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid currentColor; padding-bottom: 6px; }
.cs-paper .cs-brand { font-weight: 700; } .cs-paper .cs-kicker { font-size: .68rem; letter-spacing: .2em; opacity: .7; }
.cs-paper .cs-when { text-align: right; font-size: .78rem; opacity: .8; } .cs-paper .cs-when b { display: block; font-size: .9rem; opacity: 1; }
.cs-paper h2 { margin: 10px 0 2px; font-size: 1.2rem; } .cs-paper .cs-sub { opacity: .8; margin-bottom: 6px; }
.cs-paper .cs-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; margin: 8px 0; }
.cs-paper .cs-time { border: 1px solid #0003; border-radius: 8px; padding: 6px 8px; } .cs-paper .cs-time span { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; } .cs-paper .cs-time b { font-size: 1.05rem; }
.cs-paper .cs-sec { margin-top: 12px; } .cs-paper .cs-sec h4 { margin: 0 0 4px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; border-bottom: 1px solid #0002; padding-bottom: 2px; }
.cs-paper .cs-kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px; padding: 2px 0; } .cs-paper .cs-kv span { opacity: .7; } .cs-paper .cs-kv a { color: inherit; word-break: break-all; }
.cs-paper table { width: 100%; border-collapse: collapse; margin: 2px 0 6px; } .cs-paper th, .cs-paper td { text-align: left; vertical-align: top; padding: 4px 5px; border-bottom: 1px solid #0002; font-size: .8rem; } .cs-paper th { font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.cs-paper .cs-day { font-weight: 700; margin: 6px 0 2px; } .cs-paper .cs-pre { white-space: pre-wrap; margin: 3px 0; } .cs-paper .cs-foot { margin-top: 14px; padding-top: 6px; border-top: 1px solid #0002; font-size: .72rem; opacity: .75; }
.sheet .crew-line { margin-bottom: 6px; }

.cs-page .cs-paper { max-height: none; }
.cs-paper.editing { border: 2px dashed var(--accent); }
.cs-paper .cs-in { font: inherit; font-size: .85rem; padding: 5px 7px; border: 1px solid #0004; border-radius: 6px; background: #fff9; color: inherit; width: 100%; box-sizing: border-box; min-height: 36px; }
.cs-paper .cs-time .cs-in { font-weight: 700; font-size: 1rem; }
.cs-paper .cs-sched-edit .row-edit { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.cs-paper .cs-sched-edit .row-edit input { font: inherit; font-size: .85rem; padding: 5px 7px; border: 1px solid #0004; border-radius: 6px; background: #fff9; color: inherit; min-width: 0; min-height: 36px; }
.cs-paper .cs-sched-edit .row-edit input[type=date] { grid-column: 1 / -1; }
.cs-paper .cs-sched-edit .icon-btn { color: inherit; }
.cs-paper .cs-hint { font-size: .74rem; opacity: .7; margin: 4px 0; }
.cs-paper .cs-include { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 8px 0 4px; font-size: .82rem; }
.cs-paper .cs-toggle { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.cs-paper .cs-toggle input { width: 22px; height: 22px; min-height: 0; flex: none; margin: 0; accent-color: var(--accent); }
.cs-paper td .cs-in { min-width: 92px; }
@media print { #print-root { display: block; } }

/* ------------------------------ update bar ------------------------------ */
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 250; display: flex; gap: 10px; align-items: center; background: var(--card); color: var(--text); border: 1px solid var(--accent); border-radius: 999px; padding: 8px 8px 8px 16px; box-shadow: 0 8px 30px #0005; max-width: calc(100% - 32px); font-size: .9rem; }
.update-bar .btn { white-space: nowrap; }
body.has-update-bar #page { padding-bottom: 110px; }
@media (max-width: 480px) { .update-bar { flex-wrap: wrap; justify-content: center; border-radius: 16px; } }

.theme-group { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; display: flex; flex-direction: column; gap: 2px; } .theme-group .twirl-sub { text-transform: none; letter-spacing: 0; }

.cs-paper .money-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.cs-paper .money-parties h4 { margin: 0 0 4px; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.cs-paper .money-totals { margin: 8px 0 0 auto; max-width: 320px; } .cs-paper .money-totals .cs-kv { grid-template-columns: 1fr auto; text-align: right; } .cs-paper .money-totals .total b { font-size: 1rem; }
.cs-paper th.num, .cs-paper td.num { text-align: right; white-space: nowrap; }
.money-pills { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.stat.bad b { color: var(--danger); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; } @media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }
.wxline { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 4px 0 8px; }

#helpBtn .cloud-ico { font-weight: 800; }
.tour-actions .spacer { flex: 1; }

.sheet-tools { display: flex; gap: 4px; align-items: center; }
.sheet-help { font-weight: 800; }

/* Getting paid: Pay buttons, bank QR and payments on the Money page and inside the document */
.cs-paper .pay-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.cs-paper .pay-btn { display: inline-block; padding: 9px 14px; border: 1.5px solid #1a4e8a; border-radius: 10px; color: #1a4e8a; font-weight: 700; text-decoration: none; font-size: 13px; }
.cs-paper .pay-qr { display: flex; gap: 14px; align-items: center; margin: 8px 0; }
.cs-paper .pay-qr svg { width: 112px; height: 112px; flex: none; background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 3px; }
.cs-paper .pay-ref { margin: 6px 0 0; font-size: 12px; color: #444; }
.cs-paper .paid-stamp { display: inline-block; margin: 8px 0; padding: 6px 12px; border: 2px solid #2a8a4a; border-radius: 8px; color: #2a8a4a; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pay-list .card-row + .card-row { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.share-link { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.share-qr svg { width: 180px; height: 180px; background: #fff; padding: 6px; border-radius: 10px; display: block; margin: 0 auto; }

/* Where an item is */
.loc-chip { margin-top: 6px; }
.loc-chip.empty { opacity: .65; }
.gear-line .muted { text-align: right; }
