html:not(.prop-page) {
  --ink: #202127;
  --sub: #656974;
  --muted: #777c86;
  --blue: #0869db;
  --bg: #f5f6f9;
  --line: #e4e6eb;
  --soft: #f3f4f7;
  --tint: #eaf2ff;
  --text: var(--ink);
  --gold: var(--blue);
  background: var(--bg);
  color: var(--ink);
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK",
    "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.studio {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 34px 16px 22px;
  border-right: 1px solid var(--line);
  background: #fbfbfd;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #0877ed;
  color: white;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 #ffffff38;
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font-size: 19px;
  letter-spacing: 0.045em;
  line-height: 1.25;
}
.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.side-nav {
  display: grid;
  gap: 5px;
  margin-top: 47px;
}
.side-nav a,
.open-prop {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  color: #59606a;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 580;
}
.side-nav a svg,
.open-prop svg {
  color: #69717e;
}
.side-nav a[aria-current] {
  background: #e6effd;
  color: #075dbf;
  font-weight: 700;
}
.side-nav a[aria-current] svg {
  color: #0767d6;
}
.side-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.open-prop svg:last-child {
  margin-left: auto;
  width: 13px;
}
.workspace,
.primary-col,
.secondary-col,
.card-stack,
.card,
.field,
.date-pair > * {
  min-width: 0;
}
.workspace {
  display: flex;
  flex-direction: column;
}
.statusbar {
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(24px, 3.2vw, 55px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fcfcfd;
}
.production-name,
.bar-tools,
.pair-button,
#connection,
.page-meta,
.page-meta span,
.card-head,
.card-head h2,
.text-action,
.primary,
.soft-button,
.danger-action,
.monitor span,
.monitor a {
  display: flex;
  align-items: center;
}
.production-name {
  gap: 9px;
  color: #6e7480;
  font-size: 12px;
  font-weight: 570;
}
.production-name i,
.page-meta i {
  width: 1px;
  height: 12px;
  background: #cdd1d8;
}
.bar-tools {
  gap: 18px;
}
#connection {
  gap: 7px;
  font-size: 12px;
  color: #666d77;
}
#connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9da2ac;
}
#connection.online i {
  background: #23a960;
}
#connection.issue i {
  background: #d45f32;
}
.pair-button,
.soft-button {
  font-weight: 630;
  color: var(--blue);
  background: #eef4ff;
  border: 1px solid #d9e6f9;
  border-radius: 9px;
  padding: 8px 12px;
  gap: 7px;
  justify-content: center;
  min-height: 36px;
  font-size: 13px;
}
.work-content {
  width: 100%;
  max-width: 1350px;
  margin: 0 auto;
  padding: 30px clamp(24px, 3.2vw, 55px) 20px;
}
.page-heading {
  margin-bottom: 24px;
}
.page-heading h1 {
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.045em;
  font-weight: 720;
}
.page-meta {
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--sub);
  flex-wrap: wrap;
  line-height: 1.4;
}
.page-meta span {
  gap: 6px;
}
.page-meta b {
  font-weight: 570;
}
#current-clock,
.screen-time,
.template-row small,
.range-field output {
  font-variant-numeric: tabular-nums;
}
.push-grid,
.pane-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(285px, 1fr);
  gap: 20px;
  align-items: start;
}
.primary-col,
.secondary-col,
.card-stack {
  display: grid;
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid #e1e4e9;
  border-radius: 18px;
  box-shadow: 0 2px 6px #18243e05;
  overflow: hidden;
}
.card-head {
  min-height: 68px;
  padding: 17px 22px;
  justify-content: space-between;
  gap: 8px;
}
.card-head h2 {
  gap: 10px;
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.3;
}
.card-head h2 svg {
  width: 19px;
  color: var(--blue);
}
.text-action {
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  padding: 4px 0;
  min-height: 34px;
}
.text-action.secondary {
  color: var(--sub);
  font-weight: 540;
}
#custom-form {
  padding: 0 22px 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.field + .field,
