/* Lock screen, the AI core, Talk (Jarvis mode), Settings → Looks. */

/* ---------- the core (core.js) ---------- */
.core { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.core canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.core-rings { position: absolute; inset: -6%; width: 112%; height: 112%; pointer-events: none; overflow: visible; }
.core-rings circle { fill: none; stroke: var(--a1); transform-origin: 50% 50%; transform-box: view-box; }
.core-rings .r1 { stroke-width: .6; stroke-dasharray: 2 6; opacity: .7; animation: spin calc(40s / max(var(--motion-k), .1)) linear infinite; }
.core-rings .r2 { stroke-width: 1.6; stroke-dasharray: 60 22 8 22; opacity: .55; animation: spin calc(18s / max(var(--motion-k), .1)) linear infinite reverse; }
.core-rings .r3 { stroke-width: .8; stroke-dasharray: 120 300; opacity: .9; animation: spin 7s linear infinite; filter: drop-shadow(0 0 calc(4px * var(--glow-k)) var(--a1)); }
.core-rings .ticks line { stroke: var(--a1); stroke-width: .8; opacity: .5; }
.core[data-state="listening"] .r3, .core[data-state="thinking"] .r3 { animation-duration: 1.4s; }
.core[data-state="speaking"] .r2 { animation-duration: 4s; }
.core[data-state="bad"] circle, .core[data-state="bad"] line { stroke: var(--bad); }
:root[data-motion="calm"] .core-rings circle { animation: none; }

/* ---------- lock screen ---------- */
.lock { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 12px; overflow: hidden;
  padding: calc(34px + env(safe-area-inset-top)) 16px calc(26px + env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--a2) 18%, var(--bg)), var(--bg) 70%);
  transition: opacity .7s, transform .9s cubic-bezier(.2, .8, .2, 1), filter .9s; }
