:root {
  color-scheme: light;
  --ink: #473d32;
  --muted: #8b7c69;
  --cream: #f6eddd;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: #f8f5ee;
  color: var(--ink);
  font:
    15px/1.8 "PingFang HK",
    "Noto Sans TC",
    system-ui,
    sans-serif;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.7;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 3px solid #aa7848;
  outline-offset: 5px;
}
.mast {
  max-width: 1380px;
  margin: auto;
  padding: 27px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e8e1d5;
}
.mast > a {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -1.2px;
}
.mast > a > span {
  color: #ac8b66;
}
.mast small {
  font-size: 10px;
  letter-spacing: 2px;
  margin-left: 18px;
  font-weight: 500;
}
.edition {
  font-size: 12px;
  color: var(--muted);
}
main {
  max-width: 1284px;
  margin: auto;
  padding: 44px 36px 20px;
  display: grid;
  grid-template-columns: 1fr 390px 0.64fr;
  gap: 38px;
  align-items: center;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.4px;
  color: #998366;
  font-weight: 650;
}
.intro h1 {
  font-family: Georgia, "Songti TC", serif;
  font-size: 45px;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: 2px;
  margin: 24px 0;
}
.intro > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 14px;
}
.pills {
  display: flex;
  gap: 8px;
  margin: 26px 0 42px;
}
.pills span {
  border: 1px solid #ddd2bf;
  border-radius: 30px;
  font-size: 11px;
  padding: 3px 11px;
}
.director {
  border-left: 2px solid #c7ab81;
  padding-left: 18px;
  font-size: 13px;
}
.director > span {
  font-size: 10px;
  color: #a18968;
}
.director p {
  margin-top: 8px;
}
.textlink {
  display: inline-block;
  margin-top: 24px;
  font-size: 12px;
}
.phone {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: 27px;
  overflow: hidden;
  background: #5a4930;
  box-shadow:
    0 24px 55px #5e462d24,
    0 0 0 6px #fffdf7;
}
.art {
  position: absolute;
  inset: 0;
  background-image: url(storyboard.png);
  background-size: 400% 100%;
  background-position: 0% 0;
  transform: scale(1.015);
  transition: transform 0.65s ease;
}
.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    #140f0bb3,
    transparent 38%,
    transparent 62%,
    #170f09e6
  );
}
.screen-top {
  position: absolute;
  top: 25px;
  left: 25px;
  right: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff9e9;
  font-size: 10px;
  letter-spacing: 1px;
}
.glass {
  background: #ffffff20;
  border: 1px solid #ffffff50;
  color: #fff9e9;
  border-radius: 25px;
  font-size: 10px;
  padding: 5px 9px;
}
.phone h2 {
  position: absolute;
  left: 25px;
  right: 20px;
  top: 63px;
  color: #fffaf0;
  font-size: 29px;
  line-height: 1.5;
  letter-spacing: 1px;
  margin: 0;
  text-shadow: 0 2px 12px #39251166;
}
.screen-bottom {
  position: absolute;
  bottom: 23px;
  left: 25px;
  right: 25px;
  text-align: center;
  color: #fff8e9;
}
.screen-bottom > p:first-child {
  font-size: 14px;
  text-shadow: 0 2px 8px #000;
  margin-bottom: 13px;
}
.primary {
  width: 100%;
  background: linear-gradient(#ffecc2, #f1ce93);
  box-shadow:
    inset 0 1px 0 #fff9e6,
    0 4px 16px #36230c26;
  border: 1px solid #ffe5b8;
  border-radius: 30px;
  padding: 13px 16px;
  color: #604221;
  font-weight: 750;
}
.micro {
  font-size: 10px;
  opacity: 0.85;
  margin: 12px 0 0;
}
.film-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #ffffff20;
}
.film-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: #f8dca3;
}
.playbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 18px;
}
.playbar button {
  border: 0;
  border-radius: 18px;
  background: #eee3ce;
  color: #725a3c;
  padding: 5px 12px;
  font-size: 11px;
}
#scrub {
  width: 100%;
  accent-color: #b58d58;
  height: 3px;
  display: block;
  margin-top: 13px;
}
.scene-notes {
  align-self: center;
}
.scene-notes > #sceneNumber {
  font-family: Georgia, serif;
  font-size: 38px;
  color: #c4ad89;
}
.scene-notes h3 {
  font-size: 18px;
  font-weight: 550;
  margin: 13px 0;
}
.scene-notes > p:not(.eyebrow) {
  font-size: 12px;
  color: var(--muted);
}
.scene-nav {
  display: flex;
  gap: 9px;
  margin: 25px 0;
}
.scene-nav button {
  width: 28px;
  height: 4px;
  border: 0;
  background: #ded3c0;
  padding: 0;
  border-radius: 4px;
}
.scene-nav button[aria-current="true"] {
  background: #967044;
}
.technical {
  margin-top: 45px;
}
.bubbles {
  position: absolute;
  top: 36%;
  left: 12%;
  right: 8%;
  display: none;
  justify-content: space-between;
  gap: 30px;
}
.bubbles span {
  font-size: 10px;
  background: #fff9e8ee;
  padding: 5px 10px;
  border-radius: 15px;
  color: #735a3b;
  box-shadow: 0 3px 20px #0002;
  align-self: start;
}
.bubbles span + span {
  margin-top: 45px;
}
.phone[data-inside="true"] .bubbles {
  display: flex;
}
#nameform {
  background: #fff9ee;
  color: var(--ink);
  padding: 16px;
  border-radius: 18px;
  text-align: left;
}
#nameform label {
  font-size: 13px;
}
#nickname {
  width: 100%;
  margin: 8px 0 12px;
  background: white;
  border: 1px solid #d7c4a8;
  padding: 9px;
  border-radius: 8px;
}
#nameform .primary {
  font-size: 13px;
  padding: 9px;
}
.phone.naming .art {
  filter: brightness(0.8);
}
.storyboard,
.next,
footer {
  grid-column: 1/-1;
}
.storyboard {
  padding-top: 50px;
}
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 25px;
}
.section-title h2,
.next h2 {
  font-size: 27px;
  font-weight: 500;
  margin: 8px 0;
}
.section-title > p {
  font-size: 12px;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  color: var(--ink);
}
.still {
  aspect-ratio: 2/3;
  background-image: url(storyboard.png);
  background-size: 400% 100%;
  border-radius: 14px;
  box-shadow: 0 5px 18px #49351c0b;
}
.card[aria-current="true"] .still {
  outline: 3px solid #c7a875;
  outline-offset: 4px;
}
.card small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 18px;
  letter-spacing: 1px;
}
.card h3 {
  font-size: 17px;
  font-weight: 550;
  margin: 5px 0;
}
.card p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 8px 0;
}
.card blockquote {
  margin: 12px 0 0;
  font-size: 12px;
  color: #947048;
}
.next {
  border-top: 1px solid #e5dccb;
  margin-top: 24px;
  padding-top: 30px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 25px 0;
}
.steps span {
  font-size: 10px;
  color: #9a805b;
}
.steps h3 {
  font-size: 16px;
  font-weight: 550;
}
.steps p {
  font-size: 13px;
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #e5dccb;
  padding-top: 20px;
  font-size: 10px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1400px) {
  main {
    grid-template-columns: 1fr 415px 0.64fr;
  }
}
@media (max-width: 1000px) {
  main {
    grid-template-columns: 1fr 380px;
    gap: 30px;
  }
  .scene-notes {
    display: none;
  }
  .intro h1 {
    font-size: 36px;
  }
  .cards {
    gap: 15px;
  }
}
@media (max-width: 700px) {
  .mast {
    padding: 17px 20px;
  }
  .mast small,
  .edition {
    display: none;
  }
  main {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 24px;
  }
  .intro {
    width: 100%;
  }
  .intro h1 {
    font-size: 30px;
    line-height: 1.4;
    margin: 10px 0;
  }
  .intro h1 br {
    display: none;
  }
  .intro > p:not(.eyebrow),
  .pills,
  .director,
  .textlink {
    display: none;
  }
  .preview-area {
    width: min(100%, 390px);
  }
  .storyboard {
    padding-top: 16px;
  }
  .section-title {
    display: block;
  }
  .section-title h2,
  .next h2 {
    font-size: 23px;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 24px 14px;
  }
  .card h3 {
    font-size: 15px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .next {
    width: 100%;
  }
  footer {
    display: block;
    width: 100%;
  }
  footer span {
    display: block;
  }
  .phone h2 {
    font-size: 27px;
  }
  .screen-top {
    left: 22px;
    right: 22px;
  }
  .screen-bottom {
    left: 22px;
    right: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .art {
    transition: none;
  }
}
:root {
  --guild-art: url(storyboard-v2.png);
}
.art,
.still {
  background-image: var(--guild-art);
}
.art {
  bottom: auto;
  aspect-ratio: 2/3;
  width: 100%;
}
.phone {
  background: #302215;
}
.phone.naming {
  min-height: 760px;
}
.phone.naming .screen-bottom {
  bottom: 23px;
}
.film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #5a4930;
}
.phone.naming .film {
  filter: brightness(0.8);
}
.film {
  z-index: 0;
  pointer-events: none;
}
.shade {
  z-index: 1;
}
.screen-top,
.phone h2,
.bubbles,
.screen-bottom,
.film-progress {
  z-index: 2;
}
.bubbles {
  display: flex;
  top: 34%;
  left: 8%;
  right: 7%;
  justify-content: space-between;
  gap: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.45s ease,
    transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0.45s;
}
.phone[data-inside="true"] .bubbles {
  display: flex;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.bubbles span {
  position: relative;
  max-width: 56%;
  padding: 9px 13px 10px;
  border: 1px solid #fffdf8b8;
  border-radius: 19px 19px 19px 5px;
  background: linear-gradient(135deg, #fffdf7ef, #f6ead5e8);
  box-shadow:
    0 9px 28px #2d170c55,
    inset 0 1px #fffefa;
  color: #58402a;
  font-family: Georgia, "PingFang HK", "Noto Sans TC", serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.1px;
  backdrop-filter: blur(10px);
}
.bubbles span::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 16px;
  width: 14px;
  height: 14px;
  background: #f8edd9e8;
  transform: rotate(45deg);
  border-right: 1px solid #fffdf8b8;
  border-bottom: 1px solid #fffdf8b8;
  z-index: -1;
}
.bubbles span:first-child {
  transform: rotate(-2deg);
  animation: dialogue-drift 3.8s ease-in-out infinite;
}
.bubbles span + span {
  align-self: flex-end;
  margin: 47px 0 0;
  transform: rotate(1.5deg);
  border-radius: 19px 19px 5px 19px;
  animation: dialogue-drift 4.2s 0.5s ease-in-out infinite;
}
.bubbles span + span::after {
  left: auto;
  right: 16px;
}
@keyframes dialogue-drift {
  50% {
    translate: 0 -4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bubbles,
  .phone[data-inside="true"] .bubbles,
  .bubbles span,
  .bubbles span + span {
    transition: none;
    animation: none;
    transform: none;
  }
}
.guild-home {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: linear-gradient(160deg, #fff9ed, #f4e8d7);
  color: #4a3828;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.45s ease,
    transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}
.phone.entered .guild-home {
  opacity: 1;
  transform: translateY(0);
}
.phone.entered .film,
.phone.entered .shade,
.phone.entered .screen-top,
.phone.entered > #headline,
.phone.entered .bubbles,
.phone.entered .screen-bottom,
.phone.entered .film-progress {
  opacity: 0;
  pointer-events: none;
}
.guild-home > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 27px 23px 16px;
  background: linear-gradient(120deg, #72503a, #9e714f);
  color: #fff8e8;
}
.guild-home header small {
  font-size: 10px;
  letter-spacing: 1.5px;
  opacity: 0.82;
}
.guild-home header h2 {
  font-family: Georgia, "PingFang HK", serif;
  font-size: 22px;
  line-height: 1.35;
  margin: 4px 0 0;
  color: inherit;
}
.home-replay {
  border: 1px solid #fff8e866;
  background: #ffffff1f;
  color: #fff;
  border-radius: 50%;
  width: 31px;
  height: 31px;
}
.guild-scroll {
  padding: 17px 16px 78px;
  overflow: auto;
  height: calc(100% - 102px);
}
.welcome-card {
  padding: 15px;
  border-radius: 17px;
  background: linear-gradient(135deg, #f9eac8, #f4dcae);
  box-shadow: 0 7px 18px #8a623420;
}
.welcome-card > span,
.topic-card small {
  font-size: 10px;
  color: #89633e;
}
.welcome-card h3 {
  font:
    600 16px/1.5 Georgia,
    "PingFang HK",
    serif;
  margin: 5px 0;
}
.welcome-card p {
  font-size: 11px;
  line-height: 1.6;
  margin: 0;
  color: #765c43;
}
.avatar-row {
  display: flex;
  align-items: center;
  margin-top: 12px;
}
.avatar-row i {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff8e8;
  border: 1px solid #e8c98b;
  margin-right: -5px;
  font-style: normal;
  font-size: 14px;
}
.avatar-row b {
  margin-left: 12px;
  font-size: 10px;
  font-weight: 600;
  color: #725239;
}
.topic-section {
  margin-top: 17px;
}
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-row h3 {
  font-size: 14px;
  margin: 0;
}
.section-row button {
  border: 0;
  background: none;
  color: #98714c;
  font-size: 10px;
}
.topic-card {
  display: flex;
  gap: 10px;
  align-items: start;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #eadcc7;
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: 0 4px 12px #4e32100b;
}
.topic-icon {
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  height: 31px;
  border-radius: 10px;
  background: #f7e5c0;
  color: #8d6540;
}
.topic-card h4 {
  font-size: 12px;
  line-height: 1.45;
  margin: 2px 0;
}
.topic-card p {
  font-size: 10px;
  line-height: 1.5;
  margin: 0;
  color: #897565;
}
.topic-card > b {
  font-size: 13px;
  color: #b28a62;
}
.home-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 9px 14px 12px;
  border-top: 1px solid #eadcc7;
  background: #fffaf1;
}
.home-nav button {
  display: grid;
  gap: 1px;
  border: 0;
  background: none;
  color: #8d7762;
  font-size: 16px;
}
.home-nav button span {
  font-size: 9px;
}
.home-nav button[aria-current="page"] {
  color: #96663e;
}
.admin-entry {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  border: 1px solid #dbbb88;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  background: linear-gradient(135deg, #4c392c, #72523a);
  box-shadow: 0 8px 26px #3a241c35;
  color: #fff8e8;
  font-size: 14px;
}
.admin-modal {
  width: min(390px, calc(100vw - 32px));
  border: 0;
  border-radius: 22px;
  padding: 28px;
  background: #fffaf0;
  color: #4a3828;
  box-shadow: 0 24px 80px #20100866;
}
.admin-modal::backdrop {
  background: #2c1b125c;
  backdrop-filter: blur(5px);
}
.modal-close {
  position: absolute;
  right: 13px;
  top: 10px;
  border: 0;
  background: none;
  color: #866d55;
  font-size: 25px;
}
.admin-modal h2 {
  font:
    500 25px/1.4 Georgia,
    "PingFang HK",
    serif;
  margin: 7px 0;
}
.admin-modal p {
  font-size: 13px;
  color: #806c5a;
}
.admin-primary {
  width: 100%;
  margin: 15px 0 10px;
  border: 0;
  border-radius: 13px;
  padding: 12px;
  background: #684933;
  color: #fff9ed;
  font-weight: 700;
}
.admin-modal small {
  font-size: 10px;
  color: #9a836d;
}
.admin-login label {
  display: block;
  margin: 10px 0 4px;
  font-size: 12px;
  color: #806c5a;
}
.admin-login input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 15px;
  color: #4a3828;
  background: #fff;
  border: 1px solid #e3d5c3;
  border-radius: 11px;
  padding: 10px 12px;
}
.admin-login input:focus-visible,
.admin-modal button:focus-visible,
.admin-modal a:focus-visible {
  outline: 3px solid #956733;
  outline-offset: 2px;
}
.admin-oauth {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.admin-oauth button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #3a2a1e;
  background: #fff;
  border: 1px solid #dccbb5;
  border-radius: 13px;
  padding: 11px 12px;
  cursor: pointer;
}
.admin-oauth button svg {
  width: 18px;
  height: 18px;
}
.admin-oauth button[data-oauth="apple"] {
  background: #1d1a17;
  border-color: #1d1a17;
  color: #fff;
}
.admin-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 2px;
  font-size: 11px;
  color: #9a836d;
}
.admin-or::before,
.admin-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #eadbc7;
}
.admin-turnstile {
  margin-top: 14px;
  min-height: 65px;
}
.admin-msg {
  min-height: 1.4em;
  margin: 0;
  font-size: 13px;
  color: #a8343f;
}
.admin-modal a.admin-primary {
  display: block;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
}
.admin-modal button:disabled,
.admin-modal input:disabled {
  opacity: 0.6;
  cursor: progress;
}
.admin-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 15px 0;
}
.admin-stats span {
  padding: 11px;
  border-radius: 12px;
  background: #f3e6d3;
  font-size: 10px;
  color: #806b57;
}
.admin-stats b {
  display: block;
  font:
    600 24px Georgia,
    serif;
  color: #5b3f2d;
}
.admin-modal article {
  padding: 13px;
  border: 1px solid #eadbc7;
  border-radius: 14px;
}
.admin-modal article h3 {
  margin: 3px 0;
  font-size: 14px;
}
.admin-modal article button,
.admin-back {
  border: 0;
  background: none;
  padding: 0;
  color: #96663e;
  font-size: 11px;
}
.admin-back {
  margin-top: 18px;
}
@media (max-width: 700px) {
  .admin-entry {
    right: 16px;
    bottom: 16px;
    width: 32px;
    height: 32px;
  }
  .guild-home > header {
    padding: 24px 20px 14px;
  }
  .guild-home header h2 {
    font-size: 20px;
  }
}

