/* ============================================================
   Door, home, timeline, day pages, and the interactions
   ============================================================ */

/* ============================== DOOR ============================== */

.door-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background: #241531;
  transition: opacity 0.7s ease, visibility 0.7s;
}

.door-screen.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hallway {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 40px 20px 110px;
  background-color: #33203f;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(247, 213, 126, 0.2), transparent 52%),
    radial-gradient(ellipse at 50% 115%, rgba(0, 0, 0, 0.6), transparent 55%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 14%, transparent 86%, rgba(0, 0, 0, 0.22)),
    repeating-linear-gradient(0deg, transparent 0 82px, rgba(255, 255, 255, 0.035) 82px 84px),
    repeating-linear-gradient(90deg, transparent 0 110px, rgba(255, 255, 255, 0.028) 110px 112px),
    linear-gradient(160deg, #3b234d, #241531 70%);
}

.hallway::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent 30%),
    repeating-linear-gradient(100deg, #26182f 0 3px, #2d1c38 3px 90px, #24162c 90px 93px);
  border-top: 2px solid rgba(242, 193, 78, 0.18);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.3);
}

.hallway-light {
  position: absolute;
  top: -90px;
  left: 50%;
  width: 380px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(247, 213, 126, 0.28), transparent 68%);
  transform: translateX(-50%);
  pointer-events: none;
}

.wall-art {
  position: absolute;
  top: 22%;
  display: grid;
  place-items: center;
  width: 92px;
  height: 116px;
  border: 8px solid #c49a4e;
  background: #f1e2c6;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  color: #5e3b51;
  font-size: 2.2rem;
  opacity: 0.85;
}
.wall-art--left {
  left: 6%;
  transform: rotate(-4deg);
}
.wall-art--right {
  right: 6%;
  transform: rotate(3deg);
}
.wall-art span {
  filter: grayscale(0.2) sepia(0.2);
}

.door-stage {
  position: relative;
  z-index: 3;
  width: min(72vw, 390px);
  margin-top: -10px;
}

.door-plaque {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 9px 26px 11px;
  border: 3px solid #b48434;
  border-radius: 5px;
  background: linear-gradient(#f8d983, #d9aa4c);
  color: #3a2340;
  box-shadow: 0 5px 0 #8d6222, 0 14px 26px rgba(0, 0, 0, 0.3);
  text-align: center;
  transform: rotate(-0.8deg);
}
.door-plaque::before,
.door-plaque::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6d4618;
  transform: translateY(-50%);
}
.door-plaque::before {
  left: 8px;
}
.door-plaque::after {
  right: 8px;
}
.plaque-small {
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.7;
}
.plaque-name {
  font-family: var(--font-hand);
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 700;
  line-height: 1;
}

.door-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 0.545;
  padding: 15px;
  border-radius: 7px 7px 2px 2px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 16%, transparent 84%, rgba(96, 56, 18, 0.35)),
    linear-gradient(#f6cf6b, #d6a23e 65%, #b9832c);
  box-shadow:
    0 0 0 4px #8d6222,
    0 24px 48px rgba(0, 0, 0, 0.48),
    inset 0 0 0 2px rgba(255, 255, 255, 0.24);
  perspective: 1600px;
}

.door-frame::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(90, 53, 14, 0.35);
  border-radius: 3px;
  pointer-events: none;
}

.door {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.24)),
    linear-gradient(160deg, #67458f, #4b2d6e 55%, #3c235c);
  box-shadow:
    inset 0 0 0 3px rgba(33, 18, 49, 0.55),
    inset 0 0 70px rgba(16, 8, 26, 0.55);
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1.35s cubic-bezier(0.65, 0, 0.25, 1), box-shadow 1s;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.door:hover {
  box-shadow:
    inset 0 0 0 3px rgba(33, 18, 49, 0.55),
    inset 0 0 70px rgba(16, 8, 26, 0.45),
    0 0 40px rgba(242, 193, 78, 0.16);
}

.door:active {
  transform: perspective(900px) rotateY(-2deg) scale(0.995);
}

.door-screen.is-open .door {
  transform: rotateY(-112deg);
  box-shadow: 20px 0 40px rgba(0, 0, 0, 0.35);
}

.door-screen.is-open .door-glow,
.door-screen.is-open .door-light {
  opacity: 1;
  transform: scale(1.05);
}

.door-panels {
  position: absolute;
  inset: 8%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1.2fr 1fr 1fr;
  gap: 9%;
  pointer-events: none;
}

.panel {
  border-radius: 2px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(20, 10, 30, 0.22));
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.1),
    inset -2px -2px 0 rgba(20, 10, 30, 0.35),
    0 0 0 1px rgba(22, 10, 34, 0.35);
}

.door-number {
  position: absolute;
  top: 6.5%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid #c89b46;
  border-radius: 50%;
  background: linear-gradient(145deg, #f6d67f, #c69235);
  color: #3f2454;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
}

.door-peephole {
  position: absolute;
  top: 28%;
  left: 50%;
  width: 19px;
  height: 19px;
  border: 3px solid #b78c3e;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #eee8d7, #5e4a2c 45%, #24160e 70%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(20, 10, 30, 0.28);
  transform: translateX(-50%);
}

.door-photo-frame {
  position: absolute;
  top: 21%;
  left: 50%;
  z-index: 2;
  width: 82px;
  height: 100px;
  transform: translateX(-50%) rotate(-2deg);
  pointer-events: none;
}
.door-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.28));
}

.door-knob {
  position: absolute;
  right: 9%;
  top: 53%;
  z-index: 4;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 3px solid #a7772a;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fbdf95, #d2a043 45%, #8d5d1e 100%);
  box-shadow: 0 4px 7px rgba(0, 0, 0, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.7);
  cursor: pointer;
}
.door-knob::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 6px;
  width: 38px;
  height: 10px;
  border-radius: 8px;
  background: linear-gradient(#d9ad55, #9d6f25);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.door-chain {
  position: absolute;
  top: 47%;
  left: 11%;
  width: 58px;
  height: 32px;
  border-top: 2px solid rgba(225, 190, 120, 0.65);
  border-right: 2px solid rgba(225, 190, 120, 0.65);
  border-radius: 0 20px 0 0;
  opacity: 0.55;
  transform: rotate(8deg);
}

.door-note {
  position: absolute;
  left: 50%;
  bottom: 8%;
  padding: 5px 12px 7px;
  background: #f4e7c8;
  color: #5c3b27;
  font-family: var(--font-hand);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%) rotate(-2deg);
}
.door-note::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 38px;
  height: 10px;
  background: rgba(242, 193, 78, 0.7);
  transform: translateX(-50%) rotate(1deg);
}

.door-glow {
  position: absolute;
  inset: 15px;
  border-radius: 3px;
  background:
    radial-gradient(ellipse at 55% 58%, #ffe8ad, #f3bf62 34%, #a8652d 72%, #4a2a16 100%);
  opacity: 0;
  transition: opacity 0.85s ease 0.12s, transform 1.2s ease;
  pointer-events: none;
}
.door-glow::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 0;
  height: 36%;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(to top, rgba(45, 24, 18, 0.72), transparent);
}

.door-light {
  position: absolute;
  inset: 15px;
  border-radius: 3px;
  background: radial-gradient(ellipse at 50% 55%, rgba(255, 232, 173, 0.6), transparent 72%);
  opacity: 0;
  filter: blur(16px);
  transition: opacity 1s ease 0.15s, transform 1.5s ease;
  pointer-events: none;
  z-index: -1;
}

.door-screen.is-knocked .door {
  animation: doorKnock 0.5s ease;
}
@keyframes doorKnock {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px) rotateY(0.6deg); }
  45% { transform: translateX(3px) rotateY(-0.6deg); }
  70% { transform: translateX(-2px); }
}

.door-hint {
  position: relative;
  margin-top: 22px;
  color: rgba(247, 237, 219, 0.6);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-align: center;
}

.doormat {
  position: absolute;
  left: 50%;
  bottom: 6%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(54vw, 300px);
  height: 58px;
  border: 3px solid #1c1220;
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.15) 0 2px, transparent 2px 12px),
    linear-gradient(#5a3e2e, #40291e);
  color: rgba(242, 193, 78, 0.72);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%) rotate(-1deg);
}

/* passcode */

.passcode {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 22px;
}

.passcode__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 7, 20, 0.64);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fadeIn 0.3s ease both;
}

.passcode__note {
  position: relative;
  width: min(430px, 100%);
  padding: clamp(28px, 6vw, 40px);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.9), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23p)' opacity='.05'/%3E%3C/svg%3E");
  color: var(--ink);
  border-radius: 4px 4px 14px 4px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.2deg);
  animation: noteIn 0.55s var(--ease-spring) both;
}
@keyframes noteIn {
  from {
    opacity: 0;
    transform: translateY(30px) rotate(-4deg) scale(0.94);
  }
}

.passcode__kicker {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brick);
}

.passcode__question {
  margin: 10px 0 20px;
  font-family: var(--font-hand);
  font-size: clamp(1.7rem, 5vw, 2.15rem);
  line-height: 1.08;
  color: var(--plum-800);
}

.passcode__digits {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 12px;
  direction: ltr;
  margin: 20px 0;
}

