:root {
  color-scheme: light;
  --accent: #119eab;
  --accent-soft: #d9f6f7;
  --accent-deep: #102a56;
  --accent-on-dark: #9edfe2;
  --accent-ink: var(--accent-deep);
  --canvas: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #10203b;
  --muted: #667085;
  --line: #d8e0eb;
  --shadow: 0 18px 50px rgb(16 42 86 / 12%);
  font-family: Inter, ui-rounded, "SF Pro Rounded", "SF Pro Display", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--canvas); }
button, input { font: inherit; }
button { color: inherit; }

.app-shell {
  width: min(100%, 980px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px 1fr auto 44px;
  align-items: center;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  color: var(--text);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand-title { display: grid; }
.brand-title span { font-size: 1.08rem; font-weight: 760; }
.brand-title small { opacity: .72; }
.icon-button { min-width: 44px; min-height: 44px; border: 0; border-radius: 14px; background: transparent; font-size: 1.35rem; cursor: pointer; }
.topbar .icon-button { color: var(--accent-ink); }
.icon-button:focus-visible, .tab:focus-visible, .primary-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.install-button { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent-ink); background: var(--surface); padding: 0 14px; }

.view { display: none; padding: 24px 18px 36px; }
.view.active { display: block; }
.agenda-view { padding: 0 0 110px; background: var(--surface); min-height: calc(100vh - 154px); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.8rem, 7vw, 2.5rem); letter-spacing: -.04em; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.eyebrow { margin-bottom: 5px; color: var(--accent-ink); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .73rem; font-weight: 700; }
.status-chip span { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; }

.mail-list { display: grid; gap: 12px; }
.mail-card { width: 100%; display: grid; grid-template-columns: 46px 1fr; gap: 12px; text-align: left; border: 1px solid var(--line); border-radius: 18px; padding: 15px; background: var(--surface); box-shadow: 0 8px 24px rgb(16 42 86 / 6%); cursor: pointer; }
.avatar { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; color: var(--accent-deep); background: var(--accent-soft); font-weight: 800; }
.mail-meta { min-width: 0; }
.mail-meta header { display: flex; justify-content: space-between; gap: 10px; }
.mail-meta p { margin: 5px 0 0; color: var(--muted); line-height: 1.35; }
.mail-meta small { color: var(--muted); white-space: nowrap; }
.event-label { display: inline-flex; margin-top: 9px; color: var(--accent-ink); font-size: .72rem; font-weight: 750; }

.calendar-heading { min-height: 82px; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; color: var(--text); background: var(--surface); }
.calendar-heading h1 { font-size: 1.35rem; letter-spacing: -.02em; }
.calendar-heading p { margin: 1px 0 0; color: var(--muted); }
.calendar-actions { display: flex; }
.calendar-navigation { display: flex; justify-content: space-between; align-items: center; padding: 0 12px 10px; }
.mini-month button { min-width: 0; min-height: 32px; padding: 2px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.week-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(154px, 1fr)); min-height: 616px; background: var(--surface); }
.day-cell, .month-cell { min-width: 0; padding: 10px 7px; border: solid var(--line); border-width: 1px 1px 0 0; background: var(--surface); color: var(--text); overflow: hidden; }
.day-cell.today .day-title { color: var(--accent-ink); font-weight: 750; }
.day-title { margin: 0 3px 10px; font-size: clamp(.72rem, 3vw, .92rem); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-strip { display: flex; gap: 4px; align-items: center; min-height: 25px; margin: 2px 0; padding: 3px 6px; border: 0; border-radius: 6px; background: var(--event-color, var(--accent)); color: var(--event-text-color, #fff); font-size: clamp(.62rem, 2.5vw, .78rem); white-space: nowrap; overflow: hidden; }
.event-strip strong, .event-strip span { overflow: hidden; text-overflow: ellipsis; }
.month-cell h2 { font-size: .92rem; margin: 0 3px 10px; }
.mini-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px 3px; color: var(--muted); font-size: .7rem; text-align: center; }
.mini-month .active-day { color: var(--accent-ink); font-weight: 800; }
.month-cell .mini-month { gap: 1px; }
.month-cell .mini-month button { min-height: 18px; }
.demo-notice { margin: 0; padding: 10px; color: var(--muted); background: var(--surface); text-align: center; font-size: .75rem; }

.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.module-card { min-height: 150px; padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.module-card .module-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 13px; color: var(--accent-deep); background: var(--accent-soft); }
.module-card h2 { margin-bottom: 6px; font-size: 1rem; }
.module-card p { margin-bottom: 12px; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.module-status { color: var(--accent-ink); font-size: .69rem; font-weight: 800; text-transform: uppercase; }

.settings-groups { display: grid; gap: 12px; }
.settings-card { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 8px 24px rgb(16 42 86 / 6%); overflow: clip; }
.settings-card summary { min-height: 72px; display: grid; grid-template-columns: 34px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 14px 17px; cursor: pointer; list-style: none; }
.settings-card summary::-webkit-details-marker { display: none; }
.settings-card summary > span { grid-row: 1 / 3; color: var(--accent); font-size: 1.2rem; text-align: center; }
.settings-card summary > strong { align-self: end; }
.settings-card summary > small { grid-column: 2; color: var(--muted); }
.settings-card summary::after { content: "⌄"; grid-column: 3; grid-row: 1 / 3; color: var(--muted); font-size: 1.2rem; }
.settings-card[open] summary::after { transform: rotate(180deg); }
.settings-content { display: grid; gap: 18px; padding: 2px 20px 20px; border-top: 1px solid var(--line); }
.compact-copy { gap: 9px; padding-top: 16px; color: var(--muted); line-height: 1.45; }
.compact-copy p { margin: 0; }
.connection-list { gap: 0; }
.connection-list p { display: flex; justify-content: space-between; gap: 14px; margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
.connection-list p:last-child { border-bottom: 0; }
.connection-list small { color: var(--muted); text-align: right; }
.connection-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.connection-actions button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--accent-ink); cursor: pointer; }
.connection-actions button:disabled { color: var(--muted); cursor: default; }
#google-connections { min-width: 0; overflow-wrap: anywhere; }
#google-drive-files { list-style: none; margin: 0; padding: 0; }
#google-drive-files li { padding: 10px 0; border-bottom: 1px solid var(--line); }
#google-drive-files a { display: flex; align-items: center; min-height: 44px; color: var(--accent-ink); }
#google-drive-status:empty { display: none; }
[hidden] { display: none !important; }
.brand-preview { display: flex; align-items: center; gap: 12px; color: var(--accent-deep); font-size: 1.6rem; }
.brand-mark { width: 66px; height: 66px; }
.brand-mark path { fill: none; stroke-linecap: butt; }
.brand-mark .mark-accent { stroke: #21b6bf; stroke-width: 30; }
.brand-mark .mark-deep { stroke: #102a56; stroke-width: 30; }
.brand-mark .mark-deep:last-child { stroke-width: 24; }
[data-logo-recolor="true"] .brand-mark .mark-accent { stroke: var(--accent); }
[data-logo-recolor="true"] .brand-mark .mark-deep { stroke: var(--accent-deep); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 10px; font-weight: 750; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.segmented label { position: relative; padding: 9px 4px; border-radius: 11px; text-align: center; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented label:has(input:checked) { color: var(--accent-deep); background: var(--surface); box-shadow: 0 2px 8px rgb(16 42 86 / 10%); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.setting-row span:first-child { display: grid; gap: 3px; }
.setting-row small { color: var(--muted); }
input[type="color"] { width: 46px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
input[role="switch"] { width: 48px; height: 28px; accent-color: var(--accent); }
.palette { display: flex; gap: 7px; }
.palette span { width: 25px; height: 25px; border: 1px solid rgb(16 42 86 / 15%); border-radius: 50%; }
.color-list { display: grid; }
.color-list label { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.primary-button { min-height: 48px; border: 0; border-radius: 15px; color: white; background: var(--accent-deep); font-weight: 760; cursor: pointer; }
.secondary-button { min-height: 48px; border: 1px solid var(--line); border-radius: 15px; padding: 0 18px; color: var(--text); background: var(--surface-2); font-weight: 760; cursor: pointer; }
.save-status { min-height: 1.2em; margin: -8px 0 0; color: var(--muted); font-size: .78rem; text-align: center; }
.provider-list { display: grid; }
.provider-row { width: 100%; min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); text-align: left; background: transparent; cursor: pointer; }
.provider-row:last-child { border-bottom: 0; }
.provider-row > span:first-child { display: grid; gap: 3px; }
.provider-row small { color: var(--muted); }
.provider-status { color: var(--muted); font-size: .75rem; white-space: nowrap; }

.tabbar { position: fixed; inset: auto 0 0; z-index: 20; width: min(100%, 980px); min-height: calc(68px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 auto; padding: 7px 6px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(18px); }
.tab { display: grid; place-items: center; gap: 2px; border: 0; border-radius: 14px; color: var(--muted); background: transparent; font-size: .68rem; cursor: pointer; }
.tab span { font-size: 1.15rem; }
.tab.active { color: var(--accent-ink); background: transparent; font-weight: 780; }
.tab.active span { box-shadow: 0 2px 0 var(--accent-ink); }

dialog { width: min(calc(100% - 28px), 620px); border: 0; border-radius: 24px; padding: 24px; color: var(--text); background: var(--surface); box-shadow: 0 30px 100px rgb(0 0 0 / 35%); }
dialog::backdrop { background: rgb(5 15 35 / 58%); backdrop-filter: blur(5px); }
.dialog-close { float: right; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-2); font-size: 1.5rem; }
.muted { color: var(--muted); }
.summary-card { margin-top: 22px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-2); }
.summary-card p { margin: 8px 0; }
.summary-card small { color: var(--muted); }
.dialog-form { display: grid; gap: 14px; clear: both; }
.dialog-form label { display: grid; gap: 6px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.dialog-form input, .dialog-form select, .dialog-form textarea, .key-row input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface-2); }
.dialog-form textarea { resize: vertical; }
.dialog-form .check-row { display: flex; align-items: center; gap: 10px; color: var(--text); }
.dialog-form .check-row input { width: 22px; min-height: 22px; }
.form-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.key-row { display: grid; grid-template-columns: 1fr 48px; gap: 10px; margin: 18px 0; }
.provider-key-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.provider-key-actions button { min-height: 44px; }
#provider-reauth-form { margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.help-button { min-width: 48px; min-height: 48px; display: grid; place-items: center; border-radius: 13px; color: var(--accent-ink); background: var(--surface-2); font-size: 1.1rem; font-weight: 800; text-decoration: none; }
.provider-steps { padding-left: 22px; color: var(--muted); line-height: 1.45; }
.provider-steps li { margin: 8px 0; }
.confirm-dialog { max-width: 430px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; clear: both; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme:dark; --canvas:#111214; --surface:#191a1d; --surface-2:#24262a; --text:#f4f4f5; --muted:#b0b2b8; --line:#383a40; --accent-ink:var(--accent-on-dark); }
  :root:not([data-theme="light"]) .brand-preview { color: var(--accent-on-dark); }
  :root:not([data-theme="light"]) .brand-mark .mark-deep { stroke: var(--accent-on-dark); }
  :root:not([data-theme="light"])[data-logo-recolor="false"] .brand-mark .mark-deep { stroke: #8ab4f8; }
  :root:not([data-theme="light"]) .segmented label:has(input:checked) { color: var(--accent-on-dark); }
}
:root[data-theme="dark"] { color-scheme:dark; --canvas:#111214; --surface:#191a1d; --surface-2:#24262a; --text:#f4f4f5; --muted:#b0b2b8; --line:#383a40; --accent-ink:var(--accent-on-dark); }
:root[data-theme="dark"] .brand-preview { color: var(--accent-on-dark); }
:root[data-theme="dark"] .brand-mark .mark-deep { stroke: var(--accent-on-dark); }
:root[data-theme="dark"][data-logo-recolor="false"] .brand-mark .mark-deep { stroke: #8ab4f8; }
:root[data-theme="dark"] .segmented label:has(input:checked) { color: var(--accent-on-dark); }
:root[data-theme="light"] { --canvas:#f3f6fb; --surface:#fff; --surface-2:#eef2f8; --text:#10203b; --muted:#667085; --line:#d8e0eb; }

@media (min-width: 760px) {
  .view:not(.agenda-view) { padding: 38px 42px 56px; }
  .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .week-grid { min-height: 760px; }
  .event-strip { font-size: .76rem; }
}

@media (max-width: 420px) {
  .topbar { grid-template-columns: 42px 1fr 42px; }
  .install-button { display: none !important; }
  .module-grid { grid-template-columns: 1fr 1fr; }
  .view { padding-inline: 14px; }
  .form-columns { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

:is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
:is(#confirm-message, #event-detail-body) { white-space: pre-wrap; overflow-wrap: anywhere; }
button.event-strip { width: 100%; text-align: left; min-height: 25px; cursor: pointer; }
.day-more { border: 0; background: transparent; color: var(--accent-ink); font: inherit; font-size: .72rem; font-weight: 700; padding: 5px 2px; cursor: pointer; }
.calendar-content { min-width: 0; background: var(--surface); padding: 8px; color: var(--text); }
.calendar-day-column { min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 12px; }
.calendar-day-column h2, .calendar-month-card h2, .calendar-chosen-day h2 { font-size: .95rem; margin: 0 0 8px; }
.calendar-list { display: grid; gap: 7px; }
.calendar-day, .calendar-threeDays { display: flex; overflow-x: auto; }
.calendar-day .calendar-day-column { flex: 1; }
.calendar-threeDays .calendar-day-column { flex: 0 0 260px; }
.calendar-hour { display: grid; grid-template-columns: 42px 1fr; min-height: 45px; gap: 5px; border-top: 1px solid var(--line); font-size: .7rem; }
.calendar-hour > span { color: var(--muted); padding-top: 3px; }
.calendar-hour .event-strip { white-space: normal; }
.calendar-month { display: grid; gap: 10px; }
.calendar-month-card, .calendar-chosen-day, .calendar-year-card { min-width: 0; padding: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.calendar-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; font-size: .72rem; }
.calendar-month-grid > * { min-width: 0; min-height: 28px; display: grid; place-items: center; color: var(--text); border: 0; background: transparent; font: inherit; }
.calendar-month-grid button { cursor: pointer; border-radius: 6px; }
.calendar-month-grid button.has-items::after { content: "•"; font-size: .75rem; color: var(--accent-ink); line-height: 0; }
.calendar-month-grid button.chosen-day { background: var(--accent); color: #fff; }
.calendar-year { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.calendar-year-card { text-align: left; color: var(--text); cursor: pointer; }
.calendar-year-card .calendar-month-grid > * { min-height: 20px; font-size: .62rem; }
.agenda-menu-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.agenda-menu-options button { min-height: 42px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 8px; cursor: pointer; }
.agenda-search-results { max-height: 45vh; overflow: auto; }
.agenda-items-list { max-height: 50vh; overflow: auto; }
.agenda-item-row { display: grid; gap: 3px; padding: 8px; border-bottom: 1px solid var(--line); }
.agenda-item-row span { font-size: .75rem; color: var(--muted); }
.agenda-item-row p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.settings-category { margin: 12px 0; }
.settings-category h2 { font-size: 1rem; margin: 0 0 7px; }
#agenda-info-message { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (min-width: 760px) { .calendar-year { grid-template-columns: repeat(3, minmax(0, 1fr)); } .calendar-threeDays .calendar-day-column { flex: 1 0 260px; } }
.inbox-search { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; }
.inbox-search input { flex: 1; min-width: 0; min-height: 44px; padding: .65rem; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); }
#inbox-status { color: var(--muted); }
#inbox-more { margin-top: 12px; }
.email-close { float: right; min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: var(--surface); font-size: 24px; cursor: pointer; }
#dialog-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Approved PWA v3: quiet rows and service settings below Cirqol. */
.app-shell { width: 100%; background: var(--canvas); box-shadow: none; }
.topbar { background: var(--canvas); border: 0; grid-template-columns: auto 1fr auto; }
.topbar:has(#route-back[hidden]) { grid-template-columns: 1fr auto; }
.topbar #page-subtitle { display: none; }
.view:not(.agenda-view) { max-width: 768px; margin-inline: auto; padding: 28px 24px 110px; }
.service-view h1 { margin: 8px 0 32px; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.04em; }
.route-list, .route-card { border-radius: 22px; background: var(--surface); overflow: hidden; }
.route-row { width: 100%; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border: 0; border-bottom: 1px solid var(--line); text-align: left; background: var(--surface); cursor: pointer; }
.route-row:last-child { border-bottom: 0; }
.route-row strong, .route-row small { display: block; }
.route-row strong { font-size: 1rem; font-weight: 650; }
.route-row small { margin-top: 5px; color: var(--muted); line-height: 1.4; }
.route-row > span:last-child { font-size: 1.4rem; color: var(--muted); }
.route-row:hover { background: var(--surface-2); }
.service-view .settings-content { border: 0; border-radius: 22px; padding: 22px; background: var(--surface); margin-bottom: 20px; }
.service-view .settings-content h2 { font-size: 1.1rem; }
.service-view .settings-content p { line-height: 1.55; overflow-wrap: anywhere; }
.ai-answer { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.ai-composer { margin: 18px 0; padding: 20px; border-radius: 22px; background: var(--surface-2); }
.ai-composer h2 { margin: 0 0 4px; }
.ai-composer .muted { margin: 0; font-size: .82rem; }
.ai-composer .ai-answer:not(:empty) { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.account-actions { display: grid; gap: 12px; }
.service-view button:not(.route-row):not(.provider-row) { min-height: 44px; }
.service-view .settings-content > button, .account-actions button { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; background: var(--surface); color: var(--accent-ink); cursor: pointer; }
.security-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.security-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 12px 0; }
.security-list li span { display: grid; gap: 3px; min-width: 0; }
.security-list li small { color: var(--muted); }
.security-list li button { flex: 0 0 auto; }
#google-drive-files { list-style: none; padding: 0; }
#google-drive-files li { padding: 18px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#google-drive-files a { color: var(--accent-ink); }
#google-drive-order { -webkit-appearance: menulist-button; appearance: menulist-button; height: 46px; min-height: 46px; font: inherit; }
#google-drive-up { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.view[data-view="files"] .settings-content, #google-drive-query { grid-template-columns: minmax(0, 1fr); }
#google-drive-query, #google-drive-query label, #google-drive-query :is(input, select, button) { min-width: 0; }
#google-drive-query :is(input, select, button) { max-width: 100%; }
.tabbar { bottom: 12px; width: calc(100% - 24px); max-width: 620px; border: 1px solid var(--line); border-radius: 34px; padding: 7px; min-height: 66px; margin-bottom: env(safe-area-inset-bottom); }
.tab { min-height: 50px; border-radius: 28px; font-size: .75rem; }
.tab.active { background: var(--surface-2); }
.tab.active span { box-shadow: none; }
@media (min-width: 1000px) {
  .app-shell { padding-left: 220px; }
  .tabbar { inset: 0 auto 0 0; width: 220px; max-width: none; margin: 0; border-radius: 0; border: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; padding: 90px 16px 24px; background: var(--surface); }
  .tab { display: flex; justify-content: flex-start; gap: 14px; padding: 12px 18px; width: 100%; font-size: 1rem; border-radius: 14px; }
  .topbar { padding-inline: 28px; }
  .agenda-view { max-width: 1100px; margin-inline: auto; }
}
[hidden] { display: none !important; }

/* Keep only the new setup secrets readable at narrow widths and large text. */
#email-setup-secret { display: block; overflow-wrap: anywhere; user-select: text; }
#email-recovery-list { white-space: pre-wrap; overflow-wrap: anywhere; }
