:root {
  color-scheme: light;
  --page: #f3f5ed;
  --ink: #17372e;
  --accent: #235444;
  --dim: #54685d;
  --paper: #fdfef9;
  --line: #d8e0d5;
  font-family: "Aptos", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 260px; }
button, input, select { font: inherit; }
button, select, input[type="range"], input[type="color"] { cursor: pointer; }
button { color: inherit; }
:focus-visible { outline: 3px solid #538b77; outline-offset: 3px; }
.shell { width: min(880px, 100% - 56px); margin: clamp(32px, 10vh, 108px) auto 32px; }
.masthead { display: flex; align-items: center; justify-content: space-between; min-height: 38px; margin-bottom: 20px; }
.account-nav { display: flex; align-items: center; gap: 10px; }
.account-nav a { display: inline-block; text-decoration: none; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 690; letter-spacing: -.048em; font-size: 24px; }
.mark { display: inline-flex; align-items: center; justify-content: center; gap: 2px; width: 31px; height: 31px; background: var(--ink); border-radius: 10px; }
.mark i { width: 2px; height: 7px; background: #d4efc9; border-radius: 9px; }
.mark i:nth-child(even) { height: 13px; }
.mark i:nth-child(3) { height: 20px; }
.desk { display: grid; grid-template-columns: minmax(230px, .86fr) minmax(370px, 1.14fr); background: var(--paper); border-radius: 25px; border: 1px solid #d4ddd0; overflow: hidden; box-shadow: 0 14px 52px -37px #35574788; }
.device-panel { isolation: isolate; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 380px; overflow: hidden; color: #f4f7e9; background: radial-gradient(ellipse at 49% 44%, #456f5c 0%, #325645 49%, #254738 85%); padding: 28px; }
.device-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.overline { font-weight: 650; color: #deead8; font-size: .69rem; text-transform: uppercase; letter-spacing: .13em; }
.connection { display: inline-flex; align-items: center; gap: 7px; font-size: .79rem; color: #f3f7e8; }
.dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid #b6d1b4; }
.connection.reported .dot { background: #d0f3a3; border-color: #d0f3a3; }
.stage { position: relative; flex: 1; min-height: 240px; display: grid; place-items: center; }
#aura { position: absolute; width: 90%; aspect-ratio: 1; border-radius: 50%; opacity: 0; background: radial-gradient(ellipse, var(--glow, #fff), transparent 69%); filter: blur(20px); transition: opacity .4s, background .4s; }
.lamp { position: relative; width: 136px; height: 156px; }
.lamp::after { content: ""; position: absolute; width: 125px; height: 13px; left: 6px; bottom: -8px; background: #10281c; border-radius: 50%; filter: blur(9px); z-index: -1; }
.shade { position: absolute; inset: 11px 12px 57px; border-radius: 47% 47% 10% 10% / 28% 28% 6% 6%; background: var(--shade-color, #d9e8d9); box-shadow: inset 12px 1px 15px #fff8, inset -13px -2px 19px #15362a24; transform: perspective(120px) rotateX(9deg); }
.knob { position: absolute; width: 58px; height: 17px; left: 39px; top: 3px; border-radius: 50% / 44%; z-index: 1; background: linear-gradient(160deg, #bacfba, #a1b6a2); box-shadow: inset 0 3px 3px #e2eddb, inset 0 -4px 1px #809783; }
.base { position: absolute; inset: 90px 8px 0; border-radius: 5% 5% 26% 26% / 7% 7% 15% 15%; background: repeating-linear-gradient(90deg, #fff1 0 2px, transparent 3px 5px), linear-gradient(90deg, #8ba591, #b9cdb9 22%, #adc3b0 56%, #7d9883); box-shadow: inset 0 2px 2px #e8f4e278, inset 0 -5px 6px #59755e66; }
.device-caption { position: relative; }
.device-caption p { margin: 0; overflow-wrap: anywhere; }
#device-name { font-family: Georgia, "Times New Roman", serif; font-weight: normal; font-size: clamp(1.65rem, 3.2vw, 2.25rem); letter-spacing: -.04em; }
#device-info { color: #d5e4d1; margin-top: 5px; font-size: .87rem; }
.workbench { padding: clamp(28px, 4.2vw, 47px); min-width: 0; align-self: center; }
h1, h2, p { margin: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: normal; letter-spacing: -.052em; line-height: 1.12; font-size: clamp(2rem, 3.4vw, 2.55rem); }
h2 { font-size: 1.13rem; line-height: 1.3; letter-spacing: -.025em; }
.intro, .muted, .security-note { color: var(--dim); font-size: .92rem; line-height: 1.45; }
.intro { margin: 10px 0 24px; }
.security-note { margin-top: 13px; font-size: .8rem; }
label, .control-label { font-size: .89rem; font-weight: 620; }
form label { display: block; margin-bottom: 7px; }
input[type="email"], input[type="password"], select { width: 100%; min-width: 0; min-height: 44px; padding: 9px 10px; border: 1px solid #bbc9b9; border-radius: 8px; background: #fff; color: var(--ink); }
input[type="email"] { margin-bottom: 15px; }
input:focus-visible, select:focus-visible { outline-offset: 1px; }
button { border: 0; transition: background .15s, border-color .15s; }
.primary { display: flex; justify-content: space-between; align-items: center; font-weight: 650; color: #f6ffef; background: var(--accent); border-radius: 9px; min-height: 46px; padding: 8px 16px; width: 100%; margin-top: 20px; }
.primary:hover { background: #183e31; }
.primary span { font-size: 1.2rem; }
.secondary { background: #eaf1e7; border: 1px solid #c9d7c7; border-radius: 8px; font-weight: 600; min-height: 42px; padding: 6px 14px; }
.secondary:hover { background: #dbe9d8; }
.compact { min-height: 35px; font-size: .84rem; padding: 5px 10px; }
.text-button, footer a { background: none; color: var(--dim); font-size: .85rem; font-weight: 540; text-decoration: none; }
.text-button { padding: 8px 0 8px 8px; }
.text-button:hover, footer a:hover { text-decoration: underline; color: var(--ink); }
footer { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin: 13px 4px 0; }
footer a { padding: 6px 0; }
footer a span { margin-left: 2px; }
.tools-heading, .section-title, .range-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tools-heading { margin-bottom: 16px; }
.section-title { margin-bottom: 16px; }
.light-actions { display: flex; align-items: center; gap: 10px; }
#light-draft-note { margin: -5px 0 12px; }
#apply-light { margin-top: 8px; }
fieldset { margin: 0; border: 0; padding: 0; min-width: 0; }
.control-group { border-top: 1px solid var(--line); padding: 18px 0 0; }
.control-group + .control-group { margin-top: 21px; }
.picker { margin: 12px 0 14px; }
.picker label, #favorites-group > label, #sounds-group > label { display: block; margin-bottom: 7px; }
#volume-group + #favorites-group, #favorites-group + #sounds-group, #volume-group + #sounds-group { margin-top: 14px; }
#favorite-picker, #sound-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
output, .mono { font-variant-numeric: tabular-nums; color: var(--dim); font-size: .84rem; }
.readout { color: var(--dim); font-size: .85rem; }
input[type="range"] { width: 100%; margin: 4px 0 12px; height: 29px; accent-color: var(--accent); touch-action: pan-y; }
.swatches { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.swatch, .custom-color { position: relative; width: 36px; height: 39px; border-radius: 8px; background: transparent; display: inline-grid; place-items: center; padding: 0; }
.swatch::before { content: ""; border-radius: 50%; width: 24px; height: 24px; border: 1px solid #212b202b; background: var(--tone); }
.swatch[aria-pressed="true"]::before { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.swatch:hover, .custom-color:hover { background: #e9f0e4; }
.amber { --tone: #ff922e; }.rose { --tone: #ff7394; }.lavender { --tone: #ad91ff; }.sky { --tone: #78bfff; }.mint { --tone: #74dfb2; }.pearl { --tone: #fff; }
.custom-color span { display: grid; place-items: center; border: 1px dashed #899d89; border-radius: 50%; font-size: 1rem; line-height: 1; width: 25px; height: 25px; }
.custom-color input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.custom-color:focus-within { outline: 3px solid #538b77; }
.notice { font-size: .86rem; line-height: 1.4; margin: 8px 0; color: #49624d; overflow-wrap: anywhere; }
.notice:empty { margin: 0; }
.notice.error { color: #954233; }
#empty, #retry { margin-top: 14px; }
#empty p, #no-controls { margin-top: 7px; }
#opening-note { margin-top: 10px; }
button:disabled, input:disabled, select:disabled, fieldset:disabled .swatches { opacity: .57; cursor: default; }
@media(max-width: 680px) {
  .shell { width: min(430px, 100% - 28px); margin: 20px auto 16px; }
  .masthead { margin-bottom: 13px; }
  .desk { display: block; border-radius: 19px; }
  .device-panel { min-height: 128px; padding: 17px 22px; display: grid; grid-template-columns: minmax(0, 1fr) 78px; grid-template-rows: auto 1fr; column-gap: 10px; }
  .device-top { justify-content: flex-start; gap: 12px; }
  .stage { min-height: 0; grid-column: 2; grid-row: 1 / 3; }
  .lamp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.56); }
  #aura { width: 140%; }
  .device-caption { grid-column: 1; align-self: end; padding-top: 15px; }
  #device-name { font-size: 1.62rem; }
  #device-info { font-size: .79rem; }
  .workbench { padding: 23px; }
  .intro { margin-bottom: 19px; }
  .compact { min-height: 39px; }
  footer { gap: 4px 12px; margin-inline: 1px; }
}
@media(max-width: 350px) {
  .device-panel, .workbench { padding-inline: 15px; }
  .swatches { gap: 2px; }
  .swatch, .custom-color { width: 31px; }
}
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