.passcode__digit {
  flex: 0 0 52px;
  width: 52px;
  height: 58px;
  padding: 0;
  border: 2px solid rgba(69, 44, 100, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font: 700 1.5rem/1 var(--font-mono);
  text-align: center;
  writing-mode: horizontal-tb;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}

.passcode__digit:focus {
  border-color: var(--plum-500);
  background: #fff;
}

.passcode__input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid rgba(69, 44, 100, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}
.passcode__input:focus {
  border-color: var(--plum-500);
  background: #fff;
}
.passcode__input::placeholder {
  color: rgba(59, 42, 32, 0.4);
}

.passcode__note .btn {
  margin-top: 12px;
}

.passcode__error {
  min-height: 22px;
  margin-top: 8px;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 700;
}
.passcode__error.is-success {
  color: #3d7d75;
  font-family: var(--font-hand);
  font-size: 1.18rem;
  font-weight: 500;
}

.passcode__hint {
  margin-top: 6px;
  color: var(--coffee-2);
  font-family: var(--font-hand);
  font-size: 1.15rem;
  line-height: 1.25;
}

.passcode__fine {
  margin-top: 18px;
  color: rgba(59, 42, 32, 0.48);
  font-family: var(--font-hand);
  font-size: 1.05rem;
}

.passcode.is-wrong .passcode__note {
  animation: shake 0.45s ease;
}
@keyframes shake {
  0%, 100% { transform: rotate(-1.2deg) translateX(0); }
  20% { transform: rotate(-1.2deg) translateX(-9px); }
  40% { transform: rotate(-1.2deg) translateX(8px); }
  60% { transform: rotate(-1.2deg) translateX(-5px); }
  80% { transform: rotate(-1.2deg) translateX(3px); }
}

/* ============================== HOME ============================== */

.home-view {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  overflow: hidden;
  padding: 0;
  background-color: var(--plum-900);
  background-image:
    radial-gradient(ellipse at 50% 35%, rgba(134, 94, 173, 0.35), transparent 55%),
    radial-gradient(ellipse at 50% 110%, rgba(242, 193, 78, 0.14), transparent 48%),
    repeating-linear-gradient(0deg, transparent 0 78px, rgba(255, 255, 255, 0.03) 78px 80px),
    repeating-linear-gradient(90deg, transparent 0 104px, rgba(255, 255, 255, 0.022) 104px 106px),
    linear-gradient(165deg, #3c2554, #21132f 76%);
}

.home-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.string-lights {
  position: absolute;
  top: -12px;
  left: -2%;
  width: 104%;
  height: auto;
  opacity: 0.95;
  filter: drop-shadow(0 0 10px rgba(242, 193, 78, 0.7));
}
.string-lights .bulb {
  transform-box: fill-box;
  transform-origin: center;
  animation: bulbGlow 3.4s ease-in-out infinite;
}
.string-lights .bulb:nth-child(2n) {
  animation-delay: 0.6s;
}
.string-lights .bulb:nth-child(3n) {
  animation-delay: 1.3s;
}
.string-lights .bulb:nth-child(4n) {
  animation-delay: 2.1s;
}
@keyframes bulbGlow {
  0%, 100% { opacity: 0.6; filter: drop-shadow(0 0 2px rgba(255, 220, 130, 0.4)); }
  50% { opacity: 1; filter: drop-shadow(0 0 8px rgba(255, 226, 150, 0.95)); }
}

.home-frames {
  position: absolute;
  inset: 86px 3% auto;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0.9;
}
.home-frame {
  width: clamp(66px, 9vw, 104px);
  padding: 5px 5px 18px;
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}
.home-frame:nth-child(1) { transform: rotate(-6deg) translateY(8px); }
.home-frame:nth-child(2) { transform: rotate(4deg); }
.home-frame:nth-child(3) { transform: rotate(-3deg) translateY(16px); }
.home-frame:nth-child(4) { transform: rotate(6deg) translateY(4px); }
.home-frame:nth-child(5) { transform: rotate(-4deg) translateY(12px); }
.home-frame:nth-child(6) { transform: rotate(3deg); }
.home-frame img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.9) contrast(1.03);
}

.couch {
  position: absolute;
  left: 50%;
  bottom: 2%;
  width: min(560px, 76vw);
  height: clamp(130px, 20vw, 190px);
  transform: translateX(-50%);
  filter: drop-shadow(0 20px 24px rgba(0, 0, 0, 0.4));
  opacity: 0.92;
}
.couch__back {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 0;
  height: 62%;
  border-radius: 38px 38px 12px 12px;
  background: linear-gradient(#4f8378, #35675f);
  box-shadow: inset 0 8px 0 rgba(255, 255, 255, 0.08), inset 0 -10px 20px rgba(0, 0, 0, 0.22);
}
.couch__seat {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14%;
  height: 44%;
  border-radius: 20px 20px 26px 26px;
  background: linear-gradient(#5b9285, #35675f);
  box-shadow: inset 0 8px 0 rgba(255, 255, 255, 0.08), inset 0 -14px 18px rgba(0, 0, 0, 0.24);
}
.couch__seat .cushion {
  position: absolute;
  top: 12%;
  width: 30%;
  height: 62%;
  border-radius: 16px 16px 22px 22px;
  background: linear-gradient(rgba(255, 255, 255, 0.14), rgba(0, 0, 0, 0.08));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.16), 0 5px 8px rgba(0, 0, 0, 0.12);
}
.couch__seat .cushion:nth-child(1) { left: 4%; }
.couch__seat .cushion:nth-child(2) { left: 35%; }
.couch__seat .cushion:nth-child(3) { right: 4%; }
.couch__arm {
  position: absolute;
  bottom: 10%;
  width: 12%;
  height: 54%;
  border-radius: 26px 26px 20px 20px;
  background: linear-gradient(#4a7c72, #2d5a53);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.08), inset 0 -8px 14px rgba(0, 0, 0, 0.2);
}
.couch__arm--left { left: -3%; }
.couch__arm--right { right: -3%; }
.couch__legs {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -2%;
  display: flex;
  justify-content: space-between;
}
.couch__legs i {
  width: 12px;
  height: 22px;
  border-radius: 0 0 5px 5px;
  background: #2a1a13;
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.08);
}
.couch-pillow {
  position: absolute;
  left: 12%;
  top: 30%;
  width: 62px;
  height: 58px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--gold-2), #d8a137);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.28), 0 5px 8px rgba(0, 0, 0, 0.24);
  transform: rotate(-9deg);
  z-index: 2;
}
.couch-pillow::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(75, 45, 15, 0.38);
  border-radius: 8px;
}

