#notificationCenter{position:relative;flex:none}
.top-actions .notification-bell{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-height:40px;padding:10px;border:1px solid var(--line,#d8e3f3);border-radius:10px;background:#fff;color:#173454}
.top-actions .notification-bell svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.notification-bell>span{position:absolute;top:-4px;right:-4px;background:#b52a3a;color:#fff;border-radius:20px;font-size:10px;line-height:1;padding:3px 4px;border:2px solid white;pointer-events:none}
.notification-menu{position:absolute;right:0;top:calc(100% + 12px);width:min(390px,calc(100vw - 28px));max-height:75dvh;overflow:auto;overscroll-behavior:contain;background:white;color:#182c45;border:1px solid #d8e3f3;border-radius:20px;box-shadow:0 12px 45px #16334d26;padding:20px;z-index:1100;text-align:left}
.notification-menu-heading,.notification-menu-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.notification-menu h2{font-size:20px;margin:0}.notification-menu-actions{margin-top:14px;font-size:13px;color:#536780}
.notification-menu button{min-height:40px;border:1px solid #c9d9ee;background:#eff5fd;color:#174a8b;border-radius:10px;font:inherit;font-size:13px;padding:8px 12px}
.notice-item{padding:16px 0;border-bottom:1px solid #e5ebf4;overflow-wrap:anywhere}.notice-item>strong,.notice-item>time{display:block}.notice-item time{font-size:12px;color:#536780;margin-top:5px}.notice-item p{font-size:14px;line-height:1.5;margin:8px 0}.notice-item button{margin-top:4px}.notification-all{display:block;padding:16px 0 0;font-weight:700}
#notificationStatus:empty,#pushTestStatus:empty{display:none}#notificationStatus,#pushStatus,#pushTestStatus{font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.alerts-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;align-items:start}.alerts-settings-grid .card{padding:26px;min-width:0;margin:0}.alerts-settings-grid label{display:block;margin:18px 0 8px}.alerts-settings-grid input:not([type=checkbox]):not([type=radio]),.alerts-settings-grid select{width:100%;min-width:0}.alerts-settings-grid button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:44px}
.alert-settings-secondary{display:grid;gap:22px;min-width:0}.alert-preferences fieldset{min-width:0;margin:0;padding:0;border:0}.alert-mode legend{font-size:14px;font-weight:750;margin:12px 0}.alert-mode #id_enabled{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.alert-mode #id_enabled label{display:flex;align-items:center;gap:10px;min-height:52px;margin:0;padding:14px;border:2px solid #d3dfef;border-radius:12px;background:#f6f8fb;font-weight:750;cursor:pointer}.alert-mode #id_enabled input{width:20px;height:20px;min-height:20px;margin:0;flex:none;accent-color:#174a8b}.alert-mode label:has(input:checked){border-color:#174a8b!important;background:#eaf2fd!important;color:#174a8b}.alert-mode label:has(input:focus-visible){outline:3px solid #90b4e3;outline-offset:2px}.alert-mode-status{padding:12px 14px;border-radius:12px;background:#edf1f6;color:#35485f;font-weight:650;font-size:14px;line-height:1.5}.alert-preferences[data-state=enabled] .alert-mode-status{background:#e6f3ef;color:#175f4b}.alert-preferences #alertOptions:disabled{opacity:.5}.alert-preferences #alertSaveStatus{font-size:14px;color:#174a8b;margin:12px 0;overflow-wrap:anywhere}.alert-preferences #alertSaveStatus:empty{display:none}.alert-preferences [aria-invalid=true]{border:2px solid #a92336}.alert-save-help{font-size:12px}.sound-options{margin:18px 0}.sound-options summary{cursor:pointer;font-weight:700;padding:12px 0}.device-notification-status{border-top:1px solid #d8e3f3;margin-top:24px;padding-top:16px}.device-notification-status h3{font-size:18px}.alerts-settings-grid button[hidden],.glucose-alarm button[hidden]{display:none}
.check-label{display:flex!important;align-items:flex-start;gap:12px}.check-label input{width:22px;height:22px;flex:none;margin-top:2px}.threshold-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.threshold-grid label{min-width:0}
.volume-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px}.volume-heading label{margin:0}.volume-heading output{font-weight:750;color:#174a8b;font-variant-numeric:tabular-nums;flex:none}
.alerts-settings-grid input.volume-range{appearance:none;-webkit-appearance:none;display:block;width:100%;min-width:0;height:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;cursor:pointer;accent-color:#174a8b}
.volume-range::-webkit-slider-runnable-track{height:8px;background:#cbd9ec;border-radius:8px;border:0}.volume-range::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:24px;height:24px;margin-top:-8px;background:#174a8b;border:2px solid #fff;border-radius:50%;box-shadow:0 1px 5px #163b6555}
.volume-range::-moz-range-track{height:8px;background:#cbd9ec;border:0;border-radius:8px}.volume-range::-moz-range-thumb{width:20px;height:20px;background:#174a8b;border:2px solid #fff;border-radius:50%;box-shadow:0 1px 5px #163b6555}.volume-range:focus-visible{outline:3px solid #659ee2;outline-offset:2px}
.volume-labels{display:flex;justify-content:space-between;font-size:12px;color:#536780}.alerts-settings-grid #volumeHelp{font-size:13px;line-height:1.5;margin:12px 0 16px}.sound-test-status{font-size:13px;line-height:1.5}.sound-test-status:empty{display:none}.device-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.device-actions>button{flex:1 1 180px}.device-help{margin:16px 0}.device-help summary{cursor:pointer;color:#174a8b;font-weight:650;padding:10px 0}
.device-row{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:16px 0;border-top:1px solid #d8e3f3}.device-row>span{flex:1 1 180px;min-width:0;overflow-wrap:anywhere}.device-row>button{flex:none}.device-row small{display:block;color:#536780;margin-top:5px}
.notice-page-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}.notice-page-heading form{margin:0}.notice-tabs{display:flex;gap:8px;margin:18px 0}.notice-tabs a{padding:10px 18px;min-height:44px;border-radius:10px;text-decoration:none;color:#174a8b;background:#edf3fb}.notice-tabs a[aria-current=page]{background:#174a8b;color:#fff}.notice-list li{overflow-wrap:anywhere}.notice-list time,.notice-list small{display:block;font-size:13px;color:#526680;margin:8px 0}.notice-list form{margin-top:12px}
/* The dismissal action never sits below a scrollable alarm message. */
.glucose-alarm{box-sizing:border-box;width:min(460px,calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 32px));max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);margin:auto;border:2px solid #efb265;border-radius:22px;background:#fff9ef;color:#172c45;padding:0;text-align:center;box-shadow:0 20px 80px #0005;font-family:system-ui,sans-serif;overflow:hidden;overflow-wrap:anywhere}
.glucose-alarm[open]{display:grid;grid-template-rows:minmax(0,1fr) auto}
.glucose-alarm::backdrop{background:#07172ccc;backdrop-filter:blur(4px)}
.alarm-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:22px 24px 12px}
.alarm-heading{display:flex;align-items:center;justify-content:center;gap:10px}.alarm-symbol{display:grid;place-items:center;flex:none;width:32px;height:32px;background:#9c340b;color:#fff;border-radius:50%;font-weight:900;font-size:23px}
.glucose-alarm h2{font-size:22px;line-height:1.25;margin:0}.alarm-number{margin:16px 0 12px}.alarm-number strong{font-size:68px;line-height:1;font-weight:800}
.glucose-alarm p{font-size:14px;line-height:1.45;margin:10px 0}.glucose-alarm .alarm-number{margin:16px 0}.glucose-alarm .alarm-guidance{font-size:13px;color:#52617a}.glucose-alarm #alarmStatus{font-size:13px;min-height:0}.glucose-alarm #alarmStatus:empty{display:none}
.alarm-actions{display:flex;flex-direction:column;gap:10px;padding:12px 24px 22px;background:#fff9ef;border-top:1px solid #ecd9bf;min-width:0}
.glucose-alarm .primary-btn,.glucose-alarm .secondary-btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin:0;border-radius:12px;padding:12px;font:700 16px system-ui;line-height:1.3;white-space:normal;text-decoration:none}
.glucose-alarm .primary-btn{border:0;background:#174a8b;color:#fff}.glucose-alarm .secondary-btn{border:1px solid #b8cdeb;background:#fff;color:#174a8b}
.audio-recovery:focus-visible,[data-restore-audio]:focus-visible{outline:3px solid #6ea5ea;outline-offset:3px}[data-restore-audio][hidden]{display:none!important}
@media(orientation:landscape) and (max-height:550px){
 .glucose-alarm{width:min(700px,calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 32px));border-radius:18px}
 .glucose-alarm[open]{grid-template-columns:minmax(0,1.45fr) minmax(190px,1fr);grid-template-rows:minmax(0,1fr)}
 .alarm-content{padding:16px 20px}.alarm-actions{padding:16px;justify-content:flex-start;border-top:0;border-left:1px solid #ecd9bf;overflow-y:auto}
 .glucose-alarm h2{font-size:19px}.glucose-alarm .alarm-number{margin:10px 0}.alarm-number strong{font-size:58px}.glucose-alarm p{font-size:13px;margin:6px 0}.glucose-alarm .alarm-guidance{font-size:12px}
 .alarm-actions #acknowledgeAlarm{order:-1}
}
.notification-menu[hidden],.notification-bell>span[hidden]{display:none}
@media(max-width:900px){.alerts-settings-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.notification-menu{position:fixed;right:14px;top:76px;max-height:calc(100dvh - 100px)}.glucose-alarm{padding:0}.alerts-settings-grid .card{padding:20px}.threshold-grid{gap:12px}.threshold-grid label{font-size:14px}.alert-mode #id_enabled label{padding:10px;font-size:15px}}

/* Nighttime check: compact within the existing responsive alarm pane. */
.nighttime-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.nighttime-fields label{display:flex;flex-direction:column;gap:6px;min-width:0}
.nighttime-fields input{box-sizing:border-box;width:100%;min-width:0;padding:10px;border:1px solid #b9cde5;border-radius:10px}
.nighttime-settings form h3{margin-top:22px}
.nighttime-recommendation{padding:14px;border:1px solid #aac1de;border-radius:14px;background:#edf4ff;color:#193455;overflow-wrap:anywhere}
.nighttime-dose{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.nighttime-dose strong{font-size:clamp(24px,4vw,36px)}
.nighttime-recommendation p{margin:6px 0;font-size:.92rem}
.nighttime-recommendation a{display:inline-flex;margin-top:8px;white-space:normal}
.target-clock-hint{display:block;margin:6px 0;color:#395b82}
@media(max-width:420px){.nighttime-fields{grid-template-columns:minmax(0,1fr)}}
