/* 予定ダッシュボード — スマホ優先の軽量 CSS */
:root {
  --navy: #1E3A8A;
  --navy-700: #1E3374;
  --navy-50: #EEF2FF;
  --bg: #F2F4F8;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --today: #FEF9C3;
  --today-line: #EAB308;
  --sat: #DBEAFE;
  --sat-text: #1D4ED8;
  --sun: #FEE2E2;
  --sun-text: #DC2626;
  --past: #EDF0F4;
  --past-text: #94A3B8;
  --danger: #DC2626;
  --radius: 16px;
  --tabbar-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --shadow: 0 1px 2px rgb(15 23 42 / .06), 0 4px 14px rgb(15 23 42 / .06);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--navy); }
[hx-get], [data-href] { cursor: pointer; }
small { font-size: .8em; }
.muted { color: var(--muted); }

/* ---------- 上部バー ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: var(--navy); color: #fff;
}
.topbar-title { flex: 1; margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 12px; background: transparent; color: inherit; text-decoration: none;
}
.topbar .icon-btn:active { background: rgb(255 255 255 / .15); }
.holiday-chip { font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sun); color: var(--sun-text); }

/* ---------- ページ ---------- */
.page {
  max-width: 560px; margin: 0 auto;
  padding: 12px 12px calc(var(--tabbar-h) + var(--safe-b) + 88px);
}
.empty { color: var(--muted); margin: 4px 0; }
.empty-inline { color: var(--muted); font-size: .85rem; }
.footnote { color: var(--muted); font-size: .75rem; text-align: center; margin: 12px 0 0; }