.floor-lamp {
  position: absolute;
  right: 9%;
  bottom: 8%;
  width: 70px;
  height: clamp(200px, 28vw, 300px);
  opacity: 0.85;
}
.floor-lamp__shade {
  position: absolute;
  top: 0;
  left: 50%;
  width: 92px;
  height: 58px;
  border-radius: 50% 50% 8px 8px;
  background: linear-gradient(90deg, #e8c06d, #f8d98e 50%, #bf8f35);
  transform: translateX(-50%);
  box-shadow: 0 0 40px rgba(242, 193, 78, 0.4);
}
.floor-lamp__pole {
  position: absolute;
  top: 54px;
  left: 50%;
  width: 5px;
  height: calc(100% - 60px);
  background: #2b1a12;
  transform: translateX(-50%);
}
.floor-lamp__base {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 50px;
  height: 10px;
  border-radius: 50%;
  background: #2b1a12;
  transform: translateX(-50%);
}

.plant {
  position: absolute;
  left: 7%;
  bottom: 7%;
  width: clamp(70px, 10vw, 110px);
  height: clamp(140px, 20vw, 210px);
  opacity: 0.8;
}
.plant__pot {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 60%;
  height: 36%;
  border-radius: 4px 4px 16px 16px;
  background: linear-gradient(90deg, #9b5542, #bf7159 50%, #7f3f30);
  transform: translateX(-50%);
}
.plant__leaf {
  position: absolute;
  left: 50%;
  bottom: 30%;
  width: 34px;
  height: 90px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(160deg, #568a5a, #2f6143);
  transform-origin: bottom center;
}
.plant__leaf:nth-child(1) { transform: translateX(-50%) rotate(-38deg); height: 78px; }
.plant__leaf:nth-child(2) { transform: translateX(-50%) rotate(-12deg); height: 104px; }
.plant__leaf:nth-child(3) { transform: translateX(-50%) rotate(16deg); height: 88px; }
.plant__leaf:nth-child(4) { transform: translateX(-50%) rotate(42deg); height: 70px; }

.coffee-table {
  position: absolute;
  left: 50%;
  bottom: 1%;
  width: min(330px, 46vw);
  height: 50px;
  transform: translateX(-50%);
  opacity: 0.9;
}
.coffee-table__top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(#7d5234, #5d3a24);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.coffee-table__leg {
  position: absolute;
  top: 12px;
  bottom: 0;
  width: 8px;
  border-radius: 3px;
  background: #3a2418;
}
.coffee-table__leg--l { left: 10%; }
.coffee-table__leg--r { right: 10%; }
.coffee-table__mug {
  position: absolute;
  left: 50%;
  top: -22px;
  width: 34px;
  height: 28px;
  border-radius: 3px 3px 12px 12px;
  background: linear-gradient(90deg, #efe3c9, #fffaf0 45%, #cdbb9c);
  box-shadow: 0 5px 4px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
}
.coffee-table__mug::before {
  content: "";
  position: absolute;
  right: -13px;
  top: 6px;
  width: 16px;
  height: 14px;
  border: 4px solid #efe3c9;
  border-left: 0;
  border-radius: 0 10px 10px 0;
}
.coffee-table__mug::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 3px;
  height: 4px;
  border-radius: 50%;
  background: #6b3e25;
}

.charm-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  --mx: 0px;
  --my: 0px;
}
.charm {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size, 46px);
  height: var(--size, 46px);
  opacity: var(--op, 0.86);
  transform: translate3d(calc(var(--mx) * var(--depth, 0.5)), calc(var(--my) * var(--depth, 0.5)), 0) rotate(var(--r, 0deg));
  transition: transform 0.35s ease-out;
  will-change: transform;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.3));
}
.charm__bob {
  width: 100%;
  height: 100%;
  animation: charmBob var(--dur, 7s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}
.charm svg {
  width: 100%;
  height: 100%;
  display: block;
}
@keyframes charmBob {
  0% { transform: translateY(-7px) rotate(-3deg); }
  100% { transform: translateY(8px) rotate(3deg); }
}

.home-content {
  position: relative;
  z-index: 5;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: clamp(44px, 8vh, 100px) clamp(18px, 5vw, 50px) clamp(150px, 19vh, 220px);
  text-align: center;
  transform: translateY(clamp(44px, 6vh, 72px));
}

.home-content .wordmark {
  margin-bottom: 18px;
  font-size: clamp(0.82rem, 1.7vw, 1.05rem);
  opacity: 0.7;
}

.home-content h1 {
  position: relative;
  top: 0;
  margin: 0;
  font-size: clamp(2.5rem, 6.6vw, 5.3rem);
  color: #87ceeb;
  text-shadow: 0 4px 0 rgba(27, 17, 39, 0.35);
}

.home-content h1 .script {
  display: inline-block;
  margin-left: 0.06em;
  font-size: 1.14em;
  line-height: 0.8;
  color: var(--gold-2);
  text-shadow: 0 3px 24px rgba(242, 193, 78, 0.24);
  transform: rotate(-1.5deg);
}

.home-content .lede {
  max-width: 520px;
  margin: 16px auto 0;
}

.countdown {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(8px, 1.6vw, 18px);
  margin: clamp(28px, 5vh, 46px) auto 0;
}

.count-unit {
  position: relative;
  width: clamp(66px, 15vw, 138px);
  padding: clamp(12px, 2.4vw, 22px) 6px clamp(9px, 1.6vw, 14px);
  border: 3px solid var(--gold);
  border-radius: 10px;
  background-color: var(--paper);
  background-image:
    linear-gradient(150deg, rgba(255, 255, 255, 0.7), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23p)' opacity='.05'/%3E%3C/svg%3E");
  color: var(--plum-800);
  box-shadow: 0 6px 0 rgba(12, 6, 20, 0.3), 0 16px 26px rgba(8, 4, 14, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  transform: rotate(-0.7deg);
}
.count-unit:nth-child(even) {
  transform: rotate(0.8deg) translateY(3px);
}
.count-unit::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 38px;
  height: 15px;
  background: rgba(242, 193, 78, 0.6);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transform: translateX(-50%) rotate(-2deg);
  mix-blend-mode: multiply;
}
.count-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6.2vw, 4rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--plum-800);
  transition: transform 0.18s;
}
.count-number.tick {
  animation: numTick 0.35s var(--ease-spring);
}
@keyframes numTick {
  0% { transform: translateY(-7px) scale(0.96); opacity: 0.5; }
  60% { transform: translateY(2px) scale(1.03); }
  100% { transform: none; opacity: 1; }
}
.count-label {
  display: block;
  margin-top: 7px;
  font-family: var(--font-display);
  font-size: clamp(0.46rem, 1.2vw, 0.64rem);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--coffee-3);
}
.count-dot {
  align-self: center;
  width: 7px;
  height: 7px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.12);
  opacity: 0.85;
}
.count-dot:nth-of-type(2) { background: var(--blue); }
.count-dot:nth-of-type(3) { background: var(--red); }

.countdown-caption {
  margin-top: 18px;
  font-family: var(--font-hand);
  font-size: clamp(1.05rem, 2.3vw, 1.35rem);
  color: rgba(247, 237, 219, 0.66);
}

.home-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(22px, 3.6vh, 34px);
}

.birthday-ready {
  margin-top: 26px;
  animation: cardIn 0.7s var(--ease-spring) both;
}
.birthday-ready__script {
  margin-bottom: 8px;
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1;
}
.birthday-ready .tiny {
  margin-top: 12px;
}

.home-footnote {
  margin-top: clamp(24px, 5vh, 48px);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 237, 219, 0.32);
}

/* ============================== TIMELINE ============================== */

.timeline-view {
  background-color: var(--plum-900);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(123, 86, 160, 0.3), transparent 55%),
    radial-gradient(ellipse at 50% 115%, rgba(242, 193, 78, 0.1), transparent 48%),
    repeating-linear-gradient(0deg, transparent 0 80px, rgba(255, 255, 255, 0.028) 80px 82px),
    repeating-linear-gradient(90deg, transparent 0 106px, rgba(255, 255, 255, 0.022) 106px 108px);
}

.timeline-view .view-inner {
  padding-top: clamp(38px, 7vw, 80px);
}

.page-head {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.page-head h1 {
  margin-top: 12px;
  font-size: clamp(2.4rem, 5.6vw, 4.3rem);
  color: var(--cream);
}
.page-head h1 .script {
  color: var(--gold-2);
}

.page-head .lede {
  max-width: 560px;
  margin: 14px auto 0;
}

.next-unlock {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 8px 16px;
  border: 1px solid rgba(242, 193, 78, 0.25);
  border-radius: 999px;
  background: rgba(242, 193, 78, 0.07);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: var(--gold-3);
}
.next-unlock__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.5);
  animation: ping 2.2s infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(242, 193, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 193, 78, 0); }
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 30px);
  width: min(1180px, 100%);
  margin: clamp(34px, 5vw, 54px) auto 0;
}

.day-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 9px 9px 14px;
  border: 0;
  border-radius: 3px;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--paper);
  background-image:
    linear-gradient(150deg, rgba(255, 255, 255, 0.6), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23p)' opacity='.05'/%3E%3C/svg%3E");
  color: var(--ink);
  text-align: left;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.55) inset, 0 18px 34px rgba(8, 4, 14, 0.3);
  transform: rotate(var(--tilt, -1deg));
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, filter 0.3s;
  cursor: pointer;
}
.day-card:nth-child(2n) { --tilt: 1.2deg; }
.day-card:nth-child(3n) { --tilt: 0.4deg; }
.day-card:hover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.55) inset, 0 28px 50px rgba(8, 4, 14, 0.38);
  z-index: 2;
}
.day-card:active {
  transform: rotate(var(--tilt)) translateY(-2px) scale(0.995);
}
.day-card::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  z-index: 3;
  width: 54px;
  height: 18px;
  background: rgba(242, 193, 78, 0.65);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transform: translateX(-50%) rotate(-2.5deg);
  mix-blend-mode: multiply;
}
.day-card:nth-child(even)::before {
  transform: translateX(-50%) rotate(2deg);
}

.day-card__photo {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--char, var(--plum-500));
}
.day-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--ease-out), filter 0.4s;
}
.day-card:hover .day-card__photo img {
  transform: scale(1.035);
}
.day-card__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(24, 13, 34, 0.26), transparent 42%),
    radial-gradient(ellipse at 50% 20%, transparent 50%, rgba(24, 13, 34, 0.14));
  pointer-events: none;
}

.day-card__date {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 4;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(24, 13, 34, 0.66);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
}
.day-card__today {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 4;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--plum-900);
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.day-card__meta {
  display: block;
  padding: 13px 7px 0;
}
.day-card__who {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-display);
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  font-weight: 600;
  color: var(--coffee);
}
.day-card__who span {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(59, 42, 32, 0.55);
}
.day-card__title {
  display: block;
  margin-top: 3px;
  font-family: var(--font-hand);
  font-size: clamp(1.05rem, 1.8vw, 1.24rem);
  line-height: 1.1;
  color: var(--plum-700);
  min-height: 1.2em;
}
.day-card__note {
  display: block;
  margin-top: 6px;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--muted);
}
.day-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}

.day-card__lock {
  position: absolute;
  inset: 9px 9px auto;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  pointer-events: none;
}
.day-card__lock::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(26, 15, 36, 0.36);
  backdrop-filter: blur(1.5px) saturate(0.75);
  -webkit-backdrop-filter: blur(1.5px) saturate(0.75);
}
.seal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 92px;
  padding: 12px 8px 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #d16666, #a53b3b 60%, #7e2727);
  color: #ffe4d6;
  text-align: center;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.25), inset 0 -3px 0 rgba(0, 0, 0, 0.2);
  transform: rotate(-7deg);
}
.seal::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(255, 228, 214, 0.55);
  border-radius: 50%;
}
.seal svg {
  width: 19px;
  height: 19px;
}
.seal b {
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.1;
}

.day-card.locked .day-card__photo img {
  filter: grayscale(0.45) sepia(0.28) saturate(0.7) brightness(0.72);
}
.day-card.locked .day-card__title {
  color: rgba(59, 42, 32, 0.38);
  letter-spacing: 0.06em;
}
.day-card.locked .day-card__who {
  color: rgba(59, 42, 32, 0.62);
}

.day-card.today {
  --tilt: 0deg;
  box-shadow: 0 0 0 3px var(--gold), 0 2px 0 rgba(255, 255, 255, 0.55) inset, 0 22px 44px rgba(8, 4, 14, 0.4);
  animation: todayGlow 3s ease-in-out infinite;
}
@keyframes todayGlow {
  0%, 100% { box-shadow: 0 0 0 3px var(--gold), 0 2px 0 rgba(255, 255, 255, 0.55) inset, 0 22px 44px rgba(8, 4, 14, 0.4); }
  50% { box-shadow: 0 0 0 4px var(--gold-2), 0 0 34px rgba(242, 193, 78, 0.28), 0 2px 0 rgba(255, 255, 255, 0.55) inset, 0 22px 44px rgba(8, 4, 14, 0.4); }
}
.day-card.today::before {
  background: var(--gold);
}

