@font-face {
  font-family: "Qpat Huninn";
  src: url("assets/fonts/qpat-huninn-2.1-subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Qpat Taipei Sans TC";
  src: url("assets/fonts/qpat-taipei-sans-tc-beta-regular-subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Qpat Nunito";
  src: url("assets/fonts/qpat-nunito-variable-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #3f302b;
  --muted: #806e67;
  --cream: #fffaf7;
  --surface: rgba(255, 255, 255, 0.88);
  --line: rgba(112, 74, 58, 0.12);
  --blue: #5c95df;
  --coral: #f1897f;
  --green: #8bb682;
  --brown: #704a3a;
  --focus: #2268c7;
  --font-qpat: "Qpat Huninn", "Arial Rounded MT Bold", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-info: "Qpat Taipei Sans TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
  --font-en: "Qpat Nunito", "Segoe UI", Arial, sans-serif;
  font-family: var(--font-info);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(247, 190, 158, 0.16), transparent 28rem),
    radial-gradient(circle at 92% 0%, rgba(139, 182, 130, 0.13), transparent 26rem),
    var(--cream);
}

html[lang="en"] body {
  font-family: var(--font-en);
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: white;
  background: var(--focus);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: 100%;
  padding: 1rem clamp(1rem, 4vw, 4.5rem) 0;
}

.site-nav {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto minmax(8rem, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  width: min(90rem, 100%);
  min-height: 5.25rem;
  margin: 0 auto;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background: var(--surface);
  box-shadow: 0 0.8rem 2.4rem rgba(102, 73, 61, 0.08);
  backdrop-filter: blur(18px);
}

.language-switch {
  display: inline-flex;
  justify-self: start;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.language-option {
  min-width: 3.3rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.language-option.is-active {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 0.25rem 0.7rem rgba(92, 149, 223, 0.25);
}

.brand {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: end;
  justify-content: center;
  color: var(--brown);
  text-decoration: none;
  line-height: 1;
}

.brand-name {
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", sans-serif;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.1em;
}

.brand-name > span:nth-child(1) { color: var(--coral); }
.brand-name > span:nth-child(2) { color: var(--blue); }
.brand-name > span:nth-child(3) { color: var(--green); }

.brand-subtitle {
  margin: 0.14rem 0 0 0.18rem;
  color: var(--ink);
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-actions {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: clamp(0.25rem, 1.15vw, 1rem);
}

.nav-actions button {
  min-height: 2.75rem;
  padding: 0.5rem 0.55rem;
  border: 0;
  border-radius: 0.9rem;
  background: transparent;
  font-size: 0.98rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.nav-actions,
.platform-note,
.slot-eyebrow,
.board-description,
.version-slot,
.news-row,
.product-slot small {
  font-family: var(--font-info);
}

.nav-actions button:hover {
  color: #9b514e;
  background: rgba(241, 137, 127, 0.1);
}

.nav-actions button:active {
  transform: translateY(1px);
}

.heart {
  margin-left: 0.1rem;
  color: var(--coral);
  font-size: 1.05em;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

#main-content {
  min-height: calc(100vh - 7rem);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  align-items: end;
  gap: 0;
  width: min(94rem, calc(100% - 2rem));
  min-height: min(47rem, calc(100vh - 7rem));
  margin: 1rem auto 2rem;
  padding: clamp(3rem, 7vh, 5.5rem) clamp(1rem, 4vw, 4.5rem) clamp(8rem, 17vh, 10rem);
  overflow: hidden;
  border: 1px solid rgba(172, 126, 96, 0.12);
  border-radius: clamp(1.75rem, 3vw, 3.25rem);
  background: #f2d8c5;
  box-shadow: 0 1.8rem 4rem rgba(112, 74, 58, 0.12);
  isolation: isolate;
}

.hero-room {
  position: absolute;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  background: #f3d9bf url("assets/hero/qpat-life-desk-1600.webp") center center / cover no-repeat;
}

.hero-room::before,
.hero-room::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-room::before {
  inset: 0;
  background: radial-gradient(ellipse at 71% 45%, rgba(255, 251, 245, 0.36), rgba(255, 251, 245, 0.16) 42%, transparent 67%);
}

.hero-room::after {
  display: none;
}

.hero-room > span { display: none; }

.window-frame {
  position: absolute;
  top: 8%;
  width: 23%;
  height: 47%;
  border: clamp(0.45rem, 0.8vw, 0.75rem) solid rgba(255, 255, 255, 0.82);
  border-radius: 1.4rem;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255,255,255,0.8) 48% 52%, transparent 52%),
    linear-gradient(transparent 48%, rgba(255,255,255,0.72) 48% 52%, transparent 52%),
    linear-gradient(160deg, rgba(166,216,244,0.72), rgba(255,244,206,0.62));
  box-shadow: 0 0 3rem rgba(255,255,255,0.9);
  box-shadow: 0 0 4rem rgba(255,255,255,0.92), inset 0 0 2rem rgba(255,255,255,0.38);
  opacity: 0.78;
}

.window-frame-one { left: 24%; }
.window-frame-two { left: 48%; }

.room-leaf {
  position: absolute;
  width: 5rem;
  height: 2.4rem;
  border-radius: 100% 0 100% 0;
  background: rgba(111, 151, 91, 0.24);
  filter: blur(0.8px);
}

.leaf-one { top: 12%; left: -1rem; transform: rotate(22deg); }
.leaf-two { top: 20%; left: 2.8rem; transform: rotate(62deg) scale(0.78); }
.leaf-three { top: 7%; right: 2%; transform: rotate(-28deg) scale(1.15); }

.room-curtain {
  position: absolute;
  z-index: 1;
  top: -5%;
  bottom: 23%;
  width: 13%;
  border-radius: 0 0 48% 28%;
  background: linear-gradient(90deg, rgba(226, 167, 145, 0.52), rgba(255, 225, 207, 0.3) 58%, rgba(255,255,255,0.18));
  box-shadow: inset -1rem 0 2rem rgba(184, 126, 106, 0.1);
  filter: blur(1.2px);
}

.curtain-left { left: 15%; transform: skewX(-2deg); }
.curtain-right { left: 70%; transform: scaleX(-1) skewX(-2deg); opacity: 0.74; }

.room-shelf {
  position: absolute;
  top: 20%;
  right: 2.5%;
  width: 11rem;
  height: 0.75rem;
  border-radius: 999px;
  background: rgba(166, 111, 81, 0.2);
  box-shadow: 0 0.65rem 1rem rgba(110, 73, 52, 0.08);
  filter: blur(0.6px);
}

.room-picture {
  position: absolute;
  top: 26%;
  right: 5.5%;
  width: 7.5rem;
  height: 9rem;
  border: 0.55rem solid rgba(255,255,255,0.58);
  border-radius: 0.55rem;
  background: linear-gradient(155deg, rgba(152,194,196,0.2), rgba(238,181,158,0.2));
  box-shadow: 0 0.8rem 1.5rem rgba(105,72,56,0.08);
  filter: blur(1.1px);
}

.room-plant {
  position: absolute;
  z-index: 2;
  right: 3.7%;
  bottom: 10.8%;
  width: 8rem;
  height: 11rem;
  filter: blur(1.1px);
  opacity: 0.72;
}

.room-plant i {
  position: absolute;
  left: 50%;
  bottom: 3.5rem;
  width: 3.6rem;
  height: 6rem;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, rgba(108,151,91,0.62), rgba(143,172,112,0.34));
  transform-origin: 0 100%;
}

.room-plant i:nth-child(1) { transform: rotate(-38deg) scale(0.82); }
.room-plant i:nth-child(2) { transform: rotate(-8deg) scale(0.92); }
.room-plant i:nth-child(3) { transform: rotate(30deg) scale(0.76); }
.room-plant b { position: absolute; inset: auto 1rem 0; height: 4.2rem; border-radius: 0.7rem 0.7rem 1.6rem 1.6rem; background: linear-gradient(135deg, rgba(238,196,168,0.9), rgba(195,129,104,0.58)); }

.room-mug {
  position: absolute;
  z-index: 2;
  right: 16%;
  bottom: 11.5%;
  width: 5.4rem;
  height: 4.9rem;
  border-radius: 0.55rem 0.55rem 1.25rem 1.25rem;
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(241,182,166,0.66));
  box-shadow: 0 0.7rem 1rem rgba(102,67,53,0.1), 1.7rem 0.15rem 0 -1.1rem rgba(255,244,235,0.82), 1.7rem 0.15rem 0 -0.85rem rgba(184,123,103,0.35);
  filter: blur(0.45px);
}

.room-books {
  position: absolute;
  z-index: 2;
  left: 2.4%;
  bottom: 11.5%;
  width: 9rem;
  height: 1.25rem;
  border-radius: 0.35rem;
  background: rgba(141,172,188,0.58);
  box-shadow: 0 -1.45rem 0 -0.15rem rgba(226,169,151,0.62), 0 -2.8rem 0 -0.3rem rgba(245,220,173,0.7), 0 0.7rem 1.2rem rgba(102,67,53,0.1);
  filter: blur(0.35px);
}

.desktop-surface {
  display: none;
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(7rem, 18%, 9rem);
  border-top: 1px solid rgba(146, 101, 70, 0.13);
  background:
    radial-gradient(ellipse at 31% 8%, rgba(255,255,255,0.9), transparent 24%),
    linear-gradient(180deg, rgba(255,248,236,0.9), rgba(229,190,154,0.88)),
    repeating-linear-gradient(90deg, transparent 0 7rem, rgba(137,95,69,0.04) 7rem 7.1rem);
  box-shadow: inset 0 1.2rem 2.2rem rgba(255,255,255,0.5), 0 -1rem 3rem rgba(255,255,255,0.35);
}

.hero-visual {
  position: relative;
  align-self: end;
  min-height: 31rem;
  min-width: 0;
}

.hero-glow {
  position: absolute;
  inset: 9% -10% -4% -6%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 211, 157, 0.26), rgba(255, 237, 211, 0.14) 48%, transparent 72%);
}

.qpat-stage {
  position: absolute;
  right: 14%;
  bottom: 0.8rem;
  width: min(28vw, 23rem);
  aspect-ratio: 1;
}

.contact-shadow {
  position: absolute;
  right: 18%;
  bottom: 0.55rem;
  width: 56%;
  height: 1.8rem;
  border-radius: 50%;
  background: rgba(91, 56, 40, 0.24);
  filter: blur(1rem);
}

.qpat-character {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 50% 100%;
  animation: qpat-breathe 3.8s ease-in-out infinite;
}

.qpat-character img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qpat-expression {
  position: absolute;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(24.6%);
}

.qpat-character[data-expression="half"] .qpat-expression-half,
.qpat-character[data-expression="closed"] .qpat-expression-closed {
  visibility: visible;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  justify-self: center;
  max-width: 43rem;
  padding: 1rem 0 2.5rem clamp(1rem, 2vw, 2.5rem);
}

.hero-brand {
  display: block;
  width: min(30rem, 76%);
  height: auto;
  margin: 0 auto 1.15rem;
}

.hero h1 {
  max-width: none;
  margin: 0;
  color: #46342e;
  font-size: clamp(1.85rem, 2.55vw, 2.65rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
  text-align: center;
  white-space: nowrap;
}

.hero h1,
.hero-lead,
.download-button,
.board-status,
.board-title,
.board-list h3,
.board-action {
  font-family: var(--font-qpat);
}

html[lang="en"] [data-copy-en],
html[lang="en"] .coming-soon,
html[lang="en"] .version-slot {
  font-family: var(--font-en);
}

.hero-lead {
  max-width: 32rem;
  margin: 0.85rem auto 1.45rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  font-weight: 600;
  line-height: 1.7;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 4rem;
  padding: 0.9rem 2rem;
  border: 0;
  border-radius: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, #5d9be8, #4c83d2);
  box-shadow: 0 0.8rem 1.6rem rgba(65, 117, 184, 0.24);
  font-size: 1.13rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.download-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 1rem 1.9rem rgba(65, 117, 184, 0.3);
}

.download-button:active {
  transform: translateY(0);
}

.windows-mark {
  display: grid;
  grid-template-columns: repeat(2, 0.48rem);
  grid-template-rows: repeat(2, 0.48rem);
  gap: 0.12rem;
}

.windows-mark i {
  display: block;
  background: currentColor;
}

.platform-note {
  margin: 0.8rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.6;
}

@keyframes qpat-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: scale(1.006, 1.025); }
}

