:root {
  color-scheme: dark;
  --bg: #191d24;
  --panel: #20252e;
  --raised: #2a313d;
  --hover: #323b49;
  --border: #ffffff13;
  --text: #edf0f5;
  --muted: #a1aaba;
  --accent: #bdcdee;
  --danger: #efaaaa;
  --sidebar: 220px;
  --list: 330px;
  --service-header-height: 60px;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .4; cursor: not-allowed; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button { transition: background .12s, color .12s; }
[hidden] { display: none !important; }
a { color: var(--accent); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.primary-button, .secondary-button, .reply-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 6px; font-size: 13px; font-weight: 500; text-decoration: none; }
.primary-button { color: #202735; background: #c6d3eb; }
.primary-button:hover:not(:disabled) { background: #dae4f7; }
.secondary-button, .reply-button { color: var(--text); background: var(--raised); }
.secondary-button:hover:not(:disabled), .reply-button:hover { background: #384253; }
.icon-button, .tool-button, .configure-button, .move-button, .reveal-button { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 6px; color: var(--muted); background: transparent; }
.icon-button:hover, .tool-button:hover, .configure-button:hover, .move-button:hover:not(:disabled), .reveal-button:hover { color: var(--text); background: var(--hover); }
.icon-button.active { color: var(--text); background: var(--hover); }
.text-button, .back-link, .subtle-link { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.text-button:hover, .back-link:hover, .subtle-link:hover { color: var(--text); }
.wide { width: 100%; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; color: var(--muted); background: var(--raised); }

.full-header { display: flex; align-items: center; gap: 10px; flex: none; }

/* Shared navigation */
.service-header { position: fixed; inset: 0 0 auto; z-index: 30; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; height: var(--service-header-height); padding: 0 24px; border-bottom: 1px solid var(--border); background: var(--panel); }
#app[hidden] + .service-header { display: none; }
.storage-brand { color: #bcbcbc; font-size: 14px; font-weight: 600; letter-spacing: .03em; }
.service-tabs { display: flex; align-items: center; gap: 3px; }
.service-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 0 15px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; }
.service-tabs button:hover { color: var(--text); background: var(--raised); }
.service-tabs button.active { color: var(--text); background: #354052; }
.service-tabs .icon { width: 17px; height: 17px; }
.storage-actions { display: flex; gap: 4px; justify-self: end; }

/* Files */
.mail-app { position: relative; display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); width: 100%; height: calc(100dvh - var(--service-header-height)); margin-top: var(--service-header-height); background: var(--bg); }
.mail-app.storage-mode, .mail-app.settings-mode { display: block; }
.storage-mode .sidebar, .storage-mode .mail-list, .storage-mode .reader, .storage-mode .mobile-scrim,
.settings-mode .sidebar, .settings-mode .mail-list, .settings-mode .reader, .settings-mode .mobile-scrim { display: none; }
.full-view { display: flex; flex-direction: column; min-height: 0; width: 100%; height: 100%; overflow: auto; }
.storage-content { position: relative; flex: 1; min-height: 100%; width: 100%; margin: 0; padding: 28px 28px 20px; outline-offset: -3px; }
.storage-breadcrumbs { margin: -4px 0 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.storage-breadcrumbs button { min-height: 32px; padding: 0; border: 0; color: var(--muted); background: transparent; overflow-wrap: anywhere; }
.storage-breadcrumbs button:last-child { color: var(--text); font-weight: 500; }
.storage-breadcrumbs button:hover { color: white; }
.storage-breadcrumbs span { color: #666; }
.storage-columns, .storage-file { display: grid; grid-template-columns: 22px minmax(0,1fr) 96px 140px; align-items: center; gap: 12px; }
.storage-columns { min-height: 32px; padding: 0 12px; border-bottom: 1px solid var(--border); color: #8f8f8f; font-size: 12px; }
.storage-name-heading { grid-column: 1 / span 2; }
.storage-files { display: flex; flex-direction: column; }
.storage-file { width: 100%; min-height: 48px; padding: 8px 12px; border: 0; border-bottom: 1px solid #ffffff08; border-radius: 0; background: transparent; color: var(--text); text-align: left; text-decoration: none; }
.storage-file:hover { background: #ffffff05; }
.storage-file > .icon { width: 18px; height: 18px; color: #aaa; }
.storage-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.storage-file-size, .storage-file-date { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.storage-download-hint { display: none; }
.folder-size::before { content: "—"; }
.storage-overview { display: flex; justify-content: flex-end; padding: 0 0 18px; color: #8f8f8f; font-size: 12px; }
.storage-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 240px; padding: 40px 16px; text-align: center; color: var(--muted); }
.storage-empty strong { color: #c2c2c2; font-size: 14px; font-weight: 500; }
.storage-empty span { font-size: 13px; }
.storage-status { padding: 12px 0; color: var(--muted); }
.storage-error { padding: 12px; border-radius: 6px; background: #382525; color: #edbaba; overflow-wrap: anywhere; }
.storage-progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; margin-bottom: 16px; border-radius: 6px; background: var(--panel); }
.storage-progress span { flex: 1 1 220px; overflow-wrap: anywhere; font-size: 13px; }
.storage-progress progress { flex: 1 1 160px; height: 6px; accent-color: #a0b8dd; }
.storage-drop-overlay { display: none; position: absolute; inset: 8px; z-index: 5; align-items: center; justify-content: center; padding: 24px; border: 2px dashed #aaa; border-radius: 8px; background: #222c3bf5; color: var(--text); font-size: 20px; text-align: center; pointer-events: none; }
.storage-content.dropping .storage-drop-overlay { display: flex; }
.context-menu { position: fixed; z-index: 60; width: 190px; padding: 5px; border: 1px solid #424e61; border-radius: 8px; background: #293240; box-shadow: 0 8px 24px #0005; }
.context-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 9px; border: 0; border-radius: 4px; background: transparent; color: var(--text); text-align: left; font-size: 13px; }
.context-menu button:hover, .context-menu button:focus-visible { background: #3d4c63; outline: none; }
.context-menu .icon { width: 17px; height: 17px; color: #ccc; }
.compact .storage-file { min-height: 38px; }

/* Mail */
.sidebar, .mail-list, .reader { min-width: 0; min-height: 0; }
.sidebar { display: flex; flex-direction: column; padding: 14px 10px 12px; border-right: 1px solid var(--border); background: #1e242d; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; height: 32px; margin: 0 4px 14px; }
.brand-lockup { color: #c5c5c5; font-size: 13px; font-weight: 500; }
.compose-button { width: 100%; }
.nav-header { display: flex; align-items: center; justify-content: space-between; margin: 18px 10px 6px; color: #888; font-size: 12px; }
.configure-button { width: 28px; height: 28px; }
.configure-button .icon { width: 16px; height: 16px; }
.mailbox-nav { margin-top: 16px; max-height: 28vh; overflow: auto; }
.folders { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 60px; overflow: auto; }
.folder, .product-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 35px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: #b5b5b5; text-align: left; }
.folder:hover, .product-link:hover { background: var(--raised); color: var(--text); }
.folder.active, .product-link.active { background: #303b4b; color: var(--text); }
.folder .icon, .product-link .icon { width: 17px; height: 17px; }
.folder-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.folder-count, .product-link small { margin-left: auto; color: var(--muted); font-size: 12px; }
.sidebar-bottom { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid var(--border); }
.mail-list, .reader { display: flex; flex-direction: column; background: var(--bg); }
.mail-app.has-selection { grid-template-columns: var(--sidebar) minmax(280px,var(--list)) minmax(0,1fr); }
.mail-app.has-selection .mail-list { border-right: 1px solid var(--border); }
.mail-app:not(.has-selection) .reader { display: none; }
.list-header { position: relative; flex: none; min-height: 64px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.list-title-row { display: flex; align-items: center; gap: 10px; }
.list-title { min-width: 0; margin-right: auto; }
.list-title h2 { margin: 0; color: var(--text); font-size: 15px; font-weight: 550; }
.list-subtitle { color: #888; font-size: 12px; }
.search-wrap { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.search-wrap > .icon { width: 17px; height: 17px; color: var(--muted); }
.search { width: 100%; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid #444; border-radius: 5px; background: var(--panel); }
.mail-items, .reader-body { flex: 1; overflow: auto; }
.message-card { display: grid; grid-template-columns: 6px minmax(0,1fr); gap: 10px; width: 100%; padding: 14px 20px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; }
.message-card:hover { background: #ffffff04; }
.message-card.selected { background: #303b4b; }
.unread-dot { width: 5px; height: 5px; margin-top: 7px; border-radius: 50%; background: var(--accent); }
.message-card .unread-dot[hidden] { display: block !important; visibility: hidden; }
.message-main { min-width: 0; }
.message-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sender { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.message-card.is-unread .sender { font-weight: 650; }
.time { flex: none; color: #888; font-size: 11px; }
.subject { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.preview { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #888; font-size: 12px; }
.compact .message-card { padding-block: 8px; }
.reader-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 64px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.toolbar-actions { display: flex; align-items: center; gap: 3px; }
.toolbar-divider { width: 1px; height: 18px; margin: 0 4px; background: var(--border); }
.message-detail { padding: 32px clamp(22px,3vw,48px) 60px; }
.message-heading { margin: 0 0 24px; font-size: 22px; line-height: 1.3; font-weight: 550; overflow-wrap: anywhere; }
.sender-block { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #344156; color: #bbb; font-size: 13px; }
.sender-name { font-size: 13px; font-weight: 500; }
.sender-email, .recipient, .sender-time { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.sender-time { align-self: start; }
.message-content { padding-top: 24px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.reply-button { margin-top: 20px; }
.attachment-notice { margin-top: 20px; padding: 12px 0; font-size: 13px; }
.empty-state { display: grid; place-items: center; min-height: 240px; height: 100%; padding: 24px; color: #888; text-align: center; font-size: 13px; }
.empty-state .icon { margin: 0 auto 12px; color: #777; }
.load-more { display: block; margin: 20px auto; }
.mobile-menu, .mobile-close, .mobile-back, .mobile-scrim { display: none; }
.back-icon { transform: rotate(180deg); }
.mail-locked .sidebar, .mail-locked .mail-list { pointer-events: none; user-select: none; }
.mail-lock { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.mail-lock-card { max-width: 350px; text-align: center; }
.mail-lock-card > .icon { margin: 0 auto 20px; width: 28px; height: 28px; color: var(--muted); }
.mail-lock-card h2 { margin: 0; font-size: 20px; font-weight: 550; }
#mailLockText { margin: 12px 0 24px; color: var(--muted); }
.mail-lock-close { position: absolute; top: 14px; right: 18px; }
.mail-app.sidebar-collapsed { --sidebar: 64px; }
.sidebar-collapsed .brand-lockup, .sidebar-collapsed .compose-button span, .sidebar-collapsed .folder-name, .sidebar-collapsed .product-link span, .sidebar-collapsed .nav-header > span { display: none; }
.sidebar-collapsed .sidebar-top, .sidebar-collapsed .nav-header { justify-content: center; margin-inline: 0; }
.sidebar-collapsed .compose-button, .sidebar-collapsed .folder, .sidebar-collapsed .product-link { justify-content: center; padding: 0; }

/* Settings */
.settings-header { min-height: 64px; padding: 0 24px; border-bottom: 1px solid var(--border); }
.full-header h2 { margin: 0; font-size: 15px; font-weight: 550; }
.settings-layout { display: grid; grid-template-columns: 160px minmax(0,600px); gap: 40px; width: min(100%,920px); padding: 32px 24px 60px; margin: 0 auto; }
.settings-tabs { display: flex; flex-direction: column; gap: 3px; }
.settings-tabs button { min-height: 36px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); text-align: left; font-size: 13px; }
.settings-tabs button.active { background: var(--raised); color: var(--text); }
.settings-tabs button:hover { color: var(--text); }
.settings-content { min-width: 0; }
.settings-content h3 { margin: 0 0 20px; font-size: 18px; font-weight: 550; }
.settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.settings-heading h3 { margin: 0; }
.settings-group { overflow: hidden; border: 1px solid var(--border); border-radius: 7px; margin-bottom: 16px; }
.setting-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 50px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.setting-line:last-child { border: 0; }
.setting-line span { color: var(--muted); }
.setting-line strong { font-weight: 400; text-align: right; overflow-wrap: anywhere; }
.setting-line input { width: 16px; height: 16px; accent-color: #aaa; }
.settings-footnote { margin: 12px 0 24px; color: #888; font-size: 12px; }
.device-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px; border-bottom: 1px solid var(--border); }
.device-row:last-child { border: 0; }
.device-row > .icon { color: var(--muted); }
.device-row > div { display: flex; flex-direction: column; flex: 1; min-width: 120px; gap: 3px; overflow-wrap: anywhere; }
.device-row strong { font-size: 13px; font-weight: 500; }
.device-row span { font-size: 12px; color: #999; }
.admin-card { display: grid; gap: 8px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 7px; }
.admin-card span { color: var(--muted); overflow-wrap: anywhere; }
form.settings-group { padding: 18px; }

/* Sign-in */
.auth-screen { min-height: 100dvh; background: var(--bg); }
.auth-panel { display: grid; place-items: center; min-height: 100dvh; padding: 32px 20px; }
.auth-card { width: min(100%,360px); }
.auth-brand { color: #999; font-size: 15px; font-weight: 600; letter-spacing: .05em; margin-bottom: 20px; }
.auth-card h1 { margin: 20px 0; font-size: 25px; line-height: 1.25; font-weight: 550; letter-spacing: -.025em; }
.choice-actions { display: grid; gap: 10px; }
.choice-actions button { min-height: 42px; }
.back-link { min-height: 28px; }
.auth-tabs { display: flex; gap: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.auth-tab { min-height: 40px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; }
.auth-tab.active { color: var(--text); border-bottom-color: #ddd; }
.field { display: block; margin: 0 0 16px; }
.field > span, .address-builder label > span { display: block; margin-bottom: 7px; color: #bbb; font-size: 13px; }
.field > input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #444; border-radius: 6px; background: var(--panel); color: var(--text); }
.field-error { color: var(--danger); font-size: 13px; overflow-wrap: anywhere; }
.field-error:empty { margin: 0; }
.remember-row { display: flex; align-items: center; gap: 9px; margin: 20px 0 0; color: #b0b0b0; font-size: 12px; cursor: pointer; }
.remember-row input { width: 15px; height: 15px; margin: 0; flex: none; accent-color: #bbb; }
.muted-note, .auth-disclosure { color: #929292; font-size: 12px; line-height: 1.6; }
.auth-disclosure { margin: 24px 0 0; }
.qr-panel { display: flex; flex-direction: column; align-items: center; text-align: center; }
.qr-panel img { display: block; width: 220px; height: 220px; padding: 4px; border-radius: 8px; background: white; image-rendering: pixelated; }
.qr-panel p { margin: 14px 0 0; font-size: 13px; }
.qr-panel .muted-note { max-width: 260px; margin-top: 8px; font-size: 12px; }
.qr-match-code { display: block; margin-top: 10px; color: #ddd; font-size: 25px; font-weight: 500; letter-spacing: .15em; font-variant-numeric: tabular-nums; }
.qr-phone-link { margin-top: 14px; color: #aaa; font-size: 12px; text-underline-offset: 3px; }
.qr-panel #qrRefresh { margin-top: 16px; }
.phone-copy { color: #bbb; font-size: 14px; }
.phone-request { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; margin: 16px 0; border-block: 1px solid var(--border); text-align: center; }
.phone-request .qr-match-code { margin: 0; }
.phone-request span:last-child { color: var(--muted); font-size: 12px; }
.phone-account { color: #ddd; overflow-wrap: anywhere; }
#phoneView .primary-button { margin-top: 18px; }
#phoneConfirm button + button, #phoneAuthChoices button + button { margin-top: 10px; }

/* Dialogs */
dialog { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 0; color: var(--text); border: 1px solid #444; border-radius: 9px; background: #252525; box-shadow: 0 24px 60px #0005; }
dialog::backdrop { background: #0007; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.dialog-header h2 { margin: 0; font-size: 18px; font-weight: 550; }
.dialog-description, .dialog-caution { margin: 12px 20px; color: var(--muted); font-size: 13px; }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 20px; }
.mailbox-dialog { width: 460px; }
#storageFolderForm { padding: 20px; }
#storageFolderForm h2 { margin: 0 0 20px; font-size: 18px; font-weight: 550; }
#storageFolderForm .dialog-footer { padding: 4px 0 0; }
#mailboxError { margin-inline: 20px; }
.address-builder { display: flex; align-items: flex-end; gap: 8px; margin: 18px 20px 0; }
.address-builder label { flex: 1; min-width: 0; }
.address-builder input, .address-builder select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #444; border-radius: 6px; background: var(--panel); }
.at-sign { padding-bottom: 10px; color: var(--muted); }
.menu-dialog { width: 480px; }
.menu-editor { max-height: 50vh; padding: 0 14px; overflow: auto; }
.editor-row { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 6px; border-bottom: 1px solid var(--border); }
.editor-row.dragging { opacity: .5; }
.editor-row.drag-over { background: var(--hover); }
.drag-handle { color: #777; cursor: grab; }
.editor-icon { color: #999; }
.editor-name { flex: 1; min-width: 0; font-size: 13px; }
.move-controls { display: flex; }
.move-button { width: 26px; height: 28px; }
.move-button .icon { width: 15px; height: 15px; }
.visibility { position: relative; width: 32px; height: 18px; flex: none; }
.visibility input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.visibility-track { display: block; height: 18px; border-radius: 12px; background: #555; }
.visibility-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #eee; }
.visibility input:checked + .visibility-track { background: #7b91b0; }
.visibility input:checked + .visibility-track::after { transform: translateX(14px); }
.visibility input:focus-visible + .visibility-track { outline: 2px solid var(--accent); outline-offset: 3px; }
.visibility input:disabled + .visibility-track { opacity: .4; }
.compose-dialog { width: 640px; height: min(650px,calc(100dvh - 24px)); }
.compose-dialog form { display: flex; flex-direction: column; height: 100%; }
.compose-header { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 14px 0 20px; border-bottom: 1px solid var(--border); }
.compose-header h2 { margin: 0; font-size: 14px; font-weight: 550; }
.compose-line { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.compose-line > span { width: 48px; flex: none; color: #999; font-size: 13px; }
.compose-line input, .compose-line select { width: 100%; min-width: 0; height: 40px; padding: 0; border: 0; outline-offset: 0; background: transparent; font-size: 13px; }
.compose-dialog textarea { flex: 1; min-height: 130px; padding: 20px; resize: none; border: 0; outline-offset: -3px; background: transparent; font-size: 14px; }
.compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); }
#composeStatus { max-width: 70%; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.toast { position: fixed; bottom: 22px; left: 50%; z-index: 100; max-width: min(480px,calc(100vw - 32px)); padding: 12px 18px; border: 1px solid #444; border-radius: 7px; background: #303b4b; color: var(--text); transform: translateX(-50%); opacity: 0; visibility: hidden; pointer-events: none; font-size: 13px; }
.toast.show { opacity: 1; visibility: visible; }
.no-motion *, .no-motion *::before, .no-motion *::after { transition: none !important; animation: none !important; }

/* Storage toolbar and optional card view */
.header-leading { min-width: 0; }
.storage-header-tools { display: flex; align-items: center; gap: 6px; }
.storage-upload { min-height: 34px; padding-inline: 12px; }
.storage-upload .icon { width: 16px; height: 16px; }
.view-picker { display: flex; gap: 1px; padding: 3px; margin-left: 4px; border-radius: 7px; background: #14192380; }
.view-picker .icon-button { width: 29px; height: 28px; border-radius: 4px; }
.view-picker .icon { width: 16px; height: 16px; }
.view-picker button[aria-pressed="true"] { color: #edf2fd; background: #3b475d; box-shadow: 0 1px 3px #0002; }
.storage-grid .storage-columns { display: none; }
.storage-grid .storage-files { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 16px; }
.storage-grid .storage-file { display: grid; grid-template-columns: 32px minmax(0,1fr); grid-template-rows: 1fr auto; align-items: center; column-gap: 18px; row-gap: 10px; min-height: 132px; padding: 22px 20px; border: 1px solid #354050; border-radius: 12px; background: #222a36; box-shadow: 0 3px 12px #0000000a; }
.storage-grid .storage-file:hover { background: #293448; border-color: #647b9e; }
.storage-grid .storage-file > .icon { grid-row: 1 / span 2; width: 31px; height: 36px; color: #b7c9eb; }
.storage-grid .storage-file-name { align-self: end; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; white-space: normal; overflow-wrap: anywhere; color: #edf2fa; font-size: 14px; line-height: 1.45; font-weight: 550; }
.storage-grid .storage-file-size { align-self: start; grid-column: 2; font-size: 12px; color: #9daec8; }
.storage-grid .folder-size::before { content: "Папка"; }
.storage-grid .storage-download-hint { display: inline; }
.storage-grid .storage-file-date { display: none; }
.storage-grid .storage-overview { padding-top: 0; }
.compact .storage-grid .storage-file { min-height: 114px; }
@media (min-width: 1100px) { .storage-grid .storage-files { grid-template-columns: repeat(auto-fill,300px); } }
@media (min-width: 691px) and (max-width: 900px) { .storage-upload span { display: none; } .storage-upload { width: 34px; padding: 0; } }
@media (max-width: 1050px) { :root { --sidebar: 195px; --list: 290px; } }
@media (max-width: 820px) and (min-width: 691px) {
  .mail-app { --sidebar: 64px; }
  .sidebar .brand-lockup, .sidebar .compose-button span, .sidebar .folder-name, .sidebar .product-link span, .sidebar .nav-header > span { display: none; }
  .sidebar .sidebar-top, .sidebar .nav-header { justify-content: center; margin-inline: 0; }
  .sidebar .compose-button, .sidebar .folder, .sidebar .product-link { justify-content: center; padding: 0; }
}
@media (max-width: 690px) {
  :root { --service-header-height: calc(54px + env(safe-area-inset-top)); }
  .service-header { grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: env(safe-area-inset-top) 12px 0; }
  .header-leading { display: none; }
  .service-header:has(#storageHeaderTools:not([hidden])) { height: calc(102px + env(safe-area-inset-top)); grid-template-rows: 54px 48px; }
  body:has(#storageHeaderTools:not([hidden])) { --service-header-height: calc(102px + env(safe-area-inset-top)); }
  .service-header:has(#storageHeaderTools:not([hidden])) .header-leading { display: flex; grid-column: 1 / -1; grid-row: 2; width: 100%; padding-bottom: 8px; }
  .storage-header-tools { width: 100%; gap: 6px; }
  .view-picker { margin-left: auto; }
  .service-tabs { grid-column: 1; grid-row: 1; }
  .storage-actions { grid-column: 2; grid-row: 1; }
  .service-tabs { justify-self: start; gap: 2px; }
  .service-tabs button { min-height: 34px; padding-inline: 11px; }
  .service-tabs .icon { display: none; }
  .storage-actions { gap: 0; }
  .storage-actions .icon-button { width: 32px; }
  .storage-content { padding: 18px 16px; }
  .storage-grid .storage-files { grid-template-columns: 1fr; gap: 12px; }
  .storage-grid .storage-file { min-height: 112px; padding: 20px; }
  .storage-grid .storage-file-size { text-align: left; }
  .storage-breadcrumbs { margin-top: 0; }
  .storage-breadcrumbs { font-size: 13px; }
  .storage-columns, .storage-file { grid-template-columns: 18px minmax(0,1fr) 62px; gap: 9px; padding-inline: 6px; }
  .storage-columns span:last-child, .storage-file-date { display: none; }
  .storage-file { min-height: 50px; }
  .storage-file-size { text-align: right; }
  .storage-overview { padding-inline: 0; gap: 12px; }
  .mail-app, .mail-app.has-selection { display: block; overflow: hidden; }
  .mobile-menu, .mobile-close, .mobile-back { display: inline-grid; }
  .sidebar { position: absolute; inset: 0 auto 0 0; z-index: 12; width: min(280px,85vw); transform: translateX(-102%); box-shadow: 12px 0 40px #0004; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .mobile-scrim { position: absolute; inset: 0; z-index: 11; background: #0007; }
  .sidebar-open .mobile-scrim { display: block; }
  .sidebar-top #collapseSidebar { display: none; }
  .sidebar-collapsed .brand-lockup, .sidebar-collapsed .compose-button span, .sidebar-collapsed .folder-name, .sidebar-collapsed .product-link span, .sidebar-collapsed .nav-header > span { display: initial; }
  .sidebar-collapsed .sidebar-top { justify-content: space-between; margin-inline: 4px; }
  .sidebar-collapsed .nav-header { justify-content: space-between; margin-inline: 10px; }
  .sidebar-collapsed .compose-button, .sidebar-collapsed .folder, .sidebar-collapsed .product-link { justify-content: flex-start; padding-inline: 10px; }
  .mail-list, .reader, .full-view { position: absolute; inset: 0; }
  .reader { z-index: 3; transform: translateX(100%); }
  .reading .reader { transform: translateX(0); }
  .reading .mail-list { visibility: hidden; }
  .list-header { padding: 12px; }
  .reader-toolbar { justify-content: space-between; padding: 10px; }
  .toolbar-actions { gap: 0; }
  .tool-button { width: 32px; }
  .message-detail { padding: 24px 20px 50px; }
  .sender-block { grid-template-columns: 36px minmax(0,1fr); }
  .sender-time { grid-column: 2; }
  .settings-header { min-height: 58px; padding: 0 12px; }
  .settings-layout { display: block; padding: 20px 16px 50px; }
  .settings-tabs { flex-direction: row; overflow: auto; margin-bottom: 24px; padding-bottom: 3px; }
  .settings-tabs button { flex: none; white-space: nowrap; }
  .setting-line { gap: 10px; padding: 12px; }
  .setting-line strong { max-width: 62%; }
  .auth-panel { padding: 28px 22px; }
  .field > input { font-size: 16px; }
  .compose-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .address-builder input, .address-builder select { padding-inline: 7px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
/* File manager */
.storage-file { user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.storage-file.selected { background: #33435d; color: #f5f7fd; box-shadow: inset 3px 0 #b7c9ed; }
.storage-grid .storage-file.selected { background: #30415c; border-color: #a4bde6; box-shadow: 0 0 0 1px #a4bde633; }
.storage-file.is-cut { opacity: .45; }
.storage-overview { justify-content: space-between; gap: 20px; }
.storage-selection { color: #8392a9; }
.storage-location { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.storage-location:has(> [hidden]):not(:has(> :not([hidden]))) { display: none; }
.storage-location:has(#storageBreadcrumbs:not([hidden])) { display: block; }
.storage-location .storage-breadcrumbs { margin: 0; }
.storage-location:has(#storageBreadcrumbs[hidden]):has(#storageHome[hidden]) { display: none; }
#storageTrashTitle { font-size: 16px; font-weight: 550; }
.storage-filter { display: flex; align-items: center; gap: 6px; max-width: 440px; margin: 0 0 20px auto; }
.storage-filter input { min-width: 0; flex: 1; height: 36px; padding: 0 12px; border: 1px solid #414f63; border-radius: 7px; background: #242d3b; }
.storage-operation { padding: 12px 16px; margin: 0 0 20px; border: 1px solid #455778; border-radius: 8px; background: #273449; color: #d3e0f7; }
.file-context-menu { width: 276px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; padding: 5px; border-radius: 9px; background: #293140; box-shadow: 0 10px 36px #0007; }
.file-context-menu button { justify-content: space-between; gap: 18px; min-height: 29px; padding: 0 10px; font-size: 12px; }
.file-context-menu button:disabled { opacity: .35; }
.file-context-menu kbd { font: 11px -apple-system,BlinkMacSystemFont,sans-serif; color: #9eabc1; white-space: nowrap; }
.file-context-menu button:focus-visible, .file-context-menu button:hover:not(:disabled) { background: #536e9b; color: white; }
.file-context-menu button:focus-visible kbd, .file-context-menu button:hover:not(:disabled) kbd { color: #dce8fb; }
.context-separator { margin: 5px 7px; border-top: 1px solid #ffffff17; }
.file-context-menu .context-danger { color: #eeb5b5; }
.file-action-dialog { padding: 24px; }
.file-action-dialog h2 { margin: 0 0 16px; font-size: 19px; }
.file-action-dialog .dialog-description:empty { display: none; }
.file-action-dialog .dialog-footer { padding: 20px 0 0; }
.destination-folders { min-height: 90px; max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 7px; }
.destination-folders button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 12px; background: transparent; border: 0; border-bottom: 1px solid var(--border); text-align: left; }
.destination-folders button:hover { background: var(--raised); }
.destination-folders button span { flex: 1; overflow-wrap: anywhere; }
.destination-folders p { margin: 20px; color: var(--muted); font-size: 13px; }
#fileDestinationCrumbs { margin: 0 0 12px; }
.file-preview-dialog { width: min(860px,94vw); }
.file-preview-body { min-height: 100px; max-height: 65dvh; padding: 24px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.file-preview-body img { display: block; max-width: 100%; max-height: 60dvh; margin: auto; object-fit: contain; }
.file-preview-body iframe { display: block; width: 100%; height: 60dvh; border: 0; background: white; }
.file-preview-body pre { margin: 0; white-space: pre-wrap; font: 13px/1.7 ui-monospace,SFMono-Regular,monospace; }
.file-preview-dialog .dialog-header h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.document-preview-dialog { width: min(1120px,96vw); height: min(960px,92dvh); max-height: 92dvh; }
.document-preview-dialog[open] { display: flex; flex-direction: column; }
.document-preview-dialog .dialog-header, .document-preview-dialog .dialog-footer { flex-shrink: 0; }
.document-preview-dialog .dialog-footer { padding: 10px 20px; }
.document-preview-dialog .file-preview-body { flex: 1; min-height: 0; max-height: none; padding: 0; overflow: hidden; white-space: normal; }
.preview-loading, .preview-error { min-height: 180px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px; text-align: center; color: var(--muted); }
.preview-error p { max-width: 460px; margin: 0; }
.preview-spinner { width: 26px; height: 26px; border: 2px solid #33425a; border-top-color: #80caff; border-radius: 50%; animation: preview-spin .8s linear infinite; }
@keyframes preview-spin { to { transform: rotate(360deg); } }
.document-reader { height: 100%; min-height: 0; display: flex; flex-direction: column; background: #101722; }
.document-toolbar { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px; border-bottom: 1px solid var(--border); background: var(--panel); }
.document-pages, .document-pages label { display: flex; align-items: center; gap: 8px; }
.document-pages label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.document-pages input { width: 56px; padding: 7px 4px; text-align: center; border-radius: 7px; -moz-appearance: textfield; }
.document-pages input::-webkit-inner-spin-button, .document-pages input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.document-pages .icon-button { font-size: 26px; width: 32px; height: 32px; }
.document-toolbar select { width: auto; min-width: 130px; padding: 8px 28px 8px 10px; font-size: 13px; border-radius: 7px; }
.document-viewport { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 24px; outline-offset: -3px; }
.document-paper { position: relative; margin: 0 auto; background: #fff; box-shadow: 0 5px 24px #0005; color-scheme: light; }
.document-paper canvas { display: block; }
.document-status { min-height: 29px; padding: 4px 16px; font-size: 12px; text-align: center; color: var(--muted); flex-shrink: 0; }
/* PDF.js text positioning, scoped to the reader; text remains selectable. */
.document-text-layer { position: absolute; inset: 0; overflow: clip; line-height: 1; letter-spacing: normal; word-spacing: normal; text-align: initial; text-size-adjust: none; -webkit-text-size-adjust: none; transform-origin: 0 0; --min-font-size: 1; --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size)); --min-font-size-inv: calc(1 / var(--min-font-size)); }
.document-text-layer :is(span,br) { position: absolute; color: transparent; white-space: pre; cursor: text; transform-origin: 0 0; -webkit-user-select: text; user-select: text; }
.document-text-layer > :not(.markedContent), .document-text-layer .markedContent span:not(.markedContent) { z-index: 1; --font-height: 0; font-size: calc(var(--text-scale-factor) * var(--font-height)); --scale-x: 1; --rotate: 0deg; transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv)); }
.document-text-layer .markedContent { display: contents; }
.document-text-layer ::selection { background: #378bfa55; }
@media (max-width: 690px) { .document-preview-dialog { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; border-radius: 0; } .document-toolbar { padding: 8px 10px; } .document-viewport { padding: 16px 24px; } }
@media (prefers-reduced-motion: reduce) { .preview-spinner { animation: none; } }
@media (min-width: 691px) and (max-width: 1080px) { .storage-upload span { display: none; } .storage-upload { width: 34px; padding: 0; } .storage-header-tools { gap: 3px; } }
@media (min-width: 691px) and (max-width: 760px) { .service-tabs button { padding-inline: 10px; } .service-header { padding-inline: 16px; gap: 6px; } }
@media (max-width: 690px) { .file-context-menu button { min-height: 36px; font-size: 13px; } .file-context-menu kbd { display: none; } .file-preview-body { padding: 16px; } .storage-filter { max-width: none; } }

.storage-file.drag-target, .storage-grid .storage-file.drag-target { border-color: #bed3ff; background: #3e547b; box-shadow: inset 0 0 0 2px #adc4ed; }

/* Selection is explicit; actions appear only when needed. */
.storage-select-toggle { min-height: 34px; padding: 0 11px; font-size: 12px; white-space: nowrap; }
.storage-select-toggle[aria-pressed="true"] { color: #d8e7ff; background: #3b4e6a; }
.storage-selection-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; margin: -8px 0 20px; padding: 8px 12px; border: 1px solid #41516a; border-radius: 9px; background: #232e3f; box-shadow: 0 3px 12px #0002; }
.selection-summary, .selection-actions { display: flex; align-items: center; gap: 12px; }
.selection-summary strong { font-size: 13px; font-weight: 550; white-space: nowrap; }
.selection-summary .text-button { font-size: 12px; white-space: nowrap; }
.selection-actions { gap: 4px; }
.selection-actions button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 6px; color: #d3ddee; background: transparent; font-size: 12px; white-space: nowrap; }
.selection-actions button:hover:not(:disabled) { background: #34435b; }
.selection-actions button:disabled { opacity: .35; }
.selection-actions .icon { width: 16px; height: 16px; }
.selection-actions .selection-delete { color: #f2c2c2; background: #563637; }
.selection-actions .selection-delete:hover:not(:disabled) { background: #714144; }
.file-selection-check { display: none; position: absolute; top: 10px; right: 10px; width: 21px; height: 21px; border: 1px solid #75859f; border-radius: 50%; background: #1c2533; }
.file-selection-check .icon { width: 15px; height: 15px; opacity: 0; }
.storage-file { position: relative; }
.selecting .file-selection-check { display: grid; place-items: center; }
.selecting .storage-file.selected .file-selection-check { background: #b6caee; border-color: #b6caee; color: #172232; }
.selecting .storage-file.selected .file-selection-check .icon { opacity: 1; }
.selecting.storage-grid .storage-file { padding-right: 40px; }
.selecting:not(.storage-grid) .storage-file { padding-right: 42px; }
.selecting:not(.storage-grid) .file-selection-check { top: 13px; right: 8px; }
.storage-overview .storage-trash-link { margin-left: auto; font-size: 12px; color: #8392a9; }
.storage-overview .storage-trash-link:hover { color: #d1dcef; }
.sort-submenu { width: 180px; z-index: 61; }
.storage-marquee { position: fixed; z-index: 9; pointer-events: none; border: 1px solid #aac4ef; background: #89b0ec24; border-radius: 3px; }
.storage-breadcrumbs .drag-target { color: #e9f1ff; background: #3e547b; border-radius: 4px; }
@media (max-width: 900px) { #storageRefresh { display: none; } .storage-select-toggle { padding-inline: 8px; } }
@media (max-width: 690px) { .storage-upload span { display: none; } .storage-upload { width: 34px; padding: 0; } .storage-selection-bar { flex-wrap: wrap; gap: 8px; padding: 10px; } .selection-summary { width: 100%; justify-content: space-between; } .selection-actions { width: 100%; justify-content: space-between; } .selection-actions button { padding-inline: 7px; font-size: 11px; } .selection-actions .icon { width: 14px; height: 14px; } }

html:has(#app:not([hidden])), body:has(#app:not([hidden])) { overflow: hidden; }
body:has(#app:not([hidden])) { display: flow-root; }
.storage-selection-bar { position: fixed; top: auto; bottom: 24px; left: 28px; right: 28px; margin: 0; z-index: 20; }
.selecting .storage-selection-bar { position: sticky; top: 0; bottom: auto; left: auto; right: auto; margin: -8px 0 20px; }
@media (max-width: 690px) { .storage-selection-bar { left: 16px; right: 16px; bottom: 16px; } }

.storage-content.has-files-selected:not(.selecting) { padding-bottom: 128px; }

/* File types and photo thumbnails */
.storage-columns, .storage-file { grid-template-columns: 30px minmax(0,1fr) 96px 140px; }
.file-mark { position: relative; display: grid; place-items: center; width: 28px; height: 34px; flex: none; color: #aab7ca; }
.file-kind-icon { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.file-paper { fill: color-mix(in srgb,currentColor 12%,#222a36); }
.file-mark-label { position: absolute; inset: auto 0 1px; display: block; padding: 1px 0; border-radius: 3px; color: #111b2b; background: currentColor; font-size: 6px; line-height: 1.2; font-weight: 800; text-align: center; letter-spacing: .02em; }
.file-mark-label { background: var(--file-tint,#aab7ca); }
.file-kind-document { color: #92b8fa; --file-tint: #92b8fa; }
.file-kind-presentation { color: #f1b180; --file-tint: #f1b180; }
.file-kind-spreadsheet { color: #86c7aa; --file-tint: #86c7aa; }
.file-kind-pdf { color: #ed9e9e; --file-tint: #ed9e9e; }
.file-kind-archive { color: #ccb1ed; --file-tint: #ccb1ed; }
.file-kind-image { color: #9ec9c8; }
.file-kind-video { color: #c3a7eb; }
.file-kind-audio { color: #e9adcb; }
.file-kind-code { color: #b2beec; --file-tint: #b2beec; }
.file-kind-text { color: #c4cbd6; --file-tint: #c4cbd6; }
.file-kind-folder { color: #b7c9eb; }
.file-kind-folder > .icon { width: 26px; height: 26px; }
.file-thumbnail { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; background: #222a36; box-shadow: 0 0 0 1px #ffffff20; }
.storage-grid .storage-file { grid-template-columns: 54px minmax(0,1fr); column-gap: 16px; }
.storage-grid .file-mark { grid-row: 1 / span 2; width: 44px; height: 54px; }
.storage-grid .file-mark-label { bottom: 2px; padding: 3px 0; font-size: 9px; border-radius: 4px; }
.storage-grid .file-kind-folder > .icon { width: 40px; height: 40px; }
.storage-grid .file-mark.has-thumbnail { width: 54px; height: 64px; }
.storage-grid .file-thumbnail { border-radius: 6px; }
@media (max-width: 690px) { .storage-columns, .storage-file { grid-template-columns: 28px minmax(0,1fr) 62px; } .storage-grid .storage-file { grid-template-columns: 54px minmax(0,1fr); } }

/* Supplied VE3 brand icon */
.auth-brand img { display: block; width: 88px; height: 88px; object-fit: contain; border-radius: 9px; }
.storage-brand img { display: block; width: 34px; height: 34px; object-fit: contain; border-radius: 6px; }

/* VE3 sign-in: one shared responsive shell for every authentication step. */
.auth-screen {
  position: relative; isolation: isolate; overflow: hidden; color: #eef5ff;
  background: radial-gradient(ellipse at 8% 14%, #123a704d, transparent 44%),
    radial-gradient(ellipse at 28% 82%, #1231b357, transparent 48%),
    radial-gradient(ellipse at 84% 9%, #176c9c29, transparent 42%), #070d1c;
}
.auth-screen::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 940px; height: 940px; left: -400px; top: 18%; border-radius: 50%;
  border: 1px solid #39cfff20; box-shadow: 0 0 0 80px #3888ff06, 0 0 0 160px #3888ff04;
}
.auth-panel { width: min(100%, 1160px); margin: auto; min-height: 100dvh; padding: 44px 48px;
  display: grid; grid-template-columns: minmax(0,1fr) 420px; align-items: center; justify-items: stretch; gap: 70px; }
.auth-intro { padding: 20px 0; }
.auth-brand { margin: 0 0 22px; }
.auth-brand img { width: 240px; height: 200px; object-fit: contain; border-radius: 0; margin-left: -16px; filter: drop-shadow(0 18px 34px #006fff22); }
.auth-intro h2 { margin: 0; font-size: clamp(32px,3.8vw,48px); line-height: 1.12; letter-spacing: -.045em; font-weight: 650; }
.auth-intro h2 span { color: #82c9ff; }
.auth-intro > p { max-width: 330px; margin: 22px 0 0; color: #a4b8d5; font-size: 15px; line-height: 1.7; }
.auth-services { display: flex; gap: 25px; margin-top: 32px; color: #a4bddf; font-size: 13px; }
.auth-services > span { display: inline-flex; align-items: center; gap: 9px; }
.auth-services .icon { color: #65c7fb; width: 18px; height: 18px; }
.auth-card { width: 100%; padding: 30px 32px 24px; border: 1px solid #8cbdff22; border-radius: 24px;
  background: linear-gradient(145deg,#162743c9,#0d172bee); box-shadow: 0 28px 90px #02061060, inset 0 1px #ffffff06; }
.auth-card h1 { margin: 12px 0 22px; font-size: 29px; font-weight: 650; letter-spacing: -.035em; }
.auth-card .back-link { color: #91a7c5; font-size: 12px; }
.auth-card .auth-tabs { gap: 0; padding: 4px; margin-bottom: 22px; background: #060e2070; border: 1px solid #9abfff12; border-radius: 11px; }
.auth-card .auth-tab { flex: 1; min-height: 36px; border: 0; border-radius: 7px; color: #91a8c8; font-size: 13px; }
.auth-card .auth-tab.active { background: #223c60; color: #edf6ff; box-shadow: 0 2px 6px #0002; }
.auth-card .field > span { color: #b4c5de; }
.auth-card .field > input { height: 46px; border: 1px solid #94baff26; border-radius: 10px; background: #0914289c; }
.auth-card .field > input:focus { border-color: #57baff; outline: 2px solid #57baff20; outline-offset: 0; }
.auth-card .primary-button { min-height: 44px; border-radius: 10px; background: linear-gradient(110deg,#36c6ed,#3978ff); color: #fff; font-weight: 600; box-shadow: 0 5px 20px #007dff20; }
.auth-card .primary-button:hover:not(:disabled) { background: linear-gradient(110deg,#58d7f5,#588eff); }
.auth-card .secondary-button { min-height: 42px; border-radius: 10px; background: #213653; }
.auth-card .muted-note, .auth-disclosure { color: #91a5c3; }
.auth-card .text-button, .auth-card .qr-phone-link { color: #8dceff; }
.auth-card .remember-row { color: #b1c1da; margin-top: 14px; line-height: 1.5; }
.auth-card .remember-row input { accent-color: #3da9ff; }
.auth-card .qr-panel img { width: 204px; height: 204px; padding: 8px; border-radius: 15px; box-shadow: 0 8px 24px #0003; }
.auth-card .qr-panel p { margin-top: 12px; font-size: 12px; }
.auth-card .qr-match-code { font-size: 23px; color: #d6eaff; margin-top: 8px; }
.auth-card .qr-phone-link { margin-top: 12px; }
.auth-card #sessionDurationHint { margin-top: 20px; font-size: 11px; }
.auth-card .auth-disclosure { margin-top: 20px; padding-top: 16px; border-top: 1px solid #9abfff14; font-size: 11px; text-align: center; }
@media (max-width: 900px) {
  .auth-panel { gap: 32px; padding: 32px; grid-template-columns: minmax(0,1fr) 380px; }
  .auth-intro h2 { font-size: 34px; }
  .auth-brand img { width: 180px; height: 160px; }
  .auth-card { padding: 26px; }
}
@media (max-width: 700px) {
  .auth-panel { display: flex; flex-direction: column; gap: 22px; padding: 26px 18px; justify-content: center; }
  .auth-intro { display: flex; align-items: center; gap: 14px; width: min(100%,420px); padding: 0 8px; }
  .auth-brand { margin: 0; flex: none; }
  .auth-brand img { margin: 0; width: 64px; height: 60px; }
  .auth-intro h2 { font-size: 22px; letter-spacing: -.035em; }
  .auth-intro > p, .auth-services { display: none; }
  .auth-card { max-width: 420px; padding: 24px; border-radius: 20px; }
  .auth-card h1 { font-size: 26px; }
}

@media (min-width: 701px) and (max-height: 800px) {
  .auth-panel { padding-top: 24px; padding-bottom: 24px; }
  .auth-card { padding-top: 22px; padding-bottom: 20px; }
  .auth-card h1 { margin: 8px 0 16px; font-size: 26px; }
  .auth-card .auth-tabs { margin-bottom: 18px; }
  .auth-card .qr-panel img { width: 180px; height: 180px; }
  .auth-card .qr-panel p { margin-top: 8px; }
  .auth-card .qr-phone-link { margin-top: 9px; }
  .auth-card #sessionDurationHint { margin-top: 14px; }
  .auth-card .remember-row { margin-top: 10px; }
  .auth-card .auth-disclosure { margin-top: 14px; padding-top: 12px; }
}

/* Keep the entry screen focused on the mark and the sign-in form. */
.auth-intro { display: grid; place-items: center; }
.auth-brand { margin: 0; }
.auth-brand img { width: 360px; height: 310px; margin: 0; max-width: 100%; }
@media (min-width: 701px) { .auth-card .qr-phone-link { display: none; } }
@media (max-width: 900px) and (min-width: 701px) { .auth-brand img { width: 260px; height: 240px; } }
@media (max-width: 700px) { .auth-intro { display: flex; justify-content: center; } .auth-brand img { width: 84px; height: 72px; } }

/* VE3: shared visual language with the native iPhone app. */
:root {
  --bg: #0b1222; --panel: #121d30; --raised: #1b2b43; --hover: #243a59;
  --text: #eef4ff; --muted: #8fA2be; --accent: #75bcff; --danger: #ff9dA8;
  --border: #c1dbff14; --glass: #142139a6; --glass-strong: #16243beF;
  --blue: #2584ff; --sidebar: 224px; --list: 350px; --service-header-height: 80px;
  --round-font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, sans-serif;
}
body { background: var(--bg); font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 5% 8%, #16458e30, transparent 48%), radial-gradient(ellipse at 92% 88%, #243c8f20, transparent 48%), radial-gradient(ellipse at 82% 0%, #187a9a0d, transparent 36%); }
button { transition: background .18s, border-color .18s, box-shadow .18s, color .18s; }
button, a { touch-action: manipulation; }
::selection { background: #2584ff55; }
:focus-visible { outline: 2px solid #75bcff; outline-offset: 4px; }
:is(h1,h2,h3,.service-tabs button,.settings-tabs button,.sender,.storage-file-name,.profile-name) { font-family: var(--round-font); }
:is(.primary-button,.secondary-button,.reply-button) { min-height: 40px; padding: 0 18px; border: 1px solid #c1dcff16; border-radius: 999px; font-size: 13px; font-weight: 600; }
.primary-button, .auth-card .primary-button { color: white; background: linear-gradient(160deg,#3596ff,#1670ed); border-color: #99ceff42; box-shadow: inset 0 1px #ffffff30, 0 4px 14px #0064ff1c; }
.primary-button:hover:not(:disabled), .auth-card .primary-button:hover:not(:disabled) { background: linear-gradient(160deg,#51a6ff,#2680ff); }
.secondary-button, .reply-button, .auth-card .secondary-button { color: #dceaff; background: #b4d1ff0c; box-shadow: inset 0 1px #ffffff08; }
.secondary-button:hover:not(:disabled), .reply-button:hover { background: #9fc6ff1a; }
.icon-button, .tool-button, .configure-button, .move-button, .reveal-button { width: 36px; height: 36px; border-radius: 50%; color: #9eb3d2; }
.icon-button:hover, .tool-button:hover, .configure-button:hover, .move-button:hover:not(:disabled), .reveal-button:hover { background: #9dc5ff13; }
.icon-button.active { color: #8bc6ff; background: #2584ff20; }
.text-button, .back-link, .subtle-link { color: var(--accent); }
.service-header { padding-inline: 24px; gap: 20px; grid-template-columns: minmax(0,1fr) auto; background: #0e192bba; border-color: #c1dbff0e; -webkit-backdrop-filter: blur(28px) saturate(135%); backdrop-filter: blur(28px) saturate(135%); }
.service-tabs { gap: 4px; padding: 5px; border-radius: 999px; border: 1px solid #d4e7ff1a; background: #a7caff09; box-shadow: inset 0 1px #ffffff09, 0 4px 20px #00000014; }
.service-tabs button { min-height: 38px; padding-inline: 16px; border-radius: 999px; font-size: 13px; color: #92a8c7; }
.service-tabs button.active { color: #a8d7ff; background: #2584ff23; box-shadow: inset 0 1px #99caff10; }
.service-tabs button:hover { background: #9bcaff12; }
.service-tabs .icon { width: 18px; height: 18px; }
.storage-actions { display: none; }
.header-leading { display: flex; align-items: center; gap: 18px; }
.storage-brand img { width: 34px; height: 34px; border-radius: 0; }
.storage-header-tools { gap: 8px; }
.storage-upload { min-height: 38px; padding-inline: 16px; }
.view-picker { padding: 3px; gap: 2px; background: #030a174a; border: 1px solid #b4d4ff14; border-radius: 999px; }
.view-picker .icon-button { width: 30px; height: 30px; border-radius: 50%; }
.view-picker button[aria-pressed="true"] { background: #a1c9ff21; color: #d5eaff; }
.storage-select-toggle { min-height: 36px; font-size: 12px; padding-inline: 14px; }
.mail-app, .mail-list, .reader { background: transparent; }
.storage-content { padding: 26px 32px 120px; }
.storage-overview { align-items: center; gap: 16px; min-height: 34px; padding-bottom: 22px; font-size: 12px; color: var(--muted); }
.storage-selection { color: #9caec7; }
.storage-overview .storage-trash-link { color: #8297b5; }
.storage-space { font-variant-numeric: tabular-nums; }
.storage-location { margin-bottom: 18px; }
.storage-breadcrumbs { gap: 10px; }
.storage-breadcrumbs button { font-size: 14px; }
.storage-columns { padding: 0 14px 10px; border-color: var(--border); color: #7b90ae; }
.storage-file { padding: 10px 14px; min-height: 58px; border-color: #bfd5ff0b; border-radius: 12px; }
.storage-file-name { font-size: 14px; font-weight: 500; }
.storage-file:hover { background: #a6caff08; }
.storage-file.selected { background: #2584ff20; box-shadow: inset 3px 0 #409bff; }
.storage-grid .storage-files { grid-template-columns: repeat(auto-fill,minmax(152px,1fr)); gap: 12px 18px; align-content: start; }
.storage-grid .storage-file { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; min-height: 188px; padding: 18px 12px 14px; border: 1px solid transparent; border-radius: 22px; background: transparent; box-shadow: none; }
.storage-grid .storage-file:hover { background: #96c2ff08; border-color: #c1dbff0a; }
.storage-grid .storage-file.selected { background: #2584ff18; border-color: #5dabff4d; box-shadow: inset 0 1px #afd8ff0d; }
.storage-grid .storage-file-name { display: -webkit-box; -webkit-line-clamp: 2; width: 100%; margin-top: 13px; text-align: center; font-size: 13px; line-height: 1.4; color: var(--text); font-weight: 500; }
.storage-grid .storage-file-size { margin-top: 5px; font-size: 11px; text-align: center; color: #8197b5; }
.storage-grid .file-mark { width: 62px; height: 76px; margin: 2px auto 0; filter: drop-shadow(0 6px 8px #00000018); }
.file-kind-icon { stroke-width: 1.1; }
.file-paper { fill: #eaf2ff; stroke: #f7faff; }
.file-kind-icon > path:not(.file-paper) { stroke: var(--file-tint,#7e9ec7); }
.file-mark-label { color: white; background: var(--file-tint,#7495c7); border: 1px solid #ffffff20; }
.storage-grid .file-mark-label { inset: auto -4px 5px; font-size: 10px; padding: 4px 0; border-radius: 5px; box-shadow: 0 2px 5px #0002; }
.file-kind-document { --file-tint: #347fe4; }
.file-kind-presentation { --file-tint: #e58b43; }
.file-kind-spreadsheet { --file-tint: #37a779; }
.file-kind-pdf { --file-tint: #e76372; }
.file-kind-archive { --file-tint: #9771d4; }
.file-kind-code { --file-tint: #6d84ca; }
.file-kind-text { --file-tint: #8598b4; }
.file-kind-folder { color: #3ba0ff; }
.file-folder-art { width: 100%; height: 100%; overflow: visible; }
.storage-grid .file-kind-folder { width: 86px; height: 76px; }
.storage-grid .file-mark.has-thumbnail { width: 94px; height: 76px; }
.file-thumbnail { border-radius: 5px; background: var(--panel); }
.storage-grid .file-thumbnail { border-radius: 10px; box-shadow: 0 4px 14px #0003, 0 0 0 1px #e0edff14; }
.storage-empty { min-height: min(52vh,460px); gap: 10px; }
.storage-empty strong { font: 600 18px var(--round-font); color: #bdcce1; }
.storage-empty::before { content: ""; width: 64px; height: 64px; margin-bottom: 8px; border-radius: 22px; background: #2584ff0d; border: 1px solid #6eb7ff17; }
.storage-selection-bar { left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 48px); padding: 10px 16px; border: 1px solid #c3ddff25; border-radius: 999px; background: #182941e8; box-shadow: inset 0 1px #ffffff12, 0 12px 40px #0004; -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); }
.selecting .storage-selection-bar { width: auto; max-width: none; transform: none; border-radius: 22px; }
.selection-actions button { min-height: 34px; border-radius: 999px; }
.selection-actions .selection-delete { color: #ffadb7; background: #ff60731a; }
.file-selection-check { border-color: #77a2d775; background: #12243c; }
.selecting .storage-file.selected .file-selection-check { color: white; background: #2584ff; border-color: #6db6ff; }
.selecting.storage-grid .storage-file { padding-right: 12px; }
.context-menu { border: 1px solid #b9d5ff25; border-radius: 16px; background: #1b2b43f2; box-shadow: inset 0 1px #ffffff0a, 0 12px 40px #0005; -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); }
.context-menu button { border-radius: 9px; min-height: 32px; }
.context-menu button:hover:not(:disabled), .context-menu button:focus-visible { background: #2584ff44; }
.context-separator { border-color: var(--border); margin-block: 7px; }
.storage-filter input, .search, .field > input, .auth-card .field > input, .address-builder input, .address-builder select, .document-toolbar select, .document-pages input { background: #050d1d45; border: 1px solid #a8ceff1c; border-radius: 16px; color: var(--text); box-shadow: inset 0 1px 3px #0001; }
.field > input, .auth-card .field > input { height: 48px; padding-inline: 16px; }
.field > span, .auth-card .field > span, .address-builder label > span { color: #9eb3d1; font-size: 12px; margin-bottom: 8px; }
input::placeholder, textarea::placeholder { color: #7286a3; opacity: 1; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #469eff55; border-color: #58aaff80; outline-offset: 0; }
.storage-error { border-radius: 16px; background: #fc667716; color: #ffb5be; }
.storage-progress, .storage-operation { border-radius: 18px; background: var(--glass); border: 1px solid var(--border); }
.storage-progress progress { accent-color: var(--blue); }
.storage-drop-overlay { border-color: #62b5ff; border-radius: 26px; background: #10284ce8; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
/* Mail uses the same free list, coloured avatars and glass controls as iPhone. */
.sidebar { padding: 22px 14px 16px; border-color: #c1dbff0e; background: #0e192946; }
.brand-lockup { font: 700 20px var(--round-font); color: var(--text); }
.sidebar-top { margin: 0 6px 22px; height: 34px; }
.compose-button { min-height: 42px; }
.nav-header { color: #6f86a6; font-size: 11px; margin-top: 22px; }
.folder, .product-link { min-height: 42px; border-radius: 14px; color: #91a6c4; }
.folder.active, .product-link.active { background: #2584ff19; color: #a8d7ff; }
.folder:hover, .product-link:hover { background: #9ac7ff0b; }
.folder .icon, .product-link .icon { color: #75b7ff; width: 19px; height: 19px; }
.folder-name { font-size: 13px; }
.list-header { min-height: 90px; padding: 22px 26px 18px; border-color: #c1dbff0c; }
.list-title h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.list-subtitle { color: #7e94b3; font-size: 12px; margin-top: 3px; }
.mail-items { padding: 8px 12px 24px; }
.message-card { position: relative; grid-template-columns: 44px minmax(0,1fr); gap: 14px; padding: 16px 14px; border-color: #bfd5ff0b; border-radius: 16px; }
.message-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(145deg,#398dff35,#31c6ed19); border: 1px solid #7fbdff1c; color: #9bd9ff; font: 600 17px var(--round-font); }
.message-card .unread-dot { position: absolute; width: 6px; height: 6px; margin: 0; left: 8px; top: 37px; background: #4fcaff; }
.message-card:hover { background: #9ac7ff08; }
.message-card.selected { background: #2584ff1c; }
.sender { font-size: 14px; font-weight: 600; }
.time { font-size: 11px; color: #7e94b3; }
.subject { margin-top: 4px; font-size: 13px; color: #c0cee1; }
.preview { margin-top: 3px; font-size: 12px; color: #7289a9; }
.reader-toolbar { min-height: 90px; border-color: #c1dbff0c; }
.message-detail { max-width: 940px; margin: 24px auto; padding: 28px 30px 40px; border: 1px solid #bdd9ff12; border-radius: 26px; background: #15213a70; }
.message-heading { font: 700 25px/1.25 var(--round-font); }
.avatar { width: 42px; height: 42px; color: #a6dcff; background: linear-gradient(140deg,#2b7cf03b,#26bfd71f); border: 1px solid #7fc0ff1a; font: 600 16px var(--round-font); }
.sender-block { grid-template-columns: 42px minmax(0,1fr) auto; }
.sender-name { font-size: 14px; }
.message-content { line-height: 1.8; color: #d7e1f1; }
.attachment-notice a { display: inline-block; padding: 6px 12px; margin: 3px; border-radius: 12px; background: #2584ff15; text-decoration: none; }
.empty-state { color: #8096b5; }
.empty-state .icon { color: #629fe1; width: 32px; height: 32px; }
.mail-lock { background: #0b1222db; -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.mail-lock-card { padding: 32px; max-width: 420px; border: 1px solid var(--border); border-radius: 28px; background: var(--glass); }
.mail-lock-card > .icon { color: #71b9ff; }
/* Profile, sessions and preferences. */
.settings-header { min-height: 88px; padding-inline: 32px; border: 0; }
.full-header h2 { font-size: 22px; font-weight: 700; }
.settings-layout { grid-template-columns: 180px minmax(0,620px); gap: 40px; width: min(100%,980px); padding-top: 8px; }
.settings-tabs { align-self: start; padding: 6px; border: 1px solid #bfd8ff12; border-radius: 24px; background: #accdff05; gap: 4px; }
.settings-tabs button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding-inline: 14px; border-radius: 18px; font-size: 13px; }
.settings-tabs button.active { background: #2584ff1b; color: #a4d3ff; }
.settings-tabs .icon { width: 17px; height: 17px; color: #78b7ff; }
.settings-content h3 { font-size: 20px; font-weight: 700; }
.settings-group, .admin-card { border: 1px solid #bfd8ff15; border-radius: 24px; background: linear-gradient(140deg,#91b8f00c,#9abfff04); box-shadow: inset 0 1px #ffffff05; }
.setting-line { min-height: 62px; padding: 16px 20px; font-size: 14px; border-color: #c1dbff0c; }
.setting-line strong { font-weight: 500; color: #d9e7fa; }
.setting-line span { color: #9eb1cd; }
.setting-line input[type="checkbox"] { appearance: none; -webkit-appearance: none; position: relative; width: 42px; height: 26px; flex: none; margin: 0; border: 1px solid #aec8ff1a; border-radius: 999px; background: #99b8e025; transition: background .18s; }
.setting-line input[type="checkbox"]::after { content: ""; position: absolute; width: 20px; height: 20px; left: 2px; top: 2px; background: #eef4ff; border-radius: 50%; box-shadow: 0 1px 3px #0003; transition: transform .18s; }
.setting-line input:checked { background: #2584ff; }
.setting-line input:checked::after { transform: translateX(16px); }
.settings-footnote { color: #768caa; line-height: 1.7; font-size: 12px; padding-inline: 6px; }
.profile-card { display: flex; align-items: center; gap: 20px; padding: 24px; margin-bottom: 24px; border: 1px solid #9acaff19; border-radius: 26px; background: linear-gradient(130deg,#277bff14,#6cd8ff04); }
.profile-avatar { display: grid; place-items: center; width: 70px; height: 70px; flex: none; border-radius: 50%; background: linear-gradient(140deg,#388cff46,#32c9e51a); border: 1px solid #8fcfff24; color: #bce5ff; font: 600 28px var(--round-font); }
.profile-info { min-width: 0; }
.profile-name { margin: 0; font-size: 23px; font-weight: 700; overflow-wrap: anywhere; }
.profile-email { margin: 3px 0 10px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.profile-status { padding: 4px 10px; display: inline-block; border-radius: 999px; background: #2689ff16; color: #8dc7ff; font-size: 11px; }
.account-signout { margin-top: 8px; color: #ffadb7; border-color: #ff9baa1a; }
.device-row { min-height: 98px; gap: 16px; padding: 20px; border-color: #c1dbff0c; }
.device-row > .icon { box-sizing: content-box; width: 23px; height: 23px; padding: 12px; color: #75bcff; background: #2584ff12; border-radius: 16px; }
.device-row strong { font-size: 14px; font-weight: 600; }
.device-row span { color: #839bbb; font-size: 12px; }
.device-row button { color: #ff9daa; font-size: 12px; }
.current-device { background: #2584ff08; }
form.settings-group { padding: 24px; }
/* Authentication keeps the mark, form and QR code in one compact glass sheet. */
.auth-screen { background: radial-gradient(ellipse at 20% 18%,#17488a2b,transparent 55%),radial-gradient(ellipse at 80% 85%,#2437a329,transparent 55%),#060d1b; }
.auth-screen::before { display: none; }
.auth-panel { width: min(100%,480px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 26px; padding: 32px 24px; }
.auth-intro { padding: 0; }
.auth-brand img { width: 88px; height: 76px; margin: 0; filter: drop-shadow(0 8px 18px #006fff14); }
.auth-card { width: 100%; padding: 26px 30px; border: 1px solid #afcfff1b; border-radius: 30px; background: linear-gradient(145deg,#1c2c435e,#14213940); -webkit-backdrop-filter: blur(32px); backdrop-filter: blur(32px); box-shadow: inset 0 1px #ffffff09,0 20px 70px #00000024; }
.auth-card h1 { font-size: 27px; font-weight: 700; margin: 12px 0 24px; }
.auth-card .back-link { color: #91b2db; }
.auth-card .auth-tabs { padding: 4px; border-radius: 999px; background: #030a1745; border-color: #a9cdff0f; margin-bottom: 24px; }
.auth-card .auth-tab { min-height: 36px; border-radius: 999px; color: #8ca5c6; }
.auth-card .auth-tab.active { color: #d9edff; background: #8abfff21; box-shadow: inset 0 1px #cce6ff0a; }
.auth-card .primary-button, .auth-card .secondary-button { min-height: 44px; border-radius: 999px; }
.auth-card .qr-panel img { width: 192px; height: 192px; padding: 8px; border-radius: 20px; box-shadow: 0 6px 22px #0002; }
.auth-card .qr-match-code { font: 600 24px var(--round-font); font-variant-numeric: tabular-nums; letter-spacing: .15em; margin-top: 12px; color: #cde6ff; }
.auth-card .qr-panel p { font-size: 12px; color: #96aecd; }
.auth-card .remember-row { font-size: 12px; color: #a9bbd4; margin-top: 16px; }
.remember-row input { accent-color: var(--blue); }
.auth-card #sessionDurationHint { color: #748caa; margin-top: 22px; font-size: 11px; }
.auth-card .auth-disclosure { border: 0; padding: 0; margin-top: 20px; color: #8fa7c6; font-size: 12px; }
.phone-request { border: 1px solid var(--border); border-radius: 22px; background: #5daaff08; padding: 20px; }
/* Glass sheets include composing, file operations and the document reader. */
dialog { background: #142138f2; border: 1px solid #c1ddff26; border-radius: 28px; box-shadow: inset 0 1px #ffffff0d, 0 24px 100px #0006; -webkit-backdrop-filter: blur(36px); backdrop-filter: blur(36px); }
dialog::backdrop { background: #0207138c; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dialog-header { padding: 22px 24px 4px; }
.dialog-header h2, #storageFolderForm h2 { font: 700 21px var(--round-font); }
.dialog-footer { padding: 18px 24px 24px; }
.dialog-description, .dialog-caution { color: #8fa6c5; margin-inline: 24px; }
#storageFolderForm, .file-action-dialog { padding: 26px; }
.address-builder { margin-inline: 24px; gap: 10px; }
.address-builder input, .address-builder select { height: 46px; padding-inline: 12px; border-radius: 14px; }
.destination-folders { border-radius: 18px; }
.destination-folders button { min-height: 48px; }
.destination-folders .icon { color: #67b8ff; }
.compose-header { min-height: 68px; padding-inline: 24px; border-color: var(--border); }
.compose-header h2 { font: 700 20px var(--round-font); }
.compose-line { padding-inline: 24px; min-height: 54px; border-color: #bfd8ff0e; }
.compose-line > span { color: #8ba3c3; }
.compose-dialog textarea { padding: 24px; line-height: 1.8; }
.compose-footer { padding: 16px 24px; border-color: var(--border); }
.document-reader { background: #080f1e; }
.document-toolbar { background: #18263b; }
.document-toolbar select, .document-pages input { border-radius: 12px; }
.document-preview-dialog { border-radius: 24px; }
.toast { border-radius: 999px; border-color: #a9cfff26; background: #1b2c46eF; box-shadow: 0 8px 32px #0004; -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.compact .storage-grid .storage-file { min-height: 164px; padding-block: 12px; }
.compact .message-card { padding-block: 10px; }
@media (min-width: 1400px) { .storage-grid .storage-files { grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 16px 22px; } .storage-content { padding-inline: 40px; } }
@media (max-width: 1080px) and (min-width: 691px) { .service-header { gap: 12px; padding-inline: 18px; } .storage-upload { width: 38px; padding: 0; } .storage-upload span { display: none; } .storage-header-tools { gap: 5px; } .service-tabs button { padding-inline: 12px; } .service-tabs button span { display: none; } .service-tabs .icon { width: 20px; height: 20px; } .service-tabs button { width: 44px; } }
@media (max-width: 690px) {
  :root { --service-header-height: calc(72px + env(safe-area-inset-top)); }
  body:has(#storageHeaderTools:not([hidden])) { --service-header-height: calc(124px + env(safe-area-inset-top)); }
  .service-header { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 0; padding: env(safe-area-inset-top) 16px 0; }
  .service-header:has(#storageHeaderTools:not([hidden])) { height: calc(124px + env(safe-area-inset-top)); }
  .service-tabs { order: 0; width: 100%; max-width: 440px; justify-content: space-around; margin-block: 10px; padding: 4px; }
  .service-tabs button { flex: 1; gap: 6px; padding-inline: 10px; min-height: 34px; font-size: 12px; }
  .service-tabs .icon { display: block; width: 16px; height: 16px; }
  .header-leading { display: none; }
  .service-header:has(#storageHeaderTools:not([hidden])) .header-leading { order: 1; padding-bottom: 10px; display: flex; width: 100%; }
  .storage-header-tools { width: 100%; gap: 8px; justify-content: space-between; }
  .storage-upload { width: auto; padding-inline: 14px; min-height: 36px; }
  .storage-upload span { display: inline; }
  .storage-select-toggle { padding-inline: 14px; }
  .view-picker { margin-left: auto; }
  .storage-content { padding: 16px 16px 140px; }
  .storage-overview { gap: 10px; font-size: 11px; padding-bottom: 16px; }
  .storage-overview .storage-trash-link { font-size: 11px; }
  .storage-grid .storage-files { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px 4px; }
  .storage-grid .storage-file { min-height: 156px; padding: 12px 6px; border-radius: 18px; }
  .storage-grid .file-mark { width: 48px; height: 60px; }
  .storage-grid .file-kind-folder { width: 68px; height: 60px; }
  .storage-grid .file-mark.has-thumbnail { width: 72px; height: 60px; }
  .storage-grid .storage-file-name { font-size: 11px; margin-top: 10px; }
  .storage-grid .storage-file-size { font-size: 10px; }
  .storage-grid .storage-download-hint { display: none; }
  .storage-columns, .storage-file { grid-template-columns: 28px minmax(0,1fr) 62px; gap: 10px; }
  .storage-file-size { font-size: 11px; }
  .storage-selection-bar { max-width: calc(100vw - 24px); width: calc(100vw - 24px); border-radius: 24px; left: 50%; right: auto; bottom: max(16px,env(safe-area-inset-bottom)); }
  .selecting .storage-selection-bar { width: auto; }
  .selection-actions { flex-wrap: wrap; justify-content: flex-start; }
  .selection-actions button { font-size: 11px; }
  .sidebar { background: #102039f5; border-radius: 0 26px 26px 0; padding-top: 22px; }
  .list-header { min-height: 86px; padding: 18px 16px; }
  .list-title h2 { font-size: 22px; }
  .mail-items { padding-inline: 4px; }
  .message-card { padding: 14px 12px; gap: 12px; }
  .message-card .unread-dot { left: 5px; top: 35px; }
  .reader { background: var(--bg); }
  .reader-toolbar { min-height: 70px; }
  .message-detail { margin: 12px; padding: 22px 18px 32px; border-radius: 24px; }
  .message-heading { font-size: 23px; }
  .sender-block { grid-template-columns: 42px minmax(0,1fr); }
  .settings-header { min-height: 76px; padding-inline: 16px; }
  .settings-layout { padding: 0 16px 60px; }
  .settings-tabs { border-radius: 999px; gap: 2px; margin-bottom: 22px; }
  .settings-tabs button { font-size: 12px; min-height: 36px; padding-inline: 12px; }
  .settings-tabs .icon { display: none; }
  .profile-card { padding: 20px; gap: 16px; }
  .profile-avatar { width: 58px; height: 58px; font-size: 24px; }
  .profile-name { font-size: 21px; }
  .setting-line { font-size: 13px; padding-inline: 16px; }
  .device-row { padding: 16px; gap: 12px; }
  .auth-panel { gap: 20px; padding: 24px 20px; }
  .auth-brand img { width: 80px; height: 68px; }
  .auth-card { padding: 24px; border-radius: 28px; }
  .auth-card .field > input { font-size: 16px; }
  .compose-dialog { margin: 0; border-radius: 0; }
  .document-preview-dialog { border-radius: 0; }
  .toast { border-radius: 20px; width: max-content; bottom: max(22px,env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) { .service-tabs button { padding-inline: 6px; } .service-tabs .icon { display: none; } .storage-upload span { display: none; } .storage-upload { padding-inline: 12px; } }
@media (prefers-reduced-transparency: reduce) { .service-header, .auth-card, dialog, .context-menu, .storage-selection-bar { background: var(--glass-strong); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.storage-grid :is(.storage-file-name,.storage-file-size) { align-self: center; }
@media (min-width: 701px) and (max-height: 800px) {
  .auth-panel { gap: 14px; padding-block: 20px; }
  .auth-brand img { width: 70px; height: 60px; }
  .auth-card { padding: 20px 28px; }
  .auth-card h1 { margin: 8px 0 16px; font-size: 26px; }
  .auth-card .auth-tabs { margin-bottom: 18px; }
  .auth-card .qr-panel img { width: 168px; height: 168px; border-radius: 18px; }
  .auth-card .qr-panel p { margin-top: 8px; }
  .auth-card .qr-match-code { margin-top: 8px; font-size: 22px; }
  .auth-card #sessionDurationHint { margin-top: 14px; }
  .auth-card .remember-row { margin-top: 10px; }
  .auth-card .auth-disclosure { margin-top: 14px; }
}
@media (min-width: 701px) and (max-height: 620px) {
  .auth-panel { gap: 10px; padding-block: 16px; }
  .auth-brand img { width: 58px; height: 50px; }
  .auth-card { padding: 16px 28px; }
  .auth-card .qr-panel img { width: 140px; height: 140px; }
  .auth-card .qr-panel .muted-note { max-width: none; }
}

/* Group administration follows the existing VE3 settings palette and type scale. */
.study-group-create { margin: 24px 0 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.study-group-fields { display: grid; grid-template-columns: minmax(110px,.7fr) minmax(150px,1.3fr); gap: 16px; margin-bottom: 16px; }
.study-group-fields label:last-child { grid-column: 1/-1; }
.study-group-row { padding: 24px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.study-group-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.study-group-heading h4, .study-group-create h4 { font-size: 17px; margin: 0 0 8px; }
.study-group-heading p, .study-group-row>p { color: var(--muted); margin: 4px 0; }
.study-group-row h5 { font-size: 14px; margin: 20px 0 8px; }
.study-heads { list-style: none; padding: 0; }
.study-heads li { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.study-head-form { display: flex; align-items: end; gap: 12px; margin-top: 16px; }
.study-head-form .field { flex: 1; min-width: 0; }
.study-head-form input { width: 100%; }
.study-password { font: 600 32px/1.5 ui-monospace, monospace; letter-spacing: .12em; user-select: all; text-align: center; padding: 16px; background: var(--raised); border-radius: 6px; }
.study-dialog { max-width: calc(100vw - 32px); }
.study-dialog h2 { font-size: 22px; }
.study-group-create button, .study-group-row button, .study-dialog button { min-height: 44px; }
.study-group-fields input, .study-group-fields select, .study-head-form input { min-height: 44px; font-size: 16px; }
@media(max-width:600px) { .study-group-fields { grid-template-columns: minmax(0,1fr); } .study-group-heading, .study-head-form { flex-direction: column; align-items: stretch; } .study-dialog .dialog-footer { flex-wrap: wrap; gap: 12px; } }
.study-group-fields select { width:100%; padding:10px 14px; border:1px solid var(--border); border-radius:12px; background:var(--bg); color:var(--text); }
.study-group-fields .field { margin-bottom:0; }