.day-card.done .day-card__photo::before {
  content: none;
}
.day-card.done .day-card__photo img {
  filter: saturate(1.05);
}

/* finale card */

.day-card--finale {
  grid-column: span 2;
  display: block;
  padding: 0;
  overflow: hidden;
  background: var(--plum-900);
  color: var(--cream);
  --tilt: 0deg;
  min-height: 280px;
}
.day-card--finale::before {
  display: none;
}
.day-card--finale .day-card__photo {
  aspect-ratio: 2 / 1;
  height: 100%;
  min-height: 280px;
}
.day-card--finale .day-card__photo img {
  object-fit: contain;
  object-position: top center;
  background: var(--plum-900);
}
.day-card--finale .day-card__finale-title {
  position: absolute;
  inset: 0 54% 0 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--gold-2);
  font-family: var(--font-hand);
  font-size: clamp(1.3rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.48);
  transform: rotate(-3deg);
  pointer-events: none;
}
.day-card--finale .day-card__lock {
  inset: 9px;
  aspect-ratio: auto;
}

.day-card--finale .day-card__stamp {
  display: none;
}

.week-note {
  width: min(660px, 100%);
  margin: clamp(28px, 4vw, 44px) auto 0;
  padding: 16px 22px;
  border: 1px dashed rgba(242, 193, 78, 0.26);
  border-radius: 10px;
  background: rgba(15, 8, 25, 0.24);
  color: rgba(247, 237, 219, 0.6);
  font-size: 0.82rem;
  text-align: center;
}
.week-note .script {
  font-size: 1.25rem;
  color: var(--gold-2);
}

/* ============================== DAY ============================== */

.day-view {
  background-color: var(--plum-900);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(123, 86, 160, 0.28), transparent 52%),
    radial-gradient(ellipse at 50% 110%, rgba(242, 193, 78, 0.08), transparent 48%),
    repeating-linear-gradient(0deg, transparent 0 80px, rgba(255, 255, 255, 0.025) 80px 82px);
}

.day-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 44px) clamp(16px, 4vw, 40px) 60px;
}

.day-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247, 237, 219, 0.56);
  transition: color 0.18s;
}
.day-back:hover {
  color: var(--gold-2);
}

.day-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 300px) 1fr;
  align-items: center;
  gap: clamp(22px, 4vw, 50px);
  padding: clamp(24px, 4vw, 46px);
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(27, 17, 39, 0.28), rgba(27, 17, 39, 0.75)),
    var(--char, var(--plum-600));
  box-shadow: var(--shadow-lg);
}
.day-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 22% 18%, rgba(255, 255, 255, 0.2), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 68px, rgba(255, 255, 255, 0.04) 68px 70px);
  pointer-events: none;
}
.day-portrait {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 9px 9px 26px;
  background: var(--paper);
  box-shadow: 0 20px 36px rgba(10, 5, 17, 0.4);
  transform: rotate(-2deg);
}
.day-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
  background: var(--cream-2);
}
.day-portrait__tape {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 58px;
  height: 18px;
  background: rgba(242, 193, 78, 0.72);
  transform: translateX(-50%) rotate(2deg);
  mix-blend-mode: multiply;
}
.day-hero__info {
  position: relative;
  z-index: 2;
}
.day-hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.day-hero__eyebrow .sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}
.day-hero h1 {
  margin-top: 10px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: var(--cream);
}
.day-hero__title {
  margin-top: 8px;
  font-family: var(--font-hand);
  font-size: clamp(1.45rem, 3.2vw, 2.1rem);
  line-height: 1.06;
  color: #87ceeb;
}
.day-hero__sub {
  max-width: 480px;
  margin-top: 14px;
  color: rgba(247, 237, 219, 0.68);
  font-size: 0.92rem;
  line-height: 1.6;
}
.day-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 22px;
}
.day-progress__step {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247, 237, 219, 0.36);
}
.day-progress__dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(247, 237, 219, 0.24);
  border-radius: 50%;
  font-size: 0.58rem;
  color: rgba(247, 237, 219, 0.5);
}
.day-progress__step.is-active {
  color: var(--gold-2);
}
.day-progress__step.is-active .day-progress__dot {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--plum-900);
}
.day-progress__step.is-done .day-progress__dot {
  border-color: var(--gold);
  color: var(--gold);
}
.day-progress__line {
  width: 22px;
  height: 1px;
  margin: 0 8px;
  background: rgba(247, 237, 219, 0.18);
}

.joey-egg-wrap {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 6;
  width: 142px;
}
.joey-egg-wrap .joey-egg {
  position: relative;
  top: auto;
  right: auto;
  width: 100%;
}
.joey-egg {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 142px;
  padding: 8px 10px 9px;
  border-radius: 2px;
  background: var(--gold-3);
  color: var(--coffee);
  font-family: var(--font-hand);
  font-size: 0.86rem;
  line-height: 1.08;
  text-align: left;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  transform: rotate(3deg);
  transition: transform 0.2s;
}
.joey-egg:hover {
  transform: rotate(1deg) scale(1.03);
}
.joey-egg::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 44px;
  height: 11px;
  background: rgba(242, 193, 78, 0.7);
  transform: translateX(-50%) rotate(-2deg);
  mix-blend-mode: multiply;
}
.joey-egg b {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-display);
  font-size: 0.56rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--brick);
}

.joey-bubble {
  position: relative;
  margin-top: 8px;
  padding: 12px 14px 11px;
  border-radius: 14px;
  background: var(--paper);
  color: var(--coffee);
  font-family: var(--font-hand);
  font-size: 1.08rem;
  line-height: 1.12;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  transform: rotate(-1deg);
  animation: bubbleIn 0.4s var(--ease-spring) both;
}
.joey-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 24px;
  width: 14px;
  height: 14px;
  background: var(--paper);
  transform: rotate(45deg);
}
.joey-bubble small {
  display: block;
  margin-top: 7px;
  font-family: var(--font-body);
  font-size: 0.64rem;
  color: var(--muted);
}
@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(-8px) rotate(-3deg) scale(0.92);
  }
}

.stage-card {
  position: relative;
  margin-top: clamp(22px, 3.6vw, 38px);
  padding: clamp(20px, 3.4vw, 34px);
  border-radius: 24px;
  background-color: var(--paper);
  background-image:
    linear-gradient(160deg, rgba(255, 255, 255, 0.7), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.62' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23p)' opacity='.05'/%3E%3C/svg%3E");
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.stage-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 5px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--gold));
  opacity: 0.7;
}
.stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.stage-head__kicker {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brick);
}
.stage-head h2 {
  margin-top: 5px;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--plum-800);
}
.stage-head p {
  max-width: 500px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}
.stage-hint {
  flex-shrink: 0;
  padding: 8px 13px !important;
  border: 1px dashed rgba(59, 42, 32, 0.28) !important;
  border-radius: 999px;
  color: var(--coffee-2) !important;
  font-size: 0.7rem !important;
  white-space: nowrap;
}
.stage-hint:hover {
  border-color: var(--brick) !important;
  color: var(--brick) !important;
}

.stage-mount {
  position: relative;
  min-height: 380px;
  border: 1px solid rgba(59, 42, 32, 0.1);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(242, 193, 78, 0.1), transparent 60%),
    #f3e7d2;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.stage-mount.is-done {
  opacity: 0.62;
}
.stage-mount.is-complete {
  display: grid;
  place-items: center;
  min-height: 210px;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(242, 193, 78, 0.18), transparent 62%),
       #f3e7d2;
}
.stage-complete {
  width: min(520px, 100%);
  padding: 26px 22px;
  text-align: center;
}
.stage-complete__check {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 13px;
  border: 2px solid #9a6d22;
  border-radius: 50%;
  background: var(--gold);
  color: var(--plum-900);
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  box-shadow: 0 5px 0 #9a6d22, 0 12px 22px rgba(9, 4, 16, 0.16);
}
.stage-complete p {
  max-width: 390px;
  margin: 0 auto;
  font-family: var(--font-hand);
  font-size: 1.38rem;
  line-height: 1.2;
  color: var(--coffee-2);
}
.stage-complete .link-btn {
  margin-top: 12px;
}

.stage-hintline {
  margin-top: 12px;
  font-family: var(--font-hand);
  font-size: 1.12rem;
  line-height: 1.2;
  color: var(--muted);
  text-align: center;
  min-height: 1.3em;
}
.stage-hintline.is-hot {
  color: var(--brick);
}

.stage-skip {
  display: block;
  margin: 12px auto 0;
  padding: 4px 2px;
  color: rgba(59, 42, 32, 0.38);
  font-size: 0.68rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.stage-skip:hover {
  color: var(--brick);
}

.challenge-section {
  margin-top: clamp(22px, 3.6vw, 34px);
}
.challenge-card {
  position: relative;
  padding: clamp(22px, 4vw, 38px);
  border-radius: 6px 22px 22px 6px;
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(163, 77, 63, 0.07), transparent 24%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
  color: var(--ink);
  box-shadow: var(--shadow-md);
  border-left: 7px solid var(--brick);
}
.challenge-card::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 18px;
  width: 54px;
  height: 54px;
  border: 2px solid rgba(163, 77, 63, 0.2);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px transparent, inset 0 0 0 5px rgba(163, 77, 63, 0.12);
  transform: rotate(-12deg);
}
.challenge-card__kicker {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brick);
}
.challenge-card h2 {
  margin-top: 6px;
  font-family: var(--font-hand);
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  color: var(--plum-800);
}
.challenge-card p {
  max-width: 620px;
  margin-top: 10px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--coffee-2);
}
.challenge-card__prompt:empty { display: none; }
.challenge-card:has(.cryptic-game) {
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: #acd2ff;
  box-shadow: none;
}
.challenge-card:has(.cryptic-game)::after { display: none; }
.challenge-card .btn {
  margin-top: 20px;
}
.challenge-done-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px !important;
  padding: 7px 13px;
  border: 1px dashed rgba(61, 125, 117, 0.45);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage, #3d7d75) !important;
}