/* ---------- カード(今日) ---------- */
.cards { display: grid; gap: 10px; }
.cards-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; min-width: 0;
}
.card-label { font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .05em; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.card-sub { font-weight: 500; font-size: .72rem; }
.card-value { margin: 0; font-size: 1.2rem; font-weight: 700; line-height: 1.35; word-break: break-word; }
.card-outfit, .card-dinner { min-height: 96px; }
.card-outfit:active, .card-dinner:active { transform: scale(.98); }

.card-weather { background: linear-gradient(160deg, #1E3A8A 0%, #3056C4 100%); color: #fff; }
.card-weather.is-rain { background: linear-gradient(160deg, #334155 0%, #1E3A8A 100%); }
.card-weather .card-label, .card-weather .empty { color: rgb(255 255 255 / .8); }
.wx-big { display: flex; align-items: center; gap: 10px; }
.wx-big-icon { font-size: 2.8rem; line-height: 1; }
.wx-big-text { font-size: 1.5rem; font-weight: 800; letter-spacing: .02em; }
.wx-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 0 0; text-align: center; }
.wx-stats div { padding: 4px 0; }
.wx-stats div + div { border-left: 1px solid rgb(255 255 255 / .2); }
.wx-stats dt { font-size: .72rem; opacity: .8; }
.wx-stats dd { margin: 0; font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wx-stats dd small { font-size: .9rem; font-weight: 600; margin-left: 1px; }
.card-weather .t-max { color: #FECACA; }
.card-weather .t-min { color: #BFDBFE; }
.wx-status { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid rgb(255 255 255 / .18); font-size: .75rem; opacity: .9; }
.wx-status.is-failed .wx-err { color: #FDE68A; font-weight: 700; }
.wx-status.htmx-request { opacity: .5; }
.btn-link { border: 0; background: rgb(255 255 255 / .16); color: inherit; padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.btn-link:disabled { opacity: .5; }

.meeting { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--navy-50); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.meeting-title { font-weight: 700; color: var(--navy); width: 100%; }

/* ---------- パネル ---------- */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; margin-top: 10px; }
.panel-title { margin: 0 0 8px; font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.panel-link { font-size: .8rem; text-decoration: none; font-weight: 600; }
.panel-note p { margin: 0; font-weight: 600; }
.panel-staples { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .8rem; color: var(--muted); }
.panel-staples b { color: var(--text); margin-right: 4px; }

/* ---------- タグ・バッジ ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  --c: #64748B;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px; border: 0;
  background: color-mix(in srgb, var(--c) 13%, white);
  color: color-mix(in srgb, var(--c) 80%, black);
  font-size: .85rem; font-weight: 700; line-height: 1.4; white-space: nowrap;
}
button.tag:active { transform: scale(.96); }
.tags-lg .tag { font-size: 1.05rem; padding: 8px 14px; }
.tag-chore { background: #F1F5F9; color: #334155; font-weight: 600; }
.tag-time { font-variant-numeric: tabular-nums; font-weight: 800; }
.tag-rep { opacity: .55; font-size: .8em; }
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; border: 0; background: #E0E7FF; color: #3730A3; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge-high { background: var(--danger); color: #fff; }

/* ---------- 経済(今日のミニ一覧) ---------- */
.econ-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.econ-mini li { display: grid; grid-template-columns: 4.2em 5.2em 1fr; align-items: center; gap: 6px; font-size: .88rem; }
.econ-mini .badge { justify-self: start; }
.econ-mini .countdown { font-weight: 800; color: var(--navy); }
.econ-mini .is-high .countdown { color: var(--danger); }
.econ-date { color: var(--muted); font-size: .8rem; }

/* ---------- 週 ---------- */
.week { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.day-row {
  display: grid; grid-template-columns: 3.3em 1fr auto; gap: 10px; align-items: center;
  background: var(--card); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow);
  border-left: 5px solid transparent;
}
.day-row:active { transform: scale(.99); }
.day-row.is-blue { background: var(--sat); }
.day-row.is-red { background: var(--sun); }
.day-row.is-today { background: var(--today); border-left-color: var(--today-line); }
.day-row.is-past { background: var(--past); color: var(--past-text); box-shadow: none; }
.day-row.is-past .tag, .day-row.is-past .badge { filter: grayscale(1); opacity: .7; }
.day-row.is-month-start { box-shadow: inset 0 3px 0 var(--danger), var(--shadow); }
.dr-date { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.dr-md { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dr-wd { font-size: .8rem; font-weight: 700; }
.is-blue .dr-wd, .is-blue .dr-md { color: var(--sat-text); }
.is-red .dr-wd, .is-red .dr-md { color: var(--sun-text); }
.is-past .dr-wd, .is-past .dr-md { color: var(--past-text); }
.dr-body { min-width: 0; }
.holiday-name { font-size: .72rem; font-weight: 700; color: var(--sun-text); margin-bottom: 2px; }
.dr-sub { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; font-size: .75rem; color: var(--muted); }
.dr-sub span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dr-wx { text-align: right; }
.wx-inline { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dr-wx .wx-icon { font-size: 1.6rem; }
.wx-t { font-size: .82rem; }
.t-max { color: var(--sun-text); }
.t-min { color: var(--sat-text); }
.t-sep { color: var(--muted); margin: 0 1px; }
.wx-pop { font-size: .72rem; color: var(--muted); }
.wx-none { color: var(--muted); }
.detail .wx-inline { flex-direction: row; gap: 6px; vertical-align: middle; }

/* ---------- 月 ---------- */
.month { touch-action: pan-y; }
.month-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.month-title { flex: 1; text-align: center; font-size: 1.15rem; font-weight: 800; }
.month-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); text-decoration: none; font-size: 1.6rem; color: var(--navy); line-height: 1; }
.month-btn:active { background: var(--navy-50); }
.month-today { position: absolute; right: 70px; font-size: .75rem; padding: 4px 10px; border-radius: 999px; background: var(--navy); color: #fff; text-decoration: none; font-weight: 700; }
.month-nav { position: relative; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-head { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 2px 0; }
.cal-head.is-red { color: var(--sun-text); }
.cal-head.is-blue { color: var(--sat-text); }
.cal-cell {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 1px;
  min-height: 74px; padding: 3px 2px 4px; border: 0; border-radius: 8px;
  background: var(--card); text-align: center; overflow: hidden;
}
.cal-cell:active { outline: 2px solid var(--navy); }
.cal-cell.is-blue { background: var(--sat); }
.cal-cell.is-red { background: var(--sun); }
.cal-cell.is-today { background: var(--today); outline: 2px solid var(--today-line); outline-offset: -2px; }
.cal-cell.is-past { background: var(--past); color: var(--past-text); }
.cal-cell.is-past .cal-item { filter: grayscale(1); opacity: .6; }
.cal-cell.is-other { opacity: .38; }
.cal-cell.is-month-start { box-shadow: inset 3px 0 0 var(--danger); }
.cal-day { font-size: .9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cal-cell.is-red .cal-day { color: var(--sun-text); }
.cal-cell.is-blue .cal-day { color: var(--sat-text); }
.cal-holiday { font-size: .55rem; line-height: 1.1; color: var(--sun-text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; font-size: .8rem; line-height: 1.2; }
.cal-item { --c: #64748B; }
.cal-more { font-size: .6rem; color: var(--muted); align-self: center; }
.cal-econ { margin-top: auto; font-size: .55rem; line-height: 1.2; padding: 1px 2px; border-radius: 4px; background: #E0E7FF; color: #3730A3; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-econ.is-high { background: var(--danger); color: #fff; }
.cal-wx { position: absolute; top: 2px; right: 2px; font-size: .6rem; opacity: .85; }
.month.swiping-left .cal { animation: slide-l .18s ease-out; }
.month.swiping-right .cal { animation: slide-r .18s ease-out; }
@keyframes slide-l { from { transform: translateX(24px); opacity: .4; } }
@keyframes slide-r { from { transform: translateX(-24px); opacity: .4; } }

/* ---------- 経済一覧 ---------- */
.econ-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.econ-month { font-size: .8rem; font-weight: 800; color: var(--muted); margin: 8px 4px 0; }
.econ-row { display: grid; grid-template-columns: 3.2em 1fr auto; gap: 10px; align-items: center; background: var(--card); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); border-left: 5px solid #C7D2FE; }
.econ-row.is-high { border-left-color: var(--danger); background: #FFF5F5; }
.econ-when { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.econ-md { font-weight: 800; font-variant-numeric: tabular-nums; }
.econ-wd { font-size: .75rem; color: var(--muted); }
.econ-name { font-weight: 700; min-width: 0; }
.econ-row.is-high .econ-name { color: var(--danger); font-size: 1.1rem; }
.econ-time, .econ-memo { display: block; font-size: .75rem; color: var(--muted); font-weight: 500; }
.econ-count { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.econ-count .countdown { font-size: .85rem; font-weight: 800; color: var(--navy); white-space: nowrap; }
.econ-row.is-high .countdown { color: var(--danger); }
.imp { font-size: .65rem; font-weight: 800; color: #fff; background: var(--danger); border-radius: 4px; padding: 1px 6px; }

/* ---------- タブバー・FAB ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgb(255 255 255 / .96); border-top: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 700; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.active { color: var(--navy); }
.tabbar a.active svg { stroke-width: 2.5; }
.fab {
  position: fixed; z-index: 31; right: max(16px, calc(50vw - 264px));
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px);
  width: 60px; height: 60px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: var(--navy); color: #fff;
  box-shadow: 0 6px 18px rgb(30 58 138 / .45);
}
.fab:active { transform: scale(.94); }

/* ---------- ボトムシート ---------- */
#sheet-root:empty { display: none; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgb(15 23 42 / .45); opacity: 0; transition: opacity .2s; }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0;
  max-width: 560px; margin: 0 auto; max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--card); border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 30px rgb(15 23 42 / .2);
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
  padding-bottom: var(--safe-b);
}
#sheet-root.open .sheet-backdrop { opacity: 1; }
#sheet-root.open .sheet { transform: none; }
.sheet-handle { width: 44px; height: 5px; border-radius: 3px; background: #CBD5E1; margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; padding: 4px 8px 4px 18px; flex: none; }
.sheet-head h2 { flex: 1; margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.sheet-body { overflow-y: auto; padding: 4px 18px 18px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* ---------- 日の詳細 ---------- */
.detail { display: grid; gap: 2px; }
.detail-row { display: grid; grid-template-columns: 3.4em 1fr auto; gap: 8px; align-items: center; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; width: 100%; }
.detail-row-top { align-items: start; }
.detail-row-btn:active { background: var(--navy-50); }
.detail-label { font-size: .78rem; font-weight: 700; color: var(--muted); padding-top: 2px; }
.chev { color: var(--muted); font-size: 1.2rem; }

/* ---------- フォーム ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 1rem; text-decoration: none; color: var(--text); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-danger { color: var(--danger); border-color: #FECACA; background: #FFF5F5; }
.btn-block { width: 100%; margin-top: 14px; }
.btn-row { display: flex; gap: 8px; margin-top: 14px; }
.btn-row .btn { flex: 1; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #EEF1F6; border-radius: 12px; padding: 3px; gap: 3px; margin-bottom: 12px; }
.seg button, .seg label { border: 0; background: none; border-radius: 9px; padding: 8px 4px; font-size: .88rem; font-weight: 700; color: var(--muted); text-align: center; }
.seg button[aria-selected="true"], .seg input:checked + span { background: var(--card); color: var(--navy); box-shadow: 0 1px 3px rgb(15 23 42 / .12); }
.seg label { padding: 0; }
.seg label span { display: block; padding: 8px 4px; border-radius: 9px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }

.field { margin-bottom: 14px; }
.field-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.field-head .field-label { margin: 0; }
.seg-sm { margin: 0; padding: 2px; border-radius: 10px; }
.seg-sm label span { padding: 4px 14px; font-size: .8rem; border-radius: 8px; }
.field-label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  --c: var(--navy);
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 8px 14px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--card);
  font-weight: 700; font-size: .95rem; white-space: nowrap;
}
.chip input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); color: color-mix(in srgb, var(--c) 85%, black); }
.chip input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.chip-date span { min-width: 64px; justify-content: center; }
.chip-picker span { padding: 0 6px 0 12px; }
.chip-picker input[type="date"] { position: static; opacity: 1; pointer-events: auto; border: 0; background: transparent; min-height: 40px; width: 9.2em; font-weight: 700; font-size: .92rem; }

.input, .field input[type="text"], .field input[type="time"], .field input[type="date"], .field input[type="number"], .field select, .field textarea, .field input[type="password"] {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px;
}
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgb(30 58 138 / .15); }
.field-inline { display: flex; gap: 8px; align-items: center; }
.field-inline > * { flex: 1; }
.field-hint { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.field-error { color: var(--danger); font-size: .85rem; font-weight: 700; margin: 0 0 10px; }

details.more { border: 1.5px solid var(--line); border-radius: 14px; margin-bottom: 4px; }
details.more > summary { list-style: none; padding: 12px 14px; font-weight: 700; font-size: .9rem; color: var(--navy); display: flex; justify-content: space-between; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "＋"; }
details.more[open] > summary::after { content: "−"; }
details.more > .more-body { padding: 0 14px 4px; }
.weekday-picks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekday-picks .chip span { min-width: 0; padding: 8px 0; justify-content: center; width: 100%; min-height: 40px; }

.tabpanel[hidden] { display: none; }
.hidden { display: none !important; }

/* ---------- トースト ---------- */
#toast-root { position: fixed; z-index: 60; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b) + 88px); display: grid; justify-items: center; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 520px; padding: 12px 12px 12px 16px; border-radius: 14px; background: #0F172A; color: #fff; box-shadow: 0 8px 24px rgb(15 23 42 / .3); font-weight: 600; animation: toast-in .2s ease-out; }
.toast.is-error { background: var(--danger); }
.toast button { border: 0; background: rgb(255 255 255 / .15); color: #FDE68A; font-weight: 800; padding: 8px 12px; border-radius: 10px; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

/* ---------- 設定・ログイン ---------- */
.settings-list { list-style: none; margin: 0; padding: 0; }
.settings-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.settings-list li:last-child { border-bottom: 0; }
.settings-list .grow { flex: 1; min-width: 0; }
.drag-handle { color: var(--muted); padding: 8px 6px; touch-action: none; cursor: grab; user-select: none; }
.settings-list li.dragging { opacity: .5; background: var(--navy-50); }
.mini-btn { border: 1px solid var(--line); background: var(--card); border-radius: 10px; min-width: 40px; min-height: 40px; padding: 0 10px; font-weight: 700; font-size: .85rem; }
.mini-btn:disabled { opacity: .35; }
.settings-list li.cat-row { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; padding: 10px 0; }
.cat-row.is-hidden .cat-main { opacity: .5; }
.cat-move { grid-row: span 2; display: flex; flex-direction: column; gap: 4px; }
.cat-move .mini-btn { min-height: 36px; min-width: 36px; padding: 0; }
.cat-main { display: flex; gap: 6px; align-items: center; min-width: 0; }
.cat-main input[name=name] { flex: 1; min-width: 0; }
.cat-emoji { width: 3em !important; flex: none; text-align: center; padding: 8px 2px !important; }
.cat-actions { display: flex; gap: 6px; align-items: center; }
.cat-color { width: auto !important; min-height: 40px !important; padding: 4px 8px !important; font-weight: 700; }
.settings-list .input, .panel .input { min-height: 44px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; width: 100%; }
.mini-btn.danger { color: var(--danger); }
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(180deg, var(--navy) 0 38%, var(--bg) 38%); }
.login-card { width: 100%; max-width: 380px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 24px 20px; }
.login-card h1 { margin: 0 0 4px; font-size: 1.3rem; color: var(--navy); }
.login-card p { margin: 0 0 18px; color: var(--muted); font-size: .85rem; }
.login-logo { width: 64px; height: 64px; border-radius: 16px; display: block; margin: 0 0 12px; }

@media (min-width: 700px) {
  .page { padding-top: 20px; }
  .cal-cell { min-height: 96px; }
}
