/* =========================================================
   一个叫智升的秃头决定植发
   mobile-first, no external dependencies
   ========================================================= */

@font-face {
  font-family: "ZS Serif";
  src: url("../assets/fonts/zs-serif-v2.ttf?v=2") format("truetype");
  font-weight: 100 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ZS Serif";
  src: url("../assets/fonts/zs-serif-black-v2.ttf?v=2") format("truetype");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #182426;
  --ink-soft: #314346;
  --paper: #f4ecdc;
  --paper-2: #eadfc9;
  --cream: #fbf5e8;
  --gold: #c8a15b;
  --gold-bright: #e6c47f;
  --moss: #6f8d5d;
  --moss-deep: #415b43;
  --sky: #bfe1ea;
  --sky-deep: #7fb5ca;
  --wine: #7e3f38;
  --serif: "ZS Serif", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #090c0d;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  user-select: none;
}

button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
p, h1, h2, figure { margin: 0; }

#app {
  position: relative;
  width: min(100vw, 430px);
  height: 100vh;
  height: 100dvh;
  max-height: 932px;
  overflow: hidden;
  background: #07090a;
  isolation: isolate;
  container-type: inline-size;
}

@media (min-width: 560px) and (min-height: 650px) {
  body {
    background:
      radial-gradient(1100px 700px at 50% 42%, #2a3736 0%, #131a1b 48%, #080b0c 100%);
  }
  #app {
    height: min(92dvh, 900px);
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,.13);
    box-shadow:
      0 42px 100px rgba(0,0,0,.62),
      0 8px 24px rgba(0,0,0,.38),
      inset 0 0 0 1px rgba(255,255,255,.03);
  }
}

/* ---------- scene shell ---------- */
.scene {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
}
.scene.active { display: block; }

.grain {
  position: absolute;
  inset: -40%;
  z-index: 90;
  pointer-events: none;
  opacity: .075;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
  animation: grainShift 1.2s steps(2) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0,0); }
  25% { transform: translate(-2%,1%); }
  50% { transform: translate(1%,-2%); }
  75% { transform: translate(2%,2%); }
  100% { transform: translate(0,0); }
}

.fx-flash, .fx-fade {
  position: absolute;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
}
.fx-flash { background: #fff; }
.fx-flash.fire { animation: flashFire .55s ease-out forwards; }
@keyframes flashFire {
  0% { opacity: 0; }
  10% { opacity: 1; }
  100% { opacity: 0; }
}
.fx-fade { background: #000; transition: opacity .75s ease; }
.fx-fade.on { opacity: 1; }

#rotate-hint { display: none; }
@media (orientation: landscape) and (max-height: 520px) {
  #rotate-hint {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #0b0f10;
    color: #f5eddf;
    font-family: var(--serif);
    font-size: 20px;
    letter-spacing: .12em;
  }
  #rotate-hint small { color: #9b9d94; font-size: 11px; letter-spacing: .18em; }
  #app { display: none; }
}

/* =========================================================
   BOOT
   ========================================================= */
.boot {
  background:
    radial-gradient(80% 60% at 50% 42%, #162120 0%, #0a0e0f 65%, #060809 100%);
  color: var(--paper);
}
.boot-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.boot-mark {
  position: relative;
  z-index: 2;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 700;
  color: #d9c8a6;
  border: 1px solid rgba(217,200,166,.45);
  background: rgba(217,200,166,.04);
  box-shadow: 0 0 50px rgba(201,163,90,.12), inset 0 0 24px rgba(201,163,90,.06);
}
.boot-ring {
  position: absolute;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(201,163,90,.2);
  border-radius: 50%;
  animation: bootPulse 3s ease-in-out infinite;
}
@keyframes bootPulse {
  0%, 100% { transform: scale(.92); opacity: .25; }
  50% { transform: scale(1.08); opacity: .8; }
}
.boot-status {
  margin-top: 42px;
  font-size: 11px;
  letter-spacing: .28em;
  color: #8e9a94;
  min-height: 16px;
  transition: opacity .4s ease;
}
.boot-tap {
  position: relative;
  margin-top: 30px;
  padding: 16px 34px;
  color: #f5ecdc;
  border: 1px solid rgba(190,231,243,.32);
  background: rgba(255,255,255,.025);
  box-shadow: 0 0 26px rgba(148,215,235,.08);
  animation: tapBreathe 2.6s ease-in-out infinite;
}
.boot-tap span {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .3em;
  padding-left: .3em;
}
.boot-tap small {
  display: block;
  margin-top: 9px;
  color: #8d9b95;
  font-size: 9px;
  letter-spacing: .2em;
}
@keyframes tapBreathe {
  0%, 100% { box-shadow: 0 0 20px rgba(148,215,235,.05); transform: translateY(0); }
  50% { box-shadow: 0 0 38px rgba(148,215,235,.18); transform: translateY(-2px); }
}
.boot-foot {
  position: absolute;
  bottom: max(24px, env(safe-area-inset-bottom));
  font-size: 9px;
  letter-spacing: .32em;
  color: #4f5b57;
}
.burp-word {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%,-50%) scale(.6) rotate(-8deg);
  font-family: var(--serif);
  font-size: 86px;
  font-weight: 900;
  color: #f2e7d2;
  opacity: 0;
  text-shadow: 0 0 40px rgba(255,245,220,.3);
}
.burp-word.show { animation: burpWord 1.55s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes burpWord {
  0% { opacity: 0; transform: translate(-50%,-42%) scale(.55) rotate(-9deg); filter: blur(8px); }
  18% { opacity: .94; transform: translate(-50%,-50%) scale(1.06) rotate(-3deg); filter: blur(0); }
  60% { opacity: .9; transform: translate(-50%,-55%) scale(1.2) rotate(2deg); }
  100% { opacity: 0; transform: translate(-50%,-72%) scale(1.45) rotate(5deg); filter: blur(3px); }
}

/* =========================================================
   TITLE
   ========================================================= */
.title-scene {
  background: linear-gradient(#a9d6e7 0%, #d7ecf0 43%, #e9f1df 67%, #8fac69 100%);
}
#titleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.sky-glow {
  position: absolute;
  width: 90%;
  aspect-ratio: 1;
  right: -32%;
  top: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,250,226,.8) 0%, rgba(255,248,218,.28) 38%, transparent 67%);
  pointer-events: none;
  mix-blend-mode: screen;
}
.title-wrap {
  position: relative;
  z-index: 4;
  margin: 9.2% 8.6% 0;
  text-align: right;
  animation: titleRise 1.4s cubic-bezier(.2,.8,.2,1) both .15s;
}
@keyframes titleRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.title-kicker {
  font-size: 9px;
  letter-spacing: .34em;
  color: rgba(25,45,46,.66);
  margin-right: .15em;
  margin-bottom: 12px;
}
.game-title {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--serif);
  font-weight: 900;
  color: #fffdf4;
  letter-spacing: -.075em;
  line-height: .88;
  filter: drop-shadow(0 5px 0 rgba(29,50,51,.12)) drop-shadow(0 16px 24px rgba(34,66,58,.18));
}
.title-line {
  display: block;
  white-space: nowrap;
  -webkit-text-stroke: .115em #172a2c;
  paint-order: stroke fill;
  text-shadow: 0 .025em 0 #172a2c, 0 .05em .02em rgba(23,42,44,.35);
}
.line-one {
  font-size: 28px;
  font-size: clamp(24px, 6.8cqw, 29px);
  padding-right: .03em;
}
.line-one .bald {
  display: inline-block;
  font-size: 1.52em;
  letter-spacing: -.12em;
  transform: translateY(.025em) translateX(.06em);
}
.line-two {
  margin-top: .25em;
  font-size: 30px;
  font-size: clamp(26px, 7.5cqw, 32px);
  letter-spacing: -.09em;
  padding-right: .1em;
}
.title-sub {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: .18em;
  color: rgba(24,45,45,.65);
}