.gift-section {
  margin-top: clamp(22px, 3.6vw, 34px);
}
.gift-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(22px, 4vw, 44px);
  align-items: center;
  padding: clamp(22px, 4vw, 38px);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(52, 32, 76, 0.96), rgba(27, 17, 39, 0.96));
  color: var(--cream);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.gift-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 15%, rgba(242, 193, 78, 0.14), transparent 50%),
    repeating-linear-gradient(0deg, transparent 0 64px, rgba(255, 255, 255, 0.03) 64px 66px);
  pointer-events: none;
}
.gift-visual {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 210px;
}
.gift-box {
  position: relative;
  width: 190px;
  height: 170px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out);
  outline: none;
}
.gift-box:hover {
  transform: translateY(-4px) rotate(-1deg);
}
.gift-box__body {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 118px;
  border-radius: 6px;
  background: linear-gradient(135deg, #7a5aa3, #5a3d7f 60%, #472e67);
  box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.1), inset 0 -12px 20px rgba(0, 0, 0, 0.2), 0 16px 28px rgba(0, 0, 0, 0.3);
}
.gift-box__body::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px dashed rgba(247, 237, 219, 0.16);
  border-radius: 3px;
}
.gift-box__lid {
  position: absolute;
  left: 0;
  right: 0;
  top: 20px;
  height: 48px;
  border-radius: 6px;
  background: linear-gradient(#8d6bb5, #67498d);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.14), 0 8px 14px rgba(0, 0, 0, 0.26);
  transition: transform 0.55s var(--ease-spring), opacity 0.4s;
  transform-origin: left center;
}
.gift-box__ribbon-v {
  position: absolute;
  top: 20px;
  bottom: 0;
  left: 50%;
  width: 26px;
  background: linear-gradient(90deg, #e0a83c, #f7d57e 50%, #c6902f);
  transform: translateX(-50%);
  box-shadow: inset 0 0 0 1px rgba(120, 78, 20, 0.18);
}
.gift-box__ribbon-h {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 74px;
  height: 24px;
  background: linear-gradient(#e0a83c, #c6902f);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22);
}
.gift-box__bow {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 84px;
  height: 44px;
  transform: translateX(-50%);
}
.gift-box__bow::before,
.gift-box__bow::after {
  content: "";
  position: absolute;
  top: 0;
  width: 40px;
  height: 36px;
  border: 7px solid #f2c14e;
  border-radius: 50% 50% 45% 45%;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3);
}
.gift-box__bow::before {
  left: 1px;
  transform: rotate(-16deg);
}
.gift-box__bow::after {
  right: 1px;
  transform: rotate(16deg);
}
.gift-box__tag {
  position: absolute;
  right: -26px;
  top: 62px;
  padding: 4px 10px;
  background: var(--paper);
  color: var(--coffee);
  font-family: var(--font-hand);
  font-size: 0.92rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24);
  transform: rotate(8deg);
}
.gift-box.is-open .gift-box__lid {
  transform: translate(-18px, -56px) rotate(-24deg);
  opacity: 0.85;
}
.gift-box.is-open .gift-box__bow {
  transform: translate(-50%, -26px) rotate(12deg);
  opacity: 0.6;
}
.gift-intro {
  position: relative;
  z-index: 2;
}
.gift-intro__kicker {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.gift-intro h2 {
  margin-top: 7px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--cream);
}
.gift-intro p {
  max-width: 430px;
  margin-top: 9px;
  color: rgba(247, 237, 219, 0.64);
  font-size: 0.88rem;
}
.gift-intro .btn {
  margin-top: 18px;
}
.gift-reveal {
  position: relative;
  z-index: 2;
  animation: giftIn 0.65s var(--ease-spring) both;
}
@keyframes giftIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}
.gift-note {
  position: relative;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 5px;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.8), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  transform: rotate(-0.6deg);
}
.gift-note__kicker {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brick);
}
.gift-note h3 {
  margin-top: 7px;
  font-family: var(--font-hand);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.05;
  color: var(--plum-800);
}
.gift-note p {
  margin-top: 10px;
  color: var(--coffee-2);
  font-size: 0.94rem;
  line-height: 1.65;
  white-space: pre-line;
}
.gift-note img {
  width: 100%;
  margin-top: 14px;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}
.gift-coupon {
  margin-top: 16px;
  padding: 16px 18px;
  border: 2px dashed rgba(90, 61, 127, 0.35);
  border-radius: 8px;
  background: rgba(242, 193, 78, 0.08);
  text-align: center;
}
.gift-coupon__label {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.gift-coupon__code {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--plum-700);
}
.gift-sign {
  margin-top: 16px;
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: var(--brick);
  text-align: right;
}

.day-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 34px;
}
.day-nav .btn {
  flex: 1;
}
.day-nav .btn:only-child {
  flex: 0 0 auto;
  margin-left: auto;
}

/* ============================== INTERACTIONS ============================== */

.ix {
  position: relative;
  width: 100%;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 16px;
  overflow: hidden;
}

.ix-status {
  margin-top: 12px;
  min-height: 1.4em;
  font-family: var(--font-hand);
  font-size: 1.18rem;
  line-height: 1.2;
  color: var(--muted);
  text-align: center;
}
.ix-status.is-loud {
  color: var(--brick);
}

.ix-meter {
  width: min(320px, 100%);
  height: 11px;
  margin-top: 12px;
  border: 1px solid rgba(59, 42, 32, 0.16);
  border-radius: 999px;
  background: rgba(59, 42, 32, 0.08);
  overflow: hidden;
}
.ix-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--brick));
  transition: width 0.16s linear;
}

.ix-start {
  margin-top: 8px;
}

/* --- ribbon --- */

.ix-ribbon {
  gap: 4px;
}
.ribbon-box {
  position: relative;
  width: min(360px, 80%);
  aspect-ratio: 1;
  cursor: grab;
  touch-action: none;
}
.ribbon-box:active {
  cursor: grabbing;
}
.ribbon-box svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ribbon-tail {
  transform-origin: 255px 210px;
  transition: transform 0.3s var(--ease-out);
}
.ribbon-lid {
  transition: transform 1s var(--ease-spring), opacity 0.6s;
}
.ribbon-bow {
  transform-origin: 180px 96px;
  transition: transform 0.25s var(--ease-out), opacity 0.4s;
}
.ribbon-box.is-done .ribbon-lid {
  transform: translateY(-150px) rotate(12deg);
  opacity: 0;
}
.ribbon-box.is-done .ribbon-bow {
  transform: scale(0.1) rotate(30deg);
  opacity: 0;
}
.ribbon-box.is-done .ribbon-tail {
  transform: translate(30px, 60px) rotate(20deg);
  opacity: 0;
}
.pull-cue {
  position: absolute;
  right: -8%;
  bottom: 10%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--brick);
  animation: cueBob 1.6s ease-in-out infinite;
  pointer-events: none;
}
.pull-cue span {
  font-size: 1.5rem;
  line-height: 1;
}
@keyframes cueBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}
.ribbon-progress {
  width: min(280px, 74%);
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(59, 42, 32, 0.1);
  overflow: hidden;
}
.ribbon-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--brick));
  transition: width 0.08s linear;
}

/* --- scratch --- */

.ix-scratch {
  padding-top: 10px;
}
.scratch-card {
  position: relative;
  width: min(530px, 100%);
  aspect-ratio: 1.65 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #5c3f83, #3b2858);
  box-shadow: 0 16px 30px rgba(27, 17, 39, 0.28);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='3' fill='%23f2c14e'/%3E%3Ccircle cx='16' cy='16' r='12' fill='none' stroke='%23f2c14e' stroke-width='2' opacity='.5'/%3E%3C/svg%3E") 16 16, grab;
  touch-action: none;
}
.scratch-under {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  background-color: var(--gold-2);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.7), transparent 42%),
    repeating-linear-gradient(135deg, rgba(163, 77, 63, 0.08) 0 10px, transparent 10px 20px);
  color: var(--plum-800);
  text-align: center;
}
.scratch-under__kicker {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brick);
}
.scratch-under h3 {
  font-family: var(--font-hand);
  font-size: clamp(1.9rem, 4.4vw, 2.8rem);
  line-height: 1;
}
.scratch-under p {
  font-size: 0.76rem;
  color: var(--coffee-2);
}
.scratch-under .coffee-stain {
  position: absolute;
  right: 12%;
  bottom: 10%;
  width: 66px;
  height: 66px;
  border: 6px solid rgba(122, 85, 48, 0.22);
  border-radius: 50%;
  transform: rotate(-8deg);
}
.scratch-under .coffee-stain::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 3px solid rgba(122, 85, 48, 0.14);
  border-radius: 50%;
}
.scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.6s;
}
.scratch-canvas.is-gone {
  opacity: 0;
  pointer-events: none;
}

/* --- love / mic --- */

