﻿:root {
  --paper: #f0f2eb;
  --ink: #111111;
  --line: 1px solid var(--ink);
  --radius: 16px;
  --sans: Inter, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --mono: "Azeret Mono", "Space Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
}

button,
textarea,
input {
  font: inherit;
  color: inherit;
  accent-color: var(--ink);
}

button {
  background: transparent;
  border: 0;
  cursor: pointer;
  text-transform: uppercase;
}

button:focus,
textarea:focus,
input:focus,
.dial:focus {
  outline: 0;
}

button:focus-visible,
input:focus-visible,
.dial:focus-visible {
  box-shadow: inset 0 0 0 2px var(--ink);
}

.device-shell {
  width: min(100%, 470px);
  min-height: 100vh;
  margin: 0 auto;
  border-left: var(--line);
  border-right: var(--line);
  background: var(--paper);
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 24px 22px 118px;
}

.screen.is-active {
  display: block;
}

.status-row,
.top-nav,
.entry-header,
.section-head,
.control-row > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-time,
.entry-header time,
.main-clock,
.sub-readout,
.spec-item strong,
.dial-meta output,
.dial-face strong,
.log-list time,
.log-list p,
.control-row output,
textarea {
  font-family: var(--mono);
}

.status-time {
  font-size: 26px;
}

.system-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 21px;
}

.signal-bars i {
  display: block;
  width: 5px;
  background: var(--ink);
}

.signal-bars i:nth-child(1) { height: 7px; }
.signal-bars i:nth-child(2) { height: 11px; }
.signal-bars i:nth-child(3) { height: 16px; }
.signal-bars i:nth-child(4) { height: 21px; }

.wifi-icon {
  width: 25px;
  height: 18px;
  border: 5px solid var(--ink);
  border-left-color: transparent;
  border-right-color: transparent;
  border-bottom: 0;
  border-radius: 25px 25px 0 0;
  position: relative;
}

.wifi-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: -5px;
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-radius: 50%;
}

.battery-icon {
  width: 42px;
  height: 22px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 3px;
  position: relative;
}

.battery-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 6px;
  width: 3px;
  height: 8px;
  border: var(--line);
  border-left: 0;
}

.battery-icon i {
  display: block;
  height: 100%;
  width: 76%;
  background: var(--ink);
}

.top-nav {
  margin-top: 34px;
}

h1 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(48px, 13vw, 66px);
  font-weight: 400;
  line-height: 0.95;
  text-transform: none;
}

.menu-button {
  width: 48px;
  height: 48px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.menu-button span {
  display: block;
  height: 2px;
  background: var(--ink);
}

.tab-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 32px;
  border-bottom: var(--line);
}

.tab {
  min-height: 36px;
  padding: 0 2px 12px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  border-bottom: 5px solid transparent;
}

.tab.is-selected {
  border-bottom-color: var(--ink);
}

.live-panel {
  margin-top: 28px;
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.clock-block {
  padding: 20px 20px 16px;
  border-bottom: var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.main-clock {
  display: block;
  font-size: clamp(48px, 15vw, 70px);
  line-height: 1;
}

.sub-readout {
  margin: 8px 0 0;
  font-size: 13px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.spec-item {
  min-width: 0;
  padding: 16px 10px;
  border-right: var(--line);
  text-align: center;
}

.spec-item:last-child {
  border-right: 0;
}

.spec-item p {
  margin: 8px 0 2px;
  font-size: 10px;
  font-weight: 800;
}

.spec-item strong {
  display: block;
  font-size: clamp(16px, 5vw, 24px);
  font-weight: 400;
  white-space: nowrap;
}

.wire {
  display: block;
  margin: 0 auto;
  position: relative;
}

.sun-wire {
  width: 28px;
  height: 28px;
  border: var(--line);
  border-radius: 50%;
}

.sun-wire::before,
.sun-wire::after {
  content: "";
  position: absolute;
  inset: -7px 12px;
  border-left: var(--line);
}

.sun-wire::after {
  transform: rotate(90deg);
}

.drop-wire {
  width: 22px;
  height: 30px;
  border: var(--line);
  border-radius: 50% 50% 55% 55%;
  transform: rotate(45deg);
}

.wind-wire {
  width: 34px;
  height: 24px;
  border-top: var(--line);
  border-bottom: var(--line);
}

.wind-wire::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 11px;
  width: 28px;
  border-top: var(--line);
}

.dial-panel {
  margin-top: 18px;
  border: var(--line);
  border-radius: var(--radius);
  padding: 18px 14px 22px;
}

.dial-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 6px 12px;
}

.dial-meta output {
  font-size: 18px;
}

.dial {
  --angle: 232deg;
  --pointer-distance: -122px;
  width: min(100%, 338px);
  aspect-ratio: 1;
  margin: 0 auto;
  position: relative;
  border-radius: 50%;
  touch-action: none;
}

.tick-ring {
  position: absolute;
  inset: 0;
}

.tick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 18px;
  margin-left: -1px;
  margin-top: -50%;
  background: var(--ink);
  transform-origin: 1px calc(50% - -151px);
}

.tick.is-major {
  height: 27px;
  width: 3px;
}

.dial-face {
  position: absolute;
  inset: 48px;
  border: var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
}

.dial-pointer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--ink);
  transform: rotate(var(--angle)) translateY(var(--pointer-distance));
  transform-origin: 50% 50%;
}

.dial-date {
  font-family: var(--mono);
  font-size: 15px;
}

.dial-face strong {
  font-size: clamp(52px, 17vw, 72px);
  font-weight: 400;
  line-height: 1;
}

.dial-face em {
  font-family: var(--mono);
  font-size: 14px;
  font-style: normal;
}

.record-button,
.save-button {
  width: 100%;
  min-height: 66px;
  margin-top: 18px;
  border: var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 800;
  background: var(--ink);
  color: var(--paper);
}

.record-button:active,
.save-button:active {
  background: var(--paper);
  color: var(--ink);
}

.log-panel {
  margin-top: 18px;
  border-top: var(--line);
}

.section-head {
  min-height: 46px;
  border-bottom: var(--line);
}

.section-head h2,
.metadata-panel h2,
.control-row h2,
.weather-control h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.section-head span {
  font-family: var(--mono);
  font-size: 13px;
}

.log-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.log-list li {
  display: grid;
  grid-template-columns: 58px 1fr 52px;
  align-items: center;
  min-height: 54px;
  border-bottom: var(--line);
  gap: 10px;
}

.log-list time {
  font-size: 13px;
}

.log-list p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.mini-switch {
  justify-self: end;
  width: 45px;
  height: 24px;
  border: var(--line);
  border-radius: 999px;
  padding: 2px;
}

.mini-switch::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
}

.mini-switch.is-on::after {
  transform: translateX(19px);
}

.entry-header {
  gap: 14px;
}

.back-button {
  font-family: var(--mono);
  font-size: clamp(30px, 9vw, 48px);
  line-height: 1;
  text-align: left;
  text-transform: none;
}

.entry-header time {
  flex: 0 0 auto;
  font-size: 15px;
}

.entry-body {
  margin-top: 36px;
}

textarea {
  display: block;
  width: 100%;
  min-height: 330px;
  margin-top: 10px;
  padding: 18px;
  resize: vertical;
  border: var(--line);
  border-radius: var(--radius);
  background: transparent;
  font-size: 18px;
  line-height: 1.55;
  outline: 0;
}

textarea:focus {
  border-width: 2px;
}

textarea::placeholder {
  color: var(--ink);
  opacity: 0.52;
}

.metadata-panel {
  margin-top: 18px;
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.control-row,
.weather-control {
  padding: 18px;
}

.control-row {
  border-bottom: var(--line);
  display: grid;
  gap: 16px;
}

.control-row output {
  font-size: 28px;
}

.range-frame {
  position: relative;
  width: 100%;
  height: 28px;
}

.range-frame span {
  position: absolute;
  left: 1px;
  top: 5px;
  width: var(--mood, 68%);
  max-width: calc(100% - 2px);
  height: 18px;
  border-radius: 999px;
  background: var(--ink);
  pointer-events: none;
}

input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 28px;
  appearance: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 18px;
  border: var(--line);
  border-radius: 999px;
  background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -6px;
  border: var(--line);
  border-radius: 50%;
  background: var(--paper);
}

input[type="range"]::-moz-range-track {
  height: 18px;
  border: var(--line);
  border-radius: 999px;
  background: transparent;
}

input[type="range"]::-moz-range-progress {
  height: 18px;
  background: var(--ink);
  border-radius: 999px;
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: var(--line);
  border-radius: 50%;
  background: var(--paper);
}