.start-btn {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 16.2%;
  transform: translateX(-50%);
  width: min(68%, 282px);
  height: 58px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(190,235,255,.055));
  backdrop-filter: blur(3px);
  border: 1px solid rgba(184,232,248,.92);
  border-radius: 2px;
  box-shadow:
    0 0 7px rgba(186,235,255,.75),
    0 0 24px rgba(137,214,241,.35),
    inset 0 0 22px rgba(168,226,247,.12);
  transition: transform .18s ease, box-shadow .25s ease;
  animation: startAppear 1.1s ease both .8s;
}
@keyframes startAppear {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.start-btn:active { transform: translate(-50%, 1px) scale(.985); box-shadow: 0 0 12px rgba(186,235,255,.9), 0 0 34px rgba(137,214,241,.45); }
.start-txt {
  position: relative;
  z-index: 2;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .24em;
  padding-left: .24em;
  text-shadow: 0 0 12px rgba(203,241,255,.7);
}
.start-shine {
  position: absolute;
  top: -80%;
  left: -40%;
  width: 26%;
  height: 260%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  transform: rotate(22deg);
  animation: buttonShine 4.8s ease-in-out infinite;
}
@keyframes buttonShine {
  0%, 62% { left: -48%; opacity: 0; }
  68% { opacity: .8; }
  88%, 100% { left: 126%; opacity: 0; }
}
.title-credit {
  position: absolute;
  z-index: 5;
  bottom: 9.4%;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(31,54,42,.24);
  backdrop-filter: blur(4px);
  text-align: center;
  white-space: nowrap;
  font-size: 9px;
  letter-spacing: .24em;
  color: rgba(246,251,240,.9);
  text-shadow: 0 1px 5px rgba(26,50,40,.5);
}
.title-credit span { font-variant-numeric: tabular-nums; }
.title-small {
  position: absolute;
  z-index: 5;
  bottom: 5.8%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8px;
  letter-spacing: .14em;
  color: rgba(244,250,235,.6);
  text-shadow: 0 1px 4px rgba(26,50,40,.4);
}

/* collected ending portraits */
.ending-gallery {
  display: none;
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 46.5%;
  transform: translateX(-50%);
  width: 88%;
  text-align: center;
  pointer-events: none;
}
.ending-gallery.complete {
  display: block;
  animation: galleryIn 1.3s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes galleryIn {
  from { opacity: 0; transform: translate(-50%, 22px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.gallery-title {
  display: inline-block;
  margin-bottom: 13px;
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: .34em;
  color: rgba(250,252,240,.9);
  text-shadow: 0 1px 7px rgba(22,49,38,.45);
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255,255,255,.38);
}
.gallery-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  padding-bottom: 16px;
}
.gallery-item {
  position: relative;
  width: 100px;
  width: 29cqw;
  max-width: 112px;
  aspect-ratio: 1;
  margin-left: -4.2cqw;
  border-radius: 50%;
  overflow: hidden;
  background: #f2e8d5;
  border: 3px solid rgba(255,253,244,.9);
  box-shadow: 0 9px 22px rgba(25,50,40,.25), inset 0 0 0 1px rgba(107,91,57,.25);
}
.gallery-item:first-child { margin-left: 0; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
  filter: sepia(.12) contrast(1.02) saturate(.93);
}
.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -19px;
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: .28em;
  color: rgba(249,251,237,.85);
  text-shadow: 0 1px 5px rgba(25,45,35,.45);
}
.g1 { transform: rotate(-7deg) translateY(6px); }
.g2 { transform: rotate(1deg) translateY(-5px); z-index: 2; }
.g3 { transform: rotate(8deg) translateY(7px); }

/* =========================================================
   LIGHT TRANSITION
   ========================================================= */
.light-scene { background: #000; }
.light-void { position: absolute; inset: 0; background: #000; }
.light-orb {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(-50%,-50%) scale(.2);
  background: #fffdf4;
  box-shadow: 0 0 18px 7px rgba(255,249,222,.75), 0 0 70px 28px rgba(255,240,197,.36);
  filter: blur(.3px);
}
.light-scene.active .light-orb { animation: orbGrow 3.25s cubic-bezier(.55,.05,.35,1) .8s forwards; }
@keyframes orbGrow {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.1); }
  14% { opacity: .75; transform: translate(-50%,-50%) scale(.65); }
  22% { opacity: .25; transform: translate(-50%,-50%) scale(.35); }
  38% { opacity: 1; transform: translate(-50%,-50%) scale(2.4); }
  68% { opacity: 1; transform: translate(-50%,-50%) scale(24); filter: blur(7px); }
  88% { opacity: 1; transform: translate(-50%,-50%) scale(95); filter: blur(18px); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(260); filter: blur(30px); }
}
.light-seed {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 1px;
  height: 1px;
  background: #fff;
  box-shadow: 0 0 2px 1px #fff;
  animation: seedFlicker 3.1s linear forwards;
}
@keyframes seedFlicker {
  0% { opacity: 0; }
  12% { opacity: 1; }
  18% { opacity: .2; }
  24% { opacity: .9; }
  31% { opacity: .1; }
  45% { opacity: 1; }
  70% { opacity: .8; }
  100% { opacity: 0; }
}

/* =========================================================
   CHAT
   ========================================================= */
.chat-scene {
  background: #eef1f4;
  color: #1b2224;
  font-family: var(--sans);
}
.phone-status {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  height: calc(34px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  background: #f7f9fa;
}
.status-icons { display: flex; align-items: center; gap: 5px; }
.status-icons i { display: block; background: #1b2224; }
.signal { width: 12px; height: 9px; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.wifi { width: 12px; height: 9px; border: 1.5px solid #1b2224; border-color: #1b2224 transparent transparent transparent; border-radius: 50%; transform: translateY(3px); }
.battery { width: 17px; height: 8px; border: 1px solid #1b2224; border-radius: 2px; position: relative; background: linear-gradient(90deg,#1b2224 72%,transparent 72%); }
.battery:after { content:""; position: absolute; right: -3px; top: 2px; width: 2px; height: 3px; background: #1b2224; border-radius: 0 1px 1px 0; }

.qq-head {
  position: absolute;
  z-index: 4;
  top: calc(34px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  height: 57px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  background: rgba(248,250,251,.96);
  border-bottom: 1px solid rgba(50,68,74,.09);
  backdrop-filter: blur(12px);
}
.qq-back { font-size: 34px; line-height: 1; width: 34px; text-align: left; color: #273436; transform: translateY(-2px); }
.qq-person { flex: 1; text-align: center; }
.qq-name { display: block; font-size: 16px; font-weight: 600; letter-spacing: .03em; }
.qq-state { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; color: #899396; margin-top: 1px; }
.qq-state i { width: 4px; height: 4px; border-radius: 50%; background: #60b56c; }
.qq-more { width: 34px; display: flex; justify-content: flex-end; gap: 3px; padding-top: 3px; }
.qq-more span { width: 3px; height: 3px; background: #273436; border-radius: 50%; }
.chat-body {
  position: absolute;
  top: calc(91px + env(safe-area-inset-top));
  bottom: calc(58px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  padding: 12px 14px 20px;
  overflow: hidden;
  background:
    linear-gradient(rgba(238,242,244,.94), rgba(238,242,244,.94)),
    radial-gradient(circle at 20% 20%, #dfe7e8 0 1px, transparent 2px);
  background-size: auto, 18px 18px;
}
.chat-day { text-align: center; font-size: 9px; color: #9ba4a6; margin: 2px 0 14px; letter-spacing: .08em; }
.msg-row { display: flex; align-items: flex-start; gap: 8px; opacity: 0; transform: translateY(9px); transition: opacity .4s ease, transform .4s ease; }
.msg-row.show { opacity: 1; transform: translateY(0); }
.msg-avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg,#c7a461,#7b5b30);
  color: #fff8e8;
  font-family: var(--serif);
  font-size: 16px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.msg-stack { max-width: calc(100% - 46px); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.msg-bubble {
  position: relative;
  background: #fff;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.62;
  color: #263234;
  box-shadow: 0 1px 2px rgba(27,37,38,.07);
  word-break: break-word;
}
.msg-bubble:before {
  content: "";
  position: absolute;
  left: -5px;
  top: 13px;
  width: 8px;
  height: 8px;
  background: #fff;
  transform: rotate(45deg);
}
.ad-bubble { padding: 5px; width: 280px; width: min(74cqw, 292px); overflow: hidden; }
.ad-bubble:before { top: 15px; }
.ad-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 1.26;
  overflow: hidden;
  border-radius: 2px;
  background:
    radial-gradient(circle at 78% 20%, rgba(255,218,142,.25), transparent 35%),
    linear-gradient(137deg, #cf4f32 0%, #b83a29 55%, #8e2c25 100%);
  color: #f7e8c9;
  font-family: var(--serif);
  cursor: pointer;
  outline: none;
}
.ad-grain {
  position: absolute;
  inset: 0;
  opacity: .23;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
}
.ad-brand {
  position: absolute;
  left: 12px;
  top: 10px;
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: .12em;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: .92;
}
.ad-brand em { font-style: normal; opacity: .55; font-size: 6px; letter-spacing: .2em; margin-left: 2px; }
.ad-sun { font-size: 11px; color: #f4cb6b; }
.ad-headline {
  position: absolute;
  left: 13px;
  top: 33px;
  font-size: 52px;
  font-size: clamp(44px, 13.6cqw, 58px);
  font-weight: 900;
  line-height: .77;
  letter-spacing: -.1em;
  color: #ffefcf;
  text-shadow: 2px 2px 0 rgba(90,20,14,.23);
}
.ad-headline em { font-style: normal; color: #f3c75d; margin-left: .1em; }
.ad-copy {
  position: absolute;
  right: 12px;
  top: 43px;
  font-size: 9px;
  line-height: 1.55;
  letter-spacing: .08em;
  text-align: right;
  color: #f8dcb2;
}
.ad-seal {
  position: absolute;
  left: 16px;
  bottom: 26px;
  width: 39px;
  height: 39px;
  border: 1px solid rgba(247,226,184,.7);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
  color: #f7dfb4;
  transform: rotate(-8deg);
}
.ad-pony {
  position: absolute;
  right: 9px;
  bottom: 20px;
  width: 77px;
  opacity: .9;
  transform: rotate(-4deg);
}
.ad-pony svg { width: 100%; height: auto; filter: drop-shadow(0 3px 3px rgba(62,18,12,.2)); }
.ad-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  text-align: center;
  font-family: var(--sans);
  font-size: 5.6px;
  letter-spacing: .09em;
  color: rgba(255,231,193,.67);
}
.tap-hint {
  position: absolute;
  right: 12px;
  bottom: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px 5px 6px;
  border-radius: 30px;
  background: rgba(19,29,30,.7);
  color: #fff;
  font-size: 9px;
  letter-spacing: .08em;
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
  backdrop-filter: blur(4px);
  animation: hintFloat 2.2s ease-in-out infinite;
}
@keyframes hintFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.tap-ring {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 50%;
  position: relative;
}
.tap-ring:after { content:""; position:absolute; inset: 3px; border-radius: 50%; background: #fff; }
.chat-typing { display: none; gap: 3px; margin: 8px 0 0 44px; }
.chat-typing.show { display: flex; }
.chat-typing i { width: 4px; height: 4px; border-radius: 50%; background: #a7b1b2; animation: typing 1.1s ease-in-out infinite; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,100%{opacity:.25;transform:translateY(0)} 50%{opacity:1;transform:translateY(-2px)} }

.qq-inputbar {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: calc(20px + env(safe-area-inset-bottom));
  height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  background: #f7f9fa;
  border-top: 1px solid rgba(50,68,74,.08);
}
.qq-voice { font-size: 16px; color: #7b8789; }
.qq-fake-input { flex: 1; height: 32px; display: flex; align-items: center; padding: 0 10px; background: #fff; border-radius: 3px; font-size: 11px; color: #b0b6b7; }
.qq-plus { font-size: 22px; font-weight: 300; color: #7b8789; }
.qq-homebar { position: absolute; z-index: 6; left: 50%; bottom: 7px; width: 126px; height: 4px; border-radius: 4px; background: #1b2224; opacity: .8; transform: translateX(-50%); }

.ad-lightbox {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(5,8,9,0);
  opacity: 0;
  pointer-events: none;
  transition: background .55s ease, opacity .4s ease;
}
.ad-lightbox.open { opacity: 1; pointer-events: auto; background: rgba(5,8,9,.9); }
.lightbox-card {
  width: 86%;
  max-width: 370px;
  aspect-ratio: 1.26;
  position: relative;
  transform: scale(.84);
  transition: transform .55s cubic-bezier(.2,.9,.2,1);
  box-shadow: 0 25px 70px rgba(0,0,0,.55);
}
.ad-lightbox.open .lightbox-card { transform: scale(1); }
.lightbox-card .ad-poster { width: 100%; height: 100%; aspect-ratio: auto; }
.lightbox-caption {
  color: rgba(245,236,218,.6);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: .24em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .5s ease .2s, transform .5s ease .2s;
}
.ad-lightbox.open .lightbox-caption { opacity: 1; transform: translateY(0); }

/* =========================================================
   CAFE
   ========================================================= */
.cafe-scene {
  background: #2b332d;
}
.cafe-art { position: absolute; inset: 0; overflow: hidden; }
.cafe-wall {
  position: absolute;
  inset: 0 0 30%;
  background:
    linear-gradient(90deg, rgba(255,255,255,.13) 0 1px, transparent 1px 94px),
    linear-gradient(180deg, #e9d9bd 0%, #e3cfae 55%, #d9c09b 100%);
}
.cafe-wall:after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 31%;
  background:
    linear-gradient(90deg, rgba(204,178,125,.2) 0 1px, transparent 1px 58px),
    linear-gradient(180deg, #2d453d, #20352f);
  border-top: 3px solid #a6814d;
  box-shadow: inset 0 4px 0 rgba(255,255,255,.06);
}
.cafe-window {
  position: absolute;
  top: 13%;
  width: 31%;
  height: 38%;
  border: 5px solid #5c4c38;
  border-bottom-width: 8px;
  border-radius: 90px 90px 0 0;
  overflow: hidden;
  background: #c8e2e6;
  box-shadow: 0 0 0 1px rgba(238,216,173,.5), inset 0 0 35px rgba(255,244,214,.5);
}
.win-a { left: 5%; }
.win-b { left: 39%; width: 25%; height: 31%; top: 17%; }
.window-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 66% 28%, rgba(255,245,202,.95) 0 7%, transparent 21%),
    linear-gradient(180deg, #9dcbd8, #d9e8dd 64%, #b2bd91);
}
.window-sky:after {
  content:"";
  position:absolute; left:-20%; right:-20%; bottom:-16%; height:45%;
  background:
    radial-gradient(60% 100% at 20% 100%, rgba(82,106,91,.65), transparent 70%),
    radial-gradient(60% 100% at 80% 100%, rgba(101,121,91,.5), transparent 72%);
}
.window-muntin { position: absolute; background: #5c4c38; }
.window-muntin.v { left: 50%; top: 0; bottom: 0; width: 4px; transform: translateX(-50%); }
.window-muntin.h { left: 0; right: 0; top: 52%; height: 4px; }
.cafe-arch {
  position: absolute;
  right: 7%;
  top: 8%;
  width: 44%;
  height: 55%;
  border: 2px solid rgba(174,139,85,.34);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 25% 25% 0 0;
}
.cafe-mirror {
  position: absolute;
  z-index: 1;
  right: 8%;
  top: 13%;
  width: 38%;
  height: 46%;
  padding: 8px;
  border-radius: 80px 80px 5px 5px;
  background: linear-gradient(135deg,#d6b271,#8e6c39 40%,#ead09a 65%,#97733d);
  box-shadow: 0 12px 30px rgba(40,28,14,.22), inset 0 0 0 1px rgba(255,239,201,.55);
}
.mirror-glass {
  width: 100%; height: 100%;
  border-radius: 72px 72px 2px 2px;
  background:
    linear-gradient(125deg, rgba(247,239,217,.55), rgba(185,204,194,.45) 42%, rgba(237,226,196,.32) 44%, rgba(95,117,105,.42));
  box-shadow: inset 0 0 30px rgba(255,245,213,.48);
}
.mirror-word {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  text-align: center;
  font-family: var(--serif);
  font-size: 7px;
  letter-spacing: .38em;
  color: rgba(45,54,46,.52);
}
.cafe-lamp {
  position: absolute;
  top: 0;
  width: 1px;
  height: 19%;
  background: #4b3925;
  z-index: 2;
}
.cafe-lamp i {
  position: absolute;
  left: 50%; bottom: -13px;
  width: 28px; height: 20px;
  transform: translateX(-50%);
  border-radius: 50% 50% 44% 44%;
  background: linear-gradient(90deg,#a98041,#e4c37d 50%,#9a7439);
  box-shadow: 0 8px 28px 10px rgba(255,218,143,.25);
}
.cafe-lamp i:after {
  content:""; position:absolute; left:50%; bottom:-7px; width:9px; height:9px; transform:translateX(-50%);
  background: #fff3c9; border-radius: 50%; box-shadow: 0 0 18px 8px rgba(255,224,154,.38);
}
.lamp-a { left: 15%; height: 15%; }
.lamp-b { left: 50%; height: 11%; }
.lamp-c { right: 14%; height: 17%; }
.cafe-shelf {
  position: absolute;
  z-index: 2;
  left: 5%;
  top: 48%;
  width: 34%;
  height: 13%;
  border-top: 5px solid #5a402c;
  border-bottom: 2px solid rgba(227,196,136,.4);
  background: linear-gradient(180deg, rgba(90,64,44,.15), transparent);
}
.bottle { position: absolute; bottom: 0; width: 12px; border-radius: 2px 2px 1px 1px; border: 1px solid rgba(255,244,215,.35); }
.b1 { left: 4%; height: 62%; background:#596a4b; }
.b2 { left: 16%; height: 78%; background:#7e4532; }
.b3 { left: 29%; height: 48%; background:#c3a05b; }
.b4 { left: 42%; height: 68%; background:#4d5f5a; }
.plant-pot {
  position: absolute; right: 8%; bottom: 0; width: 24px; height: 28px;
  border-radius: 2px 2px 8px 8px; background: #9b6d45;
}
.plant-pot:before, .plant-pot:after {
  content:""; position:absolute; bottom: 22px; width: 12px; height: 30px;
  border-radius: 100% 0 100% 0; background: #4e6d50; transform-origin: bottom;
}
.plant-pot:before { left: 6px; transform: rotate(-25deg); }
.plant-pot:after { right: 6px; transform: rotate(25deg) scale(.86); }
.cafe-counter {
  position: absolute;
  z-index: 2;
  left: -3%;
  bottom: 19%;
  width: 43%;
  height: 22%;
  background: linear-gradient(180deg,#704b31 0 8%, #5a3b28 8% 100%);
  border-top: 5px solid #a4774a;
  box-shadow: 0 20px 44px rgba(35,23,13,.25);
}
.cafe-counter:after {
  content:"";
  position: absolute; left: 8%; right: 8%; top: 18%;
  height: 1px; background: rgba(238,207,157,.22);
}
.cafe-chair {
  position: absolute;
  z-index: 3;
  left: 24%;
  bottom: 16%;
  width: 28%;
  height: 34%;
  filter: drop-shadow(0 18px 16px rgba(20,19,14,.3));
}
.chair-back {
  position: absolute; left: 15%; top: 0; width: 68%; height: 54%;
  border-radius: 50% 50% 18% 18%;
  background: linear-gradient(135deg,#82443d,#4f2f2b);
  border: 4px solid #b49a6d;
  box-shadow: inset 0 0 18px rgba(255,229,186,.12);
}
.chair-seat {
  position: absolute; left: 2%; top: 49%; width: 94%; height: 22%;
  border-radius: 44% 44% 20% 20%;
  background: linear-gradient(#82443d,#5a332e);
  border: 3px solid #b49a6d;
}
.chair-arm { position:absolute; left: 0; top: 45%; width: 12%; height: 34%; border-radius: 10px; background: linear-gradient(90deg,#d1b67f,#8d7142); transform: rotate(-12deg); }
.chair-arm:after { content:""; position:absolute; right:-2px; top:-22%; width: 110%; height: 30%; border-radius: 8px; background:#c9ad77; }
.chair-pole { position:absolute; left:47%; top:67%; width:7%; height:24%; background: linear-gradient(90deg,#967a49,#dcc38f,#7d6238); }
.chair-base { position:absolute; left:12%; bottom:0; width:78%; height:9%; border-radius:50%; background: #4c3c2b; box-shadow: 0 6px 0 #241c14; }
.cafe-table {
  position: absolute; z-index: 2; right: 6%; bottom: 17%; width: 22%; height: 24%;
  filter: drop-shadow(0 12px 10px rgba(27,20,13,.28));
}
.table-top { position:absolute; top:0; left:0; width:100%; height:10%; border-radius:50%; background: linear-gradient(#ad8b60,#6e5236); }
.table-leg { position:absolute; left:47%; top:9%; width:5%; height:80%; background: linear-gradient(90deg,#55412b,#8b6d49); }
.table-leg:after { content:""; position:absolute; left:-250%; bottom:-6%; width:600%; height:11%; border-radius:50%; background:#4e3a26; }
.cup { position:absolute; left:38%; top:-15%; width:24%; height:16%; border-radius:2px 2px 7px 7px; background:#f1e5ce; box-shadow: inset 0 0 0 1px #baa17b; }
.cup:after { content:""; position:absolute; right:-32%; top:21%; width:34%; height:46%; border: 2px solid #f1e5ce; border-left:0; border-radius:0 50% 50% 0; }
.cafe-floor {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -12%;
  height: 37%;
  background:
    linear-gradient(180deg, rgba(22,18,13,.36), rgba(18,15,10,.1) 45%, rgba(20,16,11,.4)),
    repeating-conic-gradient(#d2c0a2 0% 25%, #5c4b3c 0% 50%);
  background-size: auto, 64px 64px;
  transform: perspective(420px) rotateX(52deg);
  transform-origin: top center;
  box-shadow: inset 0 20px 40px rgba(34,26,17,.28);
}
.cafe-warm {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 44% at 62% 24%, rgba(255,219,153,.3), transparent 70%),
    linear-gradient(180deg, transparent 55%, rgba(92,63,34,.18));
  mix-blend-mode: soft-light;
}
.cafe-vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,25,20,.2), transparent 15%, transparent 68%, rgba(17,21,17,.54)),
    radial-gradient(90% 80% at 50% 40%, transparent 50%, rgba(20,25,20,.34));
}
.boss-halo {
  position: absolute;
  z-index: 2;
  left: 10%;
  bottom: 15%;
  width: 80%;
  height: 62%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,234,189,.62) 0%, rgba(255,224,164,.2) 44%, transparent 69%);
  filter: blur(8px);
  opacity: 0;
}
.cafe-scene.ready .boss-halo { animation: haloIn 1.4s ease both .55s; }
@keyframes haloIn { from { opacity:0; transform: scale(.8); } to { opacity:.9; transform: scale(1); } }
.boss-portrait {
  position: absolute;
  z-index: 3;
  left: 13%;
  bottom: 20%;
  width: 76%;
  max-height: 69%;
  object-fit: contain;
  object-position: center bottom;
  filter: sepia(.04) contrast(1.02) saturate(.96) drop-shadow(0 16px 18px rgba(65,43,22,.25));
  opacity: 0;
  transform: translateY(22px) scale(1.035);
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}
.cafe-scene.ready .boss-portrait { animation: bossFlash 1.15s cubic-bezier(.16,.9,.26,1) both .35s; }
@keyframes bossFlash {
  0% { opacity: 0; transform: translateY(28px) scale(1.08); filter: brightness(2.4) sepia(.2) blur(4px); }
  28% { opacity: 1; filter: brightness(1.4) sepia(.08) blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1) sepia(.04) contrast(1.02) saturate(.96) drop-shadow(0 16px 18px rgba(65,43,22,.25)); }
}
.dialogue {
  position: absolute;
  z-index: 8;
  left: 6%;
  right: 6%;
  bottom: max(4.8%, env(safe-area-inset-bottom));
  padding: 20px 20px 18px;
  background:
    linear-gradient(180deg, rgba(252,247,236,.97), rgba(241,231,211,.97));
  border: 1px solid rgba(171,136,82,.45);
  box-shadow: 0 22px 55px rgba(20,25,17,.34), inset 0 0 0 4px rgba(255,255,255,.28);
  transform: translateY(16px);
  opacity: 0;
}
.cafe-scene.ready .dialogue { animation: dialogueIn .8s ease both 1.05s; }
@keyframes dialogueIn { to { opacity: 1; transform: translateY(0); } }
.speaker { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.speaker span { font-family: var(--serif); font-size: 14px; font-weight: 700; letter-spacing: .2em; color: #6f4d2b; }
.speaker i { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(171,136,82,.38), transparent); }
.dialogue-text {
  min-height: 48px;
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.65;
  letter-spacing: .035em;
  color: #2e3029;
}
.dialogue-text:after { content: ""; display: inline-block; width: 1px; height: 1em; margin-left: 2px; background: #6f4d2b; animation: caret .8s step-end infinite; vertical-align: -.12em; }
.dialogue-text.done:after { display: none; }
@keyframes caret { 50% { opacity: 0; } }
.cafe-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .5s ease, transform .5s ease;
}
.cafe-choices.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.choice {
  padding: 12px 6px 10px;
  border: 1px solid rgba(110,93,64,.32);
  background: rgba(255,255,255,.35);
  color: #384237;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
}
.choice:active { transform: scale(.98); }
.choice span { display: block; font-family: var(--serif); font-size: 21px; letter-spacing: .18em; padding-left: .18em; }
.choice small { display: block; margin-top: 3px; font-size: 8px; letter-spacing: .06em; color: #837b6a; }
.choice-yes { background: #31483c; border-color: #31483c; color: #f8f0de; box-shadow: 0 6px 14px rgba(49,72,60,.18); }
.choice-yes small { color: #b8c4b6; }
.cafe-door-bell {
  position: absolute;
  z-index: 10;
  top: 7%;
  right: 5%;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(228,197,132,.6);
  border-radius: 50%;
  color: #e9d2a3;
  font-family: var(--serif);
  font-size: 8px;
  background: rgba(27,38,31,.35);
  backdrop-filter: blur(3px);
  opacity: .7;
}

/* =========================================================
   GAME
   ========================================================= */
.game-scene {
  --mood: #8cae7a;
  --mood-glow: rgba(176,214,145,.2);
  background: #d9e3d7;
  transition: background 1.2s ease;
}
.game-scene[data-mood="sad"] { --mood: #8aa8a4; --mood-glow: rgba(135,171,176,.18); }
.game-scene[data-mood="happy"] { --mood: #a9bd75; --mood-glow: rgba(220,198,126,.23); }
.game-scene[data-mood="proud"] { --mood: #c4a759; --mood-glow: rgba(247,208,123,.28); }
.salon-art { position: absolute; inset: 0; overflow: hidden; }
.salon-wall {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.12) 0 1px, transparent 1px 76px),
    linear-gradient(180deg, #dfe8d9 0%, #d4e0cd 48%, #c7d6bf 100%);
  transition: filter 1s ease;
}
.game-scene[data-mood="sad"] .salon-wall { filter: saturate(.74) brightness(.96) hue-rotate(7deg); }
.game-scene[data-mood="proud"] .salon-wall { filter: saturate(1.08) brightness(1.05); }
.salon-tile {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16) 0 2px, transparent 2px 100%),
    repeating-conic-gradient(#e2e9de 0% 25%, #aebfa9 0% 50%);
  background-size: auto 100%, 54px 54px;
  transform: perspective(380px) rotateX(40deg);
  transform-origin: top;
  opacity: .92;
}
.salon-tile:after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(65,85,66,.1), rgba(44,63,45,.25)); }
.salon-window {
  position: absolute; left: 5%; top: 9%; width: 28%; height: 31%;
  border: 4px solid #f7f0df;
  background: linear-gradient(180deg,#b8d9dd,#e6f0d6 62%,#b2c791);
  box-shadow: 0 0 0 1px rgba(120,117,89,.2), inset 0 0 30px rgba(255,249,219,.8), 0 16px 35px rgba(74,94,67,.12);
}
.salon-window:before { content:""; position:absolute; left:50%; top:0; bottom:0; width:3px; background: rgba(247,240,223,.9); transform:translateX(-50%); }
.salon-window:after { content:""; position:absolute; left:0; right:0; top:48%; height:3px; background: rgba(247,240,223,.9); }
.salon-window span { position:absolute; width: 52%; height: 30%; left: 9%; bottom: -8%; background: rgba(73,100,71,.35); border-radius: 60% 100% 0 0; }
.salon-shelf {
  position: absolute; right: 4%; top: 17%; width: 29%; height: 10%;
  border-bottom: 5px solid #a88958;
  display: flex; align-items: flex-end; gap: 6px; padding: 0 5px 4px;
}
.salon-shelf i { display:block; width: 15%; height: 60%; background: #879b7a; border-radius: 2px 2px 1px 1px; opacity: .8; }
.salon-shelf i:nth-child(2) { height: 85%; background:#b9a16d; }
.salon-shelf i:nth-child(3) { height: 48%; background:#6e8772; }
.salon-shelf i:nth-child(4) { height: 70%; background:#c7b18b; }
.salon-shelf i:nth-child(5) { height: 56%; background:#9b6e58; }
.salon-light {
  position: absolute; inset: 0;
  background:
    radial-gradient(50% 40% at 52% 27%, rgba(255,242,198,.35), transparent 70%),
    linear-gradient(125deg, rgba(255,250,224,.25), transparent 40%);
  mix-blend-mode: soft-light;
}
.salon-plant {
  position: absolute; left: 3%; bottom: 22%; width: 68px; height: 130px;
  filter: drop-shadow(0 10px 8px rgba(45,67,44,.18));
}
.salon-plant span { position:absolute; bottom: 30px; left: 30px; width: 20px; height: 85px; border-radius: 100% 0 100% 0; background: linear-gradient(160deg,#789568,#4d6b4a); transform-origin: bottom; }
.salon-plant span:nth-child(1) { transform: rotate(-55deg) scale(.9); }
.salon-plant span:nth-child(2) { transform: rotate(-28deg) scale(1.05); }
.salon-plant span:nth-child(3) { transform: rotate(16deg) scale(1.12); }
.salon-plant span:nth-child(4) { transform: rotate(48deg) scale(.84); }
.salon-plant:after { content:""; position:absolute; bottom:0; left:12px; width:48px; height:37px; border-radius:5px 5px 15px 15px; background:linear-gradient(90deg,#9d7551,#c49a6c,#8e6547); }
.salon-cabinet {
  position: absolute; right: -2%; bottom: 20%; width: 23%; height: 32%;
  background: linear-gradient(90deg,#8b7252,#c0a57d 52%,#8c7050);
  border-top: 5px solid #6e573e;
  box-shadow: 0 18px 35px rgba(63,72,50,.15);
}
.salon-cabinet:before { content:""; position:absolute; left:8%; right:8%; top:12%; height:1px; background:rgba(255,246,221,.3); box-shadow:0 28px 0 rgba(255,246,221,.3), 0 58px 0 rgba(255,246,221,.3); }
.salon-floor { position:absolute; left:0; right:0; bottom:0; height:14%; background: linear-gradient(180deg,rgba(56,70,52,.2),rgba(43,56,41,.4)); }
.salon-shade {
  position:absolute; inset:0;
  background: radial-gradient(90% 72% at 50% 34%, transparent 48%, rgba(44,64,46,.22) 100%), linear-gradient(180deg, transparent 72%, rgba(38,58,43,.34));
  transition: background 1.2s ease;
}
.game-scene[data-mood="happy"] .salon-shade { background: radial-gradient(90% 72% at 50% 32%, rgba(255,238,184,.14) 0%, transparent 55%), linear-gradient(180deg, transparent 72%, rgba(63,78,44,.25)); }
.game-scene[data-mood="proud"] .salon-shade { background: radial-gradient(75% 62% at 50% 32%, rgba(255,222,142,.28) 0%, transparent 58%), linear-gradient(180deg, transparent 70%, rgba(71,61,32,.28)); }

.game-hud {
  position: absolute;
  z-index: 10;
  top: max(16px, env(safe-area-inset-top));
  left: 15px;
  right: 15px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}
.shift-clock {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 5px;
  background: rgba(248,243,229,.78);
  border: 1px solid rgba(113,104,79,.22);
  border-radius: 30px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(42,57,42,.09);
}
.shift-clock svg { width: 38px; height: 38px; transform: rotate(-90deg); }
.clock-track { fill: none; stroke: rgba(74,86,66,.17); stroke-width: 4; }
.clock-fill { fill: none; stroke: #5f7d57; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 125.66; stroke-dashoffset: 0; transition: stroke .4s ease; }
.clock-copy { display: flex; flex-direction: column; }
.clock-copy span { font-size: 7px; letter-spacing: .18em; color: #788071; }
.clock-copy strong { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: #344434; font-variant-numeric: tabular-nums; }
.shift-clock.warning .clock-fill { stroke: #b95c45; }
.shift-clock.warning .clock-copy strong { color: #a64735; animation: timePulse .8s ease-in-out infinite; }
@keyframes timePulse { 50% { opacity: .55; } }
.hair-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 24px;
  color: #4b6547;
  background: rgba(247,243,229,.66);
  border: 1px solid rgba(104,125,83,.2);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: .18em;
  backdrop-filter: blur(6px);
}
.hair-leaf { font-size: 15px; color: var(--mood); }

.customer-stage {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 9.2%;
  width: 86%;
  max-width: 365px;
  aspect-ratio: 4 / 5;
  transform: translateX(-50%);
  filter: drop-shadow(0 25px 35px rgba(37,55,39,.23));
}
.mirror-frame {
  position: absolute;
  inset: 0 0 26px;
  padding: 9px;
  border-radius: 100px 100px 8px 8px;
  background:
    linear-gradient(125deg, #b69052 0%, #e4c887 18%, #9f7b40 38%, #f0dba9 55%, #af884b 78%, #d9b977 100%);
  box-shadow:
    0 0 0 1px rgba(89,65,32,.55),
    inset 0 0 0 2px rgba(255,247,217,.52),
    inset 0 0 0 6px rgba(112,80,36,.22);
  transition: box-shadow 1s ease;
}
.game-scene[data-mood="proud"] .mirror-frame { box-shadow: 0 0 0 1px rgba(110,80,30,.6), inset 0 0 0 2px rgba(255,250,224,.72), inset 0 0 0 6px rgba(112,80,36,.2), 0 0 38px rgba(235,196,105,.2); }
.mirror-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 92px 92px 3px 3px;
  background:
    linear-gradient(160deg, #f8f2e5 0%, #ede2cd 52%, #e7ddc9 100%);
  box-shadow: inset 0 0 35px rgba(88,74,49,.2);
}
.mirror-inner .mirror-glass {
  position: absolute; inset: 0; border-radius: 0;
  background:
    linear-gradient(122deg, rgba(255,255,255,.6) 0%, rgba(255,255,255,.07) 28%, transparent 28.4%),
    radial-gradient(80% 60% at 55% 30%, #fbf3e3, #eadbc2 60%, #ddcdb4);
}
.customer-img {
  position: absolute;
  left: 7%;
  top: 15%;
  width: 86%;
  height: auto;
  object-position: center top;
  filter: contrast(1.02) saturate(.96) sepia(.02) drop-shadow(0 8px 10px rgba(66,52,35,.12));
  opacity: 0;
  transition: opacity .65s ease, filter 1s ease;
  will-change: opacity;
}
.customer-img.on { opacity: 1; }
.game-scene[data-mood="proud"] .customer-img { filter: contrast(1.04) saturate(1.02) sepia(.02); }
#hairCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}
.mirror-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  background:
    linear-gradient(118deg, rgba(255,255,255,.28) 0%, transparent 24%, transparent 68%, rgba(255,255,255,.1) 69%, transparent 78%);
  mix-blend-mode: screen;
  opacity: .55;
}
.mirror-dust { position:absolute; inset:0; z-index:6; pointer-events:none; opacity:.5; }
.mirror-dust i { position:absolute; width:2px; height:2px; background:#fff9e5; border-radius:50%; box-shadow:0 0 5px #fff; animation: dustFloat 6s ease-in-out infinite; }
.mirror-dust i:nth-child(1) { left:22%; top:33%; animation-delay:-1s; }
.mirror-dust i:nth-child(2) { left:75%; top:24%; animation-delay:-3.5s; }
.mirror-dust i:nth-child(3) { left:64%; top:57%; animation-delay:-5s; }
@keyframes dustFloat { 0%,100%{transform:translate(0,0);opacity:.15} 50%{transform:translate(7px,-14px);opacity:.8} }
.mirror-crown {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: -9px;
  width: 58px;
  height: 24px;
  transform: translateX(-50%);
  background: linear-gradient(180deg,#f1dba6,#ad8545);
  clip-path: polygon(0 100%, 10% 20%, 31% 58%, 50% 0, 69% 58%, 90% 20%, 100% 100%);
  filter: drop-shadow(0 2px 2px rgba(80,55,20,.25));
}
.mirror-plate {
  position: absolute;
  left: 50%;
  bottom: -21px;
  transform: translateX(-50%);
  padding: 4px 13px;
  font-family: var(--serif);
  font-size: 7px;
  letter-spacing: .28em;
  color: rgba(246,238,217,.88);
  background: #6f755f;
  border: 1px solid rgba(240,223,184,.38);
  white-space: nowrap;
  box-shadow: 0 3px 6px rgba(45,52,38,.2);
}

.pour-can {
  position: absolute;
  z-index: 8;
  top: -10%;
  right: -1%;
  width: 118px;
  pointer-events: none;
  opacity: 0;
  transform-origin: 75% 70%;
  transform: rotate(8deg) translateY(-12px);
  transition: opacity .25s ease, transform .5s cubic-bezier(.2,.8,.2,1);
  filter: drop-shadow(0 9px 8px rgba(45,65,42,.2));
}
.game-scene.watering .pour-can { opacity: 1; transform: rotate(-24deg) translateY(2px); }
.water-stream {
  position: absolute;
  z-index: 7;
  left: 55%;
  top: -2%;
  width: 72px;
  height: 17%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.game-scene.watering .water-stream { opacity: .9; }
.water-stream i {
  position: absolute;
  top: 0;
  width: 2px;
  height: 13px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(190,231,237,0), rgba(201,239,243,.9));
  filter: blur(.25px);
  animation: dropFall .7s linear infinite;
}
.water-stream i:nth-child(1) { left: 5%; animation-delay: -.1s; }
.water-stream i:nth-child(2) { left: 18%; animation-delay: -.4s; }
.water-stream i:nth-child(3) { left: 31%; animation-delay: -.25s; }
.water-stream i:nth-child(4) { left: 43%; animation-delay: -.55s; }
.water-stream i:nth-child(5) { left: 56%; animation-delay: -.32s; }
.water-stream i:nth-child(6) { left: 69%; animation-delay: -.48s; }
.water-stream i:nth-child(7) { left: 82%; animation-delay: -.18s; }
@keyframes dropFall {
  0% { transform: translateY(0) scaleY(.6); opacity: 0; }
  16% { opacity: .9; }
  100% { transform: translateY(76px) scaleY(1.5); opacity: 0; }
}

.pony {
  position: absolute;
  z-index: 9;
  top: 4%;
  left: 50%;
  width: 112px;
  margin-left: -42px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(150%) rotate(7deg);
  transition: opacity .35s ease, transform .8s cubic-bezier(.2,.9,.25,1);
  filter: drop-shadow(0 8px 4px rgba(35,49,35,.2));
}
.pony.on { opacity: 1; transform: translateX(0) rotate(0); animation: ponyBob 1.45s ease-in-out infinite .8s; }
@keyframes ponyBob { 0%,100%{ transform: translateY(0) rotate(-1deg);} 50%{ transform: translateY(-3px) rotate(1deg);} }
.pony svg { width: 100%; height: auto; overflow: visible; }
.pony.eating svg { animation: ponyEat .8s ease-in-out infinite; transform-origin: 72% 68%; }
@keyframes ponyEat { 0%,100%{ transform: rotate(0)} 30%{ transform: rotate(4deg) translateY(2px)} 60%{ transform: rotate(-2deg)} }
.pony-bit { position:absolute; right: 9%; bottom: 0; width: 31px; height: 34px; display:none; }
.pony.eating .pony-bit { display:block; }
.pony-bit i { position:absolute; width: 4px; height: 9px; border-radius: 100% 0 100% 0; background:#6f945d; animation: bitFall 1s linear infinite; }
.pony-bit i:nth-child(1){ left: 2px; animation-delay:-.1s; }
.pony-bit i:nth-child(2){ left: 12px; animation-delay:-.55s; }
.pony-bit i:nth-child(3){ left: 22px; animation-delay:-.35s; }
@keyframes bitFall { 0%{ transform: translate(0,0) rotate(0); opacity:0} 20%{opacity:.9} 100%{ transform: translate(7px,30px) rotate(90deg); opacity:0 } }

.state-sparkles { position:absolute; inset:0; z-index:8; pointer-events:none; overflow:visible; }
.state-sparkles i {
  position: absolute;
  width: 6px; height: 6px;
  background: #f0d28f;
  clip-path: polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);
  animation: sparkleUp 1.3s ease-out forwards;
}
@keyframes sparkleUp {
  0% { transform: translateY(0) scale(.2); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-52px) scale(1); opacity: 0; }
}
.game-hint {
  position: absolute;
  z-index: 11;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 6px 13px;
  border-radius: 20px;
  background: rgba(247,243,229,.74);
  border: 1px solid rgba(96,121,81,.17);
  backdrop-filter: blur(5px);
  bottom: 21%;
  text-align: center;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: .18em;
  color: rgba(54,78,52,.72);
  text-shadow: 0 1px 5px rgba(244,248,232,.5);
  transition: opacity .8s ease;
  pointer-events: none;
}
.game-hint.gone { opacity: 0; }
.water-btn {
  position: absolute;
  z-index: 12;
  left: 22px;
  bottom: max(27px, calc(env(safe-area-inset-bottom) + 18px));
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #4d7151;
  background: rgba(247,242,227,.86);
  border: 1px solid rgba(93,123,82,.35);
  box-shadow: 0 12px 25px rgba(44,67,43,.17), inset 0 0 0 5px rgba(255,255,255,.35);
  backdrop-filter: blur(8px);
  touch-action: none;
  transition: transform .12s ease, bottom .35s ease, box-shadow .2s ease;
}
.water-btn:active, .water-btn.pressed { transform: scale(.94); box-shadow: 0 5px 13px rgba(44,67,43,.2), inset 0 0 0 5px rgba(255,255,255,.28); }
.water-btn svg { width: 36px; height: 36px; }
.water-label { margin-top: 2px; font-family: var(--serif); font-size: 8.5px; letter-spacing: .15em; }
.water-ring { position:absolute; inset:-7px; border:1px solid rgba(106,141,93,.3); border-radius:50%; animation: waterRing 2.8s ease-out infinite; }
@keyframes waterRing { 0%{ transform:scale(.9); opacity:0;} 30%{opacity:.65;} 100%{ transform:scale(1.2); opacity:0;} }
.game-scene.pony-mode .water-btn { bottom: 226px; }

.pony-panel {
  position: absolute;
  z-index: 20;
  left: 0; right: 0; bottom: 0;
  padding: 18px 19px calc(22px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(28,44,36,.97), rgba(20,34,29,.985));
  border-top: 1px solid rgba(207,178,117,.38);
  box-shadow: 0 -18px 45px rgba(24,37,31,.25), inset 0 1px 0 rgba(255,248,226,.08);
  color: #f1e8d5;
  transform: translateY(110%);
  transition: transform .42s cubic-bezier(.2,.85,.25,1);
}
.pony-panel.show { transform: translateY(calc(-1 * var(--kb, 0px))); }
.pony-panel-top { display:flex; align-items:center; gap:7px; font-family:var(--serif); font-size: 10px; letter-spacing:.22em; color:#d9c8a5; margin-bottom: 11px; }
.pony-dot { width:6px; height:6px; border-radius:50%; background:#d16b4f; box-shadow:0 0 9px rgba(231,109,77,.8); animation: dotPulse 1s ease-in-out infinite; }
@keyframes dotPulse { 50%{opacity:.3} }
.pony-input-row { display:flex; gap:8px; }
#ponyInput {
  flex:1;
  height: 46px;
  min-width: 0;
  padding: 0 12px;
  border-radius: 2px;
  border: 1px solid rgba(219,196,151,.34);
  background: rgba(249,245,233,.94);
  color: #23302a;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .03em;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}
#ponyInput:focus { border-color: #cdb173; box-shadow: 0 0 0 3px rgba(205,177,115,.12); }
#ponyInput.wrong { animation: wrongShake .4s ease; border-color: #c9674d; }
@keyframes wrongShake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-5px)} 45%{transform:translateX(4px)} 70%{transform:translateX(-2px)} }
#ponyGo {
  width: 52px;
  height: 46px;
  border-radius: 2px;
  background: #c3a361;
  color: #24302a;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .1em;
  transition: transform .12s ease, background .2s ease;
}
#ponyGo:active { transform: scale(.96); background:#d5b875; }
.pony-guide { margin-top: 9px; font-size: 10px; letter-spacing: .16em; color: #b9b29e; text-align: center; }
.pony-error { margin-top: 5px; min-height: 12px; font-size: 9px; color: #df8e75; letter-spacing: .08em; text-align: center; opacity: 0; transition: opacity .2s ease; }
.pony-error.show { opacity: 1; }

/* =========================================================
   ENDINGS COMMON
   ========================================================= */
.ending { background: #050707; color: #f4ecdd; }
.ending-skip {
  position: absolute;
  z-index: 40;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  padding: 8px 10px;
  color: rgba(242,234,218,.48);
  font-size: 10px;
  letter-spacing: .16em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}
.ending-skip.ready { opacity: 1; pointer-events: auto; }

/* ---------- ending 1 ---------- */
.ending-one { background: #020303; }
.fin {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 40%;
  transform: translate(-50%,-50%) scale(.92);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 112px;
  letter-spacing: -.07em;
  color: #f3e9d7;
  opacity: 0;
  text-shadow: 0 0 55px rgba(238,228,208,.14);
}
.fin.show { animation: finIn 2s cubic-bezier(.2,.8,.2,1) both; }
@keyframes finIn {
  0% { opacity: 0; transform: translate(-50%,-48%) scale(.94); filter: blur(4px); }
  35% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
.cracks {
  position: absolute; inset: 0;
  z-index: 7;
  width: 100%; height: 100%;
  opacity: 0;
  pointer-events: none;
}
.cracks path {
  fill: none;
  stroke: rgba(245,240,229,.82);
  stroke-width: 1.35;
  filter: drop-shadow(0 0 5px rgba(255,255,255,.55));
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
}
.cracks.cracked { opacity: 1; }
.cracks.cracked path { animation: crackDraw .75s cubic-bezier(.2,.8,.2,1) forwards; }
.cracks.cracked path:nth-child(2n) { animation-delay: .06s; }
.cracks.cracked path:nth-child(3n) { animation-delay: .12s; }
.cracks.cracked path:nth-child(5n) { animation-delay: .18s; }
@keyframes crackDraw { to { stroke-dashoffset: 0; } }
.impact {
  position: absolute;
  z-index: 8;
  left: 50%; top: 46%;
  width: 20px; height: 20px;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: #fffdf4;
  opacity: 0;
  box-shadow: 0 0 35px 10px rgba(255,250,227,.8);
}
.impact.bang { animation: impactBang .7s ease-out forwards; }
@keyframes impactBang {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.2); }
  15% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(9); }
}
.ending-one.shake, .game-scene.quake { animation: screenShake .55s cubic-bezier(.36,.07,.19,.97); }
@keyframes screenShake {
  10%,90% { transform: translate(-2px,1px); }
  20%,80% { transform: translate(4px,-2px); }
  30%,50%,70% { transform: translate(-6px,2px); }
  40%,60% { transform: translate(6px,-1px); }
}
.e1-boss {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 14%;
  width: 76%;
  transform: translateX(-50%) scale(.7);
  opacity: 0;
  pointer-events: none;
  text-align: center;
}
.e1-boss.show { animation: e1BossIn .75s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes e1BossIn {
  0% { opacity: 0; transform: translateX(-50%) scale(.72) rotate(-3deg); filter: blur(10px); }
  55% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateX(-50%) scale(1) rotate(-1.3deg); }
}
.e1-photo {
  position: relative;
  padding: 7px 7px 18px;
  background: #e8dfcc;
  box-shadow: 0 18px 60px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.25);
  clip-path: polygon(2% 0, 29% 2%, 52% 0, 80% 1.6%, 100% 0, 99% 20%, 100% 48%, 98.8% 77%, 100% 100%, 75% 98%, 54% 100%, 27% 98.5%, 0 100%, 1.2% 71%, 0 44%, 1.4% 18%);
}
.e1-photo img { width: 100%; height: auto; filter: sepia(.18) contrast(1.08) brightness(.9); }
.e1-photo:after {
  content: "失踪人口 · 老板";
  position: absolute;
  left: 0; right: 0; bottom: 5px;
  font-family: var(--serif);
  font-size: 8px;
  letter-spacing: .26em;
  color: #655b4b;
}
.e1-line {
  margin: 19px auto 0;
  max-width: 94%;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: .04em;
  color: #f2e9da;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
  min-height: 30px;
}
.e1-line:after { content:""; display:inline-block; width:1px; height:1em; background:#e7d8be; margin-left:2px; vertical-align:-.12em; animation: caret .8s step-end infinite; }
.e1-line.done:after { display:none; }
.dance-stage {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #030404;
  padding: 7%;
}
.dance-stage.show { display: flex; animation: danceIn .7s ease both; }
@keyframes danceIn { from { opacity:0; } to { opacity:1; } }
.dance-cap {
  margin-bottom: 15px;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: .4em;
  color: #d9c7a4;
}
.dance-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #000;
  border: 1px solid rgba(218,191,137,.38);
  box-shadow: 0 0 0 7px #0b0d0c, 0 0 0 8px rgba(218,191,137,.3), 0 20px 50px rgba(0,0,0,.5);
  overflow: hidden;
}
.dance-frame:after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(180deg, rgba(255,241,207,.06), transparent 30%, transparent 70%, rgba(0,0,0,.32));
  box-shadow: inset 0 0 55px rgba(0,0,0,.45);
}
#danceVideo { width: 100%; height: 100%; object-fit: cover; display: block; }
.dance-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  padding: 8px 12px;
  color: #f4ead8;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: .14em;
  background: rgba(8,10,9,.66);
  border: 1px solid rgba(226,200,147,.38);
  backdrop-filter: blur(5px);
}
.dance-foot { margin-top: 16px; font-size: 8px; letter-spacing: .14em; color: #77766d; text-align: center; }

/* ---------- ending 2 ---------- */
.ending-two { background: #030505; }
.e2-lines {
  position: absolute;
  z-index: 4;
  left: 9%;
  right: 9%;
  top: 11%;
  bottom: 11%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.e2-lines p {
  font-family: var(--serif);
  font-size: 15px;
  font-size: clamp(13.5px, 3.85cqw, 16px);
  line-height: 1.95;
  letter-spacing: .035em;
  color: #f0ebe1;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.8,.2,1);
  text-shadow: 0 0 18px rgba(255,255,255,.08);
}
.e2-lines p.on { opacity: 1; transform: translateY(0); }
.e2-lines p.dots { letter-spacing: .42em; color: #b8b6ae; }
.e2-lines p.fade { opacity: .28; transition: opacity 1.4s ease; }
.e2-sky {
  position: absolute;
  z-index: 6;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  background: #85aeb9;
  pointer-events: none;
  transition: opacity 1.6s ease;
}
.e2-sky.show { opacity: 1; }
.e2-sky img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  transform: scale(1.18);
  filter: saturate(1.04) brightness(1.12) contrast(.94);
}
.e2-sky:after {
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(55% 40% at 38% 27%, rgba(255,248,217,.2), transparent 65%);
  mix-blend-mode: screen;
}
.sky-flare {
  position: absolute;
  left: 38%;
  top: 25%;
  width: 40%;
  aspect-ratio: 1;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,244,.9) 0 2%, rgba(255,245,213,.35) 9%, transparent 48%);
  filter: blur(2px);
  animation: sunBreathe 5s ease-in-out infinite;
}
@keyframes sunBreathe { 50% { opacity: .62; transform: translate(-50%,-50%) scale(1.1); } }
.sky-grain { position:absolute; inset:0; opacity:.12; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E"); mix-blend-mode:multiply; }
.e2-burp {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 68%;
  transform: translate(-50%,-50%) scale(.6);
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 900;
  color: rgba(255,252,238,.95);
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
}
.e2-burp.show { animation: e2Burp 2.4s ease-out forwards; }
@keyframes e2Burp {
  0% { opacity: 0; transform: translate(-50%,-30%) scale(.55) rotate(-6deg); filter: blur(5px); }
  16% { opacity: .96; transform: translate(-50%,-50%) scale(1.1) rotate(-2deg); filter: blur(0); }
  65% { opacity: .85; transform: translate(-50%,-55%) scale(1.25) rotate(1deg); }
  100% { opacity: 0; transform: translate(-50%,-90%) scale(1.55) rotate(4deg); filter: blur(4px); }
}

/* ---------- ending 3 ---------- */
.ending-three { background: #f4efe5; }
.e3-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(68% 52% at 50% 40%, #fffdf6 0%, #f6f0e4 48%, #e9e0d0 100%);
}
.mirror-of-absence {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 9.5%;
  width: 78%;
  height: 77%;
  transform: translateX(-50%) scale(.965);
  opacity: 0;
  transition: opacity 1.2s ease, transform 1.4s cubic-bezier(.2,.8,.2,1);
}
.mirror-of-absence.on { opacity: 1; transform: translateX(-50%) scale(1); }
.absence-frame {
  width: 100%; height: 100%;
  padding: 11px;
  border-radius: 48% 48% 3% 3% / 21% 21% 2% 2%;
  background:
    linear-gradient(128deg,#b28d55 0%,#e7ce97 18%,#8f6d3c 36%,#f2e0b0 53%,#b18c50 72%,#d8b97a 100%);
  box-shadow:
    0 0 0 1px rgba(96,72,38,.55),
    inset 0 0 0 2px rgba(255,248,221,.6),
    0 25px 45px rgba(105,87,56,.2);
}
.absence-glass {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  border-radius: 46% 46% 1% 1% / 19% 19% 1% 1%;
  background:
    linear-gradient(128deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.16) 22%, transparent 22.5%),
    radial-gradient(75% 55% at 60% 20%, #fffefa, #f5f0e5 52%, #e9e1d4 100%);
  box-shadow: inset 0 0 45px rgba(108,91,58,.16);
}
.absence-shine {
  position: absolute;
  width: 50%; height: 130%;
  left: -30%; top: -12%;
  transform: rotate(23deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: mirrorShine 7s ease-in-out infinite;
}
@keyframes mirrorShine { 0%, 58% { left:-38%; opacity:0;} 64%{opacity:.7;} 82%,100%{left:98%; opacity:0;} }
.absence-text {
  position: absolute;
  z-index: 2;
  left: 11%;
  right: 11%;
  top: 18%;
  bottom: 12%;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 13px;
  font-size: clamp(11.5px, 3.2cqw, 13.5px);
  line-height: 2.02;
  letter-spacing: .025em;
  color: #222b2a;
  text-align: justify;
}
.absence-text p {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1.1s ease, transform 1.2s ease;
  margin-bottom: 11px;
}
.absence-text p.on { opacity: 1; transform: translateY(0); }
.mirror-feet {
  position: absolute;
  bottom: -4%;
  left: 16%;
  right: 16%;
  height: 4%;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(90deg, transparent, rgba(151,119,69,.32), transparent);
  filter: blur(3px);
}
.ending-three .ending-skip { color: rgba(52,60,56,.42); }

/* ---------- ending 4 ---------- */
.ending-four { background: #170f07; }
.palace {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(100% 70% at 50% 8%, #ffe0a0 0%, #d3a34f 17%, #7b5423 44%, #3b2814 74%, #1d1309 100%);
}
.palace-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 46% at 50% 12%, rgba(255,244,206,.92), transparent 62%),
    linear-gradient(180deg, rgba(255,215,136,.38), transparent 48%);
}
.palace-columns {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(44,28,10,.65) 0 5%, transparent 5% 13%, rgba(255,229,169,.16) 13% 14%, transparent 14% 24%, rgba(44,28,10,.5) 24% 26%, transparent 26% 74%, rgba(44,28,10,.5) 74% 76%, transparent 76% 86%, rgba(255,229,169,.16) 86% 87%, transparent 87% 95%, rgba(44,28,10,.65) 95% 100%);
  opacity: .85;
}
.palace-arch {
  position: absolute;
  left: 50%;
  top: 9%;
  width: 76%;
  height: 66%;
  transform: translateX(-50%);
  border: 8px solid rgba(210,169,91,.4);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 28% 28% 0 0;
  box-shadow: 0 0 60px rgba(255,225,157,.14), inset 0 0 55px rgba(255,224,157,.1);
}
.palace-arch:before, .palace-arch:after {
  content:""; position:absolute; bottom:0; width:13%; height:82%;
  background: linear-gradient(90deg,rgba(255,236,187,.16),rgba(116,76,27,.2),rgba(255,235,180,.1));
  border: 1px solid rgba(237,197,116,.22);
}
.palace-arch:before { left: 3%; }
.palace-arch:after { right: 3%; }
.chandelier {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 0;
  width: 160px;
  height: 240px;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 28px rgba(255,224,151,.34));
}
.chandelier-chain { position:absolute; left:50%; top:0; width:1px; height:33%; background:linear-gradient(#cfa961,#f2d594); }
.chandelier-body { position:absolute; left:50%; top:32%; width:24px; height:45px; transform:translateX(-50%); border-radius:50% 50% 35% 35%; background:linear-gradient(90deg,#9e7736,#f5d797,#a48042); box-shadow:0 0 18px rgba(255,229,162,.4); }
.chandelier-arms { position:absolute; left:50%; top:43%; width:118px; height:50px; transform:translateX(-50%); }
.chandelier-arms i { position:absolute; width:54px; height:24px; border-top:2px solid #e5c47e; border-radius:50%; }
.chandelier-arms i:nth-child(1){left:-36px;top:11px;transform:rotate(18deg)}
.chandelier-arms i:nth-child(2){left:-16px;top:-2px;transform:rotate(7deg)}
.chandelier-arms i:nth-child(3){left:6px;top:0;transform:rotate(-7deg)}
.chandelier-arms i:nth-child(4){left:28px;top:11px;transform:rotate(-18deg)}
.chandelier-arms i:nth-child(5){left:-50px;top:32px;transform:rotate(30deg);opacity:.55}
.chandelier-arms i:nth-child(6){left:44px;top:32px;transform:rotate(-30deg);opacity:.55}
.chandelier-arms .flame {
  position: absolute;
  width: 4px;
  height: 10px;
  border-radius: 50% 50% 45% 45%;
  background: #fff6cd;
  box-shadow: 0 0 8px 3px rgba(255,229,156,.7), 0 0 22px 7px rgba(255,203,104,.22);
  animation: flameFlicker 1.8s ease-in-out infinite;
}
.chandelier-arms .f1 { left: -10px; top: 17px; }
.chandelier-arms .f2 { left: 9px; top: 2px; animation-delay: -.5s; }
.chandelier-arms .f3 { left: 32px; top: 2px; animation-delay: -1.1s; }
.chandelier-arms .f4 { left: 52px; top: 17px; animation-delay: -.8s; }
.chandelier-arms .f5 { left: -24px; top: 40px; animation-delay: -.3s; opacity: .6; }
.chandelier-arms .f6 { left: 67px; top: 40px; animation-delay: -1.4s; opacity: .6; }
@keyframes flameFlicker { 0%,100%{ transform:scaleY(.9) translateY(1px); opacity:.85 } 50%{ transform:scaleY(1.1) translateY(-1px); opacity:1 } }
.chandelier-crystals { position:absolute; left:50%; top:48%; width:130px; height:100px; transform:translateX(-50%); }
.chandelier-crystals i { position:absolute; width:2px; height:26px; background:linear-gradient(180deg,rgba(255,250,223,.9),rgba(255,226,157,.1)); box-shadow:0 0 5px rgba(255,240,196,.55); }
.chandelier-crystals i:nth-child(1){left:4%;top:14px}.chandelier-crystals i:nth-child(2){left:18%;top:24px}.chandelier-crystals i:nth-child(3){left:34%;top:12px}.chandelier-crystals i:nth-child(4){left:50%;top:30px;height:34px}.chandelier-crystals i:nth-child(5){left:64%;top:13px}.chandelier-crystals i:nth-child(6){left:79%;top:27px}.chandelier-crystals i:nth-child(7){left:94%;top:15px}.chandelier-crystals i:nth-child(8){left:41%;top:47px;height:18px}
.chandelier-glow { position:absolute; left:50%; top:28%; width:230px; height:230px; transform:translate(-50%,-50%); border-radius:50%; background:radial-gradient(circle,rgba(255,239,184,.34),transparent 65%); animation: chandGlow 4s ease-in-out infinite; }
@keyframes chandGlow { 50% { opacity:.65; transform:translate(-50%,-50%) scale(1.1); } }

.attendant {
  position: absolute;
  z-index: 4;
  bottom: 13%;
  width: 58px;
  height: 235px;
  opacity: .8;
  filter: drop-shadow(0 12px 10px rgba(32,20,8,.3));
}
.attendant:before {
  content:"";
  position:absolute; left:50%; top:0; width:34px; height:34px; transform:translateX(-50%);
  border-radius:50%; background:linear-gradient(135deg,#f2ddb1,#b89153);
  box-shadow:inset 0 0 0 1px rgba(255,250,226,.45);
}
.attendant:after {
  content:"";
  position:absolute; left:50%; top:26px; width:52px; height:205px; transform:translateX(-50%);
  border-radius:45% 45% 12% 12% / 16% 16% 4% 4%;
  background:
    linear-gradient(90deg, rgba(255,241,209,.08), rgba(255,228,169,.3) 45%, rgba(115,78,28,.16)),
    linear-gradient(180deg,#d9b97d,#9c7337 70%,#62451d);
  box-shadow: inset 0 0 0 1px rgba(255,246,217,.18);
}
.attendant .fan {
  position:absolute; z-index:2; top: 12px; width: 74px; height: 95px;
  border-radius: 100% 0 100% 0;
  background:
    repeating-linear-gradient(72deg, rgba(255,242,205,.6) 0 1px, transparent 1px 7px),
    linear-gradient(135deg, rgba(255,245,215,.75), rgba(196,156,91,.16));
  transform-origin: 20% 80%;
  animation: fanWave 5s ease-in-out infinite;
  opacity: .7;
}
.attendant.left .fan { right: -60px; transform: rotate(23deg); }
.attendant.right .fan { left: -60px; transform: rotate(-23deg) scaleX(-1); }
@keyframes fanWave { 0%,100%{ transform: rotate(20deg);} 50%{ transform: rotate(34deg);} }
.a1 { left: 7%; height: 225px; }
.a2 { left: 19%; height: 185px; opacity: .55; bottom: 12%; }
.a3 { right: 7%; height: 225px; }
.a4 { right: 19%; height: 185px; opacity: .55; bottom: 12%; }
.a3 .fan, .a4 .fan { animation-delay: -2.4s; }
.throne {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 9%;
  width: 57%;
  height: 58%;
  transform: translateX(-50%);
}
.throne-back {
  position: absolute; left: 4%; right: 4%; top: 0; bottom: 18%;
  border-radius: 48% 48% 4% 4% / 23% 23% 3% 3%;
  background:
    radial-gradient(70% 60% at 50% 20%, rgba(124,36,34,.9), rgba(65,23,24,.96) 70%),
    #5a2423;
  border: 6px solid transparent;
  background-clip: padding-box;
  box-shadow:
    0 0 0 3px #a37b3d,
    0 0 0 8px #6f4d22,
    inset 0 0 40px rgba(0,0,0,.42),
    0 20px 35px rgba(25,14,6,.4);
}
.throne-back:before {
  content:""; position:absolute; inset:8%; border:1px solid rgba(234,199,128,.44); border-radius: 44% 44% 2% 2% / 21% 21% 2% 2%;
}
.throne-cushion { position:absolute; left: 9%; right: 9%; bottom: 12%; height: 28%; border-radius: 22% 22% 8% 8%; background: linear-gradient(#a33f39,#6f2828); border:3px solid #a17a3d; box-shadow: inset 0 0 20px rgba(0,0,0,.28); }
.king-figure {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 8%;
  width: 80%;
  height: 48%;
  transform: translateX(-50%);
  background: none;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.king-figure img {
  position: relative;
  z-index: 3;
  width: 100%; height: 100%; object-fit: cover; object-position: center 6%;
  filter: sepia(.08) saturate(.96) contrast(1.02) drop-shadow(0 8px 12px rgba(51,31,10,.26));
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.king-figure:before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 52%, rgba(87,29,28,.16) 66%, rgba(90,36,35,.88) 86%, #5a2423 100%);
  pointer-events: none;
}
.king-figure:after { display: none; }
#kingHair {
  position: absolute;
  z-index: 2;
  left: -80%;
  top: -30%;
  width: 260%;
  height: 310%;
  pointer-events: none;
  overflow: visible;
}
.king-chain {
  position: absolute;
  z-index: 5;
  left: 29%;
  right: 29%;
  top: 67%;
  height: 23%;
  border-bottom: 2px solid rgba(238,205,137,.9);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  filter: drop-shadow(0 1px 2px rgba(63,38,12,.5));
  pointer-events: none;
}
.king-chain:after {
  content: "✦";
  position: absolute;
  left: 50%;
  bottom: -17px;
  transform: translateX(-50%);
  color: #f2d79a;
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 0 8px rgba(255,221,144,.75);
}
.king-crown {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 1%;
  transform: translateX(-50%) translateY(-50%) rotate(-3deg);
  font-size: 42px;
  line-height: 1;
  color: #ebc46f;
  text-shadow: 0 0 18px rgba(255,221,137,.7), 0 3px 0 #7b5524;
}
.throne-arm { position:absolute; z-index:6; bottom: 14%; width: 17%; height: 32%; border-radius: 14px; background: linear-gradient(90deg,#6e4a20,#d9b46f 38%,#805927 72%,#4d3113); box-shadow: inset 0 0 0 1px rgba(255,240,201,.35); }
.throne-arm.left { left: -11%; transform: rotate(-5deg); }
.throne-arm.right { right: -11%; transform: rotate(5deg); }
.throne-base { position:absolute; left:-8%; right:-8%; bottom: 2%; height: 18%; border-radius: 30% 30% 3% 3%; background: linear-gradient(180deg,#b08645,#68461f 65%,#3d2810); border-top:4px solid #e0bd78; box-shadow: 0 15px 28px rgba(23,13,6,.42); }
.catfish { position:absolute; z-index:8; left:-22%; bottom: 27%; width: 33%; transform:rotate(-9deg); filter: drop-shadow(0 4px 4px rgba(34,21,8,.35)); }
.mantis { position:absolute; z-index:8; right:-22%; bottom: 26%; width: 28%; transform:rotate(10deg); filter: drop-shadow(0 4px 4px rgba(34,21,8,.35)); }
.throne-pony { position:absolute; z-index:7; left: 33%; bottom: -2%; width: 44%; transform:rotate(5deg); filter: drop-shadow(0 5px 3px rgba(34,21,8,.4)); }
.throne-pony svg { width:100%; height:auto; }
.palace-floor {
  position: absolute;
  z-index: 2;
  left: -30%; right: -30%; bottom: -16%; height: 36%;
  background:
    linear-gradient(180deg, rgba(28,18,8,.35), rgba(54,36,14,.1) 45%, rgba(21,13,5,.55)),
    repeating-conic-gradient(#b68d52 0% 25%, #6e4c23 0% 50%);
  background-size: auto, 72px 72px;
  transform: perspective(430px) rotateX(54deg);
  transform-origin: top center;
}
.palace-floor:after { content:""; position:absolute; inset:0; background: linear-gradient(90deg, transparent 28%, rgba(126,35,31,.5) 28% 72%, transparent 72%); }
.palace-vignette {
  position:absolute; z-index:12; inset:0; pointer-events:none;
  background:
    radial-gradient(90% 74% at 50% 38%, transparent 42%, rgba(38,22,8,.38) 82%, rgba(20,12,5,.7) 100%),
    linear-gradient(180deg, rgba(34,21,8,.32), transparent 18%, transparent 60%, rgba(24,14,5,.38));
}
.gold-dust { position:absolute; inset:0; z-index:13; pointer-events:none; }
.gold-dust i { position:absolute; width:2px; height:2px; border-radius:50%; background:#ffe9b0; box-shadow:0 0 6px 1px rgba(255,227,158,.7); animation: goldFloat 8s linear infinite; }
@keyframes goldFloat { 0%{ transform:translateY(20px); opacity:0;} 15%{opacity:.8;} 80%{opacity:.4;} 100%{transform:translateY(-90px); opacity:0;} }
.e4-lines {
  position: absolute;
  z-index: 25;
  left: 7%;
  right: 7%;
  bottom: 7%;
  min-height: 20%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(24,14,6,.58) 35%, rgba(20,12,5,.7));
  padding: 18% 2% 3%;
}
.e4-lines p {
  max-width: 92%;
  text-align: center;
  font-family: var(--serif);
  font-size: 14px;
  font-size: clamp(12.5px, 3.55cqw, 15px);
  line-height: 1.85;
  letter-spacing: .035em;
  color: #fff1d2;
  text-shadow: 0 2px 12px rgba(0,0,0,.75), 0 0 22px rgba(88,50,12,.5);
  opacity: 0;
  transform: translateY(9px);
  transition: opacity .9s ease, transform 1s ease;
}
.e4-lines p.on { opacity: 1; transform: translateY(0); }
.e4-last {
  position: absolute;
  z-index: 45;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 13%;
  background: #020303;
}
.e4-last.show { display: flex; animation: lastIn 1s ease both; }
@keyframes lastIn { from { opacity: 0; } to { opacity: 1; } }
.e4-last p {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: .07em;
  color: #f1eadc;
  text-align: center;
  max-width: 320px;
}
.e4-last p:before { content:""; display:block; width:1px; height:34px; margin:0 auto 24px; background:linear-gradient(transparent,#bfae8c); }

/* =========================================================
   responsive height
   ========================================================= */
@media (max-height: 760px) {
  .title-wrap { margin-top: 7.5%; }
  .title-sub { margin-top: 11px; }
  .start-btn { bottom: 15.2%; height: 52px; }
  .gallery-item { width: 25cqw; }
  .ending-gallery { top: 49%; }
  .ad-headline { font-size: 45px; top: 28px; }
  .ad-copy { top: 33px; font-size: 8px; }
  .ad-seal { bottom: 20px; width: 34px; height: 34px; font-size: 8px; }
  .ad-pony { width: 64px; bottom: 16px; }
  .chat-body { padding-top: 8px; }
  .boss-portrait { max-height: 66%; bottom: 22%; }
  .dialogue { padding: 16px 17px 14px; bottom: 4%; }
  .dialogue-text { font-size: 15.5px; min-height: 44px; }
  .choice { padding: 9px 5px 8px; }
  .choice span { font-size: 19px; }
  .customer-stage { top: 8%; width: 82%; max-width: 330px; }
  .water-btn { width: 78px; height: 78px; }
  .game-scene.pony-mode .water-btn { bottom: 215px; }
  .mirror-of-absence { top: 6%; height: 82%; width: 80%; }
  .absence-text { top: 15%; font-size: 11px; line-height: 1.9; }
  .e2-lines { gap: 9px; top: 8%; bottom: 8%; }
  .e2-lines p { line-height: 1.8; font-size: 13px; }
  .fin { font-size: 92px; }
  .e1-boss { top: 10%; width: 66%; }
  .e1-line { font-size: 16px; }
  .dance-frame { width: 92%; }
  .throne { height: 60%; bottom: 7%; }
  .e4-lines { bottom: 4%; padding-top: 25%; }
}
@media (max-height: 640px) {
  .title-kicker { display: none; }
  .title-wrap { margin-top: 6%; }
  .title-sub { display: none; }
  .ending-gallery { top: 39%; width: 92%; }
  .gallery-item { width: 19cqw; }
  .gallery-title { font-size: 8px; margin-bottom: 8px; }
  .gallery-row { padding-bottom: 8px; }
  .gallery-item figcaption { display: none; }
  .start-btn { bottom: 19%; }
  .title-small { display: none; }
  .title-credit { bottom: 11%; }
  .customer-stage { width: 72%; top: 11%; max-width: 280px; }
  .game-hint { bottom: 16%; }
  .water-btn { width: 68px; height: 68px; left: 15px; }
  .pony { width: 98px; margin-left: -37px; }
  .dialogue-text { font-size: 14.5px; }
  .choice small { display: none; }
  .choice { padding: 8px; }
  .ad-bubble { width: 70cqw; }
  .qq-head { height: 50px; }
  .chat-body { top: calc(84px + env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; }
}


/* =========================================================
   interaction extras
   ========================================================= */
.pony.flee {
  opacity: 0;
  transform: translateX(210%) translateY(-32px) rotate(13deg) !important;
  transition: opacity .45s ease .18s, transform .75s cubic-bezier(.3,.8,.3,1) !important;
  animation: none !important;
}
.burp-bubble {
  position: absolute;
  z-index: 14;
  left: 57%;
  top: 38%;
  padding: 8px 12px;
  border-radius: 14px 14px 14px 2px;
  background: rgba(255,251,238,.96);
  color: #2e3b31;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .08em;
  box-shadow: 0 5px 18px rgba(35,50,34,.18);
  animation: burpBubble 1.3s ease-out forwards;
  pointer-events: none;
}
@keyframes burpBubble {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.5); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
  70% { opacity: 1; transform: translate(-50%, -4px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -28px) scale(.96); }
}
.ending-toast {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 21.5%;
  transform: translateX(-50%) translateY(8px);
  padding: 9px 15px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(21,42,37,.58);
  color: #f8f2e3;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: .16em;
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease, transform .5s ease;
}
.ending-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* lightbox typography scale */
.lightbox-card .ad-headline { font-size: clamp(62px, 16cqw, 78px); top: 44px; left: 18px; }
.lightbox-card .ad-brand { font-size: 9px; left: 16px; top: 13px; }
.lightbox-card .ad-copy { font-size: 11px; right: 16px; top: 57px; }
.lightbox-card .ad-seal { width: 52px; height: 52px; font-size: 11px; left: 21px; bottom: 34px; }
.lightbox-card .ad-pony { width: 105px; right: 13px; bottom: 27px; }
.lightbox-card .ad-foot { font-size: 7px; bottom: 9px; }

.cafe-door-bell { display: none; }

/* BrewPage injects an automatic reading panel below the game; hide it so the work stays full-screen. */
#__bp_about { display: none !important; }
