:root {
  --ink: #f8efe0;
  --muted: #d9c8ae;
  --shadow: #120d0a;
  --night: #061426;
  --night-soft: #0f2742;
  --wood: #513323;
  --wood-dark: #2b1a12;
  --amber: #e7a84c;
  --brass: #b98a4b;
  --vintage-green: #59633d;
  --vintage-green-dark: #343b25;
  --vintage-green-soft: rgba(89, 99, 61, 0.38);
  --rose: #c9796f;
  --sage: #8aa37b;
  --blue: #6f98ad;
  --violet: #8d7aa5;
  --glass: rgba(255, 246, 226, 0.1);
  --glass-strong: rgba(255, 246, 226, 0.18);
  --line: rgba(255, 242, 214, 0.22);
  /* Seules les images de l'écran d'accueil et du hall chargent immédiatement */
  --home-image: url("../../assets/images/nuit/garde.png");
  --hall-image: url("../../assets/images/nuit/accueil.png");
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.theme-day {
  --home-image: url("../../assets/images/jour/gardejour.png");
  --hall-image: url("../../assets/images/jour/accueiljour.png");
}

/* body.theme-night — inutile : :root définit déjà les valeurs nuit par défaut */

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: #17100c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.app {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 520px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(231, 168, 76, 0.16), transparent 32%),
    linear-gradient(145deg, #251810 0%, #16100e 52%, #0e1515 100%);
}

.screen {
  position: absolute;
  inset: 0;
  display: grid;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.035);
  transition: opacity 900ms var(--ease), transform 1200ms var(--ease), filter 900ms var(--ease);
  filter: blur(8px);
}

.screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  filter: blur(0);
}

.screen-home {
  place-items: center;
  padding: clamp(20px, 4vw, 48px);
  background:
    linear-gradient(180deg, rgba(3, 10, 18, 0.1) 0%, rgba(3, 10, 18, 0.02) 34%, rgba(5, 7, 10, 0.18) 58%, rgba(5, 7, 10, 0.68) 80%, rgba(5, 7, 10, 0.96) 100%),
    radial-gradient(circle at 50% 78%, rgba(231, 168, 76, 0.18), transparent 34%),
    var(--home-image) center / cover no-repeat,
    linear-gradient(180deg, var(--night) 0%, #0b1118 100%);
}

.screen-home::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.32), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.32)),
    radial-gradient(circle at 52% 52%, transparent 0 38%, rgba(0, 0, 0, 0.16) 76%);
  pointer-events: none;
}

.ambient-layer,
.living-light {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-layer::before,
.living-light::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 44% 35%, rgba(255, 202, 117, 0.18), transparent 25%),
    radial-gradient(circle at 72% 64%, rgba(138, 163, 123, 0.12), transparent 24%);
  animation: lightPulse 7s ease-in-out infinite alternate;
}

.screen-home .ambient-layer::before {
  background:
    radial-gradient(circle at 22% 9%, rgba(232, 235, 214, 0.16), transparent 11%),
    radial-gradient(circle at 51% 50%, rgba(231, 168, 76, 0.12), transparent 28%);
}

.home-refuge {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  transform: translateY(8vh);
}

.moon {
  position: absolute;
  top: 12%;
  right: 18%;
  width: clamp(56px, 10vw, 110px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #fff4cf, #dfb66c 72%);
  box-shadow: 0 0 44px rgba(255, 222, 154, 0.34);
}

.house-silhouette {
  position: relative;
  width: min(66vw, 560px);
  height: min(44vh, 360px);
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.48));
}

.roof {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 0;
  height: 44%;
  background: linear-gradient(145deg, #43271b, #1d120d);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.house-body {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 0;
  height: 66%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9%;
  align-items: center;
  padding: 12%;
  background: linear-gradient(160deg, #493022, #241710);
  border: 1px solid rgba(255, 235, 191, 0.16);
}

.house-body span {
  height: 42%;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(#ffd991, #d7863d);
  box-shadow: 0 0 28px rgba(248, 176, 84, 0.42);
  animation: windowGlow 5s ease-in-out infinite alternate;
}

.porch-light {
  position: absolute;
  left: 48%;
  bottom: 10%;
  width: 4%;
  height: 18%;
  border-radius: 999px 999px 4px 4px;
  background: #f3a84e;
  box-shadow: 0 0 52px 22px rgba(239, 164, 79, 0.28);
}

.home-copy,
.room-copy,
.map-copy {
  position: relative;
  z-index: 2;
  width: min(92vw, 560px);
  text-align: center;
}

.home-copy {
  align-self: stretch;
  width: min(92vw, 680px);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(30px, calc(env(safe-area-inset-top) + 18px)) 0 max(28px, env(safe-area-inset-bottom));
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.78);
}

.home-heading,
.home-invitation {
  position: relative;
  z-index: 2;
}

.home-heading {
  margin-top: clamp(8px, 3.6vh, 42px);
}

.home-invitation {
  margin-bottom: clamp(0px, 1.8vh, 18px);
}

.home-pretitle,
.home-subtitle {
  margin: 0;
  color: #f7dcae;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.45;
}

.home-pretitle {
  font-size: clamp(1.25rem, 3.8vw, 2.2rem);
}

.home-subtitle {
  font-size: clamp(1.05rem, 3.1vw, 1.45rem);
}

.home-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  width: min(220px, 58vw);
  margin: 22px auto 20px;
  color: #e8ba7a;
}

.home-divider span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 186, 122, 0.72));
}

.home-divider span:last-child {
  background: linear-gradient(90deg, rgba(232, 186, 122, 0.72), transparent);
}

.home-divider strong {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.home-actions {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: clamp(18px, 5vw, 36px);
  z-index: 6;
  display: flex;
  gap: 10px;
}

.home-actions .icon-button {
  width: 42px;
  height: 42px;
  border-color: rgba(255, 232, 187, 0.32);
  background: rgba(4, 10, 16, 0.28);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.lucide-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-toggle .sound-off-icon {
  display: none;
}

.sound-toggle.is-muted .sound-on-icon {
  display: none;
}

.sound-toggle.is-muted .sound-off-icon {
  display: block;
}

.kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.04;
}

h1 {
  font-size: clamp(2.25rem, 7.3vw, 5.2rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 4.5rem);
}

p {
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  line-height: 1.65;
}

.primary-action,
.secondary-action,
.ghost-action,
.icon-button {
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 260ms var(--ease), border-color 260ms var(--ease), background 260ms var(--ease), box-shadow 260ms var(--ease);
}

.primary-action {
  min-height: 52px;
  margin-top: 26px;
  padding: 0 24px;
  border-radius: 999px;
  color: #f8efe0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 231, 183, 0.1), transparent 36%),
    linear-gradient(135deg, var(--vintage-green), var(--vintage-green-dark));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  font-weight: 800;
}

.screen-home .primary-action {
  min-width: min(76vw, 520px);
  min-height: clamp(64px, 9vh, 82px);
  margin-top: 32px;
  border-color: rgba(218, 157, 72, 0.96);
  border-radius: 30px;
  color: #fae3ba;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 229, 174, 0.16), transparent 34%),
    linear-gradient(135deg, #5a6037, #4f5a30 52%, #697142);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 238, 198, 0.34);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.28rem, 4vw, 2.1rem);
  font-weight: 500;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.62);
}

.screen-home .primary-action::before {
  content: "⌁";
  display: block;
  margin-bottom: -2px;
  color: rgba(250, 227, 186, 0.74);
  font-size: 1.65rem;
  line-height: 0.72;
}

.secondary-action,
.ghost-action {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  font-weight: 700;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(18px);
}

.primary-action:hover,
.secondary-action:hover,
.ghost-action:hover,
.icon-button:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(255, 230, 180, 0.5);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}

.sound-toggle.is-muted {
  opacity: 0.58;
}

.hall-actions {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: clamp(18px, 5vw, 36px);
  z-index: 6;
  display: flex;
  gap: 10px;
}

.hall-actions .icon-button {
  width: 42px;
  height: 42px;
  border-color: rgba(255, 232, 187, 0.32);
  background: rgba(24, 16, 10, 0.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.room-actions {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: clamp(18px, 5vw, 36px);
  z-index: 6;
  display: flex;
  gap: 10px;
}

.room-actions .icon-button {
  width: 42px;
  height: 42px;
  border-color: rgba(255, 232, 187, 0.32);
  background: rgba(24, 16, 10, 0.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.room-screen {
  padding: max(18px, env(safe-area-inset-top)) clamp(18px, 4vw, 48px) max(22px, env(safe-area-inset-bottom));
  place-items: center;
}

.hall-screen {
  background:
    linear-gradient(180deg, rgba(18, 10, 5, 0.04) 0%, rgba(18, 10, 5, 0.04) 46%, rgba(12, 8, 5, 0.58) 76%, rgba(8, 6, 5, 0.96) 100%),
    radial-gradient(circle at 50% 21%, rgba(231, 168, 76, 0.18), transparent 28%),
    var(--hall-image) center / cover no-repeat,
    linear-gradient(180deg, #2b1b13 0%, #17100c 74%);
}

.hall-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.34), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.34)),
    radial-gradient(circle at 50% 44%, transparent 0 42%, rgba(0, 0, 0, 0.16) 78%);
  pointer-events: none;
}

.hall-screen .hall-scene {
  display: none;
}

.hall-screen .room-copy {
  width: min(82vw, 480px);
  margin-bottom: max(42px, calc(env(safe-area-inset-bottom) + 26px));
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.78);
}

.hall-screen .room-copy h2 {
  font-size: clamp(1.7rem, 5vw, 3.2rem);
}

.hall-screen .room-copy p {
  color: #f2d5a5;
}

.hall-message {
  animation: hallMessageFade 9s ease forwards;
}

.activity-dot {
  position: absolute;
  z-index: 5;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 230, 182, 0.72);
  border-radius: 999px;
  background: rgba(232, 186, 122, 0.34);
  box-shadow: 0 0 0 8px rgba(232, 186, 122, 0.1), 0 0 26px rgba(232, 186, 122, 0.48);
  cursor: pointer;
  transition: transform 260ms var(--ease), background 260ms var(--ease), box-shadow 260ms var(--ease);
}

.activity-dot::before,
.activity-dot::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(255, 230, 182, 0.26);
  border-radius: inherit;
  animation: dotPulse 2.8s ease-out infinite;
}

.activity-dot::after {
  animation-delay: 1.4s;
}

.activity-dot:hover {
  transform: scale(1.12);
  background: rgba(255, 222, 166, 0.48);
  box-shadow: 0 0 0 10px rgba(232, 186, 122, 0.13), 0 0 34px rgba(232, 186, 122, 0.58);
}

.activity-dot.is-muted {
  opacity: 0.58;
  background: rgba(120, 105, 86, 0.28);
  box-shadow: 0 0 0 7px rgba(120, 105, 86, 0.08), 0 0 18px rgba(120, 105, 86, 0.32);
}

.hall-bench-dot {
  left: clamp(42px, 19vw, 180px);
  top: 54%;
}

.hall-door-dot {
  left: 50%;
  top: 43%;
  transform: translateX(-50%);
}

.hall-door-dot:hover {
  transform: translateX(-50%) scale(1.12);
}

.activity-card {
  position: absolute;
  left: 50%;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  z-index: 7;
  width: min(86vw, 440px);
  padding: 22px 22px 20px;
  border: 1px solid rgba(255, 230, 182, 0.32);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(21, 14, 9, 0.72);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
  text-align: left;
}