.pill-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.weather-pill {
  min-height: 46px;
  border: var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

.weather-pill.is-selected {
  background: var(--ink);
  color: var(--paper);
}

.save-button {
  position: sticky;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.progress-circle {
  width: 26px;
  height: 26px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: none;
}

.save-button.is-loading .progress-circle {
  display: inline-block;
  animation: progress-turn 0.8s steps(12) infinite;
}

@keyframes progress-turn {
  to { transform: rotate(360deg); }
}

@media (min-width: 760px) {
  body {
    padding: 26px;
  }

  .device-shell {
    min-height: calc(100vh - 52px);
    border: var(--line);
    border-radius: 34px;
    overflow: hidden;
  }

  .screen {
    min-height: calc(100vh - 52px);
    padding: 36px 34px 126px;
  }
}

@media (max-width: 380px) {
  .screen {
    padding-left: 16px;
    padding-right: 16px;
  }

  .log-list {
    font-size: 12px;
  }

  .dial-face {
    inset: 42px;
  }

  .dial-pointer {
    transform: rotate(var(--angle)) translateY(var(--pointer-distance));
  }

  .dial {
    --pointer-distance: -109px;
  }
}

body.theme-dark {
  --paper: #111111;
  --ink: #f0f2eb;
}

select {
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  outline: 0;
  appearance: none;
}

.system-icons {
  align-items: stretch;
  gap: 8px;
}

.theme-switch,
.language-select {
  min-height: 34px;
  border: var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  background: var(--paper);
  color: var(--ink);
}

.theme-switch {
  display: inline-grid;
  grid-template-columns: auto 28px auto;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.theme-switch i {
  display: block;
  width: 28px;
  height: 16px;
  border: var(--line);
  border-radius: 999px;
  position: relative;
}

.theme-switch i::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

body.theme-dark .theme-switch i::after {
  transform: translateX(12px);
}

.language-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.language-select > span {
  opacity: 0.62;
}

.ko-sub {
  display: block;
  margin-top: 3px;
  font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.72em;
  font-weight: 500;
  line-height: 1.2;
  text-transform: none;
}

html[data-language="ko"] body {
  font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", var(--sans);
}

html[data-language="ko"] .tab,
html[data-language="ko"] .eyebrow,
html[data-language="ko"] .record-button,
html[data-language="ko"] .save-button,
html[data-language="ko"] .weather-pill,
html[data-language="ko"] .log-list p {
  font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

h1 {
  font-size: clamp(34px, 9vw, 64px);
}

.tab {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 900px) {
  body {
    min-height: 100vh;
    padding: 28px;
    display: grid;
    place-items: start center;
  }

  .device-shell {
    width: min(calc(100vw - 56px), 1180px);
    min-height: auto;
    border: var(--line);
    border-radius: 28px;
    overflow: hidden;
  }

  .screen {
    min-height: auto;
    padding: 34px;
  }

  .screen-dashboard.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    grid-template-areas:
      "status status"
      "nav nav"
      "tabs tabs"
      "live dial"
      "action dial"
      "log dial";
    column-gap: 24px;
    row-gap: 18px;
  }

  .screen-dashboard .status-row { grid-area: status; }
  .screen-dashboard .top-nav { grid-area: nav; margin-top: 18px; }
  .screen-dashboard .tab-strip { grid-area: tabs; margin-top: 8px; }
  .screen-dashboard .live-panel { grid-area: live; margin-top: 0; }
  .screen-dashboard .dial-panel { grid-area: dial; margin-top: 0; display: grid; align-content: center; }
  .screen-dashboard .record-button { grid-area: action; margin-top: 0; }
  .screen-dashboard .log-panel { grid-area: log; margin-top: 0; }

  h1 {
    font-size: clamp(52px, 6vw, 76px);
  }

  .main-clock {
    font-size: clamp(70px, 8vw, 112px);
  }

  .dial {
    width: min(100%, 382px);
    --pointer-distance: -138px;
  }

  .dial-face strong {
    font-size: clamp(62px, 7vw, 86px);
  }

  .screen-entry.is-active {
    max-width: 920px;
    margin: 0 auto;
  }

  textarea {
    min-height: 380px;
  }
}

@media (max-width: 520px) {
  .status-row {
    align-items: flex-start;
    gap: 12px;
  }

  .system-icons {
    flex-direction: column;
    align-items: flex-end;
  }

  .theme-switch,
  .language-select {
    min-height: 30px;
  }
}

:root {
  --ko: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

html[data-language="ko"] body,
html[data-language="ko"] h1,
html[data-language="ko"] button,
html[data-language="ko"] select,
html[data-language="ko"] textarea,
html[data-language="ko"] .tab,
html[data-language="ko"] .eyebrow,
html[data-language="ko"] .record-button,
html[data-language="ko"] .save-button,
html[data-language="ko"] .weather-pill,
html[data-language="ko"] .log-list p,
html[data-language="ko"] .section-head h2,
html[data-language="ko"] .metadata-panel h2,
html[data-language="ko"] .control-row h2,
html[data-language="ko"] .weather-control h2 {
  font-family: var(--ko);
}

.ko-sub {
  font-family: var(--ko);
}

.menu-button.is-open span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.menu-button.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-button.is-open span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.command-panel {
  display: none;
  grid-column: 1 / -1;
  border: var(--line);
  border-radius: var(--radius);
  padding: 14px;
  font-family: var(--mono);
  font-size: 12px;
}

.command-panel.is-open {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.command-panel button {
  min-height: 42px;
  border: var(--line);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
}

.command-panel button:active,
.command-panel button.is-active {
  background: var(--ink);
  color: var(--paper);
}

.log-list li,
.spec-item,
.mini-switch {
  cursor: pointer;
}

.log-list li.is-active {
  background: var(--ink);
  color: var(--paper);
}

.log-list li.is-active .mini-switch::after {
  background: var(--paper);
}

.spec-item.is-active {
  background: var(--ink);
  color: var(--paper);
}

.spec-item.is-active .wire,
.spec-item.is-active .sun-wire,
.spec-item.is-active .drop-wire {
  border-color: var(--paper);
}

.spec-item.is-active .sun-wire::before,
.spec-item.is-active .sun-wire::after,
.spec-item.is-active .wind-wire,
.spec-item.is-active .wind-wire::after {
  border-color: var(--paper);
}

.spec-item.is-active .signal-bars i,
.spec-item.is-active .mini-switch::after {
  background: var(--paper);
}

@media (min-width: 900px) {
  .screen-dashboard.is-active {
    grid-template-areas:
      "status status"
      "nav nav"
      "menu menu"
      "tabs tabs"
      "live dial"
      "action dial"
      "log dial";
  }

  .command-panel {
    grid-area: menu;
  }
}

@media (max-width: 620px) {
  .command-panel.is-open {
    grid-template-columns: 1fr;
  }
}

.time-markers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.time-marker {
  min-width: 0;
  min-height: 58px;
  padding: 8px 6px;
  border: var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  gap: 3px;
  font-family: var(--mono);
  background: var(--paper);
  color: var(--ink);
}

.time-marker span {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

.time-marker output {
  font-size: clamp(12px, 3vw, 15px);
  line-height: 1;
}

.time-marker.is-set,
.time-marker:active {
  background: var(--ink);
  color: var(--paper);
}

html[data-language="ko"] .time-marker,
html[data-language="ko"] .time-marker span {
  font-family: var(--ko);
}

@media (max-width: 420px) {
  .time-markers {
    grid-template-columns: 1fr;
  }

  .time-marker {
    grid-template-columns: 1fr auto;
    min-height: 44px;
    padding: 0 14px;
    text-align: left;
  }
}

.tab-strip {
  grid-template-columns: repeat(2, 1fr);
}

.tag-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tag-pill {
  min-height: 40px;
  border-radius: 999px;
  font-size: 12px;
}

.tag-pill.is-selected {
  background: var(--ink);
  color: var(--paper);
}

.tag-hint {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.35;
  text-transform: uppercase;
}

html[data-language="ko"] .tag-hint,
html[data-language="ko"] .tag-pill {
  font-family: var(--ko);
}

@media (max-width: 620px) {
  .tag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.runtime-control {
  min-height: 38px;
  margin-top: 14px;
  padding: 0 22px;
  border: var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  background: var(--paper);
  color: var(--ink);
}

.runtime-control.is-running,
.runtime-control:active {
  background: var(--ink);
  color: var(--paper);
}

.dial {
  --tick-radius: -44%;
}

.tick {
  left: 50%;
  top: 50%;
  margin: 0;
  transform-origin: 50% 50%;
}

@media (min-width: 900px) {
  .dial {
    --tick-radius: -44%;
  }
}

html[data-language="ko"] .runtime-control {
  font-family: var(--ko);
}

.film-selector {
  margin-top: 18px;
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.film-select-button {
  width: 100%;
  min-height: 58px;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  border-bottom: var(--line);
  text-align: left;
}

.film-select-button span,
.film-select-button output {
  font-size: 11px;
  font-weight: 800;
}

.film-select-button strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 400;
  text-align: center;
}

.film-search-panel {
  padding: 14px;
}

.film-search-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: var(--line);
  border-radius: 999px;
  background: transparent;
  font-family: var(--mono);
  font-size: 14px;
  outline: 0;
}

.film-results {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border-top: var(--line);
}

.film-results li {
  border-bottom: var(--line);
}

.film-results button {
  width: 100%;
  min-height: 52px;
  padding: 8px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto) auto;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  text-align: left;
}

.film-results strong,
.film-results span,
.film-results output {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.film-results strong {
  font-size: 14px;
  font-weight: 800;
}

.film-results span,
.film-results output {
  font-size: 11px;
}

.film-results button:active,
.film-results button:hover {
  background: var(--ink);
  color: var(--paper);
}

html[data-language="ko"] .film-select-button,
html[data-language="ko"] .film-search-input,
html[data-language="ko"] .film-results button {
  font-family: var(--ko);
}

@media (min-width: 900px) {
  .screen-dashboard.is-active {
    grid-template-areas:
      "status status"
      "nav nav"
      "menu menu"
      "tabs tabs"
      "film film"
      "live dial"
      "action dial"
      "log dial";
  }

  .film-selector {
    grid-area: film;
    margin-top: 0;
  }
}

@media (max-width: 620px) {
  .film-select-button,
  .film-results button {
    grid-template-columns: 1fr;
    gap: 4px;
    text-align: left;
  }

  .film-select-button strong {
    text-align: left;
  }
}

.spec-item {
  position: relative;
}

.spec-item.is-active::after {
  content: "SYNC";
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--paper);
  background: var(--ink);
  border: var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}

.image-panel {
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}

.compact-head {
  min-height: 52px;
  padding: 0 18px;
  border-bottom: var(--line);
}

.file-chip,
.custom-tag-button {
  min-height: 34px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.file-chip:active,
.custom-tag-button:active {
  background: var(--ink);
  color: var(--paper);
}

.frame-image-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.frame-media-drop {
  min-height: clamp(180px, 36vw, 320px);
  padding: 18px;
  display: grid;
  place-items: center;
  border: 0;
  background:
    linear-gradient(var(--ink), var(--ink)) left 18px top 18px / 42px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right 18px bottom 18px / 42px 1px no-repeat,
    transparent;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  cursor: crosshair;
}

.frame-media-drop:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: -8px;
}

.frame-media-drop img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05);
}

.frame-media-drop:has(img:not([hidden])) span {
  display: none;
}

.tag-control {
  display: grid;
  gap: 12px;
}

.tag-section {
  border: var(--line);
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
}

.tag-section summary {
  min-height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: var(--line);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.tag-section summary::after {
  content: "+";
  font-size: 18px;
  line-height: 1;
}

.tag-section[open] summary::after {
  content: "-";
}

.tag-section:not([open]) summary {
  border-bottom: 0;
}

.tag-section .tag-grid {
  padding: 12px;
}

.custom-tag-row {
  padding: 0 12px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.custom-tag-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  outline: 0;
  text-transform: uppercase;
}

.custom-tag-input:focus {
  background: var(--ink);
  color: var(--paper);
}

html[data-language="ko"] .file-chip,
html[data-language="ko"] .custom-tag-button,
html[data-language="ko"] .custom-tag-input,
html[data-language="ko"] .tag-section summary {
  font-family: var(--ko);
}

.theme-dark .spec-item.is-active::after {
  color: var(--ink);
  background: var(--paper);
}

@media (max-width: 620px) {
  .custom-tag-row {
    grid-template-columns: 1fr;
  }
}

.archive-vault {
  margin-top: 32px;
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}

.archive-vault[hidden],
.log-panel[hidden],
.record-button[hidden] {
  display: none !important;
}

.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: var(--line);
}

.archive-record:last-child {
  border-bottom: 0;
}

.archive-open {
  min-width: 0;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  font-family: var(--mono);
  text-align: left;
}

.archive-open time,
.archive-open span {
  font-size: 11px;
  font-weight: 800;
}

.archive-open strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.archive-open p {
  grid-column: 2 / 4;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.archive-tools {
  display: grid;
  grid-template-columns: repeat(2, 42px);
  border-left: var(--line);
}

.archive-action {
  position: relative;
  min-height: 72px;
  border-left: var(--line);
}

.archive-action:first-child {
  border-left: 0;
}

.archive-action:active,
.archive-open:active {
  background: var(--ink);
  color: var(--paper);
}

.archive-action i {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
}

.archive-edit i {
  border-bottom: 2px solid currentColor;
  transform: translate(-50%, -50%) rotate(-38deg);
}

.archive-edit i::before {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -5px;
  width: 5px;
  height: 5px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.archive-delete i {
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
}

.archive-delete i::before {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: -5px;
  border-top: 2px solid currentColor;
}

.archive-empty {
  min-height: 96px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

.input-panel {
  margin-top: 18px;
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.input-panel textarea {
  margin-top: 0;
  border: 0;
  border-radius: 0;
}

.metadata-panel > .compact-head,
.tag-control > .compact-head {
  border-bottom: var(--line);
}

.metadata-panel .control-row {
  padding: 18px;
}

.tag-control {
  padding: 0;
}

.tag-control .tag-section {
  margin: 14px 18px 0;
}

.tag-control .tag-hint {
  margin: 12px 18px 18px;
}

.media-icons {
  width: min(220px, 64%);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  align-items: center;
}

.media-icon {
  position: relative;
  display: block;
  width: 74px;
  height: 74px;
  margin: 0 auto;
  color: var(--ink);
}

.media-icon-file {
  border: var(--line);
  border-radius: 3px;
}

.media-icon-file::before {
  content: "";
  position: absolute;
  right: -1px;
  top: -1px;
  width: 24px;
  height: 24px;
  border-left: var(--line);
  border-bottom: var(--line);
  background: var(--paper);
}

.media-icon-file::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  height: 24px;
  border: var(--line);
  border-radius: 50% 50% 0 0;
  border-bottom: 0;
}

.media-icon-paste {
  border: var(--line);
  border-radius: 4px;
}

.media-icon-paste::before {
  content: "";
  position: absolute;
  left: 19px;
  right: 19px;
  top: -9px;
  height: 16px;
  border: var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.media-icon-paste::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 16px;
  height: 18px;
  border-left: var(--line);
  border-right: var(--line);
  border-bottom: var(--line);
  transform: skewX(-18deg);
}

.frame-media-drop.has-image .media-icons {
  display: none;
}

.film-arrow {
  font-size: 22px !important;
  line-height: 1;
}

.film-select-button output {
  font-size: 22px;
  line-height: 1;
}

html[data-language="ko"] .archive-open,
html[data-language="ko"] .archive-empty {
  font-family: var(--ko);
}

@media (min-width: 900px) {
  .screen-dashboard .archive-vault {
    grid-area: log;
    margin-top: 18px;
  }
}

@media (max-width: 620px) {
  .archive-record,
  .archive-open {
    grid-template-columns: 1fr;
  }

  .archive-open p {
    grid-column: auto;
  }

  .archive-tools {
    grid-template-columns: repeat(2, 1fr);
    border-left: 0;
    border-top: var(--line);
  }

  .archive-action {
    min-height: 44px;
  }
}


/* Precision pass: unify hardware line weight and archive-only layout. */
:root {
  --hairline: 1px;
}

.film-selector[hidden],
.live-panel[hidden],
.dial-panel[hidden],
.log-panel[hidden],
.record-button[hidden],
.archive-vault[hidden] {
  display: none !important;
}

.menu-button {
  width: 46px;
  height: 46px;
  gap: 9px;
}

.menu-button span {
  height: var(--hairline);
  border-radius: 0;
}

.menu-button.is-open span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.menu-button.is-open span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.wire,
.media-icon,
.archive-action i,
.archive-edit i,
.archive-delete i {
  color: var(--ink);
}

.spec-item .wire,
.media-icon-file,
.media-icon-paste,
.archive-delete i {
  border-width: var(--hairline);
}

.sun-wire::before,
.sun-wire::after,
.wind-wire,
.wind-wire::after,
.media-icon-file::before,
.media-icon-file::after,
.media-icon-paste::before,
.media-icon-paste::after {
  border-width: var(--hairline);
}

.archive-edit i {
  width: 17px;
  height: 17px;
  border-bottom: var(--hairline) solid currentColor;
}

.archive-edit i::before {
  width: 5px;
  height: 5px;
  border-right: var(--hairline) solid currentColor;
  border-bottom: var(--hairline) solid currentColor;
}

.archive-delete i::before {
  border-top: var(--hairline) solid currentColor;
}

.archive-vault {
  margin-top: 34px;
  border: var(--line);
  border-radius: var(--radius);
}

.archive-vault .section-head {
  min-height: 56px;
  padding: 0 18px;
}

.archive-vault .section-head h2,
.image-panel .section-head h2,
.input-panel .section-head h2,
.metadata-panel > .section-head h2,
.tag-control > .section-head h2 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.archive-vault .section-head span,
.metadata-panel > .section-head output {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.archive-empty {
  min-height: 156px;
  font-size: 12px;
}

.archive-record {
  grid-template-columns: minmax(0, 1fr) 86px;
}

.archive-open {
  min-height: 82px;
  padding: 14px 18px;
}

.archive-tools {
  grid-template-columns: repeat(2, 43px);
}

.archive-action {
  min-height: 82px;
}

.screen-entry .entry-header {
  margin-bottom: 30px;
}

.screen-entry .image-panel {
  margin-top: 0;
}

.entry-body.input-panel {
  margin-top: 18px;
}

textarea {
  min-height: 300px;
}

.input-panel textarea {
  min-height: 288px;
  padding: 16px 18px;
}

.metadata-panel .control-row {
  padding: 14px 18px;
}

.weather-control.tag-control {
  padding-bottom: 0;
}

.tag-control .tag-section {
  margin: 10px 18px 0;
}

.tag-control .tag-section:last-of-type {
  margin-bottom: 14px;
}

.tag-hint {
  display: none !important;
}

.tag-section summary {
  min-height: 40px;
  font-size: 11px;
}

.tag-section .tag-grid {
  padding: 10px;
}

.tag-pill {
  min-height: 36px;
  font-size: 11px;
}

.custom-tag-row {
  padding: 0 10px 10px;
}

.custom-tag-input {
  min-height: 38px;
  font-size: 12px;
}

.custom-tag-button {
  min-height: 38px;
}

.dial-pointer {
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
}

.frame-media-drop {
  min-height: clamp(164px, 31vw, 286px);
}

.media-icons {
  width: min(178px, 58%);
  gap: 24px;
}

.media-icon {
  width: 58px;
  height: 58px;
}

@media (min-width: 900px) {
  .screen-dashboard.is-active {
    grid-template-areas:
      "status status"
      "nav nav"
      "menu menu"
      "tabs tabs"
      "film film"
      "live dial"
      "action dial"
      "log log";
  }

  .screen-dashboard .archive-vault {
    grid-area: log;
    margin-top: 20px;
  }

  .screen-dashboard .archive-vault:not([hidden]) {
    grid-column: 1 / -1;
  }

  .screen-entry.is-active {
    max-width: 880px;
  }

  textarea,
  .input-panel textarea {
    min-height: 330px;
  }
}

@media (min-width: 900px) {
  .screen-dashboard.is-active.is-archive {
    grid-template-areas:
      "status status"
      "nav nav"
      "menu menu"
      "tabs tabs"
      "log log";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .screen-dashboard.is-active.is-archive .archive-vault {
    grid-area: log;
    margin-top: 22px;
  }
}

/* --- Final polish: remove history, refine media icons and post-it controls (06.08) --- */
.timeline-history {
  display: none !important;
}

.cinema-player .file-chip,
.youtube-chip {
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  border-width: 1.5px !important;
  position: relative !important;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.cinema-player .file-chip:hover,
.youtube-chip:hover {
  transform: translateY(-1px);
  background: var(--ink) !important;
  color: var(--paper) !important;
}

.cinema-player .file-chip::before,
.cinema-player .file-chip::after,
.youtube-chip::before,
.youtube-chip::after {
  box-sizing: border-box;
}

.cinema-player .file-chip::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 14px;
  height: 15px;
  border: 0;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.cinema-player .file-chip::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 11px;
  height: 10px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 5px 5px;
  transform: none;
}

.youtube-chip::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 14px;
  width: 14px;
  height: 8px;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 999px 0 0 999px;
  transform: rotate(-35deg);
}

.youtube-chip::after {
  content: "";
  position: absolute;
  right: 11px;
  bottom: 14px;
  width: 14px;
  height: 8px;
  border: 2px solid currentColor;
  border-left: 0;
  border-radius: 0 999px 999px 0;
  transform: rotate(-35deg);
}

.youtube-panel input {
  font-size: 13px;
}

.memo-note-bar {
  padding: 5px 8px;
}

.memo-note button[data-note-action="delete"] {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
}

.memo-note-resize {
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  border-radius: 0 0 10px 0;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(0, 0, 0, 0.22) 49% 51%, transparent 52%),
    linear-gradient(135deg, transparent 0 63%, rgba(0, 0, 0, 0.16) 64% 66%, transparent 67%);
  cursor: nwse-resize;
}

.memo-note-resize::before,
.memo-note-resize::after {
  content: none !important;
}

.memo-note[data-memo-color="black"] .memo-note-resize {
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, 0.44) 49% 51%, transparent 52%),
    linear-gradient(135deg, transparent 0 63%, rgba(255, 255, 255, 0.32) 64% 66%, transparent 67%);
}

.screen-dashboard.is-archive .archive-vault {
  margin-top: 24px;
}

/* Evaluation and metric pass. */
.runtime-control {
  width: 100%;
  min-height: 58px;
  margin-top: 16px;
  margin-bottom: 0;
  border-radius: 999px;
  font-size: 14px;
}

.spec-item p {
  font-size: 11px;
}

.spec-item strong {
  font-size: clamp(18px, 5vw, 26px);
}

.log-panel .section-head h2 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

.log-list li {
  grid-template-columns: 34px minmax(0, 1fr) minmax(118px, auto);
  min-height: 68px;
  gap: 12px;
}

.log-list time {
  font-size: 14px;
  font-weight: 800;
}

.log-list p {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
  font-size: 12px;
}

.star-rating {
  justify-self: end;
  display: grid;
  grid-template-columns: repeat(5, 18px);
  gap: 2px;
  align-items: center;
  min-width: 98px;
}

.star-rating button {
  width: 18px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 19px;
  line-height: 1;
  text-transform: none;
}

.star-rating button.is-filled {
  color: var(--ink);
}

.range-frame {
  height: 30px;
}

.range-frame span {
  top: 50%;
  left: 1px;
  height: 18px;
  transform: translateY(-50%);
  z-index: 0;
}

input[type="range"] {
  height: 30px;
  z-index: 1;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 18px;
}

input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -6px;
}

.input-panel textarea {
  min-height: 136px;
  max-height: 210px;
  padding: 14px 18px;
  font-size: 16px;
}

@media (min-width: 900px) {
  textarea,
  .input-panel textarea {
    min-height: 150px;
    max-height: 230px;
  }
}

.frame-media-drop {
  min-height: clamp(190px, 34vw, 300px);
}

.media-icons {
  width: 150px;
  grid-template-columns: repeat(2, 54px);
  justify-content: center;
  gap: 30px;
}

.media-icon,
.media-icon::before,
.media-icon::after {
  box-sizing: border-box;
}

.media-icon {
  width: 54px;
  height: 54px;
  margin: 0;
  border: 0;
  transform: none;
}

.media-icon-file {
  border: var(--line);
  border-radius: 3px;
}

.media-icon-file::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 17px;
  height: 17px;
  border-left: var(--line);
  border-bottom: var(--line);
  background: var(--paper);
}

.media-icon-file::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 11px;
  height: 16px;
  border: var(--line);
  border-radius: 999px 999px 0 0;
  border-bottom: 0;
  transform: none;
}

.media-icon-paste {
  border: var(--line);
  border-radius: 3px;
}

.media-icon-paste::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 15px;
  right: 15px;
  height: 13px;
  border: var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.media-icon-paste::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 17px;
  height: 19px;
  border-top: var(--line);
  border-bottom: var(--line);
  transform: none;
}

