/* Le jeu : interface sombre façon RimWorld (fenêtres à aplat sombre et liseré clair), couleurs de la visionneuse. */
:root {
  --bg: #091a1f;
  --surface: #10252b;
  --surface-2: #163038;
  --win: #13262c;
  --win-top: #1b343b;
  --line: #2b4a52;
  --line-2: #4a6870;
  --ink: #dcebea;
  --muted: #8ea7aa;
  --accent: #4cc2c8;
  --home: #ff7b57;
  --away: #f1d25e;
  --poison: #9be564;
  --red: #e5534b;
  --amber: #e3a43c;
  --green: #6cc070;
  --paper: #e9dfc7;
  --paper-ink: #2b2418;
  --paper-muted: #7a6a4c;
  --font-display: "Saira Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; min-height: 100vh; }
button, input { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.03em; margin: 0; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Barre du haut : le nom, la frise du tournoi, l'échéance de Corvin. */
.top {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.brand { display: grid; line-height: 1; }
a.brand { color: inherit; text-decoration: none; }
.brand b { font-family: var(--font-display); font-size: 26px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.brand span { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.steps { display: flex; gap: 3px; list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; overflow-x: auto; }
.steps li { flex: 1 0 74px; background: var(--surface-2); border-top: 3px solid var(--line); padding: 4px 8px; display: grid; line-height: 1.2; }
.steps li .n { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.steps li .c { font-family: var(--font-display); font-size: 13px; font-weight: 700; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps li .r { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.steps li.done { border-top-color: var(--accent); }
.steps li.now { border-top-color: var(--home); background: #20363d; }
.steps li .r.V { color: var(--green); } .steps li .r.D { color: var(--red); }
.top-actions { display: flex; gap: 10px; align-items: center; }
.deadline { font-family: var(--font-mono); font-size: 11px; color: var(--red); border: 1px solid var(--red); padding: 2px 8px; background: #2a1514; }
.deadline:empty { display: none; }
.top { position: relative; }
.account-menu {
  position: absolute; right: 16px; top: 100%; z-index: 20; width: min(340px, calc(100vw - 32px));
  background: var(--surface-2); border: 1px solid var(--line-2); padding: 12px; display: grid; gap: 8px;
}
.account-menu p { margin: 0; font-size: 13px; }
.account-menu .providers { display: grid; gap: 6px; }
.account-menu a.btn { text-decoration: none; text-align: center; }
.club-form { display: grid; gap: 8px; }
.club-form input { background: var(--surface-2); border: 1px solid var(--line-2); padding: 8px 10px; width: 100%; box-sizing: border-box; }

main {
  max-width: 1240px; margin: 0 auto;
  padding: 22px max(16px, env(safe-area-inset-right, 0px)) 60px max(16px, env(safe-area-inset-left, 0px));
  display: grid; gap: 18px;
}

/* Fenêtres façon RimWorld */
.win { background: var(--win); border: 1px solid var(--line-2); box-shadow: 4px 4px 0 rgba(0,0,0,0.35); min-width: 0; }
.win > .title { background: var(--win-top); border-bottom: 1px solid var(--line-2); padding: 6px 12px; font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.win > .title small { color: var(--muted); font-weight: 400; font-family: var(--font-mono); font-size: 11px; }
.win > .body { padding: 14px; display: grid; gap: 12px; }

.btn { background: #25505a; border: 1px solid var(--accent); padding: 8px 16px; cursor: pointer; font-weight: 600; }
.btn:hover { background: #2d616c; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.secondary { background: var(--win-top); border-color: var(--line-2); font-weight: 500; }
.ghost { background: transparent; border: 1px solid var(--line-2); padding: 4px 10px; cursor: pointer; font-size: 13px; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); }

/* Odile qui parle */
.odile { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start; }
.odile .face { background: #1d3a42; border: 1px solid var(--line-2); aspect-ratio: 1; display: grid; place-items: end center; overflow: hidden; }
.odile .face svg.perso { width: 112%; height: auto; margin-bottom: -18%; }
.odile .speech { display: grid; gap: 8px; }
.odile .speech p { font-size: 16px; }
.odile .who { font-family: var(--font-display); font-size: 15px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; }
@media (max-width: 560px) { .odile { grid-template-columns: 64px 1fr; } }

.chapter h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; }
.chapter .eyebrow { display: block; margin-bottom: 4px; }

.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

/* Lettre */
.letter { max-width: 560px; margin: 30px auto 0; }
.letter p { font-size: 16px; }
.letter .sign { text-align: right; font-style: italic; color: var(--muted); }

/* Composition : six cartes de joueur, en formation */
.formation { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "a1 m a2" "d1 g d2"; }
.formation .slot-Forward1 { grid-area: a1; } .formation .slot-Forward2 { grid-area: a2; } .formation .slot-Midfielder { grid-area: m; }
.formation .slot-Defender1 { grid-area: d1; } .formation .slot-Defender2 { grid-area: d2; } .formation .slot-Keeper { grid-area: g; }
@media (max-width: 620px) { .formation { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "a1 a2" "m m" "d1 d2" "g g"; } }
.pcard { background: var(--surface-2); border: 1px solid var(--line); padding: 10px; display: grid; gap: 6px; text-align: left; min-width: 0; }
button.pcard { cursor: pointer; }
button.pcard:hover { border-color: var(--line-2); }
.pcard.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pcard .head { display: flex; gap: 10px; align-items: center; }
.pcard .head svg { flex: none; }
.pcard .name { font-family: var(--font-display); font-size: 19px; font-weight: 700; text-transform: uppercase; line-height: 1; }
.pcard .sub { font-size: 12px; color: var(--muted); }
.pcard .off { color: var(--amber); }
.slotTag { font-family: var(--font-mono); font-size: 11px; font-weight: 500; background: var(--home); color: #0a1214; padding: 0 5px; margin-right: 6px; }
.stats { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; font-size: 12px; align-items: center; }
.stats .k { color: var(--muted); }
.stats .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.stats .v.hi { color: var(--accent); }
.bar { height: 4px; background: #0a1214; border: 1px solid #2e4d55; }
.bar i { display: block; height: 100%; background: #5d7b82; }
.bar.hi i { background: var(--accent); }
.chip { display: inline-block; font-family: var(--font-mono); font-size: 11px; padding: 0 6px; border: 1px solid currentColor; line-height: 1.5; }
.chip.frais { color: var(--green); } .chip.marqué { color: var(--amber); } .chip.épuisé { color: var(--red); }
.techs { display: flex; flex-wrap: wrap; gap: 4px; }
.tech { font-size: 11.5px; padding: 1px 7px; border: 1px dashed var(--line-2); background: transparent; cursor: pointer; }
.tech.on { border-style: solid; border-color: var(--home); background: #2a2a20; }
.tech:disabled { cursor: default; }

/* Curseur de risque */
.risk { display: grid; gap: 6px; }
.risk input { width: 100%; accent-color: var(--accent); }
.risk .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.risk .val { font-family: var(--font-mono); font-size: 12px; }

/* Match : la visionneuse intégrée */
.match-frame { width: 100%; height: min(78vh, 900px); border: 1px solid var(--line-2); background: var(--bg); }
.matchbar { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }

/* Mi-temps */
.hp-list { display: grid; gap: 6px; }
.hp-row { display: grid; grid-template-columns: 90px 1fr 48px; gap: 10px; align-items: center; font-size: 14px; }
.hp-row .bar { height: 8px; }
.hp-row .bar i { background: var(--green); }
.hp-row .bar.low i { background: var(--red); }
.hp-row .v { font-family: var(--font-mono); font-size: 12px; text-align: right; }
.bigscore { font-family: var(--font-display); font-size: 48px; font-weight: 800; line-height: 1; }
.bigscore .h { color: var(--home); } .bigscore .a { color: var(--away); }

/* Bilan */
.lines { display: grid; gap: 12px; }
.lines .l { display: grid; gap: 2px; }
.lines .l b { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.lines .l span { font-size: 16px; }

/* Cartes d'entraînement : papier clair */
.hand { display: flex; gap: 14px; flex-wrap: wrap; }
.card {
  background: var(--paper); color: var(--paper-ink); border: 2px solid #0a1214; box-shadow: 4px 4px 0 rgba(0,0,0,0.4);
  width: 178px; min-height: 196px; padding: 12px; display: grid; gap: 4px; align-content: start; text-align: left; cursor: pointer;
}
.card.static { cursor: default; }
.card.selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.card .fam { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-muted); }
.card b { font-family: var(--font-display); font-size: 22px; text-transform: uppercase; line-height: 1; }
.card .eff { font-size: 13.5px; }
.card .why { font-size: 12px; color: #5b4f38; font-style: italic; }
.card .for { font-family: var(--font-mono); font-size: 11px; color: #5b4f38; }
.card.r2 { background: #f1e3b8; }

.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.trainee { background: var(--surface-2); border: 1px solid var(--line); padding: 10px; display: grid; gap: 6px; text-align: left; cursor: pointer; }
.trainee:disabled { cursor: not-allowed; opacity: 0.75; }
.trainee .pv { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.trainee .no { font-size: 12px; color: var(--red); }

/* Licence et menu du club */
.menu { display: grid; gap: 8px; }
.tab { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line-2); background: var(--win-top); padding: 10px 14px; text-align: left; }
.tab.open { border-color: var(--accent); background: #1f4049; cursor: pointer; }
.tab.off { opacity: 0.5; }
.tab b { font-family: var(--font-display); font-size: 20px; text-transform: uppercase; }
.tab small { display: block; color: var(--muted); font-size: 12px; }

.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-family: var(--font-mono); font-size: 12.5px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--win-top); border: 1px solid var(--accent); padding: 10px 16px; max-width: min(560px, calc(100vw - 32px)); box-shadow: 4px 4px 0 rgba(0,0,0,0.4);
}
.toast.error { border-color: var(--red); }
.confirm { display: flex; gap: 8px; align-items: center; }

@media (prefers-reduced-motion: no-preference) {
  .card.reveal { animation: reveal 380ms ease-out; }
  @keyframes reveal { from { transform: translateY(14px) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ───────────── Le théâtre des scènes ───────────── */
.theatre [hidden] { display: none !important; }
.theatre { position: relative; height: min(78vh, 720px); min-height: 460px; overflow: hidden; border: 1px solid var(--line); background: #0d1d24; cursor: pointer; outline: none; user-select: none; }
.theatre .decor { position: absolute; inset: 0; width: 100%; height: 100%; }
.theatre::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5, 12, 15, .75)); pointer-events: none; }
.theatre .place { position: absolute; top: 14px; left: 18px; z-index: 3; display: grid; gap: 2px; text-shadow: 0 1px 4px #000; }
.theatre .place span { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.theatre .place b { font-family: var(--font-display, "Saira Condensed", sans-serif); font-size: 26px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.theatre .skip { position: absolute; top: 12px; right: 14px; z-index: 6; background: rgba(9, 26, 31, .7); }

.theatre .cast { position: absolute; bottom: 0; width: 46%; height: 100%; z-index: 2; pointer-events: none; }
.theatre .cast.left { left: 0; } .theatre .cast.right { right: 0; }
.theatre .actor { position: absolute; bottom: -4px; width: clamp(200px, 32vw, 400px); transition: transform .35s ease, filter .35s ease, opacity .35s ease; transform-origin: 50% 100%; }
.theatre .cast.left .actor { left: 6%; } .theatre .cast.right .actor { right: 6%; }
.theatre .actor svg.perso { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.theatre .actor.dim { filter: brightness(.42) saturate(.6); transform: scale(.93); }
.theatre .actor.active { transform: translateY(-8px) scale(1.03); z-index: 2; }
.theatre .actor.back { z-index: 0; }
.theatre .cast.left .actor.back { left: -6%; transform: scale(.82); }
.theatre .cast.right .actor.back { right: -6%; transform: scale(.82); }
.theatre .cast.left .actor.entering { transform: translateX(-60%); opacity: 0; }
.theatre .cast.right .actor.entering { transform: translateX(60%); opacity: 0; }
.theatre .cast.left .actor.leaving { transform: translateX(-70%); opacity: 0; }
.theatre .cast.right .actor.leaving { transform: translateX(70%); opacity: 0; }
.theatre .actor .pic { position: absolute; top: 2%; right: 12%; }
.theatre .cast.right .actor .pic { right: auto; left: 12%; }
.theatre .actor .pic svg { width: 54px; height: 54px; animation: pop .35s cubic-bezier(.3, 1.6, .5, 1) both; filter: drop-shadow(0 2px 3px #000); }
@keyframes pop { from { transform: scale(0) rotate(-20deg); } to { transform: scale(1) rotate(0); } }
.theatre .actor.shake .body { animation: shake .45s ease; }
.theatre .actor.hop .body { animation: hop .4s ease; }
.theatre .actor.slump .body { animation: slump .8s ease; }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes hop { 0%, 100% { transform: none; } 40% { transform: translateY(-14px); } }
@keyframes slump { 0% { transform: none; } 50% { transform: translateY(10px) scaleY(.97); } 100% { transform: none; } }

.theatre .box { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(760px, calc(100% - 32px)); z-index: 5; background: rgba(12, 28, 34, .94); border: 1px solid var(--line-2); border-top: 3px solid var(--home); padding: 14px 20px 16px; min-height: 104px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.theatre .box.side-right { border-top-color: var(--away); }
.theatre .box .who { position: absolute; top: -15px; left: 18px; background: var(--home); color: #1a0f0a; font-family: var(--font-display, "Saira Condensed", sans-serif); font-weight: 800; font-size: 17px; letter-spacing: .04em; text-transform: uppercase; padding: 1px 12px; }
.theatre .box.side-right .who { left: auto; right: 18px; background: var(--away); }
.theatre .box .line { font-size: 19px; line-height: 1.45; min-height: 2.9em; }
.theatre .box .line b { color: var(--accent); font-weight: 600; }
.theatre .box .line.echo { color: var(--muted); font-size: 16px; min-height: 0; }
.theatre .box.narration { border-top-color: var(--muted); text-align: center; }
.theatre .box.narration .line { font-style: italic; color: var(--muted); }
.theatre .box .more { position: absolute; right: 14px; bottom: 6px; font-size: 11px; color: var(--muted); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.theatre[data-kind="choix"] { cursor: default; }
.theatre[data-kind="choix"] .box { border-top-color: var(--accent); }
.theatre[data-kind="choix"] .box .who { background: var(--accent); }
.theatre .choices { display: grid; gap: 8px; margin-top: 10px; }
.theatre .choice { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 17px; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.theatre .choice span { font-family: var(--font-mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line-2); padding: 0 6px; }
.theatre .choice:hover, .theatre .choice:focus-visible { background: #1f4049; border-color: var(--accent); transform: translateX(4px); }

.theatre .paper { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(5, 12, 15, .55); }
.theatre .paper .sheet { width: min(520px, calc(100% - 40px)); background: var(--paper); color: var(--paper-ink); padding: 26px 30px 20px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); transform: rotate(-1.2deg); font-family: Georgia, "Times New Roman", serif; font-size: 17px; animation: drop .45s ease both; }
.theatre .paper .sheet p { margin: 0 0 10px; }
.theatre .paper .sheet .head { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--paper-muted); border-bottom: 1px solid #c9bb98; padding-bottom: 8px; margin-bottom: 14px; }
.theatre .paper .sheet .sign { text-align: right; font-style: italic; margin-top: 16px; }
.theatre .paper .sheet .tap { font-family: var(--font-mono); font-size: 10px; color: var(--paper-muted); text-align: center; margin-top: 10px; }
@keyframes drop { from { transform: translateY(-30px) rotate(-4deg); opacity: 0; } to { transform: rotate(-1.2deg); opacity: 1; } }

@media (max-width: 640px) {
  .theatre { height: 74vh; min-height: 520px; }
  .theatre .place { max-width: calc(100% - 150px); }
  .theatre .actor { width: 58vw; bottom: 96px; }
  .theatre .cast { width: 50%; }
  .theatre .cast.left .actor { left: -4%; } .theatre .cast.right .actor { right: -4%; }
  .theatre .box { bottom: 10px; width: calc(100% - 20px); padding: 12px 14px; }
  .theatre .box .line { font-size: 17px; }
  .theatre .place b { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .theatre .actor, .theatre .actor .body, .theatre .paper .sheet, .theatre .actor .pic svg { transition: none; animation: none; }
}

/* ───────────── Le carnet d'Odile ───────────── */
.notebook { position: relative; }
.notebook .count { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-left: 4px; }
.notebook .dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--home); box-shadow: 0 0 0 2px var(--bg); }
.note-banner { position: fixed; left: 16px; bottom: 16px; z-index: 50; display: grid; gap: 2px; text-align: left; padding: 10px 16px 10px 14px; background: var(--paper); color: var(--paper-ink); border: 0; border-left: 5px solid var(--home); box-shadow: 0 10px 30px rgba(0, 0, 0, .55); cursor: pointer; max-width: calc(100vw - 32px); }
.note-banner .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--paper-muted); }
.note-banner b { font-family: "Caveat", var(--font-body); font-size: 24px; line-height: 1; }
.note-banner.in { animation: slidein .5s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes slidein { from { transform: translateX(-120%); } to { transform: none; } }

.carnet-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(4, 10, 12, .72); display: grid; place-items: center; padding: 16px; }
.carnet { width: min(920px, 100%); max-height: calc(100vh - 32px); display: grid; grid-template-columns: 230px 1fr; grid-template-rows: auto 1fr; background: var(--paper); color: var(--paper-ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); overflow: hidden; }
.carnet header { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; padding: 12px 18px; border-bottom: 2px solid #c9bb98; background: #e2d5b6; }
.carnet header b { font-family: "Caveat", var(--font-body); font-size: 28px; line-height: 1; }
.carnet header span { font-family: var(--font-mono); font-size: 11px; color: var(--paper-muted); }
.carnet header button { margin-left: auto; color: var(--paper-ink); border-color: #b9ab8a; }
.carnet nav { overflow: auto; padding: 10px 0; border-right: 1px solid #c9bb98; background: repeating-linear-gradient(#e9dfc7 0 27px, #dccfae 27px 28px); }
.carnet nav h4 { margin: 10px 16px 2px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-muted); }
.carnet nav button { display: block; width: 100%; text-align: left; padding: 4px 16px 4px 22px; background: none; border: 0; color: var(--paper-ink); cursor: pointer; position: relative; font-size: 14px; }
.carnet nav button:hover { background: rgba(0, 0, 0, .05); }
.carnet nav button.on { background: #fffaf0; font-weight: 600; box-shadow: inset 3px 0 0 var(--home); }
.carnet nav button.new::before { content: ""; position: absolute; left: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--home); }
.carnet nav button.teaser { color: #a99a78; font-style: italic; }
.carnet article { overflow: auto; padding: 18px 26px 22px; }
.carnet article .pic { width: 100%; max-width: 480px; height: auto; display: block; margin: 0 auto 8px; }
.carnet article h3 { font-family: "Caveat", var(--font-body); font-size: 34px; text-transform: none; letter-spacing: 0; margin: 4px 0 8px; }
.carnet article p { font-size: 16px; line-height: 1.55; margin: 0 0 8px; max-width: 60ch; }
.carnet article p b { color: #9d3a20; }
.carnet article footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 10px; border-top: 1px dashed #c9bb98; }
.carnet article footer span { font-family: var(--font-mono); font-size: 11px; color: var(--paper-muted); }
.carnet article footer .btn { margin-left: auto; }
@media (max-width: 640px) {
  .carnet { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
  .carnet nav { display: flex; overflow-x: auto; padding: 6px; border-right: 0; border-bottom: 1px solid #c9bb98; background: #e2d5b6; }
  .carnet nav h4 { display: none; }
  .carnet nav button { white-space: nowrap; width: auto; padding: 4px 10px 4px 18px; }
  .carnet article { padding: 14px 16px; }
}

.pcard .sub .chip { white-space: nowrap; }