.activity-card[hidden] {
  display: none;
}

.activity-card h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4.8vw, 2.3rem);
}

.activity-card p {
  margin: 14px 0 0;
  color: #f2d5a5;
  font-size: clamp(0.95rem, 2.7vw, 1.06rem);
}

.activity-card .activity-breath {
  color: #f8efe0;
}

.activity-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 230, 182, 0.22);
  border-radius: 999px;
  color: #f5d7a3;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.account-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(5, 7, 10, 0.58);
  backdrop-filter: blur(12px);
}

.account-overlay[hidden] {
  display: none;
}

.account-dialog {
  position: relative;
  width: min(92vw, 460px);
  max-height: 92dvh;
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(255, 230, 182, 0.32);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(21, 14, 9, 0.86);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

.account-close {
  z-index: 2;
}

.account-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 40px 22px 0;
}

.account-tab {
  min-height: 36px;
  border: 1px solid rgba(255, 230, 182, 0.22);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
}

.account-tab[hidden] {
  display: none;
}

.account-tab.is-active {
  border-color: rgba(185, 138, 75, 0.86);
  color: #f8efe0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 231, 183, 0.1), transparent 36%),
    linear-gradient(135deg, var(--vintage-green), var(--vintage-green-dark));
  box-shadow: inset 0 1px rgba(255, 238, 198, 0.18), 0 8px 22px rgba(0, 0, 0, 0.2);
}

.account-tab.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.account-panel {
  display: none;
}

.account-panel.is-active {
  display: block;
}

.account-panel h2 {
  font-size: clamp(1.7rem, 6vw, 2.7rem);
}

.account-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.account-form label {
  display: grid;
  gap: 7px;
  color: #f2d5a5;
  font-size: 0.92rem;
  font-weight: 700;
}

.account-form input,
.account-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(185, 138, 75, 0.34);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(89, 99, 61, 0.14);
  padding: 0 12px;
  font: inherit;
}

.account-form select option {
  color: #1d140f;
}

.toggle-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.toggle-row input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--vintage-green);
}

.account-submit {
  width: 100%;
  margin-top: 4px;
  border-color: rgba(185, 138, 75, 0.86);
  color: #f8efe0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 231, 183, 0.12), transparent 34%),
    linear-gradient(135deg, #6a7448, #4d5735 56%, #394126);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32), inset 0 1px rgba(255, 238, 198, 0.2);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.46);
}

.logout-action {
  width: 100%;
  margin-top: 12px;
}

.settings-subtitle {
  margin: 24px 0 0;
  color: #f2d5a5;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.danger-zone {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(185, 138, 75, 0.28);
}

.danger-zone .ghost-action {
  width: 100%;
}

.delete-account-action {
  margin-top: 10px;
  border-color: rgba(176, 91, 82, 0.52);
  color: #ffd2c7;
  background: rgba(104, 42, 38, 0.22);
}

.account-status {
  min-height: 24px;
  margin: 16px 0 0;
  color: #f2d5a5;
  font-size: 0.92rem;
  text-align: center;
}

.hall-scene {
  position: absolute;
  inset: 0;
}

.wall-glow {
  position: absolute;
  left: 50%;
  bottom: 20%;
  width: min(62vw, 620px);
  height: min(48vh, 420px);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 157, 72, 0.26), transparent 68%);
  animation: lightPulse 5.5s ease-in-out infinite alternate;
}

.fireplace {
  position: absolute;
  left: 50%;
  bottom: 13%;
  width: min(32vw, 260px);
  height: min(28vh, 190px);
  transform: translateX(-50%);
  border: 14px solid #3b2418;
  border-bottom-width: 22px;
  background: #120b08;
  box-shadow: inset 0 12px 18px rgba(0, 0, 0, 0.42), 0 26px 60px rgba(0, 0, 0, 0.4);
}

.flame {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 42px;
  height: 74px;
  border-radius: 999px 999px 999px 0;
  transform: translateX(-50%) rotate(45deg);
  transform-origin: bottom;
  background: linear-gradient(45deg, #ffec9d, #e76e35 74%);
  animation: flame 900ms ease-in-out infinite alternate;
}

.flame-two {
  left: 37%;
  height: 56px;
  animation-delay: -260ms;
}

.flame-three {
  left: 63%;
  height: 50px;
  animation-delay: -520ms;
}

.smoke {
  position: absolute;
  left: 50%;
  bottom: 86%;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid rgba(232, 213, 184, 0.2);
  animation: smoke 5s ease-in-out infinite;
}

.smoke-two {
  animation-delay: -2.4s;
}

.rug {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: min(58vw, 520px);
  height: 12vh;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(151, 80, 62, 0.82), rgba(74, 41, 32, 0.2) 70%);
}

.plant {
  position: absolute;
  right: clamp(24px, 12vw, 180px);
  bottom: 13%;
  width: 80px;
  height: 160px;
  border-bottom: 54px solid #453024;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
}

.plant::before,
.plant::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 42px;
  width: 42px;
  height: 104px;
  border-radius: 999px 999px 0 999px;
  background: #6d8c66;
  transform: translateX(-70%) rotate(-28deg);
}

.plant::after {
  transform: translateX(-12%) rotate(28deg);
  background: #86a777;
}

.room-copy {
  align-self: end;
  margin-bottom: 7vh;
}

.top-bar {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: clamp(16px, 4vw, 40px);
  right: clamp(16px, 4vw, 40px);
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.map-actions {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: clamp(16px, 4vw, 34px);
  z-index: 7;
  display: flex;
  gap: 10px;
}

.map-actions .icon-button {
  width: 42px;
  height: 42px;
  border-color: rgba(255, 232, 187, 0.32);
  background: rgba(12, 8, 5, 0.34);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.map-close {
  font-size: 1.45rem;
  line-height: 1;
}

.map-screen {
  padding: max(62px, calc(env(safe-area-inset-top) + 52px)) 0 0;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(99, 137, 130, 0.18), transparent 36%),
    linear-gradient(145deg, #101513, #061426);
}

.map-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.map-hint {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  z-index: 3;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid rgba(255, 230, 182, 0.24);
  border-radius: 999px;
  color: #f2d5a5;
  background: rgba(12, 8, 5, 0.32);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
  font-size: 0.9rem;
  font-weight: 800;
}

.dollhouse {
  position: relative;
  width: min(100vw, calc((100dvh - 62px) * 0.5625));
  height: min(calc(100dvh - 62px), 177.78vw);
  min-height: 0;
  justify-self: center;
  display: block;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.2)),
    url("../../assets/images/nuit/carte.png") center / cover no-repeat;
  border: 0;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

body.theme-day .dollhouse {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.2)),
    url("../../assets/images/jour/cartejour.png");
}

.dollhouse::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.28)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), transparent 58%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.map-room {
  position: absolute;
  z-index: 2;
  width: 32%;
  height: 16%;
  border: 0;
  border-radius: 8px;
  color: #fff4d6;
  background: transparent;
  cursor: pointer;
  transition: transform 260ms var(--ease), border-color 260ms var(--ease), background 260ms var(--ease), box-shadow 260ms var(--ease);
}

.map-room::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(255, 223, 164, 0.22), transparent 52%);
  opacity: 0;
  transition: opacity 260ms var(--ease);
}

.map-room:hover,
.map-room:focus-visible,
.map-room.is-entering {
  transform: scale(1.03);
  background: transparent;
  box-shadow: none;
}

.map-room:hover::before,
.map-room:focus-visible::before,
.map-room.is-entering::before {
  opacity: 1;
}

.map-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 230, 182, 0.84);
  border-radius: 999px;
  background: rgba(89, 99, 61, 0.72);
  box-shadow: 0 0 0 8px rgba(232, 186, 122, 0.1), 0 0 22px rgba(232, 186, 122, 0.48);
  transform: translate(-50%, -50%);
}

.map-pin::before {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(255, 230, 182, 0.24);
  border-radius: inherit;
  animation: dotPulse 2.8s ease-out infinite;
}

.map-label {
  position: absolute;
  left: 50%;
  top: calc(50% - 42px);
  padding: 5px 9px;
  border: 1px solid rgba(255, 230, 182, 0.22);
  border-radius: 999px;
  color: rgba(248, 239, 224, 0.92);
  background: rgba(17, 12, 8, 0.34);
  backdrop-filter: blur(8px);
  transform: translateX(-50%);
  opacity: 1;
  white-space: nowrap;
  max-width: 44vw;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.map-room:hover .map-label,
.map-room:focus-visible .map-label,
.map-room.is-entering .map-label {
  opacity: 1;
}

.map-room.is-current .map-pin {
  border-color: rgba(255, 230, 182, 0.94);
  background: linear-gradient(135deg, #7b8754, #4d5735);
  box-shadow: 0 0 0 8px rgba(232, 186, 122, 0.14), 0 0 32px rgba(232, 186, 122, 0.72);
}

.map-room.is-current .map-label {
  border-color: rgba(255, 230, 182, 0.42);
  background: rgba(89, 99, 61, 0.44);
}

.map-room-library {
  left: 10%;
  top: 22%;
  width: 38%;
  height: 17%;
}

.map-room-gallery {
  left: 52%;
  top: 43%;
  width: 37%;
  height: 17%;
}

.map-room-hall {
  left: 9%;
  top: 43%;
  width: 38%;
  height: 17%;
}

.map-room-sensory {
  left: 52%;
  top: 22%;
  width: 37%;
  height: 17%;
}

.map-room-workshop {
  left: 11%;
  top: 64%;
  width: 78%;
  height: 18%;
}


.room-layout {
  width: min(94vw, 1040px);
  height: min(74vh, 680px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(18px, 4vw, 48px);
  align-items: center;
}

.panel {
  align-self: center;
  margin: 0;
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 13, 10, 0.38);
  backdrop-filter: blur(18px);
  text-align: left;
}

.panel h2 {
  font-size: clamp(1.7rem, 4vw, 3.8rem);
}

.library-screen {
  background: linear-gradient(145deg, #251710, #111412);
}

.library-screen.is-active {
  background:
    linear-gradient(180deg, rgba(18, 10, 5, 0.02) 0%, rgba(18, 10, 5, 0.08) 54%, rgba(8, 6, 5, 0.86) 100%),
    url("../../assets/images/nuit/bibliotheque.png") center / cover no-repeat,
    linear-gradient(145deg, #251710, #111412);
}

body.theme-day .library-screen.is-active {
  background-image:
    linear-gradient(180deg, rgba(18, 10, 5, 0.02) 0%, rgba(18, 10, 5, 0.08) 54%, rgba(8, 6, 5, 0.86) 100%),
    url("../../assets/images/jour/bibliotheque.png");
}

.library-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.26), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.26)),
    linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.library-scene {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.library-dot {
  position: absolute;
  z-index: 4;
}

.library-dot-desk {
  left: 43%;
  top: 73%;
}

.library-dot-left {
  left: 11%;
  top: 43%;
}

.library-dot-right {
  left: 81%;
  top: 40%;
}

.library-note-card {
  position: absolute;
  left: 50%;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  z-index: 8;
  width: min(86vw, 460px);
  padding: 22px 22px 20px;
  border: 1px solid rgba(255, 230, 182, 0.32);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(21, 14, 9, 0.72);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
  text-align: left;
}

.library-note-card[hidden] {
  display: none;
}

.library-note-card h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4.8vw, 2.3rem);
}

