:root {
    --ink: #17202f;
    --muted: #667085;
    --line: #dde3ec;
    --paper: #f3f6fa;
    --white: #fff;
    --navy: #183f68;
    --navy-dark: #113454;
    --yes: #1f8f66;
    --no: #c84949;
    --app-background: #f3f6fa;
    --toolbar-background: #182d43;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--app-background); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: 72px 1fr;
    padding-bottom: 132px;
    background: var(--app-background);
}
.topbar {
    display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
    background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); position: relative; z-index: 4;
}
.brand, .top-actions { display: flex; align-items: center; gap: 12px; }
.brand { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.brand-logo { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; object-fit: cover; background: white; box-shadow: 0 5px 15px rgba(24,63,104,.16); }
.status-dot {
    margin-left: 7px; display: flex; gap: 7px; align-items: center; color: #5e6a78;
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
}
.status-dot span { width: 8px; height: 8px; border-radius: 50%; background: #26a875; box-shadow: 0 0 0 4px #e4f5ee; }
.version-badge { padding: 4px 8px; border-radius: 999px; background: #e8eef5; color: #526579; font-size: 11px; font-weight: 850; letter-spacing: .35px; }
.top-actions { gap: 9px; }
.icon-button {
    width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 14px; background: white;
    color: #435166; display: grid; place-items: center; font-size: 24px; cursor: pointer;
}
.icon-button:hover, .icon-button:focus-visible { background: #eaf1f8; border-color: #adc3d8; outline: 4px solid rgba(59,116,170,.16); }
.dwell-status { font-size: 13px; font-weight: 700; color: #526275; background: #edf2f7; padding: 9px 12px; border-radius: 999px; }

.workspace {
    width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 28px;
    min-height: 0; display: flex; flex-direction: column;
}
.mode-switch { align-self: center; display: flex; padding: 5px; gap: 5px; background: #e1e7ef; border-radius: 18px; margin-bottom: 22px; }
.mode-switch button {
    position: relative; overflow: hidden; min-width: 176px; min-height: 56px; border: 0; border-radius: 14px;
    display: flex; gap: 10px; align-items: center; justify-content: center; color: #536276; background: transparent;
    font-size: 16px; font-weight: 800; cursor: pointer;
}
.mode-switch button.active { color: var(--navy-dark); background: white; box-shadow: 0 3px 10px rgba(31,50,72,.1); }
.message-count-badge { min-width: 25px; height: 25px; padding: 0 7px; display:inline-grid; place-items:center; border-radius:999px; background:#c84949; color:white; font-size:12px; font-weight:900; }

.content-panel {
    flex: 1; background: rgba(255,255,255,.72); border: 1px solid #e2e7ee; border-radius: 28px;
    padding: 28px; box-shadow: 0 18px 45px rgba(37,55,77,.07);
}
.loading-state { min-height: 430px; display: grid; place-items: center; color: #66758a; font-size: 20px; font-weight: 700; }
.error-state { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.error-state strong { font-size: 25px; }
.error-state p { color: var(--muted); }
.error-state button { min-width: 150px; min-height: 54px; border: 0; border-radius: 14px; color: white; background: var(--navy); font-weight: 800; cursor: pointer; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.section-heading p, .modal-header p { margin: 0 0 6px; color: #6c7d91; font-size: 12px; font-weight: 900; letter-spacing: 1.7px; }
.section-heading h1 { margin: 0; color: var(--ink); font-size: clamp(28px,3vw,42px); line-height: 1.08; letter-spacing: -1.3px; }
.section-heading > span { color: var(--muted); font-size: 15px; font-weight: 700; padding-bottom: 5px; }
.category-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.category-card {
    --tone: #45688e; --tone-bg: #e8eff7;
    position: relative; overflow: hidden; min-height: 132px; padding: 21px; border: 2px solid transparent; border-radius: 22px;
    display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 17px; text-align: left;
    background: white; color: var(--ink); box-shadow: 0 8px 22px rgba(35,52,74,.07); cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.category-card:hover, .category-card:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(35,52,74,.13); border-color: var(--tone); outline: none; }
.category-icon {
    width: 64px; height: 64px; display: grid; place-items: center; border-radius: 19px;
    color: var(--tone); background: var(--tone-bg); font-size: 37px; font-weight: 800;
}
.category-copy { display: flex; flex-direction: column; gap: 8px; }
.category-copy strong { font-size: clamp(18px,1.6vw,23px); line-height: 1.15; letter-spacing: -.35px; }
.category-copy small { color: #6a7685; font-size: 14px; font-weight: 600; }
.category-arrow { color: #9aa6b5; font-size: 38px; font-weight: 300; }
.tone-orange { --tone: #c96934; --tone-bg: #fff0e6; }
.tone-green { --tone: #258267; --tone-bg: #e6f4ee; }
.tone-blue { --tone: #3475a7; --tone-bg: #e8f2fa; }
.tone-purple { --tone: #7458a4; --tone-bg: #f0ebf8; }
.tone-pink { --tone: #b55472; --tone-bg: #faeaf0; }
.tone-slate { --tone: #516a84; --tone-bg: #e9eef3; }
.keyboard-card { border-style: dashed; border-color: #cbd5df; box-shadow: none; }

.category-heading { justify-content: flex-start; align-items: center; }
.back-button {
    position: relative; overflow: hidden; min-width: 132px; min-height: 62px; border: 1px solid #cdd7e2; border-radius: 17px;
    background: white; color: #30475f; display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 800; cursor: pointer;
}
.back-button span { font-size: 26px; }
.phrase-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; }
.phrase-pager { display: grid; grid-template-columns: 82px minmax(0,1fr) 82px; align-items: stretch; gap: 14px; }
.phrase-page-arrow { position: relative; overflow: hidden; min-height: 112px; border: 2px solid #9fb8ce; border-radius: 22px; background: #e5eff7; color: #164d78; font-size: 49px; font-weight: 950; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(22,77,120,.13); }
.phrase-page-arrow:hover, .phrase-page-arrow:focus-visible { border-color: #276a9d; background: #d9eaf6; outline: 5px solid rgba(39,106,157,.15); }
.phrase-page-arrow:disabled { opacity: .25; cursor: default; box-shadow: none; }
.phrase-page-status { width: fit-content; margin: 13px auto 0; padding: 7px 15px; border-radius: 999px; background: #e9eff5; color: #51677a; font-size: 13px; font-weight: 850; }
.phrase-button {
    position: relative; overflow: hidden; min-height: 112px; padding: 20px 22px; border: 2px solid #dce4ec; border-radius: 20px;
    background: white; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 16px;
    text-align: left; font-size: clamp(19px,1.8vw,26px); line-height: 1.23; font-weight: 800; cursor: pointer;
}
.speaker-icon { flex: 0 0 auto; color: var(--navy); font-size: 18px; letter-spacing: -4px; }
.phrase-button:hover, .phrase-button:focus-visible { border-color: var(--navy); background: #f5f9fd; outline: 4px solid rgba(36,90,141,.13); }
.empty-category { grid-column: 1 / -1; min-height: 260px; display: grid; place-items: center; color: var(--muted); font-size: 18px; }

.keyboard-panel { padding: 24px; }
.keyboard-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,360px); gap: 20px; align-items: stretch; height: 100%; }
.keyboard-layout.has-predictions > .prediction-bar { grid-column: 1 / -1; margin: 0; }
.keyboard-input-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.message-composer.message-sidebar { display: flex; flex-direction: column; min-width: 0; min-height: 442px; margin: 0; padding: 16px; gap: 13px; border: 2px solid #c9d6e2; border-radius: 20px; background: #edf3f8; }
.message-sidebar-heading { display: flex; align-items: stretch; flex-direction: column; gap: 9px; }
.message-sidebar-heading > strong { color: #60758a; font-size: 12px; font-weight: 900; letter-spacing: 1.5px; }
.message-sidebar-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.paste-text { position: relative; overflow: hidden; min-width: 0; height: 62px; border: 2px solid #a9c3d8; border-radius: 16px; background: #e7f1f8; color: #174f7b; font-size: 18px; font-weight: 900; cursor: pointer; }
.paste-text span { margin-right: 5px; font-size: 25px; vertical-align: -2px; }
.paste-text:hover, .paste-text:focus-visible { border-color: #2f719f; background: #dcecf7; outline: 4px solid rgba(47,113,159,.15); }
.clear-text { position: relative; overflow: hidden; min-width: 160px; height: 66px; border: 2px solid #d8b8ba; border-radius: 16px; background: #fff4f4; color: #9b3f44; font-size: 20px; font-weight: 900; cursor: pointer; }
.message-sidebar-tools .clear-text { width: 100%; min-width: 0; height: 62px; font-size: 18px; }
.reply-context-banner { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 11px; border:2px solid #77a6c8; border-radius:14px; background:#dcecf7; color:#174f7b; }
.reply-context-banner span { display:flex; min-width:0; flex-direction:column; gap:2px; }
.reply-context-banner small { font-size:10px; font-weight:900; letter-spacing:1.2px; }
.reply-context-banner strong { overflow:hidden; font-size:19px; text-overflow:ellipsis; white-space:nowrap; }
.cancel-reply { flex:none; min-height:46px; padding:0 13px; border:1px solid #9ebbd0; border-radius:11px; background:white; color:#315d7d; font-weight:850; cursor:pointer; }
.clear-text span { font-size: 27px; vertical-align: -2px; margin-right: 5px; }
.clear-text:disabled { opacity: .4; cursor: default; }
.message-composer { display: grid; grid-template-columns: 1fr auto; gap: 14px; margin-bottom: 20px; }
.message-display {
    min-height: 98px; padding: 20px 24px; border: 2px solid #9bb5cd; border-radius: 19px; background: white;
    font-size: clamp(23px,2.3vw,34px); line-height: 1.3; font-weight: 700; box-shadow: inset 0 1px 4px rgba(30,54,80,.06);
}
.message-sidebar .message-display { flex: 1; min-height: 220px; max-height: 430px; padding: 18px; overflow-y: auto; overflow-wrap: anywhere; white-space: pre-wrap; font-size: clamp(17px,1.25vw,22px); line-height: 1.4; }
.message-sidebar .message-actions { min-height: 112px; gap: 10px; }
.message-sidebar .message-actions button { min-width: 0; border-radius: 18px; font-size: 16px; }
.message-sidebar .message-actions button span { font-size: 29px; }
.message-sidebar .message-actions .direct-reply-email { color:#174f7b; background:#e1f0fa; border-color:#8eb4d0; overflow-wrap:anywhere; }
.message-display.empty { color: #8b97a5; font-weight: 500; }
.message-actions { display: grid; grid-template-columns: repeat(3,minmax(90px,1fr)); gap: 8px; }
.message-actions button {
    position: relative; overflow: hidden; min-width: 100px; border: 1px solid #ccd7e2; border-radius: 17px; background: white;
    color: #3b4f64; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 800; cursor: pointer;
}
.message-actions button span { font-size: 23px; }
.message-actions .speak-button { color: white; background: var(--navy); border-color: var(--navy); }
.message-actions button:disabled { opacity: .4; cursor: default; }
.prediction-bar { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid #cddae5; border-radius: 16px; background: #eaf1f7; }
.prediction-label { color: #617589; font-size: 11px; font-weight: 900; letter-spacing: 1.2px; }
.prediction-buttons { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.prediction-button { position: relative; overflow: hidden; min-height: 60px; padding: 8px 10px; border: 2px solid #b6cada; border-radius: 13px; background: white; color: #173a59; font-size: clamp(17px,1.5vw,22px); font-weight: 850; cursor: pointer; }
.prediction-button:hover, .prediction-button:focus-visible { border-color: #2d6d9e; background: #f7fbff; outline: 3px solid rgba(45,109,158,.14); }
.keyboard { display: flex; flex: 1; flex-direction: column; gap: 8px; min-height: 0; }
.key-row { display: flex; flex: 1; justify-content: center; gap: 8px; min-height: 0; }
.key-row button {
    position: relative; overflow: hidden; flex: 1 1 0; max-width: 98px; min-width: 53px; min-height: 64px;
    border: 1px solid #cad4df; border-bottom-width: 4px; border-radius: 13px; background: white; color: #1f3043;
    font-size: clamp(18px,1.75vw,25px); font-weight: 900; cursor: pointer;
}
.key-row button:hover, .key-row button:focus-visible { background: #eaf2f9; border-color: #7898b5; outline: 3px solid rgba(40,97,151,.15); }
.key-row .space-key { max-width: 600px; }
.key-row .delete-key, .key-row .enter-key { max-width: 230px; display: flex; gap: 9px; align-items: center; justify-content: center; font-size: 16px; }
.key-row .delete-key { color: #993f43; background: #fff5f5; }
.key-row .enter-key { color: #174f7b; background: #eaf3fa; border-color: #aec4d6; }
.key-row .enter-key span { font-size: 24px; }

@media (min-width: 901px) {
    .workspace.keyboard-workspace { width: min(1680px, calc(100% - 48px)); }
    .keyboard-workspace .keyboard-layout { grid-template-columns: minmax(0,1fr) 340px; }
    .keyboard-workspace .keyboard-layout.has-predictions { grid-template-rows: auto minmax(0,1fr); }
    .keyboard-workspace .keyboard-layout.has-predictions > .keyboard-input-column,
    .keyboard-workspace .keyboard-layout.has-predictions > .message-sidebar { grid-row: 2; }
    .keyboard-workspace .key-row button { max-width: none; }
    .keyboard-workspace .key-row .space-key { max-width: none; flex-grow: 3.5; }
    .keyboard-workspace .key-row .delete-key,
    .keyboard-workspace .key-row .enter-key { max-width: none; flex-grow: 1.25; }
}

.calculator-panel { padding-bottom: 26px; }
.calculator-shell { width: min(1180px,100%); margin: 0 auto; }
.calculator-heading { align-items: center; margin-bottom: 15px; }
.calculator-clear { position: relative; overflow: hidden; min-width: 164px; min-height: 66px; padding: 0 18px; border: 2px solid #ddb9bb; border-radius: 16px; background: #fff3f3; color: #9a3d43; font-size: 19px; font-weight: 900; cursor: pointer; }
.calculator-clear span { margin-right: 6px; font-size: 27px; vertical-align: -2px; }
.calculator-display { min-height: 108px; margin-bottom: 14px; padding: 17px 24px; border: 2px solid #9bb5cd; border-radius: 20px; background: white; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; box-shadow: inset 0 1px 4px rgba(30,54,80,.06); overflow: hidden; }
.calculator-expression { min-height: 24px; color: #6c7d8e; font-size: 18px; font-weight: 750; }
.calculator-display strong { max-width: 100%; color: #152b41; font-size: clamp(44px,6vw,72px); line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calculator-body { display: grid; grid-template-columns: minmax(0,2fr) minmax(340px,.9fr); gap: 14px; }
.calculator-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.calculator-actions { display: grid; grid-template-columns: repeat(2,1fr); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 10px; }
.calculator-actions .calculator-key { min-height: 0; }
.calculator-key { position: relative; overflow: hidden; min-height: 64px; border: 1px solid #c8d4df; border-bottom-width: 4px; border-radius: 15px; background: white; color: #1b3045; font-size: clamp(25px,2.5vw,35px); font-weight: 900; cursor: pointer; }
.calculator-key:hover, .calculator-key:focus-visible, .calculator-clear:hover, .calculator-clear:focus-visible { border-color: #7898b5; background: #eef5fa; outline: 4px solid rgba(40,97,151,.15); }
.calculator-operator { background: #e8f0f7; color: #174b78; border-color: #aac0d3; }
.calculator-backspace { background: #fff4f4; color: #993f43; border-color: #ddbfc1; font-size: clamp(17px,1.8vw,23px); }
.calculator-copy { background: #e6f1f8; color: #174f7b; border-color: #a9c3d8; font-size: clamp(16px,1.65vw,21px); }
.calculator-copy:hover, .calculator-copy:focus-visible { background: #d9eaf5; color: #174f7b; }
.calculator-copy:disabled { opacity: .4; cursor: default; }
.calculator-speak { background: #183f68; color: white; border-color: #183f68; font-size: clamp(16px,1.65vw,21px); }
.calculator-speak:hover, .calculator-speak:focus-visible { background: #245b8d; color: white; }
.calculator-equals { background: #1f8f66; color: white; border-color: #177451; }
.calculator-equals:hover, .calculator-equals:focus-visible { background: #2aa979; color: white; }

.shortcuts-panel { padding-bottom: 28px; }
.shortcuts-heading { align-items: end; }
.shortcut-browser-note { margin:-7px 0 18px; padding:13px 16px; display:flex; align-items:center; gap:13px; border:2px solid #bcd1e2; border-radius:14px; background:#edf5fb; color:#284f70; }
.shortcut-browser-note > span { flex:0 0 48px; width:48px; height:48px; display:grid; place-items:center; border-radius:12px; background:#183f68; color:white; font-size:30px; font-weight:900; }
.shortcut-browser-note > div { display:flex; flex-direction:column; gap:4px; }
.shortcut-browser-note strong { font-size:17px; }
.shortcut-browser-note small { color:#526c82; font-size:14px; line-height:1.4; font-weight:700; }
.shortcut-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.shortcut-card { position: relative; overflow: hidden; min-height: 138px; padding: 21px; border: 2px solid #d7e1ea; border-radius: 22px; background: white; color: #172d43; display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 16px; text-decoration: none; box-shadow: 0 8px 22px rgba(35,52,74,.07); }
.shortcut-icon { width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; background: #e4f0f8; color: #1d5f91; font-size: 35px; font-weight: 900; }
.shortcut-copy { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.shortcut-copy strong { font-size: clamp(20px,1.8vw,27px); line-height: 1.12; }
.shortcut-copy small { overflow: hidden; color: #66798b; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.shortcut-arrow { color: #4d7799; font-size: 30px; font-weight: 900; }
.shortcut-card:hover, .shortcut-card:focus-visible { border-color: #2b6e9f; background: #f5faff; outline: 5px solid rgba(43,110,159,.14); }
.shortcut-empty { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #66778a; }
.shortcut-empty > span { width: 80px; height: 80px; margin-bottom: 20px; border-radius: 23px; display: grid; place-items: center; background: #e4eef6; color: #2c648d; font-size: 44px; }
.shortcut-empty strong { color: #22374b; font-size: 27px; }
.shortcut-empty p { margin: 9px 0 0; font-size: 17px; }

.messages-panel { padding-bottom: 28px; }
.messages-heading { align-items:center; }
.refresh-messages { position:relative; overflow:hidden; min-width:150px; min-height:58px; border:2px solid #a9bfd2; border-radius:15px; background:#e9f2f8; color:#1e577f; font-weight:900; cursor:pointer; }
.inbox-summary { margin:-8px 0 18px; padding:13px 16px; display:flex; align-items:center; gap:7px; border-radius:13px; background:#eaf1f7; color:#405d76; font-weight:750; }
.inbox-summary > strong { min-width:34px; height:34px; display:grid; place-items:center; border-radius:50%; background:#c84949; color:white; }
.inbox-summary a { margin-left:auto; color:#215d8a; font-weight:850; }
.message-inbox { display:flex; flex-direction:column; gap:16px; }
.message-table { overflow:hidden; border:2px solid #cfdae4; border-radius:18px; background:white; box-shadow:0 8px 22px rgba(35,52,74,.07); }
.message-table-header, .message-table-row { display:grid; grid-template-columns:minmax(150px,.75fr) minmax(185px,.85fr) minmax(280px,2fr) minmax(95px,.45fr); align-items:center; gap:14px; }
.message-table-header { min-height:54px; padding:0 18px; background:#183f68; color:white; font-size:12px; font-weight:900; letter-spacing:1px; text-transform:uppercase; }
.message-table-body { display:flex; flex-direction:column; }
.message-table-row { position:relative; overflow:hidden; width:100%; min-height:86px; padding:13px 18px; border:0; border-bottom:1px solid #dce4eb; background:white; color:#20364a; text-align:left; cursor:pointer; }
.message-table-row:last-child { border-bottom:0; }
.message-table-row.unread { background:#f0f7fc; }
.message-table-row:hover, .message-table-row:focus-visible { z-index:1; background:#e4f1fa; outline:4px solid #3e7fac; outline-offset:-4px; }
.message-table-name { display:flex; align-items:center; gap:11px; min-width:0; font-size:clamp(18px,1.7vw,24px); }
.message-table-name strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.message-table-row time { color:#607489; font-size:14px; font-weight:750; }
.message-table-summary { min-width:0; display:flex; align-items:center; gap:8px; overflow:hidden; font-size:clamp(16px,1.5vw,21px); font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.message-table-summary small { flex:none; padding:5px 8px; border-radius:8px; background:#e5edf4; color:#41627d; font-size:11px; font-weight:900; }
.message-table-status { display:flex; align-items:center; justify-content:flex-end; gap:10px; color:#617589; font-size:14px; font-weight:850; }
.message-table-row.unread .message-table-status { color:#176491; }
.message-table-status b { font-size:30px; font-weight:500; }
.message-detail-heading { align-items:center; justify-content:flex-start; }
.message-detail-heading time { margin-left:auto; color:#617589; font-size:14px; font-weight:750; }
.message-detail { padding:24px; }
.message-detail .inbox-message-text { padding-top:0; font-size:clamp(22px,2.4vw,32px); white-space:normal; }
.inbox-message { padding:20px; border:2px solid #d5e0e9; border-radius:19px; background:white; box-shadow:0 7px 18px rgba(32,52,72,.06); }
.inbox-message.unread { border-color:#4a83ae; background:#f5faff; box-shadow:0 9px 24px rgba(42,97,139,.12); }
.inbox-message > header { display:flex; align-items:center; justify-content:space-between; gap:15px; padding-bottom:13px; border-bottom:1px solid #e1e7ed; }
.inbox-message > header div { display:flex; align-items:center; gap:10px; }
.inbox-message > header strong { font-size:clamp(20px,2vw,27px); }
.inbox-message time { color:#64788a; font-size:14px; font-weight:700; }
.unread-dot { width:13px; height:13px; border-radius:50%; background:#2879b2; box-shadow:0 0 0 4px #dcecf7; }
.inbox-message.read .unread-dot { background:#aeb9c3; box-shadow:none; }
.inbox-message-text { padding:18px 2px; color:#24394d; font-size:clamp(20px,2.2vw,29px); line-height:1.48; overflow-wrap:anywhere; }
.message-image-link { margin:5px 0 15px; padding:12px; display:flex; flex-direction:column; gap:8px; border:2px solid #cfdae4; border-radius:16px; background:#f2f6f9; color:#255f8b; font-weight:850; text-decoration:none; }
.message-image-link img { width:auto; max-width:100%; max-height:420px; object-fit:contain; border-radius:11px; background:white; }
.message-image-gallery-preview { margin:5px 0 15px; padding:11px; display:grid; grid-template-columns:minmax(0,1fr) minmax(230px,360px); gap:11px; align-items:stretch; border:2px solid #cfdae4; border-radius:16px; background:#f2f6f9; }
.message-image-thumbnails { min-width:0; display:flex; gap:8px; overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:thin; }
.message-image-thumb { position:relative; overflow:hidden; flex:0 0 112px; width:112px; height:92px; min-height:92px; padding:0; border:2px solid #c6d4df; border-radius:11px; background:white; cursor:pointer; }
.message-image-thumb img { width:100%; height:100%; min-height:0; display:block; object-fit:cover; }
.message-image-thumb span { position:absolute; right:7px; bottom:7px; width:30px; height:30px; display:grid; place-items:center; border-radius:50%; background:rgba(16,42,67,.84); color:white; font-size:13px; font-weight:900; }
.message-image-thumb:hover, .message-image-thumb:focus-visible { border-color:#2d6d9e; outline:4px solid rgba(45,109,158,.16); }
.open-message-gallery { position:relative; overflow:hidden; min-height:92px; border:0; border-radius:11px; background:#183f68; color:white; font-size:17px; font-weight:900; cursor:pointer; }
.image-gallery-backdrop { position:fixed; inset:0; z-index:60; padding:18px; display:grid; place-items:center; background:rgba(7,20,33,.94); backdrop-filter:blur(7px); }
.image-gallery-shell { width:min(1500px,100%); height:min(920px,calc(100dvh - 36px)); display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; border:2px solid #526b80; background:#0f2436; color:white; box-shadow:0 24px 70px rgba(0,0,0,.45); }
.image-gallery-shell > header { min-height:84px; padding:12px 17px; display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:18px; border-bottom:1px solid #385064; background:#183247; }
.image-gallery-shell > header div { display:flex; min-width:0; flex-direction:column; gap:3px; }
.image-gallery-shell > header small { color:#9fb4c5; font-size:11px; font-weight:900; letter-spacing:1.4px; }
.image-gallery-shell > header strong { overflow:hidden; font-size:clamp(21px,2.2vw,30px); text-overflow:ellipsis; white-space:nowrap; }
.image-gallery-counter { color:#dce9f3; font-size:20px; font-weight:900; }
.gallery-close { width:62px; height:62px; border:2px solid #6e879a; background:#29465d; color:white; font-size:37px; line-height:1; cursor:pointer; }
.image-gallery-stage { min-height:0; display:grid; grid-template-columns:110px minmax(0,1fr) 110px; align-items:stretch; background:#071521; }
.image-gallery-stage img { width:100%; height:100%; min-height:0; object-fit:contain; background:#071521; }
.gallery-arrow { position:relative; overflow:hidden; border:0; background:#183247; color:white; font-size:62px; font-weight:500; cursor:pointer; }
.gallery-arrow:hover, .gallery-arrow:focus-visible, .gallery-close:hover, .gallery-close:focus-visible { background:#29658d; outline:4px solid #73b3dc; outline-offset:-4px; }
.image-gallery-shell > footer { min-height:84px; padding:11px 18px; display:flex; align-items:center; justify-content:center; gap:18px; border-top:1px solid #385064; background:#183247; }
.gallery-autoplay { min-width:260px; min-height:60px; border:2px solid #7fa6c2; background:#e8f2f8; color:#174f7b; font-size:19px; font-weight:900; cursor:pointer; }
.image-gallery-shell > footer span { color:#aebfcd; font-size:14px; font-weight:750; }
.message-audio { margin:5px 0 15px; padding:15px; display:flex; align-items:center; gap:17px; border-radius:15px; background:#edf3f8; }
.message-audio strong { white-space:nowrap; }
.play-message-audio { position:relative; overflow:hidden; min-width:170px; min-height:58px; border:0; border-radius:13px; background:#183f68; color:white; font-weight:900; cursor:pointer; }
.message-audio audio { width:100%; min-height:54px; }
.inbox-message > footer { display:grid; grid-template-columns:1fr 1fr; gap:11px; padding-top:14px; border-top:1px solid #e1e7ed; }
.inbox-message > footer.has-reply { grid-template-columns:1.35fr 1fr 1fr; }
.inbox-message > footer button { position:relative; overflow:hidden; min-height:62px; border:0; border-radius:14px; font-size:17px; font-weight:900; cursor:pointer; }
.message-read-toggle { background:#dcecf7; color:#155780; }
.message-reply { background:#1d6f9f; color:white; }
.message-delete { background:#fff0f0; color:#a13b41; }
.empty-inbox { min-height:360px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; color:#687b8d; }
.empty-inbox > span { width:82px; height:82px; margin-bottom:18px; display:grid; place-items:center; border-radius:24px; background:#e3edf5; color:#2a678f; font-size:42px; }
.empty-inbox strong { color:#243a4e; font-size:28px; }
.empty-inbox p { font-size:17px; }

.answer-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; min-height: 132px;
    padding: 0; background: var(--toolbar-background); box-shadow: 0 -8px 30px rgba(14,32,51,.18);
}
.answer-buttons { width: 100%; height: 132px; margin: 0; display: flex; gap: 6px; }
.answer-buttons button {
    position: relative; overflow: hidden; flex: 1 1 0; min-width: 0; border: 0; border-radius: 0; color: white; display: flex; align-items: center; justify-content: center; gap: 15px;
    font-size: clamp(20px,1.7vw,29px); font-weight: 950; letter-spacing: .35px; cursor: pointer; box-shadow: inset 0 -5px 0 rgba(0,0,0,.16), 0 4px 13px rgba(8,23,37,.18);
}
.answer-buttons button span { font-size: 38px; line-height: 1; }
.yes-button { background: var(--yes); }
.no-button { background: var(--no); }
.yes-button, .no-button { font-size: clamp(28px,2.3vw,39px) !important; }
.quick-call-button { padding: 10px 18px; flex-grow: 1.18 !important; flex-direction: column; gap: 3px !important; text-transform: uppercase; }
.quick-call-button .quick-call-caption { font-size: 11px; font-weight: 900; letter-spacing: 2px; opacity: .78; }
.quick-call-button strong { max-width: 100%; font: inherit; font-size: clamp(20px,1.8vw,30px); line-height: 1.05; overflow-wrap: anywhere; text-align: center; text-wrap: balance; }
.quick-call-one { background: #356f9f; }
.quick-call-two { background: #7458a4; }
.emergency-button { background: #e36a22; }
.answer-buttons .emergency-button { flex-grow: 1.28; gap: 14px; padding: 0 20px; font-size: clamp(22px,2vw,34px); line-height: 1.02; }
.answer-buttons .emergency-button > span { width: 43px; height: 43px; border: 4px solid white; border-radius: 50%; display: grid; place-items: center; font-size: 30px; }
.answer-buttons .emergency-button strong { font: inherit; }
.answer-buttons button:hover, .answer-buttons button:focus-visible { filter: brightness(1.08); outline: 5px solid rgba(255,255,255,.28); outline-offset: 2px; }

.dwelling::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: rgba(244,184,63,.25); border: 5px solid #f4b83f; animation: dwell var(--dwell-duration) linear forwards;
}
@keyframes dwell { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.announcement {
    position: fixed; inset: 0; z-index: 30; padding: 8vw; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(12,29,47,.97); color: white; text-align: center; cursor: pointer; animation: reveal .18s ease-out;
}
@keyframes reveal { from { opacity: 0; transform: scale(.98); } }
.sound-pulse { width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; color: #17344f; background: #bde8d7; box-shadow: 0 0 0 18px rgba(131,218,184,.12); margin-bottom: 40px; font-size: 35px; }
.announcement-text { max-width: 1150px; font-size: clamp(62px,9vw,150px); font-weight: 950; line-height: .98; letter-spacing: -3px; text-wrap: balance; }
.announcement-hint { position: absolute; bottom: 36px; color: #9db2c6; font-size: 15px; font-weight: 700; }

.modal-backdrop { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: rgba(13,29,46,.72); backdrop-filter: blur(5px); }
.exit-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 28px; background: rgba(10,25,41,.88); backdrop-filter: blur(8px); }
.exit-modal { width: min(780px,100%); padding: 42px; border-radius: 24px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.38); text-align: center; }
.exit-symbol { width: 86px; height: 86px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 50%; background: #e7f0f7; color: #164e79; font-size: 53px; font-weight: 950; }
.exit-modal > p { margin: 0 0 8px; color: #687b90; font-size: 13px; font-weight: 950; letter-spacing: 1.6px; }
.exit-modal h2 { margin: 0 0 13px; font-size: clamp(34px,5vw,55px); line-height: 1.03; }
.exit-modal > span { display: block; max-width: 610px; margin: 0 auto; color: #566b80; font-size: 18px; line-height: 1.5; }
.exit-actions { margin-top: 30px; display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.exit-actions button { position: relative; overflow: hidden; min-height: 92px; border: 0; border-radius: 15px; font-weight: 950; cursor: pointer; }
.stay-app-button { background: #1f8f66; color: white; font-size: clamp(24px,3vw,35px); }
.leave-app-button { background: #e7ebef; color: #4f6173; font-size: 18px; }
.exit-actions button:focus-visible { outline: 6px solid rgba(60,128,183,.3); outline-offset: 4px; }
.settings-modal { width: min(900px,100%); max-height: calc(100dvh - 48px); overflow: auto; background: #f7f9fb; border-radius: 25px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.settings-backdrop { padding: 0; place-items: stretch; background: #f2f5f8; backdrop-filter: none; }
.settings-backdrop .settings-modal { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; box-shadow: none; }
.settings-backdrop #settingsContent { width: min(1500px,100%); margin: 0 auto; padding-bottom: 30px; }
.modal-header { position: sticky; top: 0; z-index: 4; padding: 23px 26px; display: flex; align-items: center; justify-content: space-between; background: white; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 30px; letter-spacing: -.7px; }
.close-modal { width: 50px; height: 50px; border: 1px solid #d5dde5; border-radius: 14px; background: white; display: grid; place-items: center; font-size: 31px; cursor: pointer; }
.settings-tabs { position: sticky; top: 96px; z-index: 3; margin: 0 18px; padding: 12px 0; display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; background: #f7f9fb; box-shadow: 0 8px 15px rgba(38,57,78,.06); }
.settings-tabs button { min-height: 58px; border: 1px solid #d7e0e8; border-radius: 11px; background: white; color: #53677b; display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 850; cursor: pointer; }
.settings-tabs button.active { border-color: #183f68; background: #183f68; color: white; box-shadow: 0 5px 12px rgba(24,63,104,.2); }
.settings-tabs button:focus-visible { outline: 4px solid rgba(45,109,158,.2); outline-offset: 2px; }
.settings-preferences-form { display: contents; }
.settings-section { margin: 18px; padding: 22px; background: white; border: 1px solid #dfe5eb; border-radius: 18px; }
.settings-section h3 { margin: 0 0 17px; font-size: 18px; }
.settings-section > p { color: var(--muted); line-height: 1.55; }
.setting-row, .toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 12px 0; }
.setting-row > span, .toggle-row > span { display: flex; flex-direction: column; gap: 5px; }
.setting-row small, .toggle-row small { color: var(--muted); }
.setting-row select, .setting-row input, .add-row input, .pin-form input {
    min-height: 48px; border: 1px solid #cbd5df; border-radius: 12px; background: white; padding: 0 13px; color: #26384a;
}
.color-picker-wrap { display: flex; align-items: center; gap: 12px; }
.setting-row .app-color-picker { width: 74px; height: 48px; padding: 4px; border-radius: 12px; cursor: pointer; }
.color-picker-wrap output { min-width: 82px; color: #526579; font-size: 14px; font-weight: 850; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.quick-call-settings { margin: 10px 0; padding: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border: 1px solid #d9e2ea; border-radius: 13px; background: #f7f9fb; }
.quick-call-settings > div { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 5px; }
.quick-call-settings small { color: var(--muted); }
.quick-call-settings label { display: flex; flex-direction: column; gap: 7px; color: #374b60; font-size: 13px; font-weight: 800; }
.quick-call-settings input { min-height: 48px; border: 1px solid #cbd5df; border-radius: 11px; background: white; padding: 0 12px; color: #26384a; font: inherit; }
.setting-stack { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; }
.setting-stack > span { display: flex; flex-direction: column; gap: 5px; }
.setting-stack small { color: var(--muted); }
.setting-stack textarea { width: 100%; min-height: 145px; resize: vertical; border: 1px solid #cbd5df; border-radius: 12px; background: white; padding: 12px; color: #26384a; line-height: 1.45; }
.predictive-entry-count { align-self: flex-end; color: var(--muted); font-weight: 750; }
.predictive-entry-count.over-limit { color: #a13c42; }
.toggle-row input { width: 27px; height: 27px; accent-color: var(--navy); }
.save-settings, .pin-form button { min-height: 48px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--navy); color: white; font-weight: 800; cursor: pointer; }
.add-row { display: flex; gap: 9px; }
.add-row input { flex: 1; min-width: 0; }
.add-row button { min-height: 48px; border: 0; border-radius: 12px; padding: 0 16px; background: var(--navy); color: white; font-weight: 800; cursor: pointer; }
.category-editor-list { display: flex; flex-direction: column; gap: 13px; margin-top: 18px; }
.category-editor { border: 1px solid #dce3ea; border-radius: 14px; padding: 15px; background: #fbfcfd; }
.editor-title { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; margin-bottom: 12px; }
.editor-title input, .phrase-editor input { min-height: 42px; border: 1px solid #cbd5df; border-radius: 10px; padding: 0 11px; min-width: 0; }
.editor-title > div { display: flex; gap: 6px; }
.editor-title button, .phrase-editor button { min-width: 58px; border: 0; border-radius: 9px; padding: 0 10px; background: #e5edf5; color: #2c506f; font-weight: 750; cursor: pointer; }
.editor-title .danger-link, .phrase-editor .danger-link { background: #fff0f0; color: #9c3f43; }
.phrase-editor-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.phrase-editor { display: grid; grid-template-columns: 38px 1fr auto 42px; gap: 7px; }
.drag-instructions { margin-top: -5px; padding: 10px 12px; border-radius: 10px; background: #eef4f9; color: #47627a !important; }
.drag-handle { min-width: 0 !important; width: 100%; padding: 0 !important; border: 1px solid #c7d4df !important; background: #edf2f6 !important; color: #526a7e !important; font-size: 22px; letter-spacing: -5px; cursor: grab !important; touch-action: none; }
.drag-handle:active { cursor: grabbing !important; }
.category-editor.dragging, .phrase-editor.dragging, .web-shortcut-editor.dragging { opacity: .48; outline: 2px dashed #2f6d9f; outline-offset: 3px; }
.category-editor-list, .phrase-editor-list, .web-shortcut-list { min-height: 8px; }
.add-row.compact input, .add-row.compact button { min-height: 42px; }
.security-settings { margin-bottom: 25px; }
.logout-button { margin-top: 15px; border: 0; background: transparent; color: #6d4a33; font-weight: 750; cursor: pointer; }
.pin-form { display: flex; align-items: end; gap: 10px; }
.pin-form label { flex: 1; display: flex; flex-direction: column; gap: 7px; font-weight: 750; }
.inline-error, .settings-message, .install-errors { padding: 12px 15px; border-radius: 11px; background: #fff0f0; color: #933e43; margin: 12px 0; font-weight: 700; }
.settings-message { margin: 18px; background: #e5f5ee; color: #287357; }
.settings-loading { min-height: 300px; display: grid; place-items: center; color: var(--muted); font-weight: 750; }
.voice-test-button { min-height: 45px; margin: 6px 0 12px; padding: 0 15px; border: 1px solid #b8cadd; border-radius: 11px; background: #eef4f9; color: #234e74; font-weight: 800; cursor: pointer; }
.desktop-install-card { margin: 12px 0 18px; padding: 17px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 11px 20px; align-items: center; border: 1px solid #bcd1e2; border-radius: 14px; background: #edf5fb; }
.desktop-install-card > div { display: flex; flex-direction: column; gap: 5px; }
.desktop-install-card small { color: var(--muted); }
.desktop-install-card button { min-width: 185px; min-height: 50px; padding: 0 17px; border: 0; border-radius: 11px; background: #1b6594; color: white; font-weight: 850; cursor: pointer; }
.desktop-install-card button:disabled { background: #d6e6df; color: #276e54; cursor: default; }
.desktop-install-card p { grid-column: 1 / -1; margin: 0; padding: 11px 13px; border-radius: 10px; background: white; color: #425c74; line-height: 1.45; transition: box-shadow .2s, background .2s; }
.desktop-install-card p.highlight { background: #fff5cd; box-shadow: 0 0 0 4px rgba(219,164,33,.22); }
.email-settings-section > p, .settings-section > p { color: var(--muted); line-height: 1.55; }
.smtp-form { border: 1px solid #dce4ec; border-radius: 14px; padding: 15px; background: #fbfcfd; }
.smtp-grid { display: grid; grid-template-columns: 2fr .7fr 1fr; gap: 12px; margin-bottom: 14px; }
.smtp-grid label { display: flex; flex-direction: column; gap: 6px; color: #3d4e60; font-size: 13px; font-weight: 750; }
.smtp-grid input, .smtp-grid select, .smtp-test-form input, .add-contact-form input, .email-contact-editor input {
    min-height: 44px; min-width: 0; border: 1px solid #c8d4df; border-radius: 10px; background: white; padding: 0 11px; color: #26384a;
}
.smtp-grid .wide-field { grid-column: span 2; }
.smtp-test-form { display: flex; gap: 9px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e2e7ec; }
.smtp-test-form input { flex: 1; }
.smtp-test-form button, .add-contact-form button { min-height: 44px; border: 0; border-radius: 10px; padding: 0 15px; background: #257457; color: white; font-weight: 800; cursor: pointer; }
.email-contact-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 13px; }
.email-contact-editor { display: grid; grid-template-columns: .75fr 1.25fr auto 42px; gap: 7px; }
.email-contact-editor button { border: 0; border-radius: 9px; padding: 0 11px; background: #e5edf5; color: #2c506f; font-weight: 750; cursor: pointer; }
.email-contact-editor .danger-link { background: #fff0f0; color: #9c3f43; font-size: 20px; }
.email-contact-editor.family-managed-contact input { background:#f2f5f8; color:#53697c; }
.family-managed-badge { min-height:46px; padding:0 13px; display:grid; place-items:center; border-radius:9px; background:#dcecf7; color:#155780; font-weight:850; }
.family-managed-lock { min-height:46px; display:grid; place-items:center; border-radius:9px; background:#eef3f7; font-size:19px; }
.add-contact-form { display: grid; grid-template-columns: .75fr 1.25fr auto; gap: 8px; }
.empty-contact-list { padding: 15px; border-radius: 10px; background: #f2f5f8; color: var(--muted); }
.web-shortcut-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 13px; }
.web-shortcut-editor { display: grid; grid-template-columns: 42px .7fr 1.6fr auto 42px; gap: 7px; }
.web-shortcut-editor input, .add-shortcut-form input { min-height: 44px; min-width: 0; border: 1px solid #c8d4df; border-radius: 10px; background: white; padding: 0 11px; color: #26384a; }
.web-shortcut-editor button { border: 0; border-radius: 9px; padding: 0 11px; background: #e5edf5; color: #2c506f; font-weight: 750; cursor: pointer; }
.web-shortcut-editor .danger-link { background: #fff0f0; color: #9c3f43; font-size: 20px; }
.add-shortcut-form { display: grid; grid-template-columns: .7fr 1.6fr auto; gap: 8px; }
.add-shortcut-form button { min-height: 44px; border: 0; border-radius: 10px; padding: 0 15px; background: #257457; color: white; font-weight: 800; cursor: pointer; }
.pinned-predictions { margin:10px 0; padding:14px; border:1px solid #bcd1e2; border-radius:14px; background:#edf5fb; }
.family-member-list { display:flex; flex-direction:column; gap:9px; margin:17px 0; }
.family-member-editor { display:grid; grid-template-columns:1fr 1.2fr .9fr auto auto 42px; gap:8px; }
.family-member-editor > input, .add-family-form input { min-height:46px; min-width:0; border:1px solid #c8d4df; border-radius:10px; padding:0 11px; color:#26384a; background:white; }
.family-active-toggle { min-height:46px; padding:0 10px; display:flex; align-items:center; gap:7px; border:1px solid #d5dfe7; border-radius:10px; background:#f6f9fb; color:#4d6275; font-size:13px; font-weight:800; }
.family-active-toggle input { width:21px; height:21px; accent-color:#1f8f66; }
.family-member-editor button { border:0; border-radius:9px; padding:0 13px; background:#e5edf5; color:#2c506f; font-weight:800; cursor:pointer; }
.family-member-editor .danger-link { background:#fff0f0; color:#9c3f43; font-size:20px; }
.add-family-form { display:grid; grid-template-columns:1fr 1.2fr 1fr auto; gap:8px; }
.add-family-form button { min-height:46px; border:0; border-radius:10px; padding:0 15px; background:#257457; color:white; font-weight:850; cursor:pointer; }
.family-settings-panel a { color:#205f8c; font-weight:850; }

.email-modal { width: min(860px,100%); max-height: calc(100dvh - 48px); overflow: auto; background: #f7f9fb; border-radius: 25px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.email-modal-header { padding: 23px 26px; display: flex; align-items: center; justify-content: space-between; background: white; border-bottom: 1px solid var(--line); }
.email-modal-header p { margin: 0 0 6px; color: #6c7d91; font-size: 12px; font-weight: 900; letter-spacing: 1.7px; }
.email-modal-header h2 { margin: 0; font-size: clamp(26px,3vw,38px); letter-spacing: -.8px; }
.email-message-preview { margin: 20px 22px 8px; padding: 18px 20px; border: 2px solid #b4c8da; border-radius: 15px; background: white; color: #28394b; font-size: clamp(19px,2vw,27px); font-weight: 750; line-height: 1.35; }
.recipient-grid { padding: 14px 22px 24px; display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.recipient-button {
    position: relative; overflow: hidden; min-height: 104px; padding: 18px; border: 2px solid #ccdae6; border-radius: 18px; background: white; color: #17354f;
    display: flex; align-items: center; justify-content: center; gap: 14px; font-size: clamp(20px,2.2vw,29px); cursor: pointer;
}
.recipient-button > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: #e5f0f8; color: #215b88; font-size: 27px; }
.recipient-button:hover, .recipient-button:focus-visible { border-color: #2c6d9f; background: #f4f9fd; outline: 4px solid rgba(44,109,159,.15); }
.no-recipients { grid-column: 1 / -1; min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 25px; color: var(--muted); }
.no-recipients strong { color: var(--ink); font-size: 24px; }
.email-status { margin: 0 22px 24px; padding: 16px; border-radius: 13px; text-align: center; font-weight: 800; }
.email-status.sending { background: #eef4f9; color: #345d80; }
.email-status.failed { background: #fff0f0; color: #963f44; }
.email-status.sent { background: #e2f4eb; color: #216b4f; }
.large-text .category-copy strong { font-size: 26px; }
.large-text .phrase-button { font-size: 30px; }
.large-text .key-row button { font-size: 29px; }

/* Installer */
.installer-page { min-height: 100dvh; padding: 36px 18px; display: grid; place-items: center; background: radial-gradient(circle at top left,#e5eef7,transparent 40rem),#f3f6fa; }
.installer-card { width: min(840px,100%); background: white; border: 1px solid #dfe6ee; border-radius: 25px; box-shadow: 0 25px 70px rgba(31,50,72,.12); overflow: hidden; }
.installer-brand { padding: 24px 28px; display: flex; align-items: center; gap: 15px; background: #183f68; color: white; }
.installer-brand > span { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.13); font-size: 27px; }
.installer-brand small { color: #b9ccdd; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; }
.installer-brand h1 { margin: 4px 0 0; font-size: 28px; }
.installer-intro, .install-success { padding: 26px 28px 5px; }
.installer-intro h2, .install-success h2 { margin: 0 0 8px; font-size: 27px; }
.installer-intro p, .install-success p { color: var(--muted); line-height: 1.6; }
.install-form { padding: 5px 28px 30px; }
.install-form fieldset { margin: 18px 0; padding: 20px; border: 1px solid #dae2ea; border-radius: 16px; }
.install-form legend { padding: 0 8px; font-weight: 850; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 750; }
.form-grid input { min-height: 48px; border: 1px solid #c9d4df; border-radius: 11px; padding: 0 12px; }
.form-grid small { color: var(--muted); font-weight: 500; }
.install-button, .primary-link { min-height: 54px; border: 0; border-radius: 13px; background: #1f8f66; color: white; font-weight: 850; padding: 0 22px; cursor: pointer; }
.install-button { width: 100%; }
.install-errors { margin: 10px 28px; }
.install-errors p { margin: 5px 0; }
.install-success { padding-bottom: 32px; text-align: center; }
.success-icon { width: 72px; height: 72px; margin: 5px auto 20px; display: grid; place-items: center; border-radius: 50%; background: #dff3ea; color: #16825b; font-size: 42px; font-weight: 900; }
.primary-link { display: inline-flex; align-items: center; text-decoration: none; }
.security-note { max-width: 620px; margin: 25px auto 0; padding: 13px; background: #fff5e8; border-radius: 11px; color: #74573b !important; }

@media (max-width: 900px) {
    .app-shell { grid-template-rows: 65px 1fr; padding-bottom: 120px; }
    .topbar { padding: 0 16px; }
    .status-dot, .dwell-status { display: none; }
    .workspace, .workspace.keyboard-workspace { width: min(100% - 24px,760px); padding: 14px 0 20px; }
    .mode-switch { margin-bottom: 13px; width: 100%; }
    .mode-switch button { min-width: 0; flex: 1; }
    .content-panel { padding: 20px; border-radius: 22px; }
    .category-grid, .phrase-grid, .shortcut-grid { grid-template-columns: repeat(2,1fr); }
    .phrase-pager { grid-template-columns: 62px minmax(0,1fr) 62px; gap: 9px; }
    .phrase-pager .phrase-grid { grid-template-columns: repeat(3,1fr); gap: 9px; }
    .phrase-page-arrow { border-radius: 17px; font-size: 40px; }
    .category-card { min-height: 118px; grid-template-columns: 55px 1fr; padding: 16px; }
    .category-icon { width: 55px; height: 55px; }
    .category-arrow { display: none; }
    .message-composer { grid-template-columns: 1fr; }
    .keyboard-layout, .keyboard-workspace .keyboard-layout { grid-template-columns: 1fr; height: auto; }
    .message-composer.message-sidebar { grid-row: 1; min-height: 0; }
    .message-sidebar .message-display { min-height: 130px; max-height: 220px; }
    .keyboard-input-column { grid-row: 2; }
    .keyboard-layout.has-predictions > .prediction-bar { grid-row: 1; }
    .keyboard-layout.has-predictions > .message-composer.message-sidebar { grid-row: 2; }
    .keyboard-layout.has-predictions > .keyboard-input-column { grid-row: 3; }
    .message-actions { min-height: 76px; }
    .message-actions button { flex-direction: row; }
    .key-row { flex: none; gap: 5px; }
    .key-row button { min-width: 0; min-height: 58px; }
    .answer-bar { min-height: 120px; padding: 0; }
    .answer-buttons { height: 120px; gap: 5px; }
    .prediction-bar { grid-template-columns: 1fr; }
    .prediction-buttons { display: flex; overflow-x: auto; padding-bottom: 3px; }
    .prediction-button { min-width: 145px; }
    .calculator-key { min-height: 68px; }
    .calculator-body { grid-template-columns: 1fr; }
    .calculator-actions { grid-auto-rows: 76px; grid-template-rows: none; }
    .calculator-actions .calculator-key { min-height: 76px; }
    .answer-buttons .emergency-button { font-size: clamp(16px,2.3vw,23px); }
    .mode-switch { overflow-x:auto; justify-content:flex-start; }
    .mode-switch button { flex:0 0 155px; }
}

@media (max-width: 590px) {
    .app-shell { padding-bottom: 290px; }
    .brand { font-size: 17px; }
    .brand-logo { width: 40px; height: 40px; flex-basis: 40px; }
    .icon-button { width: 43px; height: 43px; }
    .top-actions .icon-button:first-of-type { display: none; }
    .section-heading > span { display: none; }
    .mode-switch { display: grid; grid-template-columns: repeat(2,1fr); }
    .mode-switch button { width: 100%; }
    .category-grid, .phrase-grid, .shortcut-grid { grid-template-columns: 1fr; }
    .phrase-pager { grid-template-columns: 48px minmax(0,1fr) 48px; gap: 6px; }
    .phrase-pager .phrase-grid { grid-template-columns: 1fr; }
    .phrase-page-arrow { border-radius: 13px; font-size: 32px; }
    .category-card { min-height: 102px; }
    .phrase-button { min-height: 94px; }
    .content-panel { padding: 16px; }
    .answer-buttons { display: grid; grid-template-columns: 1fr 1fr; height: auto; gap: 4px; }
    .answer-buttons button { min-height: 84px; }
    .answer-buttons .emergency-button { grid-column: 1 / -1; min-height: 76px; }
    .key-row button { min-height: 52px; font-size: 16px; border-radius: 9px; }
    .keyboard-panel { padding: 12px; }
    .keyboard-layout { gap: 12px; }
    .message-composer.message-sidebar { padding: 12px; border-radius: 14px; }
    .message-sidebar-tools { grid-template-columns: 1fr; }
    .message-sidebar-heading .clear-text, .message-sidebar-heading .paste-text { width: 100%; min-width: 0; height: 56px; }
    .message-sidebar .message-display { min-height: 115px; max-height: 190px; }
    .keyboard { gap: 5px; }
    .utility-row .space-key { flex: 2; }
    .key-row .delete-key { font-size: 0; max-width: 95px; }
    .key-row .delete-key span { font-size: 22px; }
    .key-row .enter-key { max-width:105px; font-size:13px; }
    .section-heading h1 { font-size: 27px; }
    .calculator-heading h1 { font-size: 25px; }
    .calculator-clear { min-width: 112px; min-height: 58px; padding: 0 10px; font-size: 15px; }
    .calculator-display { min-height: 96px; padding: 14px 18px; }
    .calculator-display strong { font-size: clamp(38px,12vw,58px); }
    .calculator-grid { gap: 7px; }
    .calculator-key { min-height: 60px; border-radius: 12px; }
    .category-heading { align-items: flex-start; }
    .back-button { min-width: 66px; width: 66px; font-size: 0; }
    .back-button span { font-size: 26px; }
    .settings-section { margin: 12px; padding: 16px; }
    .settings-tabs { top: 96px; margin: 0 12px; display: flex; overflow-x: auto; padding-bottom: 10px; box-shadow: none; }
    .settings-tabs button { flex: 0 0 auto; min-width: 145px; padding: 0 13px; }
    .setting-row, .toggle-row, .add-row, .pin-form { align-items: stretch; flex-direction: column; gap: 9px; }
    .quick-call-settings { grid-template-columns: 1fr; }
    .quick-call-settings > div { grid-column: auto; }
    .desktop-install-card { grid-template-columns: 1fr; }
    .desktop-install-card button { width: 100%; }
    .desktop-install-card p { grid-column: auto; }
    .add-row.compact { flex-direction: row; }
    .editor-title { grid-template-columns: 42px 1fr; }
    .editor-title > div { grid-column: 2; }
    .phrase-editor { grid-template-columns: 38px 1fr auto 42px; }
    .form-grid { grid-template-columns: 1fr; }
    .smtp-grid { grid-template-columns: 1fr; }
    .smtp-grid .wide-field { grid-column: auto; }
    .email-contact-editor { grid-template-columns: 1fr 42px; }
    .email-contact-editor input { grid-column: 1 / -1; }
    .add-contact-form { grid-template-columns: 1fr; }
    .web-shortcut-editor { grid-template-columns: 42px 1fr 42px; }
    .web-shortcut-editor .shortcut-drag-handle { grid-row: 1 / span 3; grid-column: 1; }
    .web-shortcut-editor input { grid-column: 2 / -1; }
    .web-shortcut-editor [data-shortcut-action="save-shortcut"] { grid-column: 2; min-height: 42px; }
    .web-shortcut-editor [data-shortcut-action="delete-shortcut"] { grid-column: 3; }
    .add-shortcut-form { grid-template-columns: 1fr; }
    .family-member-editor { grid-template-columns:1fr 42px; }
    .family-member-editor > input { grid-column:1 / -1; }
    .family-member-editor .family-active-toggle { grid-column:1; }
    .family-member-editor [data-family-action="save"] { grid-column:1; min-height:44px; }
    .family-member-editor [data-family-action="delete"] { grid-column:2; grid-row:4; }
    .add-family-form { grid-template-columns:1fr; }
    .message-audio { align-items:stretch; flex-direction:column; }
    .inbox-message > header { align-items:flex-start; flex-direction:column; }
    .message-table { overflow-x:auto; border-radius:14px; }
    .message-table-header, .message-table-row { min-width:760px; }
    .message-detail-heading { display:grid; grid-template-columns:auto 1fr; }
    .message-detail-heading time { grid-column:1 / -1; margin-left:0; }
    .inbox-message > footer.has-reply { grid-template-columns:1fr; }
    .message-image-thumbnails { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .message-image-gallery-preview { grid-template-columns:1fr; }
    .open-message-gallery { min-height:70px; }
    .image-gallery-backdrop { padding:0; }
    .image-gallery-shell { width:100%; height:100dvh; border:0; }
    .image-gallery-stage { grid-template-columns:76px minmax(0,1fr) 76px; }
    .gallery-arrow { font-size:44px; }
    .image-gallery-shell > footer { align-items:stretch; flex-direction:column; gap:6px; text-align:center; }
    .gallery-autoplay { width:100%; min-width:0; }
    .recipient-grid { grid-template-columns: 1fr; }
    .smtp-test-form { flex-direction: column; }
    .installer-page { padding: 12px; }
    .installer-brand, .installer-intro, .install-form { padding-left: 18px; padding-right: 18px; }
    .exit-backdrop { padding: 12px; }
    .exit-modal { padding: 27px 18px; border-radius: 18px; }
    .exit-actions { grid-template-columns: 1fr; }
    .exit-actions button { min-height: 78px; }
}

.media-panel { padding:30px; background:linear-gradient(180deg,#fff 0,#f8fbfd 100%); }
.media-heading { padding:2px 4px 16px; border-bottom:1px solid #dce6ee; }
.media-tabs { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:18px 0 24px; background:#e8f1f8; padding:8px; border-radius:18px; }
.media-tabs button { min-height:68px; border:0; border-radius:13px; background:transparent; color:#344f69; font:800 20px/1 system-ui,sans-serif; }
.media-tabs button.active { background:#fff; color:#0b355d; box-shadow:0 4px 13px #173b5c1a; }
.media-tabs small { display:inline-grid; place-items:center; min-width:28px; min-height:28px; border-radius:50%; background:#dce8f2; }
.media-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.media-card-shell { position:relative; min-width:0; display:flex; flex-direction:column; border:2px solid #d5e2ed; border-radius:18px; background:#fff; overflow:hidden; box-shadow:0 10px 26px rgba(24,59,91,.08); }
.media-card { width:100%; min-height:190px; border:0; border-radius:0; background:#fff; color:#102d49; padding:15px; text-align:left; text-decoration:none; display:flex; flex:1; flex-direction:column; gap:8px; overflow:hidden; }
.media-card:hover,.media-card:focus-visible { background:#f4faff; }
.media-card strong { font-size:20px; overflow-wrap:anywhere; }
.media-card small { color:#63778b; font-weight:700; }
.video-thumb { position:relative; display:block; aspect-ratio:16/9; border-radius:12px; overflow:hidden; background:#102d49; }
.video-thumb img,.photo-card>img { width:100%; height:100%; object-fit:cover; }
.video-thumb b { position:absolute; inset:0; display:grid; place-items:center; color:#fff; font-size:46px; text-shadow:0 2px 12px #000; }
.photo-card>img { aspect-ratio:4/3; border-radius:10px; }
.document-card>span { font-size:52px; color:#25669d; }
.document-card>b { margin-top:auto; color:#125b91; }
.media-remove-button { min-height:54px; width:100%; border:0; border-top:1px solid #efd4d5; background:#fff1f1; color:#97373d; font:900 16px/1 system-ui,sans-serif; cursor:pointer; }
.media-remove-button:hover,.media-remove-button:focus-visible { background:#d74a50; color:#fff; }
.media-confirm-backdrop { position:fixed;inset:0;z-index:110;display:grid;place-items:center;padding:24px;background:rgba(8,25,40,.82); }.media-confirm-dialog { width:min(650px,96vw);padding:34px;border-radius:22px;background:#fff;text-align:center;box-shadow:0 25px 70px rgba(0,0,0,.35); }.media-confirm-dialog>span { display:grid;place-items:center;width:72px;height:72px;margin:0 auto 15px;border-radius:50%;background:#fff0f0;color:#a23c42;font-size:48px; }.media-confirm-dialog h2 { margin:0;font-size:34px;color:#112f4b; }.media-confirm-dialog p { margin:14px 0 25px;color:#536a7f;font-size:20px;line-height:1.4;overflow-wrap:anywhere; }.media-confirm-dialog>div { display:grid;grid-template-columns:1fr 1fr;gap:12px; }.media-confirm-dialog button { min-height:82px;border:0;border-radius:14px;font:900 22px/1 system-ui,sans-serif;cursor:pointer; }.media-confirm-dialog .keep { background:#e8f0f6;color:#173f62; }.media-confirm-dialog .remove { background:#d34d52;color:#fff; }
.media-empty { min-height:300px; display:grid; place-content:center; text-align:center; color:#61778d; }
.media-empty>span { font-size:58px; }.media-empty strong { font-size:26px;color:#183b5d; }
.video-viewer-backdrop { position:fixed; inset:0; z-index:90; background:#071422e8; display:grid; place-items:center; padding:28px; }
.video-viewer { width:min(1120px,96vw); background:#fff; border-radius:20px; overflow:hidden; }
.video-viewer header { min-height:72px; display:flex; align-items:center; justify-content:space-between; padding:12px 18px; font-size:22px; }
.video-viewer header button { width:54px;height:54px;border:1px solid #ccd9e4;border-radius:12px;background:#fff;font-size:34px; }
.video-frame { aspect-ratio:16/9;background:#000; }.video-frame iframe { width:100%;height:100%;border:0; }
.video-viewer>a { display:block; padding:18px; text-align:center; font-weight:800; color:#125b91; }
.message-youtube-previews { display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,340px));gap:12px;margin:16px 0; }
.message-youtube-card { border:2px solid #d4e1ec;background:#fff;border-radius:14px;padding:8px;text-align:left; }
.message-youtube-card>span { display:block;position:relative;aspect-ratio:16/9;overflow:hidden;border-radius:9px; }.message-youtube-card img { width:100%;height:100%;object-fit:cover; }.message-youtube-card span b { position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:42px;text-shadow:0 2px 10px #000; }.message-youtube-card strong { display:block;padding:9px 5px 4px;font-size:18px; }
.inbox-message-text a { color:#075d9e; text-decoration:underline; overflow-wrap:anywhere; }
.message-documents { display:grid;gap:10px;margin:16px 0; }.message-documents>strong { font-size:19px; }.message-document { display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:10px;padding:13px;border:2px solid #d4e1ec;border-radius:12px;color:#123c62;text-decoration:none;background:#f8fbfe; }.message-document span { font-size:30px; }.message-document small { color:#63778b; }
.message-notification { position:fixed; top:92px; right:24px; z-index:85; width:min(520px,calc(100vw - 48px)); min-height:120px; display:grid;grid-template-columns:58px 1fr 92px 42px;align-items:center;gap:12px;padding:16px;background:#fff;border:2px solid #a9c7df;border-radius:18px;box-shadow:0 18px 50px #102d4960;animation:notification-in .25s ease-out; }
.message-notification[hidden] { display:none; }.notification-icon { width:54px;height:54px;border-radius:50%;background:#e9f5ff;color:#0b5f9f;display:grid;place-items:center;font-size:28px; }.message-notification small { display:block;color:#657a8f;font-weight:900;letter-spacing:.08em; }.message-notification strong { display:block;font-size:20px;color:#102d49; }.message-notification p { margin:4px 0 0;color:#415b73;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }.message-notification>button { min-height:60px;border:0;border-radius:10px;background:#0d5e98;color:#fff;font-weight:900;font-size:17px; }.message-notification .notification-close { min-width:42px;background:#eef3f7;color:#314c66;font-size:25px; }
@keyframes notification-in { from { transform:translateY(-18px);opacity:0; } }
.settings-tabs { grid-template-columns:repeat(8,minmax(140px,1fr)); overflow-x:auto; }
.media-manager-heading { display:flex;align-items:center;justify-content:space-between;gap:24px;padding:4px 4px 18px; }.media-manager-heading small,.changelog-heading small { color:#667b90;font-weight:900;letter-spacing:.12em; }.media-manager-heading h3,.changelog-heading h3 { margin:5px 0 3px;font-size:28px; }.media-manager-heading p { margin:0;color:#5f7488; }.media-manager-total { min-width:115px;padding:14px;border-radius:14px;background:#e7f2fb;text-align:center;color:#164e7c; }.media-manager-total strong { display:block;font-size:30px; }.media-manager-total span { font-size:12px;font-weight:850;text-transform:uppercase;letter-spacing:.08em; }
.media-upload-panel { padding:16px;border:1px solid #d7e3ec;border-radius:16px;background:#f6fafd; }.caregiver-media-settings .media-settings-form { display:grid;grid-template-columns:1fr 2fr auto;gap:10px;margin:0 0 10px; }.caregiver-media-settings .media-settings-form:last-child { margin-bottom:0; }.caregiver-media-settings .media-settings-form input,.caregiver-media-settings .media-settings-form button { min-height:48px;border-radius:10px; }.caregiver-media-list { display:grid;gap:18px;margin-top:22px; }.media-manager-group { border:1px solid #d6e2eb;border-radius:16px;background:#fff;overflow:hidden; }.media-manager-group>header { min-height:58px;display:flex;align-items:center;gap:10px;padding:11px 15px;background:#edf5fb;border-bottom:1px solid #d6e2eb;color:#163f64; }.media-manager-group>header>span { font-size:22px; }.media-manager-group>header h4 { margin:0;font-size:19px; }.media-manager-group>header b { margin-left:auto;display:grid;place-items:center;min-width:30px;height:30px;border-radius:50%;background:#d4e7f5; }.media-manager-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;padding:14px; }.media-manager-card { min-width:0;display:flex;flex-direction:column;border:1px solid #d5e1ea;border-radius:13px;overflow:hidden;background:#fff;box-shadow:0 5px 16px rgba(20,52,80,.06); }.media-manager-preview { position:relative;display:grid;place-items:center;aspect-ratio:16/9;background:#e9f1f7;overflow:hidden; }.media-manager-preview img { width:100%;height:100%;object-fit:cover; }.media-manager-preview button { position:absolute;inset:0;border:0;background:rgba(8,30,49,.16);color:#fff;font-size:42px;text-shadow:0 2px 10px #000;cursor:pointer; }.media-manager-preview.documents span { font-size:50px;color:#246a9f; }.media-manager-copy { min-height:80px;padding:12px; }.media-manager-copy strong,.media-manager-copy small { display:block;overflow-wrap:anywhere; }.media-manager-copy strong { color:#102f4b;font-size:16px; }.media-manager-copy small { margin-top:5px;color:#6a7d8f; }.media-manager-actions { display:flex;align-items:stretch;margin-top:auto;border-top:1px solid #e0e8ef; }.media-manager-actions>a { flex:1;display:grid;place-items:center;min-height:48px;color:#0f5a91;font-weight:850;text-decoration:none; }.media-manager-actions .media-remove-button { width:auto;flex:1;min-height:48px;border-top:0;border-left:1px solid #efd4d5; }.media-manager-empty { grid-column:1/-1;margin:0;padding:25px;text-align:center;color:#6b7d8e; }
.changelog-heading { display:flex;align-items:center;justify-content:space-between;gap:20px;padding-bottom:18px;border-bottom:1px solid #dce5ec; }.changelog-heading p { margin:8px 0 0;color:#5e7286; }.changelog-heading>strong { padding:12px 16px;border-radius:999px;background:#e4eef7;color:#174b77;font-size:18px; }.changelog-list { display:grid;gap:18px;margin-top:20px; }.changelog-release { border:1px solid #d7e2ea;border-radius:15px;background:#fff;overflow:hidden; }.changelog-release>header { display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 18px;background:#eef5fa;border-bottom:1px solid #d7e2ea; }.changelog-release>header strong { font-size:20px;color:#143e63; }.changelog-release time { color:#62778a;font-weight:750; }.changelog-release ul { list-style:none;margin:0;padding:7px 18px 12px; }.changelog-release li { display:grid;grid-template-columns:54px 1fr;align-items:start;gap:12px;padding:11px 0;border-bottom:1px solid #e8eef3; }.changelog-release li:last-child { border-bottom:0; }.changelog-release li p { margin:1px 0 0;line-height:1.45;color:#314b63; }.change-badge { display:inline-grid;place-items:center;min-width:48px;height:25px;padding:0 7px;border-radius:6px;font:900 11px/1 system-ui,sans-serif;letter-spacing:.08em; }.change-badge.new { background:#dff4e9;color:#16704b; }.change-badge.fix { background:#fff0d7;color:#9a5810; }
@media (max-width:1200px) { .media-manager-grid{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (max-width:900px) { .media-grid{grid-template-columns:1fr 1fr}.caregiver-media-settings .media-settings-form{grid-template-columns:1fr}.media-manager-grid{grid-template-columns:1fr 1fr}.message-notification{grid-template-columns:48px 1fr 80px}.message-notification .notification-close{position:absolute;right:5px;top:5px}.settings-tabs{grid-template-columns:none} }
@media (max-width:590px) { .media-grid,.media-manager-grid{grid-template-columns:1fr}.media-manager-heading,.changelog-heading{align-items:flex-start;flex-direction:column}.changelog-release>header{align-items:flex-start;flex-direction:column}.changelog-release li{grid-template-columns:50px 1fr} }

@media print {
    body { background: white; }
    .topbar, .mode-switch, .section-heading, .keyboard-input-column, .message-sidebar-heading, .answer-bar, .message-actions { display: none !important; }
    .app-shell, .workspace, .content-panel, .keyboard-panel, .message-composer { display: block; min-height: 0; width: 100%; margin: 0; padding: 0; border: 0; box-shadow: none; background: white; }
    .message-composer.message-sidebar { display: block; min-height: 0; max-height: none; }
    .message-sidebar .message-display { max-height: none; min-height: 0; overflow: visible; }
    .message-display { border: 0; font-size: 34pt; padding: 30mm 15mm; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
