:root,
[data-ui-theme="light"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  color-scheme: light;
  color: var(--ink);
  --ink: #292927;
  --muted: #696963;
  --line: #25252014;
  --surface: #fafaf7;
  --raised: #fff;
  --well: #edede8;
  --accent: #77532c;
  --accent-soft: #77532c0c;
  --action: #2c2c29;
  --action-ink: #fff;
  --success: #347354;
  --shadow: #19191412;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
[data-ui-theme="dark"] {
  color-scheme: dark;
  --ink: #f5f4ef;
  --muted: #b2b1aa;
  --line: #ffffff1a;
  --surface: #242423;
  --raised: #363633;
  --well: #1b1b1a;
  --accent: #e8c595;
  --accent-soft: #e8c59512;
  --action: #eeece4;
  --action-ink: #252520;
  --success: #9cd7b5;
  --shadow: #00000030;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100svh;
  background: #fff;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
a {
  color: inherit;
}
button,
select,
input[type="text"],
input:not([type]),
input[type="number"] {
  min-height: 44px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
#light {
  position: fixed;
  inset: 0;
  z-index: 0;
  cursor: auto;
}
.light-surface {
  background: var(--light-color);
}
.light-surface.ring {
  background: radial-gradient(
    ellipse at center,
    #000 0 35%,
    var(--light-color) 37% 100%
  );
}
.light-surface.edge {
  background: linear-gradient(
    90deg,
    var(--light-color) 0 14%,
    #000 14% 86%,
    var(--light-color) 86%
  );
}
.masthead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: calc(100% - 80px);
  margin: auto;
  padding: 30px 0;
}
.brand {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -1.2px;
  font-weight: 600;
}
.brand-mark {
  width: 38px;
  height: 38px;
}
.panel {
  overflow: clip;
  position: relative;
  z-index: 1;
  width: 380px;
  max-width: calc(100% - 32px);
  margin: 22px auto 48px;
  padding: 20px 24px 12px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow:
    0 24px 80px var(--shadow),
    0 4px 12px #00000004,
    inset 0 1px 0 #ffffff18;
}
.control-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.7px;
  margin: 0;
}
.hide-control,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.hide-control {
  margin-right: -10px;
}
.hide-control:hover,
.icon-button:hover {
  background: var(--well);
  color: var(--ink);
}
.target-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}
.connection-dot {
  width: 5px;
  height: 5px;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
}
.connection-dot.offline {
  background: var(--accent);
}
.target-row select {
  flex: 1;
  min-width: 0;
  width: 90px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.target-row .text-button {
  font-size: 12px;
  white-space: nowrap;
}
.add-screen {
  margin-left: auto;
}
.text-button {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}
.text-button:hover {
  color: var(--ink);
}
.segmented {
  position: relative;
  isolation: isolate;
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border-radius: 13px;
  background: var(--well);
}
.segmented::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 6px);
  border-radius: 10px;
  background: var(--raised);
  box-shadow: 0 1px 4px #0000000b;
  z-index: -1;
}
.segmented:has(#work-tab[aria-selected="true"])::before {
  transform: translateX(calc(100% + 4px));
}
.segmented button {
  flex: 1;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}
.segmented button[aria-selected="true"] {
  color: var(--ink);
}
#light-panel > section {
  margin: 0 0 22px;
}
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
}
output {
  font-size: 13px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
output span {
  margin-left: 3px;
  font-size: 11px;
}
.active-source {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 0 3px 5px;
  border-radius: 50%;
  background: var(--accent);
  overflow: hidden;
  font-size: 0;
}
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  --track: linear-gradient(90deg, #62625c, #deded5);
}
input[type="range"].temperature-slider {
  --track: linear-gradient(90deg, #ecaf61, #f5dbb5 35%, #eeeee6 65%, #aac7ec);
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 10px;
  background: var(--track);
}
input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 10px;
  background: var(--track);
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 21px;
  height: 21px;
  margin-top: -8px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #00000012;
  box-shadow: 0 1px 4px #0003;
}
input[type="range"]::-moz-range-thumb {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #00000012;
  box-shadow: 0 1px 4px #0003;
}
.scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  margin-top: 0;
}
.presets {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}
.presets button {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
}
#temperature-control .presets button {
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 10px 2px;
  border-radius: 12px;
  font-size: 11px;
}
#temperature-control .presets button:hover {
  background: var(--well);
}
#temperature-control .presets button[aria-pressed="true"] {
  background: var(--raised);
  color: var(--ink);
  box-shadow: 0 2px 8px #00000008;
}
.presets i {
  display: block;
  width: 24px;
  height: 24px;
  background: var(--swatch);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #0000000b;
}
#temperature-control .presets button[aria-pressed="true"] i::after {
  content: "✓";
  display: grid;
  place-items: center;
  height: 100%;
  color: #292927;
  font-size: 12px;
}
#color-control {
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.color-palette {
  display: flex;
  gap: 8px;
  align-items: center;
}
.color-presets {
  flex: 1;
  margin: 0;
  gap: 4px;
  order: -1;
}
.color-presets button {
  flex: 1;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}
