:root {
  color-scheme: light;
  --page: #f8f6ee;
  --ink: #263d32;
  --accent: #875035;
  --gold: #a78042;
  --rule: #e5dcc8;
  --serif: Baskervville, Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--page);
  background-image: linear-gradient(#f8f6eeb8, #f8f6eeb8), url("./fond-celeste.webp");
  background-size: auto, 370px 370px;
  font: 15px/1.5 var(--sans);
}
h1, h2, h3, p { margin: 0; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.frame {
  width: min(720px, calc(100% - 28px));
  margin: clamp(14px, 4vw, 32px) auto 28px;
  border-radius: 18px;
  background-color: #fffdf8;
}
.site-rights { max-width: 540px; margin: 14px auto 0; padding: 8px 12px; border-radius: 12px; background: #fffdf8d9; color: #536157; text-align: center; font-size: 12px; }
.site-visitors { margin-bottom: 6px; color: #364c40; font-weight: 650; font-variant-numeric: tabular-nums; }
.calendar-source { margin-top: 5px; }
.calendar-source a { color: inherit; }
.fortune {
  --wheel-metal: #b28a48;
  margin-top: 16px;
  padding: clamp(16px, 4vw, 26px) clamp(14px, 4vw, 32px);
  border: 1px solid #dfd2b7;
  border-radius: 18px;
  background: #fbf4e7;
  text-align: center;
}
.fortune > header h2 { font: 400 clamp(29px, 6vw, 38px)/1.1 var(--serif); }
.fortune > header > p, .wheel-intro { margin-top: 4px; color: #70442c; }
.wheel-intro { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 2px 12px; }
.fortune-content {
  display: grid;
  grid-template-columns: clamp(132px, 29vw, 172px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 4vw, 24px);
  max-width: 555px;
  margin: 15px auto 0;
  text-align: left;
}
.wheel-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 7;
}
.wheel-stage::before {
  position: absolute;
  z-index: 3;
  top: 1%;
  left: 50%;
  width: 15%;
  height: 11%;
  transform: translateX(-50%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(115deg, #e2c583, var(--wheel-metal));
  content: "";
}
.wheel-support {
  position: absolute;
  inset: 68% 28% 7%;
}
.wheel-support::before, .wheel-support::after {
  position: absolute;
  inset: 0 auto 0 8%;
  width: 4px;
  border-radius: 2px;
  background: var(--wheel-metal);
  transform: skewX(-15deg);
  content: "";
}
.wheel-support::after { inset: 0 8% 0 auto; transform: skewX(15deg); }
.wheel-pedestal {
  position: absolute;
  inset: auto 7% 0;
  height: 12.5%;
  border: 2px solid var(--wheel-metal);
  border-radius: 15px 15px 3px 3px;
  background: repeating-linear-gradient(135deg, #fbf2db 0px 10px, #ead8ab 11px 12px, #fbf2db 13px 22px);
}
.wheel-pedestal::before {
  position: absolute;
  inset: -8px 10% auto;
  height: 8px;
  border: 2px solid var(--wheel-metal);
  border-radius: 9px 9px 0 0;
  background: #f8efda;
  content: "";
}
.wheel-frame {
  position: absolute;
  z-index: 1;
  top: 6%;
  width: 100%;
  aspect-ratio: 1;
  border: 3px solid var(--wheel-metal);
  border-radius: 50%;
  background: linear-gradient(150deg, #fffcf1, #f2e5c8);
  box-shadow: inset 0 0 0 2px #f8efd5, 0 2px 5px #654c2824;
}
.wheel-dial {
  position: absolute;
  inset: 5%;
  border: 2px solid var(--wheel-metal);
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  background: var(--wheel-fill, #f3e6cb);
}
.wheel-dial::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from var(--wheel-spoke-start, -30.5deg), #ac8849 0deg 1deg, transparent 1deg var(--wheel-step, 60deg));
  content: "";
}
.wheel-dial::after {
  position: absolute;
  z-index: 3;
  inset: 43%;
  border: 2px solid var(--wheel-metal);
  border-radius: 50%;
  background: radial-gradient(circle, #a78042 0 30%, #fdf0d1 32% 100%);
  content: "";
}
.wheel-sector {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  align-content: start;
  justify-items: center;
  padding-top: 10%;
  transform: rotate(var(--sector-angle));
}
.wheel-sector > span {
  transform: rotate(calc(-1 * var(--sector-angle)));
  color: #40394a;
  font: 700 clamp(12px, 3.5vw, 17px)/1 var(--sans);
}
.wheel-discount {
  color: #8c621c;
  font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", var(--sans);
  font-weight: 800;
  letter-spacing: -.035em;
  white-space: nowrap;
}
@supports (background-clip: text) {
  .wheel-discount {
    background: linear-gradient(145deg, #ffea7e 12%, #dfad39 46%, #ffe87b 60%, #bb831e 96%);
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: .35px #8c621c;
  }
}
.wheel-prizes { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.wheel-prizes li { display: flex; align-items: center; gap: 7px; }
.wheel-badge {
  display: grid;
  flex: 0 0 28px;
  height: 26px;
  place-items: center;
  border: 1px solid #0002;
  border-radius: 50%;
  color: #4a3454;
  font-size: 12px;
  font-weight: 700;
}
.wheel-badge > .wheel-discount { font-size: 11px; }
.wheel-question-marks {
  display: flex;
  gap: 2px;
}
.wheel-sector:has(.wheel-question-marks, .wheel-prize-icon),
.wheel-badge :is(.wheel-question-marks, .wheel-prize-icon) {
  mix-blend-mode: multiply;
}
.wheel-question-icon {
  width: 10px;
  height: 18px;
  background: url("./roue-point-interrogation.png") center 78% / 16px auto no-repeat;
}
.wheel-prize-icon {
  display: block;
}
.wheel-general-icon, .wheel-complete-icon {
  width: 26px;
  filter: brightness(.68) contrast(3);
}
.wheel-general-icon {
  height: 16px;
  background: url("./roue-tirage-general.png") center 39% / 41px auto no-repeat;
}
.wheel-sector .wheel-general-icon {
  width: 34px;
  height: 20px;
  background-size: 54px auto;
}
.wheel-complete-icon {
  height: 20px;
  background: url("./roue-tirage-complet.png") center 67% / 28px auto no-repeat;
}
.wheel-sector .wheel-complete-icon {
  width: 34px;
  height: 26px;
  background-size: 36px auto;
}
.wheel-crystal-icon {
  width: 22px;
  height: 24px;
  background: url("./roue-lithotherapie.png") 15% 20% / 25px auto no-repeat;
}
.wheel-sector .wheel-crystal-icon {
  width: 28px;
  height: 30px;
  background-size: 32px auto;
}
.wheel-rules, .wheel-status { color: #526155; font-size: 13px; }
.wheel-status:not(:empty) { margin-top: 10px; }
#wheel-sign-in { margin-top: 10px; }
.fortune-button {
  min-height: 44px;
  margin-top: 10px;
  padding: 7px 12px;
  border: 1px solid #534060;
  border-radius: 8px;
  background: #534060;
  color: #fffdf8;
  font-weight: 650;
  cursor: pointer;
}
.fortune-button:hover:not(:disabled) { background: #654e73; }
.fortune-button:disabled { opacity: .7; cursor: wait; }
.wheel-result {
  width: min(100%, 535px);
  margin: 12px auto 0;
  padding: 10px 13px;
  border: 1px solid #dfd2b7;
  border-radius: 10px;
  background: #fffdf7;
}
.wheel-winner { font-weight: 650; }
.wheel-result a { display: inline-grid; min-height: 44px; align-items: center; color: #70442c; }
@media (max-width: 470px) {
  .fortune-content { grid-template-columns: 1fr; }
  .wheel-stage { width: 145px; margin-inline: auto; }
}
.music-widget select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7ccb4;
  border-radius: 8px;
  padding: 5px 8px;
  background: #fffdf8;
  font-size: 16px;
}

.music-widget {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 6px 10px;
  width: min(100%, 540px);
  margin: 12px auto 0;
  padding: 9px 12px;
  border: 1px solid #d8d9c7;
  border-radius: 12px;
  background: #eef2e8;
  text-align: left;
}
.music-widget h2 { grid-column: 1 / -1; font: 400 21px/1.2 var(--serif); }
.music-widget audio { width: 100%; min-width: 0; }
@media (max-width: 480px) {
  .music-widget { grid-template-columns: 1fr; }
}
.guestbook {
  margin-top: 16px;
  padding: clamp(16px, 4vw, 28px) clamp(14px, 5vw, 38px);
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: #fffdf7;
}
.guestbook-intro {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 4vw, 30px);
  margin-bottom: 14px;
}
.guestbook-intro img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.guestbook-intro h2 { margin-bottom: 6px; font: 400 clamp(32px, 6vw, 46px)/1.05 var(--serif); }
.guestbook-intro p { color: #536157; }
.guestbook-intro p + p { margin-top: 7px; }
.guestbook-intro a { color: #70442c; overflow-wrap: anywhere; }
.guestbook-form, .guestbook-entries, .guestbook-status {
  width: min(100%, 540px);
  margin-inline: auto;
}
.guestbook-form { display: grid; gap: 6px; }
.guestbook-form label { margin-top: 5px; font-weight: 650; }
.guestbook-form label span, .guestbook-form p, .guestbook-entries time, .guestbook-empty {
  color: #536157;
  font-size: 13px;
  font-weight: 400;
}
.guestbook-form input, .guestbook-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #d7ccb4;
  border-radius: 8px;
  background: #fffefa;
  color: inherit;
  font: 16px/1.45 var(--sans);
}
.guestbook-form input { max-width: 320px; }
.guestbook-form textarea { resize: vertical; }
.guestbook-submit, .guestbook-more {
  min-height: 44px;
  width: fit-content;
  margin-top: 5px;
  padding: 7px 12px;
  border: 1px solid #29483b;
  border-radius: 8px;
  background: #29483b;
  color: #fffdf8;
  font-weight: 600;
  cursor: pointer;
}
.guestbook-more { display: block; margin: 12px auto 0; background: transparent; color: #29483b; }
.guestbook-submit:hover:not(:disabled) { background: #39594a; }
.guestbook-more:hover:not(:disabled) { background: #eaf0e7; }
.guestbook-submit:disabled, .guestbook-more:disabled { opacity: .65; cursor: wait; }
.guestbook-status:not(:empty) { margin-top: 12px; font-size: 14px; }
.guestbook-entries { display: grid; gap: 9px; margin-top: 17px; }
.guestbook-entries article {
  padding: 13px 14px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: #f8f3e9;
  overflow-wrap: anywhere;
}
.guestbook-entries header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.guestbook-entries article p { margin-top: 5px; white-space: pre-wrap; }
@media (max-width: 460px) {
  .guestbook-intro { grid-template-columns: 1fr; gap: 6px; text-align: center; }
  .guestbook-intro img { width: min(100%, 240px); margin-inline: auto; }
}
.banner { padding: 5px 8px; border: 1px solid var(--rule); border-radius: 16px; background: #fff; }
.banner img { display: block; width: min(100%, 470px); height: auto; margin-inline: auto; }
.table {
  --table-padding-inline: clamp(12px, 4vw, 24px);
  margin-top: 12px;
  padding: clamp(17px, 4vw, 28px) var(--table-padding-inline);
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: #fffdf8;
  text-align: center;
}
h1 { font: 400 clamp(32px, 7vw, 57px)/1.05 var(--serif); letter-spacing: -.055em; text-wrap: balance; }
h1 em { font-weight: 400; color: var(--accent); }
.signature { margin-top: 8px; color: #536157; font-size: 13px; }
.cover {
  margin: 12px calc(-1 * var(--table-padding-inline)) 0;
  padding: 6px var(--table-padding-inline) 1px;
  background: #fffdf8;
  font-size: 13px;
}
summary { cursor: pointer; }
.cover img { display: block; width: min(100%, 360px); height: auto; margin: 8px auto 10px; border: 1px solid var(--rule); border-radius: 8px; }
.settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 10px;
  width: min(100%, 540px);
  margin: 6px auto 0;
  text-align: left;
}
.settings-field { min-width: 0; }
.oracle-field { width: min(100%, 540px); margin: 0 auto 16px; text-align: left; }
.settings-field > label, .method legend { display: block; margin-bottom: 4px; padding: 0; color: #536157; font-size: 12px; font-weight: 640; }
.oracle-field > label { display: flex; justify-content: space-between; }
.oracle-field label span { font-weight: 450; }
.consultation {
  width: min(100%, 540px);
  margin: 0 auto 16px;
  padding: 13px 14px;
  border: 1px solid #d8d9c7;
  border-radius: 12px;
  background: #eef2e8;
  text-align: left;
}
.consultation h2 { font: 400 clamp(22px, 5vw, 28px)/1.15 var(--serif); }
.consultation p { margin-top: 6px; }
.consultation-status { color: #536157; font-weight: 650; }
.consultation-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.consultation-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid #c6d1c2;
  border-radius: 8px;
  background: #fffdf8;
  color: #29483b;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.consultation-button:hover:not(:disabled) { background: #e5ecdf; }
.consultation-button:disabled, .daily-toggle:disabled { opacity: .65; cursor: default; }
#consultation-retry, #consultation-sign-in { margin-top: 8px; }
#draw-start { grid-column: 1 / -1; justify-self: start; }
.daily {
  width: min(100%, 540px);
  margin: 0 auto 18px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #fffdf8;
  text-align: left;
}
.daily-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.daily h2 { font: 400 clamp(20px, 5vw, 25px)/1.2 var(--serif); }
.daily time { color: #536157; font-size: 13px; }
.daily-toggle {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #29483b;
  border-radius: 8px;
  background: #29483b;
  color: #fffdf8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.daily-toggle:hover { background: #39594a; }
.daily-notice:not(.sr-only) { padding: 0 14px 12px; color: #70442c; font-size: 14px; }
.daily-card { padding: 12px 14px 14px; border-top: 1px solid var(--rule); }
.daily-reading { display: grid; grid-template-columns: clamp(88px, 27%, 134px) minmax(0, 1fr); gap: 14px; align-items: center; }
.daily-reading img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 6px; }
.daily-reading h3 { color: var(--accent); font: 400 clamp(22px, 5vw, 30px)/1.15 var(--serif); overflow-wrap: anywhere; }
.daily-reading p { margin-top: 5px; }
.daily-meaning { margin-top: 8px; }
.daily-meaning summary { min-height: 44px; padding: 10px 0; font-weight: 600; }
.daily-meaning p + p { margin-top: 8px; }
.daily-widgets {
  display: grid;
  align-items: start;
  gap: 10px;
  width: min(100%, 540px);
  margin: 0 auto 20px;
  text-align: left;
}
@media (min-width: 580px) {
  .daily-widgets { grid-template-columns: 1fr 1fr; }
}
.today-calendar {
  grid-column: 1 / -1;
  padding: 10px 13px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #fffdf8;
  font-size: 14px;
}
.today-calendar time, .today-calendar strong { font-weight: 650; }
.today-calendar time { font-variant-numeric: tabular-nums; }
.today-calendar p + p { margin-top: 3px; }
.lucky-number, .daily-horoscope {
  grid-column: 1 / -1;
  border: 1px solid #d8d9c7;
  border-radius: 12px;
  background: #eef2e8;
}
.lucky-number summary, .daily-horoscope summary {
  min-height: 44px;
  padding: 10px 13px;
  font-weight: 650;
}
.lucky-reading { display: grid; gap: 8px; padding: 0 13px 12px; }
.lucky-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lucky-die {
  position: relative;
  flex: 0 0 auto;
  width: clamp(66px, 15vw, 88px);
  aspect-ratio: 1;
}
.lucky-die img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lucky-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff2ca;
  font: 700 clamp(19px, 4vw, 24px)/1 var(--serif);
  text-shadow: 0 1px 2px #281426, 0 0 5px #281426;
}
.lucky-roll {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #534060;
  border-radius: 8px;
  background: #534060;
  color: #fffdf8;
  font-weight: 650;
  cursor: pointer;
}
.lucky-roll:hover:not(:disabled) { background: #654e73; }
.lucky-roll:disabled { opacity: .7; cursor: wait; }
.lucky-reading h3 { margin-bottom: 3px; color: #29483b; font-size: 15px; }
.lucky-reading p { font-size: 14px; }
.cookie-stage {
  --paper-width: min(48vw, 196px);
  --cookie-width: clamp(80px, 29vw, 140px);
  --cookie-separation: calc(var(--paper-width) / 2 - 4px);
  position: relative;
  display: grid;
  container-type: inline-size;
  width: min(100%, 382px);
  min-height: 126px;
  margin: 2px auto 0;
  padding-block: 10px;
  place-items: center;
  text-align: center;
}
@supports (width: 1cqi) {
  .cookie-stage { --paper-width: min(57cqi, 196px); --cookie-width: clamp(70px, 33cqi, 140px); }
}
.fortune-cookie {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  align-content: end;
  justify-items: center;
  padding: 0 6px 5px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #71462f;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.fortune-cookie:hover { text-decoration: underline; }
.cookie-art {
  position: absolute;
  z-index: 2;
  inset: calc(50% - 12px) auto auto 50%;
  width: var(--cookie-width);
  aspect-ratio: 301 / 200;
  transform: translate(-50%, -50%);
  transition: top .38s ease-out;
  pointer-events: none;
}
.cookie-stage.is-cracked .cookie-art { top: 50%; }
.cookie-half {
  position: absolute;
  inset: 0;
  background: url("./cookie-fortune.webp") center / contain no-repeat;
  transition: transform .38s ease-out;
}
.cookie-left { clip-path: polygon(0 0, 51% 0, 48% 37%, 53% 55%, 49% 72%, 51% 100%, 0 100%); }
.cookie-right { clip-path: polygon(51% 0, 100% 0, 100% 100%, 51% 100%, 49% 72%, 53% 55%, 48% 37%); }
.cookie-stage.is-cracked .cookie-left { transform: translateX(calc(-1 * var(--cookie-separation))) rotate(-10deg); }
.cookie-stage.is-cracked .cookie-right { transform: translateX(var(--cookie-separation)) rotate(10deg); }
.cookie-phrase {
  position: relative;
  z-index: 1;
  width: var(--paper-width);
  padding: 8px 13px;
  border: 1px solid #e8d7b6;
  border-radius: 2px;
  background: linear-gradient(115deg, #fffbef, #fffdf7 34%, #f6e9cf);
  box-shadow: 1px 3px 7px #71553730;
  color: #764239;
  font: italic 400 16px/1.3 var(--serif);
  transform: rotate(-3deg);
}
.cookie-stage.is-cracked .cookie-phrase { animation: unfold-cookie-paper .43s ease-out both; }
@keyframes unfold-cookie-paper {
  0%, 22% { opacity: 0; transform: rotate(0) scaleX(.55); }
  100% { opacity: 1; transform: rotate(-3deg) scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-art, .cookie-half { transition: none; }
  .cookie-stage.is-cracked .cookie-phrase { animation: none; }
}
.daily-horoscope { border-color: #ded1e5; background: #f3edf5; }
.horoscope-controls { display: grid; gap: 4px; padding: 0 13px 10px; }
.horoscope-controls label { font-size: 13px; font-weight: 650; }
.horoscope-controls select {
  width: min(100%, 256px);
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid #cabcce;
  border-radius: 7px;
  background: #fffdf8;
  font-size: 16px;
}
.horoscope-reading {
  display: grid;
  grid-template-columns: min(23%, 96px) minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 0 13px 12px;
  font-size: 14px;
}
.horoscope-drawing {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}
.horoscope-reading h3 { margin-bottom: 3px; color: #534060; font-size: 15px; }
.daily-widgets h2 { font: 400 21px/1.2 var(--serif); }
.moon-widget, .quote-widget { border: 1px solid var(--rule); border-radius: 12px; }
.moon-widget {
  padding: 12px 13px 0;
  background: linear-gradient(135deg, #292540, #3b3153);
  color: #fff8e9;
}
.moon-widget :focus-visible { outline-color: #f4d59d; }
.moon-current { display: flex; align-items: center; gap: 11px; }
.moon-current p { margin-top: 3px; color: #f4d59d; font-size: 13px; }
.moon-disk {
  --moon-dark: #302d43;
  --moon-light: #f4d59d;
  --moon-left: var(--moon-dark);
  --moon-right: var(--moon-light);
  position: relative;
  display: block;
  flex: 0 0 38px;
  height: 38px;
  border: 1px solid #f4d59d80;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--moon-left) 50%, var(--moon-right) 50%);
}
.moon-disk::after {
  position: absolute;
  inset: 0 22%;
  border-radius: 50%;
  background: var(--moon-center, transparent);
  content: "";
}
.moon-disk[data-phase="0"] { --moon-right: var(--moon-dark); }
.moon-disk[data-phase="4"] { --moon-left: var(--moon-light); }
.moon-disk:is([data-phase="5"], [data-phase="6"], [data-phase="7"]) {
  --moon-left: var(--moon-light);
  --moon-right: var(--moon-dark);
}
.moon-disk:is([data-phase="1"], [data-phase="7"]) { --moon-center: var(--moon-dark); }
.moon-disk:is([data-phase="3"], [data-phase="5"]) { --moon-center: var(--moon-light); }
.moon-upcoming summary { min-height: 44px; padding: 11px 0; color: #fff2d7; font-size: 13px; }
.moon-upcoming ol { margin: 0; padding: 0 0 8px; list-style: none; }
.moon-upcoming li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 8px;
  padding: 5px 0;
  border-top: 1px solid #ffffff28;
  font-size: 13px;
}
.moon-upcoming time { color: #f4d59d; }
.quote-widget { min-height: 108px; padding: 12px 14px; background: #fcf4e5; }
.quote-widget h2 { color: #6d4730; }
.settings-field select, .number-picker {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7ccb4;
  border-radius: 8px;
  padding: 4px 6px;
  background: #fffdf8;
  font-size: 16px;
}
.method { min-width: 0; margin: 0; padding: 0; border: 0; }
.method-options { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.method-options label { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 2px 4px; border: 1px solid #d7ccb4; border-radius: 8px; background: #fffdf8; font-size: 12px; cursor: pointer; }
.method-options label:has(:checked) { border-color: #9aab96; background: #eaf0e7; }
.method-options input { margin: 0; accent-color: #29483b; }
.packet { width: min(100%, 540px); margin: 13px auto 0; padding: 7px 8px; border: 1px solid var(--rule); border-radius: 12px; background: #fffdf8; }
.packet-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; }
.reader-table { width: 100%; }
.reader-welcome {
  display: grid;
  grid-template-columns: clamp(64px, 19%, 106px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(12px, 3vw, 18px);
  width: min(100%, 540px);
  margin: 0 auto 12px;
  color: #4a3a32;
  text-align: left;
  font-size: 14px;
}
.welcome-portrait {
  position: relative;
  overflow: hidden;
  border-radius: 11px;
  outline: 1px solid #e0cda8;
}
.welcome-portrait img { display: block; width: 100%; height: auto; }
.welcome-lips {
  position: absolute;
  inset: 0;
  background: url("./accueil-parole.webp") center / 100% 100% no-repeat;
  opacity: 0;
}
.welcome-portrait.is-speaking .welcome-lips { animation: welcome-speak 1.6s linear both; }
@keyframes welcome-speak {
  0%, 19%, 38%, 61%, 84%, 100% { opacity: 0; }
  8%, 29%, 50%, 74%, 91% { opacity: 1; }
}
.welcome-bubble {
  position: relative;
  padding: 10px 13px;
  border: 1px solid #e0cda8;
  border-radius: 11px;
  background: #fcf4e5;
}
.welcome-bubble::before {
  position: absolute;
  top: 20px;
  left: -6px;
  width: 10px;
  height: 10px;
  border: solid #e0cda8;
  border-width: 0 0 1px 1px;
  background: inherit;
  content: "";
  transform: rotate(45deg);
}
.welcome-bubble + .welcome-bubble { margin-top: 8px; }
.welcome-bubble strong { display: block; margin-bottom: 3px; color: #6d4730; }
.welcome-conversation { display: flex; align-items: flex-start; gap: 6px; }
#welcome-messages { flex: 1; min-width: 0; }
#welcome-messages.is-advancing { display: grid; }
.is-advancing .welcome-bubble { grid-area: 1 / 1; align-self: start; margin: 0; }
.is-advancing .welcome-bubble[aria-hidden="true"] { visibility: hidden; }
.is-advancing .welcome-bubble[aria-hidden="false"] { animation: welcome-fade-in 240ms ease-out both; }
@keyframes welcome-fade-in { from { opacity: 0; } }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.welcome-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 3px;
  padding-inline: 10px;
  border: 1px solid #e0cda8;
  border-radius: 7px;
  background: #fffdf8;
  color: #70442c;
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
}
.welcome-button:hover { background: #fcf4e5; }
.welcome-advance {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 23px;
  line-height: 1;
}
.reader-dialog {
  --dialog-padding: clamp(14px, 4vw, 26px);
  width: min(calc(100% - 24px), 38rem);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #dacbad;
  border-radius: 16px;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 0 12px 40px #263d3233;
}
.reader-dialog::backdrop { background: #263d327a; }
.reader-dialog-header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px var(--dialog-padding);
  border-bottom: 1px solid var(--rule);
  background: #fbf4e7;
}
.reader-dialog-header h2 { margin: 0; font: 400 clamp(26px, 6vw, 38px)/1.15 var(--serif); }
.reader-dialog-close {
  min-height: 44px;
  padding-inline: 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #70442c;
  font-weight: 650;
  cursor: pointer;
}
.reader-dialog-close:hover { background: #f5ead4; }
.about-content {
  display: grid;
  grid-template-columns: clamp(58px, 17vw, 105px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(10px, 3vw, 16px);
  padding: var(--dialog-padding);
}
.about-content img { display: block; width: 100%; height: auto; border-radius: 8px; }
.about-content p + p { margin-top: .65em; }
.rates-content { padding: 5px var(--dialog-padding) 16px; }
.rates-list { margin: 0; }
.rates-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}
.rates-list dd { margin: 0; color: #70442c; font-weight: 700; font-variant-numeric: tabular-nums; }
.rates-referral { margin-top: 12px; }
.rates-appointment { margin-top: 12px; }
.rates-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin-top: 5px;
}
.rates-contact a { display: inline-grid; min-height: 44px; align-items: center; color: #345747; overflow-wrap: anywhere; }
.rates-original { border-top: 1px solid var(--rule); }
.rates-original summary { min-height: 44px; padding: 10px 0; color: #70442c; font-weight: 650; }
.rates-original img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 8px; }
.appointment-content { padding: var(--dialog-padding); }
.appointment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.appointment-wide { grid-column: 1 / -1; }
.appointment-field { min-width: 0; }
.appointment-field label { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 650; }
.appointment-field :is(input, select, textarea) {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid #cbcdbb;
  border-radius: 8px;
  background: #fffefa;
  color: inherit;
  font: inherit;
  font-size: 16px;
}
.appointment-field textarea { resize: vertical; }
.appointment-note { color: #536157; font-size: 14px; }
#appointment-birthday-hint { margin-top: 4px; }
.appointment-submit { grid-column: 1 / -1; justify-self: start; }
.appointment-result { color: #29483b; font-weight: 650; }
.appointment-result:empty, .appointment-selection:empty { display: none; }
.appointment-calendar, .appointment-planning { padding: 0 10px 10px; border: 1px solid #d8d9c7; border-radius: 8px; background: #eef2e8; }
:is(.appointment-calendar, .appointment-planning) > summary { min-height: 44px; padding-block: 10px; font-weight: 650; }
:is(.appointment-calendar, .appointment-planning):not([open]) { padding-bottom: 0; }
.appointment-planning { margin-bottom: 14px; }
.appointment-month {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-block: 8px;
  text-align: center;
  font-weight: 650;
}
.appointment-month button { justify-content: center; min-width: 44px; padding: 4px; font-size: 22px; }
.appointment-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-block: 7px; }
.appointment-days > span, .appointment-days > button { display: grid; min-height: 39px; place-items: center; }
.appointment-days > span[aria-hidden] { color: #747a6d; }
.appointment-days > .appointment-weekday { min-height: 24px; font-size: 12px; font-weight: 650; }
.appointment-days > button {
  min-height: 44px;
  padding: 3px;
  border: 1px solid #c6d1c2;
  border-radius: 8px;
  background: #fffdf8;
  color: #29483b;
  font-weight: 700;
  cursor: pointer;
}
.appointment-calendar button[aria-pressed="true"] { border-color: #3e5c46; background: #3e5c46; color: #fffdf8; }
.appointment-times { display: flex; flex-wrap: wrap; gap: 7px; margin-block: 7px; }
.appointment-selection { margin-top: 6px; font-weight: 650; }
.appointment-admin-section + .appointment-admin-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.appointment-admin-section h3 { margin-bottom: 6px; font: 400 24px/1.2 var(--serif); }
.appointment-admin-form { margin-block: 10px; }
.appointment-admin-list { display: grid; gap: 8px; margin-block: 6px; }
.appointment-admin-row, .appointment-request { padding: 9px; border: 1px solid var(--rule); border-radius: 8px; background: #f8f6ee; }
.appointment-admin-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.appointment-request h4 { margin: 0 0 5px; }
.appointment-request p { overflow-wrap: anywhere; }
.appointment-request-topic { margin-top: 5px; white-space: pre-wrap; }
@media (max-width: 480px) {
  .appointment-form { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-portrait.is-speaking .welcome-lips,
  .is-advancing .welcome-bubble[aria-hidden="false"] { animation: none; }
}
@media (min-width: 660px) {
  .packet { width: min(100%, 640px); }
}
.packet-visual {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  isolation: isolate;
  border-radius: 9px;
  background: #1f2436;
  box-shadow: inset 0 1px 4px #1a142a40;
}
.reader-stage { position: relative; }
.reader-scene { display: block; width: 100%; height: auto; }
@media (max-width: 550px) {
  .packet-visual { aspect-ratio: 4 / 3; }
  .reader-stage { width: 133.333%; margin-inline-start: -16.6665%; }
}
.gesture {
  --shuffle-duration: 3.24s;
  --cut-duration: 2.48s;
  --spread-duration: 1.76s;
  --draw-duration: .78s;
  --arm-easing: cubic-bezier(.37, .12, .63, .88);
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pile, .mixed-packet, .ribbon-packet, .draw-card, .overhand-packet, .overhand-transfer, .cut-packet {
  position: absolute;
  top: 81%;
  left: 50%;
  width: clamp(31px, 9%, 54px);
  aspect-ratio: 4 / 5;
  border: 1px solid #9e825a;
  border-radius: 5px;
  background: #fff var(--packet-back, url("./cartes/verso.webp")) center / contain no-repeat;
  transform: translate(-50%, -50%) translateY(var(--rise, 0px)) perspective(180px) rotateX(38deg);
  box-shadow: 0 3px 0 #cfbc97, 0 5px 8px #0d071773;
}
.pile-left { --rise: 3px; --depth: var(--last-depth, 5px); }
.pile-right { --rise: -2px; --depth: var(--first-depth, 5px); }
.arm {
  position: absolute;
  z-index: 2;
  top: 55%;
  width: 20%;
  aspect-ratio: 384 / 298;
  transform-origin: var(--shoulder) 23%;
  filter: drop-shadow(0 2px 1px #22182155);
}
.arm-left {
  left: 29%;
  --shoulder: 17%;
  --arm-image: url("./avatar-bras-gauche.webp");
  --hand-mask: polygon(55% 48%, 92% 48%, 92% 94%, 58% 94%, 49% 74%, 46% 61%, 49% 52%);
  --held-left: 90%;
  --held-top: 75%;
}
.arm-right {
  left: 50.3%;
  --shoulder: 84%;
  --arm-image: url("./avatar-bras-droit.webp");
  --hand-mask: polygon(45% 48%, 8% 48%, 8% 94%, 42% 94%, 51% 74%, 54% 61%, 51% 52%);
  --held-left: 10%;
  --held-top: 75%;
}
.arm::before, .grip-fingers {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: var(--arm-image) center / contain no-repeat;
}
/* Keep the hand silhouette opaque across the card's edge. */
.grip-fingers {
  z-index: 3;
  clip-path: var(--hand-mask);
  background: var(--arm-image) center / contain no-repeat,
              var(--arm-image) center / contain no-repeat;
}
.overhand-packet, .overhand-transfer { opacity: 0; }
.overhand-packet, .cut-packet {
  z-index: 2;
  left: var(--held-left);
  top: var(--held-top);
  width: 36%;
}
.overhand-catch {
  transform: translate(-50%, -50%) rotate(-7deg) perspective(120px) rotateX(49deg);
}
.overhand-feed {
  transform: translate(-50%, -50%) rotate(6deg) perspective(120px) rotateX(48deg);
}
.cut-packet {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(6deg) perspective(120px) rotateX(48deg);
  box-shadow: 0 var(--depth, 3px) 0 #cfbc97, 0 calc(var(--depth, 3px) + 3px) 8px #0d071773;
}
.cut-first { --depth: var(--first-depth, 5px); }
.cut-last { --depth: var(--last-depth, 5px); }
.draw-grip { --depth: 1px; }
.overhand-transfer { z-index: 1; width: 7%; }
.overhand-transfer + .overhand-transfer { --transfer-delay: 1.13s; }
.overhand-transfer + .overhand-transfer + .overhand-transfer { --transfer-delay: 1.60s; }
.overhand-transfer + .overhand-transfer + .overhand-transfer + .overhand-transfer { --transfer-delay: 2.07s; }
.mixed-packet, .ribbon-packet { opacity: 0; }
.draw-card {
  width: var(--pick-width, 44px);
  height: var(--pick-height, auto);
  background-size: 100% 100%;
  opacity: 0;
}
.packet-visual.has-fan .pile,
.gesture[data-motion="draw"] .pile { visibility: hidden; }
.gesture[data-motion="draw"] { z-index: 2; }
@media (prefers-reduced-motion: no-preference) {
  .gesture[data-motion="overhand"] .pile { animation: gather-packet var(--shuffle-duration) linear; }
  .gesture[data-motion="overhand"] .arm-left { animation: receive-packets var(--shuffle-duration) var(--arm-easing); }
  .gesture[data-motion="overhand"] .arm-right { animation: pass-packets var(--shuffle-duration) var(--arm-easing); }
  .gesture[data-motion="overhand"] .overhand-feed { animation: feed-packet var(--shuffle-duration) linear; }
  .gesture[data-motion="overhand"] .overhand-catch { animation: catch-packet var(--shuffle-duration) linear; }
  .gesture[data-motion="overhand"] .overhand-transfer {
    animation: transfer-packet .34s var(--transfer-delay, .66s) ease-in;
  }
  .gesture[data-motion="overhand"] .mixed-packet { animation: finish-overhand var(--shuffle-duration) ease-in-out; }
  .gesture[data-motion="cut"] .pile {
    box-shadow: 0 var(--depth) 0 #cfbc97, 0 calc(var(--depth) + 3px) 8px #0d071773;
  }
  .gesture[data-motion="cut"] .pile-left { animation: cut-bottom var(--cut-duration) ease-in-out; }
  .gesture[data-motion="cut"] .pile-right { animation: cut-top var(--cut-duration) ease-in-out; }
  .gesture[data-motion="cut"] .arm-left { animation: cut-support var(--cut-duration) var(--arm-easing); }
  .gesture[data-motion="cut"] .arm-right { animation: cut-lift var(--cut-duration) var(--arm-easing); }
  .gesture[data-motion="cut"] .cut-first { animation: carry-cut-first var(--cut-duration) linear; }
  .gesture[data-motion="cut"] .cut-last { animation: carry-cut-last var(--cut-duration) linear; }
  .packet-visual.is-spreading .pile { animation: lift-ribbon var(--spread-duration) linear both; }
  .packet-visual.is-spreading .arm-right { animation: spread-arm var(--spread-duration) var(--arm-easing); }
  .packet-visual.is-spreading .ribbon-packet { animation: guide-ribbon var(--spread-duration) ease-in-out; }
  .packet-visual.is-spreading .fan-card { animation: lay-ribbon-card .29s var(--ribbon-delay, .48s) ease-out both; }
  .gesture[data-motion="draw"] .arm-right { animation: pick-arm var(--draw-duration) var(--arm-easing); }
  .gesture[data-motion="draw"] .draw-grip { animation: take-card var(--draw-duration) linear; }
  .gesture[data-motion="draw"] .draw-card { animation: pick-card var(--draw-duration) ease-in-out; }
}
@keyframes gather-packet {
  0%, 7%, 100% { opacity: 1; }
  16%, 94% { opacity: 0; }
}
@keyframes receive-packets {
  0%, 100% { transform: rotate(0deg); }
  19% { transform: rotate(2deg); }
  28%, 45%, 59%, 74% { transform: rotate(1deg); }
  34%, 50%, 65%, 81% { transform: rotate(3deg); }
}
@keyframes pass-packets {
  0%, 100% { transform: rotate(0deg) scaleX(1); }
  14% { transform: rotate(-5deg) scaleX(.99); }
  23%, 38%, 53%, 68% { transform: rotate(1deg) scaleX(1.015); }
  30%, 45%, 60%, 76% { transform: rotate(-3deg) scaleX(1.025); }
  88% { transform: rotate(-1deg) scaleX(1.015); }
}
@keyframes feed-packet {
  0%, 9% { opacity: 0; }
  13%, 63% { opacity: 1; }
  13% { box-shadow: 0 6px 0 #c8ae85, 0 8px 8px #0d071773; }
  38% { box-shadow: 0 4px 0 #c8ae85, 0 6px 8px #0d071773; }
  54%, 63% { box-shadow: 0 2px 0 #c8ae85, 0 4px 8px #0d071773; }
  69%, 100% { opacity: 0; }
}
@keyframes transfer-packet {
  0% {
    opacity: 1;
    left: 52.5%;
    top: 77%;
    transform: translate(-50%, -50%) rotate(6deg) perspective(120px) rotateX(48deg);
  }
  42% { left: 49.5%; top: 75%; }
  90%, 100% {
    left: 46.6%;
    top: 77%;
    transform: translate(-50%, -50%) rotate(-7deg) perspective(120px) rotateX(49deg);
  }
  90% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes catch-packet {
  0%, 29% { opacity: 0; }
  31%, 81% { opacity: 1; }
  31% { box-shadow: 0 2px 0 #c8ae85, 0 4px 8px #0d071773; }
  74%, 81% { box-shadow: 0 6px 0 #c8ae85, 0 8px 8px #0d071773; }
  87%, 100% { opacity: 0; }
}
@keyframes finish-overhand {
  0%, 79% { opacity: 0; left: 47%; }
  85% { opacity: 1; left: 48%; }
  92%, 94% { opacity: 1; left: 50%; }
  100% { opacity: 0; }
}
@keyframes cut-top {
  0%, 17% { left: 50%; top: 81%; opacity: 1; }
  22%, 40% { opacity: 0; }
  45%, 90% { left: 57%; top: 83%; opacity: 1; }
  100% { left: 50%; top: 81%; opacity: 1; }
}
@keyframes cut-bottom {
  0%, 55% { left: 50%; top: 81%; opacity: 1; }
  60%, 75% { opacity: 0; }
  80%, 90% { left: 57%; top: 79%; z-index: 1; opacity: 1; }
  100% { left: 50%; top: 79%; z-index: 1; opacity: 1; }
}
@keyframes carry-cut-first {
  0%, 17%, 45%, 100% { opacity: 0; }
  22%, 40% { opacity: 1; }
}
@keyframes carry-cut-last {
  0%, 55%, 80%, 100% { opacity: 0; }
  60%, 75% { opacity: 1; }
}
@keyframes cut-support {
  0%, 100% { transform: rotate(0deg); }
  29% { transform: rotate(3deg); }
  67% { transform: rotate(1deg); }
  87% { transform: rotate(3deg); }
}
@keyframes cut-lift {
  0%, 100% { transform: rotate(0deg) scaleX(1); }
  17%, 58% { transform: rotate(-3deg) scaleX(1.025); }
  29%, 68% { transform: rotate(5deg) scaleX(.93); }
  43%, 80% { transform: rotate(-1deg) scaleX(.81); }
  94% { transform: rotate(-1deg) scaleX(1.01); }
}
@keyframes spread-arm {
  0%, 100% { transform: rotate(0deg) scaleX(1); }
  19% { transform: rotate(-3deg) scaleX(1.12); }
  42% { transform: rotate(-7deg) scaleX(.94); }
  66% { transform: rotate(-13deg) scaleX(.84); }
  83% { transform: rotate(-19deg) scaleX(.78); }
}
@keyframes lift-ribbon {
  0%, 10% { opacity: 1; }
  19%, 100% { opacity: 0; }
}
@keyframes guide-ribbon {
  0%, 11%, 91%, 100% { opacity: 0; }
  18%, 80% { opacity: 1; }
}
@keyframes lay-ribbon-card {
  from { opacity: 0; transform: translateX(45%) rotate(-5deg); }
  55% { opacity: 1; }
  to { opacity: 1; transform: translateX(0) rotate(0); }
}
@keyframes pick-arm {
  0%, 100% { transform: rotate(0deg); }
  44% { transform: rotate(-6deg); }
  75% { transform: rotate(3deg); }
}
@keyframes pick-card {
  0% { opacity: 1; left: var(--pick-x); top: var(--pick-y); transform: translate(-50%, -50%); }
  42% { opacity: 1; left: 51%; top: 83%; transform: translate(-50%, -50%) rotate(4deg) scale(.87); }
  54%, 100% { opacity: 0; left: 51%; top: 82%; transform: translate(-50%, -50%) rotate(4deg) scale(.8); }
}
@keyframes take-card {
  0%, 42%, 94%, 100% { opacity: 0; }
  54%, 81% { opacity: 1; }
}
.packet-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; }
.packet button { min-height: 44px; padding: 6px 10px; border: 1px solid #c9cfc0; border-radius: 8px; background: #fffdf8; font-size: 14px; font-weight: 600; cursor: pointer; }
.packet button:hover:not(:disabled) { background: #ecf1e8; }
.packet button.packet-primary { color: #fffdf8; background: #29483b; border-color: #29483b; }
.packet button.packet-primary:hover:not(:disabled) { background: #3a594b; }
.packet button:disabled { opacity: .65; cursor: default; }
.cut-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2px 10px; width: min(100%, 340px); margin: 8px auto 2px; }
.cut-panel label { grid-column: 1 / -1; color: #536157; font-size: 13px; font-weight: 640; text-align: left; }
.cut-control { min-width: 0; }
.cut-control input { display: block; width: 100%; min-height: 31px; margin: 0; accent-color: #29483b; }
.cut-control output { display: block; color: #536157; font-size: 12px; }
.instruction { margin: 16px 0 0; color: #536157; font-size: clamp(13px, 3.4vw, 15px); }
@media (max-width: 550px) {
  .settings { grid-template-columns: 1fr; gap: 7px; }
}

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 146px)); justify-content: center; gap: clamp(8px, 3vw, 22px); margin: clamp(16px, 4vw, 24px) 0 0; }
.time-count { margin-top: 8px; color: #536157; font-size: 13px; }
.time-column { display: grid; grid-template-rows: repeat(4, auto); align-content: start; gap: 12px; min-width: 0; }
.time-column > .slot:not(:first-child) .slot-label { font: 600 clamp(11px, 3vw, 13px)/1.25 var(--sans); color: #536157; }
.time-column > .slot:first-child { padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.time-column .number-picker { min-width: 0; }
.back-to-card { display: block; min-height: 44px; margin: 0 0 8px auto; padding: 5px 8px; border: 0; background: transparent; color: var(--accent); font-size: 13px; cursor: pointer; }
.back-to-card:hover { text-decoration: underline; }
.general-draw { width: min(100%, 540px); margin: 10px auto 0; }
.general-count { color: #536157; font-size: 13px; }
.fan {
  --ribbon-step: clamp(24px, 6.6cqw, 31px);
  --ribbon-card: clamp(41px, 12cqw, 57px);
  --ribbon-height: clamp(44px, 11cqw, 53px);
  position: absolute;
  z-index: 1;
  inset: auto 6% 5%;
  display: grid;
  align-items: center;
  justify-content: safe center;
  grid-auto-flow: column;
  grid-auto-columns: var(--ribbon-step);
  padding: 5px calc(var(--ribbon-card) - var(--ribbon-step) + 6px) 5px 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.packet .fan-card {
  position: relative;
  width: var(--ribbon-card);
  height: var(--ribbon-height);
  border: 1px solid #cbb788;
  border-radius: 5px;
  padding: 0;
  background: #fffdf8;
  box-shadow: -2px 2px 4px #08051280;
  cursor: pointer;
  touch-action: manipulation;
}
.packet-visual.is-spreading .fan-card { cursor: default; opacity: 1; }
.packet .fan-card:disabled { opacity: 1; }
.fan-card.is-picked { visibility: hidden; }
.fan-card img { display: block; width: 100%; height: 100%; border-radius: inherit; pointer-events: none; }
.fan-card:focus-visible { z-index: 2; outline: 2px solid #ffe5a3; outline-offset: 1px; }
@media (hover: hover) {
  .fan-card:hover:not(:disabled) { translate: 0 -3px; box-shadow: 0 0 0 2px #ffe5a3, 0 4px 9px #080512b0; }
}
.fan-navigation { display: flex; gap: 4px; }
.packet .fan-navigation button { min-width: 44px; padding: 0 8px; font-size: 22px; line-height: 1; }
.cards-general { grid-template-columns: repeat(3, minmax(0, 119px)); row-gap: 16px; }
.cards-general .slot-label {
  display: grid;
  place-items: center;
  min-height: 2.35em;
  font-size: clamp(12px, 3.55vw, 16px);
  overflow-wrap: anywhere;
}
.slot-mark { display: none; }
.slot-empty .card-face { border: 1px dashed #b9a372; background: #fffaf0; box-shadow: none; }
.slot-empty .card-face img { visibility: hidden; }
.slot-empty .card:not(:disabled) .card-face { border: 2px solid #a78042; background: #f4ead4; }
.slot-empty .card:not(:disabled) .slot-mark { display: grid; position: absolute; inset: 0; place-items: center; color: #875035; font-size: 24px; }
.slot-mark::before { content: "+"; }
.time-column .slot-empty .card:not(:disabled) .slot-mark { font-size: clamp(11px, 2.9vw, 14px); font-weight: 650; }
.time-column .slot-mark::before { content: "+ Ajouter"; }
.time-column .slot-empty .card[aria-pressed="true"] .card-face { border-color: #875035; background: #efe0c6; }
.slot { display: grid; justify-items: center; gap: 7px; min-width: 0; }
.slot-label { font: 400 16px/1.2 var(--serif); }
.number-picker { padding-inline: 4px; }
.number-picker:disabled { opacity: .65; }
.card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  perspective: 700px;
  touch-action: manipulation;
}
.card[aria-current="true"] { outline: 2px solid var(--gold); outline-offset: 3px; }
.card:disabled { cursor: default; opacity: .68; }
.card-inner { position: absolute; inset: 0; border-radius: inherit; transform-style: preserve-3d; transition: transform .48s cubic-bezier(.25,.75,.3,1); }
.card.is-revealed .card-inner { transform: rotateY(180deg); }
.card-face {
  position: absolute;
  inset: 0;
  display: block;
  border: 1px solid #d9c7a1;
  border-radius: inherit;
  background: #fff;
  box-shadow: 0 3px 8px #31241c20;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.card-front { transform: rotateY(180deg); }
.card-front:empty { visibility: hidden; }
.card-face img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (hover: hover) {
  .card { transition: translate .15s ease; }
  .card:hover:not(:disabled) { translate: 0 -3px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card-inner { transition: none; }
}

.detail { width: min(100%, 590px); margin: 16px auto 0; padding: clamp(12px, 3vw, 20px); border: 1px solid var(--rule); border-radius: 12px; background: #fffdf8; }
.detail .position { color: var(--accent); font-size: 13px; }
.detail h2 { margin: 2px 0 10px; font: 400 30px/1.12 var(--serif); }
.detail-image { display: block; max-width: 100%; max-height: min(290px, 60svh); margin: auto; border: 1px solid var(--rule); border-radius: 7px; }
.interpretation { margin-top: 15px; text-align: left; }
.interpretation h3 { color: var(--accent); font: 400 clamp(22px, 5vw, 27px)/1.2 var(--serif); }
.interpretation p { margin-top: 9px; font-size: 16px; line-height: 1.65; }
.original { margin-top: 11px; border-top: 1px solid var(--rule); }
.original summary { min-height: 44px; padding-block: 10px; color: var(--accent); font-size: 14px; }
.original img { display: block; max-width: 100%; height: auto; margin-inline: auto; border: 1px solid var(--rule); }
