/* The approved 390px-wide mobile composition with individual page heights. Loaded only up to the existing phone breakpoint. */
.site {
  --dock-height: clamp(48px, 13.333vw, 64px);
  --dock-bottom: max(8px, env(safe-area-inset-bottom));
  width: min(100%, 520px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-padding-bottom: calc(clamp(48px, 13.333vw, 64px) + max(8px, env(safe-area-inset-bottom)) + 8px); }
#stage {
  zoom: var(--phone-scale, 1);
  position: relative; display: block; isolation: isolate; overflow: clip;
  margin: 0; padding: 0; width: 390px; height: 800px; min-height: 0;
  background: linear-gradient(155deg, #fffdf4 35%, #f7f8eb 76%, #e9f6ec);
  --hero-height: 169px;
  --hero-corners: 0 0 33px 9px;
}
#stage[data-active="home"]:not([data-intro-open]) { --hero-height: 295px; --hero-left: -19px; --hero-width: 409px; height: 680px; }
#stage[data-active="news"] { height: 680px; }
#stage[data-active="games"] { height: 850px; }
#stage[data-intro-open] { height: 780px; }
#stage .stage-frame, #stage .stars {
  inset: 0 auto auto var(--hero-left, 0px); width: var(--hero-width, 100%); height: var(--hero-height);
}
#stage .stage-frame { clip-path: none; border-radius: var(--hero-corners); overflow: hidden; }
#stage .stars { pointer-events: none; }
#stage .home-wordmark { z-index: 9; inset: 16px auto auto 15px; width: 366px; height: 100px; align-items: center; justify-content: center; padding: 0; font-size: 69px; }
#stage .home-wordmark span { writing-mode: horizontal-tb; padding: 0; }
#stage[data-intro-open] .home-wordmark { display: none; }
#stage[data-active="home"]:not([data-intro-open]) .water--stage { width: 185%; left: -6%; }
#stage .portrait-viewport {
  inset: 0 auto auto var(--hero-left, 0px); width: var(--hero-width, 100%); height: var(--hero-height);
  clip-path: inset(0 round var(--hero-corners)); overflow: hidden;
}
#stage .portrait-wrap { position: absolute; inset: var(--portrait-y) auto auto var(--portrait-x); width: var(--portrait-w); height: var(--portrait-h); max-width: none; max-height: none; transform: none; transition: none; }
#stage #portrait { position: relative; inset: auto; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; transform: none; }
#stage #portrait img { width: 100%; height: 100%; left: 0; bottom: 0; object-fit: contain; object-position: center bottom; }
#stage .phone-heading[hidden] {
  display: grid !important; position: absolute; z-index: 5; top: 47px; left: 20px; gap: 9px;
  color: #103f37; pointer-events: none; text-shadow: 0 1px 3px #ffffed, 0 0 12px #ffffed;
}
#stage .phone-heading span { font-size: 14px; letter-spacing: .08em; font-weight: 800; }
#stage .phone-heading strong { font-size: 34px; line-height: 1.2; font-weight: 950; }
#stage[data-active="home"]:not([data-intro-open]) .phone-heading[hidden] { display: none !important; }
#stage[data-active="chat"] .phone-heading { left: 17px; }
#stage[data-active="news"] .phone-heading strong { position: absolute; top: 22px; left: -6px; white-space: nowrap; }
#stage[data-active="news"] #stage-panel { top: 179px; height: 425px; }
#stage .social { display: none; }
#stage[data-active="home"]:not([data-intro-open]) .social {
  position: absolute; inset: 538px auto auto 23px; display: flex; width: 341px; gap: 9px; padding: 0;
  border: 0; background: none; box-shadow: none;
}
#stage .social-link { width: 41px; height: 38px; border-radius: 8px; }
#stage .social-link:nth-child(n+3):nth-child(-n+4) { translate: 0 -1px; }
#stage .social-icon { width: 22px; height: 22px; }
#stage .social-name { display: none; }
.site .tab-dock {
  position: fixed; inset: auto 0 var(--dock-bottom); width: min(calc(100% - 18px), 496px);
  height: var(--dock-height); padding: 0; margin: 0 auto; z-index: 40;
}
.site .tabs { height: 100%; gap: 0; }
.site .tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; min-height: 0; font-size: clamp(11px,2.82vw,14px); }
.site .tabs .nav-sticker { width: clamp(23px,6.4vw,30px); height: auto; }
#stage #stage-panel {
  position: absolute; inset: 240px 16px auto; width: auto; height: 502px; display: grid;
  margin: 0; padding: 0; overflow: visible; container-type: inline-size; justify-self: stretch;
}
#stage .panel-details { height: 100%; }
#stage .panel-details-list { min-height: 0; }

