/* Fryseren – "Rimfrost": a deep glacier-blue top with ice crystals, frosted cards that slide
   up over it. Dark mode follows the phone. */

:root {
  --font: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bg: #f2f8fc;            /* frost */
  --surface: #ffffff;
  --surface-2: #eef6fb;
  --card-end: #f6fbfe;
  --text: #0d2a40;
  --muted: #57778f;
  --border: #d4e9f5;
  --primary: #0e3a5b;       /* glacier */
  --primary-text: #f2f8fc;
  --primary-soft: #e3f2fb;
  --ice: #9fd8f0;
  --hero-a: #2f79a8;
  --hero-b: #0e3a5b;
  --hero-c: #0a2c45;
  --soon: #a8660a;
  --soon-bg: #fff3dc;
  --old: #c2412d;
  --old-bg: #fff5f3;
  --old-border: #f7c6bd;
  --danger: #c2412d;
  --shadow: 0 1px 0 #fff inset, 0 8px 18px -14px rgba(14, 58, 91, .55);
  --radius: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071827;
    --surface: #0f2538;
    --surface-2: #143049;
    --card-end: #0c2133;
    --text: #e3f0f8;
    --muted: #8fb0c7;
    --border: #1e4260;
    --primary: #9fd8f0;
    --primary-text: #061a2b;
    --primary-soft: #16384f;
    --hero-a: #1b5a85;
    --hero-b: #0b2f4b;
    --hero-c: #061a2b;
    --soon: #f3c46b;
    --soon-bg: #3a2e14;
    --old: #ff9b8a;
    --old-bg: #2a1a1e;
    --old-border: #5a2a26;
    --danger: #ff9b8a;
    --shadow: 0 10px 22px -16px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 var(--font);
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { margin: 0; line-height: 1.2; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.muted { color: var(--muted); font-size: .9rem; margin: .2rem 0 .6rem; }

/* ---------- screens ---------- */

.screen.center {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(120% 70% at 85% 0%, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 100%);
}
#screen-loading .spinner { border-color: rgba(242, 248, 252, .2); border-top-color: var(--ice); }
.gate-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: 22px;
  padding: 28px 22px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.gate-card h1 { font-size: 1.45rem; margin-bottom: .4rem; }
.gate-card p { color: var(--muted); margin: 0 0 1.2rem; }
.gate-card .field { text-align: left; }
.gate-logo {
  font-size: 2.2rem;
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  background: var(--primary-soft);
  border-radius: 20px;
}
.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons, fields ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  text-decoration: none;
}
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.wide { width: 100%; }
.btn.grow { flex: 1; }
.btn.danger-ghost { color: var(--danger); background: transparent; border-color: transparent; }
.btn:disabled { opacity: .6; }

.icon-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 0; border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
}
.icon-btn:active { background: var(--primary-soft); }

.field { display: block; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  padding: 0;
}
.field em { font-style: normal; font-weight: 400; }
.field input:not([type=radio]):not([type=checkbox]) {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 16px; /* stops iOS from zooming */
}
.field input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.form-error { color: var(--danger); font-size: .9rem; min-height: 0; margin: 0 0 10px; }
.form-error:empty { display: none; }
.row { display: flex; gap: 12px; align-items: flex-start; }
.grow { flex: 1; min-width: 0; }