#custom-form > .date-pair {
  margin-top: 18px;
}
.field label,
.field-heading,
.parameter-list > label.field,
.range-field,
.inset-block h3 {
  font-size: 13px;
  font-weight: 660;
  color: #353b45;
}
.field label small,
.field-heading small {
  color: var(--muted);
  font-weight: 450;
  font-size: 12px;
}
.field label small {
  margin-left: 4px;
}
.field-heading,
.range-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.studio :is(input:not([type="range"]), textarea, select),
html:not(.prop-page) .modal-inner :is(input, select, textarea) {
  border: 1px solid #dfe2e8;
  border-radius: 9px;
  background: #f8f9fb;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  padding: 11px 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  box-shadow: none;
}
.studio :is(input, textarea, select):focus,
html:not(.prop-page) .modal-inner :is(input, textarea, select):focus {
  outline: 2px solid #8dc0ff;
  outline-offset: 1px;
  background: #fff;
}
.studio ::placeholder {
  color: #858a95;
  opacity: 1;
}
.studio textarea {
  resize: vertical;
  min-height: 94px;
}
.date-pair {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
}
.date-pair > .field {
  margin: 0;
}
.quick-dates,
.clock-chips,
.segment,
.library-segment {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.quick-dates {
  margin-top: 9px;
}
.quick-dates button,
.clock-chips button {
  border-radius: 7px;
  background: var(--soft);
  color: #5e6570;
  min-height: 31px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 550;
}
.quick-dates button[aria-pressed="true"],
.clock-chips button[aria-pressed="true"] {
  color: #075fc8;
  background: #eaf2ff;
}
.compose-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 19px;
  padding-top: 16px;
}
.primary {
  min-height: 44px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  gap: 8px;
  padding: 9px 19px;
  font-weight: 670;
  justify-content: center;
  font-size: 14px;
}
.primary:disabled {
  opacity: 0.55;
}
.preview-card {
  padding-bottom: 0;
}
.preview-screen {
  position: relative;
  margin: 0 15px 0;
  border: 1px solid #e0e5ef;
  border-radius: 14px;
  background: linear-gradient(125deg, #e3ebf6, #e9edf7 57%, #eee9f4);
  padding: 18px 12px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #344157;
  isolation: isolate;
}
.screen-date {
  font-weight: 590;
  font-size: 12px;
}
.screen-time {
  font-size: clamp(40px, 3.4vw, 54px);
  letter-spacing: -0.055em;
  font-weight: 580;
  line-height: 1.1;
  margin: 2px 0 14px;
}
.preview-banner {
  border-radius: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 57px;
  padding: 10px;
  background: #ffffffdf;
  box-shadow: 0 2px 8px #29365009;
}
.mini-cal {
  width: 33px;
  height: 33px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 7px;
  box-shadow: 0 0 0 1px #dde0e6;
  color: #252731;
  line-height: 1;
}
.mini-cal small {
  font-size: 8px;
  font-weight: 680;
  color: #d74040;
}
.mini-cal b {
  font-size: 18px;
  font-weight: 570;
}
.preview-message {
  flex: 1;
  min-width: 0;
}
.preview-message div {
  display: flex;
  justify-content: space-between;
  color: #5a606d;
  font-size: 10px;
  font-weight: 550;
  margin-bottom: 4px;
}
.preview-message div span {
  color: #81848d;
}
.preview-message strong {
  display: block;
  color: #272b33;
  font-size: 13px;
  font-weight: 640;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.preview-home {
  position: absolute;
  bottom: 8px;
  width: 42px;
  height: 3px;
  border-radius: 8px;
  background: #75809469;
}
.preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 20px;
  color: var(--sub);
  font-size: 12px;
}
.preview-foot b {
  color: #4c5360;
  font-weight: 560;
}
.library-segment,
.segment {
  gap: 3px;
  padding: 3px;
  background: #eff0f4;
  border-radius: 9px;
  flex-wrap: nowrap;
}
.library-segment {
  margin: 0 18px 7px;
}
.library-segment button,
.segment button {
  flex: 1;
  min-height: 29px;
  border-radius: 7px;
  font-size: 12px;
  color: #666c76;
}
.library-segment button[aria-pressed="true"],
.segment button[aria-pressed="true"] {
  background: white;
  color: #272d37;
  font-weight: 650;
  box-shadow: 0 1px 4px #202a3a20;
}
#template-list {
  margin: 0 17px 6px;
}
.template-row,
.look-row {
  display: flex;
  align-items: center;
}
.template-row + .template-row,
.look-row + .look-row,
.recent-row + .recent-row,
.choice-row + .choice-row,
.switch-row + .switch-row {
  border-top: 1px solid #eceef2;
}
.template-load,
.recent-row,
.look-row > button:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  text-align: left;
  min-height: 46px;
  padding: 5px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 590;
}
.template-load > span:nth-child(2),
.look-row > button span {
  overflow-wrap: anywhere;
}
.template-mark {
  width: 28px;
  min-width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #42628e;
  background: #edf3fa;
  font:
    650 11px/1 -apple-system,
    "Segoe UI",
    sans-serif;
}
.template-load small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.row-icon {
  color: #66758b;
  width: 33px;
  min-height: 41px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.count {
  min-width: 25px;
  padding: 3px 6px;
  background: var(--soft);
  color: #68707d;
  font-size: 12px;
  text-align: center;
  border-radius: 8px;
  font-weight: 610;
}
#recent-list {
  padding: 0 22px 12px;
}
.empty-history,
.list-empty {
  color: var(--sub);
  font-size: 13px;
}
.empty-history {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0 16px;
}
.empty-icon,
.recent-symbol,
.row-symbol {
  width: 34px;
  height: 34px;
  background: var(--soft);
  color: #6a7688;
  display: grid;
  place-items: center;
  border-radius: 10px;
  flex: none;
}
.list-empty {
  line-height: 1.6;
  padding: 16px 2px 19px;
}
.recent-row {
  width: 100%;
  min-height: 55px;
  font-size: 13px;
}
.recent-row > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.recent-row b,
.recent-row small,
.choice-row b,
.choice-row small,
.switch-copy b,
.switch-copy small {
  display: block;
}
.recent-row b {
  overflow-wrap: anywhere;
}
.recent-row small,
.choice-row small,
.switch-copy small {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 450;
  margin-top: 3px;
}
.recent-row > svg {
  color: var(--muted);
}
.monitor {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 11px;
}
.monitor span,
.monitor a {
  gap: 5px;
}
.monitor a {
  color: var(--sub);
  margin-left: auto;
}
.mobile-nav {
  display: none;
}
.pane-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(275px, 1fr);
}
.option-rows,
.switch-group,
.parameter-list,
.look-list {
  padding: 0 20px 12px;
}
.choice-row,
.switch-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  min-height: 60px;
  color: var(--ink);
  padding: 9px 0;
}
.switch-copy,
.choice-row > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.switch-copy b,
.choice-row b {
  font-weight: 600;
  font-size: 14px;
}
.choice-row i {
  display: grid;
  place-items: center;
  width: 22px;
  opacity: 0;
  color: var(--blue);
}
.choice-row[aria-pressed="true"] i {
  opacity: 1;
}
.choice-row[aria-pressed="true"] .row-symbol,
.switch-row[aria-checked="true"] .row-symbol {
  color: var(--blue);
  background: var(--tint);
}
.ios-switch {
  height: 26px;
  width: 44px;
  padding: 3px;
  border-radius: 20px;
  background: #d7d9df;
  flex: none;
  transition: background 0.14s;
}
.ios-switch::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #0003;
  transition: transform 0.14s;
}
[aria-checked="true"] > .ios-switch {
  background: #31b968;
}
[aria-checked="true"] > .ios-switch::after {
  transform: translateX(18px);
}
.inset-block {
  border-top: 1px solid var(--line);
  padding: 15px 20px;
}
.inset-block h3 {
  margin: 0 0 9px;
}
.parameter-list {
  padding-bottom: 20px;
  display: grid;
  gap: 18px;
}
.parameter-list .field {
  margin: 0;
}
.inline-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inline-field input {
  flex: 1;
}
.inline-field button {
  white-space: nowrap;
  min-height: 44px;
}
.range-field {
  display: grid;
  gap: 7px;
}
.range-field output {
  color: var(--blue);
  font-weight: 600;
}
.range-field input {
  width: 100%;
  height: 24px;
  margin: 0;
  accent-color: var(--blue);
}
.clock-chips button {
  min-height: 35px;
  font-size: 13px;
}
.look-row > button:first-child {
  justify-content: space-between;
  min-height: 43px;
}
.look-row svg {
  color: var(--muted);
}
.reset-card p {
  margin: 0 21px 14px;
  color: var(--sub);
  line-height: 1.6;
  font-size: 13px;
}
.danger-action {
  gap: 7px;
  color: #bc3135;
  background: #fff0ef;
  border: 1px solid #f2d3d1;
  min-height: 42px;
  border-radius: 9px;
  padding: 9px 12px;
  font-weight: 600;
}
.reset-card .danger-action {
  margin: 0 20px 18px;
}
.sound-test {
  justify-self: start;
  min-height: 42px;
}
html:not(.prop-page) #sheet {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  color-scheme: light;
  box-shadow: 0 20px 65px #19253333;
}
html:not(.prop-page) #sheet::backdrop {
  background: #19233458;
}
html:not(.prop-page) .modal-inner p,
html:not(.prop-page) .modal-inner label {
  color: var(--sub);
}
html:not(.prop-page) .modal-close {
  color: var(--sub);
  border-radius: 50%;
  background: var(--soft);
  min-width: 33px;
  min-height: 33px;
}
html:not(.prop-page) .modal-inner .action {
  color: white;
  background: var(--blue);
  border-color: var(--blue);
}
html:not(.prop-page) .modal-inner .outline-action {
  color: var(--blue);
  background: #f6f8fa;
  border-color: var(--line);
}
html:not(.prop-page) #toast {
  background: #292e38;
  border: 0;
  border-radius: 12px;
  color: white;
  font-size: 13px;
}
html:not(.prop-page) #toast.error {
  background: #8c3535;
}
html:not(.prop-page) .boot-issue {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}
@media (hover: hover) {
  .side-nav a:hover:not([aria-current]),
  .open-prop:hover,
  .template-load:hover,
  .recent-row:hover,
  .look-row > button:hover,
  .choice-row:hover,
  .switch-row:hover {
    background: #f5f7fa;
  }
  .primary:hover {
    background: #005fc9;
  }
  .text-action:hover,
  .row-icon:hover {
    color: #004fa9;
  }
  .pair-button:hover,
  .soft-button:hover {
    background: #e0edff;
  }
}
@media (max-width: 1150px) and (min-width: 801px) {
  .studio {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 10px;
  }
  .push-grid,
  .pane-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(255px, 1fr);
    gap: 14px;
  }
  .card-head {
    padding-inline: 17px;
  }
  #custom-form {
    padding-inline: 17px;
  }
  .work-content {
    padding-inline: 22px;
  }
}
@media (max-width: 800px) {
  .studio {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    z-index: 9;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid var(--line);
    padding: 5px max(8px, env(safe-area-inset-right))
      calc(5px + env(safe-area-inset-bottom));
    background: #fafbfded;
    backdrop-filter: blur(15px);
  }
  .mobile-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 11px;
    color: var(--sub);
    font-weight: 550;
  }
  .mobile-nav a[aria-current] {
    color: var(--blue);
    font-weight: 680;
  }
  .work-content {
    padding: 24px 20px calc(82px + env(safe-area-inset-bottom));
  }
  .statusbar {
    min-height: 57px;
    padding: 4px 20px;
    padding-top: max(4px, env(safe-area-inset-top));
  }
  .push-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(233px, 1fr);
    gap: 14px;
  }
  .bar-tools {
    gap: 12px;
  }
  .page-heading {
    margin-bottom: 20px;
  }
}
@media (max-width: 640px) {
  .work-content {
    padding: 20px 14px calc(80px + env(safe-area-inset-bottom));
  }
  .statusbar {
    padding-inline: 16px;
  }
  .production-name {
    font-size: 15px;
    font-weight: 680;
    letter-spacing: 0.025em;
    color: #323b47;
  }
  .push-grid,
  .pane-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .primary-col,
  .secondary-col {
    display: contents;
  }
  .card-stack,
  .pane-grid > .card,
  .push-grid .card {
    width: 100%;
  }
  .card-stack {
    gap: 14px;
  }
  .compose-card {
    order: 1;
  }
  .preview-card {
    order: 2;
  }
  .library-card {
    order: 3;
  }
  .history-card {
    order: 4;
  }
  .card-head {
    min-height: 58px;
    padding: 12px 16px;
  }
  .card-head h2 {
    font-size: 18px;
  }
  .card {
    border-radius: 15px;
  }
  #custom-form {
    padding: 0 16px 15px;
  }
  .field + .field,
  #custom-form > .date-pair {
    margin-top: 14px;
  }
  .date-pair > .field {
    margin: 0;
  }
  .date-pair {
    gap: 9px;
  }
  .quick-dates {
    gap: 3px;
    margin-top: 3px;
  }
  .quick-dates button {
    min-height: 44px;
    background: transparent;
    padding: 3px 7px;
  }
  .quick-dates button[aria-pressed="true"] {
    background: transparent;
  }
  .quick-dates button[aria-pressed="true"]::before {
    content: "✓ ";
  }
  .compose-actions {
    margin-top: 3px;
    padding-top: 11px;
  }
  .text-action,
  .template-row .row-icon,
  .library-segment button,
  .segment button,
  .clock-chips button,
  .soft-button,
  .pair-button {
    min-height: 44px;
  }
  .template-row .row-icon {
    width: 44px;
  }
  .field input,
  .field textarea {
    font-size: 16px;
  }
  .preview-screen {
    margin-inline: 12px;
  }
  .page-heading h1 {
    font-size: 32px;
  }
  .monitor {
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .page-meta {
    font-size: 12px;
  }
  .bar-tools {
    gap: 10px;
  }
  #connection {
    font-size: 11px;
  }
  .pair-button {
    background: transparent;
    border: 0;
    padding-inline: 0;
  }
  .preview-banner {
    max-width: 420px;
  }
  .screen-time {
    font-size: 44px;
  }
}
@media (min-width: 801px) {
  .production-name,
  .monitor a {
    display: none;
  }
  .bar-tools {
    width: 100%;
    justify-content: space-between;
  }
}
@media (pointer: coarse) {
  .quick-dates button,
  .row-icon,
  .text-action,
  .library-segment button,
  .clock-chips button,
  .segment button {
    min-height: 44px;
  }
  .row-icon {
    min-width: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ios-switch,
  .ios-switch::after {
    transition: none;
  }
}