.ix-love {
  gap: 2px;
}
.love-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: min(280px, 72%);
  aspect-ratio: 1;
}
.love-heart {
  position: relative;
  width: 62%;
  aspect-ratio: 200 / 190;
  background: linear-gradient(135deg, #d45b5b, #a63a3a);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 190'%3E%3Cpath d='M100 178C40 128 12 92 12 60 12 28 44 12 68 12 84 12 94 20 100 32 106 20 116 12 132 12 156 12 188 28 188 60 188 92 160 128 100 178Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 190'%3E%3Cpath d='M100 178C40 128 12 92 12 60 12 28 44 12 68 12 84 12 94 20 100 32 106 20 116 12 132 12 156 12 188 28 188 60 188 92 160 128 100 178Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.28));
  transform: scale(calc(0.7 + var(--love, 0) * 0.45));
  transform-origin: center;
  transition: transform 0.12s linear;
}
.love-heart::after {
  content: "";
  position: absolute;
  inset: 28% 33% 48% 26%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(-28deg);
}
.love-ring {
  position: absolute;
  inset: 6%;
  border: 2px dashed rgba(163, 77, 63, 0.25);
  border-radius: 50%;
  animation: slowSpin 22s linear infinite;
}
@keyframes slowSpin {
  to { transform: rotate(360deg); }
}
.love-ticks {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.love-ticks i {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 8px;
  background: rgba(59, 42, 32, 0.2);
  transform-origin: 0 140px;
}
.love-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.love-hearts span {
  position: absolute;
  bottom: 10%;
  font-size: 1.4rem;
  color: var(--red);
  animation: heartRise 1.8s ease-out forwards;
  opacity: 0;
}
@keyframes heartRise {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-120px) scale(1.15) rotate(12deg); }
}
.love-meter-wrap {
  width: min(360px, 100%);
  margin-top: 4px;
}
.love-meter {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 44px;
  margin-top: 8px;
}
.love-meter i {
  flex: 1;
  height: 20%;
  border-radius: 2px 2px 0 0;
  background: rgba(59, 42, 32, 0.12);
  transition: height 0.08s linear, background 0.12s;
}
.love-meter i.hot {
  background: linear-gradient(var(--gold), var(--brick));
}
.love-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.love-hold {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 18px 34px;
  border: 2px dashed rgba(163, 77, 63, 0.4);
  border-radius: 999px;
  background: rgba(163, 77, 63, 0.06);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--brick);
  touch-action: none;
}
.love-hold.is-holding {
  background: rgba(163, 77, 63, 0.16);
}
.love-hold-ring {
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  background: conic-gradient(var(--brick) calc(var(--hold, 0) * 1turn), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  pointer-events: none;
}
.love-pulse {
  display: inline-flex;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--brick);
  animation: ping 1.5s infinite;
}

/* --- biscoff --- */

.ix-biscoff {
  gap: 0;
}
.biscoff-scene {
  position: relative;
  width: min(430px, 88%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.cheesecake {
  position: absolute;
  left: 7%;
  top: 23%;
  width: 82%;
  height: 52%;
  border-radius: 5px 12px 12px 5px;
  clip-path: polygon(0 50%, 78% 4%, 100% 12%, 100% 88%, 78% 96%);
  background:
    radial-gradient(circle at 38% 30%, #fff8e9, #f0dfc1 55%, #d9bd94 82%, #b8966c 100%);
  box-shadow:
    0 18px 34px rgba(120, 80, 40, 0.22),
    inset 0 0 0 12px rgba(255, 250, 238, 0.6),
    inset 0 0 0 14px rgba(178, 141, 94, 0.2);
  filter: drop-shadow(0 11px 5px rgba(94, 58, 27, 0.28));
}
.cheesecake::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 50%, 78% 4%, 100% 12%, 100% 88%, 78% 96%);
  background:
    radial-gradient(circle at 68% 68%, rgba(168, 126, 75, 0.13), transparent 22%),
    radial-gradient(circle at 30% 72%, rgba(168, 126, 75, 0.1), transparent 18%),
    radial-gradient(circle at 62% 25%, rgba(255, 255, 255, 0.5), transparent 24%);
  pointer-events: none;
}
.cheesecake__label {
  position: absolute;
  left: 48%;
  bottom: 10%;
  z-index: 1;
  font-family: var(--font-hand);
  font-size: clamp(1.1rem, 2.8vw, 1.45rem);
  color: rgba(122, 85, 48, 0.34);
  transform: translateX(-50%) rotate(-3deg);
  white-space: nowrap;
  pointer-events: none;
}
.biscoff-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 50%, 78% 4%, 100% 12%, 100% 88%, 78% 96%);
  cursor: none;
  touch-action: none;
}
.cake-crumbs,
.cake-biscuits {
  position: absolute;
  inset: 0;
  z-index: 1;
  clip-path: polygon(0 50%, 78% 4%, 100% 12%, 100% 88%, 78% 96%);
  pointer-events: none;
}
.cake-crumbs {
  background:
    radial-gradient(circle, #865126 0 2px, transparent 2.5px) 25% 35% / 32px 27px,
    radial-gradient(circle, #b27b3d 0 2px, transparent 2.5px) 58% 58% / 27px 31px,
    radial-gradient(circle, #75451f 0 1.5px, transparent 2px) 77% 42% / 22px 24px;
}
.cake-biscuits {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  padding-right: 17%;
}
.cake-biscuits span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 27px;
  border: 2px solid #9a5c28;
  border-radius: 4px;
  background: linear-gradient(135deg, #edc17a, #c7833f);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55), 0 2px 3px rgba(73, 41, 18, 0.28);
  color: #70401e;
  font-family: var(--font-display);
  font-size: 0.45rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.biscoff-knife {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  width: 88px;
  height: 88px;
  pointer-events: none;
  transform: translate(-18px, -62px) rotate(-34deg);
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.25));
  transition: opacity 0.2s;
  opacity: 0;
}
.biscoff-scene.is-ready .biscoff-knife {
  opacity: 1;
}
.biscoff-jar {
  position: absolute;
  right: -2%;
  bottom: 0;
  width: 76px;
  height: 96px;
  pointer-events: none;
  transform: rotate(6deg);
}
.biscoff-jar__lid {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 0;
  height: 22px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(#b6873e, #8a5c22);
  border: 2px solid #5c3c16;
}
.biscoff-jar__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 20px;
  border: 2px solid #5c3c16;
  border-radius: 5px 5px 12px 12px;
  background: linear-gradient(#c98f3b, #a56b27);
  color: #f8e6b6;
  font-family: var(--font-display);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.05;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 6px;
}
.biscoff-message {
  position: absolute;
  left: 50%;
  bottom: 7%;
  z-index: 6;
  width: min(300px, 80%);
  padding: 13px 17px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--coffee);
  font-family: var(--font-hand);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  line-height: 1.08;
  text-align: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, 18px) rotate(-1deg);
  opacity: 0;
  transition: opacity 0.5s, transform 0.5s var(--ease-spring);
}
.biscoff-message.is-shown {
  opacity: 1;
  transform: translate(-50%, 0) rotate(-1deg);
}
.biscoff-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.biscoff-progress .ix-meter {
  width: 180px;
  margin-top: 0;
}
.biscoff-decorations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.biscoff-decorations .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* --- cherries --- */

.ix-cherries {
  padding: 0;
}
.cherry-stage {
  position: relative;
  width: 100%;
  height: 440px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 235, 180, 0.75), transparent 55%),
    linear-gradient(#f6dca2, #e9bb72 55%, #c98a4f 100%);
  touch-action: none;
}
.cherry-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.09) 0 2px, transparent 2px 58px),
    radial-gradient(circle at 50% 88%, rgba(70, 130, 80, 0.18), transparent 52%);
  pointer-events: none;
}
.cherry-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cherry-basket {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 3;
  width: 136px;
  height: 93px;
  pointer-events: none;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.28));
}
.cherry-basket svg {
  width: 100%;
  height: 100%;
}
.cherry-score {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(247, 237, 219, 0.82);
  color: var(--brick);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(6px);
}
.cherry-score b {
  font-size: 1rem;
  color: var(--plum-700);
}
.cherry-start {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  background: rgba(59, 42, 32, 0.18);
  backdrop-filter: blur(2px);
  text-align: center;
}
.cherry-start p {
  max-width: 300px;
  font-family: var(--font-hand);
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--plum-800);
}
.cherry-start .btn {
  margin-top: 4px;
}
.cherry-start.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cherry-game .cherry-arena {
  position: relative;
  width: min(560px, 100%);
  height: 440px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 235, 180, 0.75), transparent 55%),
    linear-gradient(#f6dca2, #e9bb72 55%, #c98a4f 100%);
  touch-action: none;
}
.cherry-game #cherryCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cherry-game .cherry-basket {
  bottom: 10px;
  width: 136px;
  height: 93px;
}
.cherry-game .cherry-count {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 4;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: #543c2b;
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
}
.cherry-game .cherry-start {
  inset: auto;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: inline-flex;
  width: auto;
  min-width: 118px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(69, 46, 28, .24);
  border-radius: 6px;
  background: #fffaf0;
  color: #543c2b;
  box-shadow: 0 4px 12px rgba(61, 42, 32, .16);
  font-size: .82rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  backdrop-filter: none;
}
.cherry-game .cherry-start:hover { background: #fff; }
.cherry-done {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: rgba(247, 237, 219, 0.9);
  text-align: center;
  animation: fadeIn 0.4s both;
}
.cherry-done h3 {
  font-family: var(--font-hand);
  font-size: 2.1rem;
  color: var(--plum-800);
}
.cherry-done p {
  max-width: 280px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* --- pivot --- */

.ix-pivot {
  padding: 0;
}
.pivot-stage {
  position: relative;
  width: 100%;
  height: 440px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #e9d8bc 0 14%, #d8bf9c 14% 15%, #caa87d 15% 100%);
  touch-action: none;
}
.pivot-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(120, 80, 40, 0.08) 0 2px, transparent 2px 58px),
    radial-gradient(ellipse at 50% 88%, rgba(70, 40, 20, 0.18), transparent 52%);
  pointer-events: none;
}
.pivot-wall {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 26%;
  background:
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(70, 40, 20, 0.1) 18px 20px),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(70, 40, 20, 0.08) 42px 44px),
    #b99268;
  box-shadow: 0 6px 14px rgba(70, 40, 20, 0.2);
}
.pivot-door {
  position: absolute;
  top: 4%;
  left: 50%;
  width: 130px;
  height: calc(26% - 12px);
  border: 8px solid #6d4527;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #3a2030, #24121e);
  transform: translateX(-50%);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(242, 193, 78, 0.2);
}
.pivot-door::after {
  content: "DOOR";
  position: absolute;
  bottom: 6px;
  left: 50%;
  font-family: var(--font-display);
  font-size: 0.45rem;
  letter-spacing: 0.2em;
  color: rgba(247, 237, 219, 0.4);
  transform: translateX(-50%);
}
.pivot-couch {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 250px;
  height: 104px;
  border-radius: 16px;
  background: linear-gradient(135deg, #4d8177, #2f615a);
  box-shadow: 0 14px 20px rgba(60, 35, 15, 0.28), inset 0 4px 0 rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%) rotate(var(--angle, 0deg));
  transform-origin: center;
  cursor: grab;
  transition: box-shadow 0.2s;
}
.pivot-couch::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.12);
}
.pivot-couch::after {
  content: "";
  position: absolute;
  inset: 18px 22px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 32%, rgba(0, 0, 0, 0.16) 32% 34%, transparent 34% 66%, rgba(0, 0, 0, 0.16) 66% 68%, transparent 68%),
    linear-gradient(rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.08));
}
.pivot-couch.is-grabbing {
  cursor: grabbing;
  box-shadow: 0 18px 26px rgba(60, 35, 15, 0.34), inset 0 4px 0 rgba(255, 255, 255, 0.1);
}
.pivot-couch.is-ready {
  box-shadow: 0 0 0 4px var(--gold), 0 14px 26px rgba(60, 35, 15, 0.3);
}
.pivot-couch.is-through {
  top: 15%;
  transition: transform 0.9s cubic-bezier(0.6, 0, 0.3, 1), top 0.9s cubic-bezier(0.6, 0, 0.3, 1), opacity 0.5s 0.5s;
  transform: translate(-50%, -50%) rotate(90deg) scale(0.7);
  opacity: 0.35;
}
.pivot-angle {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(247, 237, 219, 0.8);
  color: var(--coffee);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.3;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(5px);
}
.pivot-angle b {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--plum-700);
}
.pivot-controls {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}
.pivot-controls .btn {
  white-space: nowrap;
}
.pivot-controls .btn[disabled] {
  opacity: 0.35;
}
.pivot-tip {
  position: absolute;
  left: 50%;
  bottom: 78px;
  z-index: 3;
  width: max-content;
  max-width: 80%;
  color: rgba(59, 42, 32, 0.52);
  font-family: var(--font-hand);
  font-size: 1.05rem;
  text-align: center;
  transform: translateX(-50%);
}
.pivot-speech {
  position: absolute;
  top: 30%;
  right: 7%;
  z-index: 6;
  padding: 9px 15px;
  border-radius: 16px;
  background: var(--paper);
  color: var(--coffee);
  font-family: var(--font-hand);
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
  opacity: 0;
  transform: scale(0.8) rotate(3deg);
  transition: opacity 0.2s, transform 0.3s var(--ease-spring);
  pointer-events: none;
}
.pivot-speech.is-shown {
  opacity: 1;
  transform: scale(1) rotate(-2deg);
}
.pivot-speech::after {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 8px;
  width: 14px;
  height: 14px;
  background: var(--paper);
  transform: rotate(45deg);
}

