/* Layout only; chrome colours come from theme.css. Strip fills are the AD's PDF colours (stripboard.py). */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.35 var(--font-ui); -webkit-text-size-adjust: 100%; }
button, .btn, select { font: inherit; color: var(--fg); background: var(--panel); border: 0; border-radius: var(--radius); padding: 8px 12px; cursor: pointer; min-height: 40px; }
button.primary, .btn.primary { background: var(--acc); color: var(--acc-fg); } button.danger { color: var(--danger); }
.btn { display: inline-flex; align-items: center; } .btn input[type=file] { display: none; }
.btn.big { font-weight: 700; text-transform: uppercase; letter-spacing: var(--track-ui); padding: 10px 18px; }
header { position: sticky; top: 0; z-index: 6; display: flex; gap: 6px; align-items: center; padding: calc(env(safe-area-inset-top) + 8px) 8px 8px; }
header h1 { margin: 0; font-size: 20px; }
header .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; box-shadow: none; text-align: left; }
.bar { display: flex; gap: 10px; align-items: center; padding: 8px 10px; flex-wrap: wrap; }
.chk { display: flex; gap: 8px; align-items: center; }
.muted { color: var(--muted); } .note { padding: 0 12px; font-size: 14px; }
.rows { list-style: none; margin: 0; }
.rows li { display: flex; align-items: center; gap: 8px; padding: 12px; }
.rows li .open { flex: 1; display: flex; flex-direction: column; cursor: pointer; min-width: 0; }
.rows li .open b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop { position: fixed; z-index: 20; top: calc(env(safe-area-inset-top) + 56px); left: 10px; right: 10px; max-width: 420px; margin: auto; border-radius: var(--radius); padding: 6px; display: flex; flex-direction: column; max-height: 70vh; overflow: auto; }
.pop button { text-align: left; background: none; box-shadow: none; padding: 12px; }
dialog { background: var(--panel-2); color: var(--fg); border: 0; border-radius: var(--radius-lg); width: min(94vw, 520px); max-height: 92vh; padding: 14px; }
dialog::backdrop { background: var(--backdrop); }
dialog h2 { margin: 0 0 10px; }
dialog label, .lbl { display: block; margin: 6px 0; } dialog label.chk { display: flex; }
dialog input:not([type=checkbox]), dialog textarea, dialog select { display: block; width: 100%; font: inherit; font-size: 16px; padding: 7px 8px; margin-top: 3px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--field); color: var(--fg); }
dialog input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--phosphor); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.step { display: flex; gap: 4px; align-items: center; } .step input { flex: 1; min-width: 0; } .step button { flex: none; padding: 6px 8px; margin-top: 3px; }
.btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; } .btns .sp { flex: 1; } .col { display: flex; flex-direction: column; gap: 6px; }
.warn { color: var(--warn); font-size: 14px; margin: 4px 0; } .warn:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip { font-size: 14px; text-transform: none; padding: 6px 10px; background: var(--hull); color: var(--text-dim); border: 0; }
.chips .chip.on { background: var(--acc); color: var(--acc-fg); clip-path: none; padding-right: 10px; }
#toast { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 60px); background: var(--panel); padding: 10px 14px; border-radius: var(--radius); max-width: 92vw; box-shadow: var(--shadow); }
#update { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 70px); background: var(--panel); padding: 10px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); }
[hidden] { display: none !important; }

