/* Oriel — styles.css
   Pearl and cream, cold but not. The orb's own prism (amber, white, lilac, ice) is the only colour in the room.
   Atelier holds three worlds: Soul at dawn, Memory under aurora, Brain as a moon. */

:root {
  --air: #F3F3F1;
  --pearl: #FFFFFF;
  --glass: rgba(255, 255, 255, .62);
  --haze: #EAEAEE;
  --ink: #15161A;
  --ink-2: #3D3F46;
  --mute: #86888F;
  --line: rgba(21, 22, 26, .075);
  --star: #56507A;
  --bad: #9B3B2C;
  --lift: 0 18px 44px rgba(21, 22, 26, .07);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --serif: "Cormorant Garamond", "Cormorant", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Outfit", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --prism: linear-gradient(100deg, #F4B47A 0%, #FFF5E8 32%, #D5CBF8 64%, #A9CBF3 100%);
  --chrome: linear-gradient(100deg, #2a2b2e 0%, #676a70 20%, #dcdde1 38%, #45474c 54%, #a4a7ad 72%, #25262a 100%);
  --dawn: linear-gradient(100deg, #3f3136 0%, #8f7066 20%, #f0cf9c 38%, #6f5856 55%, #deb584 73%, #34282d 100%);
  --aurora: linear-gradient(100deg, #0c2a28 0%, #1d6656 20%, #a8efd3 38%, #164b43 55%, #5ec9a2 73%, #0a2321 100%);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--air);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--star); outline-offset: 2px; }
svg { width: 22px; height: 22px; display: block; flex: none; }

/* ---------------------------------------------------------------- the room */
.aura {
  position: fixed; inset: -20%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 55% 42% at 16% 6%, rgba(244, 180, 122, .16), transparent 60%),
    radial-gradient(ellipse 55% 45% at 94% 20%, rgba(213, 203, 248, .34), transparent 60%),
    radial-gradient(ellipse 60% 44% at 60% 96%, rgba(169, 203, 243, .24), transparent 60%),
    radial-gradient(ellipse 50% 40% at 40% 45%, rgba(255, 255, 255, .55), transparent 65%);
  filter: blur(8px);
  animation: drift 26s ease-in-out infinite alternate;
}
.veil {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- screens */
.screen {
  position: relative; z-index: 1;
  max-width: 460px; margin: 0 auto; min-height: 100dvh;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 20px calc(env(safe-area-inset-bottom, 0px) + 22px);
  display: flex; flex-direction: column;
}
.screen.arrive { animation: arrive .52s var(--ease) both; }
.stage { text-align: center; }
.stage > *:not(.mark-wrap) { position: relative; z-index: 1; }

.eyebrow { letter-spacing: .42em; text-transform: uppercase; font-size: 10px; color: var(--mute); }
.eyebrow.left { letter-spacing: .22em; text-align: left; }
.hint { color: var(--mute); font-size: 13.5px; line-height: 1.5; }
.hint.center { text-align: center; }
.flash { min-height: 20px; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.flash.bad { color: var(--bad); }
.section { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin: 22px 4px 8px; }
.lede { color: var(--mute); font-size: 14px; margin: 2px 2px 16px; }

/* ---------------------------------------------------------------- the orb */
.mark-wrap {
  position: relative; z-index: 0;
  margin: 26px auto 10px; width: 168px; height: 168px;
  animation: rise 1.2s ease both, float 7s ease-in-out 1.2s infinite;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.mark-wrap.sm { width: 124px; height: 124px; margin: 10px auto 6px; }
.mark { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: 0 30px 70px rgba(21, 22, 26, .10); }
.mark-wrap::before, .mark-wrap::after {
  content: ""; position: absolute; inset: -10%; border-radius: 50%;
  border: 1px solid rgba(176, 172, 196, .34); pointer-events: none;
  animation: ring 4.8s ease-out infinite;
}
.mark-wrap::after { animation-delay: 1.6s; inset: -18%; }
.orb-gl { position: absolute; left: 50%; top: 50%; width: 230%; height: 230%; transform: translate(-50%, -50%); pointer-events: none; display: none; }
.mark-wrap.gl { animation: rise 1.4s var(--ease) both; }
.mark-wrap.gl .orb-gl { display: block; }
.mark-wrap.gl .mark { visibility: hidden; }
.mark-wrap.gl::before, .mark-wrap.gl::after { display: none; }

.word {
  font-family: var(--serif); font-weight: 600; font-size: 66px; letter-spacing: -.03em; line-height: .95;
  background: var(--chrome); background-size: 260% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: metal 10s linear infinite;
}
.line { margin-top: 12px; color: var(--mute); font-weight: 300; letter-spacing: .02em; }

.metal { background-size: 260% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: metal 9s linear infinite; font-family: var(--serif); font-size: 25px !important; font-weight: 600 !important; letter-spacing: -.01em; }
.metal.dawn { background-image: var(--dawn); }
.metal.aurora { background-image: var(--aurora); }
.metal.silver { background-image: var(--chrome); }

/* ---------------------------------------------------------------- buttons */
.lux {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; border-radius: 999px; padding: 16px 20px;
  font-weight: 500; font-size: 15.5px; color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #efeff1);
  box-shadow: 0 14px 30px rgba(21, 22, 26, .09), inset 0 1px 0 #fff, inset 0 -1px 0 rgba(21, 22, 26, .05);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.lux span { position: relative; z-index: 1; }
.lux .g { width: 20px; height: 20px; position: relative; z-index: 1; }
.lux::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%);
  transform: translateX(-120%); animation: wash 3.8s ease-in-out infinite;
}
.lux:active { transform: scale(.985); }
.lux:disabled { opacity: .6; cursor: default; }
.lux.dim { background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.lux.dim::after { animation: none; }
.lux.ink { background: var(--ink); color: #F6F5F2; box-shadow: 0 14px 30px rgba(21, 22, 26, .18); }
.lux.ink::after { background: linear-gradient(105deg, transparent 30%, rgba(213, 203, 248, .22) 50%, transparent 70%); }
.quiet { justify-self: center; align-self: center; color: var(--ink-2); font-size: 15px; padding: 12px; text-decoration: underline; text-decoration-color: rgba(21, 22, 26, .2); text-underline-offset: 4px; }

/* ---------------------------------------------------------------- front door */
.door { justify-content: center; }
.door-hero .mark-wrap { margin-top: 18px; }
.door-actions { width: 100%; max-width: 360px; margin: 34px auto 0; display: grid; gap: 10px; }
.g-slot { display: flex; justify-content: center; min-height: 44px; }
.g-slot > .lux { width: 100%; }
.returning { display: grid; gap: 8px; }
.returning:empty { display: none; }
.local { display: grid; gap: 10px; }
.g-setup { display: grid; gap: 10px; padding: 16px; border-radius: 20px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); text-align: left; }
.g-setup .add .lux { padding: 13px 16px; }
.g-setup .flash:empty { display: none; }
input:focus-visible, textarea:focus-visible { outline: none; }
.origin { font-family: var(--mono); font-size: 13px; padding: 11px 14px; border-radius: 12px; background: var(--pearl); box-shadow: inset 0 0 0 1px var(--line); text-align: left; overflow-wrap: anywhere; color: var(--ink); }
.fine { text-align: center; color: var(--mute); font-size: 12px; margin-top: 12px; letter-spacing: .02em; }

/* ---------------------------------------------------------------- fields */
input, textarea {
  width: 100%; border: 0; border-radius: 18px; padding: 15px 17px;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line);
  outline: none; font-size: 16px; color: var(--ink);
  transition: box-shadow .3s var(--ease);
}
input:focus, textarea:focus { box-shadow: inset 0 0 0 1.5px rgba(86, 80, 122, .45); }
input::placeholder, textarea::placeholder { color: #A1A3A9; }
textarea { resize: none; line-height: 1.55; }
textarea.page { min-height: 52vh; padding: 18px; font-size: 15px; line-height: 1.65; background: var(--pearl); }
textarea.short { min-height: 128px; font-size: 15px; }
.file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- home */
.top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 25px; letter-spacing: -.01em; background: var(--chrome); background-size: 260% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: metal 10s linear infinite; }
.kept-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .03em; padding: 7px 13px 7px 11px; border-radius: 999px;
  background: var(--pearl); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line), 0 8px 20px rgba(21, 22, 26, .06);
}
.kept-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: conic-gradient(from 200deg, #F4B47A, #FFF5E8, #D5CBF8, #A9CBF3, #F4B47A); box-shadow: 0 0 8px rgba(213, 203, 248, .9); }
.home-core { margin-top: 5vh; }
.hello { font-family: var(--serif); font-size: 31px; font-weight: 500; letter-spacing: -.015em; color: var(--ink); margin-top: 6px; text-wrap: balance; }
.status { display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--mute); font-size: 13px; margin-top: 8px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: conic-gradient(from 200deg, #F4B47A, #FFF5E8, #D5CBF8, #A9CBF3, #F4B47A); box-shadow: 0 0 10px rgba(213, 203, 248, .95), 0 0 1px rgba(21, 22, 26, .35); }
.status i.live { animation: beat 1.4s ease-in-out infinite; }

.resume {
  margin-top: 26px; width: 100%; text-align: left;
  display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center;
  padding: 16px 16px 16px 18px; border-radius: 22px;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line), var(--lift);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: transform .35s var(--ease);
}
.resume:active { transform: scale(.99); }
.resume-k { grid-column: 1; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.resume-t { grid-column: 1; margin-top: 5px; font-size: 15px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resume-c { grid-column: 2; grid-row: 1 / span 2; color: var(--mute); width: 20px; height: 20px; }
.home-foot { margin-top: auto; padding-top: 24px; display: grid; gap: 10px; }
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.doors button { display: grid; place-items: center; gap: 5px; padding: 10px 4px 8px; border-radius: 16px; font-size: 12px; letter-spacing: .03em; color: var(--ink-2); transition: background .3s var(--ease); }
.doors button svg { color: var(--ink); opacity: .82; }
.doors button:active { background: rgba(255, 255, 255, .8); }

/* ---------------------------------------------------------------- composer */
.composer {
  display: flex; align-items: flex-end; gap: 6px;
  padding: 6px 6px 6px 16px; border-radius: 26px;
  background: var(--pearl); box-shadow: inset 0 0 0 1px var(--line), 0 16px 40px rgba(21, 22, 26, .08);
}
.composer textarea { flex: 1; min-height: 44px; max-height: 168px; padding: 11px 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 16px; line-height: 1.4; }
.composer textarea:focus { box-shadow: none; }
.orb { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--haze); color: var(--ink); flex: none; transition: transform .25s var(--ease); }
.orb svg { width: 20px; height: 20px; }
.orb:active { transform: scale(.92); }
.orb.ink { background: var(--ink); color: #F6F5F2; }
.orb.rec { background: var(--prism); background-size: 200% 100%; animation: beat 1.1s ease-in-out infinite, metal 3s linear infinite; }
.composer.docked { position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); margin-top: 12px; }
.chat::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 110px; pointer-events: none; z-index: -1;
  background: linear-gradient(180deg, rgba(243, 243, 241, 0), var(--air) 55%);
}

/* ---------------------------------------------------------------- bars */
.bar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 48px; margin-bottom: 8px; }
.bar.sticky {
  position: sticky; top: 0; z-index: 5;
  margin: calc(-10px - env(safe-area-inset-top, 0px)) -20px 6px; padding: calc(env(safe-area-inset-top, 0px) + 6px) 20px 6px;
  background: rgba(243, 243, 241, .9); backdrop-filter: saturate(1.3) blur(20px); -webkit-backdrop-filter: saturate(1.3) blur(20px);
  box-shadow: 0 1px 0 var(--line);
}
.bar-title { display: grid; justify-items: center; line-height: 1.2; min-width: 0; }
.bar-title strong { font-size: 16px; font-weight: 500; letter-spacing: .01em; }
.bar-title small { font-size: 11.5px; color: var(--mute); margin-top: 2px; }
.icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); transition: background .2s; }
.icon:active { background: rgba(21, 22, 26, .06); }
.icon-gap { width: 40px; }

/* ---------------------------------------------------------------- thread */
.chat .thread { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 12px 0 8px; }
.msg { animation: settle .45s var(--ease) both; }
.msg.me {
  align-self: flex-end; max-width: 84%;
  padding: 10px 15px; border-radius: 20px 20px 6px 20px;
  background: var(--haze); color: var(--ink); font-size: 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
  box-shadow: inset 0 0 0 1px rgba(21, 22, 26, .04);
}
.msg.her { font-size: 16.5px; line-height: 1.62; color: var(--ink); overflow-wrap: anywhere; }
.md p + p, .md p + ul, .md p + ol, .md ul + p, .md ol + p, .md .code + p, .md p + .code, .md h4 + p { margin-top: .7em; }
.md h4 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 1em 0 .35em; letter-spacing: -.01em; }
.md h4:first-child { margin-top: 0; }
.md ul, .md ol { padding-left: 1.25em; margin: .5em 0; }
.md li + li { margin-top: .3em; }
.md li::marker { color: var(--mute); }
.md strong { font-weight: 500; }
.md a { color: var(--star); text-decoration: underline; text-underline-offset: 3px; }
.md code { font-family: var(--mono); font-size: .86em; background: rgba(21, 22, 26, .055); padding: .1em .35em; border-radius: 6px; }
.md .code { margin: .8em 0; border-radius: 16px; background: #EFEFF1; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.md .code-bar { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px 7px 14px; font-size: 11.5px; color: var(--mute); letter-spacing: .06em; border-bottom: 1px solid var(--line); font-family: var(--mono); }
.md .code-bar .copy { font-family: var(--sans); font-size: 12px; padding: 4px 10px; border-radius: 999px; color: var(--ink-2); background: var(--pearl); box-shadow: inset 0 0 0 1px var(--line); }
.md pre { overflow-x: auto; padding: 12px 14px; }
.md pre code { background: none; padding: 0; font-size: 13px; line-height: 1.55; white-space: pre; }
.typing .dots { display: inline-flex; gap: 5px; padding: 8px 0; }
.typing .dots i { width: 7px; height: 7px; border-radius: 50%; background: conic-gradient(from 200deg, #F4B47A, #FFF5E8, #D5CBF8, #A9CBF3, #F4B47A); box-shadow: 0 0 6px rgba(213, 203, 248, .9); opacity: .4; animation: dot 1.2s ease-in-out infinite; }
.typing .dots i:nth-child(2) { animation-delay: .15s; }
.typing .dots i:nth-child(3) { animation-delay: .3s; }
.note { align-self: center; max-width: 92%; text-align: center; font-size: 12.5px; color: var(--ink-2); background: var(--pearl); box-shadow: inset 0 0 0 1px var(--line); padding: 7px 14px; border-radius: 999px; line-height: 1.4; }
.note.bad { color: var(--bad); background: rgba(155, 59, 44, .06); box-shadow: none; border-radius: 16px; }
.note button { font-size: 12.5px; color: inherit; text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }

/* ---------------------------------------------------------------- Atelier: three worlds */
.panels.three { display: grid; gap: 12px; margin-bottom: 18px; }
.silk {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-rows: auto auto 1fr auto; align-content: start;
  text-align: left; color: #fff; min-height: 150px; padding: 24px 24px 20px; border-radius: 30px;
  transform: translateZ(0);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
  box-shadow: 0 26px 50px -24px rgba(21, 22, 26, .55), 0 2px 8px rgba(21, 22, 26, .10);
}
.silk:active { transform: scale(.982); }
.silk-gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; border-radius: inherit; }
.silk em, .silk span, .silk .meta { position: relative; z-index: 3; display: block; }
.silk em { font-family: var(--serif); font-style: normal; font-size: 38px; font-weight: 500; letter-spacing: -.01em; line-height: 1; text-shadow: 0 1px 1px rgba(0, 0, 0, .18), 0 6px 26px rgba(0, 0, 0, .30); }
.silk span { margin-top: 8px; opacity: .88; font-size: 13px; letter-spacing: .05em; text-shadow: 0 1px 12px rgba(0, 0, 0, .40); }
.silk .meta { grid-row: 4; margin-top: 18px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; opacity: .62; }
/* a whisper of glass on top, and grain for the no-WebGL fallback */
.silk::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 38%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.silk::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.silk.gl::before { display: none; }
.silk.soul {
  background:
    radial-gradient(60% 55% at 58% 104%, rgba(255, 241, 220, .9), rgba(231, 181, 123, .55) 30%, transparent 62%),
    radial-gradient(90% 90% at 80% 150%, #6a5560 0%, transparent 70%),
    linear-gradient(170deg, #3a2f39, #231b25);
}
.silk.mem {
  background:
    radial-gradient(70% 70% at 50% 118%, rgba(69, 207, 157, .75), transparent 60%),
    radial-gradient(60% 50% at 30% 70%, rgba(22, 55, 58, .9), transparent 70%),
    linear-gradient(175deg, #07161a, #0f2a2d);
}
.silk.brain {
  background:
    radial-gradient(22% 55% at 96% 6%, rgba(255, 255, 255, .95), rgba(184, 195, 218, .6) 45%, transparent 70%),
    radial-gradient(60% 80% at 90% 10%, rgba(53, 57, 69, .9), transparent 70%),
    linear-gradient(170deg, #1a1d24, #0d0f14);
}

/* ---------------------------------------------------------------- grouped rows */
.group {
  border-radius: 20px; overflow: hidden;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  margin-bottom: 12px;
}
.group.inset { margin: 6px 0 10px; background: var(--pearl); }
.row {
  position: relative; width: 100%; text-align: left;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px;
  padding: 14px 16px; min-height: 52px; font-size: 15px; color: var(--ink);
  transition: background .25s var(--ease);
}
button.row:active, label.row:active { background: rgba(255, 255, 255, .6); }
.row + .row { box-shadow: 0 -1px 0 var(--line); }
.row > small { justify-self: end; color: var(--mute); font-size: 13px; text-align: right; }
.row input { padding: 0; background: transparent; box-shadow: none; text-align: right; color: var(--ink-2); font-size: 15px; border-radius: 0; min-width: 0; }
.row input:focus { box-shadow: none; color: var(--ink); }
.row.flat { padding: 12px 0; min-height: 0; }
.row.danger > span { color: var(--bad); }
#linkList .row { grid-template-columns: 1fr auto auto; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: rgba(21, 22, 26, .12); position: relative; transition: background .3s var(--ease); }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); transition: transform .3s var(--ease); }
.switch.on { background: var(--ink); }
.switch.on i { transform: translateX(18px); }
#linkList .row small { min-width: 46px; }

.confirm { padding: 16px; border-radius: 20px; background: var(--pearl); box-shadow: inset 0 0 0 1px var(--line), var(--lift); margin-bottom: 12px; display: grid; gap: 12px; }
.confirm p { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.confirm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.confirm-row .lux { padding: 13px 14px; }

/* ---------------------------------------------------------------- segments + lists */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 15px; background: rgba(21, 22, 26, .05); margin-bottom: 14px; }
.seg button { flex: 1; padding: 9px 6px; border-radius: 11px; font-size: 13.5px; color: var(--mute); transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease); white-space: nowrap; }
.seg button.on { background: var(--pearl); color: var(--ink); box-shadow: 0 2px 10px rgba(21, 22, 26, .08); }
.seg.dawn button.on { box-shadow: inset 0 -2px 0 #D9AE7C, 0 2px 10px rgba(80, 58, 50, .12); }
.seg.aurora button.on { box-shadow: inset 0 -2px 0 #3FB48A, 0 2px 10px rgba(16, 60, 52, .12); }
.pane { display: grid; gap: 12px; align-content: start; }

.rows { list-style: none; }
.rows li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: start; padding: 14px 2px; box-shadow: 0 1px 0 var(--line); }
.rows li p { font-size: 15px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.rows li p small { color: var(--mute); font-size: 12.5px; }
.rows li.empty { grid-template-columns: 1fr; color: var(--mute); font-size: 14px; box-shadow: none; padding: 18px 2px; }
.rows li.moment p { grid-column: 1; }
.rows li.moment p + p { margin-top: 6px; }
.rows li.moment .src { grid-column: 2; grid-row: 1; }
.rows li.moment .rm { grid-column: 3; grid-row: 1; }
.who { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 2px; }
.src { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; margin-top: 1px; white-space: nowrap; }
.src.you { background: var(--haze); color: var(--ink-2); }
.src.her { background: #F2EBE2; color: #6E5540; }
.src.builder { background: #ECEAF4; color: var(--star); }
.src.kind { background: rgba(21, 22, 26, .05); color: var(--mute); }
.rm { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--mute); transition: background .2s, color .2s; }
.rm svg { width: 16px; height: 16px; }
.rm:hover, .rm:active { background: rgba(21, 22, 26, .06); color: var(--ink); }
.rm.ok { color: var(--ink); }
.yn { display: flex; gap: 4px; }
.day { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin: 16px 2px 2px; }
.day:first-child { margin-top: 4px; }
.add { display: flex; gap: 8px; align-items: center; }
.add input { flex: 1; }
.add .lux { width: auto; padding: 14px 18px; flex: none; }

/* ---------------------------------------------------------------- cards (Brain) */
.card {
  display: grid; gap: 10px; padding: 18px; margin-bottom: 12px; border-radius: 22px;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card .lux { margin-top: 2px; }
.mind { background: linear-gradient(165deg, rgba(255, 255, 255, .95), rgba(236, 234, 244, .85)); box-shadow: inset 0 0 0 1px var(--line), var(--lift); }
.mind-name { font-family: var(--serif); font-size: 32px; font-weight: 600; letter-spacing: -.015em; line-height: 1.05; color: var(--ink); }
.mind-sub { font-size: 13px; color: var(--mute); line-height: 1.5; }
.chip { justify-self: start; font-size: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(155, 59, 44, .08); color: var(--bad); }
.chip.ok { display: inline-flex; align-items: center; gap: 7px; background: var(--pearl); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.chip.ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: conic-gradient(from 200deg, #F4B47A, #FFF5E8, #D5CBF8, #A9CBF3, #F4B47A); box-shadow: 0 0 8px rgba(213, 203, 248, .9); }
.kv { display: flex; justify-content: space-between; align-items: baseline; font-size: 14.5px; color: var(--ink-2); }
.kv strong { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 999px; background: rgba(21, 22, 26, .07); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--prism); transition: width .7s var(--ease); }
details.fold summary { list-style: none; font-size: 15px; font-weight: 500; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: ""; width: 9px; height: 9px; border-right: 1.6px solid var(--mute); border-bottom: 1.6px solid var(--mute); transform: rotate(45deg); transition: transform .35s var(--ease); margin-right: 4px; }
details.fold[open] summary::after { transform: rotate(-135deg); }

/* ---------------------------------------------------------------- blind test */
.jp { font-family: var(--serif); font-size: 21px; line-height: 1.3; }
.pair { display: grid; gap: 12px; margin-bottom: 6px; }
.answer { position: relative; text-align: left; padding: 18px; border-radius: 22px; background: var(--pearl); box-shadow: inset 0 0 0 1px var(--line), var(--lift); font-size: 15px; line-height: 1.55; transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.answer:active { transform: scale(.99); box-shadow: inset 0 0 0 1.5px var(--star), var(--lift); }
.answer .tag { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--haze); color: var(--ink-2); font-size: 12px; font-weight: 500; margin-bottom: 10px; font-family: var(--mono); }
.answer .md { max-height: 46vh; overflow: auto; }
#judgeDone { display: grid; gap: 10px; }

/* ---------------------------------------------------------------- desk + links */
.ask { font-family: var(--serif); font-size: 38px; font-weight: 500; letter-spacing: -.02em; line-height: 1.05; margin: 10px 0 8px; text-wrap: balance; }
#s-desk > .hint { margin-bottom: 14px; }
#s-desk .lux.ink { margin-top: 12px; }
.tasks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.task { text-align: left; padding: 16px; border-radius: 20px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; line-height: 1.35; color: var(--ink-2); min-height: 76px; transition: transform .3s var(--ease); }
.task:active { transform: scale(.98); }
#s-links > .hint { margin-bottom: 14px; }

/* ---------------------------------------------------------------- motion */
@keyframes drift { 0% { transform: translate3d(-3%, -2%, 0) scale(1); } 100% { transform: translate3d(4%, 3%, 0) scale(1.08); } }
@keyframes metal { to { background-position: 260% center; } }
@keyframes wash { 0% { transform: translateX(-120%); } 60%, 100% { transform: translateX(120%); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ring { 0% { transform: scale(.86); opacity: .45; } 100% { transform: scale(1.18); opacity: 0; } }
@keyframes beat { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .6; } }
@keyframes dot { 0%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes settle { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .word, .brand, .metal, .silk, .lux::after, .aura, .mark-wrap, .mark-wrap::before, .mark-wrap::after, .status i.live, .orb.rec, .typing .dots i, .screen.arrive, .msg { animation: none !important; }
}
@media (min-width: 720px) {
  .screen { padding-left: 24px; padding-right: 24px; }
}