.library-note-card p {
  margin: 14px 0 0;
  color: #f2d5a5;
  font-size: clamp(0.95rem, 2.7vw, 1.06rem);
}

.gallery-screen {
  background: linear-gradient(145deg, #131a1d, #211713);
}

.gallery-art {
  position: relative;
  height: 76%;
  min-height: 340px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: center;
}

.art-piece {
  height: 74%;
  border: 10px solid #2e2018;
  border-radius: 8px;
  background:
    radial-gradient(circle at 38% 34%, rgba(255, 231, 175, 0.95), transparent 18%),
    linear-gradient(160deg, #c9796f, #6f98ad 48%, #1e312d);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
  transition: transform 360ms var(--ease), filter 360ms var(--ease);
}

.art-piece:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0 8%, transparent 8% 100%),
    linear-gradient(145deg, #283b44, #6f98ad, #20302f);
}

.art-piece:nth-child(3) {
  background:
    radial-gradient(circle at 50% 60%, rgba(255, 225, 154, 0.35), transparent 30%),
    linear-gradient(145deg, #8aa37b, #253d30 58%, #161714);
}

.art-piece.is-selected {
  transform: translateY(-14px) scale(1.04);
  filter: saturate(1.15) brightness(1.12);
}

.gallery-controls,
.sensory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.secondary-action.is-selected {
  background: var(--glass-strong);
  border-color: rgba(255, 230, 180, 0.52);
}

.sensory-screen {
  background: linear-gradient(180deg, #111915 0%, #17100c 100%);
}

.sensory-screen.is-active {
  background: url("../../assets/images/nuit/sallesensorielnuit.png") center / cover no-repeat,
    linear-gradient(180deg, #111915 0%, #17100c 100%);
}

body.theme-day .sensory-screen.is-active {
  background-image: url("../../assets/images/jour/sallesensorielbase.png");
}

body.theme-day .sensory-screen.is-active.cat-croth {
  background-image:
    url("../../assets/images/jour/sallesensorielcroth.png"),
    url("../../assets/images/jour/sallesensorielbase.png");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

body.theme-day .sensory-screen.is-active.cat-lou {
  background-image:
    url("../../assets/images/jour/sallesensoriellou.png"),
    url("../../assets/images/jour/sallesensorielbase.png");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

body.theme-day .sensory-screen.is-active.cat-ibiza {
  background-image:
    url("../../assets/images/jour/sallesensorielibiza.png"),
    url("../../assets/images/jour/sallesensorielbase.png");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

.sensory-screen .sensory-layout {
  display: none;
}

.ronron-screen {
  background: linear-gradient(180deg, #111915 0%, #17100c 100%);
}

/* Images du ronron chargées seulement quand la pièce est active */
.ronron-screen.is-active {
  background: url("../../assets/images/jour/ibizaronron.png") center / cover no-repeat,
    linear-gradient(180deg, #111915 0%, #17100c 100%);
}

.ronron-screen.is-active.cat-croth {
  background-image: url("../../assets/images/jour/crothronron.png");
}

.ronron-screen.is-active.cat-lou {
  background-image: url("../../assets/images/jour/louronron.png");
}

.ronron-screen.is-active.cat-ibiza {
  background-image: url("../../assets/images/jour/ibizaronron.png");
}

.ronron-screen.is-swapping-cat {
  opacity: 0;
  transition: opacity 120ms ease;
}

.cat-dot-secondary {
  position: absolute;
  left: 34.4%;
  top: 81.2%;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
}

/* ── Bandeau de sélection de chat (haut, toujours visible) ── */

.ronron-topbar {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(22, 12, 6, 0.6);
  border: 1px solid rgba(231, 168, 76, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.42);
  max-width: calc(100vw - 96px); /* laisser place au bouton retour à gauche */
}

.ronron-topbar-cats {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ronron-topbar-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  background: transparent;
  color: rgba(248, 239, 224, 0.72);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.22s var(--ease);
}

.ronron-topbar-cat:hover {
  background: rgba(255, 240, 210, 0.08);
  color: var(--ink);
}

.ronron-topbar-cat.is-selected {
  background: rgba(231, 168, 76, 0.16);
  border-color: rgba(231, 168, 76, 0.55);
  color: var(--ink);
}

.ronron-topbar-photo {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(40, 22, 10, 0.5);
  border: 2px solid rgba(200, 180, 150, 0.22);
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.ronron-topbar-cat.is-selected .ronron-topbar-photo {
  border-color: rgba(231, 168, 76, 0.7);
  box-shadow: 0 0 0 2px rgba(231, 168, 76, 0.22);
}

.ronron-topbar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

.ronron-topbar-name {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

/* Séparateur + bouton son */
.ronron-topbar-sound {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-left: 4px;
  border-radius: 50%;
  border: 1px solid rgba(231, 168, 76, 0.28);
  background: rgba(255, 200, 130, 0.06);
  color: rgba(255, 200, 130, 0.85);
  cursor: pointer;
  transition: all 0.2s;
}

.ronron-topbar-sound::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: rgba(231, 168, 76, 0.22);
}

.ronron-topbar-sound:hover {
  background: rgba(255, 200, 130, 0.14);
  color: var(--ink);
  border-color: rgba(231, 168, 76, 0.55);
}

.ronron-topbar-sound .lucide-icon { width: 16px; height: 16px; }

.ronron-topbar-sound .ronron-sound-off { display: none; }
.ronron-topbar-sound.is-muted .ronron-sound-on  { display: none; }
.ronron-topbar-sound.is-muted .ronron-sound-off { display: block; }

.ronron-topbar-sound.is-muted {
  color: rgba(248, 239, 224, 0.42);
  background: rgba(255, 240, 210, 0.04);
}

.breath-orb {
  width: min(62vw, 430px);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 38% 34%, rgba(255, 242, 211, 0.92), rgba(231, 168, 76, 0.46) 22%, rgba(138, 163, 123, 0.18) 54%, transparent 70%);
  box-shadow: 0 0 70px rgba(231, 168, 76, 0.28);
  animation: breathe 8s ease-in-out infinite;
}

.workshop-screen {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 80px),
    linear-gradient(145deg, #1f1712, #121617);
}

.centered-panel {
  align-self: center;
  justify-self: center;
}

.transition-veiling {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: #0f0b09;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 520ms var(--ease), transform 820ms var(--ease);
}

.transition-veiling.is-visible {
  opacity: 1;
  transform: scale(1);
}

@keyframes lightPulse {
  from {
    opacity: 0.62;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes windowGlow {
  from {
    opacity: 0.74;
  }
  to {
    opacity: 1;
  }
}

@keyframes flame {
  from {
    transform: translateX(-50%) rotate(39deg) scaleY(0.92);
  }
  to {
    transform: translateX(-50%) rotate(49deg) scaleY(1.08);
  }
}

@keyframes smoke {
  from {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.7);
  }
  35% {
    opacity: 0.45;
  }
  to {
    opacity: 0;
    transform: translate(-80%, -130px) scale(1.8);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.82);
  }
  48% {
    transform: scale(1.06);
  }
}

@keyframes hallMessageFade {
  0%,
  58% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes dotPulse {
  from {
    opacity: 0.9;
    transform: scale(0.55);
  }
  to {
    opacity: 0;
    transform: scale(1.45);
  }
}

/* ── Journaling overlay (bureau rapproché) ───────────────── */

.journaling-overlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  background:
    linear-gradient(180deg, rgba(18, 10, 5, 0.04) 0%, rgba(18, 10, 5, 0.1) 54%, rgba(8, 6, 5, 0.72) 100%),
    url("../../assets/images/nuit/journaling.png") center / cover no-repeat,
    linear-gradient(145deg, #251710, #111412);
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms var(--ease);
}

.journaling-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.28)),
    linear-gradient(180deg, transparent 46%, rgba(0, 0, 0, 0.32));
  pointer-events: none;
}

.journaling-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.journaling-back {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: clamp(18px, 5vw, 36px);
  z-index: 6;
  border-color: rgba(255, 232, 187, 0.32);
  background: rgba(24, 16, 10, 0.24);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.journaling-dot-book {
  left: 46%;
  top: 52%;
  z-index: 5;
}

.journaling-dot-pen {
  left: 64%;
  top: 62%;
  z-index: 5;
}

.journaling-page-layer {
  position: absolute;
  left: 20.8%;
  top: 42.2%;
  z-index: 4;
  width: 58.4%;
  height: 25.4%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5%;
  padding: 3% 6.2% 4.8% 4.4%;
  color: rgba(67, 43, 24, 0.86);
  font-family: Georgia, "Times New Roman", serif;
  transform: rotate(0.4deg);
  pointer-events: none;
}

.journaling-page-layer.is-editing {
  z-index: 7;
  pointer-events: auto;
}

.desk-journal-read,
.desk-journal-form {
  grid-column: 1 / -1;
  height: 100%;
}

.desk-journal-read {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15%;
  overflow: hidden;
}

.desk-page {
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.desk-journal-date {
  display: block;
  width: 100%;
  margin: 0 0 5px;
  color: rgba(104, 72, 42, 0.72);
  font-size: clamp(0.46rem, 1.4vw, 0.62rem);
  letter-spacing: 0.04em;
  text-align: center;
}

.desk-page p {
  max-height: calc(100% - 18px);
  margin: 0;
  overflow: hidden;
  color: rgba(55, 34, 18, 0.78);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.54rem, 1.8vw, 0.82rem);
  font-style: italic;
  line-height: 1.42;
  white-space: pre-wrap;
}

.desk-page-left p {
  max-height: calc(100% - 18px);
}

.desk-page-right {
  padding-top: 2px;
}

.desk-journal-read.is-empty p {
  height: calc(100% - 18px);
  display: grid;
  place-items: center;
  color: rgba(85, 58, 32, 0.34);
  text-align: center;
  column-count: 1;
  width: 100%;
}

.desk-journal-read.is-empty p::before {
  display: none;
}

.desk-journal-form {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 5px;
}

.desk-journal-textarea {
  width: 100%;
  min-height: 0;
  border: 0;
  color: rgba(46, 28, 14, 0.86);
  background: rgba(248, 239, 221, 0.28);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.58rem, 1.9vw, 0.84rem);
  font-style: italic;
  line-height: 1.5;
  outline: none;
  padding: 5px;
  resize: none;
}

.desk-journal-actions {
  display: flex;
  gap: 6px;
}

.desk-journal-actions .journal-save-btn,
.desk-journal-actions .journal-cancel-btn,
.desk-journal-actions .voice-action {
  min-height: 24px;
  padding: 4px 10px;
  font-size: 0.68rem;
}

.desk-journal-actions .voice-action {
  gap: 5px;
}

.desk-journal-actions .voice-action svg {
  width: 13px;
  height: 13px;
}

/* ── Journal book overlay ────────────────────────────────── */

.journal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(5, 3, 2, 0.74);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms var(--ease);
}

.journal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.journal-focus-overlay {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(5, 3, 2, 0.72);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms var(--ease);
}

.journal-focus-overlay[hidden] {
  display: none;
}

.journal-focus-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.journal-focus-page {
  position: relative;
  width: min(92vw, 560px);
  height: min(86vh, 760px);
  padding: 34px 32px;
  border: 1px solid rgba(90, 58, 26, 0.2);
  border-radius: 10px;
  background:
    repeating-linear-gradient(
      transparent,
      transparent 31px,
      rgba(139, 109, 70, 0.13) 31px,
      rgba(139, 109, 70, 0.13) 32px
    ),
    linear-gradient(150deg, #f8edd9, #eadbbd);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.66);
  color: #2e1a0c;
  overflow: hidden;
}

.journal-focus-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(90, 58, 26, 0.18);
  border-radius: 999px;
  color: rgba(90, 58, 26, 0.68);
  background: rgba(255, 248, 230, 0.36);
  cursor: pointer;
}

.journal-focus-content {
  height: 100%;
}

.journal-focus-read,
.journal-focus-form {
  height: 100%;
}

.journal-focus-read {
  display: flex;
  flex-direction: column;
}

.journal-focus-text {
  flex: 1;
  overflow-y: auto;
  margin-top: 22px;
  padding-right: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.9;
  white-space: pre-wrap;
}

.journal-focus-edit {
  align-self: flex-start;
  margin-top: 18px;
  padding: 8px 18px;
  border: 1px solid rgba(90, 58, 26, 0.28);
  border-radius: 999px;
  color: #5a3a1a;
  background: rgba(90, 58, 26, 0.08);
  cursor: pointer;
}

.journal-focus-form {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}

.journal-focus-textarea {
  width: 100%;
  min-height: 0;
  border: 0;
  color: #2e1a0c;
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.9;
  outline: none;
  resize: none;
}

.journal-close-btn {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, 3vw);
  z-index: 5;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(90, 58, 26, 0.44);
  border-radius: 999px;
  background: rgba(245, 234, 214, 0.82);
  color: #5a3a1a;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  transition: transform 200ms var(--ease), background 200ms;
}

.journal-close-btn:hover {
  transform: scale(1.08);
  background: #f5ead6;
}

.journal-book {
  position: relative;
  width: min(96vw, 860px);
  height: min(82vh, 580px);
  display: grid;
  grid-template-columns: 1fr 6px 1fr;
  border-radius: 8px 14px 14px 8px;
  box-shadow:
    0 48px 110px rgba(0, 0, 0, 0.72),
    -6px 0 28px rgba(0, 0, 0, 0.38),
    inset 0 1px rgba(255, 230, 182, 0.08);
  overflow: hidden;
}

.book-page {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.book-left-page {
  background:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(139, 109, 70, 0.17) 27px,
      rgba(139, 109, 70, 0.17) 28px
    ),
    linear-gradient(148deg, #f6ebd8, #ede0c6);
  border-radius: 8px 0 0 8px;
}

.book-right-page {
  background:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(139, 109, 70, 0.17) 27px,
      rgba(139, 109, 70, 0.17) 28px
    ),
    linear-gradient(148deg, #f1e8d2, #e9ddc0);
  border-radius: 0 14px 14px 0;
  perspective: 900px;
  transform-style: preserve-3d;
}

.book-spine {
  background: linear-gradient(90deg, #2a1708, #6b3d22 45%, #4a2a14 72%, #2a1708);
  box-shadow:
    inset -3px 0 8px rgba(0, 0, 0, 0.36),
    inset 3px 0 8px rgba(0, 0, 0, 0.36);
}

.book-page-inner {
  padding: 26px 24px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  color: #3a2010;
  font-family: Georgia, "Times New Roman", serif;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 109, 70, 0.3) transparent;
}

.book-page-inner::-webkit-scrollbar {
  width: 4px;
}

.book-page-inner::-webkit-scrollbar-thumb {
  background: rgba(139, 109, 70, 0.3);
  border-radius: 2px;
}

.book-title {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: #5a3a1a;
  letter-spacing: 0.1em;
  text-align: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(90, 58, 26, 0.28);
}

.journal-calendar {
  display: grid;
  gap: 12px;
}

.calendar-header {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  gap: 8px;
  color: #5a3a1a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.94rem;
  font-weight: 700;
  text-align: center;
  text-transform: capitalize;
}

.calendar-header button,
.calendar-day,
.journal-page-actions button {
  border: 1px solid rgba(90, 58, 26, 0.16);
  color: #6c4926;
  background: rgba(255, 248, 230, 0.2);
  cursor: pointer;
}

.calendar-header button {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 1.1rem;
  line-height: 1;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-weekdays {
  color: rgba(90, 58, 26, 0.42);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.76rem;
  transition: background 180ms, border-color 180ms, color 180ms, transform 180ms var(--ease);
}

.calendar-day.is-empty {
  border: 0;
  background: transparent;
}

.calendar-day.has-entry {
  border-color: rgba(89, 99, 61, 0.38);
  color: #3f4a2c;
  background: rgba(89, 99, 61, 0.18);
  font-weight: 700;
}

.calendar-day.is-missed {
  color: rgba(90, 58, 26, 0.36);
}

.calendar-day.is-missed::after {
  content: "";
  width: 3px;
  height: 3px;
  margin-top: 1px;
  border-radius: 999px;
  background: rgba(146, 75, 62, 0.36);
}

.calendar-day.is-today {
  border-color: rgba(185, 138, 75, 0.46);
}

.calendar-day.is-selected {
  color: #f8efe0;
  background: #59633d;
  border-color: rgba(89, 99, 61, 0.72);
  transform: translateY(-1px);
}

.journal-edit-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 7px 18px;
  border: 1px solid rgba(90, 58, 26, 0.38);
  border-radius: 999px;
  background: rgba(90, 58, 26, 0.08);
  color: #5a3a1a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 200ms, transform 200ms var(--ease);
}

.journal-edit-btn:hover {
  background: rgba(90, 58, 26, 0.18);
  transform: translateY(-1px);
}

.journal-cancel-btn {
  padding: 8px 16px;
  border: 1px solid rgba(90, 58, 26, 0.28);
  border-radius: 999px;
  background: transparent;
  color: rgba(90, 58, 26, 0.6);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 180ms;
}

.journal-cancel-btn:hover {
  background: rgba(90, 58, 26, 0.08);
}

.journal-new-btn {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 0;
  border: 1px dashed rgba(90, 58, 26, 0.36);
  border-radius: 6px;
  background: transparent;
  color: #8a6040;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.84rem;
  font-style: italic;
  cursor: pointer;
  transition: background 200ms, color 200ms;
  text-align: center;
}

.journal-new-btn:hover {
  background: rgba(90, 58, 26, 0.1);
  color: #5a3a1a;
}

/* Right page states */

.journal-empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 20px;
  text-align: center;
}

.journal-empty-state p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 0.94rem;
  color: rgba(90, 58, 26, 0.52);
  line-height: 1.6;
}

.journal-entry-read {
  padding: 28px 22px;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 109, 70, 0.3) transparent;
}

.journal-entry-read::-webkit-scrollbar {
  width: 4px;
}

.journal-entry-read::-webkit-scrollbar-thumb {
  background: rgba(139, 109, 70, 0.3);
  border-radius: 2px;
}

.journal-read-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.journal-entry-read-date {
  display: block;
  font-size: 0.72rem;
  color: #8a6040;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin: 0;
}

.journal-page-actions {
  display: flex;
  gap: 6px;
  opacity: 0.54;
  transition: opacity 180ms;
}

.journal-entry-read:hover .journal-page-actions {
  opacity: 0.86;
}

.journal-page-actions button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: rgba(90, 58, 26, 0.62);
  background: rgba(255, 248, 230, 0.18);
  font-size: 0.8rem;
}

.journal-page-actions button:hover {
  color: #5a3a1a;
  background: rgba(90, 58, 26, 0.1);
}

.journal-entry-read-content {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.97rem;
  line-height: 1.92;
  color: #2e1a0c;
  white-space: pre-wrap;
  word-break: break-word;
}

.journal-page-indicator {
  margin-top: 18px;
  color: rgba(90, 58, 26, 0.42);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
  font-style: italic;
  text-align: center;
}

.journal-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.voice-action {
  align-self: flex-start;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid rgba(90, 58, 26, 0.28);
  border-radius: 999px;
  background: rgba(106, 118, 69, 0.14);
  color: #56633b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 200ms, border-color 200ms, transform 220ms var(--ease);
}

.voice-action svg,
.journal-page-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.voice-action:hover,
.voice-action.is-listening {
  border-color: rgba(106, 118, 69, 0.5);
  background: rgba(106, 118, 69, 0.24);
  transform: translateY(-1px);
}

.voice-action.is-listening {
  color: #3f4c2b;
}

.voice-status {
  margin: -2px 0 0;
  color: rgba(90, 58, 26, 0.62);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
  font-style: italic;
  line-height: 1.35;
}

.journal-new-form {
  padding: 22px 22px 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.journal-new-form-date {
  font-size: 0.72rem;
  color: #8a6040;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.journal-date-field {
  display: grid;
  gap: 4px;
  color: #8a6040;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.journal-date-field input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(90, 58, 26, 0.22);
  color: #4a2b16;
  background: transparent;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  outline: none;
}

.journal-entry-textarea {
  flex: 1;
  min-height: 0;
  border: 0;
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.97rem;
  line-height: 1.92;
  color: #2e1a0c;
  resize: none;
  outline: none;
  padding: 0;
}

.journal-entry-textarea::placeholder {
  color: rgba(90, 58, 26, 0.38);
  font-style: italic;
}

.journal-save-btn {
  align-self: flex-start;
  padding: 8px 22px;
  border: 1px solid rgba(90, 58, 26, 0.42);
  border-radius: 999px;
  background: rgba(90, 58, 26, 0.1);
  color: #5a3a1a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 200ms, transform 220ms var(--ease);
}

.journal-save-btn:hover {
  background: rgba(90, 58, 26, 0.2);
  transform: translateY(-1px);
}

.journal-form-error {
  margin: 4px 0 0;
  color: #8f322d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Page-turn animation */

@keyframes pageTurnOut {
  0%   { transform: perspective(900px) rotateY(0deg);   opacity: 1; }
  100% { transform: perspective(900px) rotateY(-22deg); opacity: 0; }
}

@keyframes pageTurnIn {
  0%   { transform: perspective(900px) rotateY(22deg);  opacity: 0; }
  100% { transform: perspective(900px) rotateY(0deg);   opacity: 1; }
}

.book-page-inner.page-turn-out {
  animation: pageTurnOut 0.22s ease-in forwards;
  transform-origin: left center;
}

.book-page-inner.page-turn-in {
  animation: pageTurnIn 0.22s ease-out forwards;
  transform-origin: left center;
}

/* ── Check-in ────────────────────────────────────────────── */

.hall-checkin-dot {
  left: 83.7%;
  top: 66.3%;
}

.hall-checkin-dot.is-morning {
  background: rgba(255, 214, 90, 0.38);
  border-color: rgba(255, 220, 120, 0.78);
  box-shadow: 0 0 0 8px rgba(255, 200, 80, 0.12), 0 0 26px rgba(255, 200, 80, 0.52);
}

.hall-checkin-dot.is-morning::before,
.hall-checkin-dot.is-morning::after {
  border-color: rgba(255, 220, 120, 0.26);
}

.hall-checkin-dot.is-evening {
  background: rgba(160, 130, 210, 0.38);
  border-color: rgba(190, 160, 230, 0.72);
  box-shadow: 0 0 0 8px rgba(140, 110, 190, 0.12), 0 0 26px rgba(140, 110, 190, 0.52);
}

.hall-checkin-dot.is-evening::before,
.hall-checkin-dot.is-evening::after {
  border-color: rgba(190, 160, 230, 0.26);
}

.hall-checkin-dot.is-done {
  background: rgba(89, 99, 61, 0.34);
  border-color: rgba(138, 163, 123, 0.6);
  box-shadow: 0 0 0 6px rgba(89, 99, 61, 0.1), 0 0 18px rgba(89, 99, 61, 0.38);
}

.hall-checkin-dot.is-done::before,
.hall-checkin-dot.is-done::after {
  border-color: rgba(138, 163, 123, 0.22);
}

.checkin-overlay {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(8, 5, 3, 0.72);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms var(--ease);
}

.checkin-overlay[hidden] {
  display: none;
}

.checkin-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.checkin-dialog {
  position: relative;
  width: min(92vw, 460px);
  max-height: 90dvh;
  overflow-y: auto;
  padding: 28px 24px 24px;
  border: 1px solid rgba(255, 230, 182, 0.28);
  border-radius: 12px;
  background: rgba(18, 12, 8, 0.92);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.58);
  scrollbar-width: none;
}

.checkin-dialog::-webkit-scrollbar {
  display: none;
}

.checkin-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 230, 182, 0.22);
  border-radius: 999px;
  color: #f5d7a3;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.checkin-progress {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 0 32px 22px;
}

.checkin-prog-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 230, 182, 0.2);
  transition: background 300ms var(--ease), width 300ms var(--ease);
}