.color-presets button::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px #00000006;
}
.color-presets button[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  color: #292927;
  font-size: 13px;
}
.color-presets button:hover::before {
  box-shadow: 0 0 0 4px var(--well);
}
.color-picker {
  width: 44px;
  height: 44px;
  padding: 7px;
  border-radius: 50%;
  background: conic-gradient(
    from 30deg,
    #f1bd7e,
    #eda4b7,
    #b6a5ed,
    #a0d6e5,
    #b9dbb1,
    #f1bd7e
  );
  background-clip: content-box;
}
input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 30px;
  height: 30px;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  border: 0;
}
.color-picker:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.light-area {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.light-area select {
  width: 100%;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--raised);
  color: var(--ink);
  font-size: 12px;
}
#pattern-description {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.actions {
  display: flex;
  gap: 8px;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  min-height: 46px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
}
.primary {
  background: var(--action);
  color: var(--action-ink);
}
.secondary {
  background: var(--well);
  color: var(--ink);
  border-color: var(--line);
}
.primary:hover {
  filter: brightness(1.12);
}
.secondary:hover {
  background: var(--raised);
}
.actions .primary {
  flex: 1;
}
.panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}
.panel-footer .text-button {
  font-size: 11px;
}
#wake {
  display: flex;
  align-items: center;
  gap: 7px;
}
#wake::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid var(--muted);
}
#wake[aria-pressed="true"]::before {
  background: var(--success);
  border-color: var(--success);
}
#reveal {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  top: max(16px, env(safe-area-inset-top));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 99px;
  font-size: 13px;
}
#reveal:hover {
  background: var(--surface);
}
.halo-icon {
  width: 24px;
  height: 24px;
}
#reveal:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
[data-input-mode="pointer"] #reveal:focus {
  outline: none;
}
.clean #controls,
.clean [data-chrome] {
  display: none;
}
.clean {
  overflow: hidden;
}
#toast {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  max-width: calc(100% - 32px);
  width: max-content;
  margin: 0;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 30px var(--shadow);
  font-size: 13px;
  line-height: 1.5;
  display: none;
}
#toast.visible {
  display: block;
}
/* Secondary tasks replace the panel contents. The light remains unobstructed. */
.panel-view {
  margin: 0;
  padding-bottom: 12px;
  outline: none;
}
.dialog-heading {
  display: flex;
  align-items: center;
  margin: -4px 0 12px -5px;
}
.close {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding-right: 12px;
}
h2 {
  margin: 0 0 12px;
  font-size: 27px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -1px;
}
h3 {
  font-size: 14px;
  margin: 24px 0 6px;
  font-weight: 600;
}
.panel-view p {
  font-size: 13px;
  line-height: 1.65;
  margin: 12px 0;
}
.muted,
.fine {
  color: var(--muted);
}
.panel-view .fine {
  font-size: 12px;
}
.panel-view label {
  display: block;
  font-size: 12px;
  margin: 16px 0 8px;
}
.panel-view .primary {
  width: 100%;
  margin-top: 10px;
}
.option-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 17px 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.option-button:hover {
  color: var(--accent);
}
.option-button span:nth-child(2) {
  flex: 1;
}
.option-button strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.option-button small {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.option-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--well);
  font-size: 22px;
}
details {
  margin: 22px 0 12px;
  font-size: 12px;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 0;
  color: var(--muted);
}
textarea,
input[type="text"],
input:not([type]),
input[type="number"] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--well);
  color: var(--ink);
  font-size: 14px;
}
textarea {
  resize: vertical;
  font:
    12px/1.5 ui-monospace,
    monospace;
  overflow-wrap: anywhere;
}
.pair-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 20px;
}
.pair-actions .primary {
  width: auto;
  margin: 0;
}
#qr,
#share-qr {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}
#qr svg,
#share-qr svg {
  width: 200px;
  height: 200px;
  background: #fff;
  border: 10px solid #fff;
  border-radius: 16px;
  stroke: none;
}
#answer-section {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.file-label input {
  display: block;
  width: 100%;
  font-size: 12px;
  margin-top: 10px;
}
.name-row {
  display: flex;
  gap: 8px;
}
.name-row input {
  min-width: 0;
}
.screen-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.screen-swatch {
  width: 32px;
  height: 25px;
  border: 1px solid #8884;
  border-radius: 5px;
  flex-shrink: 0;
}
.screen-info {
  flex: 1;
  min-width: 0;
}
.screen-info strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 500;
}
.screen-info small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.connection-status {
  color: var(--muted);
}
.connection-status[data-state="connected"] {
  color: var(--success);
}
.studio {
  display: inline-block;
  margin-top: 20px;
  font-size: 12px;
  text-decoration: none;
}
.studio:hover {
  text-decoration: underline;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.noscript {
  position: relative;
  margin: 40px;
}
/* Work is a live status, so controls commit in place without a submit step. */
.work-form {
  display: grid;
  gap: 12px;
}
.work-session-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  align-items: end;
}
.work-duration,
.work-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.work-field-label,
.work-field label,
.work-duration label {
  font-size: 12px;
}
.meeting-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px;
  border-radius: 12px;
  background: var(--well);
  font-size: 12px;
}
.work-meeting {
  appearance: none;
  position: relative;
  width: 32px;
  height: 20px;
  margin: 0;
  border: 0;
  border-radius: 20px;
  background: #85857f;
  cursor: pointer;
  flex-shrink: 0;
}
.work-meeting::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: white;
}
.work-meeting:checked {
  background: #b93f49;
}
.work-meeting:checked::after {
  transform: translateX(12px);
}
.duration-field {
  position: relative;
}
.work-minutes {
  height: 46px;
  padding-right: 40px !important;
}
.duration-field span {
  position: absolute;
  right: 12px;
  top: 16px;
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
}
.meeting-options {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 12px;
  padding: 5px 0 16px;
  border-bottom: 1px solid var(--line);
}
.meeting-options:has(.work-field[hidden]) {
  grid-template-columns: 1fr;
}
.work-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--well);
  color: var(--ink);
  padding: 0 8px;
  font-size: 12px;
}
.work-form > label {
  margin-top: 6px;
  font-size: 13px;
}
.work-message {
  min-height: 96px;
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.work-help {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
#work-feedback:empty,
.work-actions:has([hidden]) {
  display: none;
}
#work-panel {
  margin-bottom: 24px;
}
#work-border {
  position: fixed;
  inset: 0;
  border: var(--meeting-thickness, 2px) solid #bd333b66;
  box-shadow: inset 0 0 55px #bd333b26;
  pointer-events: none;
  z-index: 2;
}
#work-border[data-indicator="border"],
#work-border[data-indicator="pulse"] {
  border-color: #bd333b;
  box-shadow: none;
}
#work-broadcast {
  position: relative;
  z-index: 3;
  width: min(560px, calc(100% - 40px));
  margin: 24px auto;
  text-align: center;
  color: var(--ink);
  pointer-events: none;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
}
.clean #work-broadcast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0;
}
.work-broadcast-heading {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}
#work-author {
  order: -1;
  font-size: 11px;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}
