/* BettyWork — carnet de révisions. Thèmes saisonniers, style « autocollant » : contours francs et ombres pleines. */

@font-face {
  font-family: 'Lora';
  src: url('/fonts/lora.woff') format('woff');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('/fonts/lora-italic.woff') format('woff');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-regular.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-medium.woff') format('woff');
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-bold.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}

/* ---------- Jetons ---------- */

:root {
  --font-display: 'Lora', 'Iowan Old Style', Palatino, Georgia, serif;
  --font-body: 'Poppins', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  --r-card: 22px;
  --r-ctl: 12px;
  --ok: #2f8f5b;
  --warn: #c98512;
  --danger: #c9364a;
}
/* Couleurs de collège : la teinte --h est posée sur chaque élément, les couleurs se calculent donc ici. */
[style*='--h:'] {
  --chip-bg: hsl(var(--h) 82% 91%);
  --chip-line: hsl(var(--h) 52% 74%);
  --chip-ink: hsl(var(--h) 62% 23%);
  --chip-solid: hsl(var(--h) 62% 50%);
}
[data-mode='sombre'] [style*='--h:'] {
  --chip-bg: hsl(var(--h) 34% 22%);
  --chip-line: hsl(var(--h) 34% 38%);
  --chip-ink: hsl(var(--h) 78% 87%);
  --chip-solid: hsl(var(--h) 60% 60%);
}

/* Automne : papier pêche, encre prune, potiron, sarcelle, airelle, moutarde. */
:root,
[data-season='automne'] {
  --bg: #f6e7d8;
  --paper: #fffaf3;
  --paper-2: #fbefe2;
  --ink: #3b2338;
  --ink-soft: #7b6373;
  --line: #e5cdb6;
  --shade: #dcbd9e;
  --accent: #cf5a24;
  --accent-ink: #fffaf3;
  --accent-soft: #fbdcc6;
  --accent-2: #008c9e;
  --accent-3: #bf3b5a;
  --sun: #e3ad2f;
  --sky: #fbd9b5;
  --hill-1: #c97a3d;
  --hill-2: #e2a55c;
  --awning: #f3cfa6;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%23c56a2c' opacity='.13'%3E%3Cpath transform='translate(40 52) rotate(-25)' d='M0-12C9-8 11 4 0 14C-11 4-9-8 0-12Z'/%3E%3Cpath transform='translate(165 110) rotate(40) scale(1.25)' d='M0-12C9-8 11 4 0 14C-11 4-9-8 0-12Z'/%3E%3Cpath transform='translate(90 195) rotate(115) scale(.85)' d='M0-12C9-8 11 4 0 14C-11 4-9-8 0-12Z'/%3E%3C/g%3E%3Cg fill='%23bf3b5a' opacity='.12'%3E%3Ccircle cx='205' cy='35' r='4'/%3E%3Ccircle cx='20' cy='150' r='3'/%3E%3Ccircle cx='150' cy='215' r='3.5'/%3E%3C/g%3E%3C/svg%3E");
}
/* Hiver : givre, bleu nuit, sapin, baie rouge. */
[data-season='hiver'] {
  --bg: #e6eff7;
  --paper: #fbfdff;
  --paper-2: #eef4fa;
  --ink: #1e2a4a;
  --ink-soft: #5d6a88;
  --line: #cbdaea;
  --shade: #b4c8de;
  --accent: #168a6c;
  --accent-ink: #fbfdff;
  --accent-soft: #cfe8e1;
  --accent-2: #5b6fc2;
  --accent-3: #c8425a;
  --sun: #e0a738;
  --sky: #bcd6ee;
  --hill-1: #ffffff;
  --hill-2: #e3eef8;
  --awning: #c9ddf0;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='none' stroke='%236f8fbd' stroke-width='2' stroke-linecap='round' opacity='.22'%3E%3Cpath transform='translate(45 50)' d='M0-10V10M-9-5L9 5M-9 5L9-5'/%3E%3Cpath transform='translate(170 115) scale(1.3)' d='M0-10V10M-9-5L9 5M-9 5L9-5'/%3E%3Cpath transform='translate(85 195) scale(.8)' d='M0-10V10M-9-5L9 5M-9 5L9-5'/%3E%3C/g%3E%3Cg fill='%236f8fbd' opacity='.2'%3E%3Ccircle cx='205' cy='35' r='3'/%3E%3Ccircle cx='20' cy='150' r='2.5'/%3E%3Ccircle cx='150' cy='215' r='3'/%3E%3Ccircle cx='110' cy='90' r='2'/%3E%3C/g%3E%3C/svg%3E");
}
/* Printemps : vert tendre, cerisier, jeune pousse, lilas. */
[data-season='printemps'] {
  --bg: #ebf5e2;
  --paper: #fdfff9;
  --paper-2: #f1f8e9;
  --ink: #2a3b2e;
  --ink-soft: #62766a;
  --line: #d0e3c2;
  --shade: #b9d4a6;
  --accent: #cf4f80;
  --accent-ink: #fffafc;
  --accent-soft: #f9d6e3;
  --accent-2: #3f8f48;
  --accent-3: #8563c7;
  --sun: #e9b934;
  --sky: #cdeef0;
  --hill-1: #7cc267;
  --hill-2: #a9d98f;
  --awning: #cfe8b8;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%23e77aa6' opacity='.18'%3E%3Cg transform='translate(45 50)'%3E%3Ccircle cy='-6' r='4.5'/%3E%3Ccircle cx='5.7' cy='-1.9' r='4.5'/%3E%3Ccircle cx='3.5' cy='4.9' r='4.5'/%3E%3Ccircle cx='-3.5' cy='4.9' r='4.5'/%3E%3Ccircle cx='-5.7' cy='-1.9' r='4.5'/%3E%3C/g%3E%3Cg transform='translate(170 118) scale(1.25)'%3E%3Ccircle cy='-6' r='4.5'/%3E%3Ccircle cx='5.7' cy='-1.9' r='4.5'/%3E%3Ccircle cx='3.5' cy='4.9' r='4.5'/%3E%3Ccircle cx='-3.5' cy='4.9' r='4.5'/%3E%3Ccircle cx='-5.7' cy='-1.9' r='4.5'/%3E%3C/g%3E%3Cg transform='translate(88 196) scale(.8)'%3E%3Ccircle cy='-6' r='4.5'/%3E%3Ccircle cx='5.7' cy='-1.9' r='4.5'/%3E%3Ccircle cx='3.5' cy='4.9' r='4.5'/%3E%3Ccircle cx='-3.5' cy='4.9' r='4.5'/%3E%3Ccircle cx='-5.7' cy='-1.9' r='4.5'/%3E%3C/g%3E%3C/g%3E%3Cg fill='%234a9a52' opacity='.16'%3E%3Ccircle cx='205' cy='35' r='3.5'/%3E%3Ccircle cx='20' cy='150' r='3'/%3E%3Ccircle cx='150' cy='215' r='3'/%3E%3C/g%3E%3C/svg%3E");
}
/* Été : lagon pâle, bleu profond, corail, turquoise. */
[data-season='ete'] {
  --bg: #e2f4f1;
  --paper: #fcfffe;
  --paper-2: #edf8f6;
  --ink: #15364a;
  --ink-soft: #527284;
  --line: #c0e2dc;
  --shade: #a3d3cb;
  --accent: #e85a34;
  --accent-ink: #fffdfb;
  --accent-soft: #ffd9cc;
  --accent-2: #12928b;
  --accent-3: #e2497a;
  --sun: #f7bd33;
  --sky: #b5e6f1;
  --hill-1: #f5dc9c;
  --hill-2: #3fb6c2;
  --awning: #b9e6df;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='none' stroke='%2319a39b' stroke-width='2.5' stroke-linecap='round' opacity='.2'%3E%3Cpath d='M25 55q8-8 16 0t16 0'/%3E%3Cpath d='M150 120q8-8 16 0t16 0t16 0'/%3E%3Cpath d='M70 198q8-8 16 0t16 0'/%3E%3C/g%3E%3Cg fill='%23f2a91e' opacity='.22'%3E%3Ccircle cx='205' cy='35' r='5'/%3E%3Ccircle cx='22' cy='150' r='3.5'/%3E%3Ccircle cx='150' cy='215' r='4'/%3E%3C/g%3E%3C/svg%3E");
}

