/* AESC — Calendrier de l’Avent des sciences.
   Inspiré de la présentation web de la Faculté des sciences de l’UNIGE :
   barre noire, bandeau vert facultaire, titres en capitales, typographie TheSans → Arial. */

:root {
  color-scheme: light;
  --font: "TheSans", "TheSansOsF", Arial, Helvetica, sans-serif;
  --ink: #222;
  --muted: #5c5c5c;
  --line: #ccc;
  --line-soft: #e2e2e2;
  --mist: #f4f4f4;
  --paper: #fff;
  --black: #000;
  --sci: #318063;        /* vert Faculté des sciences */
  --sci-dark: #2a6d54;
  --sci-deep: #194032;
  --sci-pale: #e9f2ee;
  --sci-soft: #98c0b1;
  --unige: #cf0063;      /* accent UNIGE */
  --present: #f1cd55;
  --absent: #6b6b6b;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { min-width: 300px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--font);
}
a { color: var(--sci); text-underline-offset: 3px; }
a:hover { color: var(--sci-deep); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--unige); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { width: min(var(--wrap), calc(100% - 64px)); margin-inline: auto; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 10px 14px; background: #fff; color: var(--ink); transform: translateY(-200%); }
.skip:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }

/* ---------- En-tête : barre noire, bandeau vert, sous-navigation ---------- */
.topbar { background: var(--black); color: #fff; }
.topbar-inner { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.logo:hover { color: #fff; }
.logo-mark { display: block; width: 46px; height: 46px; padding: 1px; border-radius: 50%; background: #fff; object-fit: contain; }
.logo-text { font-size: 13px; line-height: 1.2; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.topnav { display: flex; align-items: center; gap: 26px; }
.topnav a, .topnav button { background: none; border: 0; padding: 0; color: #fff; font-size: 14px; font-weight: 700; text-transform: uppercase; text-decoration: none; letter-spacing: .02em; }
.topnav a:hover, .topnav button:hover { text-decoration: underline; }

.band { background: var(--sci); color: #fff; }
.band-inner { position: relative; min-height: 118px; display: flex; align-items: center; padding: 26px 0 18px; }
.band-title { color: #fff; text-decoration: none; text-transform: uppercase; font-size: clamp(26px, 3.6vw, 40px); font-weight: 300; line-height: 1.15; letter-spacing: .01em; }
.band-title:hover { color: #fff; }
.band-link { position: absolute; top: 12px; right: 0; color: #fff; font-size: 13px; text-decoration: none; opacity: .92; }
.band-link:hover { color: #fff; text-decoration: underline; }
.subnav { display: flex; flex-wrap: wrap; background: var(--sci-dark); }
.subnav a, .subnav button { display: block; padding: 9px 12px; border: 0; background: none; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.subnav a:hover, .subnav button:hover { background: var(--sci-deep); color: #fff; }
.subnav [aria-current] { background: var(--sci-deep); }
.subnav button { margin-left: auto; font-weight: 400; }

/* ---------- Mise en page commune ---------- */
#main { flex: 1; outline: none; }
.page { padding: 26px 0 64px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--sci); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--sci); }

h1, h2, h3 { margin: 0; line-height: 1.2; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line-soft); }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; color: var(--ink); margin: 6px 0 10px; }
.lead { margin: 0; max-width: 760px; font-size: 18px; font-weight: 700; line-height: 1.55; }
.page-head .lead { font-weight: 400; color: var(--muted); font-size: 17px; }
.kicker { display: block; color: var(--sci); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.section-title { margin: 40px 0 18px; color: var(--sci); font-size: 25px; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }
.section-title:first-child { margin-top: 0; }

.intro-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.intro-layout h1 { font-size: clamp(32px, 4.4vw, 46px); font-weight: 700; margin: 0 0 16px; }
.side-box h2 { color: var(--sci); font-size: 26px; font-weight: 400; margin: 0 0 10px; }
.side-box h2 + * { margin-top: 0; }
.side-box > * + h2 { margin-top: 26px; }
.chevron-list { list-style: none; margin: 0; padding: 0; }
.chevron-list li { position: relative; padding: 3px 0 3px 18px; font-size: 16px; }
.link-button { padding: 0; border: 0; background: none; color: var(--sci); text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: var(--sci-deep); }
.chevron-list li::before { content: "›"; position: absolute; left: 2px; top: 1px; color: var(--sci); font-weight: 700; font-size: 18px; }

/* ---------- Boutons, champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 9px 18px; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--ink); font-size: 16px; font-weight: 700; text-decoration: none; line-height: 1.2; }
.btn:hover { border-color: var(--sci); color: var(--sci-deep); background: var(--sci-pale); }
.btn-primary { background: var(--sci); border-color: var(--sci); color: #fff; }
.btn-primary:hover { background: var(--sci-deep); border-color: var(--sci-deep); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-small { min-height: 34px; padding: 5px 12px; font-size: 14px; }
input, textarea, select { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #8f8f8f; border-radius: 0; background: #fff; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #707070; }
textarea { resize: vertical; }
label { font-weight: 700; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 15px; }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feedback { min-height: 1.6em; margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.feedback.error { color: #a1004a; font-weight: 700; }

/* ---------- Choix de la section ---------- */
.section-picker ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--ink); font-size: 15px; text-decoration: none; }
.chip:hover { border-color: var(--sci); color: var(--sci-deep); background: var(--sci-pale); }
.chip[aria-current="true"], .chip[aria-pressed="true"] { background: var(--sci); border-color: var(--sci); color: #fff; font-weight: 700; }
.game-sections { margin: -6px 0 26px; }
.game-sections .chip { min-height: 34px; padding: 4px 11px; font-size: 14px; }
.chip-asso { gap: 7px; padding-left: 5px !important; font-weight: 700; }
.chip-asso img { width: 26px; height: 26px; padding: 1px; background: #fff; object-fit: contain; }

/* ---------- Choix de l’association (accueil) ---------- */
.step-lead { margin: -8px 0 16px; color: var(--muted); }
.asso-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.asso-grid li { display: flex; }
.asso-card { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px 12px; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--ink); text-align: center; transition: border-color .15s, background .15s; }
.asso-card:hover { border-color: var(--sci); background: var(--sci-pale); }
.asso-card[aria-pressed="true"] { border-color: var(--sci); background: var(--sci-pale); box-shadow: inset 0 0 0 1px var(--sci), inset 0 -5px 0 var(--sci); }
.asso-logo { display: block; width: 100%; max-width: 96px; height: 96px; margin-bottom: 4px; object-fit: contain; }
.asso-code { font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.asso-section { font-size: 13px; line-height: 1.3; color: var(--muted); }
.asso-card[aria-pressed="true"] .asso-code { color: var(--sci-deep); }
.chosen-asso { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.chosen-asso img { flex: none; width: 56px; height: 56px; object-fit: contain; }
.chosen-asso strong { display: block; font-size: 19px; }
.chosen-asso span { font-size: 15px; color: var(--muted); }
.step-hint { margin: 0; padding: 18px 20px; background: var(--mist); border-left: 4px solid var(--line); color: var(--muted); }
#game-title:focus { outline: none; }

/* ---------- Cartes du jour et décompte ---------- */
.today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.today-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--sci); background: #fff; }
.today-card h3 { font-size: 28px; font-weight: 700; }
.today-card p { margin: 0; }
.today-card .btn { align-self: flex-start; margin-top: auto; }
.today-status { font-size: 15px; font-weight: 700; color: var(--sci-deep); }

.countdown { display: grid; gap: 4px; padding: 14px 16px; background: var(--mist); border-left: 4px solid var(--sci); }
.countdown-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.countdown-time { font-size: 36px; font-weight: 700; line-height: 1.1; color: var(--sci-deep); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.countdown small { font-size: 14px; color: var(--muted); }
.countdown-bar { display: block; height: 5px; margin: 4px 0 2px; background: #dcdcdc; }
.countdown-bar i { display: block; height: 100%; width: 100%; background: var(--sci); transition: width .9s linear; }
.countdown.is-urgent { border-left-color: var(--unige); }
.countdown.is-urgent .countdown-time { color: var(--unige); }
.countdown.is-urgent .countdown-bar i { background: var(--unige); }
.page-head .countdown { min-width: 260px; }

/* ---------- Calendrier : 24 cases ---------- */
.calendar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.door { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 158px; padding: 12px 12px 10px; border: 1px solid var(--line); background: #fff; }
.door-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.door-number { font-size: 34px; font-weight: 700; line-height: 1; color: var(--sci); }
.door-date { font-size: 13px; color: var(--muted); text-align: right; }
.door-games { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.door-game { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 30px; }
.door-game a { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 4px 8px; background: var(--sci); color: #fff; font-weight: 700; text-decoration: none; }
.door-game a:hover { background: var(--sci-deep); color: #fff; }
.door-game .locked { display: flex; align-items: center; gap: 6px; color: #777; }
.door-mark { font-weight: 700; }
.door.is-locked { background: var(--mist); border-color: var(--line-soft); }
.door.is-locked .door-number { color: #9a9a9a; }
.door.is-open { border: 2px solid var(--sci); padding: 11px 11px 9px; box-shadow: 0 2px 0 var(--sci-soft); }
.door.is-open::after { content: "Encore ouvert"; position: absolute; top: -11px; left: 10px; padding: 1px 7px; background: var(--sci-dark); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.door.is-today::after { content: "Aujourd’hui"; background: var(--unige); }
.door.is-closed .door-number { color: var(--sci-dark); }
.door details { margin-top: auto; font-size: 13px; }
.door summary { cursor: pointer; color: var(--sci); font-weight: 700; }
.door dl { margin: 6px 0 0; }
.door dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.door dd { margin: 0 0 4px; font-weight: 700; overflow-wrap: anywhere; }
.lock-icon { width: 12px; height: 14px; flex: none; }

.follow { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--sci-soft); font-size: 15px; }

.notice { padding: 18px 20px; background: var(--sci-pale); border-left: 4px solid var(--sci); }
.notice h2 { color: var(--sci-deep); font-size: 22px; margin-bottom: 6px; }
.notice p { margin: 6px 0; }

/* ---------- Pédantix ---------- */
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; align-items: start; }
.play-grid > aside { position: sticky; top: 16px; }
.panel { min-width: 0; padding: 22px; border: 1px solid var(--line); background: #fff; }
.panel h2 { font-size: 22px; color: var(--sci); text-transform: uppercase; }
.guess-panel { position: sticky; top: 0; z-index: 3; margin-bottom: 22px; background: var(--mist); border: 0; border-top: 4px solid var(--sci); }
.guess-panel label { display: block; margin-bottom: 6px; font-size: 15px; }
.guess-row { display: flex; gap: 8px; }
.guess-row .btn { flex: none; }
.article-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--line-soft); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.badge { color: var(--sci); }
.panel .article-title { margin: 0 0 16px; font-size: 26px; font-weight: 700; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.article-body { font-size: 16px; line-height: 2.1; white-space: pre-wrap; overflow-wrap: anywhere; }
.mask { display: inline-block; max-width: 100%; height: 1.3em; padding: 0 2px; overflow: hidden; border: 0; border-radius: 0; background: #222; color: transparent; font: inherit; font-weight: 400; line-height: 1.3em; text-overflow: ellipsis; white-space: nowrap; vertical-align: -.2em; user-select: none; }
.mask.has-hint { color: #d0d0d0; font-style: italic; }
.mask:hover { box-shadow: 0 0 0 2px #999; }
.word-detail { position: sticky; bottom: 0; min-height: 3em; margin: 20px 0 0; padding: 10px 12px; background: var(--mist); border: 1px solid var(--line-soft); font-size: 13px; color: #444; overflow-wrap: anywhere; }
.legend { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 13px; line-height: 1.6; color: var(--muted); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.stats div { padding: 10px 0; border-top: 2px solid var(--sci); }
.stats strong { display: block; font-size: 28px; line-height: 1.2; color: var(--sci); }
.stats small { font-size: 12px; color: var(--muted); }
.history { max-height: 420px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.history li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.try-number { font-size: 12px; color: var(--muted); }
.try-word { overflow-wrap: anywhere; }
.score { max-width: 110px; padding: 2px 6px; background: var(--mist); font-size: 11px; color: #444; text-align: right; }
.score.hot { background: var(--sci-pale); color: var(--sci-deep); font-weight: 700; }
.win { margin-bottom: 22px; padding: 18px 20px; background: var(--sci-pale); border-left: 4px solid var(--sci); }
.win strong { font-size: 22px; color: var(--sci-deep); }
.win p { margin: 6px 0; }
.win-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* ---------- SUTOM ---------- */
.motus-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.motus-layout > * { min-width: 0; }
.motus-board { max-width: 100%; overflow-x: auto; padding-bottom: 8px; }
.motus-row { display: flex; gap: 4px; width: max-content; margin: 4px auto; }
.motus-cell { display: grid; place-items: center; flex: none; width: 40px; height: 44px; border: 1px solid #b9b9b9; background: #fafafa; font-size: 22px; font-weight: 700; color: var(--ink); }
.motus-cell.hint { color: #a9a9a9; }
.motus-cell.correct, .motus-key.correct, .motus-legend-correct { background: var(--sci); border-color: var(--sci); color: #fff; }
.motus-cell.present, .motus-key.present, .motus-legend-present { background: var(--present); border-color: #d1aa2c; color: #2d2810; }
.motus-cell.absent, .motus-key.absent, .motus-legend-absent { background: var(--absent); border-color: var(--absent); color: #fff; }
.motus-keyboard { margin-top: 18px; }
.motus-key-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.motus-key { flex: 1; min-width: 26px; max-width: 44px; padding: 9px 2px; border: 1px solid var(--line); border-radius: 2px; background: #eee; color: var(--ink); font-size: 15px; font-weight: 700; }
.motus-key-row .btn { margin-top: 6px; }
.motus-page input { text-transform: uppercase; letter-spacing: .1em; }
.legend-colors { display: flex; flex-wrap: wrap; gap: 14px; }
.legend-colors i { display: inline-block; width: 11px; height: 11px; margin-right: 5px; }

/* ---------- Administration ---------- */
.admin-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; align-items: start; }
.admin-layout h2 { margin-bottom: 18px; }
.admin-layout aside h3 { margin-top: 24px; font-size: 19px; }
.admin-layout aside p { font-size: 15px; line-height: 1.7; }
.importer { margin-bottom: 18px; padding: 14px; background: var(--sci-pale); }
.importer .field { margin: 0; }
.inline-form { display: flex; gap: 8px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.schedule { margin: 0; padding: 0; list-style: none; }
.schedule li { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.schedule strong { display: block; overflow-wrap: anywhere; }
.schedule small { display: block; color: var(--muted); }
.schedule .btn { margin-top: 8px; }
.library-content { margin-top: 34px; }
.library-preview { margin-top: 14px; }
.library-preview details { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.library-preview summary { cursor: pointer; color: var(--sci); font-weight: 700; }
.library-preview details p { font-size: 14px; white-space: pre-wrap; }
.library-preview details > div { max-height: 400px; overflow: auto; padding: 14px; background: var(--mist); }

/* ---------- Pied de page ---------- */
.site-foot { margin-top: auto; background: var(--sci); color: #fff; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; padding: 36px 0 30px; }
.site-foot h2 { margin-bottom: 12px; font-size: 19px; font-weight: 700; }
.site-foot p { margin: 0; line-height: 1.6; }
.site-foot ul { margin: 0; padding: 0; list-style: none; }
.site-foot li { padding: 2px 0; }
.site-foot .foot-links { margin-top: 10px; }
.site-foot a, .site-foot button { padding: 0; border: 0; background: none; color: #fff; text-decoration: none; }
.site-foot a:hover, .site-foot button:hover { color: #fff; text-decoration: underline; }
.foot-bottom { padding: 12px 0; background: var(--sci-dark); font-size: 13px; }

/* ---------- Boîte de dialogue des règles ---------- */
dialog { width: min(640px, calc(100% - 28px)); max-height: 86vh; overflow: auto; padding: 32px; border: 0; border-top: 5px solid var(--sci); background: #fff; color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, .55); }
dialog h2 { margin: 8px 0 12px; font-size: 28px; color: var(--ink); }
dialog h3 { margin: 22px 0 6px; font-size: 19px; color: var(--sci); text-transform: uppercase; }
.dialog-close { position: absolute; top: 8px; right: 10px; }
.dialog-close button { width: 36px; height: 36px; border: 0; background: none; color: var(--ink); font-size: 26px; }
.dialog-close button:hover { background: var(--mist); }
.rules-list { padding-left: 20px; }
.rules-list li { padding: 4px 0; }
.credits { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.load { padding: 50px 0; color: var(--muted); }

/* ---------- Adaptations ---------- */
@media (max-width: 1100px) {
  .calendar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .asso-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .intro-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; }
}
@media (max-width: 900px) {
  .intro-layout, .play-grid, .admin-layout, .motus-layout { grid-template-columns: 1fr; }
  .play-grid > aside { position: static; }
  .motus-layout > div { grid-row: 1; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .page-head { flex-direction: column; gap: 16px; }
  .page-head .countdown { min-width: 0; width: 100%; }
}
@media (max-width: 740px) {
  .wrap { width: calc(100% - 32px); }
  body { font-size: 16px; }
  .topbar-inner { min-height: 54px; }
  .logo-text { font-size: 11px; }
  .logo-mark { width: 40px; height: 40px; font-size: 11px; }
  .topnav { gap: 14px; }
  .topnav a, .topnav button { font-size: 12px; }
  .band-inner { min-height: 0; padding: 34px 0 16px; }
  .band-link { top: 8px; left: 0; right: auto; font-size: 12px; }
  .subnav a, .subnav button { padding: 8px 10px; }
  .today-grid { grid-template-columns: 1fr; }
  .calendar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .asso-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .asso-logo { max-width: 72px; height: 72px; }
  .asso-section { font-size: 12px; }
  .countdown-time { font-size: 30px; }
  .guess-panel { padding: 12px; margin-bottom: 16px; }
  .guess-panel label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .panel { padding: 16px; }
  .article-body { font-size: 15px; }
  .panel .article-title { font-size: 22px; }
  .field-pair { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
  .subnav button { margin-left: 0; }
  .logo-text, .topnav-ext { display: none; }
  .motus-cell { width: 30px; height: 36px; font-size: 18px; }
  .motus-row { gap: 3px; }
  .motus-key { min-width: 22px; padding: 8px 1px; }
  .today-card { padding: 18px; }
  .today-card .btn { align-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