html[data-language="ko"] .star-rating button,
html[data-language="ko"] .log-list p,
html[data-language="ko"] .log-panel .section-head h2 {
  font-family: var(--ko);
}

@media (max-width: 620px) {
  .log-list li {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .star-rating {
    grid-column: 2;
    justify-self: start;
  }
}

/* Gauge alignment hotfix. */
.range-frame {
  --track-height: 18px;
  --thumb-size: 28px;
  position: relative;
  height: var(--thumb-size) !important;
  display: block;
  overflow: visible;
}

.range-frame span#moodFill {
  position: absolute;
  left: 1px;
  top: 50% !important;
  width: var(--mood, 50%);
  max-width: calc(100% - 2px);
  height: var(--track-height) !important;
  transform: translateY(-50%) !important;
  border-radius: 999px;
  background: var(--ink);
  pointer-events: none;
  z-index: 1;
}

.range-frame input[type="range"] {
  position: absolute;
  left: 0;
  top: 50% !important;
  right: 0;
  width: 100%;
  height: var(--thumb-size) !important;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  appearance: none;
  background: transparent;
  z-index: 2;
}

.range-frame input[type="range"]::-webkit-slider-runnable-track {
  height: var(--track-height) !important;
  border: var(--line);
  border-radius: 999px;
  background: transparent;
}