/* The welcome animation ends at a real decision point, rather than a generic home feed. */
.room-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  color: #fffaf0;
  isolation: isolate;
}
.ai-journey,
.family-journey {
  background: #101f38;
}
.ai-journey > video,
.family-journey > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #101f38;
}
/* Keep embedded documents laid out; animate a cover, never the iframe surface. */
.family-board-frame{position:absolute;inset:0;display:block;width:100%;height:100%;border:0;background:#102b43;z-index:2}
.family-board-frame[hidden]{display:block!important;visibility:hidden;pointer-events:none}
#familyJourney .family-board-frame{background:#68452c}
.panel-cover{position:absolute;inset:0;z-index:3;pointer-events:none;background:#102b43;opacity:0}
#familyJourney .panel-cover{background:#68452c}
.panel-cover.is-revealing{animation:panel-cover-reveal .55s ease-out}
@keyframes panel-cover-reveal{from{opacity:1}to{opacity:0}}
@media(prefers-reduced-motion:reduce){.panel-cover.is-revealing{animation:none}}
.phone .family-journey > header,.phone .ai-journey > header{z-index:4}
.journey-skip{position:absolute;z-index:4;bottom:25px;left:50%;transform:translateX(-50%);border:1px solid #fff3d57a;border-radius:24px;padding:10px 20px;background:#3a261b70;color:#fff5e4;font:inherit;font-size:12px;cursor:pointer;backdrop-filter:blur(6px)}
.app-only .phone.room-open .screen-top{display:none}
.phone .door-dialogue span{position:relative;border-radius:19px 19px 5px 19px;background:linear-gradient(135deg,#fffdf7ef,#f6ead5e8);color:#58402a;font-family:Georgia,"PingFang HK",serif;font-weight:600;line-height:1.45;box-shadow:0 9px 28px #2d170c55,inset 0 1px #fffefa}
.door-dialogue span::after{content:"";position:absolute;bottom:-7px;right:18px;width:14px;height:14px;background:#f8edd9;transform:rotate(45deg)}
.ai-journey::after,
.family-journey::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    #07142388,
    transparent 22%,
    transparent 75%,
    #07142366
  );
}
.ai-journey > header,
.family-journey > header {
  position: absolute;
  z-index: 1;
}
.ai-journey > header,
.family-journey > header {
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 21px 20px;
}
.ai-journey > header small,
.family-journey > header small {
  color: #eefcff;
  font-size: 10px;
  letter-spacing: 1.25px;
  text-shadow: 0 2px 8px #071423;
}
.door-dialogue {
  position: absolute;
  z-index: 2;
  top: 29%;
  left: 17px;
  right: 17px;
  display: grid;
  gap: 13px;
  pointer-events: none;
}
.door-dialogue span {
  width: fit-content;
  max-width: 77%;
  border: 1px solid #fff8e699;
  border-radius: 18px;
  padding: 10px 13px;
  background: #fffaf0ed;
  color: #594234;
  font-size: 11px;
  line-height: 1.45;
  box-shadow: 0 8px 24px #1d100852;
  opacity: 0;
}
.door-dialogue.is-showing span {
  animation: door-dialogue 2.1s ease both;
}
.door-dialogue span:last-child {
  justify-self: end;
}
.ai-dialogue.is-showing span:first-child {
  animation-delay: 2.2s;
}
.ai-dialogue.is-showing span:last-child {
  animation-delay: 2.52s;
}
.family-dialogue.is-showing span:first-child {
  animation-delay: 1.8s;
}
.family-dialogue.is-showing span:last-child {
  animation-delay: 2.12s;
}
.ai-dialogue span {
  background: #eafaffed;
  color: #183c5c;
  border-color: #d5f6ffb3;
}
@keyframes door-dialogue {
  0%,
  12% {
    opacity: 0;
    transform: translateY(9px) scale(0.96);
  }
  24%,
  76% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-5px) scale(0.98);
  }
}
.phone.rewinding .room-back {
  pointer-events: none;
  opacity: 0.35;
}

/* App delivery mode: only the cinematic decision screen is visible. */
body.app-only {
  --cinema-backdrop: url("guild-hall-start.webp");
  display: grid;
  width: 100vw;
  min-height: 100dvh;
  overflow: hidden;
  background: #201811;
  isolation: isolate;
  place-items: center;
}
body.app-only[data-world="ai"] {
  --cinema-backdrop: url("taku-ai-room.webp");
}
body.app-only[data-world="family"] {
  --cinema-backdrop: url("hibi-family-room.webp");
}
body.app-only::before {
  position: fixed;
  z-index: 0;
  inset: -42px;
  content: "";
  pointer-events: none;
  background: var(--cinema-backdrop) center / cover no-repeat;
  filter: blur(30px) saturate(1.08) brightness(0.42);
  transform: scale(1.07);
  transition: background-image 0.45s ease;
}
.cinema-motion-backdrop{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;background:#201811}
.cinema-motion-backdrop video{position:absolute;inset:-5%;width:110%;height:110%;object-fit:cover;filter:blur(30px) brightness(.58) saturate(.8)}
.cinema-motion-backdrop::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at center,transparent 20%,#130e0c55)}
.app-only .mast,
.app-only .intro,
.app-only .scene-notes,
.app-only .storyboard,
.app-only .next,
.app-only footer {
  display: none !important;
}
.app-only main {
  display: grid;
  position: relative;
  z-index: 1;
  width: 100vw;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
}
.app-only .preview-area {
  display: grid;
  width: min(100vw, 540px);
  height: 100dvh;
  margin-inline: auto;
  place-items: center;
}
.app-only .phone {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}
.app-only .playbar,
.app-only #scrub {
  display: none !important;
}
.app-only .screen-top {
  display: none;
  top: auto;
  bottom: 28px;
  left: 0;
  right: 0;
  justify-content: center;
}
.app-only .phone.is-cinematic .screen-top {
  display: flex;
}
.app-only .screen-top > span,
.app-only .screen-bottom > p {
  display: none;
}
.app-only .screen-bottom {
  z-index: 3;
  top: 61%;
  right: 1%;
  bottom: auto;
  left: auto;
  text-align: center;
  width: 37%;
  height: 25%;
}
.app-only .screen-bottom .primary {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  border: 0;
  min-height: 64px;
  padding: 14px 8px;
  background: transparent;
  color: #fff8e9;
  font-size: clamp(20px, 3.4vw, 28px);
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow: none;
  text-shadow: 0 2px 3px #291a10, 0 0 12px #291a10;
}
.wave-start #startLabel {
  white-space: nowrap;
}
.gesture-arrow {
  position: absolute;
  top: -12%;
  right: 0;
  width: 70%;
  height: 80%;
  overflow: visible;
  fill: none;
  stroke: #fff8e9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.5;
  filter: drop-shadow(0 2px 5px #1a1008a8);
}
.wave-mark-left, .wave-mark-right {
  animation: wave-mark-glow 2.4s ease-in-out infinite;
}
.wave-mark-right {
  animation-delay: 1.2s;
}
.wave-anywhere {
  font-size: clamp(11px, 1.8vw, 14px);
  white-space: nowrap;
  font-weight: 500;
}
@keyframes wave-mark-glow {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .wave-mark-left, .wave-mark-right { animation: none; }
}
.gesture-arrow-right {
  animation: gesture-right 1.25s ease-in-out infinite;
}
@keyframes gesture-left {
  50% {
    transform: translateX(-5px);
  }
}
@keyframes gesture-right {
  50% {
    transform: translateX(5px);
  }
}
.app-only .screen-top .glass {
  border: 1px solid #fff4dc73;
  background: #21160a5c;
  padding: 9px 16px;
  font-size: 12px;
  letter-spacing: 0.4px;
  backdrop-filter: blur(7px);
}
.sound-toggle {
  position: absolute;
  z-index: 3;
  top: 22px;
  right: 22px;
  border: 0;
  width: 32px;
  height: 32px;
  padding: 5px;
  background: transparent;
  color: #ffe5a4;
  filter: drop-shadow(0 2px 6px #1c1109c7);
}
.sound-toggle svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.sound-toggle path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sound-toggle .sound-speaker {
  stroke-width: 1.8;
}
.sound-toggle .sound-wave {
  stroke-width: 1.65;
  animation: sound-pulse 1.7s ease-in-out infinite;
}
.sound-toggle .sound-wave-two {
  animation-delay: 0.17s;
}
.sound-toggle .sound-mute {
  display: none;
  stroke-width: 1.8;
}
.sound-toggle[data-sound="off"] {
  color: #fff4d2;
  opacity: 0.88;
}
.sound-toggle[data-sound="off"] .sound-wave {
  display: none;
}
.sound-toggle[data-sound="off"] .sound-mute {
  display: block;
}
@keyframes sound-pulse {
  50% {
    opacity: 0.48;
    transform: scale(0.94);
    transform-origin: 50% 50%;
  }
}
.phone.entered:not(.is-cinematic) .sound-toggle {
  opacity: 0;
  pointer-events: none;
}
.phone:not(.is-cinematic) .sound-toggle {
  opacity: 0;
  pointer-events: none;
}
.app-only .admin-entry {
  right: max(13px, calc((100vw - 540px) / 2 + 13px));
  bottom: 13px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #fff6df60;
  background: #fff2d51c;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px #ffffff44, 0 4px 14px #0003;
  color: #fff3d6;
  cursor: pointer;
}
.admin-entry svg {
  width: 25px;
  height: 25px;
  transition: transform .65s ease;
}
.admin-entry:hover svg,
.admin-entry:focus-visible svg {
  transform: rotate(60deg);
}
.admin-entry:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .admin-entry svg { transition: none; }
}
.phone.entered .route-choice,
.phone.room-open .room-screen {
  animation: room-arrive 0.52s cubic-bezier(0.2, 0.85, 0.2, 1) both;
}
.phone.journey-arriving .ai-journey:not([hidden]) > video,
.phone.journey-arriving .family-journey:not([hidden]) > video {
  animation: journey-arrive 0.72s cubic-bezier(0.18, 0.8, 0.24, 1) both;
}
@keyframes journey-arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}
.phone.entered .film,
.phone.entered .shade,
.phone.entered .screen-top,
.phone.entered > #headline,
.phone.entered .bubbles,
.phone.entered .screen-bottom,
.phone.entered .film-progress {
  opacity: 0;
  pointer-events: none;
}
.route-choice {
  background: #241f1d;
  isolation: isolate;
}
.route-choice::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #17171610, #17171675),
    url(guild-hall-start.webp) center/cover;
  opacity: 0.42;
  filter: none;
  z-index: 0;
}
.choice-head {
  position: relative;
  z-index: 1;
  padding: 23px 23px 9px;
  text-shadow: 0 2px 10px #1f1711a0;
}
.choice-head > span {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: #f5dcb0;
}
.choice-head h2 {
  position: static !important;
  margin: 6px 0 4px !important;
  color: #fffaf0 !important;
  font:
    500 26px/1.3 Georgia,
    "PingFang HK",
    serif !important;
  letter-spacing: 0.3px !important;
  text-shadow: inherit !important;
}
.choice-head p {
  margin: 0;
  font-size: 11px;
  color: #fff9ebbf;
}
.cinema-choices {
  position: absolute;
  z-index: 1;
  display: grid;
  top: 50%;
  right: 12px;
  left: 12px;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
  min-height: 342px;
  margin: 0;
  transform: translateY(-50%);
}
.cinema-arrow {
  display: grid;
  position: relative;
  isolation: isolate;
  align-items: end;
  min-width: 0;
  min-height: 342px;
  overflow: hidden;
  border: 1px solid #fff4da55;
  border-radius: 17px;
  padding: 15px 8px 18px;
  background: #201c1a;
  color: #fff9ea;
  text-align: center;
  text-shadow: 0 2px 9px #170d08;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}
.cinema-arrow:hover {
  transform: translateY(-3px);
  filter: brightness(1.16);
}
.cinema-arrow > img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cinema-arrow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, #10101b16 25%, #140e0bc4 88%);
}
.cinema-arrow > i {
  position: absolute;
  z-index: 2;
  top: 43%;
  font:
    400 86px/0.7 Georgia,
    serif;
  color: #ffe2a6;
  text-shadow: 0 0 22px #ffba4c9c;
}
.cinema-arrow-left > i {
  left: 7px;
}
.cinema-arrow-right > i {
  right: 7px;
}
.cinema-arrow > span {
  display: grid;
  z-index: 2;
  gap: 3px;
}
.cinema-arrow small {
  color: #f8ddae;
  font-size: 9px;
  letter-spacing: 1.2px;
}
.cinema-arrow b {
  font:
    600 14px/1.25 Georgia,
    "PingFang HK",
    serif;
  letter-spacing: 0.4px;
}
.cinema-arrow em {
  font-style: normal;
  font-size: 9px;
  line-height: 1.35;
  color: #fff7e5dc;
}
@media (max-height: 560px) {
  .choice-head {
    padding: 10px 22px 5px;
  }
  .choice-head h2 {
    margin: 3px 0 !important;
    font-size: 20px;
    line-height: 1.18;
  }
  .choice-head p {
    font-size: 9px;
  }
  .cinema-choices {
    height: min(280px, calc(100dvh - 90px));
    min-height: 0;
    margin: 0;
  }
  .cinema-arrow {
    min-height: 0;
    border-radius: 14px;
    padding: 10px 6px 12px;
  }
  .cinema-arrow > i {
    top: 42%;
    font-size: 62px;
  }
  .cinema-arrow b {
    font-size: 12px;
  }
  .cinema-arrow em,
  .cinema-arrow small {
    font-size: 8px;
  }
}
.choice-orb {
  position: absolute;
  z-index: 2;
  top: 43%;
  left: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #ffe7b36e;
  border-radius: 50%;
  background: #fff5da12;
  color: #ffe5ac;
  box-shadow: 0 0 24px #ffc16055;
}
.choice-orb i {
  font-style: normal;
  font-size: 17px;
}
@media (max-height: 560px) {
  .choice-orb {
    top: 42%;
    width: 34px;
    height: 34px;
  }
}
.room-screen > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.room-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    #10152d5c 0%,
    transparent 18%,
    #100c0a12 100%
  );
}
.hibi-room .room-shade {
  background: linear-gradient(
    180deg,
    #3a210b55 0%,
    transparent 18%,
    #2b160c12 100%
  );
}
.room-screen > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 20px;
}
.room-screen > header small {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 8px #241205;
}
.room-back {
  width: 29px;
  height: 29px;
  border: 1px solid #fff9e880;
  border-radius: 50%;
  background: #fff8eb28;
  color: #fffaf0;
  font:
    400 27px/20px Georgia,
    serif;
}
.room-copy {
  position: absolute;
  bottom: 72px;
  left: 21px;
  right: 21px;
  text-shadow: 0 2px 11px #1b1008a0;
}
.room-copy > span {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: #f7d79c;
}
.room-copy h2 {
  position: static !important;
  margin: 6px 0 8px !important;
  color: #fffaf0 !important;
  font:
    500 23px/1.36 Georgia,
    "PingFang HK",
    serif !important;
  letter-spacing: 0.2px !important;
  text-shadow: inherit !important;
}
.room-copy p {
  margin: 0 0 15px;
  color: #fff8e5dd;
  font-size: 11px;
  line-height: 1.65;
}
.room-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 1px solid #fff6dd99;
  border-radius: 18px;
  padding: 11px 13px;
  background: #fff7e7e8;
  color: #4b3324;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 7px 20px #1b0e0842;
}
.taku-room .room-action {
  background: linear-gradient(105deg, #d7f2f5, #a7e6ef);
  color: #17374b;
}
.room-action b {
  font-size: 17px;
}
.room-chip-row {
  position: absolute;
  bottom: 19px;
  left: 20px;
  right: 20px;
  display: flex;
  gap: 6px;
  overflow: hidden;
}
.room-chip-row span {
  white-space: nowrap;
  border: 1px solid #fff8e755;
  border-radius: 15px;
  background: #1d170b4d;
  padding: 4px 7px;
  color: #fff9e9d9;
  font-size: 9px;
  backdrop-filter: blur(4px);
}
@keyframes room-arrive {
  from {
    opacity: 0;
    transform: scale(1.035);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .phone.entered .route-choice,
  .phone.room-open .room-screen {
    animation: none;
  }
  .cinema-arrow {
    transition: none;
  }
}

/* 載入閘門：開場片未完全 buffer 好之前蓋住畫面，避免第一次進入卡頓 */
.load-gate {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 40%, #4a3524 0%, #241911 70%);
  color: #fff4dc;
  transition: opacity 0.45s ease;
}
.load-gate.is-done {
  opacity: 0;
  pointer-events: none;
}
.load-gate-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  width: min(240px, 70%);
  text-align: center;
}
.load-gate-ears {
  position: relative;
  width: 44px;
  height: 30px;
}
.load-gate-ears::before,
.load-gate-ears::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 14px;
  height: 30px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(#fff8ec, #f3dcc2);
  box-shadow: inset 0 0 0 3px #fff8ec, inset 0 -8px 0 0 #f6b9bd;
  transform-origin: 50% 100%;
  animation: load-gate-wiggle 1.2s ease-in-out infinite;
}
.load-gate-ears::before { left: 6px; transform: rotate(-12deg); }
.load-gate-ears::after { right: 6px; transform: rotate(12deg); animation-delay: 0.3s; }
@keyframes load-gate-wiggle {
  0%, 100% { transform: rotate(-12deg); }
  50% { transform: rotate(-4deg); }
}
.load-gate-ears::after { animation-name: load-gate-wiggle-r; }
@keyframes load-gate-wiggle-r {
  0%, 100% { transform: rotate(12deg); }
  50% { transform: rotate(4deg); }
}
.load-gate-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.load-gate-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #ffffff22;
  overflow: hidden;
}
.load-gate-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe3a8, #f1ce93);
  transition: width 0.25s ease;
}
.load-gate-note {
  margin: 0;
  font-size: 11px;
  color: #d9c5a8;
}
@media (prefers-reduced-motion: reduce) {
  .load-gate-ears::before, .load-gate-ears::after { animation: none; }
}