.checkin-prog-dot.is-active {
  width: 20px;
  background: rgba(232, 186, 122, 0.82);
}

.checkin-prog-dot.is-done {
  background: rgba(89, 99, 61, 0.72);
}

@keyframes checkinFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.checkin-step,
.checkin-result {
  animation: checkinFadeIn 320ms var(--ease) both;
}

.checkin-question {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 3.8vw, 1.65rem);
  font-weight: 500;
  line-height: 1.22;
  color: var(--ink);
}

.checkin-options {
  display: grid;
  gap: 7px;
}

.checkin-options-grid {
  grid-template-columns: 1fr 1fr;
}

.checkin-option {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 230, 182, 0.15);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 246, 226, 0.04);
  cursor: pointer;
  text-align: left;
  transition: background 200ms var(--ease), border-color 200ms var(--ease), transform 180ms var(--ease);
}

.checkin-option:hover {
  background: rgba(255, 246, 226, 0.09);
  border-color: rgba(232, 186, 122, 0.4);
  transform: translateX(3px);
}

.checkin-options-grid .checkin-option:hover {
  transform: translateY(-2px);
}

.checkin-option-icon {
  font-size: 1.45rem;
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.checkin-option-text {
  flex: 1;
  min-width: 0;
}

.checkin-option-label {
  display: block;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.3;
}

.checkin-option-desc {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.checkin-back {
  display: inline-block;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(248, 239, 224, 0.38);
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 200ms;
}

.checkin-back:hover {
  color: var(--muted);
}

.checkin-result-title {
  margin: 8px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  font-weight: 500;
  color: var(--ink);
}

.checkin-result-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.checkin-suggestions {
  display: grid;
  gap: 9px;
}

.checkin-suggestion {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 230, 182, 0.18);
  border-radius: 8px;
  background: rgba(255, 246, 226, 0.05);
  cursor: pointer;
  text-align: left;
  transition: background 240ms var(--ease), border-color 240ms var(--ease), transform 200ms var(--ease);
}

.checkin-suggestion:hover {
  background: rgba(89, 99, 61, 0.22);
  border-color: rgba(138, 163, 123, 0.48);
  transform: translateY(-2px);
}

.checkin-suggestion-label {
  display: block;
  margin-bottom: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
}

.checkin-suggestion-desc {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.checkin-redo {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  border: 1px dashed rgba(255, 230, 182, 0.18);
  border-radius: 8px;
  background: none;
  color: rgba(248, 239, 224, 0.36);
  font-size: 0.8rem;
  text-align: center;
  cursor: pointer;
  transition: color 200ms, border-color 200ms;
}

.checkin-redo:hover {
  color: var(--muted);
  border-color: rgba(255, 230, 182, 0.32);
}

/* ── Fiche météo émotionnelle (plein écran) ───────────────── */

.checkin-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background:
    linear-gradient(180deg, rgba(28, 16, 6, 0.78) 0%, rgba(18, 10, 4, 0.88) 100%),
    var(--hall-image) center top / cover no-repeat;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.checkin-result-overlay[hidden] {
  display: none;
}

.checkin-result-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.checkin-result-back {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  z-index: 2;
  color: var(--ink);
  background: rgba(6, 20, 38, 0.55);
  border: 1px solid rgba(255, 242, 214, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s;
}

.checkin-result-back:hover {
  background: rgba(6, 20, 38, 0.8);
}

.checkin-result-refresh {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 2;
  color: rgba(231, 168, 76, 0.95);
  background: rgba(20, 10, 4, 0.55);
  border: 1px solid rgba(231, 168, 76, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s, transform 0.4s var(--ease), border-color 0.25s;
}

.checkin-result-refresh:hover {
  background: rgba(231, 168, 76, 0.18);
  border-color: rgba(231, 168, 76, 0.7);
  transform: rotate(-30deg);
}

.checkin-result-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: max(72px, env(safe-area-inset-top) + 56px) 16px max(48px, env(safe-area-inset-bottom));
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  gap: 14px;
}

/* ── Hero (icône, kicker, titre, heure) ── */

.checkin-card-hero {
  text-align: center;
  padding-bottom: 4px;
}

.checkin-card-icon {
  display: inline-flex;
  justify-content: center;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 18px rgba(231, 168, 76, 0.5));
}

.checkin-card-icon svg { width: 56px; height: 56px; }

.checkin-card-kicker {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: rgba(231, 168, 76, 0.92);
  text-transform: uppercase;
  margin: 0 0 6px;
}

.checkin-card-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 8.5vw, 3.2rem);
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  line-height: 1.05;
}