/* tabs */
#tabs { position: sticky; top: calc(env(safe-area-inset-top) + 56px); z-index: 5; display: flex; background: var(--hull); border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
#tabs button { flex: 1; min-width: 64px; background: none; box-shadow: none; border-radius: 0; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
#tabs button.on { color: var(--phosphor); box-shadow: inset 0 -3px 0 var(--phosphor); }
#tabs b { color: var(--amber); }
.errbar { background: var(--alert); color: #000; padding: 8px 12px; font-weight: 700; }

/* the page area (console or paper) */
.page { background: var(--paper); color: var(--ink); min-height: calc(100vh - 110px); padding-bottom: calc(env(safe-area-inset-bottom) + 120px); }
.view { max-width: 1100px; margin: 0 auto; }
.view h3 { margin: 14px 10px 6px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--phosphor); }
body.page-paper .view h3 { color: #1F7A4C; }

/* strip board: rows mirror the PDF cells, scaled for touch */
.board { padding: 0 6px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bn { background: #320000; color: #fff; font: 700 15px/1.2 var(--font-ui); letter-spacing: .03em; padding: 9px 10px; border: 1px solid #000; margin-top: -1px; cursor: pointer; display: flex; gap: 8px; flex-wrap: wrap; }
.bn.day { margin-top: 14px; font-size: 16px; } .bn .sub { font-weight: 600; opacity: .8; }
.bn.lunch { font-size: 13px; padding: 6px 10px; } .bn.end { background: #666; font-size: 13px; padding: 6px 10px; cursor: default; }
.st { display: grid; grid-template-columns: 34px 58px 52px minmax(0, 1fr) 58px; align-items: stretch; border: 1px solid #000; margin-top: -1px; color: #000; font-family: Helvetica, Arial, sans-serif; font-size: 13px; position: relative; touch-action: manipulation; }
.st > div { padding: 5px 5px; border-left: 1px solid rgb(0 0 0 / .45); min-width: 0; }
.st > div:first-child { border-left: 0; }
.st .grip { display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: grab; touch-action: none; opacity: .65; }
.st .sc b, .st .ie b { display: block; font-size: 14px; }
.st .set { font-weight: 700; font-size: 12.5px; overflow-wrap: anywhere; } .st .syn { font-size: 12.5px; overflow-wrap: anywhere; }
.st .loc { font-size: 11.5px; opacity: .8; } .st .cast { font-size: 12.5px; overflow-wrap: anywhere; } .st .est { display: none; }
.st .tag { display: inline-block; font: 700 10px/1 var(--font-mono); padding: 2px 4px; margin-right: 3px; background: #000; color: #FFB547; border-radius: 2px; vertical-align: 1px; }
.st .tag.draft { color: #4FD8FF; }
.st.sel { outline: 3px solid var(--phosphor); outline-offset: -2px; z-index: 2; box-shadow: var(--glow); }
.st.dragging { opacity: .9; z-index: 9; box-shadow: 0 10px 24px #000a; pointer-events: none; }
.drop { height: 0; outline: 2px solid var(--amber); box-shadow: 0 0 8px var(--amber); position: relative; z-index: 8; }
.c-int-day { background: rgb(248 248 250); } .c-ext-day { background: rgb(210 211 84); }
.c-int-morning, .c-ext-morning { background: rgb(255 153 153); } .c-int-evening, .c-ext-evening { background: rgb(255 153 51); }
.c-int-night { background: rgb(81 149 40); color: #fff; } .c-ext-night { background: rgb(0 80 133); color: #fff; }
.c-none { background: #fff; background-image: repeating-linear-gradient(45deg, transparent 0 8px, rgb(255 77 94 / .15) 8px 10px); }
.c-int-night .grip, .c-ext-night .grip { color: #fff; }
.empty-day { padding: 8px 10px; font-size: 13px; opacity: .7; border: 1px dashed currentColor; margin-top: -1px; }
@media (min-width: 700px) {
  .st { grid-template-columns: 34px 84px 74px minmax(0, 1fr) 120px 70px; font-size: 14px; }
  .st .est { display: block; } .st .set, .st .syn { font-size: 14px; }
}
/* selected-strip action bar */
#act { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; padding: 6px 6px calc(env(safe-area-inset-bottom) + 6px); }
#act .acts { display: flex; gap: 6px; max-width: 700px; margin: 0 auto; } #act .acts button { flex: 1; padding: 8px 4px; min-height: 46px; }
#act .warn { max-width: 700px; margin: 0 auto 6px; padding: 0 4px; }

/* days, cast, checks lists */
.cards { list-style: none; margin: 0; padding: 6px 8px; display: grid; gap: 6px; }
.cards li { background: var(--hull); color: var(--text); box-shadow: var(--bevel); border-radius: var(--radius); padding: 10px; display: flex; gap: 8px; align-items: center; }
body.page-paper .cards li { background: #f2f2f2; color: #111; box-shadow: inset 0 0 0 1px #ccc; }
.cards li .grow { flex: 1; min-width: 0; } .cards li .grow b { display: block; }
.cards input { font: inherit; font-size: 16px; padding: 6px 8px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--field); color: var(--fg); width: 100%; }
.cards .id { min-width: 52px; font-family: var(--font-mono); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 6px 8px; }
.cal button { padding: 4px 2px; font-size: 13px; line-height: 1.2; min-height: 48px; }
.cal button.shoot { background: var(--phosphor-dim); color: #fff; } .cal button.off { background: #555; color: #ddd; } .cal button.unset { outline: 1px dashed var(--amber); }
.cal .dow { text-align: center; font-size: 12px; opacity: .7; }
.checks li { display: block; font-size: 15px; } .checks li .chip { margin: 4px 4px 0 0; padding: 4px 8px; min-height: 32px; font-size: 13px; }

/* DOOD grid */
.dood-wrap { overflow: auto; margin: 8px 6px; max-height: calc(100vh - 200px); -webkit-overflow-scrolling: touch; }
.dood { border-collapse: collapse; font: 13px/1.2 "Times New Roman", Times, serif; background: #fff; color: #000; }
.dood th, .dood td { border: 1px solid #000; padding: 3px 5px; text-align: center; min-width: 42px; white-space: nowrap; }
.dood th.nm, .dood td.nm { position: sticky; left: 0; background: #fff; text-align: left; z-index: 1; min-width: 120px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.dood thead th { position: sticky; top: 0; background: #fff; z-index: 2; } .dood thead tr:nth-child(2) th { top: 21px; } .dood thead tr:nth-child(3) th { top: 42px; }
.dood thead th.nm { z-index: 3; }
.dood .off { background: rgb(224 224 224); } .dood .tot { background: #f4f4f4; font-weight: 700; }
#tabs button { white-space: nowrap; padding: 8px 6px; }
@media (max-height: 460px) { #proj header { position: static; } #tabs { top: 0; } .bar { padding: 4px 10px; } }