/* iOS Safari 省電模式擋自動播放時會喺 video 上面畫原生 play 掣——一律隱藏（我哋自己有開始按鈕） */
video::-webkit-media-controls,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
  pointer-events: none;
}
.welcome-still {
  z-index: 0;
  pointer-events: none;
}
/* 跳動點：閘門同開場片背景載入都用 */
.load-dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.load-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffe3a8;
  opacity: 0.55;
  animation: load-dot 1s ease-in-out infinite;
}
.load-dots i:nth-child(2) { animation-delay: 0.16s; }
.load-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes load-dot {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-5px); opacity: 1; }
}
.start-dots {
  display: none;
  margin-top: 6px;
}
.start-dots i { background: #8a5a2b; }
.wave-start.is-loading .start-dots { display: inline-flex; }
.wave-start.is-loading .wave-marks,
.wave-start.is-loading .wave-anywhere { display: none; }
.load-gate {
  background:
    radial-gradient(ellipse at 50% 40%, #4a352488 0%, #241911ee 70%),
    url("guild-hall-start.webp") center / cover no-repeat #241911;
}
.load-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(18px) brightness(0.6);
  -webkit-backdrop-filter: blur(18px) brightness(0.6);
}
.load-gate-card { position: relative; }
.load-gate-bar { position: relative; overflow: hidden; }
.load-gate-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #ffffff55, transparent);
  transform: translateX(-100%);
  animation: load-shimmer 1.4s ease-in-out infinite;
}
@keyframes load-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .load-dots i, .load-gate-bar::after { animation: none; }
}
.wave-start.is-loading #startLabel {
  font-size: 0.78em;
  white-space: normal;
  line-height: 1.3;
}

.ai-journey[hidden], .family-journey[hidden]{display:block!important;visibility:hidden;pointer-events:none}

/* Do not expose Safari's idle video surface (including its native play overlay). */
#film:not(.is-playing), #welcomeLoop:not(.is-playing) { opacity: 0 !important; pointer-events: none; }

/* An image remains underneath the opening video throughout decode/loading. */
.phone:not(.entered):not(.room-open) { background: url(kiki-wave-still.webp) center / cover no-repeat #49321f; }

/* Keep the complete portrait composition, including its controls, inside the viewport. */
.app-only .preview-area {
  width: min(100vw, 56.25dvh);
  height: min(100dvh, 177.7777778vw);
}
.app-only .phone .film,
.app-only .ai-journey > video,
.app-only .family-journey > video {
  object-fit: contain;
}
.phone:not(.entered):not(.room-open) { background-size: contain; }

/* Persistent navigation: settings left, contact envelope right on every scene. */
.app-only .phone > .admin-entry { position:absolute;left:13px;right:auto;bottom:13px;z-index:30; }
.app-only .phone > .scene-contact { right:10px;bottom:8px;z-index:30; }