.checkin-card-time {
  color: rgba(248, 239, 224, 0.55);
  font-size: 0.82rem;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* ── Sections (carte sombre flouée) ── */

.checkin-section {
  background: rgba(15, 8, 3, 0.55);
  border: 1px solid rgba(200, 180, 150, 0.18);
  border-radius: 14px;
  padding: 16px 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.checkin-section > .kicker {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: rgba(231, 168, 76, 0.85);
  margin: 0 0 12px;
  text-transform: uppercase;
}

/* ── Météo ── */

.checkin-meteo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.checkin-meteo-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 240, 210, 0.04);
  transition: all 0.25s var(--ease);
}

.checkin-meteo-tile.is-selected {
  background: rgba(231, 168, 76, 0.18);
  border-color: rgba(231, 168, 76, 0.55);
  box-shadow: 0 2px 14px rgba(231, 168, 76, 0.25), inset 0 1px 0 rgba(255, 220, 130, 0.15);
  transform: translateY(-1px);
}

.checkin-meteo-icon {
  font-size: 1.55rem;
  line-height: 1;
}

.checkin-meteo-label {
  font-size: 0.6rem;
  color: rgba(248, 239, 224, 0.55);
  text-align: center;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.checkin-meteo-tile.is-selected .checkin-meteo-label {
  color: var(--ink);
}

.checkin-meteo-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: rgba(231, 168, 76, 0.08);
  border-radius: 8px;
  margin-bottom: 10px;
}

.checkin-meteo-summary-label {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  color: var(--ink);
}

.checkin-meteo-summary-sub {
  color: rgba(248, 239, 224, 0.62);
  font-size: 0.82rem;
}

.checkin-meteo-quote {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  color: rgba(248, 239, 224, 0.72);
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: center;
  margin: 0;
}

/* ── Recommandation ── */

.checkin-reco-main {
  margin-bottom: 14px;
}

.checkin-reco-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px;
}

.checkin-reco-desc {
  color: rgba(248, 239, 224, 0.72);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 14px;
}

.checkin-reco-cta {
  width: 100%;
  background: linear-gradient(180deg, #c69556 0%, #a87838 100%);
  border: 1px solid rgba(231, 168, 76, 0.65);
  color: #2d1a0e;
  height: 48px;
  font-weight: 600;
  border-radius: 999px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(231, 168, 76, 0.25);
}

.checkin-reco-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

.checkin-reco-alts {
  border-top: 1px solid rgba(200, 180, 150, 0.15);
  padding-top: 14px;
}

.checkin-reco-alts-kicker {
  font-size: 0.62rem !important;
  color: rgba(248, 239, 224, 0.45) !important;
  margin: 0 0 10px !important;
  letter-spacing: 0.14em !important;
}

.checkin-alt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkin-alt-activity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  background: rgba(255, 240, 210, 0.04);
  border: 1px solid rgba(200, 180, 150, 0.15);
  border-radius: 10px;
  color: rgba(248, 239, 224, 0.9);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  font-family: inherit;
}

.checkin-alt-activity:hover {
  background: rgba(255, 240, 210, 0.08);
  border-color: rgba(231, 168, 76, 0.4);
  transform: translateX(2px);
}

.checkin-alt-bullet {
  color: rgba(231, 168, 76, 0.75);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.checkin-alt-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.checkin-alt-label {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  color: var(--ink);
}

.checkin-alt-desc {
  font-size: 0.74rem;
  color: rgba(248, 239, 224, 0.55);
  line-height: 1.3;
}

.checkin-alt-arrow {
  color: rgba(231, 168, 76, 0.55);
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* ── Tags (état actuel) ── */

.checkin-tags-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.checkin-tag {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  background: rgba(255, 240, 210, 0.04);
  border: 1px solid rgba(200, 180, 150, 0.12);
  border-radius: 8px;
}

.checkin-tag-full {
  grid-column: 1 / -1;
}

.checkin-tag-label {
  font-size: 0.6rem;
  color: rgba(231, 168, 76, 0.75);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.checkin-tag-value {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  font-size: 0.95rem;
}

/* ── Historique du jour ── */

.checkin-history {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkin-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background: rgba(255, 240, 210, 0.03);
  border: 1px solid rgba(200, 180, 150, 0.1);
  border-radius: 8px;
  transition: background 0.2s;
}

.checkin-history-item.is-current {
  background: rgba(231, 168, 76, 0.1);
  border-color: rgba(231, 168, 76, 0.32);
}

.checkin-history-time {
  color: rgba(231, 168, 76, 0.85);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 48px;
}

.checkin-history-icon { font-size: 1.1rem; flex-shrink: 0; }

.checkin-history-label {
  color: rgba(248, 239, 224, 0.82);
  font-size: 0.85rem;
}

.checkin-history-note {
  font-size: 0.72rem;
  color: rgba(248, 239, 224, 0.5);
  text-align: center;
  margin: 8px 0 0;
  font-style: italic;
}

.checkin-history-note-solo {
  margin: 0 16px;
  font-size: 0.78rem;
}

/* ── Refaire ── */

.checkin-redo-btn {
  width: 100%;
  padding: 14px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 240, 210, 0.06);
  border: 1px solid rgba(200, 180, 150, 0.28);
  border-radius: 12px;
  color: rgba(248, 239, 224, 0.85);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.checkin-redo-btn:hover {
  background: rgba(255, 240, 210, 0.12);
  color: var(--ink);
  border-color: rgba(231, 168, 76, 0.45);
}

.checkin-result-weather {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 8px;
}

.checkin-result-icon {
  font-size: clamp(3.8rem, 16vw, 6.5rem);
  line-height: 1;
  filter: drop-shadow(0 4px 18px rgba(231, 168, 76, 0.38));
}

.checkin-result-label {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 8vw, 4rem);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(6, 20, 38, 0.7);
}

.checkin-result-sub {
  color: var(--muted);
  font-size: clamp(0.9rem, 3vw, 1.05rem);
  text-align: center;
}

.checkin-result-divider {
  width: min(220px, 60%);
  height: 1px;
  background: var(--line);
  margin: 24px auto;
  flex-shrink: 0;
}

.checkin-result-suggestion {
  text-align: center;
  width: 100%;
}

.checkin-result-activity-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 4vw, 1.55rem);
  color: var(--ink);
  margin: 8px 0 6px;
  text-shadow: 0 1px 8px rgba(6, 20, 38, 0.6);
}

