body:has(.mobile-app:not([hidden])) { background: #e9edf5; }
/* Public lobby presentation. The catalogue, account and admin APIs stay unchanged. */
.mobile-app {
  --blue: #315d9a; --royal: #355c94; --navy: #142d51; --gold: #d9b672; --cream: #fff0c6;
  --nav-height: max(98px, 6.125rem);
  max-width: 480px; background: #f3f5f9; color: #253650;
  font-family: "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
}
.mobile-app.nav-hidden { padding-bottom:calc(16px + env(safe-area-inset-bottom,0px)); }
body:has(.mobile-app.nav-hidden:not([hidden])) .toast { bottom:calc(16px + env(safe-area-inset-bottom,0px)); }
.mobile-app.lobby-view {
  background: radial-gradient(ellipse at 0 0,#dbe5f4,transparent 65%), radial-gradient(ellipse at 100% 100%,#e9dfd026,transparent 50%), linear-gradient(120deg,#f5f7fb,#e6ecf5);
}
/* Brand at left; account and live credit grouped at right. */
.mobile-app .header {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  min-height: 68px; height: auto; margin: 0; padding: 8px 16px;
  border: 0; border-bottom: 1px solid #ddbc775e; border-radius: 0;
  background: radial-gradient(ellipse at 15% -20%, #6b8dcc30, transparent 65%), linear-gradient(115deg, #284e84, #1b3864 65%, #122949);
  box-shadow: inset 0 1px #fff0cb26, 0 5px 18px #244d6c22; color: #fff5df;
}
.mobile-app .header::after { content: ""; position: absolute; pointer-events: none; bottom: -1px; left: 12%; width: 58%; height: 1px; background: linear-gradient(90deg, transparent, #ffe7a8, transparent); box-shadow: 0 0 10px #e2c68388; }
.mobile-app .header:not(.is-member) { padding-block:5px; }
.mobile-app .header:not(.is-member) > .brand { display:grid; grid-template-rows:minmax(0,1fr); place-items:center; width:170px; height:54px; flex:0 1 170px; margin:0; border-radius:0; filter:drop-shadow(0 2px 3px #07162b40); }
.mobile-app .header-login { margin-left:auto; }
.mobile-app .header-login {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 44px; padding: 0 12px; border: 1px solid #e7d6a378; border-radius: 10px;
  color: #f6e7c8; background: linear-gradient(160deg, #325483, #1c375e); box-shadow: inset 0 1px #f2dfbd35, 0 3px 7px #0003;
  font-size: 14px; font-weight: 800;
}
.mobile-app .header-login { color: #46351e; border-color: #f2dba2; background: linear-gradient(155deg, #fff1c8, #e4c382 50%, #bc934e); box-shadow: inset 0 1px #fff7e2, inset 0 -2px #8b682e30, 0 3px 9px #0004; }
.mobile-app .header-login svg { width: 16px; height: 16px; }
.mobile-app .header.is-member { min-height: 64px; padding-block: 5px; }
.mobile-app .member-summary { display: grid; grid-template-columns: minmax(0,170px) minmax(0,1fr); align-items: center; gap: 8px; width: 100%; min-width: 0; }
.mobile-app .member-brand-panel { display: block; min-width: 0; }
.mobile-app .member-logo { display:grid; grid-template-rows:minmax(0,1fr); place-items:center; width:100%; max-width:170px; height:54px; border-radius:0; }
.mobile-app .member-identity { grid-column: 1; grid-row: 1; display: flex; flex-direction: row; justify-content: flex-end; align-items: center; gap: 5px; min-width: 0; max-width: 100%; min-height: 26px; padding: 0; background: none; color: #f1f8fc; }
.mobile-app .member-nickname, .mobile-app .member-account { display: none; }
.mobile-app .member-username { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #e4f3fa; }
.mobile-app .wallet-panel { display: grid; grid-template-columns: minmax(0,1fr); align-content: center; justify-items: end; gap: 0; min-width: 0; padding: 0; border: 0; background: none; box-shadow: none; text-align: right; }
.mobile-app .wallet-panel::after { display: none; }
.mobile-app .balance-refresh svg { width: 16px; height: 16px; }
.mobile-app .wallet-value { grid-column: 1; grid-row: 2; display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; max-width: 100%; margin: 0; }
.mobile-app .member-summary .wallet-coin { width: 28px; height: 28px; aspect-ratio: 1; flex: 0 0 28px; object-fit: contain; filter: drop-shadow(0 2px 3px #07152a66); }
.mobile-app .wallet-amount, .mobile-app .wallet-amount.is-compact { color: #ffedbf; font-family: inherit; font-size: 24px; font-weight: 750; line-height: 1.15; letter-spacing: -.025em; text-shadow: 0 2px 12px #eab96620; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mobile-app .wallet-fraction { font-size: .65em; color: #dec898; margin-left: 1px; }
/* The image and its fine border share one elliptical edge. */
.mobile-app .home-carousel { position: relative; z-index:1; width:100%; margin:-13px 0 8px; border:0; border-radius:0; background:none; box-shadow:none; overflow:visible; }
.mobile-app .home-carousel::after { content:none; }
.mobile-app .carousel-frame { aspect-ratio:auto; height:clamp(165px,46cqw,196px); border:2px solid #e3c178; border-radius:0 0 50% 50% / 0 0 21% 21%; background:#091c39; box-shadow:0 2px 9px #05122480,inset 0 1px #fff3ce77; overflow:hidden; }
.mobile-app .carousel-track { align-items:stretch; height:100%; }
.mobile-app .carousel-panel { position:relative; display:block; min-width:0; height:100%; background:#152c4f; }
.mobile-app .carousel-panel::after { display:block; background:linear-gradient(90deg,#04172bc9 0%,#071b3180 38%,transparent 72%); }
.mobile-app .carousel-panel[data-side="right"]::after { background:linear-gradient(270deg,#061324d9 0%,#07162b8c 40%,transparent 75%); }
.mobile-app .carousel-panel.image-unavailable::after { display:grid; place-items:center; position:absolute; inset:0; content:"主視覺暫時無法載入"; color:#e7f3f8; background:#203d67; font-size:13px; }
.mobile-app .carousel-image { position:absolute; inset:0; width:100%; height:100%; max-width:none; aspect-ratio:auto; object-fit:cover; object-position:center; }
.mobile-app .carousel-copy, .mobile-app .carousel-copy.copy-right { position:absolute; z-index:2; inset:0 auto 0 0; transform:none; justify-content:center; width:57%; min-height:0; padding:15px 14px 17px; gap:4px; background:none; }
.mobile-app .carousel-copy.copy-right { inset:0 0 0 auto; align-items:flex-start; padding-left:16px; }
.mobile-app .carousel-copy::before { display: none; }
.mobile-app .carousel-copy > span { color: #cdb77c; font-size: 9px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }
.mobile-app .carousel-copy > strong { color: #fff0c4; font-size: clamp(16px,4.5cqw,20px); line-height: 1.35; letter-spacing: .04em; font-weight: 850; text-shadow: 0 2px 7px #0008; }
.mobile-app .carousel-copy > small { color: #e5eef2; font-size: 11px; line-height: 1.5; font-weight: 550; text-shadow:0 1px 4px #000; }
/* One catalogue, sourced from the published provider API. */
.mobile-app #lobby { padding: 0 16px; }
.mobile-app .game-showcase { display: none; }
.mobile-app .featured-entry { display:block; width:min(100%, 480px); margin:0 auto; border:0; background:none; line-height:0; filter:drop-shadow(0 10px 20px #0008); transition:none; }
.mobile-app .featured-entry img { display:block; width:100%; height:auto; transition:none; }
.mobile-app .featured-entry:hover, .mobile-app .featured-entry:active { transform:none; filter:drop-shadow(0 10px 20px #0008); }
.mobile-app .featured-entry:hover img { transform:none; filter:none; }
.mobile-app .featured-dialog { position:fixed; width:min(96vw, 440px); max-width:none; max-height:calc(100dvh - 24px); margin:auto; padding:0; border:0; color:#f5e7c1; background:transparent; box-shadow:none; overflow:visible; }
.mobile-app .featured-dialog:not([open]) { display:none; }
.mobile-app .featured-dialog::backdrop { background:#020916d9; backdrop-filter:blur(6px); }
.mobile-app .featured-dialog .game-content { width:100%; }
.mobile-app .featured-dialog-close { position:absolute; z-index:5; top:18px; right:20px; display:grid; place-items:center; width:36px; height:36px; border:1px solid #e7c780; border-radius:50%; color:#fff2ca; background:linear-gradient(145deg,#275081,#071b36); box-shadow:0 3px 12px #0008; font-size:27px; line-height:1; }
.mobile-app .featured-dialog-close:hover { filter:brightness(1.18); }
/* Nine-slice artwork preserves the title and corners while the catalogue grows. */
.mobile-app .game-content { position:relative; isolation:isolate; container-type:inline-size; display:flow-root; padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
.mobile-app .game-content::before { content:""; position:absolute; z-index:-1; pointer-events:none; inset:0; border-style:solid; border-color:transparent; border-width:25cqw 8.2873cqw 12cqw; border-image:url("assets/01_background/mobile-game-frame.webp") 300 90 160 90 / 1 / 0 stretch repeat; }
.mobile-app .game-content::after { content:""; position:absolute; z-index:-2; pointer-events:none; inset:20cqw 4cqw 4cqw; border-radius:18px; background:linear-gradient(150deg,#102b50f5,#07182cf2); }
.mobile-app .category-heading { position:relative; display:flex; justify-content:flex-end; align-items:center; min-height:0; margin:0 9cqw 10px; padding:25cqw 0 0; border:0; }
.mobile-app .category-heading::before, .mobile-app .category-heading::after { content:none; }
.mobile-app .gallery-heading { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.mobile-app .gallery-kicker { display:none; }
.mobile-app .game-library-title { margin:0; padding:0; border:0; font-size:18px; }
.mobile-app .game-library-title::before { content:none; }
.mobile-app .category-heading .game-count { position:static; width:auto; height:auto; margin:0; padding:0; overflow:visible; clip-path:none; font-size:11px; font-weight:500; color:#deebf1; }
.mobile-app .game-content > :is(.games,.empty-state) { margin:0 9cqw 12cqw; }
.mobile-app .games:empty { display:none; }
.mobile-app .game-content > .empty-state { border:0; border-radius:0; background:none; box-shadow:none; }
.mobile-app .games { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows:1fr; gap: 12px; }
.mobile-app .more-games-section { margin:20px 0 0; padding:0 8px 20px; border:0; background:none; box-shadow:none; }
.mobile-app .more-games-grid { margin:0; gap:10px; }
.mobile-app .more-games-section[hidden] { display:none; }
.mobile-app .more-games-grid .game-card { position:relative; aspect-ratio:882 / 504; border-radius:0; background:none; }
.mobile-app .more-games-grid .more-game-frame { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; pointer-events:none; user-select:none; }
.mobile-app .more-games-grid .game-card > :is(span,button) { position:relative; z-index:1; }
.mobile-app .more-games-grid .more-game-preview { display:grid; place-items:center; text-align:center; }
.mobile-app .more-game-preview > span { color:#f1dca9; font-size:clamp(12px,4vw,18px); font-weight:750; letter-spacing:.12em; text-shadow:0 2px 6px #000; }
.mobile-app .more-games-grid .game-card > .provider-game-button { display:flex; align-items:center; justify-content:center; gap:2px; width:100%; height:100%; min-height:0; aspect-ratio:auto; padding:18% 11% 17%; border:0; border-radius:0; background:none; box-shadow:none; text-align:center; }
.mobile-app .more-games-grid .provider-game-art,
.mobile-app .more-games-grid .game-card:nth-child(even) .provider-game-art { flex:none; width:26px; height:26px; aspect-ratio:1; border:0; border-radius:0; background:none; }
.mobile-app .more-games-grid .game-emblem { width:100%; max-width:none; margin:0; }
.mobile-app .more-games-grid .emblem-brand,
.mobile-app .more-games-grid .provider-game-button > small,
.mobile-app .more-games-grid .game-enter { display:none; }
.mobile-app .more-games-grid .provider-game-button > strong { margin:0; font-size:clamp(11px,3.5vw,15px); line-height:1.2; text-shadow:0 1px 4px #000; }
.mobile-app .game-card { min-width: 0; border-radius: 13px; }
.mobile-app .game-card > .provider-game-button { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; height: 100%; aspect-ratio: auto; min-height: 217px; padding: 0; overflow: hidden; border: 1px solid #d8bb8080; border-radius: 13px; background: linear-gradient(150deg,#294976,#142b4a); box-shadow: inset 0 1px #fff1c638, 0 7px 12px #15374c35; color: #fff0cc; }
.mobile-app #games .game-card > .provider-game-button { min-height:170px; }
.mobile-app #games .provider-game-art { aspect-ratio:2.3; }
.mobile-app #games .provider-game-button > strong { margin:7px 5px 2px; }
.mobile-app #games .provider-game-button > small { margin-bottom:6px; }
.mobile-app #games .game-enter { margin-bottom:7px; padding-top:6px; }
.mobile-app .game-card > button::before, .mobile-app .game-card > button::after { display: none; }
.mobile-app .provider-game-art { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1.4; border: 0; border-radius: 0; background: radial-gradient(ellipse at 50% 28%,#7599ca55,transparent 65%), conic-gradient(from 220deg at 50% 120%,#213b60,#5578a9,#2c4c77,#6a8aba,#2b486d); overflow: hidden; }
.mobile-app .game-card:nth-child(even) .provider-game-art { background: radial-gradient(ellipse at 50% 28%,#d9c5a260,transparent 65%),conic-gradient(from 220deg at 50% 120%,#2f435f,#8392a4,#3a5476,#9ca79f,#304a6a); }
.mobile-app .provider-game-art::after { content: ""; position: absolute; bottom: 1px; left: 16%; right: 16%; height: 1px; background: linear-gradient(90deg,transparent,#d3bd8177,transparent); }
.mobile-app .game-emblem { width: 81%; max-width: 134px; height: auto; margin-top: -6px; filter: drop-shadow(0 7px 5px #153b5680); }
.mobile-app .emblem-card-back { fill: #4a658c; stroke: #bfa36b; stroke-width: 1; }
.mobile-app .emblem-card { fill: #263c60; stroke: #e7c785; stroke-width: 1.6; }
.mobile-app .emblem-inset { fill: #61748c; stroke: #d9b87580; stroke-width: .8; }
.mobile-app .emblem-diamond { fill: #f1d795; stroke: #fff0c8; stroke-width: 1; }
.mobile-app .emblem-spark { fill: #f9e7b5; }
.mobile-app .emblem-brand { position: absolute; bottom: 6px; font-size: 6px; letter-spacing: .25em; color: #e0eced; }
.mobile-app .provider-game-button > strong { margin: 12px 6px 3px; font-size: clamp(16px,4.6cqw,18px); line-height: 1.35; font-weight: 850; color: #ffefc7; }
.mobile-app .provider-game-button > small { margin: 0 5px 12px; font-size: 10px; line-height: 1.5; color: #dbeaf1; font-weight: 500; }
.mobile-app .game-enter { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: auto 10px 10px; padding-top: 8px; border-top: 1px solid #d3b57332; color: #e7c786; font-size: 11px; font-weight: 700; }
.mobile-app .game-enter > span { font-size: 15px; }
.mobile-app .provider-game-button:disabled { cursor: not-allowed; opacity: .6; }
.mobile-app .empty-state { min-height: 156px; margin: 0; padding: 24px 17px; border: 1px solid #e9d4ac24; border-radius: 13px; background: linear-gradient(145deg,#142d52cc,#23416aaa); }
.mobile-app .empty-state p { color: #eff7fb; font-size: 14px; line-height: 1.8; }
.mobile-app .site-footer { padding: 14px 16px 10px; }
.mobile-app.lobby-view .site-footer { color: #597083; }
.mobile-app.lobby-view .site-footer a { color: #415978; font-size: 12px; }
/* Shared member pages use the same sapphire-blue controls and warm wood accents. */
.mobile-app .primary-button { background: linear-gradient(135deg,#345e96,#244575); border-color:#728bae; color:#fff; box-shadow:inset 0 1px #e6f6ff55,0 4px 12px #32678024; }
.mobile-app .secondary-button { color:#344f73; background:linear-gradient(135deg,#f0f9fc,#e6ecf5); border-color:#c7d3e4; }
.mobile-app .text-button, .mobile-app .password-toggle { color:#315c8e; }
.mobile-app .page-heading h1 { color:#293f60; }
.mobile-app .surface { border-color:#d2dbe8; background:linear-gradient(145deg,#fff,#f6fafc); box-shadow:0 8px 22px #335e7410; }
.mobile-app .auth-card input:focus { border-color:#708fbc; box-shadow:0 0 0 3px #708fbc24; }
.mobile-app .site-footer a { color:#415978; }
/* Dedicated login composition; shared authentication and validation stay unchanged. */
.mobile-app.login-view { padding-bottom: calc(16px + env(safe-area-inset-bottom,0px)); background: radial-gradient(ellipse at 0 0,#d4deee,transparent 65%),#eef2f8; }
.mobile-app.login-view .route-page { width:100%; max-width:460px; padding:16px 18px 0; min-height:0; margin-inline:auto; }
.mobile-app.login-view .page-heading { min-height:44px; margin-bottom:14px; gap:12px; }
.mobile-app.login-view .page-heading h1 { font-size:21px; letter-spacing:.03em; }
.mobile-app.login-view .back-button { background:#ffffffb3; border-color:#bdcce0; color:#284b79; border-radius:13px; }
.mobile-app.login-view .auth-card { padding:0 22px 18px; overflow:hidden; border:1px solid #becce0; border-radius:22px; background:#fbfcff; box-shadow:0 14px 36px #17355716,inset 0 1px #fff; }
.mobile-app.login-view .login-brand { margin:0 -22px 18px; padding:16px 22px 18px; background:radial-gradient(ellipse at 50% 0,#6c8aba45,transparent 70%),linear-gradient(135deg,#294c7c,#152e52); border-bottom:1px solid #d9bd815c; text-align:center; }
.mobile-app.login-view .login-brand-animation { width:86px; height:74.396825px; margin:0 auto 5px; filter:drop-shadow(0 4px 8px #06193266); }
.mobile-app.login-view .login-brand h2 { margin:0 0 5px; color:#fff0ce; font-size:25px; font-weight:800; line-height:1.35; letter-spacing:.06em; }
.mobile-app.login-view .login-brand p { margin:0; color:#d5e1f2; font-size:13px; font-weight:500; line-height:1.6; }
.mobile-app.login-view .auth-card label { margin:14px 0 7px; color:#2b405f; font-size:14px; font-weight:750; }
.mobile-app.login-view .auth-card input { min-height:48px; padding:12px; border:1px solid #c7d3e3; border-radius:11px; background:#f0f4fa; color:#213a5d; font-weight:500; }
.mobile-app.login-view .auth-card input::placeholder { color:#687c97; font-size:13px; }
.mobile-app.login-view .auth-card input:focus { background:#fff; border-color:#466b9f; box-shadow:0 0 0 3px #698eb51c; }
.mobile-app.login-view .password-field input { padding-right:64px; }
.mobile-app.login-view .password-toggle { top:2px; right:3px; height:44px; color:#3b5a85; font-size:13px; }
.mobile-app.login-view .forgot-link-row { margin-top:2px; }
.mobile-app.login-view .forgot-link-row a { font-size:13px; color:#435d81; }
.mobile-app.login-view .submit-button { margin-top:8px; min-height:48px; border:1px solid #c6a568; border-radius:12px; background:linear-gradient(140deg,#f3e5bf,#dcc28d 65%,#c6a369); color:#44351f; box-shadow:inset 0 1px #fff5d9,0 5px 12px #8d723c1a; font-size:16px; }
.mobile-app.login-view .submit-button:hover { filter:brightness(1.04); }
.mobile-app.login-view .auth-legal-links { margin-top:20px; padding-top:6px; border-color:#dde4ee; gap:12px; font-size:12px; }
.mobile-app.login-view .auth-legal-links a { color:#536985; }
.mobile-app.login-view .auth-card .draft-note { color:#6c7b8f; font-size:11px; line-height:1.6; }
.mobile-app.login-view .site-footer { padding-top:18px; padding-bottom:0; }
@media(min-width:1024px) { .mobile-app.login-view .route-page { padding-top:32px; } }
/* The supplied portrait artwork is a transparent composition. Keep the form as
   real controls over blank skins, with a desktop login layout left intact. */
.mobile-app.login-view .login-scene,
.mobile-app.login-view .login-field-icon,
.mobile-app.login-view .remember-username,
.mobile-app.login-view .login-explore { display:none; }
@media(min-width:768px) {
  .mobile-app.login-view .login-explore { display:flex; justify-content:center; align-items:center; min-height:44px; margin-top:12px; border:1px solid #9db5d4; border-radius:12px; color:#244a79; background:#eef3fa; font-weight:800; text-decoration:none; }
}
/* Keep the same phone login composition inside the centered desktop shell. */
  .mobile-app.login-view { min-height:100svh; padding-bottom:env(safe-area-inset-bottom,0px); background:#061631 url("assets/01_background/mobile-royal-hall-v2.webp") center top / 100% 100svh no-repeat; color:#f7ebcd; }
  .mobile-app.login-view .route-page { max-width:480px; padding:0; position:relative; }
  .mobile-app.login-view .page-heading { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip-path:inset(50%); }
  .mobile-app.login-view .page-heading h1 { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .mobile-app.login-view .back-button { display:grid; place-items:center; width:52px; min-height:44px; border:1px solid #e9c77e; border-radius:12px; color:#fff2cf; background:linear-gradient(#123c72,#071f4a); box-shadow:0 3px 12px #0008,inset 0 1px #ffdda777; font-size:24px; }
  .mobile-app.login-view .auth-card { position:relative; width:100%; padding:0; overflow:visible; border:0; border-radius:0; background:none; box-shadow:none; }
  .mobile-app.login-view .login-brand { display:none; }
  .mobile-app.login-view .login-scene { position:relative; display:block; width:100%; min-height:100svh; aspect-ratio:941 / 1672; background:linear-gradient(180deg,transparent 37%,#071b3a 48%,#071b3a 77%,transparent 89%),#061631 url("assets/01_background/mobile-royal-hall-v2.webp") center top / 100% 100svh no-repeat; }
  .mobile-app.login-view .login-scene::before { content:""; position:absolute; inset:0; background:url("assets/11_login/scene-background.webp") center top / 100% 100% no-repeat; mask-image:linear-gradient(#000 0%,#000 80%,transparent 100%); pointer-events:none; }
  .mobile-app.login-view .login-scene::after { content:""; position:absolute; z-index:0; inset:0 0 auto; height:14%; background:url("assets/01_background/mobile-royal-hall-v2.webp") center top / 100% 100svh no-repeat; mask-image:linear-gradient(#000 15%,transparent 100%); pointer-events:none; }
  .mobile-app.login-view .login-scene > img,
  .mobile-app.login-view .login-center-animation { position:absolute; display:block; height:auto; max-width:none; pointer-events:none; }
  .mobile-app.login-view .login-art-frame { left:9.033%; top:4.904%; width:82.253%; z-index:1; }
  .mobile-app.login-view .login-center-animation { left:31%; top:14%; width:38%; aspect-ratio:126 / 109; background-image:var(--bs-home-logo, url("assets/07_bottom_navigation/home-logo-poster.webp")); filter:drop-shadow(0 5px 14px #d5af69b0); }
  .mobile-app.login-view .login-art-tagline { left:39.745%; top:36.722%; width:20.616%; }
  .mobile-app.login-view .login-art-panel { left:6.801%; top:43.301%; width:86.61%; z-index:1; }
  .mobile-app.login-view .login-art-title { left:14.878%; top:38.158%; width:71.413%; z-index:2; }
  .mobile-app.login-view #auth-form { position:absolute; z-index:3; inset:0; margin:0; text-align:left; pointer-events:none; }
  .mobile-app.login-view #auth-form > * { pointer-events:auto; }
  .mobile-app.login-view .login-username-field,
  .mobile-app.login-view .login-password-field { position:absolute; left:14.24%; width:71.52%; height:6.579%; background:url("assets/11_login/field.webp") center / 100% 100% no-repeat; }
  .mobile-app.login-view .login-username-field { top:50.359%; }
  .mobile-app.login-view .login-password-field { top:57.237%; }
  .mobile-app.login-view .login-username-field:focus-within,
  .mobile-app.login-view .login-password-field:focus-within { outline:2px solid #ffdc8b; outline-offset:2px; border-radius:12px; }
  .mobile-app.login-view .login-username-field > label,
  .mobile-app.login-view .login-password-field > label { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .mobile-app.login-view .login-field-icon { display:block; position:absolute; left:5.2%; top:50%; width:7.1%; height:auto; transform:translateY(-50%); pointer-events:none; }
  .mobile-app.login-view .login-password-field .password-field { position:static; }
  .mobile-app.login-view .login-username-field input,
  .mobile-app.login-view .login-password-field input { position:absolute; left:17%; top:0; width:65%; height:100%; min-height:44px; margin:0; padding:0 2px; border:0; border-radius:0; appearance:none; -webkit-appearance:none; background:transparent !important; box-shadow:none; color:#fff3d4; -webkit-text-fill-color:#fff3d4 !important; color-scheme:dark; font-size:clamp(16px,4.1vw,18px); font-weight:600; outline:0; }
  .mobile-app.login-view .login-username-field input::placeholder,
  .mobile-app.login-view .login-password-field input::placeholder { color:#a79778; font-size:inherit; opacity:1; }
  .mobile-app.login-view .login-username-field input:focus,
  .mobile-app.login-view .login-password-field input:focus { border:0; background:transparent; box-shadow:none; }
  /* Chrome and Safari paint saved credentials over transparent inputs unless every autofill state wins the focus rule. */
  .mobile-app.login-view .login-username-field input:-webkit-autofill,
  .mobile-app.login-view .login-username-field input:-webkit-autofill:hover,
  .mobile-app.login-view .login-username-field input:-webkit-autofill:focus,
  .mobile-app.login-view .login-password-field input:-webkit-autofill,
  .mobile-app.login-view .login-password-field input:-webkit-autofill:hover,
  .mobile-app.login-view .login-password-field input:-webkit-autofill:focus {
    -webkit-text-fill-color:#fff3d4 !important;
    -webkit-box-shadow:inset 0 0 0 1000px #10151b !important;
    box-shadow:inset 0 0 0 1000px #10151b !important;
    background-color:#10151b !important;
    caret-color:#fff3d4;
  }
  .mobile-app.login-view .password-toggle { position:absolute; top:0; right:1%; width:16%; min-width:44px; height:100%; min-height:44px; margin:0; padding:0; border:0; border-radius:9px; background:url("assets/11_login/visibility-icon.webp") center / 28px auto no-repeat; color:transparent; font-size:0; }
  .mobile-app.login-view .password-toggle[aria-pressed=true]::after { content:""; position:absolute; left:24%; right:24%; top:50%; height:2px; transform:rotate(-27deg); background:#fff1cf; }
  .mobile-app.login-view .login-options { position:absolute; left:15%; right:15%; top:63.7%; display:flex; align-items:center; justify-content:space-between; min-height:34px; gap:8px; }
  .mobile-app.login-view label.remember-username { display:flex; align-items:center; gap:5px; margin:0; color:#f0e2c4; font-size:clamp(13px,3.5vw,15px); font-weight:600; white-space:nowrap; }
  .mobile-app.login-view .remember-username input { appearance:none; width:17px; height:17px; min-height:0; margin:0; padding:0; flex:0 0 17px; border:1px solid #d8c091; border-radius:2px; background:#0c1e3a; }
  .mobile-app.login-view .remember-username input:checked { background:#e8c879; box-shadow:inset 0 0 0 3px #0c1e3a; }
  .mobile-app.login-view .remember-username input:focus-visible { outline:2px solid #ffe0a4; outline-offset:3px; }
  .mobile-app.login-view .forgot-link-row { margin:0; }
  .mobile-app.login-view .forgot-link-row a { min-height:34px; color:#b5d4ff; font-size:clamp(13px,3.5vw,15px); text-decoration:underline; text-underline-offset:3px; }
  .mobile-app.login-view .submit-button,
  .mobile-app.login-view .login-explore { position:absolute; left:14.24%; display:flex; justify-content:center; align-items:center; width:71.73%; height:6.758%; min-height:44px; margin:0; padding:0 10px; border:0; border-radius:0; box-shadow:none; color:#fff8e9; font-size:clamp(18px,5.1vw,24px); font-weight:800; text-align:center; text-shadow:0 2px 3px #07152e; letter-spacing:.06em; }
  .mobile-app.login-view .submit-button { top:69%; background:url("assets/11_login/login-button.webp") center / 100% 100% no-repeat; }
  .mobile-app.login-view .login-explore { top:76%; display:flex; background:url("assets/11_login/explore-button.webp") center / 100% 100% no-repeat; text-decoration:none; }
  .mobile-app.login-view .submit-button:focus-visible,
  .mobile-app.login-view .login-explore:focus-visible { outline:2px solid #fff2b5; outline-offset:2px; }
  .mobile-app.login-view .submit-button:active,
  .mobile-app.login-view .login-explore:active { filter:brightness(1.15); transform:scale(.98); }
  .mobile-app.login-view #form-error { position:absolute; z-index:5; left:14%; top:45%; width:72%; max-height:18%; overflow:auto; margin:0; padding:8px 10px; border:1px solid #f1ba9b; border-radius:8px; background:#4a1725f2; color:#fff2df; font-size:13px; line-height:1.5; text-align:center; box-shadow:0 4px 15px #0008; }
  .mobile-app.login-view .auth-legal-links { position:absolute; z-index:3; top:84%; left:0; right:0; display:flex; justify-content:center; gap:18px; min-height:44px; margin:0; padding:0 12px; border:0; background:none; font-size:13px; text-shadow:0 1px 4px #021127; }
  .mobile-app.login-view .auth-legal-links a { color:#fff0c9; }
  .mobile-app.login-view .auth-card .draft-note { position:absolute; z-index:3; top:91%; left:0; right:0; margin:0; padding:0 12px; color:#e4d5b2; background:none; line-height:1.5; text-shadow:0 1px 4px #021127; }
  .mobile-app.login-view .site-footer { display:none; }
@media(max-width:359px) {
  .mobile-app.login-view .login-username-field input,
  .mobile-app.login-view .login-password-field input,
  .mobile-app.login-view .password-toggle { min-height:0; }
  .mobile-app.login-view .login-options { top:63%; }
  .mobile-app.login-view .login-explore { top:77.1%; }
  .mobile-app.login-view .auth-legal-links { top:86%; }
  .mobile-app.login-view .auth-card .draft-note { top:93%; }
}
@media(max-width:767px) and (max-aspect-ratio:1/2) {
  /* The ornate panel must continue behind both actions on taller phones. */
  .mobile-app.login-view .login-scene > .login-art-panel { height:40%; }
}
/* The five real destinations sit on one narrow base; only the BS badge rises. */
.mobile-app .bottom-nav { isolation:isolate; width:min(calc(100% - 16px),464px); height:auto; min-height:58px; bottom:calc(8px + env(safe-area-inset-bottom,0px)); padding:2px 4px; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); align-items:stretch; border:2px solid #e5c47f; border-top:0; border-radius:18px 18px 20px 20px; color:#e1edf8; background:radial-gradient(ellipse at 50% -30%,#3861a855,transparent 64%),linear-gradient(180deg,#174376,#072349 55%,#04162d); box-shadow:inset 0 1px #fff4cf66,inset 0 -2px #020b1e99,0 5px 18px #0009; overflow:visible; }
.mobile-app .bottom-nav::before { content:""; position:absolute; z-index:1; pointer-events:none; left:50%; top:-15px; width:82px; height:18px; transform:translateX(-50%); border:2px solid #e5c47f; border-bottom:0; border-radius:50% 50% 0 0 / 100% 100% 0 0; background:linear-gradient(180deg,#27558b,#174376 85%); box-shadow:inset 0 2px #ffedba55; }
.mobile-app .bottom-nav::after { content:""; position:absolute; z-index:0; pointer-events:none; left:15px; right:15px; top:0; height:2px; background:linear-gradient(90deg,#e5c47f 0 calc(50% - 41px),transparent calc(50% - 41px) calc(50% + 41px),#e5c47f calc(50% + 41px)); }
.mobile-app .bottom-nav button { position:relative; z-index:2; display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:0; min-height:52px; height:auto; gap:2px; padding:3px 1px 2px; background:none; border-radius:0; }
.mobile-app .bottom-nav button:not(:last-child)::before { content:""; position:absolute; pointer-events:none; right:0; top:10px; bottom:10px; width:1px; background:linear-gradient(transparent,#d5b977a8,transparent); }
.mobile-app .bottom-nav button > :is(img,svg) { width:24px; height:24px; object-fit:contain; flex:0 0 auto; margin:0; filter:none; }
.mobile-app .bs-logo-animation { display: block; flex: 0 0 auto; background: var(--bs-home-logo, url("assets/07_bottom_navigation/home-logo-poster.webp")) center / contain no-repeat; pointer-events: none; }
.mobile-app .header-logo-animation { width:100%; height:auto; aspect-ratio:5 / 2; background-image:var(--bs-header-logo, url("assets/02_brand/header-logo-poster.webp")); }
.mobile-app .bottom-nav .home { justify-content:flex-end; padding-bottom:5px; }
.mobile-app .bottom-nav .home-logo-animation { position:absolute; top:-22px; left:50%; width:58px; height:50.1746px; margin:0; transform:translateX(-50%); filter:drop-shadow(0 2px 3px #07162b88); }
.mobile-app .bottom-nav button > span, .mobile-app .bottom-nav .home > span { margin:0; color:inherit; font-size:12px; line-height:1.2; font-weight:650; white-space:normal; text-align:center; }
.mobile-app .bottom-nav button.active { color:#f5d48b; background:none; }
.mobile-app .bottom-nav button.active > img { filter: brightness(1.1); }
.mobile-app .bottom-nav .home.active .home-logo-animation { filter:drop-shadow(0 2px 4px #e2bd6b55); }
.mobile-app .bottom-nav button::after { bottom:2px; width:20px; height:2px; border-radius:3px; background:#eed291; box-shadow:none; }
.mobile-app .header button:hover, .mobile-app .home-carousel button:hover, .mobile-app .bottom-nav button:hover { color: #ffefc4; transform: none; }
.mobile-app .header-login:hover { color: #4a371d; filter: brightness(1.06); }
.mobile-app .game-card button:hover { color: #fff0c8; box-shadow: 0 9px 20px #0008,0 0 14px #ad8b5722; }
.mobile-app .game-card button { transition: transform .22s ease, box-shadow .22s ease,filter .22s ease; }
.mobile-app .tap-feedback { animation: none; }
.mobile-app .game-card button:active { transform: scale(.975); }
.mobile-app .bottom-nav button:active { background:#ffffff08; }
.mobile-app :is(button,a):focus-visible { outline: 2px solid #f3dba2; outline-offset: 3px; }
.toast { bottom: calc(70px + env(safe-area-inset-bottom,0px)); }
/* On larger screens, keep the public site at its phone width and extend the royal hall behind it. */
@media (min-width:481px) {
  body:has(.mobile-app:not([hidden])) { min-height:100vh; background-color:#06162e; background-image:linear-gradient(90deg,#020a19c9,#020a1980 30%,#020a1980 70%,#020a19c9),url("assets/01_background/desktop-royal-hall.webp"); background-position:center top; background-size:100% 100%,cover; background-repeat:no-repeat; }
  .mobile-app:not([hidden]) { box-shadow:0 0 0 1px #d9ad6545,0 0 70px #000c; }
}
/* Shared phone presentation at every viewport width. */
  .mobile-app .bottom-nav button > span { text-shadow:0 1px 3px #000; }
  .mobile-app .header-logo-animation { transform:translate(-6px,3px); }
  .mobile-app .game-content::before { filter:brightness(.84) saturate(.84); }
  .mobile-app .game-content::after { background:linear-gradient(155deg,#102b48f5,#07172bf7); }
  .mobile-app .game-content > .empty-state { min-height:136px; padding:18px 12px; }
  .mobile-app .game-content > .empty-state p { color:#c7d3e4; font-size:13px; font-weight:400; }
  .mobile-app .category-heading .game-count { color:#aabbd1; }
  /* Mobile home artwork continues behind the frameless member header. */
  .mobile-app.lobby-view {
    min-height:100svh;
    background:linear-gradient(180deg,#06152b26,#06132661 38%,#020b18a6 100%) center top / 100% 100% no-repeat, #031322 url("assets/01_background/mobile-royal-hall-v2.webp") center top / cover no-repeat;
  }
  .mobile-app.lobby-view .header { z-index:2; isolation:isolate; background:transparent; border:0; border-radius:0; box-shadow:none; }
  /* One continuous header surface follows the same curve as its gold edge, behind the controls. */
  .mobile-app.lobby-view .header::after { content:""; position:absolute; z-index:-1; pointer-events:none; inset:0 0 -14px; width:auto; height:auto; border-bottom:2px solid #e0bf7c; border-radius:0 0 50% 50% / 0 0 22px 22px; background:radial-gradient(ellipse at 28% -25%,#23517e8c,transparent 66%),linear-gradient(180deg,#071a36fa,#092448fa 64%,#071932fc); box-shadow:0 3px 8px #020a1680; }
  .mobile-app.lobby-view .member-username,
  .mobile-app.lobby-view .wallet-amount { text-shadow:0 1px 3px #031322,0 2px 8px #031322; }
  .mobile-app.lobby-view .site-footer,
  .mobile-app.lobby-view .site-footer a { color:#e3e8f1; text-shadow:0 1px 4px #031322; }
  .mobile-app .member-summary:has(.wallet-amount.is-compact) .wallet-panel { grid-column: 1 / -1; }
  .mobile-app .member-summary:has(.wallet-amount.is-compact) .member-brand-panel { grid-column: 1 / -1; }
@media (max-width:359px) {
  .mobile-app .header { padding-inline: 10px; gap: 6px; }
  .mobile-app .header:not(.is-member) > .brand { width:150px; height:54px; flex-basis:150px; }
  .mobile-app .member-summary { grid-template-columns:minmax(0,150px) minmax(0,1fr); }
  .mobile-app .header-login { padding-inline: 9px; }
}
/* Compact the crowded top row only on 360–380px phones; 393px stays unchanged. */
@media (min-width:360px) and (max-width:380px) {
  .mobile-app.lobby-view .header:not(.is-member) { min-height:56px; padding-block:5px; }
  .mobile-app.lobby-view .header:not(.is-member) > .brand { width:115px; height:46px; flex-basis:115px; }
  .mobile-app.lobby-view .header-login { min-height:36px; padding-inline:8px; border-radius:8px; font-size:12px; }
  .mobile-app.lobby-view .header-login svg { width:14px; height:14px; }
  .mobile-app.lobby-view .header.is-member { min-height:56px; padding-block:5px; }
  .mobile-app.lobby-view .member-summary { grid-template-columns:minmax(0,115px) minmax(0,1fr); }
  .mobile-app.lobby-view .member-logo { max-width:115px; height:46px; }
  .mobile-app.lobby-view .member-identity { min-height:20px; }
}
/* Give the larger Pro Max viewport more of its width to the artwork and controls. */
@media (min-width:430px) and (max-width:480px) {
  .mobile-app { --nav-height:118px; }
  .mobile-app.lobby-view .header:not(.is-member),
  .mobile-app.lobby-view .header.is-member { min-height:92px; padding-block:6px; }
  .mobile-app.lobby-view .header:not(.is-member) > .brand { width:200px; height:80px; flex-basis:200px; }
  .mobile-app.lobby-view .header-login { min-height:48px; font-size:16px; }
  .mobile-app.lobby-view .member-summary { grid-template-columns:minmax(0,200px) minmax(0,1fr); gap:6px; }
  .mobile-app.lobby-view .member-logo { max-width:200px; height:80px; }
  .mobile-app.lobby-view .member-username { font-size:14px; }
  .mobile-app.lobby-view .wallet-amount { font-size:29px; }
  .mobile-app.lobby-view .member-summary .wallet-coin { width:32px; height:32px; flex-basis:32px; }
  .mobile-app.lobby-view .carousel-frame { height:clamp(235px,55cqw,260px); }
  .mobile-app.lobby-view .carousel-copy,
  .mobile-app.lobby-view .carousel-copy.copy-right { width:60%; }
  .mobile-app.lobby-view .carousel-copy > span { font-size:11px; }
  .mobile-app.lobby-view .carousel-copy > strong { font-size:23px; letter-spacing:0; }
  .mobile-app.lobby-view .carousel-copy > small { font-size:13px; }
  .mobile-app.lobby-view #lobby { padding-inline:6px; }
  .mobile-app.lobby-view .featured-entry { width:calc(100% + 12px); max-width:none; margin-left:-6px; }
  .mobile-app.lobby-view .more-games-section { padding-inline:2px; margin-top:16px; }
  .mobile-app.lobby-view .more-games-grid { gap:8px; }
  .mobile-app.lobby-view .more-game-preview > span { font-size:22px; }
  .mobile-app .bottom-nav { min-height:74px; bottom:calc(6px + env(safe-area-inset-bottom,0px)); }
  .mobile-app .bottom-nav::before { top:-18px; width:100px; height:21px; }
  .mobile-app .bottom-nav::after { background:linear-gradient(90deg,#e5c47f 0 calc(50% - 50px),transparent calc(50% - 50px) calc(50% + 50px),#e5c47f calc(50% + 50px)); }
  .mobile-app .bottom-nav button { min-height:68px; }
  .mobile-app .bottom-nav button:not(:last-child)::before { top:13px; bottom:13px; }
  .mobile-app .bottom-nav button > :is(img,svg) { width:32px; height:32px; }
  .mobile-app .bottom-nav button > span { font-size:15px; font-weight:750; }
  .mobile-app .bottom-nav .home-logo-animation { width:78px; height:67.4717px; top:-33px; }
  .mobile-app .bottom-nav .home > span { font-size:16px; }
}
/* Native WebP logos retain the requested continuous loop independently of CSS motion effects. */
@media (prefers-reduced-motion:reduce) {
  .mobile-app *, .mobile-app *::before, .mobile-app *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
}
.game-player[hidden] { display:none !important; }
.game-player:not([hidden]) { position:fixed; z-index:10000; inset:0; display:grid; grid-template-rows:54px minmax(0,1fr); width:100%; height:100vh; height:100dvh; overflow:hidden; background:#05080d; color:#fff; }
.game-player-toolbar { z-index:1; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; padding:calc(env(safe-area-inset-top,0px) + 5px) max(12px,env(safe-area-inset-right,0px)) 5px max(12px,env(safe-area-inset-left,0px)); min-height:54px; background:#101a28; border-bottom:1px solid #ffffff24; }
.game-player-title { overflow:hidden; color:#dce7f5; font-size:13px; font-weight:650; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
.game-player-control { display:inline-flex; align-items:center; justify-self:start; gap:7px; min-height:38px; padding:0 12px; border:1px solid #ffffff30; border-radius:9px; background:#ffffff12; color:#fff; font:inherit; font-size:14px; cursor:pointer; }
.game-player-control span:first-child { font-size:19px; line-height:1; }
.game-player-fullscreen { justify-self:end; }
.game-player-control:focus-visible { outline:2px solid #f1cf83; outline-offset:2px; }
#game-player-frame { display:block; width:100%; height:100%; min-height:0; border:0; background:#000; }
body.game-player-open { overflow:hidden; }
@media (max-width:600px) {
 .game-player:not([hidden]) { grid-template-rows:calc(50px + env(safe-area-inset-top,0px)) minmax(0,1fr); }
 .game-player-toolbar { min-height:calc(50px + env(safe-area-inset-top,0px)); gap:5px; padding-bottom:3px; }
 .game-player-control { min-height:36px; gap:4px; padding-inline:9px; font-size:13px; }
 .game-player-title { font-size:11px; }
}