/* ---------- hero: the frosted top ---------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #f2f8fc;
  padding-bottom: 46px;
  background: radial-gradient(120% 90% at 85% 0%, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 100%);
}
.crystals {
  position: absolute; top: 0; right: 0;
  width: min(100%, 560px); height: 100%;
  color: #fff; opacity: .2;
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }
.hero :focus-visible { outline-color: var(--ice); }

.top {
  display: flex; align-items: flex-start; gap: 4px;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 12px 0 20px;
}
.top-title { flex: 1; min-width: 0; }
.top h1 { font-size: 2.5rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.top p { margin: 8px 0 0; color: var(--ice); font-size: .95rem; }
.top .link-btn { color: #f2f8fc; }
.hero .icon-btn { color: #f2f8fc; }
.hero .icon-btn:active { background: rgba(242, 248, 252, .14); }

.alert-pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 14px 0 0 20px;
  height: 36px; padding: 0 14px 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(242, 248, 252, .35);
  background: rgba(242, 248, 252, .14);
  color: #f2f8fc;
  font-weight: 600; font-size: .9rem;
}
.alert-pill i {
  width: 9px; height: 9px; border-radius: 50%;
  background: #ff8a7a; box-shadow: 0 0 0 3px rgba(255, 138, 122, .3);
}
.alert-pill[aria-pressed=true] { background: #f2f8fc; color: #0e3a5b; border-color: #f2f8fc; }

.toolbar { padding: 14px 16px 0; }
.search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  height: 46px;
  background: rgba(242, 248, 252, .12);
  border: 1px solid rgba(242, 248, 252, .28);
  border-radius: 14px;
  color: var(--ice);
}
.search:focus-within { border-color: var(--ice); box-shadow: 0 0 0 3px rgba(159, 216, 240, .25); }
.search input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: none;
  font-size: 16px; color: #fff;
  height: 100%;
}
.search input::placeholder { color: rgba(242, 248, 252, .7); }

.chips {
  display: flex; gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: -16px; padding-inline: 16px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(242, 248, 252, .3);
  background: transparent;
  font-size: .9rem;
  font-weight: 600;
  color: #d6ecf7;
  white-space: nowrap;
}
.chip[aria-pressed=true] { background: #f2f8fc; border-color: #f2f8fc; color: #0e3a5b; }

/* ---------- list: frosted cards that slide up over the hero ---------- */

main {
  position: relative;
  max-width: 720px;
  margin: -34px auto 0;
  padding: 0 14px calc(100px + var(--safe-b));
}
.group { margin: 0 0 16px; }
.group-head {
  display: inline-flex; align-items: baseline; gap: 8px;
  margin: 0 0 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: .85rem; font-weight: 650;
  color: var(--text);
}
.group-head span + span { color: var(--muted); font-weight: 500; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }

.item {
  display: flex; align-items: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--card-end) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.item.old { border-color: var(--old-border); background: linear-gradient(180deg, var(--surface) 0%, var(--old-bg) 100%); }
.item-main {
  flex: 1; min-width: 0;
  display: flex; gap: 12px; align-items: center;
  padding: 12px 8px 12px 12px;
  border: 0; background: transparent; text-align: left;
}
.item-icon {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 1.35rem;
  background: var(--primary-soft);
  border-radius: 14px;
}
.item-body { min-width: 0; display: grid; gap: 2px; }
.item-name { font-size: 1.02rem; font-weight: 650; overflow-wrap: anywhere; }
.item-sub { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.item-meta { font-size: .82rem; color: var(--muted); }
.st { font-weight: 700; font-style: normal; }
.item.old .st { color: var(--old); }
.item.soon .st { color: var(--soon); }

.item-count {
  flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 8px 12px 8px 0;
}
.count { font-weight: 700; font-size: .88rem; color: var(--primary); font-variant-numeric: tabular-nums; }
.minus {
  width: 50px; height: 36px;
  border-radius: 12px;
  border: 0;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 700; font-size: .9rem;
}
.minus:active { transform: scale(.95); }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--card-end) 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.empty .big { font-size: 2.6rem; display: block; margin-bottom: 10px; }
.empty b { color: var(--text); display: block; font-size: 1.1rem; margin-bottom: 4px; }

/* ---------- dock: scan + add, always at hand ---------- */

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 10px;
  max-width: 720px; margin: 0 auto;
  padding: 14px 14px calc(14px + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 55%, transparent);
}
.dock-add {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px;
  border: 0; border-radius: 18px;
  background: var(--primary); color: var(--primary-text);
  font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 12px 24px -10px rgba(14, 58, 91, .7);
}
.dock-scan {
  flex: none;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 18px;
  background: var(--surface); color: var(--primary);
  box-shadow: var(--shadow);
}
.dock-add:active, .dock-scan:active { transform: scale(.97); }

