/* Approved illustrated portal theme. Game canvas sizing and control geometry stay in style.css. */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6fffb;
  --panel: #ffffff;
  --panel2: #eff8f6;
  --line: #d7e6eb;
  --ink: #080b17;
  --muted: #465573;
  --lime: #cefa6b;
  --gold: #806017;
  --blue: #007fba;
  --accent: #418600;
  --accent-border: #8cdb00;
  --hover: #effadd;
  --glass: #ffffffec;
  --shadow: 0 5px 15px #0c6c7a0d;
  --hero-art: url('/theme-home-light.webp');
  --lobby-art: url('/theme-lobby-light.webp');
  --solo-art: url('/theme-solo-light.webp');
  --friends-art: url('/theme-friends-light.webp');
  --tournament-art: url('/theme-tournament-light.webp');
  --membership-art: url('/theme-membership-light.webp');
  --records-art: url('/theme-records-light.webp');
  --radius: 18px;
  font-family: Arial, Helvetica, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071b22;
  --panel: #102831;
  --panel2: #15343c;
  --line: #31515d;
  --ink: #f4f8fc;
  --muted: #b4c8d6;
  --lime: #d5ff79;
  --gold: #ffe287;
  --blue: #6de5ed;
  --accent: #d5ff79;
  --accent-border: #b4ec5d;
  --hover: #203d3c;
  --glass: #0a2029f5;
  --shadow: 0 7px 24px #00000026;
  --hero-art: url('/theme-home-dark.webp');
  --lobby-art: url('/theme-lobby-dark.webp');
  --solo-art: url('/theme-solo-dark.webp');
  --friends-art: url('/theme-friends-dark.webp');
  --tournament-art: url('/theme-tournament-dark.webp');
  --membership-art: url('/theme-membership-dark.webp');
  --records-art: url('/theme-records-dark.webp');
}
body { background: var(--bg); color: var(--ink); font-family: Arial, Helvetica, sans-serif; font-size: 15px; }
button, input, select, textarea { font-family: inherit; }
button { border-color: var(--line); border-radius: 12px; }
button:hover:not(:disabled) { color: var(--ink); background: var(--hover); border-color: var(--accent-border); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.primary { color: #102000; background: var(--lime); border: 1px solid var(--accent-border); border-radius: 12px; font-weight: 700; }
.primary:hover:not(:disabled) { color: #102000; background: #dbff95; border-color: var(--accent-border); }
.secondary, .quiet { color: var(--ink); background: var(--panel); border-color: var(--line); }
.text-button, .back-link { color: var(--ink); font-size: 13px; }
.text-button:hover:not(:disabled), .back-link:hover:not(:disabled) { color: var(--accent); }
.muted, .fine-print, .panel p { color: var(--muted); }
.fine-print { font-size: 12px; }
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: 2px; font-weight: 700; }
.panel, .market-table, .mode-card, .friends-card, .cup-card, .continue-card, .metric-card, .admin-status-strip, .empty-state, .account-pending, .account-onboarding, .history-row { background: var(--panel); border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
input, select, textarea { color: var(--ink); background: var(--panel); border-color: var(--line); border-radius: 10px; font-size: 14px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.pill, .badge { color: var(--accent); border-color: var(--line); background: var(--panel2); }
.site-header { max-width: none; min-height: 82px; height: auto; padding: 14px max(32px, calc((100vw - 1328px) / 2)); border-color: var(--line); background: var(--glass); gap: 20px; position: relative; z-index: 5; margin-bottom: 0; }
.brand { flex-shrink: 0; }
.brand-wordmark { width: 220px; height: auto; display: block; }
.brand-wordmark text { fill: var(--ink); }
.site-header nav { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.site-header .nav-link { font-size: 14px; padding: 12px 14px; color: var(--muted); white-space: nowrap; }
.site-header .nav-link.active { color: var(--ink); background: var(--hover); box-shadow: inset 0 0 0 1px var(--accent-border); border-radius: 12px; }
.language-control select, .theme-control select { min-height: 44px; max-width: 130px; width: auto; margin: 0; padding: 10px 12px; font-size: 13px; }
.theme-control { margin: 0; }
.profile-button { background: var(--panel); padding: 12px 18px; min-height: 46px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.profile-dot { background: #86cf00; }
.portal-menu { display: none; }
.site-header > [data-account-nav] { font-size: 12px; white-space: nowrap; }
main { max-width: 1328px; margin: 0 auto; padding: 32px 0 48px; }
.page-title, .page-heading h1 { font-size: clamp(34px, 4vw, 56px); font-weight: 800; letter-spacing: -.045em; }
h1, h2, h3 { color: var(--ink); }
.page:not(.landing-page):not(.play-page):not(.intro-page):not(#page-game):not(#page-open):not(#page-tutorial):not(#page-honour) > .section-heading { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
/* The home artwork is one full scene, with actual HTML copy and controls above it. */
body[data-view="home"] main { padding-top: 0; }
.classic-hero { position: relative; isolation: isolate; display: block; min-height: 590px; padding: 60px 0 48px; margin: 0; }
.classic-copy { width: 53%; max-width: 710px; position: relative; z-index: 1; }
.classic-copy h1 { font: 800 clamp(43px, 4.6vw, 70px)/1.02 Arial, Helvetica, sans-serif; letter-spacing: -.055em; margin: 22px 0; }
.classic-copy h1 em { display: block; font: inherit; font-style: normal; color: var(--blue); letter-spacing: inherit; }
.classic-copy > p { max-width: 590px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.classic-copy .welcome-bonus { display: none; }
.classic-copy .hero-actions { display: flex; flex-wrap: nowrap; margin: 24px 0 16px; gap: 12px; }
.classic-copy .hero-actions button { min-height: 56px; font-size: 16px; padding: 15px 24px; justify-content: center; }
.classic-copy .hero-actions .primary { flex: 1.5; }
.classic-copy .hero-actions .secondary { flex: 1; }
.classic-copy .welcome-bonus-terms, .classic-copy .classic-note { font-size: 12px; line-height: 1.5; margin: 5px 0; max-width: 590px; color: var(--muted); }
.classic-copy .classic-note { margin-top: 8px; }
.classic-how { margin-top: 16px; font-size: 14px; text-decoration: underline; text-underline-offset: 5px; }
.classic-board { position: absolute; z-index: -1; inset: 0 calc((1328px - 100vw) / 2); border: 0; padding: 0; border-radius: 0; box-shadow: none; background: var(--bg); overflow: hidden; }
.classic-board img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 0; }
.landing-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; border: 0; padding: 38px 0 48px; }
.landing-modes > .eyebrow { display: none; }
.landing-modes > h2 { grid-column: 1 / -1; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; font-weight: 800; letter-spacing: -.05em; margin: 0 0 6px; }
.landing-mode-row { display: flex; flex-direction: column; align-items: stretch; gap: 0; border: 0; padding: 0; }
.landing-mode-art { width: 100%; height: 166px; object-fit: cover; border-radius: 14px; margin-bottom: 16px; }
.landing-mode-row h3 { font-size: 27px; font-weight: 800; letter-spacing: -.045em; margin: 0 0 6px; }
.landing-mode-row p { color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 34em; }
.landing-mode-row .text-button { align-self: flex-start; color: var(--accent); text-decoration: underline; text-underline-offset: 5px; font-size: 14px; margin-top: 8px; }
.classic-steps { border-color: var(--line); padding-block: 28px; }
.classic-steps b { color: var(--accent); }
.classic-stakes { border-color: var(--line); padding-block: 52px; }
.classic-stakes figure { background: var(--panel); border-color: var(--line); border-radius: 16px; padding: 12px; }
.classic-stakes h2 { font-weight: 800; }
.classic-stakes p, .classic-stakes dd, .classic-stakes figcaption { color: var(--muted); }
.classic-stakes dl > div { border-color: var(--line); }
.classic-stakes dt { color: var(--accent); }
.membership-section { border-top: 1px solid var(--line); padding-top: 44px; }
.membership-section > h2 { font-size: 36px; letter-spacing: -.04em; margin: 10px 0 16px; max-width: 700px; }
.membership-grid .panel { padding-top: 132px; background: var(--membership-art) top center / 100% 120px no-repeat, var(--panel); }
.membership-featured { border-color: var(--accent-border); }
.landing-faq { border-color: var(--line); max-width: 900px; padding-top: 42px; }
.landing-faq details { border-color: var(--line); }
.landing-faq p { color: var(--muted); }
/* Lobby: illustrated mode choice followed by the existing selected panel. */
.play-page { max-width: none; margin: 0; }
.lobby-heading { position: relative; min-height: 222px; padding: 28px 8px 28px; background: var(--lobby-art) center / cover no-repeat; border-radius: 20px; display: flex; align-items: center; }
.lobby-heading > div:first-child { flex: 1; position: relative; }
.lobby-heading h1 { font-size: clamp(40px, 4.5vw, 66px); font-weight: 800; line-height: 1.04; letter-spacing: -.055em; margin: 12px 0 10px; }
.lobby-heading h1 em { color: var(--blue); font-style: normal; }
.lobby-heading p { color: var(--ink); font-size: 19px; margin: 0; }
.lobby-status { max-width: 260px; margin: 0 8px 0 24px; background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 18px; font-size: 13px; box-shadow: var(--shadow); gap: 10px; align-items: stretch; }
.lobby-status .text-button { color: var(--ink); background: var(--lime); border: 1px solid var(--accent-border); border-radius: 10px; padding: 9px 14px; text-align: center; color: #102000; font-size: 14px; font-weight: 700; }
.lobby-launch-grid { gap: 16px; margin: 18px 0 20px; }
.lobby-launch-card { display: flex; flex-direction: column; position: relative; min-width: 0; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.lobby-launch-card:hover { background: var(--panel) !important; border-color: var(--accent-border); box-shadow: 0 5px 20px #7bcf0020; }
.lobby-launch-card[aria-pressed="true"] { border-color: var(--accent-border); box-shadow: 0 0 0 1px var(--accent-border), 0 6px 22px #7bcf0020; }
.lobby-launch-card .launch-visual { height: 164px; flex-shrink: 0; min-height: 0; width: 100%; border: 0; background: var(--panel2); border-radius: 10px; overflow: hidden; display: block; }
.launch-visual::after { display: none; }
.launch-visual img { opacity: 1; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.lobby-launch-card .launch-copy { display: grid; padding: 12px 4px 0; gap: 6px; width: 100%; }
.lobby-launch-card .launch-copy .eyebrow { position: absolute; top: 22px; left: 22px; font-size: 9px; color: var(--muted); background: var(--glass); padding: 8px 10px; border-radius: 9px; letter-spacing: 1px; }
.launch-copy strong { font-size: 31px; font-weight: 800; letter-spacing: -.05em; }
.launch-copy small { display: block; color: var(--muted); font-size: 16px; }
.launch-cta { height: auto; font-size: 13px; color: var(--muted); border-color: var(--line); padding-top: 12px; margin-top: 6px; }
.launch-friends .launch-cta { color: var(--muted); }
.launch-selection { color: var(--accent); }
.play-page .lobby-mode-panel { background: var(--panel); border-color: var(--line); border-radius: 18px; padding: 26px; margin: 0 0 18px; min-height: 260px; box-shadow: var(--shadow); }
.play-page #market-section { background: var(--tournament-art) center / cover no-repeat, var(--panel); }
.play-page #market-section > .section-heading { align-items: flex-start; margin-bottom: 12px; padding: 0; border: 0; }
.play-page .lobby-mode-panel h2 { font-size: 35px; font-weight: 800; letter-spacing: -.045em; margin: 10px 0; }
.lobby-board-choice { flex: 0 0 260px; max-width: 300px; margin-left: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); padding: 8px 12px; font-size: 14px; }
.lobby-board-choice select { min-height: 44px; background: var(--panel); }
.play-page .market-tables { margin: 0; }
.membership-table { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px 30px; background: transparent; box-shadow: none; padding: 0; }
.membership-table .queue-intro { max-width: 350px; }
.membership-table .queue-intro > .eyebrow, .membership-table .queue-intro > h3 { display: none; }
.membership-table .queue-intro > p { color: var(--ink); line-height: 1.5; font-size: 15px; margin-top: 0; background: var(--glass); padding: 8px 10px; border-radius: 9px; }
.membership-table > .primary { align-self: start; justify-content: center; min-height: 52px; margin: 0; font-size: 15px; }
.membership-table > .queue-start { grid-column: 1; font-size: 11px; color: var(--muted); background: var(--glass); border-radius: 8px; padding: 6px 10px; margin: 0; max-width: 350px; }
.membership-table > .lobby-more { grid-column: 1 / -1; }
.play-page .lobby-more { background: var(--glass); padding: 0 10px; border-radius: 9px; margin-top: 12px; }
.play-page .lobby-more summary { font-size: 12px; color: var(--muted); }
.play-page .lobby-more p { color: var(--muted); }
.play-page #world-section { background: var(--solo-art) right center / auto 100% no-repeat, var(--panel); padding-right: 43%; }
.play-page #world-section .content-actions { gap: 10px; }
.play-page #friends-section { background: var(--friends-art) right center / auto 100% no-repeat, var(--panel); }
.play-page #friends-section > .section-heading, .play-page #friends-section > .mode-cards { max-width: 650px; }
.play-page .mode-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
.play-page .mode-card { min-height: 95px; background: var(--glass); border-color: var(--line); padding: 14px 16px; }
.play-page .mode-card:hover { background: var(--hover) !important; }
.play-page .mode-card.selected { border-color: var(--accent-border); }
.play-page .mode-card h3 { color: var(--ink); font-size: 20px; }
.play-page .mode-card p, .card-meta { color: var(--muted); }
.play-page .friends-card { box-shadow: none; background: var(--glass); border: 1px solid var(--line); padding: 18px; border-radius: 12px; }
.play-page .friends-card > .secondary { background: var(--lime); color: #102000; border-color: var(--accent-border); border-radius: 10px; }
.play-page .explore-section { padding: 0; margin: 12px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.play-page .explore-section > summary { min-height: 64px; padding: 20px; font-size: 15px; font-weight: 700; }
.play-page .explore-section > summary > span { color: var(--muted); font-weight: 400; }
.play-page .explore-section > section { margin: 0 18px 18px; }
/* Calm utility surfaces, dialogs and readable data. */
#page-lobby > .section-heading { padding-right: 35%; min-height: 190px; background: var(--friends-art) right center / auto 100% no-repeat; border-radius: 18px; padding-left: 22px; }
#page-history > .section-heading { min-height: 180px; padding: 20px 40% 20px 22px; background: var(--records-art) right center / auto 100% no-repeat; border-radius: 18px; }
.guide-layout .panel, .guide-aside, .admin-economy .panel, .payment-status, .admin-workspace, .lobby-player, .social-intro, .guest-result-invite { background: var(--panel); border-color: var(--line); color: var(--ink); }
.guide-layout h2, .panel h2 { font-weight: 750; }
.guide-layout p, .lobby-note p { color: var(--muted); }
.ledger-list div, #profile-country-form { border-color: var(--line); }
#page-feedback { max-width: 900px; margin: auto; }
#page-admin .admin-section-label { margin-top: 30px; }
#page-admin .panel { margin-bottom: 18px; }
#page-admin .metric-card { background: var(--panel); }
#page-admin :is(table, th, td), #page-history :is(table, th, td) { border-color: var(--line); }
.site-footer { max-width: 1328px; margin: 0 auto; padding: 26px 0; color: var(--muted); border-color: var(--line); font-size: 11px; flex-wrap: wrap; }
.site-footer .brand-wordmark { width: 170px; }
.footer-links .text-button { font-size: 11px; }
dialog { background: var(--panel); color: var(--ink); border-color: var(--line); border-radius: 22px; box-shadow: 0 25px 100px #00192755; max-height: calc(100dvh - 32px); overflow-y: auto; }
dialog::backdrop { background: #001322b8; backdrop-filter: blur(5px); }
dialog h2 { font-weight: 800; }
dialog p, dialog label, .verification-panel p, .marketing-choice p { color: var(--muted); }
dialog details { border-color: var(--line); }
#notice { background: var(--panel); color: var(--ink); border-color: var(--accent-border); }
.beta-strip { background: var(--panel2); border-color: var(--line); color: var(--ink); }
/* Only the surrounding game chrome changes color. Canvas and controller layout remains owned by the game. */
.board-card, .board-top, .board-bottom, .pot-card, .seats, .activity, .decision, body.game-focus .decision, .overlay-box { color: var(--ink); background: var(--panel); border-color: var(--line); }
.board-top, .board-bottom, .section-title, .seat small { color: var(--muted); }
.overlay-box p, .decision p { color: var(--muted); }
.bet-panel, .betting .bet-panel { background: var(--panel2); border-color: var(--accent-border); }
.bet-heading { color: var(--ink); }
.bet-heading span, .decision h3 small { color: var(--accent); }
#page-intro { color: var(--ink); }
body[data-view="intro"] #page-intro { background: var(--bg); }
.connection-readiness, .connection-readiness-game details[open] > .connection-detail { color: var(--muted); background: var(--panel); border-color: var(--line); }
#open-countdown:not([hidden]) { color: var(--ink); background: var(--panel); border-color: var(--accent-border); }
@media (max-width: 1424px) {
  main, .site-footer { margin-inline: 40px; }
  .classic-board { inset-inline: -40px; }
  .site-header { padding-inline: 40px; gap: 12px; }
  .brand-wordmark { width: 200px; }
  .site-header .nav-link { font-size: 13px; padding-inline: 10px; }
  .language-control select, .theme-control select { max-width: 115px; font-size: 12px; padding-inline: 8px; }
}
@media (max-width: 1150px) {
  .site-header { gap: 10px; flex-wrap: wrap; }
  .site-header nav { order: 3; width: 100%; justify-content: center; margin: 0; border: 0; padding: 0; }
  .brand { margin-right: auto; }
  .classic-copy { width: 57%; }
  .classic-copy h1 { font-size: 52px; }
  .classic-copy > p { font-size: 16px; }
  .lobby-heading h1 { font-size: 49px; }
  .lobby-heading p { font-size: 16px; }
  .launch-copy strong { font-size: 27px; }
  .launch-copy small { font-size: 14px; }
  .lobby-launch-card .launch-visual { height: 145px; }
}
@media (max-width: 760px) {
  main, .site-footer { margin-inline: 20px; }
  main { padding-top: 22px; }
  .site-header, body[data-view="home"] .site-header { padding: 14px 20px; min-height: 76px; height: auto; gap: 10px; margin-bottom: 0; }
  .brand-wordmark { width: 174px; }
  .profile-button { font-size: 12px; min-height: 44px; padding: 9px 12px; }
  .portal-menu { display: block; min-height: 44px; padding: 9px 12px; font-size: 12px; }
  .site-header nav, .site-header > .language-control, .site-header > .theme-control, .site-header > [data-account-nav] { display: none; }
  .site-header.menu-open nav { display: flex; flex-direction: column; width: 100%; align-items: stretch; gap: 5px; order: 5; padding-top: 12px; border-top: 1px solid var(--line); }
  .site-header.menu-open > .language-control, .site-header.menu-open > .theme-control { display: block; order: 4; margin: 8px 0 0; width: calc(50% - 5px); }
  .site-header.menu-open > .language-control select, .site-header.menu-open > .theme-control select { width: 100%; max-width: none; font-size: 14px; }
  .site-header.menu-open > [data-account-nav]:not([hidden]) { display: block; order: 6; width: 100%; text-align: left; }
  .site-header .nav-link { font-size: 14px; text-align: left; min-height: 44px; padding: 12px; }
  .classic-hero { padding: 32px 0 0; min-height: 0; display: flex; flex-direction: column; }
  .classic-copy { display: flex; flex-direction: column; width: 100%; max-width: none; }
  .classic-copy > .eyebrow { order: 0; font-size: 10px; letter-spacing: 1.8px; }
  .classic-copy > h1 { order: 1; font-size: clamp(38px, 9.4vw, 64px); line-height: 1.02; margin: 19px 0 22px; letter-spacing: -.06em; }
  .classic-copy > p:not([class]) { order: 2; font-size: 16px; line-height: 1.6; max-width: none; }
  .classic-copy > .hero-actions { order: 3; margin: 23px 0 15px; display: flex; flex-direction: column; width: 100%; gap: 10px; }
  .classic-copy .hero-actions button { width: 100%; font-size: 17px; min-height: 54px; }
  .classic-copy > .classic-note { order: 4; }
  .classic-copy > .welcome-bonus-terms { order: 5; margin: 6px 0 0; }
  .classic-copy > .classic-how { order: 6; align-self: flex-start; margin-top: 12px; }
  .classic-copy > .landing-settings { order: 7; }
  .classic-board { display: block; position: relative; inset: auto; width: calc(100% + 40px); margin: 0 -20px; height: auto; aspect-ratio: 1.35; z-index: 0; overflow: hidden; }
  .classic-board img { width: 100%; height: 100%; object-fit: cover; object-position: 72% center; }
  .landing-modes { grid-template-columns: 1fr; gap: 26px; padding: 28px 0; }
  .landing-modes > h2 { font-size: 35px; margin-bottom: 0; }
  .landing-mode-row { display: grid; grid-template-columns: 1fr; padding: 0; gap: 0; }
  .landing-mode-art { height: auto; aspect-ratio: 2; margin-bottom: 14px; }
  .landing-mode-row .text-button { grid-column: 1; }
  .landing-mode-row h3 { font-size: 26px; }
  .classic-steps { gap: 12px; padding-block: 24px; }
  .classic-stakes { padding-block: 32px; gap: 24px; }
  .classic-stakes h2 { font-size: 31px; }
  .membership-section > h2 { font-size: 31px; }
  .lobby-heading { min-height: 236px; display: block; padding: 12px 0 0; border-radius: 0; background-position: 60% center; background-size: cover; }
  .lobby-heading > div:first-child { max-width: 78%; }
  .lobby-heading h1 { font-size: clamp(38px, 10vw, 64px); line-height: 1.02; margin: 14px 0; }
  .lobby-heading p { font-size: 17px; line-height: 1.45; max-width: 240px; }
  .lobby-status { display: flex; flex-direction: row; align-items: center; justify-content: space-between; max-width: none; width: fit-content; max-width: 100%; margin: 18px 0 0; padding: 9px 12px; gap: 12px; font-size: 11px; box-shadow: none; }
  .lobby-status .text-button { font-size: 11px; min-height: 36px; padding: 7px 10px; }
  .lobby-launch-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 20px 0 24px; }
  .lobby-launch-card { min-height: 218px; display: flex; flex-direction: column-reverse; padding: 0; overflow: hidden; border-radius: 18px; }
  .lobby-launch-card .launch-visual { height: 150px; border: 0; border-radius: 0; width: 100%; }
  .lobby-launch-card .launch-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 18px 20px 14px; gap: 5px 12px; width: 100%; }
  .lobby-launch-card .launch-copy .eyebrow { display: none; }
  .launch-copy strong { font-size: 29px; line-height: 1.1; }
  .launch-copy small { display: block; font-size: 15px; grid-column: 1; }
  .launch-cta { display: flex; grid-column: 2; grid-row: 1 / 3; align-self: center; padding: 0; margin: 0; border: 0; font-size: 0; height: auto; }
  .launch-cta b { font-size: 24px; line-height: 1; }
  .launch-selection { visibility: visible; color: var(--muted); }
  [aria-pressed="true"] .launch-selection { color: var(--accent); }
  .play-page .lobby-mode-panel { min-height: 0; padding: 22px 18px; margin-bottom: 20px; }
  .play-page .lobby-mode-panel h2 { font-size: 32px; line-height: 1.1; margin: 12px 0; }
  .play-page #market-section { background-position: center center; padding-top: 22px; }
  .play-page #market-section > .section-heading { display: block; margin-bottom: 150px; }
  .lobby-board-choice { margin: 18px 0 0; max-width: 320px; min-width: 0; padding: 7px 10px; font-size: 13px; }
  .membership-table { display: block; background: transparent; }
  .membership-table .queue-intro { display: none; }
  .membership-table > .primary { width: 100%; min-height: 54px; font-size: 16px; margin-top: 12px; }
  .membership-table > .queue-start { margin: 12px 0 0; max-width: none; font-size: 11px; }
  .play-page #world-section { background-position: center top; background-size: 100% auto; padding: 180px 18px 22px; }
  .play-page #world-section .content-actions > button { width: 100%; }
  .play-page #friends-section { background-position: center top; background-size: 100% auto; padding-top: 185px; }
  .play-page .mode-card { padding: 12px; min-height: 90px; }
  .play-page .mode-card h3 { font-size: 18px; }
  .play-page .mode-card p { font-size: 12px; min-height: 0; }
  .play-page .friends-card { display: flex; padding: 14px; }
  .play-page .friends-card > .secondary, .play-page .friends-card > .text-button { width: 100%; min-width: 0; margin-left: 0; }
  .play-page .explore-section > summary { padding: 17px; font-size: 14px; min-height: 56px; }
  #page-lobby > .section-heading, #page-history > .section-heading { background-image: none; min-height: 0; padding: 0 0 18px; }
  .section-heading { gap: 14px; }
  .page-title { font-size: 36px; }
  .site-footer { gap: 18px; padding-block: 24px; align-items: flex-start; }
  .site-footer .brand-wordmark { width: 155px; }
  .site-footer > span { flex: 1; text-align: right; }
  .site-footer .footer-links { width: 100%; gap: 20px; }
  .site-footer #storage-status { display: block; width: 100%; text-align: left; font-size: 10px; }
  dialog { padding: 24px; border-radius: 18px; }
}
@media (max-width: 390px) {
  .site-header, body[data-view="home"] .site-header { padding-inline: 14px; gap: 7px; }
  .brand-wordmark { width: 150px; }
  .profile-button { padding-inline: 9px; font-size: 11px; }
  .portal-menu { padding-inline: 9px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .lobby-launch-card, button { transition: none; }
}
/* Crops use the illustrated half of the shared scene inside compact mode cards. */
.landing-mode-art { object-position: 80% center; }
.lobby-launch-card .launch-visual img { width: 145%; max-width: none; transform: translateX(-31%); object-position: right center; }
.lobby-heading { background-position: center 76%; }
.classic-copy h1 em, .lobby-heading h1 em {
  background: linear-gradient(105deg, #87cf00 2%, #0ba697 54%, #009bd0 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="dark"] .classic-copy h1 em, :root[data-theme="dark"] .lobby-heading h1 em {
  background-image: linear-gradient(105deg, #d6ff75, #8af4cc 54%, #67e9ff);
}
@media (max-width: 760px) {
  .lobby-heading { background-position: 64% center; }
  .lobby-launch-card .launch-visual img { width: 145%; transform: translateX(-31%); }
  .launch-selection { visibility: hidden; }
  [aria-pressed="true"] .launch-selection { visibility: visible; }
}
@media (forced-colors: active) {
  .classic-copy h1 em, .lobby-heading h1 em { color: CanvasText; background: none; }
}
.landing-mode-visual { width: 100%; height: 166px; display: block; overflow: hidden; border-radius: 14px; margin-bottom: 16px; }
.landing-mode-visual .landing-mode-art { display: block; width: 145%; max-width: none; height: 100%; transform: translateX(-31%); object-fit: cover; object-position: right center; margin: 0; border-radius: 0; }
@media (max-width: 760px) {
  .landing-mode-visual { height: auto; aspect-ratio: 2; margin-bottom: 14px; }
}
/* Browser QA fixes: keep dynamic notices, semantic colors and illustrations readable. */
:root, :root[data-theme="light"] { --error-ink: #ab2824; --success-ink: #367000; --warning-ink: #805900; }
:root[data-theme="dark"] { --error-ink: #ffb6ae; --success-ink: #d5ff79; --warning-ink: #ffe287; }
.error, .form-error, .danger { color: var(--error-ink); }
.pot-card h2, .history-result.win, #cup-overview, #cup-position, .counting,
.account-balance strong, .profile-badge b, .seat.active .name::after { color: var(--success-ink); }
.warning { color: var(--warning-ink) !important; }
.warmup-bar, body.game-focus .reentry-panel, .lounge li,
.raise-presets button, .raise-editor, .lounge input, #raise-to { background: var(--panel2); color: var(--ink); border-color: var(--line); }
.lounge li b { color: var(--success-ink); }
#fold { color: var(--error-ink); border-color: var(--error-ink); }
.actions #raise { color: #102000; background: var(--lime); border-color: var(--accent-border); }
.actions #call { color: #102000; background: var(--lime); border-color: var(--accent-border); }
#allin { color: var(--warning-ink); border-color: var(--warning-ink); }
.bet-panel.is-turn { background: var(--panel2); }
.classic-copy .hero-actions { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: stretch; }
.classic-copy .hero-actions > button { grid-row: 1; min-width: 0; width: 100%; }
.classic-copy .hero-actions > .connection-readiness { grid-row: 2; grid-column: 1 / -1; padding: 8px 10px; margin: 0; border-radius: 8px; background: var(--glass); font-size: 11px; }
.classic-copy .hero-actions > .connection-readiness details { font-size: 11px; }
.classic-copy .hero-actions > .connection-readiness .connection-detail { margin-bottom: 0; }
#landing-free-play { color: #102000; background: var(--lime); border-color: var(--accent-border); font-weight: 700; }
#landing-free-play:hover:not(:disabled) { color: #102000; background: #dbff95; }
.site-header { flex-wrap: wrap; }
.site-header nav { min-width: 0; flex: 1 1 410px; flex-wrap: wrap; }
.site-header > * { max-width: 100%; }
.play-page #market-section { position: relative; isolation: isolate; background: var(--panel); }
.market-illustration { position: absolute; z-index: -1; top: 10px; left: 29%; right: 285px; height: 235px; overflow: hidden; pointer-events: none; }
.market-illustration img { display: block; position: absolute; right: 0; height: 100%; width: auto; max-width: none; object-fit: contain; }
.play-page #market-section > .section-heading h2 { font-size: 40px; }
.play-page #market-section .membership-table > .lobby-more { margin-top: 58px; }
@media (max-width: 1150px) and (min-width: 761px) {
  .site-header nav { flex: 1 1 100%; }
  .market-illustration { left: 29%; right: 245px; }
  .play-page #market-section > .section-heading h2 { font-size: 34px; }
}
@media (max-width: 760px) {
  .classic-copy .hero-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .classic-copy .hero-actions > button { grid-row: auto; }
  .classic-copy .hero-actions > .connection-readiness { grid-row: 3; }
  .site-header nav { flex: initial; }
  .lobby-heading { min-height: 245px; background-position: left top; background-size: auto 210px; }
  .lobby-heading > div:first-child { max-width: 70%; }
  .lobby-heading h1 { font-size: 40px; }
  .lobby-heading p { font-size: 16px; }
  .lobby-status { position: relative; }
  .lobby-launch-card .launch-copy small { display: block; grid-column: 1; font-size: 15px; line-height: 1.4; }
  .play-page #market-section > .section-heading { margin-bottom: 0; }
  .play-page #market-section > .section-heading h2 { font-size: 34px; }
  .market-illustration { position: relative; inset: auto; height: 215px; width: 100%; z-index: 0; }
  .market-illustration img { right: -5px; height: 100%; }
  .play-page #market-section .membership-table > .lobby-more { margin-top: 12px; }
}
/* Mobile home keeps the illustration and play action in the first viewport. */
@media (max-width: 760px) {
  .classic-hero { display: flex; flex-direction: column; padding-top: 22px; }
  .classic-copy { display: contents; }
  .classic-copy > * { order: 7; }
  .classic-copy > .eyebrow { order: 0; }
  .classic-copy > h1 { order: 1; margin: 14px 0 12px; }
  .classic-hero > .classic-board { order: 2; height: 185px; aspect-ratio: auto; flex: none; margin-block: 0; }
  .classic-hero > .classic-board img { object-fit: cover; object-position: right center; }
  .classic-copy > h1 + p { order: 3; font-size: 15px; line-height: 1.5; margin: 12px 0 0; max-width: none; }
  .classic-copy > .hero-actions { order: 4; margin: 18px 0 10px; }
  .classic-copy > .welcome-bonus-terms { order: 5; margin: 5px 0; }
  .classic-copy > .classic-note { order: 6; margin: 5px 0; }
  .classic-copy > .fine-print { order: 7; font-size: 12px; margin: 5px 0; }
  .classic-copy > .classic-how { order: 8; }
  .classic-copy > .landing-settings { order: 9; }
}
/* Final visual QA: remove inherited hero grid gaps and compact the table panel. */
@media (min-width: 761px) {
  .play-page #market-section { padding-block: 22px 16px; }
  .play-page #market-section > .section-heading { margin-bottom: 4px; }
  .play-page #market-section .membership-table { row-gap: 4px; }
  .play-page #market-section .membership-table > .lobby-more { margin-top: 12px; }
  .play-page #market-section > .lobby-more { margin-top: 4px; }
  .play-page #market-section .lobby-more summary { min-height: 30px; }
  .market-illustration { top: 0; left: 25%; right: 265px; height: 250px; }
  .market-illustration img { height: 100%; }
  .market-illustration {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 96%, transparent), linear-gradient(to bottom, transparent, #000 5%, #000 94%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 12%, #000 96%, transparent), linear-gradient(to bottom, transparent, #000 5%, #000 94%, transparent);
    mask-composite: intersect;
  }
}
@media (max-width: 760px) {
  #page-home .classic-hero { display: flex !important; flex-direction: column; gap: 0; align-items: stretch; }
  #page-home .classic-copy { display: contents; }
  #page-home .classic-copy > .eyebrow { order: 0; }
  #page-home .classic-copy > h1 { order: 1; margin: 14px 0 10px; }
  #page-home .classic-hero > .classic-board { order: 2; height: 185px; }
  #page-home .classic-copy > h1 + p { order: 3; margin: 10px 0 0; }
  #page-home .classic-copy > .hero-actions { order: 4; margin: 12px 0 10px; }
  #page-home .classic-copy > .welcome-bonus-terms { order: 5; }
  #page-home .classic-copy > .classic-note { order: 6; }
  #page-home .classic-copy > .fine-print { order: 7; }
}

/* The same mode panels become dedicated screens in the compact lobby. */
#page-play[data-lobby-layout="compact"][data-lobby-detail="false"] > .lobby-mode-panel { display: none; }
#page-play[data-lobby-layout="compact"][data-lobby-detail="true"] > :not(.lobby-mode-panel):not(.lobby-detail-heading) { display: none; }
.lobby-detail-heading { margin: 0 0 20px; scroll-margin-top: 20px; }
.lobby-detail-heading .back-link { min-height: 44px; font-size: 15px; }
.lobby-detail-heading h1 { margin: 8px 0 0; font-size: 34px; line-height: 1.1; }
.lobby-detail-heading h1:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
#page-play[data-lobby-layout="compact"][data-lobby-detail="true"] > .lobby-mode-panel { margin-top: 0; }

/* Focused games keep their dark surface even when the portal theme is light. */
body:is(.open-focus, .game-focus, [data-view="intro"]) {
  color-scheme: dark;
  --bg: #0a1220;
  --panel: #142238;
  --panel2: #1a2d43;
  --line: #49617f;
  --ink: #f4f8fc;
  --muted: #b4c8d6;
  --lime: #d5ff79;
  --gold: #ffe287;
  --blue: #6de5ed;
  --accent: #d5ff79;
  --accent-border: #b4ec5d;
  --hover: #20344b;
  --glass: #142238f5;
  --error-ink: #ffb6ae;
  --success-ink: #d5ff79;
  --warning-ink: #ffe287;
}
/* Normal portal flow owns its insets. Fixed game layouts already handle theirs. */
body:not(.open-focus):not(.game-focus):not([data-view="intro"]) .site-header {
  padding-top: calc(14px + env(safe-area-inset-top));
  padding-left: max(32px, calc((100vw - 1328px) / 2), env(safe-area-inset-left));
  padding-right: max(32px, calc((100vw - 1328px) / 2), env(safe-area-inset-right));
}
body:not(.open-focus):not(.game-focus):not([data-view="intro"]) .site-footer {
  padding-bottom: calc(26px + env(safe-area-inset-bottom));
}
@media (max-width: 1424px) {
  body:not(.open-focus):not(.game-focus):not([data-view="intro"]) .site-header {
    padding-left: max(40px, env(safe-area-inset-left));
    padding-right: max(40px, env(safe-area-inset-right));
  }
  body:not(.open-focus):not(.game-focus):not([data-view="intro"]) :is(main, .site-footer) {
    margin-left: max(40px, env(safe-area-inset-left));
    margin-right: max(40px, env(safe-area-inset-right));
  }
}
@media (max-width: 760px) {
  body:not(.open-focus):not(.game-focus):not([data-view="intro"]) .site-footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  body:not(.open-focus):not(.game-focus):not([data-view="intro"]) .site-header {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  body:not(.open-focus):not(.game-focus):not([data-view="intro"]) :is(main, .site-footer) {
    margin-left: max(20px, env(safe-area-inset-left));
    margin-right: max(20px, env(safe-area-inset-right));
  }
}
@media (max-width: 390px) {
  body:not(.open-focus):not(.game-focus):not([data-view="intro"]) .site-header {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
}

/* Notices follow the surrounding light/dark surface, including unfocused games. */
.play-message { color: var(--warning-ink); }