.range-frame input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: var(--thumb-size) !important;
  height: var(--thumb-size) !important;
  margin-top: calc((var(--track-height) - var(--thumb-size)) / 2) !important;
  border: var(--line);
  border-radius: 50%;
  background: var(--paper);
  position: relative;
  z-index: 3;
}

.range-frame input[type="range"]::-moz-range-track {
  height: var(--track-height) !important;
  border: var(--line);
  border-radius: 999px;
  background: transparent;
}

.range-frame input[type="range"]::-moz-range-progress {
  height: var(--track-height) !important;
  border-radius: 999px;
  background: var(--ink);
}

.range-frame input[type="range"]::-moz-range-thumb {
  width: var(--thumb-size) !important;
  height: var(--thumb-size) !important;
  border: var(--line);
  border-radius: 50%;
  background: var(--paper);
}

/* Split-screen cinema workspace. */
.control-stack {
  min-width: 0;
}

.cinema-player {
  margin: 0 22px 28px;
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-bottom: var(--line);
  background: var(--ink);
}

.player-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--ink);
}

.player-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: var(--paper);
  background: var(--ink);
  pointer-events: none;
}

.player-empty[hidden] {
  display: none !important;
}

.player-empty span {
  width: 78px;
  height: 78px;
  border: 1px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.player-empty span::before,
.player-empty span::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 108px;
  border-top: 1px solid currentColor;
  transform: translate(-50%, -50%);
}

