@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("./assets/fonts/AlibabaPuHuiTi3-Light.otf") format("opentype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("./assets/fonts/AlibabaPuHuiTi3-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("./assets/fonts/AlibabaPuHuiTi3-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("./assets/fonts/AlibabaPuHuiTi3-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("./assets/fonts/AlibabaPuHuiTi3-Heavy.otf") format("opentype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #1d1e1f;
  --panel: #0b0b0c;
  --panel-2: #141414;
  --panel-3: #232323;
  --border: #393939;
  --muted: #929292;
  --text: #f3f3f3;
  --blue: #075a8f;
  --blue-dark: #001c2d;
  --blue-select: #062b42;
  --green: #086d00;
  --green-bright: #59bf16;
  --yellow: #e9b900;
  --red: #c32214;
  --table-columns: 96px 96px 130px 88px 96px minmax(180px, 1fr) 280px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.95), rgba(225, 228, 232, 0.92) 38%, rgba(202, 206, 211, 0.96) 100%),
    #d8dbe0;
  color: var(--text);
  font-family: "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  touch-action: manipulation;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.showcase {
  width: 100vw;
  height: 100vh;
  padding: 20px 24px 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.device-stage {
  position: relative;
  flex: 0 0 auto;
  filter: drop-shadow(0 25px 38px rgba(17, 20, 24, 0.32));
}

.ipad {
  position: absolute;
  left: 0;
  top: 0;
  width: 1424px;
  height: 1080px;
  padding: 24px;
  transform-origin: top left;
  border-radius: 54px;
  background:
    linear-gradient(145deg, #50545a 0%, #17191b 9%, #030404 51%, #35383d 93%, #111214 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.24),
    inset 0 0 0 5px rgba(0, 0, 0, 0.85),
    0 3px 2px rgba(255, 255, 255, 0.28),
    0 0 0 1px rgba(0, 0, 0, 0.65);
}

.ipad::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 48px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  pointer-events: none;
}

.ipad-screen {
  width: 1376px;
  height: 1032px;
  overflow: hidden;
  position: relative;
  border-radius: 31px;
  background: #111;
  box-shadow:
    0 0 0 2px #020202,
    inset 0 0 18px rgba(0, 0, 0, 0.5);
  isolation: isolate;
}

.ipad-camera {
  position: absolute;
  z-index: 20;
  left: 50%;
  top: 8px;
  width: 26px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 10px;
  background: #08090a;
  box-shadow: inset 0 0 0 1px #282b30;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ipad-camera span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #365477 0 18%, #101b2b 42%, #020305 75%);
  box-shadow: 0 0 3px rgba(88, 132, 176, 0.65);
}

.ipad-side-button,
.ipad-volume {
  position: absolute;
  background: linear-gradient(90deg, #151719, #52565c 55%, #17191b);
  border-radius: 3px;
  z-index: -1;
}

.ipad-side-button {
  width: 78px;
  height: 5px;
  left: 156px;
  top: -4px;
}

.ipad-volume {
  width: 5px;
  height: 66px;
  left: -4px;
}

.volume-one {
  top: 156px;
}

.volume-two {
  top: 233px;
}

.device-caption {
  min-height: 20px;
  color: #555b63;
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  font: 500 12px/1.2 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.caption-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

/* On a real iPad, the browser is already the device frame. */
html.ipad-runtime,
html.ipad-runtime body {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: #111;
}

html.ipad-runtime .showcase {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  display: block;
}

html.ipad-runtime .device-stage {
  filter: none;
}

html.ipad-runtime .ipad {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transform: none !important;
}

html.ipad-runtime .ipad::after,
html.ipad-runtime .ipad-camera,
html.ipad-runtime .ipad-side-button,
html.ipad-runtime .ipad-volume,
html.ipad-runtime .device-caption {
  display: none;
}

html.ipad-runtime .ipad-screen {
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.svg-sprite {
  width: 0;
  height: 0;
  position: absolute;
  overflow: hidden;
}

.icon {
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 auto;
}

#app,
.app-shell {
  width: 100%;
  height: 100%;
}

.app-shell {
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  overflow: hidden;
  color: #e8e8e8;
  background: #1f2020;
  user-select: none;
}

.app-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 22px 0 31px;
  background: #111;
  border-bottom: 2px solid #313131;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 290px;
}

.brand .icon {
  width: 34px;
  height: 42px;
  color: #f7f7f7;
}

.brand-cn {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.08;
}

.brand-en {
  margin-top: 2px;
  color: #d5d5d5;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.025em;
}

.project-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.header-actions {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-button,
.header-icon-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-button {
  height: 52px;
  gap: 8px;
  padding: 0 2px 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.user-button .icon {
  width: 29px;
  height: 29px;
}

.user-button:hover,
.user-button:focus-visible {
  color: #fff;
}

.header-icon-button {
  width: 38px;
  height: 38px;
  color: #a8a8a8;
  border-radius: 8px;
}

.header-icon-button:hover,
.header-icon-button:focus-visible {
  color: #fff;
  background: #292929;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  background: #202121;
}

.sidebar {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #262626;
  border-radius: 9px 9px 4px 4px;
  background: #0b0b0b;
}

.filter-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 7px;
  height: 47px;
  border: 1px solid #202020;
  border-radius: 8px;
  background: #080808;
}

.filter-tab {
  position: relative;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #999;
  cursor: pointer;
  padding: 4px 3px 2px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.05;
}

.filter-tab small {
  display: block;
  margin-top: 2px;
  color: #7c7c7c;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.filter-tab.active {
  color: #fff;
  background: #323232;
  box-shadow: inset 0 0 0 1px #3e3e3e;
}

.filter-tab.active small {
  color: #c9c9c9;
}

.sidebar-title {
  width: calc(100% - 16px);
  min-height: 28px;
  margin: 0 8px 6px;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #afafaf;
  font-size: 12px;
  line-height: 1;
  text-align: left;
  cursor: pointer;
}

.sidebar-title:hover,
.sidebar-title:focus-visible {
  color: #e1e1e1;
  background: #1b1b1b;
  outline: 0;
}

.sidebar-title.active {
  color: #fff;
  background: #303030;
  font-weight: 800;
}

.tree {
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px 15px;
  scrollbar-color: #595959 transparent;
  scrollbar-width: thin;
}

.tree-row {
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: #9f9f9f;
  cursor: default;
  text-align: left;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 400;
}

.tree-row:hover,
.tree-row:focus-within {
  background: #1b1b1b;
  color: #e1e1e1;
}

.tree-row.level-1 {
  padding-left: 24px;
}

.tree-row.level-2 {
  padding-left: 61px;
}

.tree-row.active {
  color: #fff;
  background: #303030;
  font-size: 14px;
  font-weight: 900;
}

.tree-toggle,
.tree-select {
  min-width: 0;
  height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.tree-toggle {
  width: 18px;
  flex: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tree-select {
  flex: 1;
  text-align: left;
  font-size: inherit;
  font-weight: inherit;
}

.tree-toggle:focus-visible,
.tree-select:focus-visible {
  outline: 1px solid #777;
  outline-offset: -2px;
  border-radius: 5px;
}

.tree-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 150ms ease;
  margin-left: 1px;
  flex: 0 0 auto;
}

.tree-row.expanded .tree-chevron {
  transform: rotate(45deg) translateY(-2px);
}

.tree-spacer {
  width: 18px;
  flex: 0 0 18px;
}

.day-list .tree-row {
  padding-left: 18px;
  height: 32px;
  cursor: pointer;
}

.day-list .tree-row.active {
  font-size: 14px;
}

.main-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
  gap: 8px;
}

.top-tools {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 224px;
  gap: 8px;
}

.tool-strip {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  border: 1px solid #252525;
  border-radius: 8px;
  overflow: hidden;
  background: #0b0b0b;
}

.tool-button {
  min-width: 0;
  border: 0;
  border-right: 1px solid #101010;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: #a1a1a1;
  cursor: pointer;
  padding: 2px 8px;
}

.tool-button:last-child {
  border-right: 0;
}

.tool-button .icon {
  width: 27px;
  height: 27px;
}

.tool-button strong,
.mode-button strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.05;
  white-space: nowrap;
}

.tool-button small,
.mode-button small {
  display: block;
  margin-top: 2px;
  color: #808080;
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
}

.tool-button:hover:not(:disabled),
.tool-button:focus-visible:not(:disabled) {
  color: #fff;
  background: #181818;
}

.tool-button:active:not(:disabled) {
  background: #222;
}

.tool-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid #06385a;
  border-radius: 9px;
  background: #001c2e;
  transition: border-color 180ms ease, background 180ms ease;
}

.mode-switch.play-state {
  border-color: #225900;
  background: #113900;
}

.mode-button {
  border: 0;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  color: #9c9c9c;
  cursor: pointer;
  padding: 0 5px;
}

.mode-button .icon {
  width: 25px;
  height: 25px;
}

.mode-button.active.edit {
  color: #fff;
  background: #07598d;
}

.mode-button.active.play {
  color: #fff;
  background: #397700;
}

.mode-button.active small {
  color: #d7ebf8;
}

.content-frame {
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0;
  border: 7px solid #3a3a3a;
  border-radius: 12px 12px 5px 5px;
  background: #0a0a0a;
  scrollbar-color: #777 #242424;
  scrollbar-width: thin;
}

.shot-section {
  min-width: var(--table-min-width, 100%);
}

.content-frame::-webkit-scrollbar,
.tree::-webkit-scrollbar,
.list-box::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.content-frame::-webkit-scrollbar-thumb,
.tree::-webkit-scrollbar-thumb,
.list-box::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: #666;
}

.content-frame::-webkit-scrollbar-track,
.tree::-webkit-scrollbar-track,
.list-box::-webkit-scrollbar-track {
  background: transparent;
}

.shot-section + .shot-section {
  margin-top: 9px;
}

.shot-sticky-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #3a3a3a;
}