/* Use the same illustrated speech bubble, lettering and underline as the desktop home. */
#stage[data-active="home"]:not([data-intro-open]) #stage-panel { top: 243px; height: 285px; }
#stage .home-content, #stage .home-intro { display: contents; }
#stage .home-shortcuts { display: block; }
#stage .wheel-hint, #stage .home-intro-close, #stage .profile-card { display: none; }
#stage .welcome-speech { position: absolute; inset: 0 auto auto -37px; width: 411px; height: 241px; min-height: 0; aspect-ratio: auto; }
#stage .speech-art { inset: 0; width: 100%; height: 100%; }
#stage .speech-copy { position: absolute; inset: 0; padding: 0; }
#stage .welcome-speech h2 { position: absolute; left: 79px; top: 51px; width: 280px; margin: 0; transform-origin: top left; scale: 1.16071429 1.13924051; font-size: 31px; }
#stage .welcome-speech h2 strong { font-size: 42px; }
#stage .welcome-bio { display: contents; }
#stage .welcome-bio h3 { position: absolute; left: 85px; top: 154px; width: 280px; margin: 0; transform-origin: top left; scale: 0.96785714 1.00000000; font-size: 21px; }
#stage .welcome-bio p { position: absolute; left: 85px; top: 178px; width: 280px; margin: 0; transform-origin: top left; scale: 1.23214286 1.23529412; font-size: 12px; }
#stage .home-about, #stage[data-intro-open] .home-intro-close {
  position: absolute; display: flex; align-items: center; justify-content: space-between; padding: 0 14px;
  inset: 241px 2px auto; height: 44px; border: 1px solid #397a6d; border-radius: 8px 14px 8px 8px;
  color: #153f37; background: #fff7cf; box-shadow: 2px 3px #7acabb; font-weight: 850;
}
#stage[data-intro-open] #stage-panel { top: 183px; height: 482px; }
#stage[data-intro-open] :is(.home-shortcuts, .welcome-speech, .close-cross) { display: none; }
#stage[data-intro-open] .home-intro-close { inset: 427px 3px auto 0; height: 55px; }
#stage .phone-back[hidden] { display: inline !important; }
#stage[data-intro-open] .profile-card {
  display: block; height: 413px; padding: 23px 16px; overflow-y: auto; overscroll-behavior: contain;
}
#stage .profile-card h3 { font-size: 28px; }
#stage .profile-text { margin-top: 17px; display: grid; gap: 14px; }
#stage .profile-text :is(p,h1,h2) { margin: 0; }

#stage .bulletin-panel { display: grid; grid-template-rows: 48px 244px minmax(0,1fr); gap: 14px; padding: 0 2px; border: 0; background: none; box-shadow: none; }
#stage .bulletin-header { align-items: center; }
#stage .bulletin-heading { align-self: start; margin-top: 3px; font-size: 29px; }
#stage .bulletin-feature { display: grid; grid-template-rows: 190px 1fr; background: #fffbed; color: #123e37; border-radius: 12px; }
#stage .bulletin-cover { position: relative; inset: auto; grid-row: 1; }
#stage .bulletin-feature-title { grid-row: 2; height: 100%; align-items: center; background: transparent; padding: 3px 8px; }
#stage .bulletin-feature-title strong { font-size: 19px; }
#stage .bulletin-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
#stage .bulletin-entry { flex: none; height: 54px; grid-template-columns: 48px 1fr auto; }
#stage .bulletin-thumb { width: 46px; height: 46px; }

#stage[data-active="games"] #stage-panel { inset: 192px 14px auto 18px; height: 505px; }
#stage .game-dialogs { position: relative; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
#stage .phone-feature-label[hidden] {
  position: absolute; z-index: 2; top: 5px; left: 12px; display: block !important; pointer-events: none;
  padding: 1px 8px; color: #143e35; background: #ffe28a; border-radius: 3px; font-size: 14px; font-weight: 850;
}
#stage .game-dialogs > .feature-banner { grid-template-rows: auto; align-self: start; padding: 22px 6px 1px; }
#stage .game-dialogs > .feature-banner .feature-print {
  position: relative; box-sizing: content-box; width: auto; height: auto;
  aspect-ratio: 8 / 3; justify-self: stretch; overflow: hidden;
}
#stage .game-dialogs > .feature-banner .feature-print > :is(img, svg) { position: absolute; inset: 0; }
#stage .game-dialogs > .feature-banner .feature-print > img { object-fit: cover !important; }
#stage .game-shelf { border: 0; background: transparent; box-shadow: none; padding: 0 2px; display: grid; grid-template-rows: 42px 1fr; gap: 19px; }
#stage .game-shelf .shelf-header h2 { font-size: 24px; }
#stage .game-shelf .catalog-grid { display: grid; grid-template-columns: repeat(3,110px); grid-auto-rows: 128px; justify-content: start; gap: 12px 7px; padding: 0 0 0 2px; }
#stage .game-shelf .catalog-tile { grid-template-rows: 109px 1fr; width: 110px; }
#stage .game-shelf .catalog-name { line-height: 17px; }