.lock.gone { opacity: 0; transform: scale(1.25); filter: blur(10px); pointer-events: none; }
.lock > * { position: relative; z-index: 1; }
.lock > .aurora { position: absolute; z-index: 0; }
.lk-top { text-align: center; }
.lk-time { display: block; font: 600 clamp(54px, 13vw, 86px) / 1 var(--mono); letter-spacing: .02em; text-shadow: 0 0 calc(30px * var(--glow-k)) color-mix(in srgb, var(--a1) 55%, transparent); }
.lk-date { font: 500 13px var(--mono); color: var(--muted); letter-spacing: .2em; text-transform: uppercase; }
.lk-core { width: min(340px, 78vw, 44dvh); border: 0; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: width .4s cubic-bezier(.2, .8, .2, 1); display: block; margin: 0 auto; }
.lk-core.small { width: min(170px, 40vw, 22dvh); }
.lock.bad .lk-core { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.lock.calm .core canvas { opacity: .55; }
.lk-bottom { width: min(360px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.lk-prompt { font: 600 12px var(--mono); letter-spacing: .2em; color: var(--a1); text-transform: uppercase; min-height: 1.3em; text-shadow: 0 0 12px color-mix(in srgb, var(--a1) 60%, transparent); }
.lock.bad .lk-prompt { color: var(--bad); }
.lk-heard { min-height: 1.3em; color: var(--muted); font-style: italic; }
.lk-pin { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.lk-pips { display: flex; gap: 14px; justify-content: center; }
.lk-pips i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--a1); transition: .15s; }
.lk-pips i.on { background: var(--a1); box-shadow: 0 0 12px var(--a1); }
.lk-pad { display: grid; grid-template-columns: repeat(3, 66px); gap: 12px; }
.lk-pad button { height: 66px; border-radius: 50%; border: 1px solid var(--edge); background: color-mix(in srgb, var(--a1) 6%, transparent); font: 500 24px var(--mono); cursor: pointer; transition: background .12s, box-shadow .12s; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lk-pad button:active { background: color-mix(in srgb, var(--a1) 30%, transparent); box-shadow: var(--glow); }
.lk-granted { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; pointer-events: none; opacity: 0; text-align: center; }
.lk-granted b { display: block; font: 700 clamp(22px, 6vw, 40px) var(--mono); letter-spacing: .3em; color: var(--a3); text-shadow: 0 0 24px var(--a1), 0 0 60px var(--a1); }
.lk-granted small { font: 500 13px var(--mono); letter-spacing: .2em; color: var(--muted); }
.lock.ok .lk-granted { animation: flick 1.1s forwards; }
.lock.ok .lk-bottom, .lock.ok .lk-top { opacity: 0; transition: opacity .3s; }
@keyframes flick { 0% { opacity: 0; } 8% { opacity: 1; } 12% { opacity: .2; } 18% { opacity: 1; } 22% { opacity: .5; } 30%, 100% { opacity: 1; } }
@media (max-height: 700px) { .lk-pad { grid-template-columns: repeat(3, 58px); gap: 9px; } .lk-pad button { height: 58px; font-size: 21px; } .lock { padding-top: calc(18px + env(safe-area-inset-top)); } }
.sheet .lk-pad button { width: 66px; }
.sheet .lk-core { width: min(220px, 60vw); }

/* ---------- Talk ---------- */
.talk { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: calc(100dvh - 120px); }
.talk-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.talk-core { width: min(380px, 82vw, 46dvh); border: 0; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; margin-top: 4px; }
.talk-status { font: 600 12px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--a1); text-align: center; min-height: 1.3em; text-shadow: 0 0 12px color-mix(in srgb, var(--a1) 60%, transparent); }
.talk[data-state="error"] .talk-status { color: var(--bad); }
.talk-heard { min-height: 1.4em; color: var(--muted); font-style: italic; text-align: center; max-width: 600px; }
.talk-log { width: min(680px, 100%); max-height: 34dvh; }
.talk-confirm { width: min(680px, 100%); }
.talk-type { width: min(680px, 100%); margin-top: auto; }

/* ---------- Settings ---------- */
.set-sec > summary { display: flex; align-items: center; gap: 12px; }
.set-sec > summary::after { margin-left: auto; }
.set-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; background: color-mix(in srgb, var(--a1) 12%, transparent); border: 1px solid var(--edge-2); }
.set-body { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--edge-2); }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.look-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; border-radius: 14px; border: 1px solid var(--edge-2); background: color-mix(in srgb, var(--a1) 4%, transparent); cursor: pointer; text-align: left; min-width: 0; transition: border-color .2s, box-shadow .2s, transform .15s; }
.look-tile:hover { border-color: var(--a1); }
.look-tile.on { border-color: var(--a1); box-shadow: var(--glow); }
.look-tile .swatch { width: 100%; height: 38px; border-radius: 10px; }
.look-tile span.ellipsis { max-width: 100%; font-weight: 600; font-size: 13.5px; }
.swatch { display: inline-block; width: 38px; height: 38px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .15); }
.swatch.dyn { animation: hue 8s linear infinite; }
@keyframes hue { to { filter: hue-rotate(360deg); } }
.set-slider { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.set-toggle { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--edge-2); cursor: pointer; }
.set-toggle input { width: 44px; height: 26px; min-height: 0; flex: none; }
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.idea { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 10px; border-radius: 14px; border: 1px solid var(--edge-2); background: color-mix(in srgb, var(--a1) 4%, transparent); cursor: pointer; transition: .2s; }
.idea:hover { border-color: var(--a1); box-shadow: var(--glow); }
.idea-sw { height: 46px; border-radius: 10px; }
.made { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--a1); box-shadow: var(--glow); }
.made .swatch { width: 56px; height: 56px; }
.home-order li { padding: 8px 0; }
.home-order input[type="checkbox"] { width: 44px; height: 24px; min-height: 0; flex: none; }
.seg { flex-wrap: wrap; }

/* ---------- morning brief ---------- */
.brief { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.brief h1 { margin: 0; }
.brief-core { width: min(300px, 70vw, 38dvh); border: 0; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.brief-cards { width: min(760px, 100%); display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; text-align: left; }
.brief-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; animation: rise .45s ease both; }
.brief-ico { font-size: 24px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--a1) 12%, transparent); flex: none; }
.brief-text { width: min(760px, 100%); text-align: left; }
:root[data-motion="calm"] .brief-card { animation: none; }

.lk-greet { margin-top: 14px; font-size: 15px; color: var(--text); opacity: .85; text-shadow: 0 0 calc(14px * var(--glow-k)) color-mix(in srgb, var(--a1) 45%, transparent); animation: rise .6s ease both; }