.shot-summary {
  position: sticky;
  left: 0;
  z-index: 16;
  height: 96px;
  border: 0;
  border-radius: 10px;
  display: block;
  width: var(--content-viewport-width, 100%);
  max-width: var(--content-viewport-width, 100%);
  padding: 0;
  overflow: hidden;
  background: #0a0a0a;
  color: #eee;
  text-align: left;
  cursor: default;
}

.shot-summary.take-context .shot-summary-top {
  background: #062a40;
  border-bottom: 1px solid #174865;
}

.shot-summary-top {
  height: 51px;
  display: flex;
  align-items: center;
  padding: 0 19px;
  gap: 47px;
}

.summary-number {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-label {
  color: #aaa;
  font-size: 11px;
  line-height: 0.9;
}

.summary-label small {
  display: block;
  color: #8f8f8f;
  font-size: 8px;
  font-weight: 400;
}

.summary-value {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.summary-time {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-time .summary-value {
  font-size: 24px;
}

.shot-summary-bottom {
  height: 45px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 10px;
  border-top: 1px solid #151515;
}

.summary-content {
  font-size: 16px;
  font-weight: 500;
}

.summary-tags {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-tags .summary-content {
  white-space: nowrap;
}

.summary-tags-trigger {
  max-width: 420px;
  border: 0;
  padding: 4px 6px;
  overflow: hidden;
  background: transparent;
  color: inherit;
  text-overflow: ellipsis;
  text-align: left;
}

.mode-edit .summary-tags-trigger {
  cursor: pointer;
}

.editable-display {
  border-radius: 7px;
}

.mode-edit .editable-display {
  cursor: text;
}

.mode-edit .editable-display:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.inline-editor {
  height: 34px;
  min-width: 0;
  border: 2px solid #fff;
  border-radius: 8px;
  outline: 0;
  background: #101010;
  color: #f5f5f5;
  caret-color: #fff;
}

.inline-editor.common-edit-context {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.inline-editor.take-edit-context {
  border-color: #ff2e2e;
  box-shadow: 0 0 0 1px rgba(255, 46, 46, 0.18);
}

.summary-value-editor {
  width: 92px;
  padding: 0 8px;
  font-size: 26px;
  font-weight: 900;
}

.summary-content-editor {
  width: 290px;
  padding: 0 10px;
  font-size: 16px;
  font-weight: 500;
}

.summary-tags-editor {
  width: 330px;
  padding: 0 10px;
  font-size: 16px;
  font-weight: 500;
}

.column-header {
  position: relative;
  height: 49px;
  margin-top: 7px;
  border-radius: 9px;
  overflow: clip;
  background: #0a0a0a;
}

.delete-column-hint {
  position: absolute;
  z-index: 8;
  top: 0;
  right: 0;
  width: 104px;
  height: 100%;
  border-left: 1px solid #3b3b3b;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  color: #f5f5f5;
}

.delete-column-hint .icon {
  width: 23px;
  height: 23px;
}

.field-grid {
  display: grid;
  grid-template-columns: var(--table-columns);
}

.column-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f1f1f1;
  font-size: 12px;
  font-weight: 500;
  line-height: 0.95;
  text-align: center;
}

.column-cell.first-column,
.take-index.first-column {
  position: sticky;
  left: 0;
  z-index: 12;
  background: #0a0a0a;
  box-shadow: none;
}

.take-card.selected .take-index.first-column {
  background: #062a40;
}

.column-resizer {
  position: absolute;
  z-index: 4;
  top: 7px;
  right: -8px;
  width: 16px;
  height: 35px;
  cursor: col-resize;
  touch-action: none;
}

.column-resizer::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 1px;
  height: 25px;
  background: transparent;
}

.column-cell:hover .column-resizer::after {
  background: #0c7bb9;
}

.column-cell::after {
  content: "";
  position: absolute;
  top: 11px;
  right: 0;
  width: 1px;
  height: 27px;
  background: #3b3b3b;
}

.column-cell:last-child::after {
  display: none;
}

.column-cell.first-column::after {
  display: none;
}

.column-cell small {
  display: block;
  margin-top: 3px;
  color: #bcbcbc;
  font-size: 9px;
  font-weight: 400;
}

.take-card {
  position: relative;
  height: var(--take-height, 168px);
  margin-top: 7px;
  border: 1px solid #0c0c0c;
  border-radius: 9px;
  overflow: clip;
  background: #0a0a0a;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.36);
  transition: background 120ms ease, border-color 120ms ease;
}

.take-card.interactive {
  cursor: pointer;
}

.mode-play .take-card {
  cursor: pointer;
}

.take-card.interactive:hover {
  border-color: #4d4d4d;
}

.take-card.selected {
  border-color: #174865;
}

.take-card-slider {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  transform: none;
  transition: transform 180ms cubic-bezier(0.22, 0.8, 0.28, 1);
  touch-action: pan-y;
}

.mode-play .take-card-slider {
  touch-action: pan-x pan-y;
}

.take-card.selected .take-card-slider {
  background: #062a40;
}

.take-card.swiped .take-card-slider {
  transform: translateX(-104px);
}

.take-card.is-swiping .take-card-slider {
  transition: none;
  user-select: none;
}

.take-delete-rail {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 104px;
  height: 100%;
  display: grid;
  visibility: hidden;
  opacity: 0;
  background: #b92114;
}

.take-card.swiped .take-delete-rail,
.take-card.is-swiping .take-delete-rail {
  visibility: visible;
  opacity: 1;
}

.take-delete-rail.per-camera {
  grid-template-rows: repeat(var(--camera-rows), 1fr);
}

.take-delete-rail.whole-take {
  grid-template-rows: 1fr;
}

.take-delete-button {
  min-width: 0;
  border: 0;
  border-bottom: 1px solid rgba(105, 16, 8, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #b92114;
  color: #fff;
  cursor: pointer;
}

.take-delete-button:last-child {
  border-bottom: 0;
}

.take-delete-button:hover,
.take-delete-button:focus-visible {
  background: #d22a1b;
  outline: 0;
}

.take-delete-button .icon {
  width: 23px;
  height: 23px;
}

.take-grid {
  width: 100%;
  height: 100%;
  grid-template-rows: repeat(var(--camera-rows, 4), 1fr);
}

.take-index {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  grid-row: 1 / span 4;
}

.take-index strong {
  min-width: 56px;
  height: 31px;
  padding: 0 13px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2e2e2e;
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.selected .take-index strong {
  background: #164765;
}

.take-index small {
  color: #aaa;
  font-size: 12px;
  line-height: 1;
}

.take-index strong[data-action],
.take-index small[data-action],
.take-cell.editable-cell {
  cursor: text;
}

.take-number-editor {
  width: 58px;
  height: 33px;
  padding: 0 5px;
  background: #164765;
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  text-align: center;
}

.take-duration-editor {
  width: 64px;
  height: 26px;
  padding: 0 5px;
  background: #062a40;
  color: #ddd;
  font-size: 12px;
  text-align: center;
}

.take-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-bottom: 1px dashed #202020;
  color: #adadad;
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.take-cell.last-row {
  border-bottom: 0;
}

.take-cell.note-cell {
  justify-content: flex-start;
  padding-left: 23px;
  color: #b3b3b3;
}

.take-cell-value {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.take-cell-editor,
.take-note-editor {
  width: calc(100% - 8px);
  height: 31px;
  padding: 0 8px;
  background: #08283c;
  color: #f5f5f5;
  font-size: 15px;
  text-align: center;
}

.take-note-editor {
  width: 100%;
  text-align: left;
}

.take-cell select.inline-editor {
  appearance: auto;
  color-scheme: dark;
}

.rating-badge {
  min-width: 39px;
  height: 31px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.rating-badge.ok {
  background: #4d9a14;
}

.rating-badge.ng {
  background: #d5291d;
}

.rating-badge.none {
  background: #4a4a4a;
}

.mode-play .rating-badge {
  cursor: default;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(var(--video-rows, 2), 1fr);
  gap: 1px;
  padding: 7px 7px 7px 0;
  grid-row: 1 / span var(--camera-rows, 4);
}

.video-tile {
  position: relative;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3e3e3e;
  color: #8b8b8b;
  cursor: pointer;
  padding: 0;
}

.video-tile:hover,
.video-tile:focus-visible {
  box-shadow: inset 0 0 0 2px #8a8a8a;
  color: #fff;
}

.video-tile .icon {
  width: 25px;
  height: 25px;
}

.video-tile.has-video {
  background-image: url("./assets/images/camera-monitor-demo.png");
  background-position: center;
  background-size: cover;
}

.video-tile.has-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(0, 0, 0, 0.25));
}

.take-card.selected .video-tile:not(.has-video) {
  background: #164765;
}

.mini-action {
  height: 29px;
  border: 1px solid #48667b;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  background: #123a52;
  color: #eaf6fd;
  font-size: 12px;
  cursor: pointer;
}

.mini-action.danger {
  border-color: #94261b;
  background: #721b13;
}

.mini-action .icon {
  width: 16px;
  height: 16px;
}

.empty-workspace {
  min-height: 250px;
}

#modal-root,
#toast-root {
  position: absolute;
  z-index: 100;
  inset: 0;
  pointer-events: none;
}

#toast-root {
  z-index: 130;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(0.3px);
  pointer-events: auto;
  animation: fade-in 130ms ease-out;
}

.modal {
  max-height: 92%;
  overflow: hidden;
  border: 1px solid #464646;
  border-radius: 11px;
  background: #232323;
  color: #eee;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.68);
  animation: modal-in 150ms ease-out;
}

.modal.small {
  width: 480px;
}

.modal.medium {
  width: 560px;
}

.modal.large {
  width: 700px;
}

.modal.xlarge {
  width: 950px;
}

.modal-header {
  height: 51px;
  border-bottom: 1px solid #3a3a3a;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  background: #151515;
  font-size: 18px;
  font-weight: 700;
}

.modal-header .icon {
  width: 25px;
  height: 25px;
}

.modal-header .icon-warning {
  color: #e1b100;
}

.modal-header .icon-info {
  color: #0b84e5;
}

.modal-title-en {
  font-weight: 500;
}

.modal-close {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #aaa;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: #fff;
  background: #333;
}

.modal-body {
  padding: 22px 28px;
  max-height: 750px;
  overflow: auto;
}

.modal-footer {
  min-height: 70px;
  border-top: 1px solid #3a3a3a;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 48px;
  padding: 14px 28px;
  background: #222;
}

.button {
  min-width: 118px;
  height: 39px;
  padding: 0 18px;
  border: 1px solid #555;
  border-radius: 5px;
  background: #343434;
  color: #f3f3f3;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  filter: brightness(1.16);
}

.button.primary {
  border-color: #0a6b00;
  background: #086f00;
}

.button.danger {
  border-color: #e53b2d;
  background: #c32214;
}

.button.blue {
  border-color: #176b9d;
  background: #07598d;
}

.button:disabled {
  cursor: default;
  opacity: 0.35;
  filter: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 18px;
}

.form-field {
  min-width: 0;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  color: #c6c6c6;
  font-size: 13px;
  font-weight: 400;
}

.required {
  color: #ff3b30;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  height: 39px;
  border: 1px solid #4a4a4a;
  border-radius: 6px;
  outline: none;
  background: #131313;
  color: #f1f1f1;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 500;
}

.form-textarea {
  height: 88px;
  padding-top: 10px;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: #f3f3f3;
  box-shadow: 0 0 0 1px #f3f3f3;
}

.input-with-icon {
  position: relative;
}

.input-with-icon .icon {
  position: absolute;
  right: 11px;
  top: 8px;
  width: 23px;
  height: 23px;
  color: #aaa;
  pointer-events: none;
}

.camera-list {
  display: grid;
  gap: 8px;
  margin-top: 19px;
}

.camera-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 48px 92px 100px 1fr 65px;
  align-items: center;
  gap: 12px;
  padding: 6px 0 6px 14px;
  border-radius: 7px;
  overflow: hidden;
  background: #0c0c0c;
}

.camera-index {
  font-size: 26px;
  font-weight: 900;
}

.camera-control label {
  display: block;
  margin-bottom: 2px;
  color: #aaa;
  font-size: 11px;
  text-align: center;
}

.camera-control input,
.camera-control select {
  width: 100%;
  height: 30px;
  border: 1px solid #454545;
  border-radius: 5px;
  outline: none;
  background: #313131;
  color: #fff;
  text-align: center;
  padding: 0 8px;
  font-weight: 700;
}

.camera-remove {
  align-self: stretch;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c32417;
  color: #fff;
  cursor: pointer;
}

.camera-remove .icon {
  width: 22px;
  height: 22px;
}

.add-camera-button {
  width: fit-content;
  height: 38px;
  border: 1px solid #4b4b4b;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  background: transparent;
  color: #bbb;
  cursor: pointer;
  font-size: 15px;
}

.add-camera-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.take-edit-camera {
  border-radius: 7px;
  overflow: hidden;
  background: #0c0c0c;
}

.take-edit-camera .camera-row {
  margin: 0;
  border-radius: 0;
}

.take-extra-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 6px 12px 12px 56px;
}

.field-picker {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 24px;
  align-items: center;
}

.field-column-title {
  margin-bottom: 8px;
  color: #bcbcbc;
  font-size: 13px;
}

.list-box {
  height: 290px;
  overflow-y: auto;
  border: 1px solid #4a4a4a;
  border-radius: 7px;
  background: #151515;
}

.list-item {
  width: 100%;
  min-height: 41px;
  border: 0;
  border-bottom: 1px solid #393939;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: transparent;
  color: #eee;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.list-item:hover,
.list-item.selected {
  background: #154a6c;
}

.list-order {
  width: 23px;
  height: 23px;
  border: 1px solid #555;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c3c3c3;
  font-size: 12px;
}

.drag-handle {
  margin-left: auto;
  color: #555;
  font-size: 24px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}

.picker-arrows {
  display: grid;
  gap: 24px;
}

.picker-arrow {
  width: 43px;
  height: 43px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #292929;
  color: #aaa;
  cursor: pointer;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.picker-arrow:hover,
.picker-arrow:focus-visible {
  color: #fff;
  border-color: #888;
}

.tag-groups {
  display: grid;
  gap: 9px;
}

.tag-group-title {
  height: 29px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  background: #414141;
  color: #bdbdbd;
  font-size: 14px;
}

.tag-group-title .icon {
  width: 15px;
  height: 15px;
}

.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding: 0 17px;
}

.tag-chip {
  min-width: 95px;
  height: 39px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: #484848;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.tag-chip.selected {
  background: #10547e;
}

.finder-path {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #ddd;
  font-size: 19px;
  font-weight: 700;
}

.finder-back {
  border: 0;
  background: transparent;
  color: #aaa;
  font-size: 35px;
  cursor: pointer;
  line-height: 1;
}

.finder-columns {
  height: 310px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid #414141;
  border-radius: 6px;
  overflow: hidden;
  background: #151515;
}

.finder-column {
  border-right: 1px solid #555;
}

.finder-column:last-child {
  border-right: 0;
}

.finder-item {
  width: 100%;
  height: 38px;
  border: 0;
  border-bottom: 1px solid #3a3a3a;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  background: transparent;
  color: #e5e5e5;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finder-item.selected {
  background: #484848;
}

.finder-item .icon {
  width: 18px;
  height: 18px;
}

.media-modal {
  width: 850px;
  background: #111;
}

.media-body {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #030303;
}

.media-body img,
.media-body video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.empty-state {
  height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #777;
}

.empty-state strong {
  color: #aaa;
  font-size: 18px;
}

.empty-state span {
  margin-top: 5px;
  font-size: 12px;
}

.media-body::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.media-meta {
  position: absolute;
  left: 22px;
  bottom: 15px;
  z-index: 2;
  padding: 7px 11px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.64);
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 12px;
}

.media-controls {
  height: 62px;
  display: grid;
  grid-template-columns: 46px 1fr 92px;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  background: #1c1c1c;
}

.media-play {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #efefef;
  color: #111;
  cursor: pointer;
}

.media-progress {
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
  background: #080808;
}

.media-progress span {
  display: block;
  width: var(--media-progress, 18%);
  height: 100%;
  border-radius: inherit;
  background: #55ba17;
  transition: width 300ms linear;
}

.media-time {
  color: #c7c7c7;
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 12px;
  text-align: right;
}

.system-message {
  padding: 30px 38px 18px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}

.system-message .path {
  display: block;
  margin-top: 20px;
  color: #797979;
  font-size: 14px;
  font-weight: 500;
}

.progress-panel {
  padding: 25px 30px 14px;
}

.progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
  color: #ddd;
  font-size: 14px;
}

