.patient-host {
  --p-line: #e5e4cf29;
  --p-muted: #bdc3b9;
  --p-surface: #111b1bc9;
  --p-cream: #f0e9d9;
  --p-accent: #e5ae8b;
  width:100%;flex:1;min-width:0;color:var(--p-cream);
  background:radial-gradient(100% 68% at 90% 16%,#55332782,transparent 74%),radial-gradient(82% 64% at 8% 67%,#203f4182,transparent 73%),linear-gradient(164deg,#111817,#0d1011 63%,#080e0f);
}
.patient-host[data-tab=anna]{background:radial-gradient(90% 70% at 84% 30%,#3d243562,transparent),linear-gradient(150deg,#171616,#090f10 90%);}
.patient-host[data-tab=night]{background:radial-gradient(90% 70% at 83% 38%,#322016 0%,transparent 78%),radial-gradient(85% 60% at 12% 70%,#102326,transparent 74%),#090c0d;}
.patient-main {width:min(100%,1040px);margin:0 auto;min-height:100svh;padding:clamp(18px,4vw,42px) clamp(18px,5.3vw,56px) calc(97px + env(safe-area-inset-bottom));}
.patient-app {min-height:100svh;position:relative;isolation:isolate;}
.p-head {margin:2px 0 clamp(18px,3.6vh,34px);}
.p-brand {display:inline-flex;align-items:center;gap:8px;min-height:30px;font-size:.83rem;color:#d3d4c8;font-weight:460;letter-spacing:.005em;}
.p-brand img {width:23px;height:23px;}.p-brand b {font-size:1.04rem;font-weight:590;letter-spacing:-.045em;color:#f2efe3;}.p-brand i {height:16px;width:1px;background:#c9cdba42;}
#night-root .p-head h1 {margin:15px 0 0;color:var(--p-cream);font:400 clamp(2.75rem,8vw,4.2rem)/1 var(--serif);letter-spacing:-.045em;}
.patient-nav {position:fixed;z-index:5;bottom:max(9px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:grid;grid-template-columns:repeat(5,1fr);width:min(calc(100% - 24px),535px);padding:4px;border:1px solid #e4dfcd3a;border-radius:99px;background:linear-gradient(120deg,#2a302cee,#2a2928e6);box-shadow:inset 0 1px 0 #f7f6e915,0 7px 36px #0008;backdrop-filter:blur(20px);}
.patient-nav[hidden] {display:none;}
#night-root .patient-nav button {display:grid;justify-items:center;align-content:center;gap:2px;min-width:0;min-height:49px;padding:4px 0;border-radius:40px;color:#bcbdb5;font-size:.69rem;font-weight:510;}
#night-root .patient-nav button[aria-current=page]{background:#0c1515dd;color:#f4ecdc;}
.p-home {display:flex;flex-direction:column;min-height:calc(100svh - 121px - env(safe-area-inset-bottom));}
.p-home-head,.p-active-night>header {display:flex;justify-content:space-between;align-items:center;gap:8px;}
.p-home-head>span:last-child {font-size:.8rem;color:#c8c4b9;}
.p-home-body {width:min(100%,435px);margin:0 auto;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:space-between;gap:clamp(12px,2.8svh,28px);padding-top:clamp(10px,2svh,22px);}
.p-home .mini-player {border-radius:17px;background:linear-gradient(115deg,#263a388f,#29292391);border-color:var(--p-line);}
.p-night-player {width:min(100%,435px);flex-shrink:0;}
#night-root .mini-player .mini-select {text-align:left;flex:1;min-width:0;min-height:44px;padding:2px 0;}
#night-root .p-home .mini-player .round-control {width:44px;}
.p-evening-time {width:100%;display:flex;flex-direction:column;align-items:center;text-align:center;padding:12px 0;}
#night-root .p-caption {font-size:.65rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:#d8c4ab;}
.p-evening-time .wake-wheels {margin:12px 0 0;}
#night-root .p-window {font-size:.92rem;color:var(--p-muted);margin-top:16px;}
.p-quiet-moon {display:grid;place-items:center;color:#e5cea9;margin:24px 0 8px;}
.p-quiet-title {font:400 2.5rem/1.15 var(--serif);}
.p-mode-strip,.p-periods {display:inline-flex;align-items:center;gap:3px;padding:3px;border-radius:28px;border:1px solid var(--p-line);background:#12202050;}
.p-mode-strip {margin-top:16px;}
#night-root .p-mode-strip button,#night-root .p-periods button {min-height:39px;padding:6px 13px;border-radius:26px;color:#c1c6bc;font-size:.82rem;}
#night-root .p-mode-strip [aria-pressed=true],#night-root .p-periods [aria-pressed=true] {background:#eeebe01c;color:#fff3df;box-shadow:inset 0 0 0 1px #e9dac523;}
.p-home-actions,.p-action-stack {width:min(100%,350px);display:grid;gap:9px;}
.p-home-actions {padding-bottom:8px;}
#night-root .p-primary,#night-root .p-secondary {min-height:49px;display:inline-flex;align-items:center;justify-content:center;gap:9px;border-radius:99px;padding:11px 20px;line-height:1.25;font-size:.97rem;font-weight:540;}
#night-root .p-primary{background:linear-gradient(115deg,#eaddc4,#f1e7d8 68%);border:1px solid #f3e8d7;color:#202c2b;box-shadow:0 5px 20px #0002;}
#night-root .p-secondary {border:1px solid #d6decb45;color:#eee8db;background:linear-gradient(110deg,#243b3b7a,#191e1b73 65%,#51362543);}
#night-root .p-inline {min-height:44px;color:#e9b893;text-align:left;text-underline-offset:3px;font-size:.87rem;}
#night-root .p-section-heading,.p-trends h2 {font-size:1.03rem;font-weight:530;letter-spacing:-.018em;margin:22px 0 10px;}
.p-columns {display:grid;gap:0 32px;}.p-columns>section {min-width:0;}
.p-metrics {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:6px 0 22px;}
.p-metric {display:grid;justify-items:start;align-content:start;gap:4px;padding:16px 13px 14px;border-bottom:1px solid var(--p-line);}
.p-metric:nth-child(odd){border-right:1px solid var(--p-line);padding-left:2px;}.p-metric:nth-child(n+3){border-bottom:0;}
.p-metric svg {color:#ddc4a2;margin-bottom:7px;}.p-metric strong{font:450 clamp(1.45rem,5.4vw,2.25rem)/1.15 var(--sans);letter-spacing:-.045em;}.p-metric span {font-size:.76rem;color:var(--p-muted);}
.p-group,.p-trends {overflow:hidden;border:1px solid var(--p-line);border-radius:18px;background:linear-gradient(115deg,#23302e75,#20221e68);}
#night-root .p-row,#night-root .p-setting-choice,.p-value-row {min-height:54px;width:100%;display:flex;align-items:center;gap:10px;padding:9px 13px;text-align:left;border-bottom:1px solid var(--p-line);font-size:.94rem;}
#night-root .p-row:last-child,#night-root .p-setting-choice:last-child,.p-value-row:last-child {border-bottom:0;}
.p-row>span:nth-child(2){flex:1;}.p-row>small,.p-value-row>span {color:var(--p-muted);}.p-row small {text-align:right;font-size:.76rem;}
.p-row>svg {color:#bebaa8;}.p-row-icon,.p-book-icon {display:grid;place-items:center;border-radius:12px;background:#d5d6bd11;color:#e4bd94;}
.p-row-icon {width:33px;height:33px;flex:none;}.p-value-row{justify-content:space-between;}.p-value-row b{font-weight:550;}
.p-setting-choice {justify-content:space-between;}.p-setting-choice[aria-pressed=true] svg {color:#ebba90;}
.p-empty {display:grid;justify-items:center;align-content:center;text-align:center;padding:38px 22px;margin:clamp(24px,8vh,86px) auto 0;max-width:430px;border:1px solid var(--p-line);border-radius:26px;background:linear-gradient(150deg,#283733a6,#20232358);}
.p-book-icon {width:60px;height:60px;margin-bottom:17px;border-radius:18px;}
.p-empty h2,.p-night-summary .p-summary-value,.p-trends .p-stat-number {font:400 2.9rem/1.07 var(--serif);letter-spacing:-.045em;}
#night-root .p-empty>p {max-width:30ch;color:var(--p-muted);margin:13px 0 22px;}
.p-date-select {display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:5px;color:var(--p-muted);margin-bottom:13px;font-size:.78rem;}
.p-date-select select {min-height:38px;background:#1b2422;color:var(--p-cream);border:1px solid var(--p-line);border-radius:20px;padding:3px 12px;font:.86rem var(--sans);width:100%;}
.p-night-summary {border:1px solid #e4cbb32d;border-radius:22px;padding:20px 22px 16px;margin-bottom:12px;background:radial-gradient(at 94% 30%,#85573d5c,transparent 65%),linear-gradient(150deg,#344b47,#242c2b);}
.p-source,.p-summary-times,.p-summary-times span {display:flex;align-items:center;gap:7px;}
.p-source {font-size:.75rem;color:#eee0ca;}.p-night-summary .p-summary-value {margin-top:14px;}
.p-night-summary>span:not(.p-source) {color:#c9cfc4;font-size:.82rem;}
.p-summary-times {justify-content:space-between;color:var(--p-cream);border-top:1px solid var(--p-line);padding-top:10px;margin-top:15px;font-size:.85rem;}
.p-notes,.p-trends {padding:16px;}.p-notes b{font-weight:550;}.p-notes>p {white-space:pre-line;overflow-wrap:anywhere;color:var(--p-muted);margin-top:6px!important;}.p-notes .p-inline {display:block;}
.p-levels,.p-bars {display:flex;height:96px;gap:2px;align-items:flex-end;border-bottom:1px solid #d9dbc841;margin-top:16px;}
.p-levels i {flex:1;height:var(--v);border-radius:3px 3px 0 0;background:#b8c9b2;}.p-levels i.gap{background:none;}
.p-chart-axis {display:flex;justify-content:space-between;color:var(--p-muted);font-size:.75rem;margin-top:4px;}
.p-clips {display:grid;gap:4px;margin-top:13px;}
#night-root .p-clips button {min-height:41px;display:flex;align-items:center;gap:8px;color:#dfcfb9;text-align:left;font-size:.82rem;}
.p-clip-player audio {width:100%;margin-top:6px;}.p-bottom-tools {display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;margin-top:18px;}
.p-periods {margin-bottom:18px;}.p-trends h2 {margin:0 0 8px;}.p-trends>p,.p-trends>small{color:var(--p-muted);}
#night-root .p-trends>p {margin:13px 0 17px;}
.p-bars {gap:5px;height:119px;margin:18px 0 24px;}.p-bars>div {height:100%;max-width:42px;flex:1;display:flex;align-items:center;justify-content:flex-end;flex-direction:column;position:relative;}
.p-bars i {width:62%;min-width:4px;background:linear-gradient(#e1ae86,#82a7a5);border-radius:5px 5px 0 0;}.p-bars small {position:absolute;bottom:-21px;font-size:.65rem;color:var(--p-muted);}
#night-root .p-page-message:not([hidden]) {margin:13px 0 0;font-size:.84rem;color:#d9c4a7;}.p-page-message[hidden]{display:none;}
.patient-dialog {width:min(450px,calc(100% - 20px));padding:21px;max-height:88svh;overflow:auto;overscroll-behavior:contain;border:1px solid #a4a38a55;border-radius:23px;color:var(--p-cream);background:linear-gradient(135deg,#233534,#232824 72%,#382b24);box-shadow:0 18px 75px #0008;color-scheme:dark;}
.patient-dialog::backdrop {background:#020606b3;backdrop-filter:blur(6px);}
.p-modal-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:13px;}
.p-modal-heading h2 {font:400 clamp(1.7rem,6vw,2.15rem)/1.12 var(--serif);letter-spacing:-.03em;}
.patient-dialog p {font-size:.93rem;line-height:1.48;}.patient-dialog p+p,.patient-dialog .p-action-stack {margin-top:12px!important;}
.p-dialog-hint,.p-form-lede,.p-muted {color:#c9cdc1;}
.p-form-error {color:#f1ba95;font-size:.82rem;}.p-form-error:empty{display:none;}.p-form-error button {display:block;}
.p-bedside {width:100%;height:clamp(125px,21svh,205px);border-radius:14px;object-fit:cover;display:block;margin-bottom:13px;}
.p-check {display:flex;align-items:center;min-height:43px;gap:9px;font-size:.83rem;color:#d7d9ce;}.p-check input {width:18px;height:18px;accent-color:#c9c2a6;}
.patient-dialog .p-action-stack {width:100%;}.p-week {padding-left:20px;}.p-week li {margin-bottom:10px;}.p-week b {font-weight:540;}.p-week p {color:var(--p-muted);}
.patient-host[data-tab=night] .patient-main {padding-bottom:max(24px,env(safe-area-inset-bottom));}
.p-active-night {min-height:calc(100svh - 121px);display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:12px;text-align:center;}
.p-active-night>header {width:100%;}.p-record-state {font-size:.72rem;color:#c3ccbb;}
.p-night-clock {margin-top:clamp(8px,3svh,26px); }.p-night-clock h1 {font:350 clamp(4.6rem,19vw,9rem)/1 var(--sans);letter-spacing:-.065em;color:#e1ded0;font-variant-numeric:tabular-nums;}
#night-root .p-night-clock p {display:inline-block;margin:13px 0 8px;padding:5px 13px;border:1px solid var(--p-line);border-radius:30px;font-size:.87rem;color:#d5cbb9;}
.p-night-clock small {display:block;color:var(--p-muted);font-size:.79rem;}
.p-signal {width:min(100%,560px);position:relative;}
.p-signal canvas {display:block;width:100%;height:clamp(94px,18svh,150px);}
.p-signal[data-listening=true] {background:radial-gradient(ellipse at 45% 50%,#88c6ae12,transparent 69%);}
.p-signal[data-listening=true] .p-signal-caption::before {content:"";display:inline-block;width:6px;height:6px;margin-right:8px;border-radius:50%;background:#9ccbbe;vertical-align:middle;}
.p-signal-caption {color:#aeb8ae;font-size:.74rem;}.p-night-end {display:grid;justify-items:center;gap:6px;}
#night-root .p-sensor-message {font-size:.83rem;color:#c8cbbd;max-width:40ch;}.p-night-end .p-secondary {min-width:175px;touch-action:pan-x;}.p-night-end .p-secondary svg {transform:rotate(180deg);}
.p-anna {min-height:calc(100svh - 121px - env(safe-area-inset-bottom));width:min(100%,630px);margin:0 auto;display:flex;flex-direction:column;gap:15px;}
.p-anna>header {display:flex;align-items:center;justify-content:space-between;}.p-anna h1 {font:520 1.29rem var(--sans);}
.p-anna-greeting {flex:1;display:grid;align-content:center;justify-items:center;text-align:center;padding:24px 0;}
.p-anna-greeting img {width:45px;height:45px;margin-bottom:13px;}.p-anna-greeting h2 {font:400 clamp(2.75rem,10vw,4.65rem)/1.1 var(--serif);letter-spacing:-.035em;}
#night-root .p-anna-greeting p {font-size:.89rem;color:var(--p-muted);margin-top:8px;}
.p-prompts {display:grid;justify-items:end;gap:7px;}
#night-root .p-prompts button,.p-bubble {max-width:90%;padding:10px 14px;border-radius:17px;background:#e5ddcb0e;border:1px solid #eee6ce17;text-align:left;font-size:.88rem;}
.p-prompts button {min-height:42px;}
.p-anna-form {display:flex;align-items:center;gap:9px;padding:6px 7px 6px 16px;border-radius:32px;border:1px solid var(--p-line);background:#b8ccb40e;}
#night-root .p-anna-form input {flex:1;width:0;background:transparent;border:0;color:inherit;min-height:40px;font-size:16px;}
#night-root .p-anna-form button {width:40px;height:40px;border-radius:50%;background:#d9d4c1;color:#20302d;font-size:1.3rem;}
.p-conversation {display:flex;flex-direction:column;gap:9px;flex:1;justify-content:flex-end;margin-top:14px;}
.p-bubble {white-space:pre-line;overflow-wrap:anywhere;}.p-bubble.user{align-self:flex-end;}.p-bubble.anna{align-self:flex-start;background:#28403c65;}.p-bubble b{display:block;color:#dcc3a2;font-size:.72rem;margin-bottom:3px;}
@media(min-width:760px){
  .patient-main {padding-top:clamp(28px,5svh,60px);padding-bottom:116px;}
  .p-columns {grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:30px;align-items:start;}
  .p-columns>section:last-child .p-section-heading:first-child {margin-top:0!important;}
  .p-home,.p-anna {min-height:calc(100svh - 165px);}.p-active-night {min-height:calc(100svh - 165px);}
  .patient-nav {padding:5px;bottom:18px;}.p-home-body {max-width:470px;}.p-head {margin-bottom:30px;}
}
@media(min-width:950px) and (min-aspect-ratio:6/5){
  .p-home-body {width:100%;max-width:880px;display:grid;grid-template-columns:1.1fr 1fr;gap:18px 72px;align-content:center;justify-content:stretch;}
  .p-home .p-evening-time {grid-column:1;grid-row:1/3;}.p-home .mini-player {grid-column:2;grid-row:1;}.p-home-actions{grid-column:2;}
}
@media(max-height:650px) and (max-width:749px){
 .p-home {min-height:calc(100svh - 94px);}.p-home .p-evening-time {padding:2px 0;}.p-home-body{gap:9px;}
 .p-home .wake-wheels{margin-top:3px;}.p-home .p-window{margin-top:6px!important;}.p-mode-strip{margin-top:5px;}
}

.p-wheel-home {width:min(100%,435px);margin:auto;align-items:center;gap:clamp(12px,2.5svh,24px);}
.p-wheel-home .mini-player {width:100%;}
.p-wheel-home .p-evening-time {flex:1;justify-content:center;}
.p-wheel-home .p-mode-strip {border:0;background:none;}
#night-root .p-wheel-home .p-mode-strip button {min-height:44px;font-size:.8rem;}
.p-bed-actions {display:grid;justify-items:center;gap:10px;}
#night-root .p-bed-actions .p-primary {min-width:154px;min-height:52px;color:#fff4e5;background:linear-gradient(130deg,#233936,#121515 60%,#39291f);border:1px solid #dfd8c54a;}
#night-root .p-bed-actions .p-secondary {min-height:44px;border:1px solid #d9dfd05c;background:#24302d;color:#e1e1d6;font-size:.86rem;}
.p-wake-date {display:grid;gap:12px;}
.p-wake-date input {font:inherit;color:inherit;color-scheme:dark;background:#16201f;border:1px solid var(--p-line);border-radius:12px;padding:12px;}
[data-night-date] {display:grid;gap:24px;}

.p-anna-pending {color:var(--p-muted);font-size:.78rem;line-height:1.45;}
#night-root .p-anna-form button:disabled {opacity:.45;}
#night-root .p-bubble.anna {align-self:stretch;max-width:100%;background:transparent;line-height:1.6;}

.p-profile-brand {margin-top:36px;padding-top:22px;border-top:1px solid var(--p-line);}
.p-active-night>header {justify-content:center;}
[data-insurance-form] {display:grid;gap:16px;}
[data-insurance-form] label {display:grid;gap:8px;font-size:1rem;}
[data-insurance-form] input {min-width:0;font:inherit;color:inherit;background:#16201f;border:1px solid var(--p-line);border-radius:12px;padding:12px;}
[data-insurance-form] button:disabled {opacity:.65;}
#night-root .p-profile-brand a {color:var(--p-muted);font-size:.85rem;text-decoration:underline;text-underline-offset:3px;}
#night-root .p-logout {width:100%;min-height:48px;padding:12px 14px;color:var(--p-cream);text-align:left;border-top:1px solid var(--p-line);}

.p-clip-card{display:grid;gap:.6rem;padding:.85rem 0;border-top:1px solid #ffffff24}
.p-clip-card label{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.p-clip-card select{font:inherit;border:1px solid #ffffff40;border-radius:.65rem;padding:.5rem;color:inherit;background:#192323;color-scheme:dark}
.p-clip-card small{color:#bac3bc}.p-clip-player:empty{display:none}.p-clip-player audio{max-width:100%}