.player-empty span::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.player-empty strong {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.player-readout {
  min-height: 54px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  font-family: var(--mono);
  border-top: 0;
}

.player-readout span,
.player-readout output {
  font-size: 11px;
  font-weight: 800;
}

.player-readout strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

html[data-language="ko"] .cinema-player,
html[data-language="ko"] .player-empty strong,
html[data-language="ko"] .player-readout {
  font-family: var(--ko);
}

@media (min-width: 900px) {
  body {
    align-items: start;
  }

  .device-shell {
    width: min(calc(100vw - 56px), 1720px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .control-stack {
    min-height: calc(100vh - 56px);
    border-right: var(--line);
  }

  .control-stack .screen {
    border: 0;
  }

  .cinema-player {
    position: sticky;
    top: 28px;
    margin: 34px;
    min-height: calc(100vh - 124px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .player-frame {
    aspect-ratio: auto;
    min-height: 0;
  }

  .screen-dashboard.is-active {
    grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.96fr);
  }
}

@media (max-width: 899px) {
  .cinema-player {
    margin-top: 0;
  }
}

/* Player ratio and timeline bookmark rail. */
.player-body {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  border-bottom: var(--line);
  min-height: 0;
}

.bookmark-rail {
  min-width: 0;
  border-right: var(--line);
  background: var(--paper);
}

.bookmark-head {
  min-height: 48px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: var(--line);
  font-family: var(--mono);
}

.bookmark-head h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.bookmark-head output {
  font-size: 11px;
  font-weight: 800;
}

.bookmark-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(44vh, 440px);
  overflow: auto;
}

.bookmark-list li {
  border-bottom: var(--line);
}

.bookmark-list button {
  width: 100%;
  min-height: 54px;
  padding: 8px 12px;
  display: grid;
  gap: 4px;
  text-align: left;
  font-family: var(--mono);
}

.bookmark-list time {
  font-size: 13px;
  font-weight: 800;
}

.bookmark-list span,
.bookmark-empty {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0.78;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookmark-list button:active,
.bookmark-list button:hover {
  background: var(--ink);
  color: var(--paper);
}

.bookmark-empty {
  min-height: 84px;
  padding: 16px 12px;
  display: grid;
  place-items: center;
  text-align: center;
}

.player-frame {
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
  height: auto !important;
}

.player-frame video {
  object-fit: contain;
}

@media (min-width: 900px) {
  .cinema-player {
    min-height: 0 !important;
    align-self: start;
    display: block !important;
  }

  .player-body {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .player-frame {
    aspect-ratio: 16 / 9 !important;
  }
}

@media (max-width: 700px) {
  .player-body {
    grid-template-columns: 1fr;
  }

  .bookmark-rail {
    border-right: 0;
    border-bottom: var(--line);
  }

  .bookmark-list {
    max-height: 180px;
  }
}

/* Playback containment and wide player re-balance. */
video::-webkit-media-controls-fullscreen-button {
  display: none !important;
}

video::-webkit-media-controls-enclosure {
  overflow: hidden;
}

@media (min-width: 900px) {
  .device-shell {
    width: min(calc(100vw - 56px), 1880px) !important;
    grid-template-columns: minmax(520px, 0.82fr) minmax(760px, 1.38fr) !important;
  }

  .control-stack {
    min-width: 0;
  }

  .cinema-player {
    width: auto;
    margin: 70px 44px 44px 28px !important;
    position: sticky;
    top: 70px;
  }

  .player-body {
    grid-template-columns: minmax(0, 1fr) 188px !important;
    align-items: stretch;
  }

  .player-frame {
    grid-column: 1;
    grid-row: 1;
  }

  .bookmark-rail {
    grid-column: 2;
    grid-row: 1;
    border-right: 0 !important;
    border-left: var(--line);
  }

  .screen-dashboard.is-active {
    grid-template-columns: minmax(0, 1.08fr) minmax(230px, 0.72fr) !important;
    column-gap: 16px;
  }

  .main-clock {
    font-size: clamp(42px, 4.6vw, 68px) !important;
    white-space: nowrap;
    letter-spacing: 0;
    overflow: hidden;
  }

  .dial-face strong {
    font-size: clamp(44px, 4.2vw, 58px) !important;
    white-space: nowrap;
    letter-spacing: 0;
  }

  .dial-meta output {
    font-size: 14px !important;
    white-space: nowrap;
  }

  .dial {
    width: min(100%, 300px) !important;
    --pointer-distance: -108px;
  }

  .dial-face {
    inset: 42px !important;
  }

  .spec-item strong {
    font-size: clamp(16px, 1.6vw, 22px) !important;
  }
}

.player-frame {
  aspect-ratio: 16 / 9 !important;
  max-height: 70vh;
}

.player-frame video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.main-clock {
  max-width: 100%;
  font-size: clamp(40px, 12vw, 64px);
  white-space: nowrap;
  overflow: hidden;
}

.dial-face strong {
  font-size: clamp(42px, 13vw, 62px);
  white-space: nowrap;
}

.dial-meta output {
  max-width: 72px;
  overflow: hidden;
  text-align: right;
}

@media (max-width: 700px) {
  .player-body {
    grid-template-columns: 1fr !important;
  }

  .bookmark-rail {
    grid-row: 2;
    border-left: 0;
    border-top: var(--line);
  }
}

/* --- USER MODIFICATIONS --- */

/* 1. 상영 데크 세로 중앙 배치 */
@media (min-width: 900px) {
  .cinema-player {
    align-self: center !important;
    margin-top: auto !important;
    margin-bottom: auto !important;
    top: auto !important;
    position: relative !important;
  }
}

/* 2. 극적 부하 & 우측 % 칸 위쪽 배치 */
.dial-panel {
  position: relative !important;
}
.dial-meta {
  position: absolute !important;
  top: 18px !important;
  left: 14px !important;
  right: 14px !important;
  padding: 0 !important;
}

/* 3. 타임라인(프레임 마크) 타이틀 폰트 색 검은색 */
.bookmark-head h3 {
  color: #000000 !important;
}

/* 4. 타임라인 기록 삭제용 X 버튼 호버 스타일 */
button[data-delete-index]:hover, button[data-delete-index]:active {
  background: var(--ink) !important;
  color: var(--paper) !important;
}

/* --- 추가 수정 요청 사항 (06.08) --- */

/* 1. 타임코드와 극적 부하 칸의 숫자 크기를 약간 줄여서 짤림(넘침) 방지 */
.main-clock {
  font-size: clamp(36px, 10vw, 56px) !important;
}
.dial-face strong {
  font-size: clamp(38px, 11vw, 52px) !important;
}

@media (min-width: 900px) {
  .main-clock {
    font-size: clamp(40px, 5vw, 60px) !important;
  }
  .dial-face strong {
    font-size: clamp(42px, 5vw, 54px) !important;
  }
}

/* 2. '릴 A / 실시간 스캔' 텍스트 완전 삭제 및 시작 버튼 위로 올리기 */
#dateLine {
  display: none !important;
}
.runtime-control {
  margin-top: 8px !important; /* 기존보다 위로 더 붙임 */
}

/* 3. 타임라인(프레임 마크)의 글씨 컬러를 항상 블랙(#000)으로 강제 고정 */
.bookmark-list button,
.bookmark-list time,
.bookmark-list span {
  color: #000000 !important;
}

/* 4. 극적 부하 칸 안의 TAKE 텍스트 비율에 맞게 완벽한 중앙 정렬 */
#dialDate {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  margin-bottom: -10px !important; /* 아래쪽 % 숫자와의 여백 조정 */
}

/* 5. 극적 부하 칸 안의 '피크 신호' 글자 삭제 */
.dial-face em {
  display: none !important;
}

/* --- 추가 수정 요청 사항 (06.08 2차) --- */

/* 1. 타임라인 서체 컬러 블랙으로 바꾸고 우측의 01 카운트 완전 삭제 */
.bookmark-head h3 {
  color: #000000 !important;
}
.bookmark-head output#bookmarkCount {
  display: none !important;
}

/* 2. 좌측에 있는 타임코드와 퍼센티지 숫자 사이즈를 한 번 더 줄임 */
.main-clock {
  font-size: clamp(30px, 8vw, 48px) !important;
}
.dial-face strong {
  font-size: clamp(32px, 8vw, 46px) !important;
}
@media (min-width: 900px) {
  .main-clock {
    font-size: clamp(36px, 4vw, 54px) !important;
  }
  .dial-face strong {
    font-size: clamp(38px, 4vw, 48px) !important;
  }
}

/* 3. TAKE 01 (dialDate) 원 중앙에 예쁘게 재배치 */
#dialDate {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  margin-bottom: 0 !important;   /* 하단 여백 제거 */
  margin-top: 4px !important;    /* 위쪽으로 살짝 밀어서 시각적 중앙 맞춤 */
}

/* --- 추가 수정 요청 사항 (06.08 3차) --- */

/* 1. 타임코드 글자 변경은 JS에서 적용 완료, 여기서는 숫자 중앙 정렬 보장 */
.main-clock {
  text-align: center !important;
  display: block !important;
  width: 100% !important;
}

/* 2. 극적 부하 숫자 크기 더 축소 및 완벽한 중앙 정렬 */
.dial-face strong {
  font-size: clamp(26px, 6vw, 38px) !important;
  text-align: center !important;
  width: 100% !important;
  display: block !important;
}

@media (min-width: 900px) {
  .dial-face strong {
    font-size: clamp(30px, 4vw, 42px) !important;
  }
}

/* 3. 타임라인 완전한 블랙 강제 고정 (어떤 상속도 무시하도록 광범위 타겟팅) */
.bookmark-rail,
.bookmark-rail *,
.bookmark-head h3,
.bookmark-list button,
.bookmark-list time,
.bookmark-list span {
  color: #000000 !important;
}

/* 타임라인 제목 블랙 강제 고정 */
.bookmark-head h3[data-i18n="bookmarkTitle"] {
  color: #000000 !important;
}

/* --- Requested focused fixes (06.08 final) --- */

/* Keep every timeline label black, including hover/active states and dark mode. */
.bookmark-rail,
.bookmark-rail *,
.bookmark-list button:hover,
.bookmark-list button:active {
  color: #000000 !important;
}

/* Reduce only the dramatic-load number inside the dial. */
.dial-face strong#dialPercent {
  font-size: clamp(22px, 5vw, 34px) !important;
  line-height: 1 !important;
}

@media (min-width: 900px) {
  .dial-face strong#dialPercent {
    font-size: clamp(24px, 2.6vw, 34px) !important;
  }
}

/* Archive mode should show the vault as the list panel, not the frame-marking control. */
.screen-dashboard.is-archive {
  display: block !important;
}

.screen-dashboard.is-archive .film-selector,
.screen-dashboard.is-archive .live-panel,
.screen-dashboard.is-archive .dial-panel,
.screen-dashboard.is-archive .record-button,
.screen-dashboard.is-archive .log-panel {
  display: none !important;
}

.screen-dashboard.is-archive .archive-vault {
  display: block !important;
  width: 100% !important;
  margin-top: 24px !important;
}

.screen-dashboard.is-archive .archive-list {
  display: block !important;
}

.screen-dashboard.is-archive .archive-record {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 86px !important;
}

.screen-dashboard.is-archive .archive-open {
  display: grid !important;
  grid-template-columns: 78px minmax(0, 1fr) auto !important;
}

.screen-dashboard.is-archive .archive-tools {
  display: grid !important;
  grid-template-columns: repeat(2, 43px) !important;
}