/* ---------- barcode ---------- */

.field-label {
  display: block;
  font-size: .85rem; font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.input-btn { display: flex; gap: 8px; }
.input-btn input { flex: 1; min-width: 0; }
.scan-inline {
  flex: none;
  width: 50px; min-height: 46px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center;
}
.barcode-info {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: -6px 0 12px;
  font-size: .85rem; color: var(--muted);
}
.barcode-info button {
  border: 0; background: transparent; padding: 4px 0;
  color: var(--primary); font-size: .85rem; font-weight: 600;
}
.lookup-note {
  margin: -4px 0 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--primary-soft);
  font-size: .88rem;
}
.lookup-note:empty { display: none; }

dialog.scanner {
  width: 100vw; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: #000; color: #fff;
  overflow: hidden;
}
dialog.scanner::backdrop { background: #000; }
dialog.scanner video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.scan-frame {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
}
.scan-frame span {
  width: min(78vw, 360px); height: min(42vw, 190px);
  border-radius: 18px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45);
  outline: 3px solid rgba(255, 255, 255, .9);
  position: relative;
}
.scan-frame span::after {
  content: "";
  position: absolute; left: 8%; right: 8%; top: 50%;
  height: 2px; background: #ff5b4f;
  box-shadow: 0 0 8px #ff5b4f;
  animation: scanline 1.6s ease-in-out infinite alternate;
}
@keyframes scanline { from { transform: translateY(-60px); } to { transform: translateY(60px); } }
.scanner.found .scan-frame span { outline-color: #4ade80; }
.scanner.failed .scan-frame { display: none; }
.scanner.failed .scan-hint { bottom: 45%; }
.scan-top {
  position: absolute; left: 0; right: 0;
  top: calc(12px + env(safe-area-inset-top, 0px));
  display: flex; justify-content: space-between;
  padding: 0 16px;
}
.scan-round {
  width: 48px; height: 48px;
  border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .5); color: #fff;
  font-size: 1.2rem;
  display: grid; place-items: center;
}
.scan-round[aria-pressed=true] { background: #fff; color: #000; }
.scan-hint {
  position: absolute; left: 16px; right: 16px;
  bottom: calc(40px + var(--safe-b));
  margin: 0; text-align: center;
  font-size: 1rem; font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}
@media (prefers-reduced-motion: reduce) {
  .scan-frame span::after { animation: none; }
}

/* ---------- sheets ---------- */

dialog.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
}
dialog.sheet[open] { display: flex; animation: up .22s ease-out; }
dialog.sheet > form { display: flex; flex-direction: column; width: 100%; max-height: 92dvh; }
dialog.sheet::backdrop { background: rgba(8, 19, 30, .45); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 600px) {
  dialog.sheet { margin: auto; border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  dialog.sheet[open], .spinner { animation: none; }
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 12px 8px 20px;
}
.sheet-head h2 { font-size: 1.2rem; }
.sheet-body { padding: 6px 20px 16px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-foot {
  display: flex; gap: 10px;
  padding: 12px 16px calc(12px + var(--safe-b));
  border-top: 1px solid var(--border);
}

.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.suggest:empty { display: none; }
.suggest button {
  height: 34px; padding: 0 12px;
  border: 1px dashed var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: .9rem;
}
.suggest .label { width: 100%; font-size: .78rem; color: var(--muted); font-weight: 600; }

.stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.3rem; color: var(--primary); }
.stepper input {
  width: 48px !important; min-height: 44px !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  text-align: center; padding: 0 !important; background: transparent !important;
  -moz-appearance: textfield;
}
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.pick-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { position: relative; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 40px; padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: .88rem; font-weight: 600;
  text-align: center;
}
.cat-grid .pick span { flex-direction: column; min-height: 64px; gap: 2px; font-size: .78rem; line-height: 1.15; }
.cat-grid .pick b { font-size: 1.4rem; font-weight: 400; }
.pick input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.pick input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

.item-info { color: var(--muted); font-size: .85rem; margin: 0 0 8px; }
.item-info:empty { display: none; }

.who-list { display: grid; gap: 8px; padding-bottom: 8px; }
.who-list button {
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  font-weight: 600; font-size: 1.05rem;
}
.who-list button[aria-pressed=true] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.who-list .skip { background: transparent; border-style: dashed; color: var(--muted); font-weight: 500; font-size: .95rem; }

.set { margin: 22px 0 0; }
.set h3 { font-size: 1rem; }
.list-edit { display: grid; gap: 6px; }
.list-row { display: flex; gap: 4px; align-items: center; }
.list-row input {
  flex: 1; min-width: 0;
  min-height: 44px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2); font-size: 16px;
}
.list-row button {
  width: 38px; height: 44px;
  border: 0; border-radius: 10px; background: transparent;
  color: var(--muted); font-size: 1rem;
}
.list-row button:disabled { opacity: .25; }
.list-add { justify-self: start; margin-top: 2px; color: var(--primary); }
.months { display: grid; gap: 6px; }
.month-row { display: flex; align-items: center; gap: 10px; }
.month-row label { flex: 1; }
.month-row input {
  width: 70px; min-height: 40px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); font-size: 16px; text-align: center;
}
.month-row small { color: var(--muted); width: 32px; }
.code-form { margin-top: 8px; }