.progress-bar {
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
  background: #0c0c0c;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: #54b913;
  transition: width 240ms ease;
}

.toast {
  position: absolute;
  left: 50%;
  top: 84px;
  min-width: 260px;
  max-width: 620px;
  transform: translateX(-50%);
  padding: 12px 18px;
  border: 1px solid #4c4c4c;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: rgba(35, 35, 35, 0.96);
  color: #f2f2f2;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  font-size: 14px;
  font-weight: 500;
  pointer-events: auto;
  animation: toast-in 180ms ease-out;
}

.toast.success {
  border-color: #37781a;
}

.toast.error {
  border-color: #a5352d;
}

.toast-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5abb17;
}

.toast.error .toast-dot {
  background: #e73c2f;
}

.popover {
  position: absolute;
  z-index: 120;
  top: 61px;
  right: 30px;
  width: 218px;
  border: 1px solid #4a4a4a;
  border-radius: 8px;
  overflow: hidden;
  background: #232323;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55);
}

.popover-header {
  padding: 16px;
  border-bottom: 1px solid #414141;
}

.popover-header strong {
  display: block;
  font-size: 16px;
}

.popover-header small {
  color: #999;
  font-size: 11px;
}

.popover-button {
  width: 100%;
  height: 43px;
  border: 0;
  border-bottom: 1px solid #343434;
  background: transparent;
  color: #ddd;
  cursor: pointer;
  text-align: left;
  padding: 0 16px;
}