#stage[data-active="creative"] #stage-panel { inset: 188px 15px auto 17px; }
#stage .creative-stack { grid-template-rows: 239px minmax(0,1fr); gap: 9px; min-height: 0; }
#stage .creative-videos { padding: 8px 9px 14px; gap: 3px; }
#stage .creative-heading h2 { font-size: 25px; }
#stage .creative-film-strip { grid-template-columns: 30px 1fr 30px; }
#stage .creative-play-icon { position: absolute; top: 39px; left: 50%; translate: -50% 0; width: 48px; }
#stage .creative-film-label { font-size: 12px; }
#stage .creative-video-title { font-size: 13px; }
#stage .creative-illustrations { display: grid; grid-template-rows: 42px minmax(0,176px); gap: 7px; padding: 0 2px; border: 0; background: none; box-shadow: none; }
#stage .creative-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: 176px; gap: 10px; }

#stage[data-active="chat"] #stage-panel { inset: 188px 15px auto 17px; height: 497px; }
#stage .managed-chat { grid-template-rows: auto auto minmax(0,1fr) auto auto; padding: 10px 11px 0; gap: 7px; }
#stage .managed-chat .lobby-heading { min-height: 40px; }
#stage .managed-chat .lobby-heading { grid-row: 1; }
#stage #chat-pins { grid-row: 2; }
#stage #chat-form { grid-row: 4; display: grid; grid-template-columns: 68px minmax(0,1fr) 66px; gap: 6px; }
#stage #chat-form :is(input,button) { max-width: none; min-height: 44px; font-size: 16px; }
#stage .managed-chat small { grid-row: 5; min-height: 11px; }

#stage[data-active="contact"] #stage-panel { inset: 185px 11px auto 15px; }
#stage .contact-dialogs { display: grid; grid-template-rows: 157px 157px 144px; gap: 12px; }
#stage .mail-ticket-inner { grid-template-columns: 1fr; padding: 10px 16px; }
#stage .mail-ticket-inner::before { display: none; }
#stage .mail-ticket .contact-sticker { left: 81.3%; top: 46%; width: 101px; height: 134px; object-fit: contain; }
#stage .mail-copy { max-width: 255px; }
#stage .mail-copy h2 { font-size: 25px; }
#stage .mail-copy p, #stage .coffee-ticket p { font-size: 12px; }
#stage .mail-action { font-size: 15px; min-height: 31px; }
#stage .mail-copy-button { min-height: 28px; }
#stage .mail-ticket--art { margin-right: 1px; }
#stage .coffee-ticket { margin: -2px 1px 2px -1px; }

/* Portrait slots and transparent padding measured against the approved canvas. */
#stage[data-active="home"]:not([data-intro-open]) { --portrait-x: -69px; --portrait-y: -117px; --portrait-w: 463px; --portrait-h: 552px; }
#stage[data-active="home"]:not([data-intro-open]) #portrait img[src$="1f883d9f78268c59db06f492fe1360db8826c9e503b11958b966e94434741f8a.png"] { left: -112.52px; bottom: 0.00px; width: 685.28px; height: 454.24px; }
#stage[data-active="news"] { --portrait-x: 92px; --portrait-y: -158px; --portrait-w: 326px; --portrait-h: 362px; }
#stage[data-active="news"] #portrait img[src$="00a9f1689712dfb1b506db52b261cdf9ee3e1d84f444d02547aebe2b0e45812f.png"] { left: -22.50px; bottom: 0.00px; width: 363.42px; height: 240.89px; }
#stage[data-active="games"] { --portrait-x: 132px; --portrait-y: -159px; --portrait-w: 254px; --portrait-h: 341px; }
#stage[data-active="games"] #portrait img[src$="2c5712a76ee3a3b569ab5b14e62d6e68817537171e853a3ce8dea85a67dd6f3a.png"] { left: -29.59px; bottom: 0.00px; width: 325.66px; height: 215.87px; }
#stage[data-active="creative"] { --portrait-x: 105px; --portrait-y: -132px; --portrait-w: 330px; --portrait-h: 359px; }
#stage[data-active="creative"] #portrait img[src$="e677b02d21368573c437ae14d44178b2ab28dc9131390453632cd2b36525cc1d.png"] { left: -86.81px; bottom: 0.00px; width: 465.70px; height: 308.69px; }
#stage[data-active="chat"] { --portrait-x: 109px; --portrait-y: -34px; --portrait-w: 256px; --portrait-h: 265px; }
#stage[data-active="chat"] #portrait img[src$="0f303ee0b78a9461bf7b483039d49942c87eef5678b00b7a385601eb4d8d8f69.png"] { left: -64.78px; bottom: 0.00px; width: 403.47px; height: 267.44px; }
#stage[data-active="contact"] { --portrait-x: 114px; --portrait-y: -109px; --portrait-w: 288px; --portrait-h: 339px; }
#stage[data-active="contact"] #portrait img[src$="befdd3e47999f9604f2b438613764e7a33f3600843f572b6206002238c216fc1.png"] { left: -67.87px; bottom: 0.00px; width: 423.73px; height: 280.87px; }
#stage[data-intro-open] { --portrait-x: 92px; --portrait-y: -29px; --portrait-w: 272px; --portrait-h: 250px; }
#stage[data-intro-open] #portrait img[src$="1f883d9f78268c59db06f492fe1360db8826c9e503b11958b966e94434741f8a.png"] { left: -53.92px; bottom: 0.00px; width: 378.31px; height: 250.76px; }