/* --- Timeline rebuild and deck memo (06.08) --- */
.cinema-player .bookmark-rail {
  background: #f0f2eb !important;
  color: #000000 !important;
  border-color: #000000 !important;
}

.cinema-player .bookmark-head {
  background: #f0f2eb !important;
  color: #000000 !important;
  border-color: #000000 !important;
}

.cinema-player .bookmark-head h3,
.cinema-player .bookmark-head output,
.cinema-player .bookmark-list,
.cinema-player .bookmark-list li,
.cinema-player .bookmark-list button,
.cinema-player .bookmark-list time,
.cinema-player .bookmark-list span,
.cinema-player .bookmark-empty,
.cinema-player button[data-delete-index] {
  color: #000000 !important;
  border-color: #000000 !important;
}

.cinema-player .bookmark-list li,
.cinema-player .bookmark-list button,
.cinema-player .bookmark-empty,
.cinema-player button[data-delete-index] {
  background: #f0f2eb !important;
}

.cinema-player .bookmark-list button:hover,
.cinema-player .bookmark-list button:active,
.cinema-player button[data-delete-index]:hover,
.cinema-player button[data-delete-index]:active {
  background: #ffffff !important;
  color: #000000 !important;
}

.deck-memo {
  border-top: var(--line);
  background: var(--paper);
}

.deck-memo-toolbar {
  min-height: 56px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(118px, 160px);
  gap: 12px;
  align-items: center;
  border-bottom: var(--line);
}

.deck-memo-toolbar h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.memo-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.memo-color {
  width: 24px;
  height: 24px;
  border: var(--line);
  border-radius: 50%;
}

.memo-color.is-selected {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink);
}

.memo-color[data-memo-color="yellow"] { background: #ffe56a; }
.memo-color[data-memo-color="white"] { background: #ffffff; }
.memo-color[data-memo-color="black"] { background: #111111; }
.memo-color[data-memo-color="red"] { background: #ff5b4f; }
.memo-color[data-memo-color="sky"] { background: #89d8ff; }
.memo-color[data-memo-color="pink"] { background: #ff9fca; }

.memo-size-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.memo-size-control input[type="range"] {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  appearance: auto !important;
}

.memo-size-control input[type="range"]::-webkit-slider-runnable-track {
  height: 6px !important;
  border: var(--line);
  border-radius: 999px;
  background: transparent;
}

.memo-size-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px !important;
  height: 18px !important;
  margin-top: -7px !important;
  border: var(--line);
  border-radius: 50%;
  background: var(--paper);
}

.deck-memo-input {
  --memo-height: 180px;
  display: block;
  width: calc(100% - 24px);
  min-height: var(--memo-height) !important;
  height: var(--memo-height);
  max-height: none !important;
  margin: 12px;
  padding: 16px;
  resize: none;
  border: 1px solid #000000;
  border-radius: 2px;
  box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.16);
  font-family: var(--ko);
  font-size: 16px;
  line-height: 1.45;
}

.deck-memo-input[data-memo-color="yellow"] {
  background: #ffe56a;
  color: #000000;
}

.deck-memo-input[data-memo-color="white"] {
  background: #ffffff;
  color: #000000;
}

.deck-memo-input[data-memo-color="black"] {
  background: #111111;
  color: #ffffff;
}

.deck-memo-input[data-memo-color="red"] {
  background: #ff5b4f;
  color: #000000;
}

.deck-memo-input[data-memo-color="sky"] {
  background: #89d8ff;
  color: #000000;
}

.deck-memo-input[data-memo-color="pink"] {
  background: #ff9fca;
  color: #000000;
}

.deck-memo-input::placeholder {
  color: currentColor;
  opacity: 0.52;
}

html[data-language="ko"] .deck-memo,
html[data-language="ko"] .deck-memo-toolbar h3,
html[data-language="ko"] .memo-size-control {
  font-family: var(--ko);
}

@media (max-width: 700px) {
  .deck-memo-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

/* --- Dark default polish, visible light lines, and floating memo note (06.08) --- */
body:not(.theme-dark) {
  --ink: #000000;
  --line: 1.5px solid #000000;
}

body:not(.theme-dark) .device-shell,
body:not(.theme-dark) .control-stack,
body:not(.theme-dark) .cinema-player,
body:not(.theme-dark) .live-panel,
body:not(.theme-dark) .dial-panel,
body:not(.theme-dark) .metadata-panel,
body:not(.theme-dark) .archive-vault,
body:not(.theme-dark) .player-body,
body:not(.theme-dark) .bookmark-rail,
body:not(.theme-dark) .bookmark-head,
body:not(.theme-dark) .bookmark-list li,
body:not(.theme-dark) .player-readout,
body:not(.theme-dark) .section-head,
body:not(.theme-dark) .spec-item,
body:not(.theme-dark) .time-marker,
body:not(.theme-dark) .tab-strip,
body:not(.theme-dark) .tab.is-selected,
body:not(.theme-dark) .theme-switch,
body:not(.theme-dark) .language-select,
body:not(.theme-dark) .record-button,
body:not(.theme-dark) .save-button {
  border-color: #000000 !important;
}

.spec-item.is-active::after,
.theme-dark .spec-item.is-active::after {
  content: none !important;
  display: none !important;
}

.cinema-player {
  position: relative !important;
  overflow: visible !important;
}

.deck-memo {
  position: absolute;
  top: 74px;
  right: 18px;
  z-index: 8;
  width: min(248px, calc(100% - 36px));
  border: 0 !important;
  background: transparent !important;
  transform: rotate(1.5deg);
}

.deck-memo-toolbar {
  min-height: 36px;
  padding: 6px 8px;
  grid-template-columns: auto minmax(0, 1fr) minmax(84px, 112px);
  gap: 8px;
  border: 1px solid #000000 !important;
  border-bottom: 0 !important;
  background: rgba(240, 242, 235, 0.96);
}

.deck-memo-toolbar h3,
.memo-size-control {
  color: #000000 !important;
}

.memo-color {
  width: 18px;
  height: 18px;
  border-color: #000000 !important;
}

.memo-color.is-selected {
  box-shadow: 0 0 0 2px #f0f2eb, 0 0 0 4px #000000;
}

.deck-memo-input {
  width: 100%;
  min-height: var(--memo-height) !important;
  height: var(--memo-height);
  margin: 0;
  border: 1px solid #000000 !important;
  border-radius: 0;
  box-shadow: 7px 8px 0 rgba(0, 0, 0, 0.22);
}

@media (min-width: 900px) {
  .deck-memo {
    top: 76px;
    right: 22px;
  }
}

@media (max-width: 700px) {
  .deck-memo {
    position: relative;
    top: auto;
    right: auto;
    width: calc(100% - 36px);
    margin: 14px 18px 18px auto;
  }

  .deck-memo-toolbar {
    grid-template-columns: 1fr;
  }
}

/* --- Hard visual reset requested: black timeline, visible dark lines, detachable memo (06.08) --- */
body.theme-dark {
  --paper: #111111;
  --ink: #f0f2eb;
  --line: 1.5px solid #f0f2eb;
}

body.theme-dark .device-shell,
body.theme-dark .control-stack,
body.theme-dark .cinema-player,
body.theme-dark .live-panel,
body.theme-dark .dial-panel,
body.theme-dark .dial-face,
body.theme-dark .metadata-panel,
body.theme-dark .archive-vault,
body.theme-dark .player-body,
body.theme-dark .player-readout,
body.theme-dark .section-head,
body.theme-dark .spec-item,
body.theme-dark .time-marker,
body.theme-dark .theme-switch,
body.theme-dark .language-select,
body.theme-dark .record-button,
body.theme-dark .save-button,
body.theme-dark .film-select-button,
body.theme-dark .runtime-control,
body.theme-dark .range-frame,
body.theme-dark .tag-section,
body.theme-dark .weather-pill,
body.theme-dark .archive-record,
body.theme-dark .archive-open,
body.theme-dark .archive-tools,
body.theme-dark .archive-action {
  border-color: #f0f2eb !important;
}

body.theme-dark .player-frame,
body.theme-dark .player-frame video {
  background: #000000 !important;
}

.cinema-player .bookmark-rail,
.cinema-player .bookmark-head,
.cinema-player .bookmark-list,
.cinema-player .bookmark-list li,
.cinema-player .bookmark-list button,
.cinema-player .bookmark-empty,
.cinema-player button[data-delete-index] {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

.cinema-player .bookmark-head h3,
.cinema-player .bookmark-head output,
.cinema-player .bookmark-list time,
.cinema-player .bookmark-list span,
.cinema-player .bookmark-empty,
.cinema-player button[data-delete-index] {
  color: #ffffff !important;
}

.cinema-player .bookmark-list button:hover,
.cinema-player .bookmark-list button:active,
.cinema-player button[data-delete-index]:hover,
.cinema-player button[data-delete-index]:active {
  background: #1b1b1b !important;
  color: #ffffff !important;
}

.deck-memo {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 1000 !important;
  width: min(310px, calc(100vw - 24px)) !important;
  border: 0 !important;
  background: transparent !important;
  transform: none !important;
  touch-action: none;
}

.deck-memo[data-memo-mode="attached"] {
  opacity: 0.98;
}

.deck-memo[data-memo-mode="detached"] {
  opacity: 1;
}

.deck-memo.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.deck-memo-toolbar {
  cursor: grab;
  min-height: 38px !important;
  padding: 6px 8px !important;
  grid-template-columns: auto minmax(0, 1fr) minmax(78px, 106px) auto !important;
  gap: 8px !important;
  border: 1.5px solid #000000 !important;
  border-bottom: 0 !important;
  background: #f0f2eb !important;
  color: #000000 !important;
}

.deck-memo-toolbar h3,
.deck-memo-toolbar label,
.memo-size-control,
.memo-size-control span {
  color: #000000 !important;
}

.memo-pin-button {
  min-height: 26px;
  padding: 0 8px;
  border: 1.5px solid #000000 !important;
  border-radius: 999px;
  background: #f0f2eb !important;
  color: #000000 !important;
  font-family: var(--ko);
  font-size: 11px;
  font-weight: 800;
}

.memo-color {
  border-color: #000000 !important;
}

.memo-size-control input[type="range"]::-webkit-slider-runnable-track,
.memo-size-control input[type="range"]::-moz-range-track {
  border-color: #000000 !important;
}

.memo-size-control input[type="range"]::-webkit-slider-thumb,
.memo-size-control input[type="range"]::-moz-range-thumb {
  border-color: #000000 !important;
  background: #000000 !important;
}

.deck-memo-input {
  width: 100% !important;
  margin: 0 !important;
  border: 1.5px solid #000000 !important;
  border-radius: 0 !important;
  box-shadow: 7px 8px 0 rgba(0, 0, 0, 0.26) !important;
  transform: none !important;
  touch-action: auto;
}

@media (max-width: 700px) {
  .deck-memo {
    position: fixed !important;
    width: min(300px, calc(100vw - 24px)) !important;
    margin: 0 !important;
  }

  .deck-memo-toolbar {
    grid-template-columns: 1fr !important;
  }
}

/* --- Film frame, side curtains, and paper-like draggable memo (06.08) --- */
html::before,
html::after,
body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before,
body::after {
  left: 0;
  right: 0;
  height: 50px;
  z-index: 1200;
  background-repeat: repeat-x;
  background-size: auto 50px;
  background-color: #000000;
}

body::before {
  top: 0;
  background-image: url("assets/film-top.png");
  background-position: center top;
}

body::after {
  bottom: 0;
  background-image: url("assets/film-bottom.png");
  background-position: center bottom;
}

html::before,
html::after {
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 1190;
  opacity: 0.72;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 180, 180, 0.2), transparent 18%),
    repeating-linear-gradient(
      90deg,
      #3a0207 0,
      #7d0b18 7px,
      #b81c2d 12px,
      #4c0309 21px,
      #210003 28px
    );
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.78);
}

html::before {
  left: 0;
}

html::after {
  right: 0;
}

@media (min-width: 900px) {
  body {
    padding-top: 74px !important;
    padding-bottom: 74px !important;
    padding-left: 48px !important;
    padding-right: 48px !important;
  }
}

@media (max-width: 899px) {
  body {
    padding-top: 58px !important;
    padding-bottom: 58px !important;
  }
}

.deck-memo {
  --memo-width: 300px;
  --memo-height: 190px;
  width: min(var(--memo-width), calc(100vw - 24px)) !important;
  transform: none !important;
}

.deck-memo-toolbar {
  border-radius: 13px 13px 0 0 !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
}

.memo-pin-button {
  border-radius: 999px !important;
}

.deck-memo-input {
  height: var(--memo-height) !important;
  min-height: var(--memo-height) !important;
  border-radius: 0 0 13px 13px !important;
  padding-right: 28px !important;
  padding-bottom: 28px !important;
  resize: none !important;
}

.memo-resize-handle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  touch-action: none;
}

.memo-resize-handle::before,
.memo-resize-handle::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 5px;
  width: 14px;
  border-top: 1.5px solid currentColor;
  color: #000000;
  transform: rotate(-45deg);
}

.memo-resize-handle::after {
  right: 2px;
  bottom: 10px;
  width: 9px;
}

.deck-memo-input[data-memo-color="black"] + .memo-resize-handle::before,
.deck-memo-input[data-memo-color="black"] + .memo-resize-handle::after {
  color: #ffffff;
}

.deck-memo.is-resizing {
  user-select: none;
}

/* --- Remove film/curtain decoration and refine pin memo (06.08) --- */
html::before,
html::after,
body::before,
body::after {
  display: none !important;
  content: none !important;
  background: none !important;
  box-shadow: none !important;
}

@media (min-width: 900px) {
  body {
    padding: 28px !important;
  }
}

@media (max-width: 899px) {
  body {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}

.deck-memo {
  --memo-width: 260px;
  --memo-height: 160px;
  width: min(var(--memo-width), calc(100vw - 24px)) !important;
}

.deck-memo-toolbar {
  border-radius: 10px 10px 0 0 !important;
}

.deck-memo-input {
  border-radius: 0 0 10px 10px !important;
  font-size: 14px !important;
}

.deck-memo.is-pinned::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  border: 1.5px solid #000000;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 38%, #ffffff 0 18%, #ff4c4c 20% 66%, #8e0000 68% 100%);
  z-index: 2;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.22);
}