.popover-button:hover {
  background: #343434;
}

.inline-help {
  margin: 0 0 16px;
  color: #9f9f9f;
  font-size: 13px;
  line-height: 1.5;
}

.conflict-body {
  padding: 28px;
}

.conflict-section + .conflict-section {
  margin-top: 27px;
}

.conflict-section h3 {
  margin: 0 0 11px;
  color: #f1f1f1;
  font-size: 14px;
  font-weight: 700;
}

.conflict-row {
  min-height: 39px;
  border: 1px solid transparent;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  padding: 4px 15px;
  background: #111;
}

.conflict-row + .conflict-row {
  margin-top: 8px;
}

.conflict-section.after .conflict-row {
  border-color: #eee;
}

.conflict-row span {
  color: #b5b5b5;
  font-size: 12px;
  line-height: 1.05;
}

.conflict-row small {
  display: block;
  color: #777;
  font-size: 9px;
}

.conflict-row strong {
  min-width: 0;
  overflow: hidden;
  color: #eee;
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.template-card {
  width: 100%;
  height: 100px;
  border: 1px solid #3c3c3c;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #171717;
  color: #e4e4e4;
  cursor: pointer;
  padding: 10px;
  text-align: center;
  transition: border-color 120ms ease, background 120ms ease;
}

.template-card:hover,
.template-card.selected {
  border-color: #5aa5f5;
  background: #203147;
}

.template-card strong {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
}

.template-card small {
  margin-top: 3px;
  color: #b8b8b8;
  font-size: 8px;
  font-weight: 600;
  line-height: 1.2;
}

.script-notes-modal {
  width: 500px;
  height: 330px;
}

.script-notes-modal .modal-header {
  height: 51px;
  padding: 0 20px;
  font-size: 18px;
  gap: 10px;
}

.script-notes-modal .modal-header > .icon {
  width: 25px;
  height: 31px;
  color: #8f8f8f;
}

.script-notes-modal .modal-close {
  width: 34px;
  height: 34px;
}

.script-notes-modal .modal-close .icon {
  width: 24px;
  height: 24px;
}

.script-notes-body {
  height: calc(100% - 51px);
  display: flex;
  flex-direction: column;
  padding: 34px 68px 28px;
  background: #232323;
}

.template-choice {
  min-width: 0;
  text-align: center;
}

.template-icon {
  width: 31px;
  height: 31px;
}

.template-choice p {
  margin: 10px 0 0;
  color: #989898;
  font-size: 12px;
  line-height: 1.45;
}

.script-notes-confirm {
  width: 120px;
  height: 34px;
  margin: auto auto 0;
  border: 2px solid #0b5007;
  border-radius: 5px;
  background: #106c08;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}

.script-notes-confirm:hover,
.script-notes-confirm:focus-visible {
  background: #16830d;
  outline: 0;
}

.danger-copy {
  padding: 25px 30px 10px;
  color: #ddd;
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
}

.danger-copy strong {
  color: #fff;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 760px), (orientation: portrait) {
  .showcase {
    padding: 8px 8px 31px;
  }

  .device-caption {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