.checkin-result-activity-desc {
  color: var(--muted);
  font-size: clamp(0.85rem, 2.8vw, 1rem);
  line-height: 1.5;
}

.checkin-result-goto {
  margin-top: 22px;
  width: min(100%, 320px);
}

.checkin-result-redo {
  margin-top: 12px;
  width: min(100%, 320px);
  opacity: 0.8;
}

/* ── Dot tableau (hall) ─────────────────────────────────── */

.hall-board-dot {
  left: 78.6%;
  top: 42.7%;
  background: rgba(185, 138, 75, 0.28);
  border-color: rgba(231, 168, 76, 0.65);
  box-shadow: 0 0 0 7px rgba(185, 138, 75, 0.1), 0 0 22px rgba(231, 168, 76, 0.45);
}

.hall-board-dot::before,
.hall-board-dot::after {
  border-color: rgba(231, 168, 76, 0.22);
}

/* ── Overlay tableau de liège (plein écran) ──────────────── */

.board-overlay {
  position: fixed;
  inset: 0;
  z-index: 118;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}

.board-overlay[hidden] { display: none; }

.board-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.board-ov-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(30, 14, 5, 0.55) 0%, rgba(18, 10, 4, 0.62) 100%),
    url("../../assets/images/nuit/accueil.png") center / cover no-repeat;
  z-index: 0;
}

body.theme-day .board-ov-bg {
  background-image:
    linear-gradient(180deg, rgba(60, 35, 10, 0.45) 0%, rgba(35, 20, 5, 0.52) 100%),
    url("../../assets/images/jour/accueiljour.png");
}

.board-ov-scroll {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

.board-ov-scroll::-webkit-scrollbar { display: none; }

/* ── Header navigation ── */

.board-ov-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 18px 0;
  flex-shrink: 0;
}

.board-ov-nav {
  color: var(--ink);
  background: rgba(20, 10, 4, 0.45);
  border: 1px solid rgba(255, 220, 160, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Identité ── */

.board-ov-identity {
  text-align: center;
  margin: 12px 16px 0;
  padding: 20px 24px 18px;
  background: rgba(15, 8, 3, 0.5);
  border: 1px solid rgba(200, 180, 150, 0.2);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.board-ov-icon {
  display: inline-flex;
  justify-content: center;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 16px rgba(156, 107, 60, 0.5));
}

.board-ov-icon svg { width: 52px; height: 52px; }

.board-ov-kicker {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: #c9b8e8;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.board-ov-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 8vw, 3rem);
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  line-height: 1.05;
}

.board-ov-tagline {
  color: rgba(248, 239, 224, 0.72);
  font-size: clamp(0.82rem, 2.8vw, 0.95rem);
  margin: 0;
  font-style: italic;
  line-height: 1.4;
}

/* ── Plateau de liège ── */

.board-cork {
  margin: 20px 16px 0;
  background: #7a4e2b;
  border-radius: 10px;
  padding: 20px 16px 24px;
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.35),
    0 6px 24px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  min-height: 160px;
}

/* Post-it note */
.board-note {
  position: relative;
  padding: 22px 10px 14px;
  border-radius: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.82rem, 2.8vw, 1rem);
  font-weight: 500;
  color: #2d1a0e;
  text-align: center;
  line-height: 1.3;
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.15);
  opacity: 0;
  animation: noteAppear 0.45s var(--ease) forwards;
  word-break: break-word;
}

/* Pin */
.board-note::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #e8d8c4, #8b6540 60%, #5c3d1e);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

/* Couleurs en rotation */
.board-note:nth-child(4n+1) { background: #f5b8cc; transform: rotate(-2.2deg); }
.board-note:nth-child(4n+2) { background: #d4c2ee; transform: rotate(1.8deg); }
.board-note:nth-child(4n+3) { background: #fddcc0; transform: rotate(-1.4deg); }
.board-note:nth-child(4n+4) { background: #b8d9c6; transform: rotate(2.5deg); }

.board-note.is-mine {
  background: #c9e6b8 !important;
  outline: 2px solid rgba(89, 130, 80, 0.55);
  outline-offset: 2px;
}

/* Petit cœur sous le mot */
.board-note::after {
  content: "♡";
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  opacity: 0.45;
  color: #5c3d1e;
}

/* Stagger d'apparition */
.board-note:nth-child(1)  { animation-delay: 0.05s; }
.board-note:nth-child(2)  { animation-delay: 0.10s; }
.board-note:nth-child(3)  { animation-delay: 0.15s; }
.board-note:nth-child(4)  { animation-delay: 0.20s; }
.board-note:nth-child(5)  { animation-delay: 0.25s; }
.board-note:nth-child(6)  { animation-delay: 0.30s; }
.board-note:nth-child(7)  { animation-delay: 0.35s; }
.board-note:nth-child(8)  { animation-delay: 0.40s; }
.board-note:nth-child(9)  { animation-delay: 0.45s; }

@keyframes noteAppear {
  from { opacity: 0; transform: translateY(10px) scale(0.88) rotate(0deg); }
  to   { opacity: 1; }
}
/* Conserver la rotation même après l'animation */
.board-note:nth-child(4n+1) { animation-name: noteAppear1; }
.board-note:nth-child(4n+2) { animation-name: noteAppear2; }
.board-note:nth-child(4n+3) { animation-name: noteAppear3; }
.board-note:nth-child(4n+4) { animation-name: noteAppear4; }

@keyframes noteAppear1 { from { opacity: 0; transform: translateY(10px) rotate(-2.2deg) scale(0.88); } to { opacity: 1; transform: translateY(0) rotate(-2.2deg) scale(1); } }
@keyframes noteAppear2 { from { opacity: 0; transform: translateY(10px) rotate(1.8deg) scale(0.88); }  to { opacity: 1; transform: translateY(0) rotate(1.8deg) scale(1); } }
@keyframes noteAppear3 { from { opacity: 0; transform: translateY(10px) rotate(-1.4deg) scale(0.88); } to { opacity: 1; transform: translateY(0) rotate(-1.4deg) scale(1); } }
@keyframes noteAppear4 { from { opacity: 0; transform: translateY(10px) rotate(2.5deg) scale(0.88); }  to { opacity: 1; transform: translateY(0) rotate(2.5deg) scale(1); } }

.board-cork-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255, 230, 190, 0.55);
  font-style: italic;
  font-size: 0.88rem;
  padding: 24px 0;
}

.board-cork-loading {
  color: rgba(255, 230, 190, 0.28);
  font-size: 0.78rem;
  animation: boardPulse 1.4s ease-in-out infinite;
}

@keyframes boardPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

/* ── Section bas (statut + formulaire) ── */

.board-ov-bottom {
  margin: 20px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Carte "déjà posté" */
.board-done-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(20, 10, 4, 0.55);
  border: 1px solid rgba(200, 180, 150, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.board-done-pin { font-size: 1.6rem; flex-shrink: 0; }

.board-done-text .kicker { margin: 0 0 2px; font-size: 0.62rem; color: #c9b8e8; }

.board-done-desc {
  color: rgba(248, 239, 224, 0.65);
  font-size: 0.78rem;
  margin: 0;
  line-height: 1.4;
}

.board-done-badge {
  margin-left: auto;
  flex-shrink: 0;
  text-align: center;
}

.board-done-label {
  display: block;
  font-size: 0.62rem;
  color: rgba(248, 239, 224, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.board-done-mot {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  color: #c9e6b8;
}

/* Formulaire de soumission */
.board-ov-form-section {
  padding: 16px 18px;
  background: rgba(20, 10, 4, 0.55);
  border: 1px solid rgba(200, 180, 150, 0.22);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.board-form-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: #c9b8e8;
  margin: 0 0 12px;
}

.board-ov-form {
  display: flex;
  gap: 10px;
}

.board-ov-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  background: rgba(255, 240, 210, 0.08);
  border: 1px solid rgba(200, 180, 150, 0.3);
  border-radius: 999px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.board-ov-input::placeholder { color: rgba(248, 239, 224, 0.32); }

.board-ov-input:focus {
  border-color: rgba(201, 184, 232, 0.6);
  background: rgba(255, 240, 210, 0.12);
}

.board-ov-publish {
  flex-shrink: 0;
  height: 46px;
  padding: 0 22px;
  background: #6b4f9e;
  border: 1px solid rgba(201, 184, 232, 0.35);
  border-radius: 999px;
  color: #f0eaff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s;
  white-space: nowrap;
}

.board-ov-publish:hover { background: #7d60b2; transform: scale(1.03); }

/* Méta ligne sous le formulaire (erreur + compteur) */
.board-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 18px;
  margin-top: 8px;
  gap: 8px;
}

.board-ov-error {
  margin: 0;
  font-size: 0.75rem;
  color: #f4a3a3;
  flex: 1;
  line-height: 1.3;
}

.board-ov-error[hidden] { display: none; }

.board-char-count {
  font-size: 0.7rem;
  color: rgba(248, 239, 224, 0.32);
  white-space: nowrap;
  transition: color 0.2s;
  margin-left: auto;
}

.board-char-count.is-near  { color: rgba(253, 210, 140, 0.65); }
.board-char-count.is-full  { color: rgba(244, 163, 163, 0.85); }

/* Bouton "Voir tous les mots" */
.board-see-all-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: rgba(255, 240, 210, 0.08);
  border: 1px solid rgba(200, 180, 150, 0.4);
  border-radius: 10px;
  color: rgba(248, 239, 224, 0.82);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-align: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.board-see-all-btn:hover {
  color: var(--ink);
  border-color: rgba(200, 180, 150, 0.65);
  background: rgba(255, 240, 210, 0.14);
}

@keyframes wordAppear {
  from { opacity: 0; transform: translateY(6px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Overlay "Tout voir" ─────────────────────────────────── */

.board-all-overlay {
  position: fixed;
  inset: 0;
  z-index: 119;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(25, 12, 4, 0.80) 0%, rgba(15, 8, 3, 0.88) 100%),
    url("../../assets/images/nuit/accueil.png") center / cover no-repeat;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}

.board-all-overlay[hidden] { display: none; }

.board-all-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.board-all-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 24px max(48px, env(safe-area-inset-bottom));
}

.board-all-back {
  margin-bottom: 24px;
  color: var(--ink);
  background: rgba(20, 10, 4, 0.5);
  border: 1px solid rgba(200, 180, 150, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.board-all-header {
  margin-bottom: 28px;
  text-align: center;
}

.board-all-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 8vw, 3.2rem);
  font-weight: 500;
  color: var(--ink);
  margin: 6px 0 4px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.board-all-count {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  margin: 0;
}

/* Plateau complet en colonnes de post-its */
.board-all-words {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: #7a4e2b;
  border-radius: 10px;
  padding: 20px 16px 24px;
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.35);
}

.board-all-word {
  position: relative;
  padding: 22px 10px 14px;
  border-radius: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.78rem, 2.6vw, 0.95rem);
  font-weight: 500;
  color: #2d1a0e;
  text-align: center;
  line-height: 1.3;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.28);
  opacity: 0;
  animation: wordAppear 0.4s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 0.04s);
  word-break: break-word;
}

.board-all-word::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #e8d8c4, #8b6540 60%, #5c3d1e);
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.board-all-word::after {
  content: "♡";
  display: block;
  margin-top: 5px;
  font-size: 0.7rem;
  opacity: 0.4;
  color: #5c3d1e;
}

.board-all-word:nth-child(4n+1) { background: #f5b8cc; transform: rotate(-2deg); }
.board-all-word:nth-child(4n+2) { background: #d4c2ee; transform: rotate(1.5deg); }
.board-all-word:nth-child(4n+3) { background: #fddcc0; transform: rotate(-1.2deg); }
.board-all-word:nth-child(4n+4) { background: #b8d9c6; transform: rotate(2deg); }

/* ── Dot gramophone (salle sensorielle) ──────────────────── */

.gramophone-dot {
  left: 14.8%;
  top: 55.8%;
  background: rgba(141, 122, 165, 0.28);
  border-color: rgba(180, 155, 210, 0.62);
  box-shadow: 0 0 0 7px rgba(141, 122, 165, 0.1), 0 0 22px rgba(141, 122, 165, 0.45);
}

.gramophone-dot::before,
.gramophone-dot::after {
  border-color: rgba(180, 155, 210, 0.22);
}

/* ── Dot cheminée (salle sensorielle) ─────────────────────── */

.fireplace-dot {
  left: 41.1%;
  top: 53.6%;
  background: rgba(231, 122, 60, 0.32);
  border-color: rgba(255, 168, 84, 0.7);
  box-shadow: 0 0 0 7px rgba(231, 122, 60, 0.12), 0 0 26px rgba(255, 140, 60, 0.55);
}

.fireplace-dot::before,
.fireplace-dot::after {
  border-color: rgba(255, 168, 84, 0.28);
}

/* ── Overlay gramophone ──────────────────────────────────── */

.gramophone-overlay {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.gramophone-overlay[hidden] {
  display: none;
}

.gramophone-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.gramophone-backdrop {
  position: absolute;
  inset: 0;
  background-image: url("../../assets/images/nuit/sallesensorielnuit.png");
  background-size: cover;
  background-position: center;
  transition: background-image 0.6s var(--ease);
}

.gramophone-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gramophone-tint, rgba(50, 20, 80, 0.72));
  transition: background 0.6s var(--ease);
}

/* tintes par catégorie */
.gramophone-overlay[data-category="gramophone"] .gramophone-backdrop::after { background: rgba(44, 18, 72, 0.72); }
.gramophone-overlay[data-category="rain"]       .gramophone-backdrop::after { background: rgba(12, 28, 60, 0.72); }
.gramophone-overlay[data-category="forest"]     .gramophone-backdrop::after { background: rgba(8, 36, 18, 0.74); }
.gramophone-overlay[data-category="cafe"]       .gramophone-backdrop::after { background: rgba(38, 16, 6, 0.72); }
.gramophone-overlay[data-category="lofi"]       .gramophone-backdrop::after { background: rgba(10, 18, 40, 0.76); }

/* ── Header (back + fav) ── */

.gramophone-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 18px 0;
  flex-shrink: 0;
}

.gramophone-nav-btn {
  color: var(--ink);
  background: rgba(6, 20, 38, 0.45);
  border: 1px solid rgba(255, 242, 214, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gramophone-fav-btn.is-fav svg {
  fill: var(--rose);
  stroke: var(--rose);
}

/* ── Visuel central ── */

.gramophone-visual {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 24px 0;
  min-height: 0;
}

.gramophone-art {
  font-size: clamp(5rem, 22vw, 9rem);
  line-height: 1;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.55));
  animation: gramophoneFloat 5s ease-in-out infinite;
}

@keyframes gramophoneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.gramophone-identity {
  text-align: center;
}

.gramophone-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}

.gramophone-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 9vw, 3.6rem);
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.05;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

.gramophone-tagline {
  font-size: clamp(0.85rem, 2.8vw, 1rem);
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

/* ── Carte lecteur ── */

.gramophone-player-card {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  margin: 16px 16px 0;
  padding: 20px 20px 22px;
  border-radius: 18px 18px 0 0;
  background: rgba(10, 8, 6, 0.72);
  border: 1px solid rgba(255, 242, 214, 0.12);
  border-bottom: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.gramophone-now-playing {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.gramophone-track-info {
  flex: 1;
  min-width: 0;
}

.gramophone-track-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 3.5vw, 1.35rem);
  color: var(--ink);
  margin: 4px 0 4px;
  font-weight: 500;
}

.gramophone-track-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

/* ── Waveform ── */

.gramophone-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
  flex-shrink: 0;
  padding-top: 14px;
}

.gramophone-waveform span {
  display: block;
  width: 3px;
  border-radius: 99px;
  background: var(--violet);
  height: 8px;
  opacity: 0.5;
  transition: height 0.2s;
}

.gramophone-overlay.is-playing .gramophone-waveform span:nth-child(1) { animation: wave 1.0s ease-in-out infinite; }
.gramophone-overlay.is-playing .gramophone-waveform span:nth-child(2) { animation: wave 0.8s ease-in-out 0.15s infinite; }
.gramophone-overlay.is-playing .gramophone-waveform span:nth-child(3) { animation: wave 1.2s ease-in-out 0.05s infinite; }
.gramophone-overlay.is-playing .gramophone-waveform span:nth-child(4) { animation: wave 0.9s ease-in-out 0.3s infinite; }
.gramophone-overlay.is-playing .gramophone-waveform span:nth-child(5) { animation: wave 1.1s ease-in-out 0.1s infinite; }

.gramophone-overlay.is-playing .gramophone-waveform span {
  opacity: 1;
}

@keyframes wave {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

/* ── Barre de progression ── */

.gramophone-progress-section {
  margin-bottom: 18px;
}

.gramophone-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 242, 214, 0.15);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 7px;
  cursor: pointer;
}

.gramophone-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--amber));
  border-radius: 99px;
  transition: width 1s linear;
}

.gramophone-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ── Contrôles ── */

.gramophone-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.gramophone-ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.15s;
}