#work-countdown {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#work-broadcast-message {
  margin: 5px 0 0;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}
#work-meeting-badge {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 14px 24px;
  min-height: 52px;
  width: max-content;
  max-width: calc(100% - 32px);
  border-radius: 99px;
  background: #fff1f1;
  color: #a92330;
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  pointer-events: none;
}
#work-meeting-badge span {
  margin-right: 6px;
}
@media (max-width: 600px) {
  .masthead {
    width: calc(100% - 40px);
    padding: 20px 0 8px;
  }
  .brand {
    font-size: 21px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
  }
  .panel {
    margin: 14px auto 24px;
    padding: 16px 20px 10px;
    border-radius: 24px;
  }
  .segmented {
    margin-bottom: 20px;
  }
  #light-panel > section {
    margin-bottom: 18px;
  }
  #temperature-control .presets button {
    padding-block: 8px;
  }
  input[type="text"],
  input:not([type]),
  input[type="number"],
  textarea,
  .work-message {
    font-size: 16px;
  }
  #work-meeting-badge {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 16px auto;
  }
  .clean #work-meeting-badge {
    position: fixed;
    top: max(80px, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }
}
@media (max-width: 360px) {
  .panel {
    padding-inline: 16px;
  }
  .work-session-row {
    grid-template-columns: 1fr;
  }
}
/* Motion reinforces selection and navigation, never changing the emitted light. */
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background 180ms ease,
      color 180ms ease,
      box-shadow 180ms ease,
      transform 200ms var(--ease);
  }
  button:active:not(:disabled) {
    transform: scale(0.97);
  }
  .segmented::before {
    transition: transform 280ms var(--ease);
  }
  .work-meeting::after {
    transition: transform 200ms var(--ease);
  }
  #work-border[data-indicator="pulse"] {
    animation: meeting-breathe 3s ease-in-out infinite;
  }
  @keyframes meeting-breathe {
    0%,
    100% {
      opacity: 0.45;
    }
    50% {
      opacity: 1;
    }
  }
  #toast.visible {
    animation: toast-in 220ms var(--ease);
  }
  @keyframes toast-in {
    from {
      opacity: 0;
      translate: 0 6px;
    }
    to {
      opacity: 1;
      translate: 0 0;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
