:root {
  color-scheme: dark;
  --bg: #0c0c11;
  --panel: #15151e;
  --surface: #1c1b26;
  --line: #2c2b38;
  --text: #f4f1ff;
  --muted: #a09db2;
  --faint: #858297;
  --accent: #b3a4ff;
  --accent-hover: #c6baff;
  --ink: #211844;
  --green: #8be4b4;
  --error: #ff9ea8;
  --radius: 17px;
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  font-size: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; min-height: 100vh; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.icon { width: 18px; height: 18px; display: inline-block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.topbar { border-bottom: 1px solid #23222c; background: #111118; }
.topbar-inner { max-width: 1160px; min-height: 68px; margin: auto; padding: 0 30px; display: flex; align-items: center; gap: 17px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 720; letter-spacing: -.055em; }
.brand svg { width: 32px; height: 32px; }
.top-separator { width: 1px; height: 23px; background: var(--line); }
.top-section { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.server-state { margin-left: auto; display: flex; align-items: center; gap: 7px; white-space: nowrap; color: #b6b2c7; font-size: 12px; }
.server-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px #8be4b455; }
.server-state .icon { width: 14px; height: 14px; }
.dashboard { max-width: 1160px; margin: 0 auto; padding: 52px 30px 0; }
.intro { margin-bottom: 28px; }
.intro h1 { font-size: clamp(38px, 5vw, 55px); font-weight: 680; line-height: 1.05; letter-spacing: -.064em; }
.intro p { color: var(--muted); margin-top: 11px; line-height: 1.5; font-size: 15px; }
.transfer-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); min-width: 0; }
.transfer-grid > .panel { padding: 23px; min-height: 441px; }
.panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.panel-heading h2 { font-size: 17px; font-weight: 670; letter-spacing: -.025em; }
.panel-heading p { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.4; }
.tile { flex: 0 0 auto; width: 41px; height: 41px; display: grid; place-items: center; border: 1px solid #453863; border-radius: 11px; color: var(--accent); background: #251e38; }
.tile.muted { background: #22212e; color: #aaa3bc; border-color: #312f41; }
.tile.success { background: #152d27; border-color: #305345; color: var(--green); }
.drop-area { border: 1px dashed #514466; border-radius: 13px; min-height: 340px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 21px; text-align: center; background: radial-gradient(ellipse at 50% 34%, #231c35 0%, #181620 66%); transition: background .16s, border-color .16s; }
.drop-area.dragging { border-color: var(--accent); background: #2a2142; }
.drop-art { width: 126px; height: 96px; position: relative; display: grid; place-items: center; margin-bottom: 12px; }
.drop-orbit { width: 108px; height: 89px; border: 1px solid #a282ed20; border-radius: 50%; position: absolute; transform: rotate(-20deg); }
.drop-orbit.inner { width: 88px; height: 72px; border-color: #a282ed35; transform: rotate(22deg); }
.drop-art::before, .drop-art::after { content: ""; width: 5px; height: 5px; background: #b3a4ff9e; border-radius: 50%; position: absolute; top: 22px; left: 17px; }
.drop-art::after { left: auto; right: 15px; top: auto; bottom: 25px; width: 4px; height: 4px; }
.drop-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 15px; color: #c5b7ff; border: 1px solid #69558e; background: linear-gradient(145deg, #4a376d, #2a2240); box-shadow: 0 10px 24px #100b24a6; transform: rotate(-8deg); }
.drop-icon .icon { transform: rotate(8deg); width: 24px; height: 24px; }
.drop-area h3 { font-size: 19px; letter-spacing: -.025em; }
.drop-area p { margin: 7px 0 20px; color: var(--muted); font-size: 13px; }
.button { min-height: 40px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px; display: inline-flex; gap: 8px; justify-content: center; align-items: center; font-weight: 650; white-space: nowrap; }
.button .icon { width: 16px; height: 16px; }
.button.secondary { border-color: #3c394a; background: #22212c; color: #eee9fc; }
.button.secondary:hover { background: #2a2836; border-color: #56516a; }
.button.primary { background: var(--accent); color: var(--ink); }
.button.primary:hover { background: var(--accent-hover); }
.button.danger { color: #ffc6cf; background: #482630; border-color: #75424f; }
.button.full { width: 100%; min-height: 43px; justify-content: flex-start; }
.button .end-icon { margin-left: auto; }
.button.compact { min-height: 33px; padding: 0 10px; font-size: 12px; }
.details { display: flex; flex-direction: column; gap: 14px; }
.details .panel-heading { margin-bottom: 3px; }
label { color: #ddd9ed; font-size: 12px; font-weight: 640; display: block; }
.optional { margin-left: 3px; color: var(--faint); font-weight: 400; }
input:not([type=range]), textarea, select { display: block; width: 100%; min-width: 0; border: 1px solid #373543; border-radius: 8px; background: #111118; padding: 9px 11px; outline: none; }
input:not([type=range]), select { min-height: 38px; }
label :is(input, textarea, select) { margin-top: 6px; font-size: 13px; font-weight: 400; }
textarea { resize: vertical; line-height: 1.45; min-height: 54px; }
::placeholder { color: #827f95; }
:is(input, textarea, select):focus { border-color: #9684d4; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#start, #timecode, .timestamp { font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; font-variant-numeric: tabular-nums; }
.selected { max-height: 220px; overflow: auto; margin-top: 11px; }
.selected-row { display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); padding: 8px 2px; }
.selected-row > .icon { color: var(--accent); }
.file-label { display: grid; gap: 4px; flex: 1; min-width: 0; text-align: left; }
.file-label strong, .file-label small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-label strong { font-size: 13px; font-weight: 620; }
.file-label small { color: var(--muted); font-size: 12px; }
.icon-button { border: 1px solid transparent; min-width: 32px; min-height: 32px; display: inline-grid; place-items: center; border-radius: 8px; background: transparent; padding: 5px; color: #aaa7bd; cursor: pointer; flex: none; }
.icon-button:hover { background: #2a2836; color: var(--text); }
.upload-progress { margin-top: 14px; }
.progress-label { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
#progress-label { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
progress { width: 100%; height: 7px; accent-color: var(--accent); }
.notice { margin-top: 13px; padding: 12px 14px; border-radius: 8px; }
.notice.error { color: var(--error); background: #331c26; }
.error-text { color: var(--error); font-size: 13px; }
.share-result { margin-top: 18px; padding: 17px 19px; border-color: #3b5150; }
.share-result .panel-heading { margin-bottom: 13px; }
.share-controls { display: flex; gap: 8px; }
.copy-fallback { position: fixed; inset: 0 auto auto 0; width: 1px; height: 1px; opacity: 0; }
.history { margin-top: 32px; }
.section-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.section-heading h2 { font-size: 17px; font-weight: 670; letter-spacing: -.025em; }
.section-heading > span, .feedback-header > span { color: var(--muted); font-size: 12px; }
.transfer-list { overflow: hidden; }
.empty { padding: 19px; color: var(--muted); }
.history-empty { display: flex; gap: 12px; align-items: center; padding: 15px 18px; }
.history-empty strong, .feedback-empty strong { font-size: 13px; font-weight: 630; }
.history-empty p, .feedback-empty p { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.4; }
.transfer-row { display: flex; align-items: center; padding: 11px 15px; gap: 12px; }
.transfer-row + .transfer-row { border-top: 1px solid var(--line); }
.row-controls { display: flex; gap: 2px; }
.status { border: 1px solid #433e53; background: #22212c; padding: 3px 8px; border-radius: 99px; font-size: 11px; color: var(--muted); text-transform: capitalize; }
.status.live { color: var(--green); background: #172b25; border-color: #2d4b3e; }
.dashboard-footer { max-width: 1160px; margin: 24px auto 0; padding: 0 30px 23px; display: flex; justify-content: space-between; gap: 9px; color: var(--faint); font-size: 12px; }
#network-label { display: flex; align-items: center; gap: 5px; }
#network-label .icon { height: 14px; width: 14px; }
dialog { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; color: var(--text); width: min(405px, calc(100% - 28px)); padding: 20px; }
dialog::backdrop { background: #000a; }
dialog h2 { font-size: 18px; margin-bottom: 8px; }
dialog p { color: var(--muted); line-height: 1.5; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.review-page { background: #101016; }
.review-top { max-width: 1580px; }
#review { max-width: 1580px; margin: 0 auto; padding: 26px 30px 36px; }
.review-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.review-heading h1 { font-size: clamp(23px, 4vw, 35px); font-weight: 680; letter-spacing: -.043em; overflow-wrap: anywhere; }
.review-heading p { color: var(--muted); margin-top: 6px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(285px, 350px); align-items: start; gap: 16px; }
.review-main { min-width: 0; }
.viewer { background: #14141b; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stage { position: relative; display: grid; place-items: center; height: clamp(290px, 49vw, min(59vh, 620px)); overflow: hidden; background: #08080c; }
.stage.file-stage { height: clamp(230px, 35vw, 420px); background: radial-gradient(ellipse at center, #211b31, #101016 70%); }
.media-wrap { position: relative; grid-area: 1 / 1; }
.media-wrap video, .media-wrap img { display: block; width: 100%; height: 100%; }
#drawing { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
#drawing.annotating { cursor: crosshair; pointer-events: auto; touch-action: none; }
.media-placeholder { display: grid; place-items: center; text-align: center; gap: 10px; padding: 14px; max-width: 100%; }
.media-placeholder strong, .media-placeholder p { overflow-wrap: anywhere; }
.media-placeholder p { color: var(--muted); font-size: 13px; }
.drawing-tools { display: flex; align-items: center; gap: 5px; position: absolute; z-index: 1; inset: 9px auto auto 50%; transform: translateX(-50%); padding: 5px; border-radius: 11px; border: 1px solid #4a4556; background: #15131dee; backdrop-filter: blur(10px); }
.swatches { display: flex; align-items: center; gap: 8px; padding: 0 7px; }
.swatch { border: 0; width: 15px; height: 15px; border-radius: 50%; padding: 0; }
.swatch[aria-pressed=true] { outline: 1px solid #fff; outline-offset: 2px; }
.swatch.amber { background: #fbbf74; }
.swatch.pink { background: #ff6383; }
.swatch.blue { background: #54d7ef; }
.swatch.white { background: #fff; }
.player-controls { padding: 10px 13px 8px; }
.player-controls:has(.transport-controls[hidden]):has(#draw[hidden]) { display: none; }
.timeline { position: relative; padding: 7px 0 3px; }
.timeline-markers { position: absolute; top: 0; left: 7px; right: 7px; height: 10px; pointer-events: none; z-index: 1; }
.timeline-marker { position: absolute; transform: translateX(-50%) rotate(45deg); width: 9px; height: 9px; background: #ffd18e; border: 1px solid #181421; border-radius: 2px; padding: 0; pointer-events: auto; }
.timeline-marker.selected-marker { background: #ff9f4d; }
#scrubber { width: 100%; margin: 0; display: block; height: 16px; appearance: none; background: transparent; cursor: pointer; }
#scrubber::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(to right, var(--accent) var(--played, 0%), #42404f var(--played, 0%)); border-radius: 4px; }
#scrubber::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 100%; background: var(--accent); }
#scrubber::-moz-range-track { height: 4px; background: linear-gradient(to right, var(--accent) var(--played, 0%), #42404f var(--played, 0%)); border-radius: 4px; }
#scrubber::-moz-range-thumb { border: none; width: 12px; height: 12px; border-radius: 100%; background: var(--accent); }
.transport { display: flex; justify-content: space-between; align-items: center; gap: 5px; }
.transport-controls, .transport-end { display: flex; gap: 4px; align-items: center; }
.transport-end { margin-left: auto; }
.play { color: var(--text); }
#timecode { margin-left: 7px; color: #dfd7fd; font-size: 13px; }
#rate-label { color: var(--faint); font-size: 11px; margin-right: 6px; white-space: nowrap; }
#draw[aria-pressed=true] { border-color: var(--accent); color: var(--accent); }
.viewer:fullscreen { display: grid; grid-template-rows: minmax(0, 1fr) auto; border: 0; border-radius: 0; }
.viewer:fullscreen .stage { height: 100%; }
.asset-panel { margin-top: 15px; }
.asset-panel .section-heading { padding: 14px 14px 0; }
.asset-row { display: flex; align-items: center; border-top: 1px solid var(--line); gap: 9px; padding-right: 12px; }
.asset-row.current { background: #201c2d; }
.asset-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.asset-select { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: none; background: transparent; padding: 8px 12px; }
.asset-select:hover { background: #272235; }
.asset-select .tile { width: 33px; height: 33px; border-radius: 8px; }
.feedback { display: flex; flex-direction: column; min-height: 515px; max-height: clamp(515px, 77vh, 790px); }
.feedback-header { min-height: 55px; display: flex; align-items: center; gap: 9px; padding: 0 15px; border-bottom: 1px solid var(--line); }
.feedback-header .icon { color: var(--accent); }
.feedback-header h2 { font-size: 15px; font-weight: 670; }
.feedback-header > span { margin-left: auto; }
.notes { flex: 1; min-height: 180px; overflow: auto; }
.feedback-empty { height: 100%; min-height: 180px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 16px; }
.feedback-empty .tile { margin-bottom: 9px; }
.note { display: flex; gap: 10px; padding: 13px 14px; }
.note + .note { border-top: 1px solid var(--line); }
.avatar { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: #32284b; color: var(--accent); font-size: 12px; font-weight: 700; }
.note-details { flex: 1; min-width: 0; }
.note-head { display: flex; align-items: baseline; gap: 6px; justify-content: space-between; margin-bottom: 4px; }
.note-head strong { font-size: 13px; overflow-wrap: anywhere; }
.note-date { color: var(--faint); font-size: 11px; flex: none; }
.note-text { color: #d7d3e5; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.timestamp { display: inline-flex; align-items: center; gap: 5px; width: fit-content; color: #d1c5ff; background: #2a223d; border: 1px solid #44385f; border-radius: 5px; padding: 3px 6px; font-size: 11px; }
.note-jump { margin: 2px 0 5px; }
.note-jump:hover { background: #3b2f56; }
.timestamp .icon, #drawing-attached .icon { width: 13px; height: 13px; }
.comment-form { border-top: 1px solid var(--line); padding: 13px; display: grid; gap: 8px; }
.comment-form input, .comment-form textarea { font-size: 13px; }
.comment-meta { display: flex; align-items: center; gap: 7px; }
.comment-meta:empty, .comment-meta:not(:has(> :not([hidden]))) { display: none; }
#drawing-attached { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; }
#post { justify-self: end; }
.review-status { margin: 60px auto; width: min(400px, calc(100% - 34px)); padding: 23px; }
.review-status h1 { margin: 12px 0 5px; font-size: 21px; }
.review-status p { color: var(--muted); line-height: 1.4; }
@media (max-width: 880px) {
  .review-grid { grid-template-columns: minmax(0, 1fr) minmax(235px, 285px); gap: 11px; }
  #review, .review-top { padding-left: 17px; padding-right: 17px; }
}
@media (max-width: 680px) {
  .topbar-inner { min-height: 58px; padding: 0 15px; gap: 10px; }
  .dashboard { padding: 32px 14px 0; }
  .dashboard-footer { padding: 0 14px 18px; }
  .transfer-grid, .review-grid { grid-template-columns: 1fr; gap: 12px; }
  .transfer-grid > .panel { min-height: 0; padding: 15px; }
  .drop-area { min-height: 245px; }
  .panel-heading { margin-bottom: 13px; }
  .history { margin-top: 23px; }
  .transfer-row { gap: 7px; padding: 9px 8px; }
  .transfer-row .tile { display: none; }
  .share-controls { flex-wrap: wrap; }
  #review { padding: 18px 12px; }
  .review-heading { flex-wrap: wrap; }
  .review-actions { justify-content: flex-start; }
  .stage { height: clamp(220px, 60vw, 370px); }
  .feedback { min-height: 390px; }
  .server-state { font-size: 11px; }
}
@media (max-width: 370px) {
  .top-section { font-size: 11px; }
  #timecode { margin-left: 3px; font-size: 11px; }
  #rate-label { display: none; }
}

.passphrase-controls { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; }
.passphrase-controls label { flex: 1; min-width: 0; }
.unlock-form { display: grid; gap: 10px; margin-top: 14px; }
.unlock-form .button { justify-self: start; }