/* ============================== GAME STYLES ============================== */

/* Minute Cryptic */
.cryptic-game {
  width: 100%;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #121212;
  box-shadow: none;
}
.cryptic-clue {
  max-width: none !important;
  margin: 0 !important;
  padding: 14px 20px;
  border-radius: 11px;
  background: #fff;
  color: #101010 !important;
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 3.5vw, 2.2rem) !important;
  line-height: 1.55 !important;
}
.cryptic-cells {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: min(432px, 100%);
  height: 72px;
  margin: 56px auto 0;
  overflow: hidden;
  border: 5px solid #080808;
  border-radius: 9px;
  background: #fff;
}
.cryptic-cell {
  min-width: 0;
  border: 0;
  border-right: 5px solid #080808;
  border-radius: 0;
  outline: 0;
  background: #fff;
  color: #111;
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}
.cryptic-cell:last-child { border-right: 0; }
.cryptic-cell:first-child { background: #f2cff8; }
.cryptic-cell:focus { box-shadow: inset 0 0 0 2px #ad70ba; }
.cryptic-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: #17283e;
  font-size: .9rem;
  text-align: center;
}
.strands-game {
  max-width: 620px;
  margin-inline: auto;
  color: #1a1a1b;
}
.strands-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(26, 26, 27, .12);
}
.strands-header > div { display: flex; align-items: baseline; gap: 12px; }
.strands-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.9rem, 6vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -.05em;
}
.strands-no {
  color: #777;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.strands-hint {
  min-width: 82px;
  height: 38px;
  border: 1px solid #1a1a1b;
  border-radius: 999px;
  background: #fff;
  color: #1a1a1b;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.strands-theme {
  display: grid;
  gap: 1px;
  margin: 12px auto 14px;
  text-align: center;
}
.strands-theme span {
  color: #777;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.strands-theme strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  line-height: 1.2;
}
.strands-board-wrap {
  position: relative;
  width: min(560px, 92vw);
  margin-inline: auto;
  user-select: none;
  touch-action: none;
}
.strands-board {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: clamp(3px, 1.1vw, 7px);
  width: 100%;
  aspect-ratio: 1;
}
.strands-lines {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.strands-cell {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: #cce6f2;
  color: #1a1a1b;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(.65rem, 3.3vw, 1.25rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  transition: transform .12s ease, background .18s ease, box-shadow .18s ease;
}
.strands-cell.is-selected {
  background: #64a8df;
  color: #102538;
  transform: scale(.98);
}
.strands-cell.is-found {
  background: #64a8df;
  color: #102538;
}
.strands-cell.is-spangram {
  background: #f4c542;
  color: #1a1a1b;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .72);
}
.strands-cell.is-hint {
  animation: strands-hint 1s ease;
}
@keyframes strands-hint {
  35% { background: #fff1a8; transform: scale(1.12); }
  70% { background: #cce6f2; transform: scale(1); }
}
.strands-progress {
  margin-top: 12px;
  color: #777;
  font-size: .78rem;
  font-weight: 800;
  text-align: center;
}
.strands-progress span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  border-radius: 50%;
  background: #64a8df;
  color: #1a1a1b;
}
.strands-game .challenge-game__status { min-height: 20px; color: #1a1a1b; }

.poople-game {
  position: relative;
  width: min(620px, 100%);
  height: auto;
  min-height: 0;
  margin: 0 auto;
  overflow: visible;
  padding: 16px 18px;
  background: transparent;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}
.poople-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 28px;
  color: var(--ink);
}
.poople-header span {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .12em;
}
.poople-header strong {
  color: var(--coffee-2);
  font-size: .68rem;
  letter-spacing: .12em;
}
.poople-board {
  display: grid;
  gap: 10px;
  width: min(438px, 100%);
  margin: 20px auto 0;
}
.poople-row {
  display: grid;
  grid-template-columns: repeat(4, clamp(48px, 7vw, 58px));
  justify-content: center;
  gap: 7px;
}
.poople-tile {
  display: grid;
  place-items: center;
  width: clamp(48px, 7vw, 58px);
  height: clamp(48px, 7vw, 58px);
  border: 3px solid #777;
  background: #fff;
  color: #1a1a1b;
  font-size: clamp(1.8rem, 8vw, 3rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}
.poople-tile.is-filled { border-color: #444; }
.poople-tile.is-absent { border-color: #787c7e; background: #787c7e; color: #fff; }
.poople-tile.is-present { border-color: #c9b458; background: #c9b458; color: #1a1a1b; }
.poople-tile.is-correct { border-color: #6aaa64; background: #6aaa64; color: #fff; }
.poople-keyboard {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  gap: 8px;
  width: min(560px, calc(100% - 24px));
  margin: 0 auto;
}
  .poople-board {
    display: grid;
    gap: 7px;
    width: 100%;
    margin: 20px auto 0;
  }
  .poople-row {
    display: grid;
    grid-template-columns: repeat(4, clamp(48px, 7vw, 58px));
    justify-content: center;
    gap: 7px;
  }
  .poople-tile {
    display: grid;
    place-items: center;
    width: clamp(48px, 7vw, 58px);
    height: clamp(48px, 7vw, 58px);
    border: 3px solid #565758;
    color: #f3f3f3;
    font-size: clamp(1.8rem, 8vw, 3rem);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
  }
  .poople-tile.is-filled { border-color: #858585; }
  .poople-tile.is-absent { border-color: #3a3a3c; background: #3a3a3c; }
  .poople-tile.is-present { border-color: #71350d; background: #71350d; }
  .poople-tile.is-correct { border-color: #538d4e; background: #538d4e; }
  .poople-keyboard {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: grid;
    gap: 8px;
    width: min(560px, calc(100% - 24px));
    margin: 0 auto;
  }
  .poople-key-row {
    display: flex;
    justify-content: center;
    gap: 7px;
    width: 100%;
  }
  .poople-key {
    flex: 1 1 0;
    min-width: 0;
    height: clamp(42px, 7.4vw, 64px);
    padding: 0 3px;
    border: 0;
    border-radius: 3px;
    background: #565758;
    color: #e6e6e6;
    font-size: clamp(.78rem, 3vw, 1.3rem);
    font-weight: 800;
    touch-action: manipulation;
  }
  .poople-key--wide { flex: 1.55 1 0; font-size: clamp(.58rem, 2.2vw, .95rem); }
  .poople-key.is-absent { background: #333334; color: #aaa; }
  .poople-key.is-present { background: #71350d; }
  .poople-key.is-correct { background: #538d4e; }
  .poople-game .poople-status {
    position: static;
    min-height: 22px;
    margin: 12px 0 0;
    color: var(--coffee-2);
    font-size: .9rem;
    text-align: center;
  }
  .poople-retry {
    display: block;
    margin: 8px auto 0;
    border: 1px solid #8a8a8a;
    border-radius: 3px;
    padding: 7px 12px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
  }
  .poople-key:focus-visible,
  .poople-retry:focus-visible {
    outline: 2px solid #f3f3f3;
    outline-offset: 2px;
  }

  /* Chandler 4x4 photo puzzle */
  .photo-puzzle {
    width: min(520px, 100%);
    margin: 0 auto;
  }
  .photo-puzzle__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border: 7px solid var(--paper);
    border-radius: 14px;
    background: var(--plum-800);
    box-shadow: 0 18px 36px rgba(10, 5, 17, 0.34);
    gap: 2px;
  }
  .photo-puzzle__piece {
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 2px;
    padding: 0;
    background-repeat: no-repeat;
    background-size: 400% 400%;
    cursor: grab;
    touch-action: none;
    transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
  }
  .photo-puzzle__piece:hover { filter: brightness(1.08); }
  .photo-puzzle__piece.is-dragging {
    position: relative;
    z-index: 2;
    cursor: grabbing;
    transform: scale(1.04);
    filter: brightness(1.12);
    box-shadow: 0 10px 24px rgba(10, 5, 17, .35);
  }
  .photo-puzzle__piece.is-drop-target {
    position: relative;
    z-index: 2;
    box-shadow: inset 0 0 0 4px #87ceeb;
  }
  .photo-puzzle .challenge-game__status {
    min-height: 24px;
    margin-top: 12px;
    text-align: center;
  }

  @keyframes strands-hint {
    35% { background: #d7edff; transform: scale(1.12); }
    70% { background: #cce6f2; transform: scale(1); }
  }

  @media (max-width: 520px) {
    .strands-board-wrap { width: 100%; }
    .strands-board { gap: 3px; }
    .strands-header { margin-inline: 2px; }
    .cryptic-game { width: 100%; }
    .cryptic-clue { padding: 12px 14px; }
    .cryptic-cells { height: 62px; margin-top: 40px; border-width: 4px; }
    .cryptic-cell { border-right-width: 4px; font-size: 1.65rem; }
    .poople-game { padding-inline: 12px; }
    .poople-board { gap: 6px; }
    .poople-row { grid-template-columns: repeat(4, 50px); gap: 6px; }
    .poople-tile { width: 50px; height: 50px; border-width: 2px; }
    .poople-game .poople-status { margin-top: 10px; }
    .cherry-game .cherry-arena { height: 400px; }
    .cherry-game .cherry-basket { width: 120px; height: 82px; }
  }

  @media (max-width: 480px) {
    .photo-puzzle__grid { gap: 1px; border-width: 5px; }
  }

  .poople-game {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 16px 0;
    background: transparent;
    color: var(--ink);
  }
  .poople-header,
  .poople-header span { color: var(--ink); }
  .poople-header strong { color: var(--coffee-2); }
  .poople-board { gap: 7px; width: min(440px, 100%); }
  .poople-row { grid-template-columns: repeat(4, 50px); gap: 7px; }
  .poople-tile {
    width: 50px;
    height: 50px;
    border-color: #777;
    background: #fff;
    color: #1a1a1b;
  }
  .poople-tile.is-absent { border-color: #787c7e; background: #787c7e; color: #fff; }
  .poople-tile.is-present { border-color: #c9b458; background: #c9b458; color: #1a1a1b; }
  .poople-tile.is-correct { border-color: #6aaa64; background: #6aaa64; color: #fff; }
  .poople-keyboard { display: none !important; }
  .poople-game .poople-status {
    position: static;
    margin: 12px 0 0;
    color: var(--coffee-2);
  }
  .poople-retry {
    width: auto;
    min-width: 0;
    min-height: 0;
    margin: 8px auto 0;
    padding: 7px 12px;
    border: 1px solid #9a8b7b;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-size: .82rem;
  }
  .photo-puzzle__piece { cursor: grab; touch-action: none; }
  .photo-puzzle__piece.is-dragging { cursor: grabbing; transform: scale(1.04); }
  .photo-puzzle__piece.is-drop-target { box-shadow: inset 0 0 0 4px #87ceeb; }
  .cherry-basket { width: 132px; height: 90px; }
  .cherry-game .cherry-basket { width: 132px; height: 90px; }
  .ix-cherries .cherry-basket { width: 120px; height: 82px; }

  .unagi-game { width: min(560px, 100%); margin: 0 auto; }
  .unagi-prompt,
  .unagi-start {
    display: grid;
    place-items: center;
    min-height: 68px;
    margin: 0 auto 16px;
    border-radius: 8px;
    background: #f3e7d8;
    color: var(--coffee);
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
  }
  .unagi-round {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 18px 0;
  }
  .unagi-round label {
    display: grid;
    gap: 8px;
    min-width: 0;
    color: var(--coffee-2);
    font-size: .88rem;
    font-weight: 700;
  }
  .unagi-form {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 16px;
  }
  .unagi-form input,
  .unagi-round input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border: 1px solid #b8a99a;
    border-radius: 7px;
    padding: 10px 13px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    box-shadow: 0 1px 2px rgba(30, 20, 10, .06);
  }
  .unagi-form input { flex: 1; }
  .unagi-form input:focus,
  .unagi-round input:focus {
    border-color: #6f8e9f;
    outline: 3px solid rgba(100, 168, 223, .22);
  }

  @media (max-width: 520px) {
    .poople-game { padding-inline: 8px; }
    .poople-row { grid-template-columns: repeat(4, 44px); gap: 6px; }
    .poople-tile { width: 44px; height: 44px; border-width: 2px; }
    .cherry-game .cherry-basket { width: 112px; height: 76px; }
    .unagi-round { grid-template-columns: 1fr; gap: 12px; }
    .unagi-form { flex-direction: column; }
  }

.connections-game {
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 10px 0 12px;
  border-radius: 6px;
  background: #fff;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
}
.connections-heading {
  margin: 0 0 18px;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
}
.connections-game .connections-heading { color: #111; }
.connections-resolved {
  display: grid;
  gap: 7px;
  margin-bottom: 8px;
}
.connections-solved {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  border-radius: 7px;
  padding: 9px;
  text-align: center;
}
.connections-solved b {
  margin-bottom: 5px;
  font-size: .9rem;
  text-transform: uppercase;
}
.connections-solved span {
  font-size: .78rem;
  line-height: 1.25;
}
.connections-solved--1 { background: #f9df7a; }
.connections-solved--2 { background: #a0c35a; }
.connections-solved--3 { background: #b0c4ef; }
.connections-solved--4 { background: #ba81c5; }
.connections-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.connections-cell {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  border: 0;
  border-radius: 8px;
  padding: 5px;
  background: #efefe7;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(.62rem, 2.4vw, .78rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: normal;
  cursor: pointer;
  transition: background-color .12s ease, transform .12s ease;
}
.connections-cell:hover { background: #e4e4dc; }
.connections-cell.is-selected {
  background: #5a5a52;
  color: #fff;
  transform: translateY(1px);
}
.connections-cell:disabled { cursor: default; opacity: .7; }
.connections-cell:focus-visible,
.connections-controls button:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}
.connections-mistakes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 22px;
  color: #222;
  font-size: .95rem;
}
.connections-dots { display: flex; gap: 9px; }
.connections-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c8c8c0;
}
.connections-dot.is-remaining { background: #5b5b54; }
.connections-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.connections-controls button {
  min-height: 48px;
  border: 1px solid #858585;
  border-radius: 999px;
  padding: 0 18px;
  background: #fff;
  color: #333;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.connections-controls button:first-child { border-color: #111; color: #111; }
.connections-controls button:hover:not(:disabled) { background: #f3f3ef; }
.connections-controls button:disabled { color: #999; cursor: default; }
.connections-game .challenge-game__status {
  min-height: 22px;
  margin: 12px 0 0;
  color: #333;
  font-size: .9rem;
  text-align: center;
}
.connections-game .challenge-game__status:empty { display: none; }

@media (max-width: 480px) {
  .connections-grid { gap: 6px; }
  .connections-cell { border-radius: 6px; padding: 4px; font-size: clamp(.6rem, 2.8vw, .8rem); }
  .connections-mistakes { gap: 8px; font-size: .84rem; }
  .connections-dots { gap: 6px; }
  .connections-dot { width: 15px; height: 15px; }
  .connections-controls { gap: 7px; }
  .connections-controls button { min-height: 44px; padding: 0 12px; font-size: .8rem; }
}