:root {
  --ink: #24211d; --paper: #f2eee7; --white: #fbf8f1; --yellow: #e8bb4d; --purple: #806cc5;
  --red: #d56855; --muted: #716a61; --line: 3px solid var(--ink); --shadow: 5px 5px 0 var(--ink);
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --gutter: clamp(16px, 3vw, 42px);
  font-family: ui-rounded, "Arial Rounded MT Bold", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  color: var(--ink); background: var(--paper); font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
:focus-visible { outline: 4px solid var(--purple); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 1000; left: 12px; top: -80px; padding: 10px 14px; border: var(--line); background: var(--yellow); font-weight: 900; }
.skip-link:focus { top: 12px; }
.boot { min-height: 100vh; display: grid; place-content: center; gap: 16px; text-align: center; font-weight: 800; }
.boot-mark { width: 88px; height: 88px; display: grid; place-items: center; margin: auto; border: 4px solid var(--ink); border-radius: 28px 12px 24px 14px; background: var(--yellow); box-shadow: 8px 8px 0 var(--ink); font-size: 1.55rem; transform: rotate(-2deg); }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: var(--line); border-radius: var(--r-sm); padding: 9px 14px; background: var(--white); box-shadow: 3px 3px 0 var(--ink); font-weight: 900; text-decoration: none; transition: transform .12s, box-shadow .12s, background .12s; }
.btn:hover { background: var(--yellow); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: var(--purple); }
.btn--purple { background: var(--purple); color: var(--white); }
.btn--danger { background: var(--red); }
.btn--quiet { border-width: 2px; box-shadow: none; background: transparent; }
.btn--icon { width: 46px; padding: 0; }
.btn img { width: 19px; height: 19px; }
.icon-invert { filter: invert(1); }
.field { display: grid; gap: 7px; }
.field > span, .field > label { font-size: .76rem; font-weight: 950; letter-spacing: .07em; text-transform: uppercase; }
input, select, textarea { width: 100%; min-height: 46px; border: 2.5px solid var(--ink); border-radius: var(--r-sm); padding: 10px 12px; background: var(--white); }
textarea { min-height: 92px; resize: vertical; }
.hint { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.empty { border: 3px dashed var(--ink); border-radius: var(--r-md); padding: 28px; text-align: center; color: var(--muted); }
.eyebrow { margin: 0; font-size: .7rem; font-weight: 950; letter-spacing: .15em; text-transform: uppercase; }
.login-shell { height: 100dvh; min-height: 560px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); overflow: hidden; background: var(--yellow); }
.login-brand { min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: clamp(28px, 6vw, 72px); border-right: 5px solid var(--ink); text-align: center; }
.login-logo { width: min(500px, 72vw); filter: drop-shadow(8px 9px 0 rgba(17,16,15,.18)); }
.login-tagline { margin: 0; font-size: clamp(.9rem, 1.7vw, 1.15rem); font-weight: 950; letter-spacing: .08em; }
.login-panel { min-height: 0; display: grid; place-items: center; overflow-y: auto; padding: clamp(18px, 4vw, 48px); background: var(--paper); }
.login-card { width: min(100%, 430px); border: 4px solid var(--ink); border-radius: 24px 10px 20px 12px; padding: clamp(22px, 4vw, 40px); background: var(--white); box-shadow: 10px 10px 0 var(--ink); }
.login-card h2 { margin: 10px 0 8px; font-size: 2rem; }
.login-card form { display: grid; gap: 14px; margin-top: 20px; }
.login-error { min-height: 22px; margin: 0; color: #a61e0d; font-weight: 850; }
.app-shell { min-height: 100vh; }
.topbar { position: sticky; z-index: 30; top: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; min-height: 82px; padding: 12px var(--gutter); border-bottom: 4px solid var(--ink); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(12px); }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.brand-lockup img { width: clamp(146px, 17vw, 240px); }
.brand-lockup span { border-left: 2px solid var(--ink); padding-left: 12px; font-size: .65rem; font-weight: 950; letter-spacing: .12em; line-height: 1.25; }
.top-search { position: relative; max-width: 660px; width: 100%; justify-self: center; }
.top-search input { min-height: 48px; border-width: 3px; border-radius: 999px; padding: 10px 50px 10px 46px; box-shadow: 3px 3px 0 var(--ink); }
.top-search > img { position: absolute; top: 14px; left: 16px; width: 20px; }
.shortcut { position: absolute; right: 14px; top: 12px; border: 2px solid var(--ink); border-radius: 6px; padding: 2px 6px; background: var(--paper); font-size: .7rem; font-weight: 900; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.network-switch { display: flex; border: 3px solid var(--ink); border-radius: 999px; padding: 3px; background: var(--white); box-shadow: 3px 3px 0 var(--ink); }
.network-switch button { min-height: 34px; border: 0; border-radius: 999px; padding: 4px 9px; background: transparent; font-size: .68rem; font-weight: 950; }
.network-switch button.active { background: var(--yellow); }
.hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(310px, 1.15fr); gap: 16px; padding: 14px var(--gutter) 16px; }
.time-stage { min-height: 154px; position: relative; overflow: hidden; border: 4px solid var(--ink); border-radius: 22px 10px 19px 9px; padding: 18px 22px; background: var(--ink); color: var(--white); box-shadow: 7px 7px 0 var(--purple); }
.time-stage::after { content: "壹直"; position: absolute; right: -8px; bottom: -24px; color: var(--yellow); font-size: clamp(4rem, 9vw, 7.5rem); font-weight: 950; line-height: 1; opacity: .9; transform: rotate(-5deg); }
.clock { position: relative; z-index: 1; margin: 6px 0 2px; font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 950; line-height: .9; letter-spacing: -.08em; font-variant-numeric: tabular-nums; }
.date { position: relative; z-index: 1; margin: 10px 0 0; font-size: clamp(.72rem, 1.4vw, 1rem); font-weight: 800; }
.weather-card { min-height: 154px; display: grid; align-content: space-between; border: 4px solid var(--ink); border-radius: 12px 22px 10px 19px; padding: 15px 18px; background: var(--yellow); box-shadow: 7px 7px 0 var(--ink); }
.weather-main { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 14px; }
.weather-temp { margin: 2px 0; font-size: clamp(2.7rem, 5vw, 4.6rem); font-weight: 950; line-height: 1; letter-spacing: -.07em; }
.weather-icon { width: 52px; height: 52px; padding: 10px; border: 3px solid var(--ink); border-radius: 50%; background: var(--white); box-shadow: 3px 3px 0 var(--ink); }
.weather-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; font-size: .78rem; font-weight: 850; }
.weather-status { margin: 8px 0 0; color: #4e463c; font-size: .75rem; }
.content { padding: 8px var(--gutter) 100px; }
.quick-section { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.quick-block { min-width: 0; border-top: 4px solid var(--ink); padding-top: 12px; }
.quick-block h2 { margin: 0 0 12px; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.quick-list { display: flex; gap: 10px; overflow-x: auto; padding: 0 4px 8px 0; scrollbar-width: thin; }
.quick-link { min-width: 0; max-width: 100%; display: flex; align-items: center; gap: 10px; border: 2.5px solid var(--ink); border-radius: 11px; padding: 9px; background: var(--white); text-decoration: none; font-size: .8rem; font-weight: 900; }
.quick-link img { width: 30px; height: 30px; padding: 5px; border-radius: 8px; background: var(--yellow); }
.quick-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-dock { position: fixed; z-index: 38; right: 0; top: 42%; display: grid; gap: 7px; justify-items: end; transform: translateY(-50%); }
.quick-dock__tab { width: 54px; min-height: 58px; display: grid; place-items: center; gap: 2px; border: 2.5px solid var(--ink); border-right: 0; border-radius: 13px 0 0 13px; background: var(--yellow); box-shadow: -3px 3px 0 var(--ink); font-size: 1rem; font-weight: 950; }
.quick-dock__tab span { font-size: .58rem; }
.quick-dock__panel { position: absolute; right: 63px; top: 50%; width: min(300px, calc(100vw - 86px)); max-height: min(520px, 70vh); overflow: auto; border: 3px solid var(--ink); border-radius: 15px 8px 14px 9px; padding: 12px; background: var(--paper); box-shadow: 6px 6px 0 var(--ink); transform: translateY(-50%); }
.quick-dock__panel[hidden] { display: none; }
.quick-dock__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.quick-dock__close { width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50%; background: var(--white); font-weight: 950; }
.quick-dock__list { display: grid; gap: 8px; }
.quick-dock__list .quick-link { width: 100%; }
.category-nav { display: flex; gap: 9px; overflow-x: auto; margin-bottom: 12px; padding: 0 2px 6px; }
.category-chip { flex: 0 0 auto; min-height: 42px; border: 2.5px solid var(--ink); border-radius: 999px; padding: 8px 14px; background: var(--white); box-shadow: 2px 2px 0 var(--ink); font-weight: 900; }
.category-chip.active { background: var(--ink); color: var(--white); }
.results-meta { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 12px; }
.results-meta h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.35rem); letter-spacing: -.04em; }
.results-meta p { margin: 0; color: var(--muted); font-size: .78rem; font-weight: 800; }
.item-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.item-card { min-width: 0; position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 106px; border: 3px solid var(--ink); border-radius: 15px 7px 13px 9px; padding: 14px; background: var(--white); box-shadow: 5px 5px 0 var(--ink); text-decoration: none; transition: transform .14s, box-shadow .14s, background .14s; }
.item-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); background: color-mix(in srgb, var(--card-accent, var(--yellow)) 22%, var(--white)); }
.item-card__icon { width: 48px; height: 48px; display: grid; place-items: center; border: 2.5px solid var(--ink); border-radius: 12px 5px 10px 6px; padding: 9px; background: var(--card-accent, var(--yellow)); }
.item-card__icon img { width: 100%; height: 100%; object-fit: contain; }
.item-card h3 { overflow: hidden; margin: 0 0 4px; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.item-card p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item-card__badges { grid-column: 1 / -1; display: flex; gap: 5px; margin-top: 2px; }
.badge { border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 6px; background: var(--paper); font-size: .57rem; font-weight: 950; text-transform: uppercase; }
.badge--review { background: var(--red); }
.favorite-star { position: absolute; top: 7px; right: 8px; color: #8a6300; font-size: .9rem; }
.toast-region { position: fixed; z-index: 200; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast { border: 3px solid var(--ink); border-radius: 10px; padding: 12px 14px; background: var(--yellow); box-shadow: 5px 5px 0 var(--ink); font-weight: 850; }
.toast.error { background: var(--red); }
.mobile-bar { display: none; }
.admin-shell { min-height: 100vh; background: var(--paper); }
.admin-header { position: sticky; z-index: 35; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--gutter); border-bottom: 4px solid var(--ink); background: var(--yellow); }
.admin-title { display: flex; align-items: center; gap: 14px; }
.admin-title img { width: 152px; }
.admin-title h1 { margin: 0; font-size: 1rem; }
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 76px); }
.admin-nav { position: sticky; top: 76px; align-self: start; display: grid; gap: 8px; padding: 26px 18px; }
.admin-nav button { min-height: 46px; border: 2.5px solid transparent; border-radius: 9px; padding: 10px 12px; background: transparent; text-align: left; font-weight: 900; }
.admin-nav button.active { border-color: var(--ink); background: var(--white); box-shadow: 3px 3px 0 var(--ink); }
.admin-main { min-width: 0; border-left: 4px solid var(--ink); padding: clamp(20px, 4vw, 48px); }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.admin-toolbar h2 { margin: 0; font-size: clamp(1.7rem, 4vw, 3.2rem); letter-spacing: -.05em; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-list { display: grid; gap: 10px; }
#admin-items { margin-top: 18px; }
.admin-row { display: grid; grid-template-columns: 46px minmax(160px, 1fr) minmax(120px, .55fr) auto; align-items: center; gap: 12px; border: 2.5px solid var(--ink); border-radius: 11px; padding: 10px; background: var(--white); box-shadow: 3px 3px 0 var(--ink); }
.admin-row > img { width: 42px; height: 42px; padding: 7px; border: 2px solid var(--ink); border-radius: 8px; background: var(--yellow); }
.admin-row h3 { margin: 0 0 3px; font-size: .95rem; }
.admin-row p { overflow: hidden; margin: 0; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 5px; }
.row-actions button { min-height: 38px; border: 2px solid var(--ink); border-radius: 7px; padding: 6px 9px; background: var(--paper); font-size: .7rem; font-weight: 900; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-card { display: grid; align-content: start; gap: 14px; border: 3px solid var(--ink); border-radius: 15px 8px 14px 9px; padding: 20px; background: var(--white); box-shadow: 5px 5px 0 var(--ink); }
.settings-card h3 { margin: 0; font-size: 1.15rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field--wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 9px; min-height: 44px; font-weight: 850; }
.check input { width: 20px; min-height: 20px; accent-color: var(--purple); }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 20px; background: rgba(17,16,15,.62); }
.modal { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; border: 4px solid var(--ink); border-radius: 22px 10px 19px 12px; padding: clamp(18px, 4vw, 32px); background: var(--paper); box-shadow: 10px 10px 0 var(--ink); }
.modal__header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.modal__header h2 { margin: 0; font-size: 1.7rem; }
.modal__footer { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.modal__footer .btn--danger { margin-right: auto; }
.icon-picker { grid-column: 1 / -1; display: grid; gap: 10px; }
.icon-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; max-height: 205px; overflow-y: auto; padding: 3px; }
.icon-option { aspect-ratio: 1; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 8px; padding: 8px; background: var(--white); }
.icon-option.active { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }
.icon-option img { width: 26px; height: 26px; }
.category-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 3px solid var(--ink); border-radius: 11px; padding: 12px; background: var(--white); box-shadow: 4px 4px 0 var(--ink); }
.color-dot { width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 50%; background: var(--dot); }
.backup-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--ink); padding: 13px 2px; }
.weather-forecast { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 10px; font-size: .72rem; }
.weather-forecast span { white-space: nowrap; }
.system-setting { display: grid; gap: 5px; border: 2px solid var(--ink); border-radius: var(--r-sm); padding: 12px; background: var(--paper); }
.system-setting span { color: var(--muted); font-size: .78rem; }
.danger-zone { border-color: var(--red); }
@media (max-width: 1180px) { .item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .brand-lockup span { display: none; } }
@media (max-width: 900px) {
  .login-shell { min-height: 0; grid-template-columns: 1fr; grid-template-rows: minmax(150px, 30vh) minmax(0, 1fr); }
  .login-brand { border-right: 0; border-bottom: 5px solid var(--ink); padding: 18px; gap: 10px; }
  .login-logo { width: min(260px, 66vw); filter: drop-shadow(5px 6px 0 rgba(17,16,15,.18)); }
  .login-tagline { font-size: .78rem; }
  .login-panel { padding: 16px; }
  .topbar { grid-template-columns: 1fr auto; }
  .top-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .top-actions .desktop-only { display: none; }
  .hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { position: sticky; z-index: 25; top: 74px; grid-template-columns: repeat(4, 1fr); overflow-x: auto; padding: 8px var(--gutter); border-bottom: 3px solid var(--ink); background: var(--paper); }
  .admin-nav button { text-align: center; }
  .admin-main { border-left: 0; }
}
@media (max-width: 620px) {
  .topbar { min-height: 68px; padding: 9px 14px; }
  .brand-lockup img { width: 138px; }
  .network-switch { position: static; box-shadow: none; }
  .network-switch button { min-height: 30px; padding: 3px 7px; font-size: .58rem; }
  .hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 12px; padding: 18px 16px 24px; }
  .time-stage { min-height: 118px; border-width: 3px; border-radius: 15px 7px 13px 6px; padding: 13px; box-shadow: 5px 5px 0 var(--purple); }
  .time-stage .eyebrow { font-size: .5rem; letter-spacing: .08em; }
  .clock { margin-top: 8px; font-size: clamp(2.1rem, 10vw, 2.8rem); letter-spacing: -.06em; }
  .date { margin-top: 9px; font-size: .58rem; line-height: 1.25; }
  .time-stage::after { display: none; }
  .weather-card { min-height: 118px; border-width: 3px; border-radius: 7px 15px 6px 13px; padding: 12px; box-shadow: 5px 5px 0 var(--ink); }
  .weather-main { gap: 5px; }
  .weather-main .eyebrow { overflow: hidden; font-size: .5rem; letter-spacing: .05em; text-overflow: ellipsis; white-space: nowrap; }
  .weather-temp { margin-top: 7px; font-size: 2.25rem; }
  .weather-icon { width: 34px; height: 34px; padding: 6px; border-width: 2px; box-shadow: none; }
  .weather-meta { margin-top: 7px; font-size: .58rem; }
  .weather-meta span:not(:nth-child(2)), .weather-forecast, .weather-status { display: none; }
  .content { padding: 18px 16px 140px; }
  .quick-dock { top: 48%; }
  .quick-dock__tab { width: 48px; min-height: 54px; }
  .quick-dock__panel { right: 56px; }
  .category-nav { gap: 10px; margin-bottom: 20px; padding-bottom: 8px; }
  .category-chip { min-height: 46px; padding: 9px 15px; }
  .results-meta { margin-bottom: 20px; }
  .results-meta .eyebrow { margin-bottom: 6px; }
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .item-card { grid-template-columns: 36px minmax(0, 1fr); gap: 10px 8px; min-height: 124px; border-width: 2px; border-radius: 11px 6px 10px 7px; padding: 12px; box-shadow: 3px 3px 0 var(--ink); }
  .item-card__icon { width: 36px; height: 36px; border-width: 2px; border-radius: 8px 4px 7px 4px; padding: 6px; }
  .item-card h3 { padding-right: 9px; font-size: .78rem; }
  .item-card p { font-size: .64rem; -webkit-line-clamp: 1; }
  .item-card__badges { gap: 3px; margin-top: 5px; }
  .item-card .badge { padding: 2px 4px; font-size: .48rem; }
  .item-card .badge--tag { display: none; }
  .favorite-star { top: 4px; right: 5px; font-size: .7rem; }
  .mobile-bar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 4px solid var(--ink); background: var(--yellow); }
  .mobile-bar button { min-height: 44px; border: 0; background: transparent; font-size: .68rem; font-weight: 950; }
  .admin-header { padding: 10px 14px; }
  .admin-title img { width: 128px; }
  .admin-title h1 { display: none; }
  .admin-nav { top: 66px; padding: 7px 10px; }
  .admin-nav button { min-width: 84px; padding: 8px 5px; font-size: .7rem; }
  .admin-main { padding: 30px 16px 120px; }
  .admin-toolbar { gap: 18px; margin-bottom: 30px; }
  #admin-filter { min-height: 52px; }
  #admin-items { gap: 16px; margin-top: 30px; }
  .admin-row { min-height: 92px; grid-template-columns: 40px minmax(0, 1fr) auto; padding-block: 12px; }
  .admin-row > :nth-child(3) { display: none; }
  .row-actions .desktop-row-action { display: none; }
  .row-actions button { min-height: 44px; }
  .settings-grid, .form-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .icon-grid { grid-template-columns: repeat(5, 1fr); }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; border-bottom: 0; box-shadow: none; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .login-card { max-height: 100%; padding: 18px; box-shadow: 6px 6px 0 var(--ink); }
  .login-card h2 { font-size: 1.55rem; }
  .login-card form { gap: 11px; margin-top: 15px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (prefers-color-scheme: dark) {
  body[data-theme="system"] { --paper:#25231f; --white:#34312c; --ink:#d8cfc2; --muted:#aaa095; --yellow:#c9a33f; --purple:#8d7cc4; --red:#d77866; }
  body[data-theme="system"] img:not(.login-logo):not(.brand-image) { filter: invert(1); }
  body[data-theme="system"] .item-card__icon img, body[data-theme="system"] .quick-link img, body[data-theme="system"] .admin-row > img, body[data-theme="system"] .icon-option img { filter: none; }
  body[data-theme="system"] .topbar { background: color-mix(in srgb, var(--paper) 96%, transparent); }
  body[data-theme="system"] .time-stage { border-color:#847b70; background:#39352f; color:#f1e9dd; box-shadow:7px 7px 0 #6f608f; }
  body[data-theme="system"] .weather-card { border-color:#847b70; background:#b9953a; color:#27231e; box-shadow:7px 7px 0 #171614; }
  body[data-theme="system"] .weather-card .hint { color:#514735; }
  body[data-theme="system"] .weather-icon { border-color:#4d463d; background:#d8cfc2; }
  body[data-theme="system"] .weather-status { color:#514735; }
  body[data-theme="system"] .item-card, body[data-theme="system"] .category-chip, body[data-theme="system"] .quick-link, body[data-theme="system"] .settings-card, body[data-theme="system"] .admin-row { border-color:#847b70; box-shadow:4px 4px 0 #171614; }
  body[data-theme="system"] .quick-dock__tab { color:#27231e; }
}