.gramophone-ctrl-btn:hover {
  opacity: 1;
}

.gramophone-ctrl-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gramophone-play-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--violet);
  border: none;
  opacity: 1;
  box-shadow: 0 4px 20px rgba(141, 122, 165, 0.5);
  transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
}

.gramophone-play-btn:hover {
  background: #a08bbf;
  transform: scale(1.06);
}

.gramophone-play-btn svg {
  width: 22px;
  height: 22px;
}

.gramophone-play-btn .pause-icon { display: none; }
.gramophone-overlay.is-playing .gramophone-play-btn .play-icon  { display: none; }
.gramophone-overlay.is-playing .gramophone-play-btn .pause-icon { display: block; }

/* ── Barre d'onglets ── */

.gramophone-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  background: rgba(6, 6, 10, 0.82);
  border-top: 1px solid rgba(255, 242, 214, 0.08);
  padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
}

.gramophone-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(248, 239, 224, 0.38);
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  transition: color 0.25s;
  line-height: 1.2;
}

.gramophone-tab[aria-pressed="true"] {
  color: var(--ink);
}

.gramophone-tab-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.gramophone-tab[aria-pressed="true"] .gramophone-tab-icon {
  stroke: var(--violet);
}

/* ────────────────────────────────────────────────────────────
   Overlay Cheminée — Player dédié au feu
   ────────────────────────────────────────────────────────── */

.cheminee-overlay {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.cheminee-overlay[hidden] { display: none; }

.cheminee-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cheminee-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 70%, rgba(255, 140, 60, 0.32) 0%, rgba(200, 80, 24, 0.18) 30%, transparent 60%),
    linear-gradient(180deg, rgba(20, 10, 4, 0.85) 0%, rgba(35, 18, 8, 0.92) 50%, rgba(15, 7, 3, 0.96) 100%);
  z-index: 0;
  transition: background 0.6s var(--ease);
}

/* Variantes de teinte par couleur de feu */
.cheminee-overlay.color-blue   .cheminee-backdrop { background: radial-gradient(ellipse at 50% 70%, rgba(70, 140, 255, 0.32) 0%, rgba(30, 80, 200, 0.18) 30%, transparent 60%), linear-gradient(180deg, rgba(8, 12, 28, 0.92) 0%, rgba(12, 18, 40, 0.95) 100%); }
.cheminee-overlay.color-violet .cheminee-backdrop { background: radial-gradient(ellipse at 50% 70%, rgba(180, 100, 255, 0.32) 0%, rgba(120, 60, 200, 0.18) 30%, transparent 60%), linear-gradient(180deg, rgba(20, 8, 32, 0.92) 0%, rgba(30, 14, 50, 0.95) 100%); }
.cheminee-overlay.color-green  .cheminee-backdrop { background: radial-gradient(ellipse at 50% 70%, rgba(80, 220, 110, 0.32) 0%, rgba(40, 160, 80, 0.18) 30%, transparent 60%), linear-gradient(180deg, rgba(8, 22, 12, 0.92) 0%, rgba(12, 30, 18, 0.95) 100%); }
.cheminee-overlay.color-red    .cheminee-backdrop { background: radial-gradient(ellipse at 50% 70%, rgba(255, 80, 100, 0.32) 0%, rgba(190, 40, 60, 0.18) 30%, transparent 60%), linear-gradient(180deg, rgba(28, 8, 12, 0.92) 0%, rgba(38, 12, 16, 0.95) 100%); }

/* Header (back + favoris) */
.cheminee-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px 0;
}

.cheminee-nav-btn {
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: rgba(20, 10, 4, 0.55);
  border: 1px solid rgba(255, 200, 130, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Identité visuelle (icône + titre) */
.cheminee-visual {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 24px 8px;
}

.cheminee-art {
  filter: drop-shadow(0 6px 22px rgba(255, 140, 60, 0.55));
  margin-bottom: 14px;
  animation: chemineeFloat 4s ease-in-out infinite alternate;
}

.cheminee-art svg { width: 78px; height: 78px; }

@keyframes chemineeFloat {
  from { transform: translateY(0); }
  to   { transform: translateY(-4px); }
}

.cheminee-identity { max-width: 480px; }

.cheminee-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: rgba(255, 168, 84, 0.92);
  margin: 0 0 6px;
  text-transform: uppercase;
}

.cheminee-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
  line-height: 1.05;
}

.cheminee-tagline {
  color: rgba(248, 239, 224, 0.72);
  font-size: clamp(0.86rem, 2.8vw, 1rem);
  margin: 0;
  font-style: italic;
}

/* Carte du player */
.cheminee-player-card {
  position: relative;
  z-index: 1;
  margin: 18px 16px 0;
  padding: 16px 18px;
  background: rgba(20, 10, 4, 0.55);
  border: 1px solid rgba(255, 200, 130, 0.22);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cheminee-now-playing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.cheminee-track-info { flex: 1; min-width: 0; }

.cheminee-now-playing .kicker {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: rgba(255, 168, 84, 0.85);
  margin: 0 0 4px;
  text-transform: uppercase;
}

.cheminee-track-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 2px;
}

