:root {
  --ink: #132238;
  --muted: #64748b;
  --cream: #eff6ff;
  --paper: #ffffff;
  --line: #dbe7f5;
  --pine: #2563eb;
  --pine-dark: #1d4ed8;
  --lime: #dbeafe;
  --danger: #dc2626;
  --field: #ffffff;
  --soft: #f8fbff;
  --table-head: #f4f8fd;
  --region-bg: #eaf2ff;
  --row-line: #ece9e1;
  --card-bg: #ffffff;
  --topbar-bg: rgba(255,255,255,.86);
  --login-bg: rgba(255,255,255,.9);
  --overlay: rgba(13,30,24,.48);
  --shadow: 0 18px 50px rgba(30, 64, 175, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}
[data-theme="dark"] {
  --ink: #e5efff;
  --muted: #94a9c5;
  --cream: #071426;
  --paper: #0d1d33;
  --line: #263b57;
  --pine: #60a5fa;
  --pine-dark: #3b82f6;
  --lime: #dbeafe;
  --danger: #f87171;
  --field: #10243d;
  --soft: #10243d;
  --table-head: #10243d;
  --region-bg: #122b4b;
  --row-line: #243a55;
  --card-bg: #10243d;
  --topbar-bg: rgba(7,20,38,.88);
  --login-bg: rgba(13,29,51,.94);
  --overlay: rgba(1,8,18,.72);
  --shadow: 0 18px 50px rgba(0, 8, 24, .42);
}
* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; }
body { margin: 0; min-width: 320px; max-width: 100%; min-height: 100vh; overflow-x: hidden; background: var(--cream); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ambient { position: fixed; border-radius: 999px; filter: blur(1px); opacity: .38; pointer-events: none; z-index: -1; }
.ambient-one { width: 420px; height: 420px; background: #bfdbfe; right: -160px; top: -180px; }
.ambient-two { width: 360px; height: 360px; background: #dbeafe; left: -180px; bottom: -150px; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.login-panel { width: min(500px, 100%); overflow: hidden; border: 1px solid var(--line); border-top: 2px solid var(--pine); border-radius: 16px; background: var(--login-bg); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.login-header { min-height: 112px; padding: 23px 26px 19px; display: flex; align-items: start; justify-content: space-between; gap: 18px; border-bottom: 2px solid var(--pine); }
.login-header .eyebrow { margin-top: 2px; font-size: 9px; letter-spacing: .23em; }
.login-header h1 { margin: 14px 0 0; font-size: 30px; line-height: 1.05; letter-spacing: -.035em; }
.login-header .theme-toggle { width: 42px; height: 42px; border-radius: 12px; font-size: 19px; }
.login-body { padding: 25px 26px 28px; }
.login-body > label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.login-body > label span { color: var(--pine); }
.login-footer { min-height: 66px; padding: 11px 26px max(11px, env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: flex-end; border-top: 1px solid var(--line); }
.login-footer .primary-button { min-width: 78px; min-height: 40px; }
.brand-mark { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: var(--pine); color: var(--lime); font: 800 18px/1 Georgia, serif; letter-spacing: -.04em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.brand-mark.small { width: 34px; height: 34px; border-radius: 11px; font-size: 11px; flex: 0 0 auto; }
.eyebrow { margin: 24px 0 7px; color: var(--pine); font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.hero h1 { margin: 0; font: 600 clamp(34px, 5vw, 46px)/1.05 Georgia, "Songti SC", serif; letter-spacing: -.035em; }
.login-copy { margin: 0 0 21px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.login-status { min-height: 18px; margin: 6px 0 -15px; color: var(--pine); font-size: 12px; }
.dialog-body > label { display: grid; width: 100%; min-width: 0; gap: 8px; font-size: 13px; font-weight: 700; }
.login-form input, .dialog-body input, .dialog-body textarea, .dialog-body select { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--field); color: var(--ink); padding: 13px 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.dialog-body :is(input, textarea, select, .price-field, .date-field) { display: block; inline-size: 100%; min-inline-size: 0; max-inline-size: 100%; }
.dialog-body input:not([type="hidden"]), .dialog-body select { height: 52px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, textarea:focus, select:focus { border-color: var(--pine) !important; box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 64px; }
.text-button { position: absolute; right: 6px; top: 6px; bottom: 6px; border: 0; background: transparent; color: var(--pine); font-size: 13px; font-weight: 700; }
.primary-button, .secondary-button, .ghost-button, .danger-button { min-height: 44px; border-radius: 12px; padding: 0 17px; font-weight: 750; border: 1px solid transparent; transition: transform .15s, background .15s, opacity .15s; }
.primary-button { background: var(--pine); color: white; box-shadow: 0 8px 18px rgba(37,99,235,.2); }
.primary-button:hover { background: var(--pine-dark); transform: translateY(-1px); }
.primary-button.full { width: 100%; margin-top: 16px; }
.secondary-button { background: #eff6ff; color: var(--pine); border-color: #bfdbfe; }
.ghost-button { color: var(--ink); background: transparent; border-color: var(--line); }
.theme-toggle { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.theme-toggle:hover { border-color: var(--pine); color: var(--pine); transform: translateY(-1px); }
.danger-button { background: var(--danger); color: #fff; }
button:disabled { cursor: wait; opacity: .6; transform: none !important; }
.privacy-note { margin: 22px 0 0; color: #88908c; font-size: 11px; text-align: center; }
.form-error { color: var(--danger); margin: 9px 0 0; font-size: 13px; line-height: 1.4; }

.app-shell { min-height: 100vh; background-color: var(--cream); background-image: linear-gradient(rgba(37,99,235,.075) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,.075) 1px, transparent 1px); background-size: 44px 44px; }
[data-theme="dark"] .app-shell { background-image: linear-gradient(rgba(96,165,250,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(96,165,250,.08) 1px, transparent 1px); }
.topbar { min-height: 100px; display: grid; grid-template-columns: minmax(250px, 1fr) minmax(330px, 1.15fr) auto; align-items: center; gap: 22px; padding: 10px max(24px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid var(--line); background: var(--topbar-bg); background: color-mix(in srgb, var(--cream) 84%, transparent); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; gap: 11px; align-items: center; color: inherit; text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand strong { font: 600 20px/1.1 Georgia, serif; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.header-intro h1 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -.025em; }
.header-intro p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; white-space: nowrap; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.sync-status { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.sync-status i { width: 7px; height: 7px; border-radius: 50%; background: #3aa16d; box-shadow: 0 0 0 4px rgba(58,161,109,.12); }
.content { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 66px; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 30px; }
.hero .eyebrow { margin-top: 0; }
.hero p:last-child { color: var(--muted); margin: 11px 0 0; font-size: 14px; }
.hero-actions { display: flex; gap: 12px; flex: 0 0 auto; }
.hero-actions > button, .settings-button, .top-actions > .primary-button { min-height: 42px; padding-inline: 16px; border-radius: 12px; }
.settings-wrap { position: relative; }
.settings-button[aria-expanded="true"] { border-color: var(--pine); color: var(--pine); }
.settings-menu { position: absolute; z-index: 30; top: calc(100% + 12px); right: 0; width: 286px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 20px 50px rgba(30,64,175,.18); }
.menu-sync { min-height: 48px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 9px; border-radius: 12px; background: var(--region-bg); color: var(--muted); font-size: 13px; font-weight: 750; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #138a68; box-shadow: 0 0 0 4px rgba(19,138,104,.11); }
.menu-button { width: 100%; min-height: 44px; padding: 0 15px; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); font-weight: 750; text-align: left; }
.menu-button > span { width: 18px; color: var(--pine); font-size: 16px; text-align: center; }
.menu-button:hover, .menu-button:focus-visible { background: var(--soft); border-color: var(--line); outline: 0; }
.menu-button + .menu-button { margin-top: 4px; }
.menu-divider { height: 1px; margin: 9px 5px; background: var(--line); }
.menu-logout { color: #c52c25; }
.menu-logout > span { color: #c52c25; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-card { min-height: 76px; padding: 14px 18px; border-radius: 15px; background: var(--paper); border: 1px solid rgba(23,35,31,.09); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; box-shadow: 0 6px 20px rgba(30,64,175,.04); }
.stat-card.accent { background: var(--pine); color: #fff; border-color: var(--pine); }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 750; letter-spacing: .02em; }
.accent .stat-label { color: rgba(255,255,255,.82); }
.stat-card strong { display: block; margin: 0; font: 600 27px/1 Georgia, serif; letter-spacing: -.03em; white-space: nowrap; }
.collection-panel { border-radius: 22px; background: var(--paper); border: 1px solid rgba(19,34,56,.1); overflow: hidden; box-shadow: 0 9px 30px rgba(30,64,175,.06); }
.panel-toolbar { min-height: 96px; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.panel-toolbar h2 { margin: 0; font: 600 21px/1.2 Georgia, serif; }
.panel-toolbar p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.search-box { width: min(320px, 40%); min-height: 43px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.search-box span { font-size: 22px; color: var(--muted); transform: rotate(-20deg); }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.desktop-table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
th { padding: 14px 20px; text-align: left; background: var(--table-head); color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
th:nth-child(1) { width: 22%; } th:nth-child(2) { width: 27%; } th:nth-child(3) { width: 14%; } th:nth-child(4) { width: 15%; } th:nth-child(5) { width: 14%; } th:nth-child(6) { width: 8%; }
td { padding: 18px 20px; border-top: 1px solid var(--row-line); vertical-align: middle; font-size: 13px; }
tbody tr { transition: background .15s; } tbody tr:not(.region-row):hover { background: var(--soft); }
.region-row th { width: auto; padding: 0; background: var(--region-bg); color: var(--pine); text-transform: none; letter-spacing: 0; border-top: 1px solid var(--line); }
.region-toggle { width: 100%; min-height: 50px; padding: 10px 20px; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: inherit; text-align: left; }
.region-toggle:hover { background: rgba(37,99,235,.07); }
.region-toggle:focus-visible { outline: 3px solid rgba(37,99,235,.28); outline-offset: -3px; }
.region-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; }
.region-caption { padding: 3px 6px; border-radius: 6px; background: var(--paper); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.region-count { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 600; }
.region-chevron { width: 24px; height: 24px; display: grid; place-items: center; color: var(--pine); font-size: 18px; transition: transform .18s ease; }
.region-toggle[aria-expanded="false"] .region-chevron { transform: rotate(-90deg); }
.account-title { font-weight: 750; overflow-wrap: anywhere; }
.account-notes { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.game-tag { padding: 4px 8px; border-radius: 99px; background: var(--region-bg); color: var(--ink); font-size: 11px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-tag.more { background: var(--soft); color: var(--muted); }
.price { font: 600 17px/1 Georgia, serif; white-space: nowrap; }
.purchase-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.updated { color: var(--muted); font-size: 12px; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 10px; display: grid; place-items: center; background: transparent; color: var(--muted); font-size: 20px; }
.icon-button:hover { background: var(--region-bg); color: var(--ink); }
.icon-button.delete:hover { background: #f8e8e5; color: var(--danger); }
.mobile-cards { display: none; }
.state-panel { min-height: 340px; padding: 50px 24px; display: grid; place-items: center; align-content: center; text-align: center; }
.state-panel h3 { margin: 14px 0 0; font: 600 20px/1.2 Georgia, serif; }
.state-panel p { color: var(--muted); font-size: 13px; margin: 9px 0 18px; }
.spinner { width: 28px; height: 28px; border: 3px solid #d6d6cc; border-top-color: var(--pine); border-radius: 50%; animation: spin .8s linear infinite; }
.state-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #f8e7e4; color: var(--danger); font: 700 20px Georgia, serif; }
.state-icon.game { background: #eaf2ff; color: var(--pine); }
@keyframes spin { to { transform: rotate(360deg); } }

dialog { width: min(590px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 100px rgba(13,30,24,.28); overflow: hidden; }
dialog::backdrop { background: var(--overlay); backdrop-filter: blur(4px); }
dialog > form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100dvh - 32px); overflow: hidden; }
.dialog-header { padding: 24px 26px 19px; display: flex; justify-content: space-between; align-items: start; border-bottom: 1px solid var(--line); }
.dialog-header .eyebrow { margin: 0 0 6px; }
.dialog-header h2 { margin: 0; font: 600 25px/1.2 Georgia, serif; }
.dialog-body { width: 100%; min-width: 0; max-width: 100%; min-height: 0; padding: 22px 26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 19px; overflow: hidden auto; overscroll-behavior: contain; }
.dialog-body label > span { color: var(--danger); }
.dialog-body label > small { color: var(--muted); font-weight: 400; }
.dialog-body textarea { resize: vertical; line-height: 1.5; }
.price-field { position: relative; }
.price-field > span { position: absolute; top: 13px; left: 14px; color: var(--muted); }
.price-field input { padding-left: 32px; }
.date-field { height: 52px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--field); transition: border-color .2s, box-shadow .2s; }
.date-field:focus-within { border-color: var(--pine); box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.date-field input { width: 100% !important; min-width: 0 !important; max-width: 100% !important; height: 100% !important; padding: 13px 14px; border: 0 !important; border-radius: 0; background: transparent; box-shadow: none !important; appearance: none; -webkit-appearance: none; }
.date-field input::-webkit-date-and-time-value { min-width: 0; margin: 0; text-align: left; }
.dialog-footer { padding: 17px 26px max(17px, env(safe-area-inset-bottom)); display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }
.confirm-dialog { width: min(430px, calc(100% - 32px)); padding: 30px; text-align: center; }
.confirm-dialog h2 { margin: 15px 0 8px; font: 600 23px/1.2 Georgia, serif; }
.confirm-dialog p { margin: 0; color: var(--muted); line-height: 1.6; }
.confirm-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: auto; border-radius: 50%; color: var(--danger); background: #f8e8e5; font: 700 20px Georgia, serif; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 25px; }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 10px; }
.toast { min-width: 230px; max-width: 360px; padding: 13px 16px; background: var(--ink); color: white; border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; animation: toast-in .25s ease-out; }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 760px) {
  .login-form input, .dialog-body input, .dialog-body textarea, .dialog-body select, .search-box input { font-size: 16px; }
  .login-shell { padding: 12px; align-items: center; }
  .login-panel { width: min(500px, 100%); border-radius: 18px; }
  .login-header { min-height: 138px; padding: 24px 22px 21px; }
  .login-header .eyebrow { font-size: 11px; }
  .login-header h1 { margin-top: 18px; font-size: clamp(32px, 9vw, 40px); }
  .login-header .theme-toggle { width: 46px; height: 46px; }
  .login-body { padding: 26px 22px 30px; }
  .login-copy { margin-bottom: 22px; font-size: 16px; }
  .login-footer { min-height: 74px; padding: 14px 22px max(14px, env(safe-area-inset-bottom)); }
  .app-shell { background-size: 36px 36px; }
  .topbar { min-height: 0; padding: 12px 14px 14px; grid-template-columns: 1fr auto; gap: 12px 10px; }
  .brand small { display: none; }
  .header-intro { grid-column: 1 / -1; grid-row: 2; }
  .header-intro h1 { font-size: 24px; }
  .header-intro p { white-space: normal; font-size: 13px; }
  .top-actions { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: 44px 1fr 1fr; gap: 8px; }
  .top-actions .theme-toggle { width: 44px; }
  .top-actions > .primary-button, .settings-button { width: 100%; min-height: 46px; padding-inline: 8px; }
  .content { width: calc(100% - 28px); padding: 20px 0 calc(54px + env(safe-area-inset-bottom)); }
  .hero { align-items: stretch; flex-direction: column; margin-bottom: 28px; }
  .hero h1 { font-size: 39px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .hero-actions > button, .settings-wrap, .settings-button { width: 100%; }
  .hero-actions > button, .settings-button { min-height: 48px; padding-inline: 9px; }
  .settings-menu { width: min(330px, calc(100vw - 28px)); right: auto; left: 0; }
  .stats-grid { grid-template-columns: 1fr; gap: 8px; }
  .stat-card { min-height: 64px; padding: 11px 15px; border-radius: 14px; }
  .stat-card:first-child { grid-column: auto; min-height: 64px; }
  .stat-label { font-size: 14px; }
  .stat-card strong { font-size: 24px; }
  .collection-panel { border-radius: 18px; }
  .panel-toolbar { padding: 18px; flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; }
  .desktop-table-wrap { display: none; }
  .mobile-cards { display: grid; padding: 12px; gap: 10px; }
  .region-group { display: grid; gap: 9px; }
  .region-group + .region-group { margin-top: 7px; }
  .mobile-region-toggle { min-height: 52px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--region-bg); color: var(--pine); }
  .mobile-region-toggle .region-count { color: var(--muted); font-size: 11px; }
  .region-accounts { display: grid; gap: 10px; }
  .account-card { padding: 17px; border-radius: 15px; border: 1px solid var(--line); background: var(--card-bg); }
  .card-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
  .card-head .account-title { font-size: 15px; }
  .card-price { color: var(--pine); font: 600 19px/1 Georgia, serif; white-space: nowrap; }
  .card-games { margin-top: 15px; }
  .card-purchase { margin-top: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .card-purchase .card-label { margin: 0; }
  .card-purchase strong { color: var(--muted); font-size: 12px; }
  .card-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
  .card-footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--row-line); display: flex; align-items: center; justify-content: space-between; }
  .card-footer .updated { font-size: 11px; }
  .card-actions { display: flex; gap: 4px; }
  dialog { inset: auto 0 0; width: 100%; max-width: none; max-height: calc(100dvh - env(safe-area-inset-top)); margin: 0; border-radius: 22px 22px 0 0; }
  dialog[open] { animation: sheet-up .22s ease-out; }
  dialog > form { max-height: calc(100dvh - env(safe-area-inset-top)); }
  .dialog-body { min-width: 0; padding: 20px; overflow-x: hidden; }
  .dialog-body > label, .price-field, .date-field { min-width: 0; max-width: 100%; }
  .dialog-body textarea { resize: none; }
  .dialog-header { padding: 21px 20px 16px; }
  .dialog-footer { padding-left: 20px; padding-right: 20px; }
  .dialog-footer > button { min-width: 0; flex: 1; }
  .confirm-dialog { width: calc(100% - 28px); margin: auto; border-radius: 20px; }
  .toast-region { left: 14px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .toast { min-width: 0; max-width: none; width: 100%; }
  @keyframes sheet-up { from { transform: translateY(30px); opacity: .7; } }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { color-scheme: dark; }
}

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