/* CAAM Judo — Tatami Flash
   Bleu dojo + orange flash · sportif + ludique · mobile-first */

@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap");

:root {
  --dojo: #1a3a6b;
  --dojo-deep: #122846;
  --tatami: #2e5a9e;
  --flash: #f15a29;
  --flash-hot: #e04518;
  --essai: #ffc107;
  --paper: #eef2f7;
  --white: #ffffff;
  --ink: #12233a;
  --ink-soft: #4a5d73;
  --line: #d5deea;
  --ok: #1f8a4c;
  --warn: #c48912;
  --err: #d64545;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 30px rgba(18, 40, 70, 0.08);
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Baloo 2", "DM Sans", system-ui, sans-serif;
  --wrap: min(920px, calc(100% - 2rem));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(46, 90, 158, 0.12), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(241, 90, 41, 0.10), transparent 50%),
    var(--paper);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--tatami); text-decoration: none; }
a:hover { color: var(--flash); }

.wrap {
  width: var(--wrap);
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(26, 58, 107, 0.96);
  backdrop-filter: blur(8px);
  color: #fff;
  border-bottom: 3px solid var(--flash);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  position: relative;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  min-width: 0;
}
.brand:hover { color: #fff; }
.brand-text { white-space: nowrap; }
.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 8px;
  background: #0a0a0a;
}
.nav {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
  font-weight: 600;
}
.nav a {
  color: #dce7f7;
  padding: 0.25rem 0;
}
.nav a:hover { color: var(--essai); }

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
}
.nav-toggle__bar {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.nav-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
body.nav-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-header .wrap {
    flex-wrap: wrap;
    row-gap: 0;
  }
  .brand { flex: 1; }
  .nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0.35rem 0 0;
    padding: 0.35rem 0 0.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }
  body.nav-open .nav { display: flex; }
  .nav a {
    display: block;
    padding: 0.75rem 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
  }
  .nav a:last-child { border-bottom: 0; }
}

/* ——— Hero (full-bleed) ——— */
.hero-bleed {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(125deg, var(--dojo-deep) 0%, var(--dojo) 42%, #24508a 68%, #c94a22 100%);
  min-height: min(78vh, 640px);
  display: flex;
  align-items: stretch;
}
.hero-bleed::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 28px,
      rgba(255, 255, 255, 0.03) 28px,
      rgba(255, 255, 255, 0.03) 29px
    );
  pointer-events: none;
}
.hero-bleed .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  padding: 2.5rem 0 2.75rem;
  width: var(--wrap);
  margin: 0 auto;
}
.hero-copy { max-width: 34rem; }
.hero-kicker {
  display: inline-block;
  background: var(--essai);
  color: var(--dojo-deep);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
  animation: pop-in 0.6s ease both;
}
.hero-bleed h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  line-height: 0.95;
  margin: 0 0 0.55rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  transform: skewX(-4deg);
  animation: rise 0.7s ease both;
}
.hero-bleed .tagline {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  opacity: 0.92;
  margin: 0 0 1.35rem;
  max-width: 32ch;
  animation: rise 0.8s 0.08s ease both;
}
.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: rise 0.85s 0.12s ease both;
}
.hero-art svg {
  width: min(100%, 340px);
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.28));
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  animation: rise 0.85s 0.16s ease both;
}

@media (max-width: 760px) {
  .hero-bleed .wrap {
    grid-template-columns: 1fr;
    padding: 1.75rem 0 2rem;
    text-align: center;
  }
  .hero-copy { margin: 0 auto; }
  .hero-bleed .tagline { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { order: -1; }
  .hero-art svg { width: min(100%, 220px); }
}

/* ——— Sections ——— */
.section {
  margin: 2rem 0 0;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  color: var(--dojo);
  margin: 0 0 0.35rem;
  line-height: 1.15;
}
.section-lead {
  color: var(--ink-soft);
  margin: 0 0 1.1rem;
  max-width: 48ch;
}

.values {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}
.value {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 0.55rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dojo);
}
.value .value-mark {
  display: block;
  width: 28px;
  height: 4px;
  margin: 0 auto 0.55rem;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--flash), var(--essai));
}
@media (max-width: 700px) {
  .values { grid-template-columns: repeat(2, 1fr); }
}

