:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif;
  color: #fff;
  background: #191a1c;
  --side: clamp(16px, 2.5vw, 38px);
  --edge-left: max(var(--side), env(safe-area-inset-left));
  --edge-right: max(var(--side), env(safe-area-inset-right));
  --edge-top: max(clamp(16px, 3vh, 30px), env(safe-area-inset-top));
  --edge-bottom: max(clamp(18px, 3.6vh, 36px), calc(env(safe-area-inset-bottom) + 8px));
  --glass-fill: rgba(35, 34, 35, .48);
  --glass-edges: inset 0 1px 1px #ffffffab, inset 1px 0 1px #ffffff33,
    inset -1px -1px 1px #ffffff54, 0 3px 14px #08070924;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { position: relative; isolation: isolate; height: 100vh; height: 100dvh; overflow: hidden; }
button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled, input:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, label:has(:focus-visible) {
  outline: 2px solid white;
  outline-offset: 3px;
}
p, h1, h2, h3 { margin: 0; }
.visually-hidden, .task:not([data-error="true"]) #progress {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; border: 0; overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#landing-stage, #photo-frame { position: absolute; inset: 0; overflow: hidden; }
#landing-stage, body[data-view="chosen"] #photo-frame { touch-action: pan-x pinch-zoom; }
#landing-stage {
  z-index: -2;
  background:
    radial-gradient(ellipse 79% 95% at 100% 7%, #514f61 0%, #77758994 38%, transparent 79%),
    radial-gradient(ellipse 100% 74% at 25% 115%, #37484b 0%, #68898499 46%, transparent 88%),
    linear-gradient(143deg, #424950 3%, #768185 20%, #b0b7ae 34%, #c8c2b8 43%, #9ba3ac 55%, #687988 72%, #414758);
}
#landing-stage::before, #landing-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  transition: opacity .58s cubic-bezier(.22,.65,.25,1);
}
#landing-stage::before {
  opacity: var(--warm-tint, 0);
  background:
    radial-gradient(ellipse 80% 95% at 98% 5%, #79665b, transparent 78%),
    radial-gradient(ellipse 108% 78% at 26% 116%, #585548 5%, #90866d9c 51%, transparent 90%),
    linear-gradient(143deg, #635d56 3%, #a0997e 22%, #dbbd8a 36%, #ead4a4 43%, #b1a18a 56%, #847b75 75%, #5a555b);
}
#landing-stage::after {
  opacity: var(--cool-tint, 0);
  background:
    radial-gradient(ellipse 86% 94% at 104% 7%, #454b69 0%, #6573928a 40%, transparent 82%),
    radial-gradient(ellipse 100% 72% at 25% 117%, #303e4f 0%, #4d728b99 48%, transparent 89%),
    linear-gradient(143deg, #364656 3%, #698a99 22%, #a7c2ce 35%, #b8c8d5 43%, #8199ae 58%, #4e6382 78%, #42495e);
}
.glass-sphere-canvas {
  position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%;
  pointer-events: none;
}
#landing-stage:has(.glass-sphere-canvas:not([hidden]))::before,
#landing-stage:has(.glass-sphere-canvas:not([hidden]))::after { content: none; }
#photo-frame > * { pointer-events: none; }
#photo-frame > img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: cover; user-select: none; -webkit-user-select: none;
}
#photo-frame { z-index: -1; background: #191a1c; }
#photo-frame > #stage-photo { object-fit:contain; }
#native-surface { position:relative; width:100%; height:100%; }
#strength-preview { position:absolute; }
#photo-frame[data-inspect] { overflow:auto; overscroll-behavior:contain; cursor:grab; }
#photo-frame[data-panning] { cursor:grabbing; }
#photo-frame[data-inspect] #native-surface { width:max(100%, var(--pixel-width)); height:max(100%, var(--pixel-height)); }
#photo-frame:focus-visible { outline:2px solid #fff8; outline-offset:-2px; }
#photo-loupe {
  position: fixed; top: 0; left: 0; z-index: -1; pointer-events: none;
  width: clamp(116px, 12vw, 144px); aspect-ratio: 1; border-radius: 50%;
  overflow: hidden; background: #191a1c;
  box-shadow: 0 0 0 1px #ffffffd9, 0 0 0 2px #1717195c, 0 4px 18px #10101552;
}
#photo-loupe canvas { display: block; width: 100%; height: 100%; }
.brand {
  position: absolute; top: var(--edge-top); left: var(--edge-left); z-index: 1;
  display: flex; align-items: baseline; gap: clamp(8px, .85vw, 12px);
  text-shadow: 0 1px 4px #14121980, 0 2px 18px #0e0e133b;
  pointer-events: none;
}
.wordmark {
  color: white; font-weight: 640; line-height: 1.1;
  font-size: clamp(19px, 1.75vw, 24px); letter-spacing: -.055em;
}
.tagline {
  font-size: clamp(.75rem, 1.1vw, .9375rem); font-weight: 300; line-height: 1.2;
  color: rgb(255 255 255 / .92);
}
.glass {
  color: #fff;
  background: linear-gradient(122deg, #ffffff16, #ffffff03 58%, #ffffff0d), var(--glass-fill);
  -webkit-backdrop-filter: blur(16px) saturate(1.28);
  backdrop-filter: blur(16px) saturate(1.28);
  box-shadow: var(--glass-edges);
  border: none;
}
#site-menu {
  position: absolute; z-index: 4; top: calc(var(--edge-top) - 10px); right: calc(var(--edge-right) - 10px);
}
body:not([data-view="landing"]) #site-menu { display: none; }
#nav-toggle, #nav-items button {
  border: 0; border-radius: 8px; font: inherit; color: inherit; background: transparent;
}
#nav-toggle, #nav-close {
  display: grid; place-items: center; padding: 0; width: 44px; height: 44px;
}
#nav-toggle svg, #nav-close svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round;
}
#nav-toggle svg { filter: drop-shadow(0 1px 2px #141211a3); }
#site-menu[data-open="true"] #nav-toggle { opacity: 0; }
#nav-items {
  position: fixed; inset: 0; max-width: none; max-height: none; width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0; background: transparent; color: white; overflow: hidden;
  transition: display .3s allow-discrete, overlay .3s allow-discrete;
}
#nav-items:not([open]) { pointer-events: none; }
#nav-items::backdrop { background: rgb(19 16 13 / 0); transition: background-color .24s ease; }
#nav-items[open]::backdrop { background: rgb(19 16 13 / .16); }
#nav-items .nav-sheet {
  position: absolute; inset: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) auto;
  width: min(250px, calc(100% - 48px)); padding: 15px 14px 18px; border-radius: 21px;
  border: 1px solid rgb(250 247 242 / .28); display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(155deg, #f7f4ee13, transparent 34%, #0c0c0d24), rgb(35 35 35 / .48);
  box-shadow: inset 0 1px 0 #ffffff21, inset 1px 0 0 #ffffff14, -6px 2px 28px #0c0a091f;
  -webkit-backdrop-filter: blur(16px) saturate(1.12) brightness(.92);
  backdrop-filter: blur(16px) saturate(1.12) brightness(.92);
  transform: translateX(calc(100% + max(8px, env(safe-area-inset-right))));
  transition: transform .3s cubic-bezier(.25,.75,.22,1);
  font-size: .875rem; line-height: 1.35;
}
#nav-items[open] .nav-sheet { transform: translateX(0); }
@starting-style {
  #nav-items[open] .nav-sheet { transform: translateX(calc(100% + max(8px, env(safe-area-inset-right)))); }
  #nav-items[open]::backdrop { background: transparent; }
}
.nav-heading { display: flex; flex: none; align-items: center; justify-content: space-between; padding-left: 9px; }
.nav-heading h2 { font-size: 1.3rem; line-height: 1.15; letter-spacing: -.04em; font-weight: 500; }
#nav-close svg { width: 18px; height: 18px; }
.nav-content {
  flex: 1; min-height: 0; margin-top: 16px; display: flex; flex-direction: column; gap: 16px;
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.nav-content button {
  width: 100%; min-height: 36px; display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; text-align: left;
}
.nav-content button:focus-visible { outline-offset: -2px; }
#nav-items button:disabled { opacity: .62; }
@media (hover: hover) {
  #nav-items button:enabled:hover { background: rgb(255 255 255 / .11); }
}
.nav-chevron {
  width: 7px; height: 7px; margin: -3px 4px 0 0; border: solid currentColor; opacity: .7;
  border-width: 0 1.3px 1.3px 0; transform: rotate(45deg);
}
.nav-content [aria-expanded="true"] .nav-chevron { margin-top: 3px; transform: rotate(225deg); }
#mode-options { display: grid; gap: 1px; margin-left: 9px; font-size: .8125rem; }
#mode-options [aria-pressed="true"] { background: rgb(255 255 255 / .12); }
#mode-options [aria-pressed="true"]::after {
  content: ""; width: 5px; height: 9px; margin-right: 3px;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-1px) rotate(45deg);
}
#account-options { margin: 4px 0 0 9px; font-size: .8125rem; }
#account-options p { margin: 5px 8px; overflow-wrap: anywhere; }
#account-count { font-size: .75rem; }
.nav-secondary { margin-top: auto; }
@media (pointer: coarse) {
  .nav-content button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  #nav-items, #nav-items .nav-sheet, #nav-items::backdrop { transition: none; }
}
#account-notice {
  position: absolute; right: var(--edge-right); top: calc(var(--edge-top) + 44px);
  max-width: min(270px, 80vw); z-index: 3;
}
#auth-dialog {
  --glass-fill: rgb(29 29 31 / .92);
  width: min(360px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto;
  padding: 22px 24px 16px; border-radius: 22px; overscroll-behavior: contain;
}
#auth-dialog::backdrop { background: rgb(10 10 12 / .46); }
.auth-heading, #auth-links { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-heading { margin-bottom: 15px; }
.auth-heading .wordmark { font-size: 16px; }
#auth-close {
  display: grid; place-items: center; height: 38px; width: 38px; margin: -6px -7px -6px 0;
  border: 0; border-radius: 50%; background: transparent;
}
#auth-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
#auth-close:hover, #auth-close:focus-visible { background: #ffffff17; }
#auth-title { font-size: 1.5rem; font-weight: 520; letter-spacing: -.045em; line-height: 1.2; }
#auth-description, #auth-password-hint, #auth-feedback {
  font-size: .8125rem; line-height: 1.45; color: #d6d6d9; overflow-wrap: anywhere;
}
#auth-description { margin-top: 8px; }
#auth-fields { display: grid; gap: 12px; min-width: 0; margin: 20px 0 0; border: 0; padding: 0; }
#auth-fields label { display: grid; gap: 6px; font-size: .8125rem; }
#auth-fields label:has(:focus-visible) { outline: none; }
#auth-fields input {
  width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid #ffffff40;
  border-radius: 10px; color: #fff; background: rgb(0 0 0 / .21); font-size: 1rem;
}
#auth-code { letter-spacing: .18em; font-variant-numeric: tabular-nums; }
#auth-password-hint { margin-top: -5px; }
#auth-feedback:empty { display: none; }
#auth-feedback[data-error] { color: #ffd5c3; }
#auth-submit {
  min-height: 44px; margin-top: 2px; padding: 8px 16px; border: 0; border-radius: 999px;
  background: #f4f3f1; color: #242426; font-size: .9rem; font-weight: 600;
}
#auth-submit:hover:enabled { background: white; }
#auth-links { margin-top: 5px; flex-wrap: wrap; row-gap: 0; }
#auth-links button {
  min-height: 40px; padding: 6px 0; border: 0; background: transparent; color: #e0e0e4; font-size: .8125rem;
}
#auth-links button:hover, #auth-links button:focus-visible { text-decoration: underline; }
@media (pointer: coarse) {
  #auth-close, #auth-links button { min-height: 44px; }
  #auth-close { min-width: 44px; }
}
.bottom-center { position: absolute; left: 50%; bottom: var(--edge-bottom); transform: translateX(-50%); }
.import-tools, .adjust-tools { display: grid; justify-items: center; gap: 8px; max-width: calc(100% - 28px); }
.import-tools { width: max-content; max-width: calc(100% - 12px); }
body[data-mode="portrait"]:not(:has(input[name="portrait-style"])) .import-tools { display: none; }
#upload-note {
  width: max-content; max-width: 100%; margin-bottom: 4px; text-align: center;
  font-size: clamp(.59375rem, 2.5vw, .6875rem); font-weight: 350; line-height: 1.5;
  letter-spacing: .035em; text-shadow: 0 1px 3px #000c, 0 0 10px #0009;
  pointer-events: none;
}
@media (max-width: 360px) {
  #upload-note { letter-spacing: 0; }
}
@media (orientation: landscape) and (max-width: 620px) and (max-height: 500px) {
  #upload-note { font-size: .625rem; }
}
#drop { width: min(392px, calc(100vw - 36px)); container-type: inline-size; }
.import-control {
  width: 100%; min-height: 68px;
  display: flex; align-items: center; gap: 12px; padding: 9px 15px 9px 12px;
  border-radius: 999px; user-select: none; -webkit-user-select: none; cursor: pointer;
  transition: transform .15s ease-out, background-color .16s;
}
.import-control:hover { --glass-fill: rgba(37, 36, 37, .58); }
.import-control:active { transform: scale(.975); }
#drop.drag .import-control { transform: scale(1.035); --glass-fill: rgba(27, 28, 30, .7); outline: 1px solid #fffd; }
.import-icon { flex: none; width: 41px; height: 41px; display: grid; place-items: center;
  border-radius: 50%; background: #ffffff17; box-shadow: inset 0 1px 1px #ffffff36; }
.import-icon svg, .editor-actions svg, .drawer-heading svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round;
}
.import-icon svg { width: 20px; height: 20px; }
.import-copy { display: grid; gap: 3px; min-width: 0; flex: 1; }
.import-copy strong, .import-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-copy strong { font-size: 16px; font-weight: 600; line-height: 1.2; letter-spacing: -.018em; }
.import-copy > span { color: #fffffff0; font-size: 12px; line-height: 1.2; }
#file-detail:empty { display: none; }
#picker { flex: none; padding: 8px 12px; border-radius: 999px; background: #ffffff1f;
  font-size: 13px; font-weight: 550; line-height: 1.2; }