[data-mode='sombre'] {
  --bg: #1d1a22;
  --paper: #2a2531;
  --paper-2: #322c3a;
  --ink: #f4ece2;
  --ink-soft: #b9adbb;
  --line: #463e50;
  --shade: #131017;
  --accent-soft: color-mix(in srgb, var(--accent) 28%, #2a2531);
  --accent-ink: #1d1a22;
  --ok: #5fc48d;
  --warn: #e8b04a;
  --danger: #f0707f;
}
[data-mode='sombre'][data-season='automne'] { --accent: #d96a35; --accent-2: #2f9fb5; --accent-3: #d2527a; --sky: #46304a; --hill-1: #6e4426; --hill-2: #8a5c33; --awning: #3a2c33; }
[data-mode='sombre'][data-season='hiver'] { --accent: #2fa58a; --accent-2: #7386de; --accent-3: #d9566f; --sky: #2c3a5e; --hill-1: #c9d6ea; --hill-2: #8fa3c4; --awning: #283247; }
[data-mode='sombre'][data-season='printemps'] { --accent: #d6608f; --accent-2: #45a352; --accent-3: #9a78de; --sky: #2f4a52; --hill-1: #3f7a3a; --hill-2: #56924d; --awning: #2a3a2e; }
[data-mode='sombre'][data-season='ete'] { --accent: #e3683f; --accent-2: #2f93c9; --accent-3: #dc5587; --sky: #24485c; --hill-1: #b59a5c; --hill-2: #1f7480; --awning: #223a40; }

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button, a, label, select, summary { touch-action: manipulation; }
button, .chip, .tab, .subnav a { -webkit-user-select: none; user-select: none; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg) var(--pattern);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; margin: 1.2rem 0 0.4rem; }
p { margin: 0 0 0.7rem; }
a { color: inherit; }
em { font-style: normal; color: var(--ink-soft); }
small { font-size: 0.82em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

.boot { padding: 4rem 1rem; text-align: center; color: var(--ink-soft); }
.muted { color: var(--ink-soft); font-size: 0.9rem; }
.hint { color: var(--ink-soft); font-size: 0.8rem; display: block; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.link { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; }
[data-mode='clair'] .link { color: color-mix(in srgb, var(--accent) 82%, var(--ink)); }

.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.ic-s { width: 0.95em; height: 0.95em; }

/* ---------- En-tête ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.55rem clamp(0.8rem, 3vw, 2rem) 0.35rem;
  background: var(--awning);
}
/* Bord festonné, comme un auvent. */
.top::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
  background: radial-gradient(circle at 12px 0, var(--awning) 11px, transparent 12px) repeat-x;
  background-size: 24px 12px;
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; text-decoration: none; }
.brand .betty { width: 2.6rem; height: 2.6rem; margin: -0.2rem 0; }
.brand:hover .betty { transform: rotate(-8deg); }
.betty { flex: none; transition: transform 0.2s; }
.motif { width: 1.3em; height: 1.3em; color: var(--accent); flex: none; vertical-align: -0.25em; }
.tabs { display: flex; gap: 0.3rem; margin-inline: auto; }
.tab {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.95rem; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; font-weight: 500; color: var(--ink);
}
.tab:hover { background: color-mix(in srgb, var(--paper) 55%, transparent); }
.tab.on { background: var(--paper); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.top-right { display: flex; align-items: center; gap: 0.6rem; }
.season-pill { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--font-display); font-weight: 600; font-size: 1rem; padding: 0.2rem 0.8rem 0.2rem 0.55rem; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); text-decoration: none; }
.season-pill:hover { background: var(--accent-soft); }

.icon-btn {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none;
  border-radius: 999px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; padding: 0;
}
.icon-btn:hover:not(:disabled), .icon-btn.on { border-color: var(--ink); }
.icon-btn-s { width: 1.75rem; height: 1.75rem; border-width: 1.5px; font-weight: 700; line-height: 1; }
.icon-btn-s .ic { width: 0.85rem; height: 0.85rem; }

.page { max-width: 1280px; margin: 0 auto; padding: calc(clamp(1rem, 3vw, 2rem) + 10px) clamp(0.8rem, 3vw, 2rem) 2rem; }
.foot { display: flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.5rem 1rem 3rem; color: var(--ink-soft); font-size: 0.85rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; margin-bottom: 1.2rem; }
.back { display: inline-flex; align-items: center; gap: 0.2rem; width: 100%; color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; }
.back:hover { color: var(--ink); }

.subnav { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.25rem; background: var(--paper-2); border: 2px solid var(--line); border-radius: 999px; }
.subnav a { padding: 0.3rem 0.9rem; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 0.92rem; }
.subnav a:hover { color: var(--ink); }
.subnav a.on { background: var(--ink); color: var(--paper); }

/* ---------- Cartes, boutons, champs ---------- */

.card {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 5px 0 var(--shade);
  padding: clamp(1rem, 2.2vw, 1.5rem);
  margin-bottom: 1.5rem;
}
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.9rem; padding-bottom: 0.6rem; border-bottom: 2px dashed var(--line); }
.head-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.5rem 1.1rem; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--paper); color: var(--ink); font-weight: 500; text-decoration: none; line-height: 1.2;
  box-shadow: 0 3px 0 var(--ink); transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover:not(:disabled) { background: var(--paper-2); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn-ghost { border-color: var(--line); box-shadow: none; background: transparent; }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn-ghost:active:not(:disabled) { transform: none; }
.btn-danger { color: var(--danger); border-color: currentColor; box-shadow: 0 3px 0 currentColor; }
.btn-small { padding: 0.28rem 0.75rem; font-size: 0.85rem; box-shadow: 0 2px 0 var(--ink); border-width: 1.5px; }
.btn-small.btn-ghost { box-shadow: none; }
.btn-small.btn-danger { box-shadow: 0 2px 0 currentColor; }
.btn-small:active:not(:disabled) { transform: translateY(2px); }
.btn-big { padding: 0.7rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; margin-bottom: 0.8rem; }

.input {
  width: 100%; padding: 0.5rem 0.7rem; border-radius: var(--r-ctl); border: 2px solid var(--line);
  background: var(--paper); color: var(--ink); min-height: 2.5rem;
}
.input:hover { border-color: var(--ink-soft); }
.input-inline { width: auto; max-width: 100%; min-width: 0; min-height: 2.2rem; padding: 0.3rem 0.6rem; }
.input-s { min-height: 1.9rem; padding: 0.15rem 0.4rem; font-size: 0.85rem; border-width: 1.5px; border-radius: 8px; }
.input-num { width: 4.6rem; }
select.input { padding-right: 1.6rem; }
[data-mode='sombre'] .input { color-scheme: dark; }

.field { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.8rem; }
.field > span { font-weight: 500; font-size: 0.88rem; }
.field-inline { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 1rem; }
.field-wide { grid-column: 1 / -1; }
.checkline { display: flex; gap: 0.55rem; align-items: flex-start; margin: 0.45rem 0; font-size: 0.92rem; }
.checkline input { width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; accent-color: var(--accent); flex: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 1rem; }
input[type='range'] { width: 100%; accent-color: var(--accent); }

.chip {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.12rem 0.6rem; border-radius: 9px;
  background: var(--chip-bg); border: 1.5px solid var(--chip-line); color: var(--chip-ink);
  font-size: 0.85rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
a.chip:hover, .chip-btn:hover { border-color: var(--chip-ink); }
.chip small { font-weight: 400; opacity: 0.85; }
.chip-focus { border-width: 2px; border-color: var(--chip-ink); }
.swatch { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 4px; background: var(--chip-solid); border: 1.5px solid var(--chip-ink); flex: none; }
.swatch-big { width: 1.1rem; height: 1.6rem; border-radius: 5px; margin-right: 0.6rem; vertical-align: -0.15em; }

.pill { display: inline-flex; align-items: center; padding: 0.2rem 0.8rem; border-radius: 999px; background: var(--paper); border: 2px solid var(--line); font-size: 0.88rem; font-weight: 500; }
.pill-sun { background: var(--sun); border-color: var(--ink); color: #3b2338; }
.tag { font-size: 0.75rem; padding: 0.08rem 0.5rem; border-radius: 999px; background: var(--paper-2); border: 1.5px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.tag-late { border-color: var(--warn); color: var(--ink); }

.badge { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.76rem; padding: 0.1rem 0.55rem; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.badge-prio { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.badge-update { background: var(--sun); border-color: var(--ink); color: #3b2338; font-weight: 500; }
.badge-ok { border-color: var(--ok); color: var(--ink); }

.dots, .stars { display: inline-flex; gap: 2px; align-items: center; }
.dots i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink-soft); }
.dots i.on { background: var(--ink); border-color: var(--ink); }
.stars i { display: inline-grid; color: var(--line); }
.stars i.on { color: var(--sun); }
.ic-star { width: 0.85rem; height: 0.85rem; stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }

.legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; align-items: center; margin: 0.9rem 0 0; font-size: 0.8rem; color: var(--ink-soft); }
.lg { display: inline-flex; align-items: center; gap: 0.4rem; }
.lg-dot { width: 14px; height: 10px; border-radius: 4px; background: var(--paper-2); border: 1.5px dashed var(--ink-soft); }
.lg-dot.lg-manual { border: 2px solid var(--ink); }
.lg-sq { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--line); background: var(--paper); }
.lg-sq.lg-fill { background: var(--accent); border-color: var(--accent); }
.lg-sq.lg-plan { background: var(--accent-soft); border-color: var(--accent-soft); }
.lg-sq.lg-next { background: var(--accent-soft); border-color: var(--accent); }
.lg-band { width: 14px; height: 3px; background: var(--ink); border-radius: 2px; }
.lg-line { width: 18px; height: 3px; background: var(--accent); border-radius: 2px; }
.lg-dash { width: 18px; height: 0; border-top: 2px dashed var(--ink); }
.lg-goal { width: 3px; height: 14px; background: var(--ink); border-radius: 2px; }

/* Bulles d'information : un « i » à côté du titre, le texte s'ouvre dessous. */
.card-head, .week-bar, .knob-label, .card h3, .field-label { position: relative; }
.field-label { display: flex; align-items: center; font-weight: 500; font-size: 0.88rem; min-height: 1.7rem; }
.info { display: inline-block; vertical-align: middle; margin-left: 0.3rem; font: 400 0.88rem/1.5 var(--font-body); letter-spacing: 0; }
.info summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; color: var(--ink-soft); }
.info summary::-webkit-details-marker { display: none; }
.info summary .ic { width: 1.25rem; height: 1.25rem; }
.info summary:hover { color: var(--ink); background: var(--paper-2); }
.info[open] summary { background: var(--ink); color: var(--paper); }
.info-pop {
  position: absolute; z-index: 15; left: 0; top: calc(100% + 0.35rem); width: min(100%, 30rem);
  padding: 0.7rem 0.9rem; border-radius: 14px; background: var(--paper); border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  color: var(--ink); font-size: 0.88rem; font-weight: 400; text-align: left; white-space: normal;
}
.knob-label > span { display: inline-flex; align-items: center; }

.empty-state { text-align: center; padding: 1.5rem 1rem; color: var(--ink-soft); }
.empty-state h2 { color: var(--ink); margin-bottom: 0.5rem; }
.figure { font-size: 0.95rem; margin-bottom: 0.4rem; }
.figure b { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; margin-right: 0.25rem; }

.table-wrap { overflow-x: auto; margin-inline: -0.4rem; padding-inline: 0.4rem; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font-weight: 500; color: var(--ink-soft); font-size: 0.8rem; padding: 0.3rem 0.5rem; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table th.num { text-align: right; }
.table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.is-current td { background: var(--accent-soft); font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.stats > div { background: var(--paper-2); border-radius: 16px; padding: 0.8rem 1rem; }
.stats dt { font-size: 0.82rem; color: var(--ink-soft); }
.stats dd { margin: 0; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1.15; }
.stats dd small { font-family: var(--font-body); font-size: 0.8rem; font-weight: 400; }
.stats > div > small { color: var(--ink-soft); }

/* ---------- Barres ---------- */

.bar { position: relative; height: 14px; border-radius: 999px; background: var(--paper-2); border: 1.5px solid var(--line); overflow: visible; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--accent); min-width: 0; }
.bar + .muted { margin-top: 0.6rem; }
.bar .tick { position: absolute; top: 2px; bottom: 2px; width: 2px; margin-left: -1px; background: var(--paper); opacity: 0.9; border-radius: 1px; }
.bar .goal, .month-track .goal { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; background: var(--ink); border-radius: 2px; }

/* ---------- Fenêtres ---------- */

.modal-back { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--ink) 45%, transparent); display: grid; place-items: center; padding: 1rem; overflow-y: auto; }
[data-mode='sombre'] .modal-back { background: rgb(0 0 0 / 0.6); }
.modal { width: min(640px, 100%); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overscroll-behavior: contain; overflow-y: auto; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-card); box-shadow: 0 6px 0 var(--ink); padding: 1.2rem 1.3rem; }
.modal-narrow { width: min(440px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.modal-foot { display: flex; justify-content: space-between; gap: 0.6rem; margin-top: 1rem; }

.seg { border: 0; padding: 0; margin: 0 0 0.9rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.seg legend { font-weight: 500; font-size: 0.88rem; margin-bottom: 0.3rem; padding: 0; }
.seg-opt input { position: absolute; opacity: 0; }
.seg-opt span { display: block; padding: 0.35rem 0.85rem; border-radius: 999px; border: 2px solid var(--line); font-weight: 500; font-size: 0.9rem; cursor: pointer; }
.seg-opt input:checked + span { border-color: var(--ink); background: var(--type, var(--accent)); color: var(--type-ink, var(--accent-ink)); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.45rem; margin-top: 0.8rem; }
.pick-college { text-align: left; padding: 0.45rem 0.65rem; border-radius: 12px; background: var(--chip-bg); border: 1.5px solid var(--chip-line); color: var(--chip-ink); display: flex; flex-direction: column; }
.pick-college:hover { border-color: var(--chip-ink); }
.pick-college small { opacity: 0.8; }
.pick-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; }
.pick-items li { border-bottom: 1px solid var(--line); }
.pick-items button { display: flex; justify-content: space-between; gap: 1rem; width: 100%; padding: 0.5rem 0.4rem; background: none; border: 0; text-align: left; border-radius: 8px; }
.pick-items button:hover { background: var(--paper-2); }
.pick-items button.ahead { color: var(--ink-soft); }
.pick-items small { color: var(--ink-soft); white-space: nowrap; }

#toasts { position: fixed; z-index: 80; left: 50%; bottom: 1.4rem; transform: translateX(-50%); display: flex; flex-direction: column; gap: 0.5rem; align-items: center; width: min(92vw, 480px); pointer-events: none; }
.toast { padding: 0.6rem 1.1rem; border-radius: 14px; background: var(--ink); color: var(--paper); font-weight: 500; font-size: 0.92rem; box-shadow: 0 4px 0 color-mix(in srgb, var(--ink) 50%, transparent); animation: toast-in 0.2s ease-out; text-align: center; }
.toast-success { background: var(--ok); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transition: opacity 0.3s; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Connexion ---------- */

.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: min(400px, 100%); background: var(--paper); border: 2px solid var(--ink); border-radius: 28px; box-shadow: 0 8px 0 var(--ink); padding: 2rem 1.8rem; display: flex; flex-direction: column; gap: 0.5rem; }
.login-card h1 { font-size: 2.3rem; }
.login-card p { color: var(--ink-soft); }
.login-card label { font-weight: 500; font-size: 0.9rem; }
.login-card input { padding: 0.65rem 0.8rem; border-radius: var(--r-ctl); border: 2px solid var(--line); background: var(--paper); margin-bottom: 0.6rem; }
.login-betty { width: 6rem; height: 6rem; align-self: center; margin-top: -4.6rem; }
.login-card { position: relative; margin-top: 3rem; outline: 2px dashed var(--line); outline-offset: -10px; }
.login-card h1 { text-align: center; }
.login-card > p { text-align: center; }
.login-card .form-error, .form-error { color: var(--danger); font-weight: 500; }

/* ---------- Types de créneaux ---------- */

.type-item { --type: var(--accent); --type-ink: var(--accent-ink); }
.type-qcm { --type: var(--accent-3); --type-ink: #fff; }
.type-lca { --type: var(--accent-2); --type-ink: #fff; }
.type-ancrage { --type: var(--sun); --type-ink: #3b2338; }
.type-autre { --type: var(--ink-soft); --type-ink: var(--paper); }
[data-mode='sombre'] .type-qcm, [data-mode='sombre'] .type-lca { --type-ink: #1d1a22; }

.tb-type { display: inline-block; padding: 0.08rem 0.6rem; border-radius: 999px; background: var(--type); color: var(--type-ink); font-weight: 500; font-size: 0.82rem; }

/* ---------- Tableau de bord ---------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: stretch; justify-content: space-between; gap: 1.5rem;
  min-height: 300px; padding: 1.6rem clamp(1.1rem, 3vw, 2.2rem) 0; margin-bottom: 1.8rem;
  border-radius: 30px; border: 2px solid var(--ink); box-shadow: 0 6px 0 var(--ink);
  background: var(--sky);
}
.hero .scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 200px; z-index: -2; }
.hero-text { padding-bottom: 4.8rem; }
.hero-date { font-size: 1rem; font-weight: 500; margin-bottom: 0.3rem; }
.hero-date::first-letter { text-transform: uppercase; }
.hero h1 { font-size: clamp(1.8rem, 4.2vw, 3rem); max-width: 20ch; text-wrap: balance; }
.hero-cosy { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; margin: 0.7rem 0 0.8rem; max-width: 38ch; }
.hero-side { display: flex; align-items: flex-end; gap: 0.8rem; }
.hero-side .ring { align-self: center; margin-bottom: 3.5rem; }
.hero-betty { width: 128px; height: 174px; margin-bottom: 6px; transform-origin: 50% 90%; }
.hero:hover .hero-betty { transform: rotate(-5deg); }

/* Ce qui tombe du ciel selon la saison : feuilles, flocons, pétales. */
.fallers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.fallers i { position: absolute; top: -8%; animation: fall 14s linear infinite; }
.faller { display: block; width: 20px; height: 20px; color: var(--accent); animation: sway 4s ease-in-out infinite alternate; }
.fallers i:nth-child(3n) .faller { color: var(--sun); }
.fallers i:nth-child(3n + 1) .faller { color: var(--accent-3); }
[data-season='hiver'] .faller { color: #fff !important; width: 16px; height: 16px; }
[data-season='printemps'] .faller { color: #f6a8c4 !important; width: 15px; height: 15px; }
[data-season='printemps'] .fallers i:nth-child(3n) .faller { color: #fff !important; }
[data-season='ete'] .fallers { display: none; }
.fallers i:nth-child(1) { left: 38%; animation-duration: 13s; animation-delay: -2s; }
.fallers i:nth-child(2) { left: 44%; animation-duration: 17s; animation-delay: -9s; }
.fallers i:nth-child(3) { left: 49%; animation-duration: 12s; animation-delay: -5s; }
.fallers i:nth-child(4) { left: 54%; animation-duration: 19s; animation-delay: -14s; }
.fallers i:nth-child(5) { left: 59%; animation-duration: 15s; animation-delay: -1s; }
.fallers i:nth-child(6) { left: 64%; animation-duration: 18s; animation-delay: -11s; }
.fallers i:nth-child(7) { left: 69%; animation-duration: 13s; animation-delay: -7s; }
.fallers i:nth-child(8) { left: 74%; animation-duration: 16s; animation-delay: -3s; }
.fallers i:nth-child(9) { left: 79%; animation-duration: 20s; animation-delay: -16s; }
.fallers i:nth-child(10) { left: 84%; animation-duration: 14s; animation-delay: -6s; }
.fallers i:nth-child(11) { left: 90%; animation-duration: 17s; animation-delay: -12s; }
.fallers i:nth-child(12) { left: 96%; animation-duration: 12s; animation-delay: -8s; }
@keyframes fall { to { transform: translateY(380px); } }
@keyframes sway { from { transform: translateX(-14px) rotate(-35deg); } to { transform: translateX(14px) rotate(40deg); } }
.sun-rays { animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.ring { position: relative; width: 132px; height: 132px; flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; }
.ring-track { fill: var(--orb, var(--sun)); stroke: color-mix(in srgb, var(--ink) 18%, var(--orb, var(--sun))); stroke-width: 8; }
.ring-fill { fill: none; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.4s; }
.ring span { position: relative; font-size: 1rem; color: #3b2338; }
.ring b { font-family: var(--font-display); font-size: 2.2rem; color: #3b2338; }
.ring-empty { border-radius: 50%; background: var(--orb, var(--sun)); transform: scale(0.72); }
[data-season='hiver'] .ring { --orb: #fffdf6; }
[data-mode='sombre'] .ring-fill { stroke: #3b2338; }

.dash { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 1.5rem; align-items: start; }
.dash-side .card { padding: 1rem 1.1rem; margin-bottom: 1.1rem; }
.dash-side h2 { font-size: 1.12rem; }

.tblock { border: 2px solid var(--line); border-left: 8px solid var(--type); border-radius: 16px; padding: 0.6rem 0.8rem; margin-bottom: 0.7rem; background: var(--paper); }
.tblock.done { background: var(--paper-2); }
.tblock.skipped { opacity: 0.55; }
.tb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 0.9rem; margin-bottom: 0.3rem; }
.tb-count { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-soft); font-weight: 500; }

.row { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; min-height: 2.6rem; }
.rows .row + .row { border-top: 1px dashed var(--line); }
.row-main { flex: 1; min-width: 0; }
.row.done .row-main, .tblock.done .row-main { color: var(--ink-soft); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.row-empty { padding-left: 2.6rem; }
.row-late { flex-wrap: wrap; }
.row-late .row-actions { margin-left: auto; }
.when { font-size: 0.8rem; color: var(--ink-soft); width: 5.4rem; flex: none; }

.check { width: 2.1rem; height: 2.1rem; flex: none; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); display: grid; place-items: center; padding: 0; color: var(--line); transition: background 0.12s, transform 0.12s; }
.check:hover { background: var(--accent-soft); color: var(--ink-soft); }
.check[aria-pressed='true'] { background: var(--ok); border-color: var(--ink); color: #fff; transform: rotate(-12deg); }
.check .ic { width: 1.2rem; height: 1.2rem; }

.bonus { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.6rem 1rem; border-radius: 18px; background: var(--accent-soft); margin-top: 0.4rem; border: 2px dashed var(--accent); }
.bonus-betty { width: 3.4rem; height: 3.4rem; }
.empty-betty { width: 5rem; height: 5rem; display: block; margin: 0 auto 0.4rem; }
.bonus p { margin: 0; flex: 1; min-width: 12rem; font-weight: 500; }
.card-late { border-color: var(--warn); box-shadow: 0 5px 0 color-mix(in srgb, var(--warn) 55%, var(--shade)); }

.reminder { display: flex; gap: 0.6rem; padding: 0.55rem 0; font-size: 0.92rem; }
.reminder + .reminder { border-top: 1px dashed var(--line); }
.reminder p { margin: 0 0 0.1rem; }
.reminder .ic { margin-top: 0.15rem; color: var(--ink-soft); }
.reminder-alerte .ic { color: var(--danger); }
.reminder-info .ic { color: var(--accent); }
.reminder .link { font-size: 0.85rem; }

.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; }
.strip-day { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.4rem 0.1rem; border-radius: 12px; border: 1.5px solid var(--line); font-size: 0.75rem; color: var(--ink-soft); }
.strip-day b { font-size: 0.95rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.strip-day b small { font-weight: 400; color: var(--ink-soft); }
.strip-full { background: color-mix(in srgb, var(--ok) 22%, var(--paper)); border-color: var(--ok); }
.strip-missed { background: color-mix(in srgb, var(--warn) 22%, var(--paper)); border-color: var(--warn); }
.strip-none { border-style: dashed; }
.strip-day.is-today { border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }

.minis li { display: grid; grid-template-columns: 4.2rem 1fr auto; gap: 0.6rem; align-items: center; padding: 0.35rem 0; font-size: 0.88rem; }
.mini-val { font-variant-numeric: tabular-nums; font-weight: 500; }
.mini-val small { color: var(--ink-soft); font-weight: 400; }

/* ---------- Planning ---------- */

.week-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; margin-bottom: 0.7rem; }
.week-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.week-sum { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.tpl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-radius: 14px; background: var(--paper-2); margin-bottom: 1rem; font-size: 0.9rem; }
.tpl-bar label { font-weight: 500; }

.daystrip, .day-long, .tpl-open { display: none; }
.week-tools { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.tpl-list { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.8rem 0 1.1rem; }
.tpl-opt input { position: absolute; opacity: 0; }
.tpl-opt span { display: flex; flex-direction: column; padding: 0.7rem 0.9rem; border-radius: 14px; border: 2px solid var(--line); background: var(--paper); cursor: pointer; }
.tpl-opt small { color: var(--ink-soft); }
.tpl-opt input:checked + span { border-color: var(--ink); background: var(--accent-soft); box-shadow: 0 3px 0 var(--ink); }
.tpl-opt input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.sheet-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.5rem; }
.day { border-radius: 16px; background: var(--paper-2); padding: 0.5rem; display: flex; flex-direction: column; gap: 0.45rem; min-height: 9rem; border: 2px solid transparent; }
.day.is-today { border-color: var(--ink); background: var(--paper); }
.day.is-past { opacity: 0.72; }
.day.is-off { background: repeating-linear-gradient(135deg, var(--paper-2) 0 8px, var(--paper) 8px 16px); }
.day-head { display: flex; justify-content: space-between; align-items: center; gap: 0.3rem; font-size: 0.86rem; min-height: 1.6rem; }
.day-head b { font-family: var(--font-display); font-size: 1rem; }
.day-head b::first-letter { text-transform: uppercase; }
.day-empty { margin: 0.4rem 0; text-align: center; color: var(--ink-soft); font-size: 0.82rem; }
.off-toggle { font-size: 0.7rem; padding: 0.05rem 0.45rem; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink-soft); }
.off-toggle:hover, .off-toggle.on { border-color: var(--ink); color: var(--ink); }
.off-toggle.on { background: var(--ink); color: var(--paper); }
.add-block { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 0.3rem; padding: 0.3rem; border-radius: 10px; border: 1.5px dashed var(--ink-soft); background: transparent; color: var(--ink-soft); font-size: 0.8rem; }
.add-block:hover { border-color: var(--ink); color: var(--ink); background: var(--paper); }

.pblock { background: var(--paper); border-radius: 12px; border: 1.5px solid var(--line); border-top: 5px solid var(--type); padding: 0.3rem 0.4rem 0.45rem; }
.pblock:not(.type-item) { display: flex; align-items: center; gap: 0.4rem; }
.pblock.done { background: color-mix(in srgb, var(--ok) 14%, var(--paper)); }
.pblock.skipped { opacity: 0.5; }
.pb-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem; width: 100%; background: none; border: 0; padding: 0.1rem 0.15rem 0.25rem; text-align: left; font-size: 0.8rem; color: var(--ink-soft); border-radius: 6px; }
.pb-head:hover { color: var(--ink); background: var(--paper-2); }
.pb-head b { color: var(--ink); font-weight: 600; }
.pb-head em { flex-basis: 100%; font-size: 0.75rem; }
.pb-pin { display: inline-flex; align-items: center; gap: 0.15rem; color: var(--chip-ink); background: var(--chip-bg); border-radius: 6px; padding: 0 0.3rem; font-size: 0.74rem; }
.pb-slots { display: flex; flex-direction: column; gap: 0.25rem; }

.schip { display: flex; align-items: center; gap: 0.25rem; min-height: 1.75rem; padding: 0.1rem 0.2rem; border-radius: 8px; background: var(--chip-bg); border: 1.5px dashed var(--chip-line); color: var(--chip-ink); font-size: 0.78rem; line-height: 1.15; }
.schip.manual { border: 2px solid var(--chip-ink); }
.schip-label { flex: 1; min-width: 0; display: flex; gap: 0.3rem; align-items: baseline; }
.schip-label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schip-label b { flex: none; }
.schip.done { background: var(--paper-2); border-style: solid; border-color: var(--line); color: var(--ink-soft); }
.schip.done .schip-label { text-decoration: line-through; }
.schip-tick { width: 1.3rem; height: 1.3rem; flex: none; border-radius: 6px; border: 1.5px solid currentColor; background: var(--paper); display: grid; place-items: center; padding: 0; color: inherit; }
.schip-tick .ic { width: 0.85rem; height: 0.85rem; opacity: 0; }
.schip-tick:hover .ic { opacity: 0.45; }
.schip-tick[aria-pressed='true'] { background: var(--ok); border-color: var(--ok); color: #fff; }
.schip-tick[aria-pressed='true'] .ic { opacity: 1; }
.schip { position: relative; }
.schip-x { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 1.3rem; height: 1.3rem; border: 0; background: var(--chip-bg); padding: 0; display: grid; place-items: center; color: inherit; opacity: 0; border-radius: 5px; }
.schip-x .ic { width: 0.75rem; height: 0.75rem; }
.schip:hover .schip-x, .schip-x:focus-visible { opacity: 1; }
@media (hover: none) {
  .schip-x { position: static; transform: none; opacity: 0.6; background: none; flex: none; }
}
.schip-empty { justify-content: center; background: transparent; border: 1.5px dashed var(--line); color: var(--ink-soft); }
.schip-empty:hover { border-color: var(--ink); color: var(--ink); }

.gen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0.5rem 2.5rem; margin-top: 0.8rem; }
.knob { display: block; margin: 0.7rem 0; }
.knob-label { display: flex; justify-content: space-between; gap: 1rem; font-weight: 500; font-size: 0.9rem; }
.knob output { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; white-space: nowrap; }
[data-mode='clair'] .knob output { color: color-mix(in srgb, var(--accent) 82%, var(--ink)); }
.knobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 2rem; }
.queue { counter-reset: q; margin: 0.4rem 0 0.7rem; }
.queue li { counter-increment: q; display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; font-size: 0.88rem; }
.queue li::before { content: counter(q); width: 1.5rem; height: 1.5rem; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 0.8rem; }
.queue li small { color: var(--ink-soft); flex: 1; }
.queue-none { padding: 0.5rem 0.8rem; border-radius: 12px; background: var(--paper-2); font-size: 0.88rem; color: var(--ink-soft); }
.cands { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.7rem; }
.chip-btn { cursor: pointer; padding: 0.22rem 0.6rem; }
.other-focus { font-size: 0.88rem; }
.gen-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-top: 1.2rem; padding-top: 1.1rem; border-top: 2px dashed var(--line); }
.gen-result { margin-top: 1rem; padding: 0.8rem 1rem; border-radius: 16px; background: var(--paper-2); }
.res-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.subtabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0; }
.subtab { padding: 0.35rem 0.9rem; border-radius: 12px 12px 4px 4px; border: 2px solid var(--line); background: var(--paper-2); font-weight: 500; }
.subtab.on { background: var(--paper); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.subtab small { color: var(--ink-soft); font-weight: 400; }
.tpl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-bottom: 1rem; }
.tpl-meta .field { margin: 0; }
.tpl-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-left: auto; }
.tb-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem; align-items: center; padding: 0.25rem; border-radius: 10px; background: var(--paper); border: 1.5px solid var(--line); border-top: 5px solid var(--type); }
.tb-row .input-s { min-width: 0; }
.tb-row .tb-dur { grid-column: 1 / -1; }

.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.7rem 0.9rem; border-radius: 14px; background: var(--paper-2); margin: 0.8rem 0 1rem; }
.bulk .field { margin: 0; }
.cal-month { margin: 1.2rem 0 0.4rem; }
.cal-month:first-child { margin-top: 0; }
.cal-week { display: grid; grid-template-columns: 4.6rem minmax(120px, 190px) minmax(0, 1fr) 7.5rem; gap: 0.6rem; align-items: center; padding: 0.25rem 0.3rem; border-radius: 12px; }
.cal-week.is-current { background: var(--accent-soft); }
.cal-dates { font-size: 0.85rem; color: var(--ink-soft); }
.cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.25rem; }
.cal-day { display: flex; flex-direction: column; align-items: center; padding: 0.15rem 0; border-radius: 9px; border: 1.5px solid var(--line); background: var(--paper); line-height: 1.15; }
.cal-day small { font-size: 0.66rem; color: var(--ink-soft); }
.cal-day b { font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.cal-day:hover:not(:disabled) { border-color: var(--ink); }
.cal-day.src-plan, .lg-sq.src-plan { background: var(--accent-soft); border-color: var(--accent); }
.cal-day.src-modele, .lg-sq.src-modele { background: var(--paper); border-style: dashed; border-color: var(--ink-soft); }
.cal-day.src-off, .lg-sq.src-off { background: repeating-linear-gradient(135deg, var(--paper-2) 0 4px, var(--line) 4px 6px); }
.cal-day.src-off b { font-size: 0.7rem; font-weight: 500; }
.cal-day.is-out { opacity: 0.35; }
.cal-day.is-exam { background: var(--sun); border-color: var(--ink); opacity: 1; color: #3b2338; }
.cal-cap { font-variant-numeric: tabular-nums; font-weight: 500; text-align: right; font-size: 0.9rem; }
.cal-cap small { font-weight: 400; color: var(--ink-soft); }

.verdict { font-family: var(--font-display); font-size: clamp(1.1rem, 2.2vw, 1.4rem); line-height: 1.4; padding: 0.9rem 1.1rem; border-radius: 16px; border-left: 8px solid var(--accent); background: var(--accent-soft); max-width: 66ch; }
.chart { margin: 1rem 0 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--ink-soft); font-size: 11px; font-family: var(--font-body); }
.chart .area { fill: var(--accent); opacity: 0.14; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .need { stroke: var(--ink-soft); stroke-width: 1.5; stroke-dasharray: 6 5; }
.chart .need-label { fill: var(--ink-soft); font-size: 11px; font-weight: 500; font-family: var(--font-body); }
.chart .reach { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: var(--ink); opacity: 0.06; }

/* ---------- Progression ---------- */

.shelf { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 3px; row-gap: 0; padding: 0 0.6rem; }
.spine {
  position: relative; height: 150px; margin-top: 18px; border-radius: 7px 7px 2px 2px; overflow: hidden;
  background: var(--chip-bg); border: 2px solid var(--chip-ink); border-bottom-width: 0;
  color: var(--chip-ink); text-decoration: none; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 0 -1px var(--shelf, #a9825a);
  transition: transform 0.12s;
}
[data-season='hiver'] .spine { --shelf: #7d8fae; }
[data-season='printemps'] .spine { --shelf: #9fb886; }
[data-season='ete'] .spine { --shelf: #c9a56e; }
.spine:nth-child(3n) { height: 138px; }
.spine:nth-child(4n + 1) { height: 160px; }
.spine:nth-child(7n + 3) { height: 128px; }
.spine { margin-bottom: 10px; }
.spine:hover, .spine:focus-visible { transform: translateY(-6px); }
.spine-fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--chip-solid); opacity: 0.55; }
.spine-bands { position: absolute; top: 7px; left: 0; right: 0; display: flex; flex-direction: column; gap: 3px; }
.spine-bands i { height: 3px; background: var(--chip-ink); }
.spine-name { position: relative; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.78rem; font-weight: 600; white-space: nowrap; max-height: 90%; overflow: hidden; text-overflow: ellipsis; }
.spine-update::after { content: ''; position: absolute; top: 0; right: 3px; width: 8px; height: 22px; background: var(--sun); border: 1.5px solid var(--chip-ink); border-top: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }

.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.filter { padding: 0.25rem 0.8rem; border-radius: 999px; border: 2px solid var(--line); background: var(--paper); font-weight: 500; font-size: 0.88rem; }
.filter small { color: var(--ink-soft); font-weight: 400; }
.filter.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.filter.on small { color: inherit; opacity: 0.75; }

.crow { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(150px, 1.1fr) minmax(140px, 2fr) 9.5rem; gap: 0.5rem 1rem; align-items: center; padding: 0.6rem 0.3rem; border-top: 1px solid var(--line); }
.crow-name { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; min-width: 0; }
.crow-name b { font-weight: 500; }
.crow-name:hover b { text-decoration: underline; text-underline-offset: 3px; }
.crow-badges { display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; align-items: center; }
.crow-val { text-align: right; line-height: 1.2; }
.crow-val b { font-family: var(--font-display); font-size: 1.15rem; font-variant-numeric: tabular-nums; display: block; }
.crow-val small { color: var(--ink-soft); font-size: 0.75rem; }
.crow-none { grid-template-columns: minmax(180px, 1.5fr) 1fr; }
.crow-update { background: color-mix(in srgb, var(--sun) 12%, transparent); border-radius: 10px; }

.months { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.8rem; }
.month { display: grid; grid-template-columns: 8.6rem minmax(0, 1fr) 7.5rem; gap: 0.8rem; align-items: center; }
.month-name { font-weight: 500; }
.month-name small { color: var(--ink-soft); font-weight: 400; }
.month-track { position: relative; height: 22px; }
.month-plan, .month-done { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px 8px 8px 4px; }
.month-plan { background: var(--accent-soft); min-width: 2px; }
.month-done { background: var(--accent); top: 5px; bottom: 5px; border-radius: 3px 6px 6px 3px; }
.month-ok .month-done { background: var(--ok); }
.month-val { font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.month-val small { color: var(--ink-soft); margin-left: 0.3rem; }
.month-current .month-name { font-weight: 700; }
.month-future .month-val { color: var(--ink-soft); }

.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 0.8rem; }
.group { border: 2px solid var(--line); border-radius: 18px; padding: 1rem; }
.group h3 { margin: 0 0 0.3rem; }
.group h3 small { font-family: var(--font-body); font-weight: 400; color: var(--ink-soft); }
.group .bar { margin: 0.2rem 0 0.7rem; }
.group-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.heat-wrap { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.4rem; }
.heat-days { display: grid; grid-template-rows: repeat(7, 16px); gap: 3px; margin-top: 19px; font-size: 0.68rem; color: var(--ink-soft); line-height: 16px; }
.heat { display: flex; gap: 3px; }
.heat-col { display: grid; grid-template-rows: 16px repeat(7, 16px); gap: 3px; }
.heat-month { font-size: 0.68rem; color: var(--ink-soft); white-space: nowrap; width: 16px; overflow: visible; }
.heat-cell { display: block; width: 16px; height: 16px; border-radius: 4px; background: var(--paper-2); border: 1px solid var(--line); }
.heat-1 { background: color-mix(in srgb, var(--accent) 25%, var(--paper)); border-color: transparent; }
.heat-2 { background: color-mix(in srgb, var(--accent) 50%, var(--paper)); border-color: transparent; }
.heat-3 { background: color-mix(in srgb, var(--accent) 75%, var(--paper)); border-color: transparent; }
.heat-4 { background: var(--accent); border-color: transparent; }
.heat-future { opacity: 0.35; }
.heat-today { outline: 2px solid var(--ink); outline-offset: 1px; }
.legend .heat-cell { margin-right: -0.9rem; }
.legend .heat-cell:last-of-type { margin-right: 0; }

/* ---------- Fiche collège ---------- */

.college-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem; align-items: start; }
.update-box { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem; border-radius: 14px; background: var(--sun); color: #3b2338; border: 2px solid var(--ink); margin-top: 1rem; }
.update-box p { margin: 0; flex: 1; min-width: 10rem; font-weight: 500; }
.update-box.ok { background: var(--paper-2); color: var(--ink); border-color: var(--ok); }
.items-table td:first-child { white-space: nowrap; }
.c-last-label { display: none; }
.items-table tr.is-next td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.flag { border: 0; background: none; padding: 0; color: var(--line); vertical-align: -0.2em; }
.flag .ic { stroke: var(--ink-soft); stroke-width: 1.2; stroke-linejoin: round; }
.flag.on { color: var(--sun); }
.stepper { display: inline-flex; align-items: center; gap: 0.4rem; }
.stepper b { min-width: 1.4rem; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Réglages ---------- */

.seasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.season input { position: absolute; opacity: 0; }
.season > span { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.8rem; border-radius: 16px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; height: 100%; }
.season small { color: var(--ink-soft); }
.season b { display: flex; align-items: center; gap: 0.3rem; }
.season-betty { width: 3.6rem; height: 3.6rem; }
.season input:checked + span { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.season input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.season-dots { display: flex; gap: 4px; margin-top: 0.2rem; }
.season-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.season-dots i:nth-child(2) { background: var(--accent-2); }
.season-dots i:nth-child(3) { background: var(--accent-3); }

/* ---------- Petits écrans ---------- */

@media (max-width: 1080px) {
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dash, .college-grid { grid-template-columns: minmax(0, 1fr); }
  .crow { grid-template-columns: minmax(0, 1fr) 9rem; }
  .crow-badges { grid-column: 1 / -1; grid-row: 2; }
  .crow-bar { grid-column: 1 / -1; grid-row: 3; }
  .crow-val { grid-column: 2; grid-row: 1 / span 1; }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  /* Champs à 16 px : en dessous, iOS zoome sur la page à chaque saisie. */
  input, select, textarea, .input, .input-s, .input-inline { font-size: 16px; }

  /* En-tête qui défile avec la page, onglets en bas de l'écran. */
  .top { position: relative; gap: 0.6rem; padding-top: calc(0.55rem + env(safe-area-inset-top)); }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; justify-content: space-around;
    padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom)); background: var(--paper); border-top: 2px solid var(--line);
  }
  .tab { flex: 1; flex-direction: column; justify-content: center; gap: 0.1rem; font-size: 0.72rem; padding: 0.4rem 0.4rem; border-radius: 14px; min-height: 3rem; }
  .tab .ic { width: 1.35rem; height: 1.35rem; }
  .tab.on { box-shadow: none; background: var(--accent-soft); border-color: transparent; }
  .top-right { margin-left: auto; }
  .season-pill span { display: none; }
  .season-pill { padding: 0.35rem 0.6rem; }
  .foot { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  #toasts { bottom: calc(4.8rem + env(safe-area-inset-bottom)); }
  .page { padding-inline: 0.7rem; }
  .card { padding: 1rem 0.9rem; border-radius: 20px; margin-bottom: 1.1rem; }
  .page-head { margin-bottom: 0.9rem; }

  /* Sous-onglets sur une seule ligne, à faire défiler du doigt. */
  .subnav { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav a { flex: none; white-space: nowrap; padding: 0.5rem 0.95rem; }

  /* Cibles tactiles. */
  .btn { min-height: 2.75rem; }
  .btn-small { min-height: 2.4rem; padding: 0.4rem 0.9rem; font-size: 0.9rem; }
  .icon-btn { width: 2.75rem; height: 2.75rem; }
  .icon-btn-s { width: 2.3rem; height: 2.3rem; }
  .icon-btn-s .ic { width: 1rem; height: 1rem; }
  .filter, .chip-btn { padding: 0.45rem 0.9rem; }
  .checkline { margin: 0.7rem 0; }
  .checkline input { width: 1.4rem; height: 1.4rem; }
  input[type='range'] { height: 2rem; }
  .link { padding: 0.25rem 0; display: inline-block; }
  .info summary { width: 2.2rem; height: 2.2rem; }
  .info summary .ic { width: 1.4rem; height: 1.4rem; }

  /* Tableau de bord. */
  .hero { flex-direction: column; gap: 0.2rem; min-height: 0; border-radius: 24px; }
  .hero-text { padding-bottom: 0.4rem; }
  .hero-side { align-self: flex-end; }
  .hero-side .ring { margin-bottom: 2.6rem; }
  .hero-betty { width: 96px; height: 130px; }
  .fallers i:nth-child(odd) { display: none; }
  .faller { opacity: 0.55; }
  .ring { width: 96px; height: 96px; }
  .ring b { font-size: 1.7rem; }
  .check { width: 2.75rem; height: 2.75rem; }
  .check .ic { width: 1.5rem; height: 1.5rem; }
  .row { gap: 0.6rem; min-height: 3.4rem; }
  .row-late { flex-wrap: wrap; }
  .row .chip { flex: none; }
  .row-empty { padding-left: 0; }
  .tblock { padding: 0.5rem 0.6rem; }
  .row-late .row-actions { margin-left: 0; width: 100%; }
  .when { width: auto; }

  /* Planning, façon agenda : les sept jours en bandeau, un seul jour affiché dessous. */
  .week-card { display: flex; flex-direction: column; }
  .week-card > .week-bar { order: 1; margin-bottom: 0.4rem; }
  .week-card > .daystrip { order: 2; }
  .week-card > .week { order: 3; }
  .week-card > .tpl-bar { display: none; }
  .tpl-open { display: inline-flex; }
  .week-nav { flex-wrap: wrap; }
  .week-tools { width: 100%; justify-content: center; order: 5; }
  .week-card > .legend { order: 5; }
  .week-nav { gap: 0.4rem; width: 100%; }
  .week-nav h2 { font-size: 1.15rem; flex: 1; text-align: center; white-space: nowrap; }
  .wk-long { display: none; }
  .week-sum { width: 100%; text-align: center; font-size: 0.85rem; }
  .daystrip {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.2rem;
    position: sticky; top: 0; z-index: 6; margin: 0 -0.9rem 0.7rem; padding: 0.45rem 0.6rem 0.5rem;
    background: var(--paper); border-block: 2px solid var(--line);
  }
  .ds-day { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 0.25rem 0 0.3rem; border: 0; border-radius: 14px; background: none; color: var(--ink); min-height: 4.4rem; }
  .ds-day small { font-size: 0.72rem; color: var(--ink-soft); font-weight: 500; }
  .ds-day b { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; font-family: var(--font-display); font-size: 1.15rem; border: 2px solid transparent; }
  .ds-day.is-today b { border-color: var(--accent); color: var(--accent); }
  [data-mode='clair'] .ds-day.is-today b { color: color-mix(in srgb, var(--accent) 82%, var(--ink)); }
  [data-mode] .ds-day.is-selected b { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .ds-day.is-selected small { color: var(--ink); font-weight: 700; }
  .ds-bar { display: block; width: 70%; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
  .ds-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
  .ds-none .ds-bar, .ds-off .ds-bar { background: none; }
  .ds-full .ds-bar i { background: var(--ok); }
  .ds-missed .ds-bar { background: color-mix(in srgb, var(--warn) 45%, var(--line)); }
  .ds-day em { font-size: 0.66rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; line-height: 1; }
  .week { display: block; }
  .week .day { display: none; }
  .week .day.is-selected { display: flex; }
  .day { min-height: 12rem; background: none; border: 0; padding: 0; }
  .day.is-today { border: 0; background: none; }
  .day.is-off { background: repeating-linear-gradient(135deg, var(--paper-2) 0 8px, var(--paper) 8px 16px); border-radius: 16px; padding: 0.7rem; }
  .day.is-past:not(.is-today) { opacity: 0.75; }
  .day-head { font-size: 1rem; }
  .day-short { display: none; }
  .day-head .day-long { display: inline; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--ink); }
  .day-head .day-long::first-letter { text-transform: uppercase; }
  .off-toggle { font-size: 0.85rem; padding: 0.3rem 0.8rem; }
  .pb-head { font-size: 0.92rem; padding: 0.4rem 0.3rem; }
  .pblock { padding: 0.4rem 0.5rem 0.55rem; }
  .pb-slots { flex-direction: row; flex-wrap: wrap; gap: 0.4rem; }
  .schip { flex: 1 1 100%; min-height: 2.9rem; font-size: 0.92rem; padding: 0.25rem 0.3rem; gap: 0.4rem; }
  .schip-tick { width: 2.3rem; height: 2.3rem; border-radius: 9px; border-width: 2px; }
  .schip-tick .ic { width: 1.3rem; height: 1.3rem; }
  .schip-x { width: 2rem; height: 2.3rem; }
  .schip-x .ic { width: 0.9rem; height: 0.9rem; }
  .add-block { padding: 0.7rem; font-size: 0.92rem; }
  .gen-actions .btn { flex: 1 1 100%; }
  .tpl-actions { margin-left: 0; }
  .cal-week { grid-template-columns: 4.2rem minmax(0, 1fr); row-gap: 0.4rem; padding: 0.5rem 0.4rem; }
  .cal-days { grid-column: 1 / -1; }
  .cal-day { padding: 0.4rem 0; }
  .cal-day b { font-size: 1rem; }
  .cal-cap { grid-column: 1 / -1; text-align: left; }
  .field-inline > select.input-inline { flex: 1 1 9rem; }
  .tpl-bar select { flex: 1 1 100%; }
  .bulk .field { width: 100%; }
  .bulk .input-inline { flex: 1; }

  /* Fenêtres : feuille qui monte du bas de l'écran. */
  .modal-back { place-items: end center; padding: 0; }
  .modal, .modal-narrow {
    width: 100%; max-height: 88vh; max-height: 88dvh; border-radius: 26px 26px 0 0; border-bottom: 0; box-shadow: none;
    padding: 1.1rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
  }
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pick-college { padding: 0.6rem 0.7rem; min-height: 3.4rem; }
  .pick-items button { padding: 0.85rem 0.4rem; }
  .seg-opt span { padding: 0.55rem 1rem; }

  /* Progression. */
  .crow { grid-template-columns: minmax(0, 1fr) auto; padding: 0.8rem 0.2rem; }
  .crow-bar { grid-column: 1 / -1; grid-row: auto; }
  .crow-val small { display: block; max-width: 9rem; }
  .month { grid-template-columns: 4.6rem minmax(0, 1fr) 5.2rem; gap: 0.5rem; }
  .month-name small { display: none; }
  .spine { height: 120px !important; }

  /* Fiche collège : chaque item devient une petite carte. */
  .items-table, .items-table tbody { display: block; }
  .items-table thead { display: none; }
  .items-table tr {
    display: grid; grid-template-columns: 5.4rem minmax(0, 1fr) auto; gap: 0.45rem 0.5rem; align-items: center;
    grid-template-areas: 'item item count' 'num title title' 'note note del' 'plan last last';
    padding: 0.8rem 0.2rem 0.8rem 0.7rem; border-bottom: 1px solid var(--line);
  }
  .items-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .items-table td:empty { display: none; }
  .items-table tr.is-next { box-shadow: inset 4px 0 0 var(--accent); }
  .items-table tr.is-next td:first-child { box-shadow: none; }
  .c-item { grid-area: item; font-weight: 500; font-size: 1.02rem; }
  .c-count { grid-area: count; }
  .c-num { grid-area: num; }
  .c-num .input-num { width: 100%; }
  .c-title { grid-area: title; }
  .c-note { grid-area: note; }
  .c-del { grid-area: del; }
  .c-plan { grid-area: plan; }
  .c-last { grid-area: last; font-size: 0.85rem; }
  .c-last-label { display: inline; }
  .items-table .input-s { min-height: 2.5rem; padding: 0.3rem 0.6rem; }
  .stepper { gap: 0.6rem; }
  .stepper b { font-size: 1.15rem; }
}

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

@media print {
  .top, .tabs, .gen, .tpl-bar, .add-block, #toasts { display: none !important; }
  .card { box-shadow: none; break-inside: avoid; }
}