/* ---------- header extras ---------- */

.link-btn {
  border: 0; background: transparent; padding: 0;
  color: var(--primary); font-weight: 600; font-size: inherit;
}
.top p .link-btn { margin-left: 4px; }
.has-badge { position: relative; }
.badge {
  position: absolute; top: 4px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--old); color: #fff;
  font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
}
.no {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .75rem; font-weight: 700;
  vertical-align: 2px;
  font-variant-numeric: tabular-nums;
}

/* ---------- used up ---------- */

.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 16px; }
.outcome {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 8px;
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface-2);
  font-weight: 700; font-size: 1.05rem;
}
.outcome b { font-size: 1.8rem; font-weight: 400; }
.outcome:active { transform: scale(.98); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); }
.mistake { display: block; margin: 12px 0 8px; color: var(--muted); font-weight: 500; font-size: .9rem; }

/* ---------- shopping ---------- */

.shop-add { display: flex; gap: 8px; margin-bottom: 14px; }
.shop-add input {
  flex: 1; min-width: 0;
  min-height: 46px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2); font-size: 16px;
}
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.shop-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 14px;
  border-radius: 12px;
  background: var(--surface-2);
}
.shop-list .shop-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.shop-list small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.shop-list .tick {
  flex: none; width: 44px; height: 44px;
  border: 2px solid var(--primary); border-radius: 12px;
  background: transparent; color: var(--primary);
  font-size: 1.2rem; font-weight: 700;
}
.shop-empty { color: var(--muted); text-align: center; padding: 24px 0; }

/* ---------- history ---------- */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 6px; }
.stat { background: var(--surface-2); border-radius: 14px; padding: 10px 8px; text-align: center; }
.stat b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .8rem; color: var(--muted); }
.stat.bad b { color: var(--old); }
.waste { font-size: .9rem; color: var(--muted); margin: 6px 0 0; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed-day { margin: 18px 0 6px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.feed li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .93rem; }
.feed time { flex: none; width: 42px; color: var(--muted); font-variant-numeric: tabular-nums; }
.feed .ic { flex: none; width: 22px; text-align: center; }
.day-field select {
  width: 100%; min-height: 46px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2); font-size: 16px;
}
#mail-edit { margin-bottom: 12px; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%; bottom: calc(88px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 20;
  width: calc(100% - 32px); max-width: 480px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 16px;
  border-radius: 14px;
  background: #142636; color: #f1f6fb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  font-size: .95rem;
}
.toast span { flex: 1; }
.toast button {
  border: 0; background: transparent;
  color: #8ec3ff; font-weight: 700;
  padding: 6px 8px;
}
.toast button[hidden] { display: none; }