.cheminee-track-desc {
  color: rgba(248, 239, 224, 0.65);
  font-size: 0.82rem;
  margin: 0;
}

/* Waveform (5 barres animées) */
.cheminee-waveform {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  flex-shrink: 0;
}

.cheminee-waveform span {
  display: block;
  width: 3px;
  background: linear-gradient(180deg, #ffeb8a, #ff8c3c);
  border-radius: 2px;
  animation: chemineeWave 1.1s ease-in-out infinite;
}

.cheminee-waveform span:nth-child(1) { height: 60%; animation-delay: 0s;     }
.cheminee-waveform span:nth-child(2) { height: 90%; animation-delay: 0.15s;  }
.cheminee-waveform span:nth-child(3) { height: 50%; animation-delay: 0.3s;   }
.cheminee-waveform span:nth-child(4) { height: 80%; animation-delay: 0.45s;  }
.cheminee-waveform span:nth-child(5) { height: 65%; animation-delay: 0.6s;   }

@keyframes chemineeWave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.55; }
  50%       { transform: scaleY(1);   opacity: 1; }
}

.cheminee-overlay:not(.is-playing) .cheminee-waveform span {
  animation-play-state: paused;
  opacity: 0.35;
}

/* Couleurs alternatives de la waveform */
.cheminee-overlay.color-blue   .cheminee-waveform span { background: linear-gradient(180deg, #cfe2ff, #4a8cff); }
.cheminee-overlay.color-violet .cheminee-waveform span { background: linear-gradient(180deg, #e9d4ff, #a96cff); }
.cheminee-overlay.color-green  .cheminee-waveform span { background: linear-gradient(180deg, #d4ffd9, #50d472); }
.cheminee-overlay.color-red    .cheminee-waveform span { background: linear-gradient(180deg, #ffd4d4, #ff4858); }

/* Progress bar */
.cheminee-progress-section { margin-bottom: 14px; }

.cheminee-progress-bar {
  position: relative;
  height: 4px;
  background: rgba(255, 200, 130, 0.15);
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
}

.cheminee-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff8c3c, #ffeb8a);
  border-radius: 999px;
  width: 0%;
  transition: width 0.3s linear;
}

.cheminee-overlay.color-blue   .cheminee-progress-fill { background: linear-gradient(90deg, #4a8cff, #cfe2ff); }
.cheminee-overlay.color-violet .cheminee-progress-fill { background: linear-gradient(90deg, #a96cff, #e9d4ff); }
.cheminee-overlay.color-green  .cheminee-progress-fill { background: linear-gradient(90deg, #50d472, #d4ffd9); }
.cheminee-overlay.color-red    .cheminee-progress-fill { background: linear-gradient(90deg, #ff4858, #ffd4d4); }

.cheminee-times {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.72rem;
  color: rgba(248, 239, 224, 0.55);
  font-variant-numeric: tabular-nums;
}

/* Contrôles */
.cheminee-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.cheminee-ctrl-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 200, 130, 0.06);
  border: 1px solid rgba(255, 200, 130, 0.22);
  color: rgba(255, 200, 130, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cheminee-ctrl-btn:hover {
  background: rgba(255, 200, 130, 0.14);
  color: #ff8c3c;
  border-color: rgba(255, 140, 60, 0.5);
}

.cheminee-ctrl-btn svg { width: 18px; height: 18px; }

.cheminee-play-btn {
  width: 60px;
  height: 60px;
  background: linear-gradient(180deg, #ff8c3c 0%, #c84418 100%);
  border-color: rgba(255, 140, 60, 0.65);
  color: #2d1a0e;
  box-shadow: 0 4px 18px rgba(255, 140, 60, 0.35);
}

.cheminee-play-btn:hover {
  background: linear-gradient(180deg, #ffa050 0%, #d85020 100%);
  filter: brightness(1.05);
  color: #2d1a0e;
}

.cheminee-play-btn svg { width: 24px; height: 24px; fill: #2d1a0e; stroke: #2d1a0e; }
.cheminee-play-btn .pause-icon { display: none; }
.cheminee-overlay.is-playing .cheminee-play-btn .play-icon  { display: none; }
.cheminee-overlay.is-playing .cheminee-play-btn .pause-icon { display: block; }

/* Variantes de couleur du play button */
.cheminee-overlay.color-blue   .cheminee-play-btn { background: linear-gradient(180deg, #4a8cff, #1c4dab); }
.cheminee-overlay.color-violet .cheminee-play-btn { background: linear-gradient(180deg, #a96cff, #5a2db5); }
.cheminee-overlay.color-green  .cheminee-play-btn { background: linear-gradient(180deg, #50d472, #1c8a3a); }
.cheminee-overlay.color-red    .cheminee-play-btn { background: linear-gradient(180deg, #ff4858, #aa1828); }

/* Palette des couleurs de feu */
.cheminee-colors-section {
  position: relative;
  z-index: 1;
  margin: 18px 16px max(24px, env(safe-area-inset-bottom));
  padding: 14px 16px;
  background: rgba(15, 8, 3, 0.55);
  border: 1px solid rgba(200, 180, 150, 0.18);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cheminee-colors-kicker {
  font-size: 0.66rem !important;
  letter-spacing: 0.16em !important;
  color: rgba(255, 168, 84, 0.82) !important;
  margin: 0 0 10px !important;
}

.cheminee-colors {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.cheminee-color {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  border: 2px solid transparent;
  background: rgba(255, 200, 130, 0.05);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10%;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.cheminee-color:hover { transform: translateY(-2px); }

.cheminee-color.is-selected {
  border-color: rgba(255, 200, 130, 0.7);
  background: rgba(255, 200, 130, 0.12);
  box-shadow: 0 4px 16px rgba(255, 140, 60, 0.18);
}

.cheminee-color-flame {
  display: block;
  width: 50%;
  height: 70%;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  filter: blur(0.4px);
  animation: chemineeFlameFlicker 1.6s ease-in-out infinite alternate;
}

.cheminee-flame-orange { background: radial-gradient(ellipse at 50% 80%, #ffeb8a 0%, #ff8c3c 45%, #c84418 100%); box-shadow: 0 0 18px rgba(255, 140, 60, 0.6); }
.cheminee-flame-blue   { background: radial-gradient(ellipse at 50% 80%, #cfe2ff 0%, #4a8cff 45%, #1c4dab 100%); box-shadow: 0 0 18px rgba(74, 140, 255, 0.6); }
.cheminee-flame-violet { background: radial-gradient(ellipse at 50% 80%, #e9d4ff 0%, #a96cff 45%, #5a2db5 100%); box-shadow: 0 0 18px rgba(169, 108, 255, 0.6); }
.cheminee-flame-green  { background: radial-gradient(ellipse at 50% 80%, #d4ffd9 0%, #50d472 45%, #1c8a3a 100%); box-shadow: 0 0 18px rgba(80, 212, 114, 0.6); }
.cheminee-flame-red    { background: radial-gradient(ellipse at 50% 80%, #ffd4d4 0%, #ff4858 45%, #aa1828 100%); box-shadow: 0 0 18px rgba(255, 72, 88, 0.6); }

@keyframes chemineeFlameFlicker {
  from { transform: scale(0.95) translateY(2px); opacity: 0.85; }
  to   { transform: scale(1.05) translateY(-2px); opacity: 1; }
}

@media (max-width: 760px) {
  .app {
    min-height: 100dvh;
  }

  .home-copy {
    width: min(88vw, 520px);
    padding-top: max(22px, env(safe-area-inset-top));
    padding-bottom: max(22px, env(safe-area-inset-bottom));
  }

  .house-silhouette {
    width: 86vw;
    height: 34vh;
  }

  .room-copy {
    width: min(92vw, 520px);
    margin-bottom: 5vh;
  }

  .fireplace {
    width: 220px;
    height: 170px;
    bottom: 18%;
  }

  .plant {
    display: none;
  }

  .dollhouse {
    width: min(100vw, calc((100dvh - 62px) * 0.5625));
    height: min(calc(100dvh - 62px), 177.78vw);
  }

  .room-layout {
    height: auto;
    min-height: calc(100dvh - 112px);
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 58px;
  }

  .gallery-art {
    height: 34vh;
    min-height: 220px;
  }

  .gallery-art {
    gap: 8px;
  }

  .art-piece {
    border-width: 6px;
  }

  .panel {
    padding: 18px;
  }

  .breath-orb {
    width: min(70vw, 280px);
  }

  .hall-checkin-dot {
    left: 83.7%;
    top: 66.3%;
  }

  .checkin-options-grid {
    grid-template-columns: 1fr;
  }

  .hall-bench-dot {
    left: 17%;
    top: 51%;
  }

  .hall-door-dot {
    top: 42%;
  }

  .activity-card {
    bottom: max(20px, env(safe-area-inset-bottom));
    padding: 18px;
  }

  .journal-book {
    width: min(94vw, 430px);
    height: min(86vh, 690px);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(90, 58, 26, 0.2);
    border-radius: 10px;
    background:
      repeating-linear-gradient(
        transparent,
        transparent 27px,
        rgba(139, 109, 70, 0.14) 27px,
        rgba(139, 109, 70, 0.14) 28px
      ),
      linear-gradient(150deg, #f6ebd8, #eadbbd);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.66);
  }

  .book-left-page {
    flex: 0 0 auto;
    max-height: none;
    border-radius: 10px 10px 0 0;
    background: transparent;
    overflow: visible;
  }

  .book-right-page {
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 0 0 10px 10px;
    background: transparent;
  }

  .book-spine {
    display: none;
  }

  .book-page-inner {
    padding: 18px 24px;
  }

  .book-left-page .book-page-inner {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(90, 58, 26, 0.18);
    overflow: visible;
  }

  .book-right-page .book-page-inner {
    padding-top: 18px;
  }

  .book-title {
    margin-bottom: 12px;
    padding-bottom: 10px;
    font-size: 1rem;
    letter-spacing: 0.12em;
  }

  .journal-calendar {
    gap: 9px;
  }

  .calendar-header {
    font-size: 0.9rem;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 4px;
  }

  .calendar-day {
    font-size: 0.7rem;
  }

  .journal-new-btn {
    margin-top: 0;
    padding: 8px 10px;
    border-radius: 7px;
  }

  .journal-entry-read {
    height: 100%;
    padding: 18px 22px;
  }

  .journal-entry-read-content,
  .journal-entry-textarea {
    font-size: 1rem;
    line-height: 1.85;
  }

  .journal-new-form {
    padding: 16px 22px 18px;
  }

  .journal-close-btn {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, 4vw);
    width: 38px;
    height: 38px;
  }

  .journaling-dot-book {
    left: 49.7%;
    top: 52.3%;
  }

  .journaling-dot-pen {
    left: 7.8%;
    top: 61.9%;
  }

  .library-dot-desk {
    left: 28%;
    top: 45%;
  }

  .library-dot-left {
    left: 38.1%;
    top: 32.2%;
  }

  .library-dot-right {
    left: 78.9%;
    top: 33.5%;
  }
}

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

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 1ms !important;
  scroll-behavior: auto !important;
  transition-duration: 1ms !important;
}
