:root {
  color-scheme: light;
  --ink: #152238;
  --muted: #546476;
  --blue: #164cb7;
  --line: #d9e1e9;
  --canvas: #f4f7f9;
  --white: #fff;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft Yahei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, a, input, textarea, select { font: inherit; color: inherit; }
button, input, select, textarea, .action { min-height: 44px; }
button, .action, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid #3476d6; outline-offset: 3px; }
[hidden], #notice:empty { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: fixed; top: -70px; background: white; padding: 12px; z-index: 10; }
.skip:focus { top: 8px; }
.shell, main { width: min(100%, 1120px); margin-inline: auto; padding-inline: 42px; }
main { padding-bottom: 34px; }
.app-header .shell { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-header { background: #fff; border-bottom: 1px solid var(--line); }
.app-header .shell { min-height: 68px; }
.app-header .brand { border: 0; background: none; padding: 0; color: var(--ink); display: inline-flex; gap: 10px; align-items: center; font-size: 18px; font-weight: 745; }
.brand-label { display: grid; gap: 2px; text-align: left; }
.brand-label small { font-size: 12px; font-weight: 550; }
.logo { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--blue); flex: none; }
.logo::after { content: ""; background: white; width: 16px; height: 14px; clip-path: polygon(0 0, 86% 0, 53% 49%, 100% 49%, 55% 100%, 0 100%, 43% 48%, 0 48%); }
#notice { padding: 10px 14px; background: #e8f0fe; color: #214674; border-radius: 8px; margin-top: 12px; }
#notice.error, .warning { background: #fff2ea; color: #813c26; }
h1, h2, h3, p { margin: 0 0 12px; overflow-wrap: anywhere; }
h1 { font-size: clamp(32px, 3.4vw, 46px); line-height: 1.15; letter-spacing: -.05em; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
.muted, small { color: var(--muted); }
button, .action {
  display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; color: #244c80;
  background: #fff; border: 1px solid #b9c9dc; border-radius: 9px; text-decoration: none; text-align: center;
  font-weight: 650; line-height: 1.35;
}
button:hover:not(:disabled), a.action:hover { filter: brightness(.96); }
.primary { background: var(--blue); border-color: var(--blue); color: white; }
.flat { border: 0; background: transparent; color: #30465f; padding-inline: 0; font-size: 14px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin: 34px 0 22px; }
.page-heading h1 { margin: 3px 0 0; }
.date-line, .business-title { color: #435469; font-size: 14px; letter-spacing: .025em; }
.business-title::before { content: ""; display: inline-block; width: 12px; height: 9px; margin-right: 8px; border: 1px solid currentColor; border-radius: 2px; }
.business-selection { margin: 0; min-width: 0; }
.business-selection select { width: auto; max-width: min(55vw, 420px); font-size: 14px; }
.today-layout { display: grid; grid-template-columns: minmax(0, 1.56fr) minmax(285px, 1fr); gap: 22px; }
.today-aside { background: white; border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 2.7vw, 34px); display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.video-cover {
  width: 100%; position: relative; isolation: isolate; overflow: hidden; display: block; text-align: left;
  aspect-ratio: 1.4; background: #111923; color: white; border: 0; border-radius: 22px; padding: 0;
}
.video-cover:hover:not(:disabled) { filter: none; }
.video-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #0002, transparent 33%, #0000 43%, #000c); }
.video-cover img, .video-cover video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 57%; z-index: -2; }
.label-pill, .badge { display: inline-flex; align-items: center; flex: none; gap: 6px; border-radius: 99px; background: #eaf0f7; color: #354a63; padding: 4px 10px; font-size: 13px; font-weight: 680; }
.label-pill.ready { color: #1c583a; background: #f1fbf4; }
.label-pill.ready::before { content: ""; display: block; width: 7px; height: 7px; border-radius: 50%; background: #348457; }
.video-cover > .label-pill { position: absolute; top: 20px; left: 20px; }
.cover-bottom { position: absolute; left: 23px; right: 23px; bottom: 23px; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.cover-bottom strong { display: block; font-size: clamp(28px, 3.1vw, 43px); line-height: 1.2; letter-spacing: -.04em; text-shadow: 0 1px 10px #17191f88; overflow-wrap: anywhere; }
.cover-bottom strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.cover-bottom small { display: block; margin-top: 6px; color: #fff; font-size: 13px; }
.play-icon { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 50%; background: white; }
.play-icon::after { content: ""; margin-left: 4px; width: 17px; height: 20px; background: #192332; clip-path: polygon(0 0, 100% 50%, 0 100%); border-radius: 3px; }
.main-controls { display: grid; gap: 4px; }
.main-controls .primary { width: 100%; min-height: 51px; border-radius: 13px; font-size: 17px; }
.save-control::before { content: "↓"; display: inline-block; margin-right: 8px; font-size: 20px; line-height: 1; }
.state-card { min-height: 320px; display: grid; align-content: space-between; gap: 24px; padding: 30px; background: #eaf0f6; border: 1px solid var(--line); border-radius: 22px; }
.state-tile { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: #fff; color: var(--blue); }
.state-card h2 { font-size: 28px; line-height: 1.3; margin: 0 0 6px; }
.state-card p { color: var(--muted); margin: 0; }
.facts, .facts dd { margin: 0; }
.facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid #e7ecf1; font-size: 14px; }
.facts > div:last-child { border: 0; }
.facts dt { color: var(--muted); flex: none; }
.facts dd { text-align: right; overflow-wrap: anywhere; font-weight: 600; }
.info-link { min-height: 36px; color: var(--blue); }
.quiet-note { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #eef2f7; color: #43546a; font-size: 14px; }
.tracking { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tracking code { overflow-wrap: anywhere; }
.portrait-summary { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.portrait-summary img { width: 48px; height: 54px; object-fit: cover; border-radius: 8px; flex: none; }
.portrait-summary div { flex: 1; min-width: 0; }
.portrait-summary p, .light-row p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.portrait-summary button, .light-row button { color: var(--blue); flex: none; }
.light-rows { display: grid; margin-top: 16px; border-top: 1px solid var(--line); }
.light-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 9px 0; }
.navigation, .settings-links, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.navigation { margin-top: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.navigation button { background: transparent; border: 0; color: #3e5270; padding-inline: 10px; font-size: 14px; }
.navigation button[aria-current] { color: var(--blue); background: #e3ebfb; }
.settings-links { margin-bottom: 12px; }
.settings-links button { padding-inline: 10px; }
.actions { margin-top: 9px; }
.card { margin: 0 0 13px; padding: clamp(14px, 3vw, 24px); background: white; border: 1px solid var(--line); border-radius: 14px; }
.login, .setup-card { max-width: 590px; margin: 26px auto; }
.setup-card h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 16px; }
.step-label { color: var(--muted); font-size: 13px; }
.stack { display: grid; gap: 11px; margin-bottom: 14px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
label { display: grid; gap: 5px; font-weight: 640; min-width: 0; font-size: 14px; }
label.checkbox { display: flex; align-items: center; gap: 9px; min-height: 44px; }
label.checkbox input { width: 18px; min-height: 18px; flex: none; }
fieldset { border: 1px solid var(--line); border-radius: 9px; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #bac9dc; border-radius: 8px; padding: 8px 10px; background: white; color: var(--ink); }
textarea { min-height: 86px; resize: vertical; }
input::file-selector-button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: #f7f9fb; color: var(--blue); }
figure { margin: 0; min-width: 0; }
figcaption { margin-top: 5px; color: var(--muted); overflow-wrap: anywhere; font-size: 13px; }
.photo-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.photo-pair button { display: block; padding: 0; overflow: hidden; width: 100%; }
.photo-pair img { display: block; width: 100%; height: clamp(100px, 32vw, 186px); object-fit: contain; background: #edf3fa; }
.list { margin: 0; padding: 0; list-style: none; }
.list > li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.work-row { width: 100%; justify-content: space-between; gap: 12px; text-align: left; border-color: var(--line); }
.work-row small { display: block; margin-top: 3px; }
summary { color: #254e82; font-weight: 660; padding: 8px 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 7px 0; }
dialog { width: min(calc(100vw - 24px), 510px); max-height: 88dvh; border: 0; border-radius: 19px; padding: 18px; color: var(--ink); box-shadow: 0 15px 55px #10203450; }
dialog::backdrop { background: #17263b9c; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 9px; }
.dialog-head h2 { margin: 0; }
.dialog-close { flex: none; border-radius: 22px; }
dialog.photo-dialog img { display: block; max-width: 100%; max-height: 67dvh; margin-inline: auto; }
dialog.player { background: #141b25; color: white; width: min(calc(100vw - 20px), 500px); }
dialog.player video { display: block; width: 100%; height: auto; max-height: 67dvh; margin: 0 auto 12px; border-radius: 9px; }
dialog.work-detail h3 { margin-top: 14px; }
noscript { display: block; padding: 12px; }
@media (max-width: 740px) {
  .shell, main { padding-inline: 20px; }
  main { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .app-header .shell { min-height: 56px; }
  .app-header .brand { font-size: 16px; gap: 8px; }
  .logo { width: 30px; height: 30px; }
  .page-heading { display: grid; gap: 7px; margin: 20px 0 14px; }
  .page-heading:has(.business-selection) { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .business-selection select { max-width: 44vw; }
  .page-heading h1 { font-size: 33px; }
  .date-line { font-size: 12px; }
  .business-title { font-size: 13px; }
  .today-layout { display: block; }
  .video-cover { aspect-ratio: 1.08; border-radius: 18px; }
  .video-cover > .label-pill { left: 14px; top: 14px; }
  .cover-bottom { left: 17px; right: 16px; bottom: 17px; }
  .cover-bottom strong { font-size: clamp(26px, 6.5vw, 35px); }
  .play-icon { width: 50px; height: 50px; }
  .today-aside { flex-direction: column-reverse; border: 0; background: transparent; padding: 13px 0 0; gap: 8px; }
  .detail-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 15px; background: #fff; }
  .detail-card h2 { margin: 0 0 4px; font-size: 16px; }
  .state-card { min-height: 230px; padding: 22px; }
  .state-card h2 { font-size: 25px; }
  .portrait-summary { padding-inline: 11px; }
  .navigation {
    position: fixed; z-index: 3; left: 0; right: 0; bottom: 0; margin: 0;
    flex-wrap: nowrap; gap: 4px; padding: 5px 7px calc(5px + env(safe-area-inset-bottom));
    border: 0; border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -4px 15px #15223812;
  }
  .navigation button { flex: 1; min-width: 0; padding: 8px 2px; font-size: clamp(12px, 3.4vw, 14px); }
}
@media (max-width: 740px) and (max-height: 620px) {
  .page-heading { margin-top: 12px; }
  .video-cover { aspect-ratio: 1.24; }
}
@media (max-width: 350px) {
  .shell, main { padding-inline: 13px; }
  .page-heading h1 { font-size: 29px; }
  .cover-bottom strong { font-size: 25px; }
  .navigation button { padding-inline: 7px; }
}
.prepared-download { color: var(--muted); font-size: 13px; display: grid; gap: 7px; margin: 5px 0; width: 100%; }
.prepared-download .action { justify-self: start; }
dialog.player .prepared-download { color: #dbe4ef; }
.player-description { color: #dbe4ef; font-size: 14px; }

.manage-tabs {
  display: flex;
  gap: 4px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 3px;
  background: #e8edf4;
  border-radius: 10px;
}
.manage-tabs button { min-width: 78px; border: 0; background: transparent; }
.manage-tabs button[aria-pressed="true"] { color: var(--blue); background: #fff; box-shadow: 0 1px 3px #1522381f; }
.manage-list-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 9px; }
.manage-list-heading h2 { margin: 0; font-size: 18px; }
.manage-list ul { margin: 0; padding: 0; list-style: none; }
.manage-list li + li { border-top: 1px solid var(--line); }
.manage-row {
  display: grid;
  width: 100%;
  min-height: 67px;
  grid-template-columns: minmax(0, 1fr) auto 10px;
  align-items: center;
  gap: 9px;
  padding: 9px 4px;
  border: 0;
  color: var(--ink);
  text-align: left;
}
.manage-row strong, .manage-row small { display: block; overflow-wrap: anywhere; }
.manage-row small { margin-top: 4px; font-weight: 450; }
.manage-row .label-pill { padding-inline: 8px; font-size: 12px; }
.manage-arrow { width: 7px; height: 7px; border-top: 1.5px solid #60738a; border-right: 1.5px solid #60738a; transform: rotate(45deg); }
.manage-page { max-width: 680px; }
.manage-back { margin-top: 9px; }
.manage-page .manage-heading { margin-top: 0; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.manage-account { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 5px; }
.manage-warning { padding: 10px 12px; border-radius: 8px; }
.manage-danger { border-color: #a43d35; color: #8d2d25; background: #fff4f1; }
.assignment-choice { padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 480px) {
  .manage-actions { display: grid; }
  .manage-tabs { width: 100%; }
  .manage-tabs button { flex: 1; }
  .manage-list-heading .primary { padding-inline: 10px; }
}

.scene-list { list-style: none; margin: 0; padding: 0; }
.scene-card-head { display: flex; align-items: flex-start; gap: 12px; }
.scene-card-head > div { flex: 1; min-width: 0; }
.scene-card h2 { margin: 0 0 4px; font-size: 18px; }
.scene-thumbnail { width: 72px; height: 60px; flex: none; object-fit: cover; border-radius: 8px; }
.scene-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.scene-card .actions .flat { padding-inline: 7px; }
.scene-card .scene-remove { color: #8d2d25; }
.scene-current-photo { display: block; width: min(100%, 260px); max-height: 190px; object-fit: contain; border-radius: 8px; }
.scene-preview-description { margin-top: 12px; white-space: pre-wrap; }
