﻿: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;
  }
}

.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;
  }
}