@container (max-width: 320px) {
  .import-control { padding-left: 22px; }
  .import-icon { display: none; }
}
@media (orientation: landscape) and (max-height: 500px) {
  #drop { max-width: calc(100vw - 212px); }
}
.notice { padding: 7px 12px; width: max-content; max-width: min(320px, calc(100vw - 28px)); border-radius: 13px;
  background: #232326ed; color: white; font-size: 13px; line-height: 1.4; text-align:center; }
.notice:empty, #export-status:empty { display:none; }
.proof-notice:has(#proof-note[hidden]):has(#retry-proof[hidden]) { display:none; }
.proof-notice { display: grid; justify-items: center; gap: 5px; }
.task {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-width: 146px; max-width: calc(100% - 28px); min-height: 25px;
  padding: 10px 15px; border-radius: 999px;
}
#transfer-meter {
  display:block; appearance:none; -webkit-appearance:none;
  width: 116px; height: 3px; border: none; border-radius: 4px; overflow:hidden;
  color:#fff; background:#ffffff45;
}
#transfer-meter::-webkit-progress-bar { background:#ffffff45; border-radius:4px; }
#transfer-meter::-webkit-progress-value { background:#fff; border-radius:4px; }
#transfer-meter::-moz-progress-bar { background:#fff; border-radius:4px; }
#transfer-meter:indeterminate {
  background: linear-gradient(90deg,transparent, #fff 38%, #fff 60%, transparent) -64px 0 / 64px 100% no-repeat, #ffffff45;
  animation: progress-sweep 1.65s ease-in-out infinite;
}
#transfer-meter:indeterminate::-webkit-progress-bar { background:transparent; }
#transfer-meter:indeterminate::-moz-progress-bar { background:transparent; }
@keyframes progress-sweep { to { background-position: 135px 0; } }
.task[data-error="true"] { width: max-content; max-width: min(320px, calc(100vw - 28px)); border-radius: 18px; padding: 12px 16px; }
.task[data-error="true"] #progress { font-size: 13px; line-height: 1.4; text-align: center; }
#studio[data-phase="export"] .adjust-tools { visibility: hidden; }
.recovery { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.recovery:not(:has(button:not([hidden]))) { display: none; }
.recovery button, #close-export { border: 0; color: #fff; background:#ffffff26; border-radius: 99px; }
.recovery button { font-size: 12px; padding: 7px 12px; }
@media (pointer: coarse) { .recovery button { min-height: 44px; } }
#studio { --actions-top: var(--edge-top); }
@media (max-width: 580px) {
  #studio { --actions-top: calc(var(--edge-top) + 34px); }
}
.editor-actions {
  position: absolute; z-index: 2; right: var(--edge-right); top: var(--actions-top);
  display: flex; align-items: center; gap: 7px;
}
.action-pill { display:inline-flex; align-items:center; justify-content:center; gap:5px;
  border-radius:999px; min-height:34px; padding:7px 13px; font-size:13px; font-weight:550; }
.action-pill:hover, #close-export:hover { --glass-fill: rgba(34, 34, 36, .68); }
.editor-actions svg { width: 13px; height: 13px; }
#view-scale { display:flex; border-radius:999px; padding:3px; }
#view-scale button { padding:4px 9px; min-height:28px; border:0; border-radius:999px; background:transparent; font-size:12px; }
#view-scale button[aria-pressed="true"] { background:#ffffffeb; color:#202124; }
#photo-dimensions { margin-bottom:10px; font-size:12px; color:#ffffffc9; font-variant-numeric:tabular-nums; }
.strength-control { width: min(210px, calc(100vw - 36px)); padding: 9px 15px 5px; border-radius: 21px; }
.strength-caption { display:flex; align-items:center; justify-content:space-between; gap:16px;
  font-size:12px; line-height:1.3; font-weight:550; }
.strength-caption output { font-variant-numeric:tabular-nums; }
.strength-control input[type="range"] { display:block; width:100%; height:19px; padding:0; margin:0; cursor:ew-resize;
  -webkit-appearance:none; appearance:none; background:transparent; }
.strength-control input::-webkit-slider-runnable-track { height:2px; background:#ffffff99; border-radius:2px; }
.strength-control input::-moz-range-track { height:2px; background:#ffffff99; border-radius:2px; }
.strength-control input::-webkit-slider-thumb { -webkit-appearance:none; width:12px; height:12px; margin-top:-5px; border-radius:50%; background:#fff; box-shadow:0 1px 3px #0005; }
.strength-control input::-moz-range-thumb { width:12px; height:12px; border:0; border-radius:50%; background:#fff; box-shadow:0 1px 3px #0005; }
.strength-control.has-components {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,1.25fr);
  width:min(610px, calc(100vw - 36px)); gap:20px; padding:12px 18px 7px;
}
.has-components > :last-child { padding-left:15px; border-left:1px solid #ffffff40; }
.has-components .strength-caption { gap:5px; }
@media (max-width:600px) {
  .strength-control.has-components { width:min(370px, calc(100vw - 32px)); grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 18px; }
  .has-components > :last-child { padding-left:0; border:0; }
}
@media (pointer:coarse) {
  .has-components input[type="range"] { height:26px; }
}
#export-drawer {
  position:absolute; z-index:3; right:var(--edge-right); top:calc(var(--actions-top) + 42px);
  width:min(234px, calc(100vw - 32px)); padding:14px; border-radius:20px;
  max-height:calc(100dvh - var(--actions-top) - var(--edge-bottom) - 42px);
  overflow:auto; --glass-fill:rgba(31,31,34,.78);
  transform-origin:top right; animation:open-drawer .23s cubic-bezier(.2,.8,.28,1);
}
@keyframes open-drawer { from { transform:translateX(10px); opacity:0; } }
.drawer-heading { display:flex; align-items:center; justify-content:space-between; margin:0 0 12px; }
.drawer-heading h3 { font-size:17px; font-weight:600; letter-spacing:-.035em; }
#close-export { display:grid; place-items:center; width:28px; height:28px; padding:0; }
#format-picker { border:0; padding:0; margin:0 0 12px; min-width:0; }
#format-picker legend { padding:0; margin-bottom:6px; font-size:12px; }
.format-options { display:flex; gap:2px; border-radius:11px; background:#0003; padding:3px; }
.format-options label { position:relative; flex:1; cursor:pointer; }
.format-options input { position:absolute; inset:0; margin:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.format-options span { display:grid; place-items:center; min-height:30px; font-size:12px; border-radius:8px; }
.format-options input:checked + span { background:#ffffffec; color:#212122; font-weight:600; }
.format-options input:focus-visible + span { outline:2px solid #fff; outline-offset:1px; }
#psd-description { display:none; margin-top:8px; font-size:12px; line-height:1.4; }
#format-picker:has(input[value="psd"]:checked) #psd-description { display:block; }
.download { display:flex; justify-content:center; align-items:center; width:100%; min-height:34px; border:0;
  text-decoration:none; border-radius:11px; color:#232324; background:#fafafa; font-size:13px; font-weight:600; }
#export-status { margin-top:9px; font-size:12px; line-height:1.4; }
@media (pointer:coarse) {
  .action-pill, .download { min-height:44px; }
  #view-scale button { min-height:38px; min-width:44px; }
  #close-export { width:44px; height:44px; }
  .format-options span { min-height:40px; }
  #export-drawer { top:calc(var(--actions-top) + 52px); max-height:calc(100dvh - var(--actions-top) - var(--edge-bottom) - 52px); }
}
@media (prefers-reduced-motion:reduce) {
  #landing-stage::before, #landing-stage::after, .import-control { transition:none; }
  #export-drawer { animation:none; }
  #transfer-meter:indeterminate { animation:none; background-position:center; }
}
@media (prefers-reduced-transparency:reduce), (prefers-contrast:more) {
  .glass { background:#313134; -webkit-backdrop-filter:none; backdrop-filter:none; }
}

.light-dial {
  --rail-height:147px;
  --icon-size:23px;
  --icon-gap:5px;
  position:fixed;
  z-index:3;
  top:50%;
  right:max(clamp(8px,2.4vw,28px),env(safe-area-inset-right));
  width:44px;
  transform:translateY(-50%);
  color:white;
  user-select:none;
  -webkit-user-select:none;
  -webkit-tap-highlight-color:transparent;
  touch-action:none;
}
.dial-face {
  position:relative;
  display:grid;
  justify-items:center;
  opacity:0;
  transform:translateX(58px);
  transition:opacity 300ms ease-in,transform 420ms cubic-bezier(.45,.02,.69,.2);
}
.light-dial[data-visible] .dial-face,
.light-dial:has(:focus-visible) .dial-face,
body[data-view="chosen"] .dial-face {
  opacity:1;
  transform:none;
  transition:opacity 170ms ease-out,transform 440ms cubic-bezier(.14,.84,.19,1);
}
@media (hover:hover) {
  .light-dial:hover .dial-face { opacity:1; transform:none; }
}
body:has(dialog[open]) .light-dial { visibility:hidden; }
.light-rail {
  position:relative;
  display:grid;
  justify-items:center;
  align-items:center;
  grid-template-rows:var(--icon-size) var(--rail-height) var(--icon-size);
  gap:var(--icon-gap);
  width:30px;
  pointer-events:none;
}
.rail-symbol { width:var(--icon-size); height:var(--icon-size); display:grid; place-items:center; position:relative; }
.rail-symbol,.dial-option svg { filter:drop-shadow(0 .8px .45px rgb(28 31 34 / .9)) drop-shadow(0 2px 3px rgb(30 35 38 / .3)); }
.rail-symbol svg,.dial-option svg {
  stroke:currentColor;
  stroke-width:1.45;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.rail-symbol svg { width:21px; height:21px; filter:drop-shadow(.45px -.6px .15px rgb(255 255 255 / .95)); }
.rail-sun svg {
  color:color-mix(in srgb,rgb(247 250 255 / .94),#ffe098 calc(82% * var(--sun-edge)));
  fill:rgb(255 222 147 / calc(.23 + var(--sun-edge) * .63));
}
.rail-moon svg {
  width:20px;
  height:20px;
  color:color-mix(in srgb,rgb(247 250 255 / .94),#c4e1ff calc(83% * var(--moon-edge)));
  fill:rgb(174 206 243 / calc(.2 + var(--moon-edge) * .65));
}
.light-rail.moonlit .rail-moon svg {
  filter:drop-shadow(.45px -.6px .15px rgb(255 255 255 / .95))
    drop-shadow(0 0 1.4px rgb(166 209 255 / calc(.92 * var(--moon-bloom))))
    drop-shadow(0 0 2.6px rgb(92 161 255 / calc(.55 * var(--moon-bloom))));
}
.rail-conduit {
  width:8px; height:100%; position:relative; overflow:hidden; border-radius:100px;
  background:linear-gradient(90deg,rgb(244 249 255 / .55),rgb(220 230 240 / .13) 23%,rgb(35 45 56 / .22) 58%,rgb(46 54 62 / .25) 72%,rgb(245 249 255 / .47));
  box-shadow:0 0 0 .65px #f8fbffa6,inset .4px .75px 1px #ffffffad,0 .5px 1px 1px #141b2373,0 2px 5px #10161c38;
  -webkit-backdrop-filter:blur(3px) saturate(.75);
  backdrop-filter:blur(3px) saturate(.75);
}
.rail-radiance {
  position:absolute; inset-inline:0;
  inset-block:calc(-.5 * var(--icon-size) - var(--icon-gap));
  background:radial-gradient(ellipse 7px 29px at 50% var(--rail-at),
    rgb(var(--rail-color)),rgb(var(--rail-color) / .92) 26%,rgb(var(--rail-color) / .66) 52%,
    rgb(var(--rail-color) / .21) 79%,rgb(var(--rail-color) / 0));
}
.rail-radiance::after {
  content:""; position:absolute; inset:0;
  background:radial-gradient(ellipse 3px 14px at 46% var(--rail-at),#fffdf6d4,#fffdf647 46%,transparent);
}
.rail-atmosphere { position:absolute; inset-block:calc(var(--icon-size) * .5); left:50%; width:1px; }
.rail-atmosphere::before,.rail-atmosphere::after {
  content:""; position:absolute; left:50%; width:36px; transform:translate(-50%,-50%);
}
.rail-atmosphere::before {
  top:var(--rail-at);
  height:calc(61px - 25px * (var(--sun-bloom) + var(--moon-bloom)));
  opacity:calc(1 - var(--sun-bloom) - var(--moon-bloom));
  background:radial-gradient(ellipse at center,rgb(var(--rail-color) / .64),rgb(var(--rail-color) / .33) 36%,rgb(var(--rail-color) / .09) 59%,transparent 74%);
  filter:blur(1.8px);
}
.rail-atmosphere::after {
  top:0; height:36px; opacity:var(--sun-bloom);
  background:radial-gradient(circle closest-side,#ffdd90d6,#ffcf6994 27%,#ffc45242 53%,#ffc04d14 74%,transparent);
}
.dial-slider {
  position:absolute; inset:0; width:100%; height:100%; margin:0;
  opacity:0; writing-mode:vertical-lr; direction:ltr; touch-action:none; cursor:ns-resize;
}
.dial-face:has(.dial-slider:focus-visible) .light-rail { outline:2px solid currentColor; outline-offset:2px; border-radius:16px; }
.dial-caption {
  position:absolute; right:calc(100% + 3px); top:50%; transform:translateY(-50%);
  padding:4px 8px; border-radius:12px; pointer-events:none; opacity:0;
  background:rgb(24 25 28 / .68); color:#fff; white-space:nowrap;
  font:500 .72rem/1.25 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.dial-face > .dial-caption { top:calc(var(--icon-size) * .5 + (100% - var(--icon-size)) * var(--rail-position)); }
.light-dial[data-identify] .dial-face > .dial-caption,
.light-dial:has(.dial-slider:focus-visible) .dial-face > .dial-caption,
.light-dial[data-identify] .dial-option[data-current=true] .dial-caption,
.dial-option:focus-visible .dial-caption { opacity:1; }
.dial-option {
  position:relative; width:44px; height:44px; padding:0; margin:0; border:0;
  border-radius:12px; background:transparent; display:grid; place-items:center;
  color:rgb(239 244 250 / .87); touch-action:none;
}
.dial-option svg {
  width:23px; height:23px; fill:rgb(223 231 243 / .22);
  filter:drop-shadow(.4px -.6px .2px #ffffffe3) drop-shadow(0 1px 1px #171c23bf);
  transition:transform 180ms ease-out;
}
.dial-option[data-current=true] svg {
  color:white; fill:rgb(244 240 222 / .56); transform:scale(1.13);
  filter:drop-shadow(.4px -.6px .2px white) drop-shadow(0 1px 1px #171c23bf) drop-shadow(0 0 4px #fff4d77a);
}
@media (max-width:540px) {
  .light-dial { --rail-height:132px; right:max(6px,env(safe-area-inset-right)); }
}
@media (prefers-reduced-motion:reduce) {
  .light-dial .dial-face,.light-dial .dial-option svg { transition:none; transform:none; }
}
@media (prefers-reduced-transparency:reduce),(prefers-contrast:more) {
  .rail-conduit { background:#393d44; backdrop-filter:none; }
  .dial-caption { background:#23242a; }
  .dial-option svg { fill:#454950; }
}
@media (forced-colors:active) {
  .rail-conduit { background:Canvas; border:1px solid CanvasText; }
  .rail-radiance { inset-block:0 auto; height:8px; top:clamp(0%,var(--rail-at),calc(100% - 8px)); background:Highlight; forced-color-adjust:none; }
  .dial-option[data-current=true] { outline:2px solid Highlight; }
  .dial-option svg,.rail-symbol svg { stroke:ButtonText; fill:Canvas; }
}