.deck-memo.is-pinned .deck-memo-toolbar {
  cursor: default;
}

.deck-memo.is-pinned .memo-resize-handle {
  display: none;
}

/* --- Post-it sheets, YouTube link loader, and archive/grid repair (06.08) --- */
.cinema-player > .compact-head {
  justify-content: flex-start !important;
  gap: 10px;
}

.cinema-player > .compact-head h2 {
  margin-right: auto;
}

.cinema-player .file-chip,
.youtube-chip {
  width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center;
  border: var(--line) !important;
  border-radius: 50% !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
  overflow: hidden;
  font-size: 0 !important;
}

.cinema-player .file-chip::before {
  content: "";
  width: 15px;
  height: 16px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg) translate(1px, -1px);
}

.cinema-player .file-chip::after {
  content: "";
  width: 14px;
  border-top: 3px solid currentColor;
  transform: translateY(-9px);
}

.youtube-chip::before,
.youtube-chip::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 8px;
  border: 3px solid currentColor;
  border-radius: 999px;
}

.youtube-chip {
  position: relative;
}

.youtube-chip::before {
  transform: rotate(-38deg) translate(-3px, -1px);
}

.youtube-chip::after {
  transform: rotate(-38deg) translate(6px, 4px);
}

.youtube-panel {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-bottom: var(--line);
}

.youtube-panel[hidden] {
  display: none !important;
}

.youtube-panel input,
.youtube-panel button {
  min-height: 38px;
  border: var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.youtube-panel input {
  min-width: 0;
  padding: 0 14px;
}

.youtube-panel button {
  padding: 0 14px;
}

#youtubePlayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000000;
}

.deck-memo {
  width: 230px !important;
  z-index: 900 !important;
}

.deck-memo .memo-pin-button {
  min-width: 58px;
}

.memo-note {
  --note-width: 230px;
  --note-height: 150px;
  position: fixed;
  left: 24px;
  top: 24px;
  width: var(--note-width);
  z-index: 1100;
  color: #000000;
  filter: drop-shadow(7px 8px 0 rgba(0, 0, 0, 0.24));
}

.memo-note-bar {
  min-height: 32px;
  padding: 4px 7px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  border: 1.5px solid #000000;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #f0f2eb;
  cursor: grab;
}

.memo-note button {
  min-height: 22px;
  padding: 0 8px;
  border: 1.5px solid #000000;
  border-radius: 999px;
  background: #f0f2eb;
  color: #000000;
  font-family: var(--ko);
  font-size: 11px;
  font-weight: 800;
}

.memo-note textarea {
  width: 100%;
  height: var(--note-height);
  min-height: var(--note-height);
  margin: 0;
  padding: 14px 28px 28px 14px;
  border: 1.5px solid #000000;
  border-radius: 0 0 10px 10px;
  resize: none;
  font-family: var(--ko);
  font-size: 14px;
  line-height: 1.45;
  color: #000000;
}

.memo-note[data-memo-color="yellow"] textarea { background: #ffe56a; }
.memo-note[data-memo-color="white"] textarea { background: #ffffff; }
.memo-note[data-memo-color="black"] textarea { background: #111111; color: #ffffff; }
.memo-note[data-memo-color="red"] textarea { background: #ff5b4f; }
.memo-note[data-memo-color="sky"] textarea { background: #89d8ff; }
.memo-note[data-memo-color="pink"] textarea { background: #ff9fca; }

.memo-note.is-pinned::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  border: 1.5px solid #000000;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 38%, #ffffff 0 18%, #ff4c4c 20% 66%, #8e0000 68% 100%);
  z-index: 2;
}

.memo-note.is-pinned .memo-note-bar {
  cursor: default;
}

.memo-note-resize {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
}

.memo-note-resize::before,
.memo-note-resize::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 5px;
  width: 14px;
  border-top: 1.5px solid currentColor;
  color: #000000;
  transform: rotate(-45deg);
}

.memo-note-resize::after {
  bottom: 10px;
  width: 9px;
}

.memo-note[data-memo-color="black"] .memo-note-resize::before,
.memo-note[data-memo-color="black"] .memo-note-resize::after {
  color: #ffffff;
}

.memo-note.is-pinned .memo-note-resize {
  display: none;
}

.timeline-history {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 850;
}

.timeline-history-toggle {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border: var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ko);
  font-size: 11px;
  font-weight: 800;
}

.timeline-history-toggle span {
  width: 32px;
  height: 22px;
  border: 3px solid currentColor;
  border-radius: 3px;
  position: relative;
}

.timeline-history-toggle span::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -17px;
  width: 10px;
  height: 10px;
  border: 3px solid currentColor;
  border-radius: 50%;
  box-shadow: 16px 0 0 -3px var(--paper), 16px 0 0 0 currentColor;
}

.timeline-history-panel {
  position: absolute;
  right: 0;
  bottom: 86px;
  width: min(300px, calc(100vw - 36px));
  max-height: 360px;
  border: var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}

.timeline-history-panel[hidden] {
  display: none !important;
}

.timeline-history-head {
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: var(--line);
}

.timeline-history-head h3 {
  margin: 0;
  font-size: 13px;
}

.timeline-history-head button {
  font-size: 20px;
}

#timelineHistoryList {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 318px;
  overflow: auto;
}

#timelineHistoryList li {
  border-bottom: var(--line);
}