.info-boards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(1rem, 2vw, 1.5rem);
  width: min(88rem, calc(100% - 2rem));
  margin: -3.2rem auto 4rem;
  position: relative;
  z-index: 3;
}

.info-board {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 34rem;
  flex-direction: column;
  padding: 1.35rem;
  border: 2px solid rgba(255,255,255,0.72);
  border-radius: 2.75rem;
  box-shadow: 0 1.45rem 3rem rgba(103,72,62,0.13), inset 0 1.25rem 2.3rem rgba(255,255,255,0.34), inset 0 -0.8rem 1.8rem rgba(111,72,86,0.045);
  isolation: isolate;
}

.info-board::after { content: ""; position: absolute; z-index: -1; inset: 0.65rem; border-radius: 2.2rem; border: 1px solid rgba(255,255,255,0.44); pointer-events: none; }
.info-board-live { background: radial-gradient(circle at 82% 8%, rgba(255,255,255,0.75), transparent 26%), linear-gradient(150deg, #fff1f4, #f8cfd9 94%); }
.info-board-wardrobe { background: radial-gradient(circle at 82% 8%, rgba(255,255,255,0.74), transparent 27%), linear-gradient(150deg, #fff9e5, #f7dda0 94%); }
.info-board-next { background: radial-gradient(circle at 80% 10%, rgba(255,255,255,0.75), transparent 28%), linear-gradient(150deg, #f7f3ff, #ddd3fa 94%); }

.board-header { position: relative; z-index: 3; display: flex; align-items: center; min-height: 3.6rem; }

.board-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.6rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 1.5rem;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 0.55rem 1.1rem rgba(94,62,54,0.12), inset 0 0.35rem 0.8rem rgba(255,255,255,0.24), inset 0 -0.25rem 0.55rem rgba(80,45,40,0.08);
}

.board-status-icon { width: 1.7rem; height: 1.7rem; color: #fff; fill: currentColor; flex: 0 0 auto; }
.info-board-live .board-status { background: linear-gradient(145deg, #f67d8d, #e65e72); }
.info-board-wardrobe .board-status { background: linear-gradient(145deg, #f6b53d, #e69c1e); }
.info-board-next .board-status { background: linear-gradient(145deg, #9276df, #7657c7); }

.board-peeker { position: absolute; z-index: 2; overflow: hidden; pointer-events: none; filter: drop-shadow(0 0.75rem 0.6rem rgba(89,57,45,0.12)); }
.board-peeker-live { top: -9.5rem; right: 0.8rem; width: 17rem; height: 12rem; }
.board-peeker-live img { position: absolute; top: -1.9rem; right: 0; width: 17rem; height: 17rem; object-fit: contain; }
.board-peeker-wardrobe { top: -7.8rem; right: 0.7rem; width: 18rem; height: 10rem; overflow: visible; }
.board-peeker-wardrobe .wardrobe-pose { position: absolute; z-index: 1; top: -4.7rem; right: 0.8rem; width: 18rem; height: 18rem; object-fit: contain; }

.resident-summary {
  display: grid;
  grid-template-columns: minmax(6.8rem, 38%) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 11.5rem;
  margin-top: 0.55rem;
  padding: 0.9rem;
  border-radius: 1.9rem;
  background: rgba(255,255,255,0.48);
  box-shadow: inset 0 0.45rem 1.15rem rgba(255,255,255,0.52), 0 0.55rem 1.2rem rgba(119,76,79,0.06);
}

.board-primary { min-width: 0; }
.slot-eyebrow { margin: 0 0 0.2rem; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.board-title { margin: 0; color: #46342e; font-size: clamp(1.35rem, 1.7vw, 1.75rem); line-height: 1.3; }
.board-description { margin: 0.35rem 0 0; color: var(--muted); line-height: 1.55; }

.version-slot {
  display: inline-flex;
  margin-top: 0.65rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  color: #4674a8;
  background: rgba(200,225,251,0.82);
  font-size: 0.78rem;
  font-weight: 700;
}

.board-image-slot {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(91,65,55,0.18);
  background: rgba(255,255,255,0.62);
}

.resident-image-slot { position: relative; min-height: 8.5rem; border: 1px solid rgba(239,155,170,0.3); border-radius: 1.45rem; box-shadow: inset 0 0.55rem 1rem rgba(255,255,255,0.62); }
.resident-preview { position: relative; display: block; width: min(100%, 8.4rem); aspect-ratio: 1; }
.resident-preview img { position: absolute; display: block; pointer-events: none; }
.resident-preview-pet { inset: 0; width: 100%; height: 100%; object-fit: contain; }
.resident-preview-accessory { z-index: 1; top: 44%; left: 24%; width: 52%; height: 52%; object-fit: contain; }

.board-list {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 1.7rem;
  background: rgba(255,255,255,0.6);
  box-shadow: inset 0 0.55rem 1rem rgba(255,255,255,0.55);
}

.board-list h3 { margin: 0 0 0.45rem; font-size: 1rem; }

.news-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.42rem 0;
  border-top: 1px solid rgba(112,74,58,0.08);
  color: #66534c;
  font-size: 0.86rem;
}

.news-row time { color: #9a8881; white-space: nowrap; }

.board-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: min(100%, 22rem);
  min-height: 3.45rem;
  margin: auto auto 0.05rem;
  padding: 0.65rem 1.4rem;
  border: 2px solid currentColor;
  border-radius: 999px;
  color: #d96f7f;
  background: rgba(255,255,255,0.64);
  box-shadow: 0 0.65rem 1.2rem rgba(101,68,58,0.08), inset 0 0.35rem 0.7rem rgba(255,255,255,0.7);
  font-weight: 800;
  cursor: pointer;
}

.board-action:hover { background: #fff; }
.info-board-wardrobe .board-action { color: #d79925; }
.info-board-next .board-action { color: #8c70d7; }
.board-action-placeholder { cursor: default; }
.board-action-placeholder span { margin-left: auto; font-size: 1.5rem; }
.coming-soon { font-family: var(--font-en); }
.board-intro { margin-top: 0.55rem; padding: 1rem 1.1rem; border: 1px solid rgba(255,255,255,0.62); border-radius: 1.65rem; background: rgba(255,255,255,0.48); box-shadow: inset 0 0.55rem 1rem rgba(255,255,255,0.52); text-align: center; }

.product-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.85rem 0 1.2rem;
}

.product-slot { min-width: 0; text-align: center; }
.product-image-slot { aspect-ratio: 1; border: 1px solid rgba(221,168,68,0.23); border-radius: 1.2rem; color: rgba(197,148,48,0.5); background: rgba(255,255,255,0.68); box-shadow: 0 0.5rem 1rem rgba(119,85,30,0.07), inset 0 0.55rem 0.9rem rgba(255,255,255,0.65); font-size: 2rem; }
.product-image-slot img { display: block; width: 88%; height: 88%; object-fit: contain; }
.product-image-stack { position: relative; }
.product-image-stack img { position: absolute; inset: 6%; }
.product-slot strong, .product-slot small { display: block; overflow-wrap: anywhere; }
.product-slot strong { margin-top: 0.55rem; font-size: 0.9rem; }
.product-slot small { margin-top: 0.2rem; color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
.product-slot .product-preview-price {
  align-items: center;
  display: flex;
  justify-content: center;
  width: fit-content;
  min-width: 3.9rem;
  margin: 0.38rem auto 0;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  font-family: var(--font-info);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.product-slot .product-preview-price--basic { color: #8f5260; background: #f5dce1; }
.product-slot .product-preview-price--motion { color: #665989; background: #e5e1f3; }

.next-resident-slot {
  position: relative;
  min-height: 19rem;
  margin: 1.2rem 0 0.8rem;
  border: 1px solid rgba(255,255,255,0.64);
  border-radius: 2rem;
  background: radial-gradient(circle at 50% 44%, rgba(255,255,255,0.7), transparent 50%), linear-gradient(155deg, rgba(255,255,255,0.46), rgba(214,204,246,0.42));
  box-shadow: inset 0 0.8rem 1.5rem rgba(255,255,255,0.48);
}

.resident-silhouette {
  position: relative;
  display: grid;
  place-items: center;
  width: min(78%, 15rem);
  aspect-ratio: 1.12;
  margin-top: 2.5rem;
  color: rgba(255,255,255,0.9);
  filter: drop-shadow(0 0.75rem 1.2rem rgba(96,72,152,0.14));
}

.resident-silhouette img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0.78; filter: grayscale(1) sepia(0.3) hue-rotate(205deg) saturate(1.8) contrast(0.32) brightness(0.8) blur(0.8px); }
.resident-silhouette i { position: relative; z-index: 1; font-size: 3rem; font-style: normal; font-weight: 800; }
.resident-silhouette i { position: absolute; inset: 0; display: grid; place-items: center; text-shadow: 0 0.2rem 0.5rem rgba(88,66,139,0.22); }
.mystery-spark { position: absolute; z-index: 2; font-size: 2.5rem; text-shadow: 0 0.35rem 0.8rem rgba(113,78,173,0.12); }
.mystery-spark-one { top: 3.3rem; left: 1.4rem; color: #f5bb50; }
.mystery-spark-two { top: 2rem; right: 1.4rem; color: #9678e6; }
.mystery-plant { position: absolute; bottom: 0; width: 4rem; height: 7rem; opacity: 0.2; }
.mystery-plant::before, .mystery-plant::after { content: ""; position: absolute; bottom: 0; width: 2.5rem; height: 5.5rem; border-radius: 100% 0 100% 0; background: #8270b7; }
.mystery-plant::after { transform: rotate(38deg) scale(0.75); }
.mystery-plant-left { left: 0.2rem; }
.mystery-plant-right { right: 0.2rem; transform: scaleX(-1); }

.feature-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.5vw, 1.25rem);
  width: min(88rem, calc(100% - 2rem));
  margin: 0 auto clamp(3rem, 6vw, 5rem);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  min-height: 7.5rem;
  padding: 1.1rem;
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 1.8rem;
  background: rgba(255,255,255,0.68);
  box-shadow: 0 0.8rem 2rem rgba(100,72,61,0.08), inset 0 0.55rem 1rem rgba(255,255,255,0.72);
}

.feature-icon {
  display: grid;
  flex: 0 0 3.25rem;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border-radius: 1.2rem;
  color: #835f52;
  background: #fff2dd;
}

.feature-icon svg { width: 2rem; height: 2rem; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.feature-outfits .feature-icon { color: #5f7fa6; background: #edf5ff; }
.feature-reactions .feature-icon { color: #ca6977; background: #fff0f3; }
.feature-devices .feature-icon { color: #60875f; background: #eff8ed; }
.feature-item h2 { margin: 0; font-family: var(--font-qpat); font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.35; }
.feature-item p { margin: 0.28rem 0 0; color: var(--muted); font-family: var(--font-info); font-size: 0.84rem; line-height: 1.5; }

.site-footer { padding: 0 clamp(1rem, 4vw, 4.5rem) 1.4rem; }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto minmax(12rem, 1fr);
  align-items: center;
  gap: 1.5rem;
  width: min(90rem, 100%);
  min-height: 6.5rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(112,74,58,0.12);
  color: #75625b;
}
.footer-identity p { margin: 0.14rem 0; font-size: 0.78rem; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2rem 0.45rem; }
.footer-legal button { min-height: 2.75rem; padding: 0.45rem 0.6rem; border: 0; border-radius: 0.8rem; color: inherit; background: transparent; font-family: var(--font-info); font-size: 0.78rem; cursor: pointer; }
.footer-legal button:hover { color: #9b514e; background: rgba(241,137,127,0.1); }
.footer-message { justify-self: end; margin: 0; font-family: var(--font-qpat); font-size: 0.95rem; text-align: right; }
.has-open-letter { overflow: hidden; }
.letter-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(0.8rem, 3vw, 2rem);
}
.letter-layer[hidden] { display: none; }
.letter-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(68, 48, 41, 0.28);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 180ms ease;
}
.letter-dialog {
  position: relative;
  width: min(40rem, 100%);
  max-height: min(42rem, calc(100dvh - 1.6rem));
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.86);
  border-radius: clamp(1.5rem, 4vw, 2.4rem);
  color: #4f3b34;
  background:
    linear-gradient(90deg, transparent 2.6rem, rgba(238,158,154,0.13) 2.65rem, transparent 2.72rem),
    repeating-linear-gradient(180deg, rgba(255,255,255,0) 0 2.15rem, rgba(144,116,98,0.055) 2.18rem 2.22rem),
    linear-gradient(145deg, #fffdf9, #fff6ed);
  box-shadow: 0 2rem 5rem rgba(70,46,38,0.24), inset 0 0.75rem 1.5rem rgba(255,255,255,0.72);
  opacity: 0;
  transform: translateY(1rem) scaleY(0.94);
  transform-origin: 50% 18%;
  transition: opacity 180ms ease, transform 180ms ease;
}
.letter-layer.is-open .letter-backdrop,
.letter-layer.is-open .letter-dialog { opacity: 1; }
.letter-layer.is-open .letter-dialog { transform: translateY(0) scaleY(1); }
.letter-scroll { max-height: inherit; overflow-y: auto; padding: clamp(2.2rem, 6vw, 4rem) clamp(1.6rem, 7vw, 4.5rem) clamp(2rem, 6vw, 3.5rem); overscroll-behavior: contain; }
.letter-kicker { margin: 0 0 0.6rem; color: #d47877; font-family: var(--font-qpat); font-weight: 800; }
.letter-dialog h2 { margin: 0 0 1.35rem; font-family: var(--font-qpat); font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.25; }
.letter-content { font-family: var(--font-info); font-size: 1rem; line-height: 1.85; }
.letter-content p { margin: 0 0 0.85rem; }
.letter-email { display: inline-flex; min-height: 2.75rem; align-items: center; margin-top: 0.4rem; padding: 0.45rem 0.9rem; border-radius: 999px; color: #9f514f; background: rgba(241,137,127,0.14); font-weight: 800; text-decoration: none; }
.letter-content .letter-safety { margin-top: 0.8rem; padding: 0.7rem 0.85rem; border-radius: 0.9rem; color: #8b5961; background: rgba(255,240,239,0.78); font-size: 0.9rem; line-height: 1.55; }
.letter-email:hover { background: rgba(241,137,127,0.22); }
.letter-close { position: absolute; z-index: 2; top: 1rem; right: 1rem; display: grid; width: 2.8rem; height: 2.8rem; place-items: center; border: 0; border-radius: 50%; color: #8c665d; background: rgba(255,255,255,0.82); box-shadow: 0 0.4rem 1rem rgba(93,62,50,0.12); font-size: 1.75rem; line-height: 1; cursor: pointer; }
.letter-accent { position: absolute; z-index: 1; top: 1.1rem; left: 1.35rem; color: #e69a95; font-size: 1.35rem; transform: rotate(-9deg); }
.has-open-service { overflow: hidden; }
.service-layer {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(0.8rem, 3vw, 2rem);
}
.service-layer[hidden] { display: none; }
.service-backdrop { position: absolute; inset: 0; background: rgba(53,50,62,0.3); backdrop-filter: blur(3px); opacity: 0; transition: opacity 180ms ease; }
.service-dialog {
  position: relative;
  width: min(44rem, 100%);
  max-height: min(44rem, calc(100dvh - 1.6rem));
  overflow-y: auto;
  padding: clamp(1.35rem, 4vw, 2.3rem);
  border: 1px solid rgba(255,255,255,0.86);
  border-radius: clamp(1.6rem, 4vw, 2.5rem);
  color: #4f3b34;
  background: radial-gradient(circle at 12% 5%, rgba(255,229,218,0.84), transparent 31%), linear-gradient(145deg, #fffdf9, #f7f2ff);
  box-shadow: 0 2rem 5rem rgba(57,47,72,0.25), inset 0 0.8rem 1.5rem rgba(255,255,255,0.7);
  opacity: 0;
  transform: translateY(0.8rem) scale(0.97);
  transition: opacity 180ms ease, transform 180ms ease;
}
.service-layer.is-open .service-backdrop,
.service-layer.is-open .service-dialog { opacity: 1; }
.service-layer.is-open .service-dialog { transform: translateY(0) scale(1); }
.service-heading { display: flex; align-items: center; gap: 1rem; padding-right: 3.2rem; }
.service-avatar { display: grid; flex: 0 0 4rem; width: 4rem; height: 4rem; place-items: center; border-radius: 1.4rem; background: linear-gradient(145deg, #fff0ea, #f6d9ec); box-shadow: inset 0 0.4rem 0.8rem rgba(255,255,255,0.7), 0 0.6rem 1.2rem rgba(102,68,80,0.09); font-size: 1.75rem; }
.service-kicker { margin: 0 0 0.18rem; color: #8d76bd; font-family: var(--font-en); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.service-dialog h2 { margin: 0; font-family: var(--font-qpat); font-size: clamp(1.65rem, 4vw, 2.15rem); line-height: 1.25; }
.service-intro { margin: 1.1rem 0 1.25rem; color: var(--muted); line-height: 1.65; }
.service-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.service-backup-contact { margin: 1rem auto 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; text-align: center; }
.service-backup-contact a { color: #765fa5; font-weight: 800; text-underline-offset: 0.16em; }
.service-option { display: flex; align-items: center; gap: 0.8rem; min-height: 4.6rem; padding: 0.8rem 1rem; border: 1px solid rgba(148,117,174,0.14); border-radius: 1.35rem; color: #56413b; background: rgba(255,255,255,0.74); box-shadow: 0 0.55rem 1.2rem rgba(76,60,86,0.07), inset 0 0.35rem 0.7rem rgba(255,255,255,0.66); font-family: var(--font-qpat); font-size: 1rem; font-weight: 800; text-align: left; cursor: pointer; }
.service-option:hover { border-color: rgba(218,132,135,0.34); background: #fff; transform: translateY(-1px); }
.service-option-icon { display: grid; flex: 0 0 2.6rem; width: 2.6rem; height: 2.6rem; place-items: center; border-radius: 0.95rem; background: linear-gradient(145deg, #fff1e7, #f1eafa); font-size: 1.2rem; }
.service-close { position: absolute; z-index: 2; top: 1rem; right: 1rem; display: grid; width: 2.8rem; height: 2.8rem; place-items: center; border: 0; border-radius: 50%; color: #786477; background: rgba(255,255,255,0.84); box-shadow: 0 0.4rem 1rem rgba(73,58,81,0.12); font-size: 1.75rem; line-height: 1; cursor: pointer; }
.service-back { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.8rem; margin-bottom: 1rem; padding: 0.45rem 0.8rem; border: 0; border-radius: 999px; color: #765fa5; background: rgba(137,111,190,0.1); font-family: var(--font-info); font-weight: 700; cursor: pointer; }
.service-placeholder { min-height: 12rem; padding: 1.5rem; border: 1px solid rgba(255,255,255,0.8); border-radius: 1.65rem; background: rgba(255,255,255,0.65); box-shadow: inset 0 0.6rem 1rem rgba(255,255,255,0.68); text-align: center; }
.service-flow-icon { display: block; font-size: 2.5rem; }
.service-placeholder h3 { margin: 0.65rem 0 0.45rem; font-family: var(--font-qpat); font-size: 1.35rem; }
.service-placeholder p { margin: 0 auto; max-width: 29rem; color: var(--muted); line-height: 1.7; }
.service-guidance-steps { display: grid; gap: 0.65rem; max-width: 31rem; margin: 1rem auto 0; text-align: left; }
.service-guidance-step { padding: 0.8rem 0.9rem; border: 1px solid rgba(148,117,174,0.13); border-radius: 1rem; background: rgba(255,255,255,0.7); }
.service-guidance-step h4 { margin: 0 0 0.25rem; color: #5d4740; font-family: var(--font-qpat); font-size: 1rem; line-height: 1.35; }
.service-placeholder .service-guidance-step p { margin: 0; color: var(--muted); font-size: 0.94rem; line-height: 1.55; }
.service-placeholder .service-guidance-safety { max-width: 31rem; margin-top: 0.9rem; padding: 0.7rem 0.85rem; border-radius: 0.9rem; color: #8b5961; background: rgba(255,240,239,0.78); font-size: 0.88rem; line-height: 1.5; text-align: left; }
.service-flow-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin-top: 1.25rem; text-align: left; }
.service-flow-action { min-height: 3.2rem; padding: 0.7rem 0.9rem; border: 1px solid rgba(148,117,174,0.2); border-radius: 1rem; color: #5e4942; background: rgba(255,255,255,0.82); font-family: var(--font-qpat); font-size: 0.98rem; font-weight: 800; cursor: pointer; }
.service-flow-action:hover { border-color: rgba(218,132,135,0.38); background: #fff; transform: translateY(-1px); }
.service-flow-action.is-primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, #8a72c8, #6f87d8); box-shadow: 0 0.55rem 1.1rem rgba(91,75,148,0.18); }
.service-flow-action:disabled { opacity: 0.48; cursor: not-allowed; transform: none; }
.service-flow-actions-single { grid-template-columns: 1fr; }
.service-field-label { display: block; margin: 0.9rem auto 0.45rem; max-width: 29rem; color: #5e4942; font-family: var(--font-qpat); font-weight: 800; text-align: left; }
.service-field { display: block; width: 100%; max-width: 29rem; min-height: 7rem; margin: 0 auto; padding: 0.85rem 1rem; resize: vertical; border: 1px solid rgba(148,117,174,0.24); border-radius: 1rem; color: #4f403b; background: rgba(255,255,255,0.9); font: inherit; line-height: 1.6; }
.service-field-input { min-height: 3.2rem; resize: none; }
.service-field:focus { border-color: #8a72c8; outline: 3px solid rgba(138,114,200,0.18); }
.service-placeholder .service-safety { margin-top: 0.75rem; color: #8b5961; font-size: 0.9rem; text-align: left; }
.service-placeholder .service-case-status { margin-top: 1.2rem; padding: 0.75rem 1rem; border-radius: 1rem; color: #5b4a70; background: rgba(255,255,255,0.82); font-weight: 800; }
.service-option-cases { grid-column: 1 / -1; }
.service-case-list { display: grid; gap: 0.8rem; margin-top: 1rem; text-align: left; }
.service-case-item { padding: 1rem; border: 1px solid rgba(148,117,174,0.18); border-radius: 1.1rem; background: rgba(255,255,255,0.84); }
.service-case-item h4 { margin: 0 0 0.45rem; font-family: var(--font-qpat); font-size: 1.05rem; }
.service-case-item.is-processing { border-color: rgba(211,104,112,0.25); }
.service-case-item.is-resolved { border-color: rgba(83,164,116,0.28); }
.coming-soon { margin: 0; color: #765eb7; font-size: 1.55rem; text-align: center; }
.next-description { margin-bottom: 1rem; text-align: center; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 62rem) {
  .site-nav {
    grid-template-columns: auto 1fr;
  }

  .brand {
    justify-self: end;
  }

  .nav-actions {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
    padding-top: 0.15rem;
    border-top: 1px solid var(--line);
  }

  .hero {
    width: calc(100% - 1.4rem);
    padding-inline: 1rem;
  }

  .qpat-stage {
    right: 10%;
    width: min(34vw, 23rem);
  }

  .hero-copy {
    padding-left: 0;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
  }

  .info-boards { grid-template-columns: 1fr; width: min(42rem, calc(100% - 2rem)); margin-top: -3.2rem; }
  .info-board { min-height: 0; }
  .next-resident-slot { min-height: 14rem; }
  .feature-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(42rem, calc(100% - 2rem)); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-legal { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 36rem) {
  .site-header {
    padding: 0.7rem 0.7rem 0;
  }

  .site-nav {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0.65rem;
    border-radius: 1.35rem;
  }

  .brand {
    grid-row: 1;
    justify-self: center;
  }

  .language-switch {
    grid-row: 2;
    justify-self: center;
  }

  .language-option {
    min-width: 2.85rem;
    min-height: 2.25rem;
    padding-inline: 0.55rem;
    font-size: 0.9rem;
  }

  .brand-name {
    font-size: 1.85rem;
  }

  .brand-subtitle {
    font-size: 0.55rem;
  }

  .nav-actions {
    grid-row: 3;
    grid-column: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.15rem 0.25rem;
  }

  .nav-actions button {
    width: 100%;
    min-height: 2.65rem;
    padding: 0.45rem 0.25rem;
    font-size: 0.92rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 0;
    width: calc(100% - 1.2rem);
    min-height: auto;
    margin-top: 0.7rem;
    padding: 1.2rem 0.7rem 6.3rem;
    text-align: center;
    border-radius: 1.6rem;
  }

  .hero-room {
    background-position: 50% center;
  }

  .hero-visual {
    min-height: 26rem;
    width: 100%;
    margin: 0 auto;
  }

  .qpat-stage {
    right: 50%;
    bottom: -0.3rem;
    width: min(84vw, 23rem);
    transform: translateX(50%);
  }

  .contact-shadow {
    right: 11%;
    bottom: -0.15rem;
  }

  .window-frame {
    top: 5%;
    width: 38%;
    height: 30%;
  }

  .window-frame-one { left: 12%; }
  .window-frame-two { left: 50%; }

  .desktop-surface {
    height: 6.5rem;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0.3rem 1.2rem;
  }

  .hero-brand {
    width: min(25rem, 96%);
    margin: 0.6rem auto 0.9rem;
  }

  .room-picture,
  .room-shelf { display: none; }

  .room-plant { right: -1.5rem; bottom: 8.5%; transform: scale(0.72); }
  .room-mug { right: 8%; bottom: 9.5%; transform: scale(0.78); }
  .room-books { left: -1.5rem; bottom: 9.5%; transform: scale(0.72); }

  .hero h1 {
    max-width: 11em;
    font-size: clamp(1.75rem, 8vw, 2.35rem);
    white-space: normal;
  }

  .hero-lead {
    margin: 1rem 0 1.45rem;
    font-size: 1rem;
  }

  .download-button {
    width: min(100%, 22rem);
    min-height: 3.8rem;
  }

  .platform-note {
    max-width: 24rem;
    font-size: 0.78rem;
  }

  .info-boards { width: calc(100% - 1.2rem); gap: 0.9rem; margin-top: -3.5rem; margin-bottom: 2.5rem; }
  .info-board { padding: 1rem; border-radius: 1.6rem; }
  .resident-summary { grid-template-columns: 7.5rem minmax(0,1fr); }
  .news-row { gap: 0.5rem; }
  .product-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
  .product-image-slot { border-radius: 0.9rem; }
  .product-slot strong { font-size: 0.82rem; }
  .product-slot small { font-size: 0.66rem; }
  .next-resident-slot { min-height: 12.5rem; }
  .board-peeker-live { top: -8.2rem; right: 0.2rem; width: 15rem; height: 10.7rem; }
  .board-peeker-live img { width: 15rem; height: 15rem; }
  .board-peeker-wardrobe { top: -6.8rem; right: 0; width: 15rem; height: 9rem; }
  .board-peeker-wardrobe .wardrobe-pose { top: -4.15rem; right: 0.55rem; width: 15rem; height: 15rem; }
  .feature-highlights { grid-template-columns: 1fr; width: calc(100% - 1.2rem); gap: 0.7rem; margin-bottom: 2.5rem; }
  .feature-item { min-height: 6.8rem; padding: 0.95rem 1rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 0.8rem; padding-inline: 0.35rem; text-align: center; }
  .footer-identity,
  .footer-message { justify-self: center; text-align: center; }
  .footer-legal { grid-column: 1; grid-row: auto; }
  .service-options { grid-template-columns: 1fr; }
  .service-flow-actions { grid-template-columns: 1fr; }
  .service-dialog { padding: 1.2rem; }
  .service-heading { gap: 0.7rem; }
  .service-avatar { flex-basis: 3.4rem; width: 3.4rem; height: 3.4rem; }
}

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

  .qpat-character {
    animation: none !important;
    transition: none !important;
  }

  .letter-backdrop,
  .letter-dialog,
  .service-backdrop,
  .service-dialog {
    transition: none !important;
  }
}

/* S04 Opening is a fail-safe decorative layer; the website remains loaded below it. */
.opening-layer {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  overflow: hidden;
  background: #f7eee6;
  opacity: 1;
  transition: opacity 420ms ease;
}

.opening-pending { overflow: hidden; }
.opening-pending .opening-layer { display: block; }
.opening-layer.is-leaving { opacity: 0; pointer-events: none; }

.opening-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.opening-warmth {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,247,238,0.04), rgba(244,210,188,0.08));
}

.opening-skip {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  min-height: 2.6rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 999px;
  color: #59453f;
  background: rgba(255,250,246,0.78);
  box-shadow: 0 0.4rem 1.2rem rgba(70,45,37,0.13);
  backdrop-filter: blur(8px);
  font: 700 0.84rem/1 var(--font-qpat);
  cursor: pointer;
}

.opening-sound-start {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: clamp(2rem, 7vh, 5rem);
  min-height: 3rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 999px;
  color: #59453f;
  background: rgba(255,250,246,0.9);
  box-shadow: 0 0.55rem 1.5rem rgba(70,45,37,0.18);
  backdrop-filter: blur(9px);
  font: 800 0.92rem/1 var(--font-qpat);
  cursor: pointer;
  transform: translateX(-50%);
}

.opening-sound-start[hidden] { display: none; }

.opening-roll-stage {
  position: absolute;
  left: 28%;
  top: 42%;
  width: min(32vw, 28rem);
  aspect-ratio: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0) scale(0.14);
  transform-origin: center;
  will-change: transform, opacity;
}

.opening-roll-stage.is-active {
  opacity: 1;
  animation: opening-roll-forward 2900ms cubic-bezier(0.22, 0.58, 0.32, 1) forwards;
}

.opening-roll-pet { display: block; width: 100%; height: 100%; object-fit: contain; }

@keyframes opening-roll-forward {
  0% { left: 28%; top: 42%; transform: translate3d(-50%, -50%, 0) scale(0.14); }
  32% { left: 34%; top: 46%; transform: translate3d(-50%, -50%, 0) scale(0.46); }
  62% { left: 43%; top: 52%; transform: translate3d(-50%, -50%, 0) scale(1.35); }
  82% { left: 48%; top: 53%; transform: translate3d(-50%, -50%, 0) scale(3.1); }
  100% { left: 50%; top: 50%; transform: translate3d(-50%, -50%, 0) scale(9); }
}

.opening-flash {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background: #fff;
  opacity: 0;
}

.opening-flash.is-active {
  animation: opening-impact-flash 210ms ease-out forwards;
}

@keyframes opening-impact-flash {
  0% { opacity: 0; }
  48% { opacity: 1; }
  100% { opacity: 1; }
}

.music-toggle {
  position: fixed;
  z-index: 70;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: grid;
  width: 2.85rem;
  height: 2.85rem;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 50%;
  color: #765f7e;
  background: rgba(255,248,244,0.9);
  box-shadow: 0 0.5rem 1.3rem rgba(89,62,57,0.16);
  font-size: 1.15rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.music-toggle[aria-pressed="true"] { color: #fff; background: #ad8bb7; }
.music-credit { grid-column: 1 / -1; margin: 0.35rem 0 0; color: rgba(88,70,64,0.68); font-size: 0.7rem; line-height: 1.45; text-align: center; }
.music-credit a { color: inherit; text-underline-offset: 0.15em; }
.music-credit a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .opening-layer { display: none !important; }
  .opening-roll-stage { animation: none !important; }
}