.band {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.25rem 1.2rem;
  box-shadow: var(--shadow-soft);
}
.band-flash {
  background: linear-gradient(110deg, #fff8e8, #ffe8d8);
  border-color: #ffd59a;
}
.band h2 {
  font-family: var(--display);
  color: var(--dojo);
  margin: 0 0 0.35rem;
}

/* ——— Buttons ——— */
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px) scale(1.02); }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--flash);
  color: #fff;
  box-shadow: 0 8px 18px rgba(241, 90, 41, 0.28);
}
.btn-primary:hover { background: var(--flash-hot); color: #fff; }
.btn-secondary {
  background: var(--white);
  color: var(--dojo);
  border: 2px solid rgba(255, 255, 255, 0.85);
}
.hero-bleed .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.hero-bleed .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-block { width: 100%; }
.btn-danger { background: var(--err); color: #fff; }

/* ——— Cards / forms ——— */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 14px rgba(18, 40, 70, 0.04);
}
.card h2, .card h3 {
  font-family: var(--display);
  color: var(--dojo);
  margin-top: 0;
}
.stack > * + * { margin-top: 0.75rem; }

h1, h2, h3 {
  font-family: var(--display);
  color: var(--dojo);
  line-height: 1.15;
}
.page-title {
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  margin: 0.4rem 0 0.35rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="date"], input[type="number"], input[type="file"], input[type="time"],
select, textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(46, 90, 158, 0.35);
  border-color: var(--tatami);
}
.field { margin-bottom: 0.85rem; }
.hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.25rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.choice {
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  text-align: center;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice input { margin-right: 0.35rem; }
.choice:has(input:checked) {
  border-color: var(--flash);
  background: #fff4ef;
}

.progress {
  display: flex;
  gap: 0.25rem;
  margin: 0 0 1rem;
}
.progress span {
  flex: 1;
  height: 7px;
  border-radius: 99px;
  background: #d9e3f1;
}
.progress span.on { background: var(--flash); }

.pill {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.pill-ok { background: #d7f3e4; color: var(--ok); }
.pill-wait { background: #ffe9b8; color: #8a6500; }
.pill-off { background: #f8d4d4; color: var(--err); }
.pill-info { background: #dce8f8; color: var(--tatami); }

.alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.alert-success { background: #d7f3e4; color: var(--ok); }
.alert-error { background: #f8d4d4; color: var(--err); }
.alert-info { background: #dce8f8; color: var(--dojo); }

/* ——— Planning ——— */
.schedule-group {
  border-top: 4px solid var(--dojo);
  animation: rise 0.5s ease both;
}
.schedule-group.cat-baby { border-top-color: #3db8a8; }
.schedule-group.cat-mini_poussins { border-top-color: #4aa3f0; }
.schedule-group.cat-poussins { border-top-color: #f0a33a; }
.schedule-group.cat-benjamins { border-top-color: #7b6cf0; }
.schedule-group.cat-minimes_plus { border-top-color: var(--flash); }
.schedule-group h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dojo);
  flex-shrink: 0;
}
.schedule-group.cat-baby .cat-dot { background: #3db8a8; }
.schedule-group.cat-mini_poussins .cat-dot { background: #4aa3f0; }
.schedule-group.cat-poussins .cat-dot { background: #f0a33a; }
.schedule-group.cat-benjamins .cat-dot { background: #7b6cf0; }
.schedule-group.cat-minimes_plus .cat-dot { background: var(--flash); }
.slot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.95rem;
}
.slot:last-child { border-bottom: 0; }

.wizard-nav {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}
.wizard-nav .btn { flex: 1; }

/* ——— Admin ——— */
.admin-nav {
  margin: 0 0 1.25rem;
  padding: 0.45rem 0.45rem 0.55rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.admin-nav__label {
  display: none;
  margin: 0 0 0.35rem;
  padding: 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.admin-nav__scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.admin-nav a {
  color: var(--dojo);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
}
.admin-nav a:hover { background: #eef3fa; color: var(--dojo); }
.admin-nav a.on {
  background: var(--dojo);
  color: #fff;
}
.admin-nav a.on:hover { color: #fff; }
.admin-badge {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: var(--flash);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}
.admin-nav a.on .admin-badge {
  background: var(--essai);
  color: var(--dojo-deep);
}
.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
}
.tabs a {
  flex: 0 0 auto;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.tabs a:hover { border-color: var(--tatami); color: var(--dojo); }
.tabs a.on {
  background: var(--dojo);
  border-color: var(--dojo);
  color: #fff;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin: 0 0 1.25rem;
}
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.stat .n {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--dojo);
  line-height: 1;
}
.stat .l { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.25rem; }
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1rem;
}
.admin-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-table th, .admin-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.admin-table th {
  background: #e8eef7;
  color: var(--dojo);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.admin-table tr:hover td { background: #f7fafc; }
.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}
.export-card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.export-card p { margin: 0 0 0.85rem; font-size: 0.88rem; color: var(--ink-soft); }

@media (max-width: 760px) {
  .admin-nav__label { display: block; }
  .admin-nav__scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.3rem;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
  }
  .admin-nav a {
    flex: 0 0 auto;
    font-size: 0.84rem;
    padding: 0.5rem 0.75rem;
  }
  .page-title { font-size: 1.45rem; }
  .todo-priority { grid-template-columns: 1fr; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; justify-content: center; }
  .card.stack label,
  form.stack label { display: block; }
  /* Grilles inline admin → 1 colonne */
  main .card [style*="grid-template-columns"],
  main form [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  .slot {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .choice-grid {
    grid-template-columns: 1fr;
  }
}

/* ——— Footer ——— */
.site-footer {
  margin-top: 2rem;
  background: var(--dojo-deep);
  color: #c9d7ea;
  padding: 1.75rem 0;
  font-size: 0.9rem;
}
.site-footer .wrap { padding-top: 0; padding-bottom: 0; }
.site-footer strong {
  color: #fff;
  font-family: var(--display);
  font-size: 1.1rem;
}
.site-footer a { color: var(--essai); }
.site-footer-credit {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  opacity: 0.75;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ——— Gallery / Vie du club ——— */
.hero-bleed--photo {
  background: var(--dojo-deep);
}
.hero-bleed--photo .hero-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  filter: saturate(1.05);
}
.hero-bleed--photo::before {
  opacity: 0.55;
  background: linear-gradient(120deg, rgba(18, 40, 70, 0.92) 0%, rgba(26, 58, 107, 0.75) 55%, rgba(241, 90, 41, 0.35) 100%);
}
.hero-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  border-radius: 16px;
  background: #0a0a0a;
  padding: 0.35rem;
  animation: pop-in 0.6s ease both;
}
.hero-brand-art {
  width: min(100%, 340px);
  height: auto;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.section-head .section-title,
.section-head .section-lead { margin-bottom: 0; }
.section-head .section-lead { margin-top: 0.25rem; }

.life-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}
.life-shot {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  background: #1a3a6b;
  animation: rise 0.55s ease both;
}
.life-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.life-shot:hover img { transform: scale(1.05); }
.life-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.55rem 0.65rem;
  background: linear-gradient(transparent, rgba(10, 20, 40, 0.82));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
}
@media (max-width: 900px) {
  .life-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .hero-art { display: none; }
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.album-tile {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease;
}
.album-tile:hover { transform: translateY(-2px); color: inherit; }
.album-tile--admin { display: flex; flex-direction: column; }
.album-cover {
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  background-color: #122846;
}
.album-meta { padding: 0.75rem 0.85rem 0.9rem; }

.photo-masonry {
  columns: 3 220px;
  column-gap: 0.65rem;
}
.photo-item {
  break-inside: avoid;
  margin: 0 0 0.65rem;
}
.photo-item img {
  width: 100%;
  display: block;
  border-radius: 12px;
}
.photo-item figcaption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

/* Accueil admin — à faire aujourd’hui */
.todo-priority {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.todo-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.todo-card:hover {
  border-color: var(--tatami);
  transform: translateY(-1px);
  color: inherit;
}
.todo-card__n {
  font-family: var(--display);
  font-size: 1.85rem;
  line-height: 1;
  color: var(--dojo);
}
.todo-card__l {
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.todo-card__sub {
  font-size: 0.8rem;
  color: var(--warn);
  font-weight: 600;
}
.todo-card--alert {
  border-color: #f0b4a0;
  background: linear-gradient(180deg, #fff8f5 0%, var(--white) 70%);
}
.todo-card--alert .todo-card__n { color: var(--flash); }
.todo-card--warn {
  border-color: #e6d2a0;
  background: linear-gradient(180deg, #fffbeb 0%, var(--white) 70%);
}
.todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}
.todo-meta__warn { color: var(--warn); font-weight: 600; }
.todo-meta__muted { opacity: 0.75; }
.todo-secondary {
  margin: 1.5rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.todo-secondary summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--dojo);
}
.finance-breakdown {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
.finance-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
.btn-small {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--dojo);
  text-decoration: none;
}
.btn-small:hover {
  border-color: var(--tatami);
  color: var(--dojo-deep);
}
.flash.ok {
  background: #e8f6ee;
  color: var(--ok);
  border: 1px solid #bfe5cc;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
}
.mail-template {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  background: #fafbfd;
}
.mail-template summary {
  cursor: pointer;
  color: var(--dojo);
}
.mail-template + .mail-template { margin-top: 0.65rem; }
@media (max-width: 720px) {
  .todo-priority { grid-template-columns: 1fr; }
}