#timelineHistoryList button,
#timelineHistoryList li {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
}

/* --- Equalizer workspace and frame time log (06.11) --- */
.tab-strip {
  grid-template-columns: 1fr !important;
}

.equalizer-workspace {
  overflow: hidden !important;
  background: #111111 !important;
  color: #f0f2eb !important;
  border-color: #f0f2eb !important;
}

.equalizer-stage {
  min-height: min(72vw, 720px);
  display: grid;
  place-items: center;
  position: relative;
  background: #111111;
}

#equalizerCanvas {
  width: min(72vh, 72vw, 720px);
  max-width: 100%;
  aspect-ratio: 1;
  display: block;
}

.equalizer-readout {
  position: absolute;
  left: 24px;
  bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  color: rgba(240, 242, 235, 0.72);
}

.terminal-log {
  min-width: 0;
  border-left: 1.5px solid rgba(240, 242, 235, 0.74) !important;
  border-right: 0 !important;
  background: #070707 !important;
  color: #f0f2eb !important;
}

.terminal-log-head {
  min-height: 68px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(240, 242, 235, 0.38) !important;
  background: #070707 !important;
  color: #f0f2eb !important;
}

.terminal-log-head h3,
.terminal-log-head output {
  color: #f0f2eb !important;
  font-family: var(--mono);
}

.terminal-log-list {
  max-height: none !important;
  height: 100%;
  background: #070707 !important;
}

.terminal-log-list li {
  border-bottom: 1px dashed rgba(240, 242, 235, 0.18) !important;
  background: #070707 !important;
}

.terminal-log-list button {
  min-height: 74px;
  padding: 12px 22px;
  background: #070707 !important;
  color: #f0f2eb !important;
}

.terminal-log-list button:hover,
.terminal-log-list button:active {
  background: #151515 !important;
  color: #ffffff !important;
}

.terminal-log-list time {
  color: #f0f2eb !important;
  font-size: 13px;
}

.terminal-log-list span,
.terminal-log-list .bookmark-empty {
  color: rgba(240, 242, 235, 0.76) !important;
  white-space: normal !important;
  line-height: 1.45;
}

.terminal-log .bookmark-empty {
  min-height: 92px;
  padding: 22px;
  color: rgba(240, 242, 235, 0.58) !important;
  background: #070707 !important;
}

@media (min-width: 900px) {
  .equalizer-workspace {
    min-height: calc(100vh - 124px) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.32fr) !important;
    align-items: stretch !important;
  }

  .equalizer-stage {
    min-height: calc(100vh - 124px);
  }

  .terminal-log {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }
}

@media (max-width: 899px) {
  .equalizer-workspace {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .terminal-log {
    border-left: 0 !important;
    border-top: 1.5px solid rgba(240, 242, 235, 0.74) !important;
  }
}

/* --- Final visual trim (06.11) --- */
.film-select-button {
  grid-template-columns: 1fr !important;
}

.film-arrow,
#selectedFilmRuntime {
  display: none !important;
}

.command-panel {
  display: none !important;
}

#equalizerCanvas {
  width: min(62vh, 62vw, 620px) !important;
}

.equalizer-workspace {
  border: 0 !important;
  border-radius: 0 !important;
  background: #111111 !important;
  color: #f0f2eb !important;
}

.equalizer-stage {
  background: #111111 !important;
}

.terminal-log {
  background: #111111 !important;
  border-left: 1.5px solid rgba(240, 242, 235, 0.78) !important;
  border-top: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
}

.terminal-log-head,
.terminal-log-list,
.terminal-log-list li,
.terminal-log-list button,
.terminal-log .bookmark-empty {
  background: #111111 !important;
  border-top: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
}

.terminal-log-head {
  border-left: 0 !important;
}

.terminal-log-list button:hover,
.terminal-log-list button:active {
  background: #181818 !important;
}

@media (max-width: 899px) {
  .terminal-log {
    border-left: 0 !important;
    border-top: 1.5px solid rgba(240, 242, 235, 0.78) !important;
  }
}

/* --- Equalizer fit and panel line repair (06.11) --- */
.cinema-player.equalizer-workspace {
  min-width: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #111111 !important;
}

.equalizer-workspace .equalizer-stage {
  min-width: 0;
  overflow: hidden;
  padding: 42px;
  background: #111111 !important;
}

.equalizer-workspace #equalizerCanvas {
  width: min(100%, 580px) !important;
  max-width: 100% !important;
  height: auto !important;
}

.cinema-player .terminal-log,
.cinema-player .terminal-log-head,
.cinema-player .terminal-log-list,
.cinema-player .terminal-log-list li,
.cinema-player .terminal-log-list button,
.cinema-player .terminal-log .bookmark-empty {
  background: #111111 !important;
  color: #f0f2eb !important;
}

.cinema-player .terminal-log {
  min-width: 0;
  border-left: 1.5px solid #f0f2eb !important;
  border-top: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
}

.cinema-player .terminal-log-head {
  border: 0 !important;
  border-bottom: 1.5px solid #f0f2eb !important;
}

.cinema-player .terminal-log-list li {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: stretch;
  border: 0 !important;
  border-bottom: 1px solid rgba(240, 242, 235, 0.55) !important;
}

.cinema-player .terminal-log-list .terminal-log-open {
  border: 0 !important;
}

.cinema-player .terminal-log-delete {
  width: 44px !important;
  min-height: 74px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center;
  border: 0 !important;
  border-left: 1px solid rgba(240, 242, 235, 0.55) !important;
  background: #111111 !important;
  color: #f0f2eb !important;
  font-family: var(--mono);
  font-size: 20px;
}

.cinema-player .terminal-log-delete:hover,
.cinema-player .terminal-log-delete:active {
  background: #f0f2eb !important;
  color: #111111 !important;
}

.cinema-player .terminal-log-list time,
.cinema-player .terminal-log-list span,
.cinema-player .terminal-log-head h3,
.cinema-player .terminal-log-head output {
  color: #f0f2eb !important;
}

@media (max-width: 899px) {
  .equalizer-workspace .equalizer-stage {
    padding: 24px;
  }

  .cinema-player .terminal-log {
    border-left: 0 !important;
    border-top: 1.5px solid #f0f2eb !important;
  }
}

/* --- Full-height divider and refined terminal log (06.11) --- */
@media (min-width: 900px) {
  .device-shell {
    align-items: stretch !important;
  }

  .cinema-player.equalizer-workspace {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    align-self: stretch !important;
    position: relative !important;
    top: auto !important;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr) !important;
  }

  .cinema-player .terminal-log {
    height: auto !important;
    min-height: 0 !important;
    align-self: stretch !important;
  }
}

.cinema-player .terminal-log {
  display: grid !important;
  grid-template-rows: 76px minmax(0, 1fr) !important;
  overflow: hidden;
}

.cinema-player .terminal-log-head {
  min-height: 76px !important;
  padding: 0 24px !important;
  justify-content: flex-start !important;
  gap: 12px;
}

.cinema-player .terminal-log-head h3 {
  font-size: 12px !important;
  line-height: 1;
}

.cinema-player .terminal-log-list {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  overflow-y: auto;
}

.cinema-player .terminal-log-list li {
  width: 100% !important;
  min-height: 82px;
}

.cinema-player .terminal-log-list .terminal-log-open {
  min-height: 82px !important;
  padding: 14px 18px 14px 24px !important;
  align-content: center;
  gap: 8px;
}

.cinema-player .terminal-log-list time {
  font-size: 14px !important;
  line-height: 1;
}

.cinema-player .terminal-log-list span {
  font-size: 10px !important;
  line-height: 1.45 !important;
}

.cinema-player .terminal-log-delete {
  min-height: 82px !important;
}

.cinema-player .terminal-log-list .bookmark-empty {
  width: 100% !important;
  min-height: 82px !important;
  padding: 0 24px !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 0 !important;
  text-align: left;
  font-size: 10px;
  opacity: 0.58;
}

/* --- Final divider reach and log row alignment (06.11) --- */
@media (min-width: 900px) {
  .cinema-player.equalizer-workspace {
    min-height: calc(100vh - 56px) !important;
  }

  .cinema-player .terminal-log {
    min-height: calc(100vh - 56px) !important;
  }
}

.equalizer-readout {
  bottom: 12px !important;
}

.cinema-player .terminal-log-list .terminal-log-open {
  display: grid !important;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 8px;
}

.terminal-log-primary {
  display: flex !important;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  color: #f0f2eb !important;
  opacity: 1 !important;
  white-space: nowrap !important;
}

.terminal-log-primary time {
  flex: 0 0 auto;
}

.terminal-log-primary strong {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  color: #ffffff !important;
}

.terminal-log-values {
  display: block !important;
  color: rgba(240, 242, 235, 0.72) !important;
  white-space: normal !important;
}

@media (min-width: 900px) {
  .screen-dashboard.is-active.is-archive {
    display: grid !important;
    grid-template-columns: minmax(0, 1.08fr) minmax(230px, 0.72fr) !important;
    grid-template-areas:
      "status status"
      "nav nav"
      "menu menu"
      "tabs tabs"
      "log log" !important;
    column-gap: 16px !important;
    row-gap: 18px !important;
  }
}
