/* HouseHub — dashboard style (B): navy header, blue accent, thin borders.
   Chart colors follow the validated reference palette (categorical slots in fixed order,
   one hue for magnitude, status colors always paired with an icon and a label). */
:root {
  --bg: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --ink: #0f1726;
  --ink-2: #3c4658;
  --muted: #6b7486;
  --line: #dde2ea;
  --accent: #2a5db0;
  --accent-ink: #ffffff;
  --accent-soft: #e4ecf8;
  --head-bg: #121a2b;
  --head-ink: #ffffff;
  --notice-bg: #fff6df;
  /* warnings are orange (red is a person's color) */
  --critical: #e8620c;
  --critical-ink: #b54708;
  --critical-soft: #fdebdc;
  /* person colors (ユーザーマスターの性別): male blue, female red */
  --male: #2a5db0;
  --male-soft: #e4ecf8;
  --female: #d23a4b;
  --female-soft: #fbe6e9;
  --warning: #e0a10f;
  --warning-ink: #8a5a00;
  --warning-soft: #fdf1d8;
  --ok-soft: #e4ecf8;
  --bar: #2a78d6;
  --bar-track: #e4ecf8;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #6250d6;
  --series-8: #e34948;
  --series-other: #8a93a6;
  --series-none: #b8bfcc;
  --radius: 8px;
  color-scheme: light;
}


* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
}

