/* Autoposter Studio: "Clean Light" design. Warm off-white, white cards, ink text, coral accent. */
:root {
  --bg: #f6f4ef;
  --bar: #fbfaf7;
  --card: #fff;
  --line: #e7e3da;
  --line2: #d6d0c3;
  --soft: #f0ede6;
  --chip: #efebe3;
  --text: #1b1a17;
  --muted: #77736a;
  --faint: #b3ad9f;
  --acc: #ff5a36;
  --acc-d: #e84a27;
  --acc-soft: #fff0eb;
  --green: #1f9d63;
  --green-soft: #e6f6ee;
  --warn: #b7791f;
  --warn-soft: #fdf5e4;
  --red: #d33a2c;
  --red-soft: #fdecea;
  --blue: #3a6ea5;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  --r: 16px;
  --shadow: 0 1px 2px #0000000d;
  --shadow-lg: 0 24px 70px #0000002e, 0 2px 8px #00000012;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --topbar: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
body.modal-open { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg, video { display: block; }
code { font-family: var(--mono); font-size: .9em; background: var(--soft); padding: .08em .35em; border-radius: 5px; }
kbd { display: inline-flex; align-items: center; min-height: 18px; font: 600 11px var(--sans); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; background: var(--card); color: var(--text); }
pre { margin: 0; }
::selection { background: #ffd6ca; }

/* ------------------------------------------------------------------ utilities */
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.gap6 { gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.muted { color: var(--muted); }
.sm { font-size: 12.5px; }
.cm { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.mono { font-family: var(--mono); font-size: .92em; }
.serif { font-family: var(--serif); font-weight: 400; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ellip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ok-t { color: var(--green); display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.warn-t { color: var(--warn); display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.err-t { color: var(--red); }
.show-phone { display: none !important; }
.ic { flex: none; }

.display { font: 400 40px/1.05 var(--serif); letter-spacing: -.01em; }
.display em { color: var(--acc); }
h2.serif { font-size: 26px; line-height: 1.1; letter-spacing: -.005em; }
.eyebrow { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--text);
  background: var(--text); color: #fff; border-radius: 10px; padding: 9px 16px; font-weight: 600; font-size: 14px;
  line-height: 20px; white-space: nowrap; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, opacity .15s, transform .05s;
  user-select: none; -webkit-user-select: none;
}
.btn:hover { background: #33312c; border-color: #33312c; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.busy { opacity: .8; }
.btn.acc { background: var(--acc); border-color: var(--acc); }
.btn.acc:hover { background: var(--acc-d); border-color: var(--acc-d); }
.btn.line { background: var(--card); color: var(--text); border-color: var(--line); }
.btn.line:hover { border-color: var(--line2); background: #fdfcfa; }
.btn.ghost { background: transparent; color: var(--text); border-color: transparent; }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { color: var(--red); }
.btn.line.danger:hover { border-color: #f0b8b0; background: var(--red-soft); }
.btn.ghost.danger:hover { background: var(--red-soft); }
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-solid:hover { background: #b92f22; border-color: #b92f22; }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 9px; gap: 5px; }
.btn.lg { padding: 14px 20px; font-size: 15px; border-radius: 12px; }
.btn.block { display: flex; width: 100%; }
.btn.grow { flex: 1; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent;
  color: var(--text); cursor: pointer; flex: none; text-decoration: none;
}
.icon-btn:hover { background: var(--soft); }
.icon-btn:disabled { opacity: .3; cursor: default; background: none; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.linkish { background: none; border: 0; padding: 0; color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; }
.linkish:hover { text-decoration: underline; }
.linkish.danger { color: var(--red); }
.linkish:disabled { opacity: .4; }
.icon-link { color: var(--muted); display: inline-flex; }
.icon-link:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.btn:focus-visible, .icon-btn:focus-visible { outline-offset: 2px; }

/* ------------------------------------------------------------------ chips, badges */
.chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; line-height: 18px; border: 1px solid var(--line);
  border-radius: 30px; padding: 3px 11px; color: var(--muted); background: var(--card); white-space: nowrap; text-decoration: none; font-weight: 500;
}
button.chip, a.chip { cursor: pointer; }
button.chip:hover, a.chip:hover { border-color: var(--line2); color: var(--text); }
.chip.on { border-color: var(--text); color: var(--text); font-weight: 600; }
.chip.sm { font-size: 11.5px; padding: 1px 8px; }
.chip.tag { background: var(--chip); border-color: transparent; color: var(--text); padding: 3px 10px; }
.chip.tag.on { background: var(--text); color: #fff; border-color: var(--text); font-weight: 500; }
button.chip.tag:not(.on) { color: var(--muted); }
.chip.dashed { border-style: dashed; border-color: #cfc8b8; background: transparent; color: var(--text); }
.chip.green { background: var(--green-soft); border-color: transparent; color: var(--green); font-weight: 600; }
.chip.acc { background: var(--acc-soft); border-color: transparent; color: var(--acc-d); font-weight: 600; }
.chip.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); font-weight: 600; }
.chip.red { background: var(--red-soft); border-color: transparent; color: var(--red); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 6px; border-radius: 20px; background: var(--acc); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 30px; padding: 6px 14px; font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.running .dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.paused .dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.external .dot { background: var(--blue); box-shadow: 0 0 0 3px #e7eef7; }
.stopped .dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

/* ------------------------------------------------------------------ inputs */
.input {
  width: 100%; font: inherit; font-size: 14px; color: var(--text); background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s; min-width: 0;
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px #ff5a3622; }
.input.sm { padding: 6px 10px; font-size: 13px; width: auto; }
.input.lg { padding: 13px 14px; font-size: 16px; }
textarea.input { resize: vertical; line-height: 1.45; min-height: 44px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2377736a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; }
select.input.sm { padding-right: 30px; background-position: right 9px center; }
input[type=time].input { width: auto; padding: 7px 10px; }
input[type=range] { width: 100%; accent-color: var(--acc); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lbl { font-size: 12.5px; font-weight: 600; color: var(--text); }
.hint { font-size: 12px; color: var(--muted); line-height: 1.4; }
.err { font-size: 12.5px; color: var(--red); }
.err-line { color: var(--red); font-size: 13px; display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.set-f .err-line, .modal-f .err-line { margin-top: 0; }
.num-in { position: relative; display: flex; align-items: center; min-width: 0; }
.num-in .input { padding-right: 12px; }
.num-in.has-suf .input { padding-right: 48px; }
.num-in .suf { position: absolute; right: 12px; color: var(--muted); font-size: 12.5px; pointer-events: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .span2 { grid-column: 1 / -1; }
.sub-h { font-weight: 600; font-size: 13.5px; padding-top: 6px; }
.sub-h .muted { font-weight: 400; }
.pw { position: relative; }
.pw .icon-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.color-in { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px 4px 4px; background: var(--card); cursor: pointer; font-size: 13px; }
.color-in input { width: 30px; height: 28px; border: 0; padding: 0; background: none; cursor: pointer; }
.fc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.fc-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }

/* toggle */
.toggle { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 38px; height: 22px; border-radius: 22px; background: #dcd6ca; position: relative; flex: none; transition: background .15s; margin-top: 1px; }
.toggle .knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0003; transition: transform .15s; }
.toggle input:checked + .track { background: var(--text); }
.toggle input:checked + .track .knob { transform: translateX(16px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--acc); outline-offset: 2px; }
.toggle .tl { display: flex; flex-direction: column; font-weight: 500; line-height: 1.35; padding-top: 1px; }
.toggle .tl small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.toggle.dis { opacity: .45; cursor: default; }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }

/* segmented */
.seg { display: inline-flex; background: var(--soft); border-radius: 11px; padding: 3px; gap: 2px; max-width: 100%; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px #0000001a; font-weight: 600; }
.seg.sm button { padding: 5px 11px; font-size: 13px; }
.seg .cnt { font-size: 11px; background: var(--chip); border-radius: 20px; padding: 0 6px; color: var(--muted); font-weight: 600; }
.seg button.on .cnt { background: var(--acc-soft); color: var(--acc-d); }
.seg-scroll { overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }

/* times editor */
.times { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.time-item { display: inline-flex; align-items: center; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 2px 4px 2px 2px; }
.time-item .input { border: 0; box-shadow: none; padding: 5px 6px; font-weight: 600; }
.time-item .input:focus { box-shadow: none; }

/* ------------------------------------------------------------------ cards, alerts */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; text-decoration: none; }
.alert > .ic { margin-top: 1px; }
.alert.sm { padding: 9px 12px; font-size: 13px; align-items: center; }
.alert.warn { background: var(--warn-soft); color: #6b4a12; }
.alert.warn > .ic { color: var(--warn); }
.alert.error { background: var(--red-soft); color: #7a2119; }
.alert.error > .ic { color: var(--red); }
.alert .btn { margin-left: auto; align-self: center; }
.note-box { display: flex; gap: 8px; align-items: flex-start; background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #4d4a43; line-height: 1.45; }
.note-box .ic { margin-top: 2px; color: var(--muted); }
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); margin-bottom: 8px; }
.empty-t { font: 400 26px var(--serif); }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 28px 2px; }
.spin { display: inline-block; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; opacity: .7; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* progress + steps (mockup "In progress" card) */
.prog { height: 6px; background: var(--soft); border-radius: 9px; margin-top: 10px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--acc); border-radius: 9px; transition: width .6s ease; }
.prog.indet i { animation: indet 1.4s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border: 0; padding-bottom: 0; }
.step b { font-weight: 600; }
.step.todo b { color: var(--muted); font-weight: 500; }
.tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; margin-top: 1px; }
.tick.done { background: var(--green-soft); color: var(--green); }
.tick.now { background: var(--acc-soft); color: var(--acc); }
.tick.now { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px #ff5a3618; } }
.tick.todo { background: var(--soft); color: var(--faint); }
.tick.fail { background: var(--red-soft); color: var(--red); }

/* dots for posted x/3 */
.dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line2); }
.dots i.on { background: var(--green); border-color: var(--green); }

/* platform mark */
.pmark { display: inline-grid; place-items: center; flex: none; }
.pmark svg { width: 100%; height: 100%; }

/* thumbnails */
.thumb { aspect-ratio: 9 / 16; border-radius: 12px; position: relative; overflow: hidden; background: #e4dfd5; box-shadow: 0 1px 3px #0002; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.thumb .len { position: absolute; right: 8px; bottom: 8px; background: #fffe; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 20px; color: var(--text); }
.thumb .score { position: absolute; left: 8px; top: 8px; background: #1b1a17cc; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 20px; backdrop-filter: blur(4px); }
.thumb.clickable { cursor: pointer; }
.play-ov { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; opacity: 0; transition: opacity .15s; background: #0000002a; }
.play-ov .ic { filter: drop-shadow(0 2px 6px #0006); }
.thumb:hover .play-ov, .clip-card:hover .play-ov, .clip-card:focus-visible .play-ov { opacity: 1; }
.play-ov.sm { opacity: .9; background: none; }

/* ------------------------------------------------------------------ shell */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 22px;
  padding: 0 28px; border-bottom: 1px solid var(--line); background: #fbfaf7f2; backdrop-filter: saturate(1.4) blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.brand-t { font: 400 24px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.brand-t i { color: var(--acc); }
.nav { display: flex; gap: 2px; min-width: 0; }
.nav-i { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 8px; color: var(--muted); font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav-i:hover { color: var(--text); background: #00000006; }
.nav-i.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px #0000001a, 0 0 0 1px #0000000a; }
.sched { color: var(--text); }
.sched:hover { border-color: var(--line2); }
.bell { position: relative; }
.bell-btn { position: relative; }
.bell-btn.on { background: var(--soft); }
.bell-n { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 10px; background: var(--acc); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bar); }
.bell-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 380px; max-height: 70vh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 50; overflow: hidden; }
.bell-h { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bell-list { overflow: auto; }
.bell-empty { display: flex; gap: 10px; align-items: center; padding: 22px 16px; color: var(--muted); }
.bell-empty .ic { color: var(--green); }
.note { display: flex; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.note:last-child { border: 0; }
.note-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--warn-soft); color: var(--warn); }
.note.error .note-ic { background: var(--red-soft); color: var(--red); }
.note-a { display: flex; gap: 14px; margin-top: 5px; }
.note-a a { font-weight: 600; font-size: 13px; text-decoration: none; color: var(--acc-d); }
.note-a .linkish { color: var(--muted); font-weight: 500; }

.main { min-height: calc(100vh - var(--topbar)); }
.page { max-width: 1240px; margin: 0 auto; padding: 30px 40px 64px; }
.page.narrow { max-width: 640px; }
.page-h { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-a { display: flex; gap: 8px; flex-wrap: wrap; }
.sec-h { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 14px; min-width: 0; }
.offline { background: var(--red-soft); color: #7a2119; padding: 8px 20px; font-size: 13px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); padding: 20px; text-align: center; }
.splash img { border-radius: 14px; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 9px; background: var(--text); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500; animation: toastin .2s ease-out; max-width: 560px; }
.toast.ok .ic { color: #6be3a7; }
.toast.error { background: #7a2119; }
@keyframes toastin { from { transform: translateY(8px); opacity: 0; } }

/* modal */
.modal-back { position: fixed; inset: 0; z-index: 80; background: #1b1a1752; backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px; animation: fade .15s; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; animation: pop .18s ease-out; }
.modal.wide { max-width: 760px; }
.modal.preview { max-width: 440px; }
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: 0; } }
.modal-h { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 4px; }
.modal-t { font: 400 26px/1.15 var(--serif); }
.modal-h .icon-btn { margin: -4px -8px 0 0; }
.modal-b { padding: 14px 22px 20px; overflow-y: auto; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); background: #fcfbf8; border-radius: 0 0 20px 20px; flex-wrap: wrap; }
.confirm-body { line-height: 1.55; }
.confirm-body p + p { margin-top: 8px; }
.modal.confirm .field { margin-top: 14px; }

/* ------------------------------------------------------------------ dashboard */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.hero { margin-bottom: 6px; }
.hero .display { max-width: 640px; }
.hero-a { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.hero-next { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; }
.warns { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ch-card { display: flex; flex-direction: column; gap: 14px; }
.ch-card.off { background: #fdfcfa; }
.ch-card.off .ch-stats .v { color: var(--muted); }
.ch-stats { display: grid; grid-template-columns: 1.15fr 1fr .8fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ch-stats .k { font-size: 11.5px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.ch-stats .v { font-weight: 600; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.ch-stats .v.big { font: 400 32px/1 var(--serif); }
.ch-stats .v.low { color: var(--acc); }
.ch-foot { display: flex; flex-direction: column; gap: 7px; }
.ch-foot .row { color: #4d4a43; }
.ch-foot .row > .ic { color: var(--muted); }
.ch-check { margin-top: 2px; }
.dash-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--topbar) + 24px); }
.sched-card { display: flex; flex-direction: column; gap: 12px; }
.sched-badge { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); flex: none; }
.sched-badge .dot { width: 10px; height: 10px; }
.sched-meta { margin-top: -2px; }
.sched-card.compact { margin-top: 18px; }
.quick b { display: block; margin-bottom: 2px; }
.job-active .row b { font-weight: 600; }
.phone-card { display: flex; flex-direction: column; gap: 12px; }
.phone-qr { display: flex; gap: 14px; align-items: center; }
.qr { flex: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.qr svg { width: 100%; height: 100%; }
.qr.ph { background: var(--soft); }
.url-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 5px 9px; margin-top: 6px; cursor: pointer; font-weight: 600; font-size: 13px; max-width: 100%; word-break: break-all; text-align: left; }
.url-btn:hover { border-color: var(--line2); }
.howto summary { cursor: pointer; font-weight: 600; font-size: 13px; list-style: none; display: flex; align-items: center; gap: 6px; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--soft); font-weight: 700; font-size: 13px; }
.howto[open] summary::before { content: "–"; }
.howto ol { margin: 10px 0 0; padding-left: 20px; font-size: 13px; color: #4d4a43; display: flex; flex-direction: column; gap: 5px; }
.result { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.caption-pre { white-space: pre-wrap; font: 13px/1.45 var(--sans); background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-top: 6px; color: #3a3833; max-height: 180px; overflow: auto; }

/* ------------------------------------------------------------------ make clips */
.make { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.new-job { margin-top: 22px; position: relative; }
.new-job.drag { border-color: var(--acc); box-shadow: 0 0 0 4px #ff5a3618; }
.drop { border: 1.5px dashed var(--line2); border-radius: 12px; padding: 10px 10px 10px 16px; display: flex; gap: 10px; align-items: center; margin-top: 14px; background: #fdfcfa; }
.field-in { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--text); outline: none; padding: 8px 0; }
.field-in::placeholder { color: var(--muted); }
.drop:focus-within { border-color: var(--acc); }
.opts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.range { display: flex; gap: 10px; align-items: flex-end; margin-top: 14px; flex-wrap: wrap; }
.range label { display: flex; flex-direction: column; gap: 4px; width: 130px; }
.range .cm { padding-bottom: 10px; }
.drop-hint { position: absolute; inset: 0; border-radius: var(--r); background: #fff0ebe6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--acc-d); pointer-events: none; }
.uploads { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.upload { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.upload > .ic { color: var(--muted); }
.upload.done > .ic { color: var(--green); }
.upload.error > .ic { color: var(--red); }
.upload .prog { margin: 6px 0 4px; }
.upload.paused .prog i { background: var(--faint); }
.job-list { display: flex; flex-direction: column; gap: 10px; }
.job-row { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.job-row.cancelled { opacity: .7; }
.job-live .prog { margin: 0 0 6px; }
.mini-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; }
.mini-clip { text-decoration: none; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.thumb.mini { border-radius: 9px; }
.mini-t { font-size: 12px; font-weight: 600; line-height: 1.3; }
a.mini-clip:hover .mini-t { text-decoration: underline; }
.make-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--topbar) + 24px); }
.how-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: #4d4a43; }
.how-list li { display: flex; gap: 10px; }
.how-list span { width: 22px; height: 22px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; color: var(--muted); }

/* ------------------------------------------------------------------ review */
.rg-group .sec-h { margin-top: 26px; }
.rg-group:first-of-type .sec-h { margin-top: 8px; }
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px 16px; }
.clip-card { text-decoration: none; display: block; min-width: 0; border-radius: 14px; }
.clip-card .thumb { transition: transform .15s, box-shadow .15s; }
.clip-card:hover .thumb { transform: translateY(-2px); box-shadow: 0 8px 22px #0000002a; }
.ct { font-weight: 600; font-size: 13.5px; margin-top: 9px; line-height: 1.3; }
.review-player { max-width: 1280px; padding-top: 18px; padding-bottom: 24px; }
.rp-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.kbd-hint { font-size: 12px; color: var(--muted); display: inline-flex; gap: 5px; align-items: center; margin-right: 8px; }
.kbd-hint kbd + kbd { margin-left: -2px; }
.rp { display: grid; grid-template-columns: auto minmax(340px, 1fr); gap: 28px; align-items: start; }
.rp-video { height: calc(100vh - var(--topbar) - 92px); min-height: 440px; aspect-ratio: 9 / 16; max-width: 52vw; }
.player { position: relative; width: 100%; height: 100%; background: #111; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px #00000026; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #111; }
.rp-side { display: flex; flex-direction: column; height: calc(100vh - var(--topbar) - 92px); min-height: 440px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.rp-scroll { flex: 1; overflow-y: auto; padding: 20px 22px; }
.rp-acts { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fcfbf8; }
.rp-acts .btn { padding: 12px 18px; font-size: 15px; }
.details { display: flex; flex-direction: column; gap: 16px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact { background: var(--bg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.fact .k { font-size: 11.5px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.fact .v { font-weight: 700; font-size: 13px; letter-spacing: .01em; }
.why { background: var(--acc-soft); border-radius: 12px; padding: 12px 14px; }
.why .row { color: var(--acc-d); gap: 6px; }
.why p { margin-top: 4px; color: #4d3a33; font-size: 13.5px; }
.src { display: flex; flex-direction: column; gap: 6px; font-size: 13px; border-top: 1px solid var(--line); padding-top: 14px; }
.src .k { width: 58px; color: var(--muted); flex: none; }
.src a { color: var(--text); }
.src .ic { color: var(--muted); }
.tagchooser { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.taginput { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.aa-strip { display: flex; gap: 6px; align-items: center; overflow: hidden; }
.aa-strip .thumb { width: 38px; flex: none; border-radius: 6px; }

/* phone review (mockup phone frame) */
.m-review { padding: 6px 16px 18px !important; }
.m-rh { display: flex; align-items: center; gap: 6px; margin: 0 -8px 10px; }
.m-title { font-size: 30px; line-height: 1.05; }
.m-review .player { height: auto; aspect-ratio: 9 / 13; max-height: calc(100svh - 360px); min-height: 300px; border-radius: 18px; }
.m-meta { padding: 14px 2px 0; display: flex; flex-direction: column; gap: 4px; }
.m-ct { font-size: 15px; line-height: 1.3; }
.m-meta .chips { margin-top: 8px; }
.m-acts { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 14px 0 0; }
.m-acts .btn { padding: 15px 14px; }
.m-acts2 { display: flex; align-items: center; padding: 14px 2px 0; }

/* ------------------------------------------------------------------ queue */
.q-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.q-name { font-size: 16px; }
.queue .note-box { margin-bottom: 12px; }
.q-list { display: flex; flex-direction: column; gap: 10px; }
.q-item { display: flex; gap: 16px; align-items: flex-start; padding: 14px 16px; }
.q-pos { font-size: 28px; line-height: 1; width: 30px; text-align: center; color: var(--muted); padding-top: 4px; flex: none; }
.q-item:first-child .q-pos { color: var(--acc); }
.q-thumb { width: 68px; flex: none; border-radius: 10px; }
.q-body { display: flex; flex-direction: column; gap: 6px; }
.q-t { font-size: 14.5px; line-height: 1.3; }
.q-c { font-size: 13px; color: #4d4a43; }
.q-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; min-width: 0; }
.q-when { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 600; }
.q-acts { display: flex; flex-direction: column; gap: 4px; align-items: stretch; flex: none; }
.edit-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.post-prev { display: flex; flex-direction: column; gap: 8px; }
.post-prev .lbl { font-size: 12.5px; }
.pp-card { background: var(--bg); border-radius: 12px; padding: 12px 14px; font-size: 13px; }
.pp-card pre { white-space: pre-wrap; font: 13px/1.45 var(--sans); margin-top: 6px; color: #3a3833; }
.modal.preview .player { aspect-ratio: 9 / 16; max-height: 62vh; height: auto; margin: 0 auto; width: auto; }

/* ------------------------------------------------------------------ history */
.checks { border-color: #f1dcb1; background: #fffcf5; margin-bottom: 18px; }
.checks .row .ic { color: var(--warn); }
.check-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid #f1e6cf; }
.filters { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.table-card { padding: 0; overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; table-layout: auto; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 11px 16px; border-bottom: 1px solid var(--line); background: #fcfbf8; }
.tbl td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13.5px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.attn td { background: #fffcf5; }
.tbl .vid-cell { max-width: 360px; }
.tbl td.right .btn { margin-left: 4px; }
.h-cards { display: flex; flex-direction: column; gap: 8px; }
.h-card { padding: 12px 14px; }
.h-card.attn { border-color: #f1dcb1; background: #fffcf5; }

/* ------------------------------------------------------------------ channels */
.channels > .alert { margin-bottom: 18px; }
.ch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.ch-row { display: flex; flex-direction: column; gap: 14px; }
.ch-row.off { background: #fdfcfa; }
.ch-name { font-size: 16px; }
.ch-facts { display: flex; flex-direction: column; gap: 6px; font-size: 13px; border-top: 1px solid var(--line); padding-top: 12px; }
.ch-facts > div { display: flex; gap: 10px; min-width: 0; align-items: baseline; }
.ch-facts .k { width: 76px; flex: none; color: var(--muted); }
.ch-acts { border-top: 1px solid var(--line); padding-top: 12px; gap: 8px; }
.plat-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.plat-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px; background: var(--card); cursor: pointer; font-size: 12.5px; font-weight: 600; text-align: center; }
.plat-opt.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.steps-ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: #3a3833; }
.step-h { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.step-h .num { width: 22px; height: 22px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.done-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 12px 0; }
.done-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }

/* ------------------------------------------------------------------ settings */
.set-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.set-nav { position: sticky; top: calc(var(--topbar) + 24px); display: flex; flex-direction: column; gap: 2px; }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 500; }
.set-nav a:hover { color: var(--text); background: #00000006; }
.set-nav a.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px #0000001a, 0 0 0 1px #0000000a; }
.set-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.set-sec { padding: 22px 24px; scroll-margin-top: calc(var(--topbar) + 20px); }
.set-h { margin-bottom: 18px; }
.set-h h2 { margin-bottom: 3px; }
.set-f { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); margin: 20px -24px -22px; padding: 14px 24px; background: #fcfbf8; border-radius: 0 0 var(--r) var(--r); flex-wrap: wrap; }
.pw-form .set-f { margin-bottom: 0; border-radius: 0; }
.set-sec > .set-f:last-child { margin-bottom: -22px; }
.more-t { display: inline-flex; align-items: center; gap: 4px; margin: 18px 0 14px; color: var(--muted); }
.key-state { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg); border-radius: 12px; margin-bottom: 12px; }
.key-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); flex: none; }
.key-ic.ok { background: var(--green-soft); color: var(--green); }
.key-row { margin-bottom: 8px; }
.phone-acc { margin-bottom: 8px; }
.pa-qr { display: flex; gap: 16px; align-items: center; }
.pw-form { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.bk-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.bk { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.bk:last-child { border: 0; }
.bk .ic { color: var(--muted); }
.log-tools { margin-bottom: 10px; }
.logbox { background: #1b1a17; color: #e8e4da; border-radius: 12px; padding: 12px 14px; height: 340px; overflow: auto; font: 12px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; }
.logbox .ll.e { color: #ff9a85; }
.logbox .ll.w { color: #f5cf7a; }

/* ------------------------------------------------------------------ login */
.login { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px calc(24px + var(--safe-b)); }
.login-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 34px 30px 26px; text-align: center; box-shadow: 0 20px 60px #0000000f; }
.login-card form { text-align: left; }
.login-mark { margin: 0 auto 16px; border-radius: 15px; box-shadow: 0 8px 20px #ff5a3640; }
.login-card .display { margin-bottom: 8px; }
.hint-line { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--muted); margin-top: 18px; text-align: left; }
.hint-line .ic { margin-top: 2px; }
.login-foot { font-size: 12.5px; margin-top: 18px; text-align: center; max-width: 360px; }
.setup-hero { display: flex; gap: 14px; align-items: flex-start; }
.setup-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; flex: none; }

/* more (phone) */
.more .display { margin-bottom: 16px; }
.more-list { padding: 4px 0; }
.more-i { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; border-bottom: 1px solid var(--line); width: 100%; text-align: left; cursor: pointer; }
.more-list .more-i:last-child { border: 0; }
.more-i .grow { display: flex; flex-direction: column; }
.more-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--bg); display: grid; place-items: center; flex: none; }
.more-i.logout { margin-top: 14px; border: 1px solid var(--line); background: var(--card); color: var(--red); }

/* ------------------------------------------------------------------ responsive: medium desktop windows */
@media (max-width: 1240px) {
  .topbar { gap: 16px; padding: 0 20px; }
  .page { padding: 26px 28px 56px; }
  .sched span { display: none; }
  .sched { padding: 9px; }
}
@media (max-width: 1120px) {
  .dash { grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; }
  .make { grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; }
  .rp { grid-template-columns: auto minmax(320px, 1fr); gap: 20px; }
  .hide-narrow { display: none !important; }
}
@media (max-width: 1040px) {
  .brand-t { display: none; }
  .nav-i { padding: 7px 9px; }
  .set-wrap { grid-template-columns: 170px minmax(0, 1fr); gap: 20px; }
  .ch-list { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .dash, .make { grid-template-columns: minmax(0, 1fr); }
  .dash-side, .make-side { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .q-acts { flex-direction: row; flex-wrap: wrap; }
  .q-item { flex-wrap: wrap; }
  .q-acts { width: 100%; padding-left: 114px; }
  .q-body { flex: 1 1 0; min-width: 0; }
}

/* ------------------------------------------------------------------ phone */
@media (max-width: 760px) {
  :root { --topbar: 56px; }
  html { scroll-padding-top: 70px; }
  body { font-size: 15px; }
  .show-phone { display: inline-flex !important; }
  .hide-phone { display: none !important; }
  .mbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 6px; height: calc(var(--topbar) + var(--safe-t));
    padding: var(--safe-t) 10px 0 16px; background: #fbfaf7f2; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  }
  .mbar .brand-t { display: inline; font-size: 22px; }
  .mbar .brand-mark { width: 28px; height: 28px; }
  .sched-dot { width: 36px; height: 36px; display: grid; place-items: center; }
  .immersive .mbar { display: none; }
  .main { min-height: calc(100vh - var(--topbar)); padding-bottom: calc(70px + var(--safe-b)); }
  .page { padding: 20px 16px 28px; }
  .display { font-size: 34px; }
  h2.serif { font-size: 23px; }
  .page-h { align-items: flex-start; margin-bottom: 16px; }
  .page-a { width: 100%; }
  .page-a .btn { flex: 1; }
  .sec-h { margin: 24px 0 12px; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around;
    padding: 8px 4px calc(8px + var(--safe-b)); border-top: 1px solid var(--line); background: #fbfaf7f5; backdrop-filter: blur(10px);
  }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; padding: 2px 10px; min-width: 64px; }
  .tab.on { color: var(--text); }
  .tab-ic { position: relative; }
  .tab-ic .badge { position: absolute; top: -6px; left: 14px; border: 2px solid var(--bar); min-width: 20px; height: 20px; }
  .toasts { bottom: calc(80px + var(--safe-b)); }
  .card { padding: 16px; }
  .input { font-size: 16px; } /* no iOS zoom on focus */
  .input.sm { font-size: 14px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .toggles { grid-template-columns: 1fr; }
  .fc-grid { grid-template-columns: repeat(2, 1fr); }

  .modal-back { place-items: end center; padding: 0; }
  .modal { max-width: none !important; border-radius: 20px 20px 0 0; max-height: 92vh; max-height: 92svh; animation: sheet .22s ease-out; }
  .modal-f { border-radius: 0; padding-bottom: calc(14px + var(--safe-b)); }
  .modal-f .btn { flex: 1; }
  .modal-h { padding: 18px 18px 2px; }
  .modal-b { padding: 12px 18px 18px; }
  @keyframes sheet { from { transform: translateY(40px); opacity: .4; } }

  .hero .display { font-size: 32px; }
  .hero-a .btn { flex: 1; }
  .hero-next { width: 100%; margin: 2px 0 0; }
  .ch-grid { grid-template-columns: 1fr; }
  .dash-side, .make-side { display: flex; flex-direction: column; }
  .ch-stats { grid-template-columns: 1.2fr 1fr .8fr; }
  .bell-n { border-color: var(--bar); }

  .drop { flex-wrap: wrap; padding: 10px; }
  .drop .field-in { flex-basis: 100%; padding: 8px 4px; }
  .drop .btn { flex: 1; }
  .range label { width: calc(50% - 22px); }
  .range .cm { flex-basis: 100%; padding: 0; }

  .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .ct { font-size: 13.5px; }

  .q-item { padding: 12px; gap: 12px; }
  .q-pos { display: none; }
  .q-thumb { width: 60px; }
  .q-acts { padding-left: 0; }
  .q-acts .btn { flex: 1 1 auto; }
  .q-meta .ellip { flex-basis: 100%; }
  .q-head { flex-wrap: wrap; }
  .q-head .grow { flex: 1 1 0; }
  .edit-grid { grid-template-columns: 1fr; }

  .filters .input.sm { flex: 1; min-width: 0; }
  .check-row { flex-wrap: wrap; }
  .check-row > .row { width: 100%; padding-left: 40px; }

  .ch-list { grid-template-columns: 1fr; }
  .plat-pick { grid-template-columns: repeat(2, 1fr); }

  .set-wrap { grid-template-columns: 1fr; }
  .set-nav { position: sticky; top: var(--topbar); z-index: 5; flex-direction: row; overflow-x: auto; background: var(--bg); margin: 0 -16px; padding: 8px 16px; gap: 4px; scrollbar-width: none; }
  .set-nav::-webkit-scrollbar { display: none; }
  .set-nav a { white-space: nowrap; padding: 6px 12px; font-size: 13.5px; }
  .set-sec { padding: 18px 16px; }
  .set-f { margin: 18px -16px -18px; padding: 12px 16px; }
  .set-sec > .set-f:last-child { margin-bottom: -18px; }
  .pa-qr { flex-direction: column; align-items: flex-start; }
  .logbox { height: 300px; font-size: 11.5px; }
  .tbl { display: none; }
}
@media (max-width: 400px) {
  .display { font-size: 31px; }
  .ch-stats .v.big { font-size: 28px; }
  .m-acts { grid-template-columns: 1fr 1.6fr; }
}
/* ---- signed-in person + People & access ---- */
.me { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 30px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; font-size: 13px; max-width: 180px; }
.me:hover { border-color: var(--line2); }
.me-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #d9d2c3; color: #5d564a; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.me .avatar { width: 26px; height: 26px; font-size: 11px; }
.pp-link { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fcfbf8; }
.pp-url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 6px; }
.pp-url .mono { font-size: 14px; font-weight: 600; word-break: break-all; }
.pp-h { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.pp-list { display: flex; flex-direction: column; margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pp-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pp-row:first-child { border-top: 0; }
.pp-row.off { opacity: .55; }
.pp-who { min-width: 160px; }
.pp-acts { display: flex; gap: 6px; align-items: center; }
.pp-pc { display: flex; gap: 6px; align-items: center; margin-top: 18px; }
.pp-act { margin-top: 8px; display: flex; flex-direction: column; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.pp-a { display: flex; gap: 6px; align-items: baseline; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 13.5px; flex-wrap: wrap; }
.pp-a:first-child { border-top: 0; }
.pp-act > .cm { padding: 12px 14px; }
.pp-invite { white-space: pre-wrap; font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--soft); border-radius: 12px; padding: 14px; user-select: all; }
@media (max-width: 760px) {
  .pp-link { flex-direction: column; align-items: flex-start; }
  .pp-acts { width: 100%; padding-left: 42px; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