a { color: var(--accent); }
h1 { font-size: 1.35rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1rem; margin: 0 0 0.75rem; }
h3 { font-size: 0.95rem; margin: 1.25rem 0 0.5rem; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- icons ---------- */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic-sm { width: 14px; height: 14px; vertical-align: -2px; }
.with-icon { display: flex; align-items: center; gap: 0.45rem; }
.icbox { width: 34px; height: 34px; border-radius: 6px; display: inline-grid; place-items: center; flex: none; }
.icbox .ic { width: 19px; height: 19px; }
.icbox-sm { width: 30px; height: 30px; }
.lg-accounts { background: #e3eefb; color: #1d5fb0; }
.lg-cards { background: #fde9df; color: #b2461b; }
.lg-contracts { background: #e3f4ec; color: #17785a; }
.lg-items { background: #f1ecfb; color: #5a46c2; }
.lg-memberships { background: #fdf3d6; color: #8a5a00; }
.lg-chores { background: #e6f2f7; color: #186a86; }

/* ---------- frame ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--head-bg);
  padding: 0.6rem 1rem;
  padding-top: calc(0.6rem + env(safe-area-inset-top));
}
.brand { color: var(--head-ink); font-weight: 700; text-decoration: none; letter-spacing: 0.02em; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.brand { white-space: nowrap; }
.head-info { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; min-width: 0; color: var(--head-ink); font-size: 0.85rem; white-space: nowrap; }
.head-date { font-variant-numeric: tabular-nums; opacity: 0.85; }
.head-user { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--head-ink); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.head-user::before { content: ''; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--person, var(--head-ink)); flex: none; }
.head-role { font-size: 0.7rem; border: 1px solid currentColor; border-radius: 999px; padding: 0 0.35rem; opacity: 0.8; }
.home-head-info { display: flex; align-items: center; gap: 0.9rem; white-space: nowrap; }
.home-user { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.home-user::before { content: ''; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--person, var(--muted)); }
.home-bell { position: relative; display: inline-flex; color: var(--ink); padding: 0.15rem; }
.home-bell .ic { width: 1.4rem; height: 1.4rem; }
.home-bell .bell-count { position: absolute; top: -0.35rem; right: -0.45rem; min-width: 1.15rem; height: 1.15rem; padding: 0 0.3rem; border-radius: 999px;
  background: var(--critical); color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 1.15rem; text-align: center; }
.bell { position: relative; display: inline-flex; color: var(--head-ink); padding: 0.15rem; }
.bell .ic { width: 1.4rem; height: 1.4rem; }
.bell-count { position: absolute; top: -0.35rem; right: -0.45rem; min-width: 1.15rem; height: 1.15rem; padding: 0 0.3rem; border-radius: 999px;
  background: var(--critical); color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 1.15rem; text-align: center; }
.notice { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.notice:last-child { border-bottom: 0; }
.notice-title { font-weight: 700; display: flex; align-items: center; gap: 0.4rem; }
.notice.unread .notice-title::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--critical); flex: none; }
.notice-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0.25rem 0; }
.notice-actions { display: flex; gap: 0.6rem; align-items: center; }
.notice-tools { justify-content: flex-end; margin-bottom: 0.2rem; }
.notice-tools:empty { display: none; }
.ack-status { margin: 0.2rem 0; color: var(--muted); }
.ack-status .not-acked { color: var(--critical-ink); font-weight: 600; }
.tag-ack { background: var(--notice-bg); color: var(--critical-ink); font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 0.05rem 0.5rem; }
.recipients { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.recipients label { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 400; }

.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.app-nav[hidden] { display: none; }
.app-nav a {
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 0.5rem 0 0.45rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
}
.app-nav a .ic { width: 22px; height: 22px; }
.app-nav a.active { color: var(--accent); }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .app-nav { position: sticky; top: 44px; display: flex; justify-content: center; border-top: 0; border-bottom: 1px solid var(--line); }
  .app-nav a { display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 1.2rem; font-size: 0.9rem; box-shadow: none; }
  .app-nav a.active { box-shadow: inset 0 -3px 0 var(--accent); }
  .app-nav a .ic { width: 18px; height: 18px; }
}

.app-main { max-width: 1040px; margin: 0 auto; padding: 1rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.9rem;
  min-width: 0;
}
.card > h2 .more { margin-left: auto; font-size: 0.8rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.card.notice, .notice-text { background: var(--notice-bg); }
.notice-text { padding: 0.5rem 0.75rem; border-radius: 6px; }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.error { color: var(--critical-ink); }
.error:empty { display: none; }
.req { color: var(--critical-ink); }

.title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.title-row h1 { overflow-wrap: anywhere; min-width: 0; }
.title-row .button { flex: none; white-space: nowrap; }

/* ---------- controls ---------- */
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font: inherit;
  font-weight: 600;
  padding: 0.5rem 1rem;
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
button.small, .button.small { min-height: 36px; padding: 0.3rem 0.7rem; font-size: 0.88rem; }
button.primary, .button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { color: var(--critical-ink); border-color: var(--critical-ink); }
button:disabled { opacity: 0.5; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }
.button-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

label, .label { display: block; font-weight: 600; margin: 0.75rem 0 0.25rem; font-size: 0.92rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="search"],
input[type="date"], input[type="month"], input[type="datetime-local"], select, textarea {
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.7rem;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}
textarea { resize: vertical; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
textarea.secret { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }
input[type="file"] { font: inherit; margin: 0.25rem 0; }
.field { margin-bottom: 0.25rem; }
.field.checkbox { display: flex; align-items: center; gap: 0.5rem; margin: 0.75rem 0; }
.field.checkbox label { margin: 0; }
.field.checkbox input { width: 22px; height: 22px; accent-color: var(--accent); }
.field-error { margin: 0.25rem 0 0; }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 1rem 0 0; padding: 0 0.75rem 0.75rem; }
legend { font-weight: 700; padding: 0 0.25rem; }
.link-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 0.4rem; margin-bottom: 0.4rem; }
@media (max-width: 520px) { .link-row { grid-template-columns: 1fr auto; } .link-row input[type="url"] { grid-column: 1; } .link-row button { grid-row: 1 / span 2; grid-column: 2; } }

.login { max-width: 420px; margin: 2rem auto; }
.login button { width: 100%; margin-top: 1rem; }

/* ---------- dashboard ---------- */
.dash-head {
  background: var(--head-bg);
  color: var(--head-ink);
  margin: -1rem -1rem 1rem;
  padding: 0.4rem 1rem 1.1rem;
}
.dash-head h1 { margin: 0.1rem 0 0; font-size: 1.3rem; }
.dash-date { font-size: 0.8rem; opacity: 0.75; }
@media (min-width: 900px) { .dash-head { margin: -1rem 0 1rem; border-radius: 0 0 var(--radius) var(--radius); padding: 1rem 1.25rem 1.25rem; } }

.kpis { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 0.6rem; margin-bottom: 0.9rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.75rem; min-width: 0; }
.kpi-label { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.kpi-value { font-size: 1.45rem; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.kpi-value small { font-size: 0.75rem; font-weight: 600; margin-left: 2px; }
.kpi-main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kpi-main .kpi-label { color: inherit; opacity: 0.85; }
.kpi-alert .kpi-value { color: var(--critical-ink); }
@media (max-width: 380px) { .kpi-value { font-size: 1.2rem; } }

.dash-grid { display: grid; gap: 0 0.9rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.tiles-wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.tile {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.tile:hover { border-color: var(--accent); }
.tile-count { font-size: 1.2rem; font-weight: 800; line-height: 1.1; }
.tile-count small { font-size: 0.72rem; font-weight: 500; }
.tile-label { font-size: 0.78rem; color: var(--ink-2); overflow-wrap: anywhere; }

.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}
.chip .ic { width: 15px; height: 15px; color: var(--accent); }

.legend { display: flex; gap: 0.4rem 1rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--ink-2); margin-top: 0.4rem; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.35rem; vertical-align: 0; }

/* ---------- charts (SVG) ---------- */
.chart { display: block; max-width: 640px; margin: 0 auto 0.4rem; overflow: visible; }
.chart text { font-family: inherit; }
.tl-axis { stroke: var(--line); stroke-width: 2; }
.tl-crit-zone { fill: var(--critical); opacity: 0.22; }
.tl-tick { font-size: 10px; fill: var(--muted); }
.tl-stem { stroke: var(--line); stroke-width: 1; }
.tl-dot { fill: var(--surface); stroke-width: 3; }
.tl-crit { stroke: var(--critical); }
.tl-warn { stroke: var(--warning); }
.tl-ok, .tl-past { stroke: var(--muted); }
.tl-label { font-size: 10px; font-weight: 700; fill: var(--ink-2); }
.bar-label { font-size: 12px; fill: var(--ink-2); }
.bar-track { fill: var(--bar-track); }
.bar-fill { fill: var(--bar); }
.bar-value { font-size: 12px; font-weight: 700; fill: var(--ink); font-variant-numeric: tabular-nums; }
.flow-band { opacity: 0.28; }
.flow-name { font-size: 11.5px; font-weight: 700; fill: var(--ink); }
.flow-sub { font-size: 10.5px; fill: var(--ink-2); font-weight: 400; font-variant-numeric: tabular-nums; }
.flow-leaf { font-size: 11px; fill: var(--ink); }
.chart a { text-decoration: none; cursor: pointer; }
.chart a:hover text, .chart a:focus text { fill: var(--accent); }

/* ---------- events / badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  border-radius: 999px;
  padding: 1px 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--ok-soft);
}
.badge .ic { width: 13px; height: 13px; }
.badge-crit { background: var(--critical-soft); color: var(--critical-ink); }
.badge-warn { background: var(--warning-soft); color: var(--warning-ink); }
.badge-past { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.events { list-style: none; margin: 0.25rem 0 0; padding: 0; }
.events li { display: grid; grid-template-columns: 6.6rem 1fr; gap: 0.6rem; align-items: center; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.events li:first-child { border-top: 0; }
.events .badge { justify-self: start; }
.event-name { font-weight: 600; }
.event-name a { color: var(--ink); text-decoration: none; }

/* ---------- lists ---------- */
.filters { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; margin-bottom: 1rem; }
.filters select { width: auto; }
.list { display: grid; gap: 0.5rem; }
.list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  text-decoration: none;
}
.list-item:hover { border-color: var(--accent); }
.list-body { flex: 1; min-width: 0; }
.list-title { font-weight: 700; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.list-chevron { color: var(--muted); }
.tags { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.3rem; }
.tag { background: var(--accent-soft); color: var(--ink); border-radius: 4px; padding: 0 0.5rem; font-size: 0.75rem; }

/* ---------- credit card faces ---------- */
.cc-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.cc-wrap { color: var(--ink); text-decoration: none; display: block; }
.cc {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.586;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 6px 18px rgba(15, 23, 38, 0.18);
}
.cc::after { content: ""; position: absolute; right: -50px; top: -60px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.cc > * { position: relative; z-index: 1; }
.cc-visa { background: linear-gradient(135deg, #1a3b8f, #3a6fd8); }
.cc-master { background: linear-gradient(135deg, #8a2a12, #e0692d); }
.cc-jcb { background: linear-gradient(135deg, #0f6b4f, #27a37a); }
.cc-amex { background: linear-gradient(135deg, #12506b, #2f8fb5); }
.cc-diners { background: linear-gradient(135deg, #2b3340, #5b6678); }
.cc-other { background: linear-gradient(135deg, #3b2f63, #6c5bb5); }
.cc-closed { filter: grayscale(0.85); opacity: 0.7; }
.cc-row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.cc-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-brand { font-weight: 800; letter-spacing: 0.06em; font-size: 0.95rem; white-space: nowrap; }
.cc-chip { width: 34px; height: 25px; border-radius: 5px; background: linear-gradient(135deg, #f3d27a, #c99a2e); }
.cc-digits { font-size: 1.1rem; letter-spacing: 0.12em; white-space: nowrap; }
.cc-meta { font-size: 0.78rem; opacity: 0.95; }
.cc-flag { display: inline-flex; align-items: center; gap: 3px; background: rgba(255, 255, 255, 0.92); color: #8a2a12; border-radius: 999px; padding: 0 0.5rem; font-weight: 700; font-size: 0.72rem; }
.cc-info { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-2); padding: 0.45rem 0.25rem 0; }

/* ---------- detail ---------- */
.hero-grid { display: grid; gap: 0 0.9rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.deadline-main { display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.deadline-days { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.deadline-unit { font-weight: 700; }
.deadline-date { margin-left: auto; display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.deadline-crit .deadline-days { color: var(--critical-ink); }
.deadline-warn .deadline-days { color: var(--warning-ink); }
.deadline-past .deadline-days { color: var(--muted); font-size: 1.6rem; }
.gauge { height: 10px; border-radius: 999px; background: var(--bar-track); overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 999px; background: var(--bar); }
.gauge-crit { background: var(--critical); }
.gauge-warn { background: var(--warning); }
.gauge-past { background: var(--muted); }
.gauge-scale { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.25rem; }

.links { margin: 0; padding-left: 1.2rem; }
dl.fields { display: grid; grid-template-columns: minmax(8rem, 32%) 1fr; gap: 0.45rem 1rem; margin: 0; }
dl.fields dt { color: var(--muted); font-size: 0.85rem; }
dl.fields dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 520px) { dl.fields { grid-template-columns: 1fr; gap: 0.1rem; } dl.fields dd { margin-bottom: 0.55rem; } }
.masked { font-variant-numeric: tabular-nums; letter-spacing: 0.05em; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.table th { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.5rem; margin: 0.5rem 0 0.75rem; }
.photos > p { grid-column: 1 / -1; margin: 0; }
.photo { margin: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.photo-open { padding: 0; min-height: 0; border: 1px solid var(--line); background: var(--surface-2); aspect-ratio: 1; overflow: hidden; border-radius: 6px; }
.photo-open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.88); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-close { position: absolute; top: calc(0.75rem + env(safe-area-inset-top)); right: 0.75rem; }

/* change history as a vertical timeline */
.history { list-style: none; margin: 0; padding: 0; }
.history li { position: relative; padding: 0.35rem 0 0.75rem 1.2rem; margin-left: 0.35rem; border-left: 2px solid var(--line); overflow-wrap: anywhere; }
.history li:last-child { border-left-color: transparent; }
.history li::before { content: ""; position: absolute; left: -6px; top: 0.6rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.stamps { margin-bottom: 0.6rem; }
.member-list { list-style: none; margin: 0; padding: 0; }
.member-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.member-list li:last-child { border-bottom: 0; }

/* ---------- settings ---------- */
.meter-wrap { margin-bottom: 1rem; }
.meter-head { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.meter { height: 8px; border-radius: 999px; background: var(--bar-track); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--bar); }
.meter-warning .meter-fill { background: var(--warning); }
.meter-critical .meter-fill { background: var(--critical); }

.toast-box { position: fixed; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; pointer-events: none; padding: 0 1rem; }
.toast { background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; border-radius: 6px; max-width: 520px; pointer-events: auto; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); }
.toast-error { background: var(--critical); color: #ffffff; }
details summary { cursor: pointer; margin-top: 1rem; }

/* ---------- chores ---------- */
.today-chores { list-style: none; margin: 0; padding: 0; }
.today-chores li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.today-chores li:first-child { border-top: 0; }
.today-chores li a { color: var(--ink); font-weight: 600; text-decoration: none; }
.today-chores li:not(.mine) a { font-weight: 400; color: var(--ink-2); }
.chore-figure { display: grid; justify-items: end; line-height: 1.25; white-space: nowrap; }
.balance { font-weight: 700; margin: 0.2rem 0 0.6rem; }
.table tr.total td { font-weight: 700; }
.kpis-2 { grid-template-columns: 1fr 1fr; margin-bottom: 0.5rem; }
.formula { margin: 0; overflow-wrap: anywhere; }
.filters-2 { grid-template-columns: 1fr 1fr; }
.filters-2 select { width: 100%; }
.preview { font-weight: 700; color: var(--accent); margin: 0.75rem 0 0; }
.day-picker { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.day-picker .day { margin: 0; font-weight: 600; }
.day-picker .day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day-picker .day span {
  display: inline-grid;
  place-items: center;
  min-width: 2.6rem;
  height: 2.3rem;
  padding: 0 0.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.day-picker-month .day span { min-width: 2.3rem; }
.day-picker .day input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day-picker .day input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- shared account (共通口座) */
.month-nav { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.month-panel { border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem; margin-bottom: 0.9rem; background: var(--surface-2); }
.month-panel .shared-cards .card { margin-bottom: 0; }
.month-nav .month-label { margin: 0; flex: 1; text-align: center; display: flex; align-items: center; justify-content: center; gap: 0.4rem; flex-wrap: wrap; }
.badge-now { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.75rem; font-weight: 700; }
.shared-table tr.group th { font-size: 0.8rem; color: var(--accent); background: var(--accent-soft); font-weight: 700; padding-top: 0.35rem; padding-bottom: 0.35rem; }
.shared-table tr.item th { padding-left: 1.2rem; font-weight: 400; }
.shared-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.6rem; }
.shared-figures { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; margin: 0.5rem 0 0.75rem; align-items: baseline; }
.shared-figures dt { color: var(--muted); font-size: 0.9rem; }
.shared-figures dd { margin: 0; text-align: right; }
.shared-figures dd.big { font-size: 1.4rem; font-weight: 700; }
.shared-figures dd.due { color: var(--critical-ink); }
.shared-figures dt.subtotal, .shared-figures dd.subtotal { font-weight: 600; color: var(--ink); border-top: 1px dashed var(--line); padding-top: 0.25rem; }
.shared-figures dt.total, .shared-figures dd.total { border-top: 2px solid var(--line); padding-top: 0.25rem; color: var(--ink); }
.table-wrap { overflow-x: auto; }
.shared-table tr.total th, .shared-table tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
.shared-table tr.sub th, .shared-table tr.sub td { color: var(--muted); }
.shared-table tr.subtotal th, .shared-table tr.subtotal td { font-weight: 600; border-top: 1px dashed var(--line); }
.list-item.ended { opacity: 0.6; }
.kpis.kpis-2 { grid-template-columns: 1fr 1fr; margin: 0.5rem 0 0; }
.line-grid { stroke: var(--line); stroke-width: 1; }
.line-zero { stroke: var(--muted); stroke-width: 1; }
.line-tick { font-size: 10px; fill: var(--muted); }
.line-path { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }

.kpis.kpis-3 { grid-template-columns: repeat(3, 1fr); margin: 0.5rem 0; }
.inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.inline-form select { flex: 1; min-width: 12rem; }
.month-panel > h2 { margin: 0 0 0.6rem; }
.tag-contract { margin-left: 0.4rem; font-size: 0.7rem; vertical-align: middle; }
.shared-cost-box { margin-bottom: 0.9rem; }
.shared-cost-box .field.checkbox { margin-bottom: 0.2rem; }
.deduction { margin: 0 0 0.6rem; color: var(--accent); }
.warn-text { color: var(--warning-ink); font-weight: 600; }
.mf-import { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px dashed var(--line); }
.mf-import label.button { display: inline-block; cursor: pointer; }
.mf-import label.button input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.import-status { margin-top: 0.5rem; }
details { margin-top: 0.75rem; }
details > summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.table th + th, .table td + td { padding-left: 0.9rem; }
.tag-personal, .tag-review { margin-left: 0.4rem; font-size: 0.7rem; vertical-align: middle; }
.tag-review { background: var(--warning-soft); color: var(--warning-ink); }
.personal-group + .personal-group { margin-top: 1rem; }
.tag-deposit { margin-left: 0.4rem; font-size: 0.7rem; vertical-align: middle; background: var(--accent-soft); color: var(--accent); }

/* ---------------------------------------------------------------- money page tabs */
.tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--line); margin: 1.2rem 0 0.75rem; overflow-x: auto; }
.tabs .tab { flex: 1 1 auto; text-align: center; font-size: 0.92rem; padding: 0.55rem 0.45rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs .tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.period-bar { margin-bottom: 0.75rem; }
.period-bar .month-nav { margin-bottom: 0.4rem; }
.period-switch { justify-content: center; }
.year-table td.due { color: var(--critical-ink); font-weight: 600; }

/* ---------------------------------------------------------------- password reset */
.forgot { max-width: 420px; margin: 0 auto 2rem; }
.forgot summary { cursor: pointer; font-weight: 600; }
.forgot label { display: block; margin-top: 0.75rem; }
.forgot input { width: 100%; }
.forgot button { width: 100%; margin-top: 0.75rem; }

/* ---------------------------------------------------------------- shortcuts (site icons) */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0.5rem; }
.shortcut { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.6rem 0.3rem; border-radius: 10px; background: var(--accent-soft); color: var(--ink); text-decoration: none; text-align: center; }
.shortcut:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.shortcut-icon { width: 40px; height: 40px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.shortcut-icon img { width: 28px; height: 28px; object-fit: contain; }
.shortcut-letter { font-weight: 700; font-size: 1.1rem; color: var(--accent); }
.shortcut-label { font-size: 0.75rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }

.tag-attach { margin-left: 0.4rem; font-size: 0.7rem; vertical-align: middle; background: var(--accent-soft); color: var(--accent); }
.attach-box .photos { margin: 0.4rem 0; }

/* ---------------------------------------------------------------- page frame (2026-11-01) */
.page-head {
  position: sticky;
  top: var(--page-head-top, 44px);
  z-index: 8;
  background: var(--bg);
  margin: -1rem -1rem 0.9rem;
  padding: 0.6rem 1rem 0;
  border-bottom: 1px solid var(--line);
}
.page-title { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; padding-bottom: 0.6rem; }
.page-title h1 { margin: 0; font-size: 1.2rem; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; flex: 0 1 auto; }
.page-action { margin-left: auto; display: flex; gap: 0.4rem; flex: none; }
.page-action .button, .page-action button { white-space: nowrap; }
.back-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 1.6rem; line-height: 1; flex: none; margin-left: -0.35rem; }
.back-btn:hover, .back-btn:focus-visible { background: var(--accent-soft); }
.page-head .tabs { margin: 0; border-bottom: 0; }
.page-sub { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0; flex-wrap: nowrap; }
.page-sub .month-nav { margin: 0; flex: 1; min-width: 0; }
.page-sub .month-nav .month-label { font-size: 1rem; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.segmented a { padding: 0.35rem 0.7rem; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); text-decoration: none; background: var(--surface); }
.segmented a + a { border-left: 1px solid var(--line); }
.segmented a.active { background: var(--accent); color: var(--accent-ink); }
.help-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.8rem; font-weight: 700; line-height: 1; flex: none; cursor: pointer; }
.help-btn:hover, .help-btn:focus-visible { color: var(--accent); border-color: var(--accent); }
.help-dialog { max-width: min(92vw, 480px); border: 0; border-radius: 12px; padding: 1.1rem 1.2rem; background: var(--surface); color: var(--ink); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); }
.help-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.help-dialog h2 { margin-top: 0; font-size: 1.05rem; }
.help-dialog p { line-height: 1.7; margin: 0.5rem 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.6rem; }
.card-head h2 { margin: 0; }
.lg-home, .lg-ledgers, .lg-flow, .lg-settings { background: var(--accent-soft); color: var(--accent); }
.button-row.equal { display: grid; grid-template-columns: 1fr 1fr; }
.button-row.equal > * { text-align: center; justify-content: center; }
.meta { color: var(--muted); font-size: 0.8rem; }
@media (min-width: 900px) { .page-head { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } }
.badge-jump { background: var(--surface); border: 1px solid var(--line); color: var(--accent); border-radius: 999px; padding: 0.05rem 0.5rem; font-size: 0.72rem; font-weight: 700; text-decoration: none; }
.label-row { display: flex; align-items: center; gap: 0.4rem; margin: 0.75rem 0 0.25rem; }
.label-row label, .label-row .label { margin: 0; }
.month-label h2 { margin: 0; font-size: 1rem; }
.label-row .field.checkbox { margin: 0; }
.shared-cost-box .label-row { margin-bottom: 0; }
.list + .button-row, .list + .button-row.equal { margin-top: 0.6rem; }

/* ---------------------------------------------------------------- flow as boxes and arrows (2026-11-01) */
.ftree { display: grid; gap: 1rem; }
.ft-section { display: grid; justify-items: start; }
.ft-box { --ft-color: var(--accent); display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.7rem; border-radius: 10px; border: 1.5px solid var(--ft-color); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.92rem; max-width: 100%; }
.ft-box .ft-label { overflow-wrap: anywhere; }
.ft-icon { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: color-mix(in srgb, var(--ft-color) 15%, transparent); color: var(--ft-color); flex: none; }
.ft-icon .ic { width: 16px; height: 16px; }
.ft-shared { border-width: 2px; }
.ft-payee { border: 1px solid var(--line); background: var(--surface-2); font-weight: 500; padding: 0.3rem 0.6rem; font-size: 0.88rem; }
.ft-in { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; margin-bottom: 0.2rem; }
.ft-in-item { display: grid; justify-items: start; }
.ft-children { list-style: none; margin: 0 0 0 1rem; padding: 0 0 0 0.9rem; border-left: 1.5px solid var(--line); display: grid; gap: 0.35rem; }
.ft-section > .ft-children { margin-top: 0.1rem; }
.ft-children > li { position: relative; padding-top: 0.25rem; }
.ft-children > li::before { content: ''; position: absolute; left: -0.9rem; top: 0.95rem; width: 0.7rem; border-top: 1.5px solid var(--line); }
.ft-arrow, .ft-more > summary { display: flex; align-items: baseline; gap: 0.5rem; font-size: 0.8rem; color: var(--ink-2); margin: 0 0 0.2rem; }
.ft-arrow::after { content: '▼'; font-size: 0.6rem; color: var(--muted); }
.ft-in-item .ft-arrow { margin: 0.25rem 0 0.25rem 0.9rem; padding-left: 0.6rem; border-left: 1.5px solid var(--line); min-height: 1.6rem; align-items: center; }
.ft-amount { font-weight: 700; color: var(--ink); }
.ft-more > summary { cursor: pointer; list-style: none; }
.ft-more > summary::before { content: '＋'; color: var(--accent); font-weight: 700; }
.ft-more[open] > summary::before { content: '－'; }

/* flow graph */
.flow-graph { max-width: 560px; display: block; margin: 0 auto; }
.flow-graph .fg-line { fill: none; stroke: var(--muted); stroke-width: 1.6; }
.flow-graph .fg-head { fill: var(--muted); }
.flow-graph .fg-node rect { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.flow-graph .fg-node text { font-size: 12px; font-weight: 700; fill: var(--ink); }
.flow-graph .fg-node svg { color: var(--accent); }
.flow-graph .fg-shared rect { stroke-width: 2.4; }
.flow-graph .fg-outside rect { fill: var(--surface-2); stroke: var(--line); stroke-dasharray: 4 3; }
.flow-graph .fg-outside svg { color: var(--muted); }
.flow-graph .fg-label rect { fill: var(--surface); stroke: var(--line); stroke-width: 0.8; }
.flow-graph .fg-label text { font-size: 11px; fill: var(--ink-2); }
.flow-graph .fg-tie { fill: none; stroke: var(--muted); stroke-width: 1.2; }
.flow-graph .fg-dot { fill: var(--muted); }
.flow-graph .fg-tie-halo { fill: none; stroke: var(--surface); stroke-width: 5; }
.flow-graph .fg-label rect { stroke-width: 1.2; }
.flow-graph a:hover rect, .flow-graph a:focus rect { fill: var(--accent-soft); }

/* ---------------------------------------------------------------- person colors (2026-11-01) */
/* the signed-in person's color is the accent of the whole app */
.theme-female { --accent: var(--female); --accent-soft: var(--female-soft); --bar: var(--female); }
.theme-male { --accent: var(--male); --accent-soft: var(--male-soft); --bar: var(--male); }
.theme-female .app-header { box-shadow: inset 0 -3px 0 var(--female); }
.theme-male .app-header { box-shadow: inset 0 -3px 0 var(--male); }
.person-male { --person: var(--male); --person-soft: var(--male-soft); }
.person-female { --person: var(--female); --person-soft: var(--female-soft); }
.person-chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--person-soft, var(--accent-soft)); color: var(--person, var(--ink-2)); }
.shared-card.person-male, .shared-card.person-female { border-top: 4px solid var(--person); }
.shared-card.person-male h3, .shared-card.person-female h3 { color: var(--person); }
.person-name.person-male, .person-name.person-female { color: var(--person); }
.person-chip .ic { width: 13px; height: 13px; }
.review-item { border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; }
.review-item .list-item { border: 0; }
.burden-choices { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0 0.5rem; }
.person-btn.person-male, .person-btn.person-female { color: var(--person); border-color: var(--person); background: var(--person-soft); }
.personal-group.person-male h3, .personal-group.person-female h3 { color: var(--person); }
.label-list { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.3rem; }
.label-list li { display: flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.label-list li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.flow-breakdown tr.group th { background: var(--accent-soft); color: var(--ink); }
.flow-breakdown td.indent { padding-left: 1.2rem; }
.ledger-jump { display: flex; gap: 0.35rem; overflow-x: auto; flex-wrap: nowrap; }
.ledger-jump button { flex: none; }
.ledger-digest { scroll-margin-top: calc(var(--page-head-top, 44px) + 120px); }
.count-badge { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.list-title .person-chip { margin-left: 0.4rem; }
.progress { height: 8px; border-radius: 999px; background: var(--bar-track); overflow: hidden; margin: 0; }
.progress-wrap { margin: 0 0 0.75rem; }
.progress-caption { text-align: right; margin-top: 0.25rem; }
.progress-fill { display: block; height: 100%; background: var(--person, var(--accent)); border-radius: 999px; }
.alert-card { display: flex; align-items: center; gap: 0.75rem; justify-content: space-between; }
.alert-card .alert-text { min-width: 0; }
.alert-card .alert-title { font-weight: 700; margin: 0; }
.alert-card .alert-body { margin: 0.25rem 0 0; }
/* chores list by person (2026-11-03) */
.chore-groups { display: grid; gap: 0.75rem; }
.chore-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.25rem; font-size: 1.05rem; }
details.chore-group > summary { cursor: pointer; list-style: revert; }
.chore-person.person-male, .chore-person.person-female { border-top: 4px solid var(--person); }
.chore-person .chore-owner { color: var(--person); }
.chore-cat { margin: 0.75rem 0 0.35rem; font-size: 0.85rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 0.15rem; }
.chore-closed { opacity: 0.75; }
.tag-nodays { margin-left: 0.4rem; background: var(--bar-track); color: var(--muted); font-size: 0.7rem; }
.kind-clean { background: #e6f2f7; color: #186a86; }
.kind-trash { background: #eef3e6; color: #4d6b1f; }
.kind-laundry { background: #efeafb; color: #5a3fa6; }
.kind-cook { background: #fdf0e3; color: #a35a12; }
.kind-shop { background: #fbe9f0; color: #a3305e; }
.kind-repair { background: #eceff3; color: #45505f; }
.kind-paper { background: #fff6df; color: #8a6200; }
.kind-home { background: #e8f1ec; color: #2c6b4a; }
.kind-other { background: #e6f2f7; color: #186a86; }
/* budget (2026-11-03) */
.budget-summary td.over, .budget-months td.over, .budget-row-foot .over { color: var(--critical-ink); font-weight: 600; }
.budget-list { display: grid; gap: 0.75rem; }
.budget-row-head { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; margin-bottom: 0.25rem; }
.budget-cat { font-weight: 600; }
.budget-row .progress { margin: 0; }
.budget-row.is-over .progress-fill { background: var(--critical); }
.budget-row-foot { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.2rem; min-height: 1em; }
.budget-edit { display: grid; gap: 0.4rem; }
.budget-edit-row { display: grid; grid-template-columns: 5.5rem 6.5rem minmax(0, 1fr); gap: 0.4rem; align-items: center; }
.budget-edit-row .budget-cat { font-size: 0.85rem; }
.budget-edit-row select { grid-column: 2 / 4; }
.cat-ratio-list { display: grid; gap: 0.6rem; margin-bottom: 0.6rem; }
.cat-ratio-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.cat-ratio-row select, .cat-ratio-row input[type="text"]:not(.num) { flex: 1 1 8rem; min-width: 0; }
.cat-ratio-pct { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.85rem; }
.cat-ratio-pct input { width: 3.5rem; }
@media (min-width: 560px) { .budget-edit-row { grid-template-columns: 8rem 9rem 1fr; } }
.budget-summary td, .budget-summary th { white-space: nowrap; }
.budget-summary tr.sub th, .budget-summary tr.sub td { font-size: 0.82rem; color: var(--muted); font-weight: 400; }
.budget-summary tr.sub td.due { color: var(--critical-ink); }
.savings-forecast { font-weight: 700; margin: 0.6rem 0 0.2rem; display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; align-items: baseline; }
.budget-edit-row input.num { text-align: right; }
.wage-box { margin: 0.5rem 0 0.75rem; display: grid; gap: 0.35rem; }
.wage-box p, .wage-box ul { margin: 0; }
.wage-box ul { padding-left: 1.2rem; }
.label-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; }
.label-list li span { grid-column: 1 / -1; }
.label-list li .label-cat { min-width: 0; width: 100%; }
@media (min-width: 560px) { .label-list li { grid-template-columns: minmax(0, 1fr) 12rem auto auto auto; } .label-list li span { grid-column: auto; } }
.ratio-line { display: flex; align-items: center; gap: 0.3rem; margin-top: 0.5rem; }
.ratio-table tr.is-current th, .ratio-table tr.is-current td { font-weight: 700; }
.ratio-table td.small { min-width: 12rem; }
.ratio-table th { white-space: nowrap; }
.ratio-big { font-size: 1.15rem; font-weight: 700; color: var(--accent); margin: 0.25rem 0 0.75rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; text-align: left; min-height: 0; }
.evidence-box { display: grid; gap: 0.35rem; margin: 0 0 0.75rem; }
.evidence-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.evidence-list li { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.evidence-box label.button { position: relative; overflow: hidden; justify-self: start; }
.evidence-box label.button input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ratio-table td .linklike { margin-right: 0.5rem; }
.shared-figures dt.band { grid-column: 1 / -1; margin-top: 0.4rem; padding: 0.15rem 0.5rem; border-radius: 4px; background: var(--accent-soft); color: var(--ink-2); font-size: 0.78rem; font-weight: 700; }
.shared-figures dd.band { display: none; }
.share-out { margin: 0 0 0.75rem; }
.share-table { margin: 0; }
.ratio-table td.nowrap { white-space: nowrap; }
.ratio-table td.small { min-width: 9rem; }

/* お金: each box has its own period (2026-11-04) */
.period-box { margin-bottom: 0.9rem; }
.period-box > .card, .period-box > section { margin-bottom: 0.6rem; }
.box-period { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 0.4rem; }
.box-period-label { font-weight: 700; min-width: 6.5rem; text-align: center; }
.box-period .segmented { margin-left: auto; }
.segmented.small a { padding: 0.25rem 0.7rem; font-size: 0.82rem; }

/* ワークフロー (2026-11-07) */
.wf-item .notice-title { flex-wrap: wrap; }
.tag-type { background: var(--accent-soft); color: var(--accent); font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 0.05rem 0.5rem; }
.tag-status { font-size: 0.72rem; border-radius: 999px; padding: 0.05rem 0.5rem; border: 1px solid var(--line); color: var(--muted); margin-left: auto; }
.tag-status.status-open { color: var(--critical-ink); border-color: var(--critical-ink); }
.tag-status.status-rejected, .tag-status.status-cancelled { color: var(--muted); text-decoration: line-through; }
.ack-status .waiting { color: var(--critical-ink); font-weight: 600; }
.wf-comment { margin: 0.3rem 0; }
.wf-actions { margin-top: 0.3rem; }
.reward-card .actions { margin-top: 0.5rem; }
