/* Adult surfaces keep the public site's tokens, independently of the play theme. */
.gp-dialog { padding: 0; width: min(1040px, calc(100% - 40px)); max-height: calc(100dvh - 40px); border-radius: 24px; text-align: left; user-select: text; -webkit-user-select: text; }
.gp-dialog:not([open]) { display: none; }
.gp-frame { display: grid; grid-template-columns: minmax(0, 1fr) 364px; }
.gp-dialog--parents { width: min(960px, calc(100% - 40px)); }
.gp-main { min-width: 0; padding: 30px 36px; }
.gp-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-bottom: 27px; text-decoration: none; color: var(--tf-text); }
.gp-brand .tf-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 1.3rem; font-weight: 700; letter-spacing: -.05em; }
.gp-brand img { width: 28px; height: 28px; }
.gp-home-label { color: var(--tf-muted); font-size: .75rem; }
.gp-rail { min-width: 0; padding: 30px 31px; border-left: 1px solid var(--tf-border); background: color-mix(in srgb, var(--tf-bg) 25%, var(--tf-surface)); }
.gp-ad-host .tf-ad { margin: 0 auto; }
.gp-ad-host--mobile { display: none; }
.gp-ad-host:empty, .gp-ad-host:not(:has(.tf-ad:not([hidden]))) { display: none; }
.gp-dialog--parents:not(:has(.tf-ad:not([hidden]))) { width: min(596px, calc(100% - 40px)); }
.gp-dialog--parents:not(:has(.tf-ad:not([hidden]))) .gp-frame { grid-template-columns: minmax(0, 1fr); }
.gp-dialog--parents:not(:has(.tf-ad:not([hidden]))) .gp-rail { display: none; }
.gp-parent-heading { align-items: center; gap: 12px; margin-bottom: 18px; }
.gp-parent-heading > div { flex: 1; min-width: 0; }
.gp-parent-heading .panel-game-name { margin: 0 0 5px; font-size: .78rem; line-height: 1.4; }
.gp-parent-heading h2 { font-size: 1.9rem; }
.gp-parent-heading .panel-close { width: 44px; height: 44px; flex-basis: 44px; font-size: 1.5rem; }
.gp-pause { color: var(--tf-subtle); font-size: .72rem; white-space: nowrap; }
.gp-pause > span { color: var(--tf-accent-text); }
.gp-dialog .panel-settings { margin: 0 0 20px; }
.gp-dialog .setting-row { min-height: 56px; padding: 9px 0; gap: 16px; font-size: .875rem; }
.gp-dialog .setting-row small { font-size: .74rem; }
.gp-dialog .setting-select { display: flex; justify-content: space-between; gap: 16px; min-height: 56px; padding: 9px 0; margin: 0; border-bottom: 1px solid var(--tf-border); font-size: .875rem; }
.gp-dialog .setting-select select { width: auto; max-width: 210px; min-height: 44px; padding-block: 8px; font-size: .8rem; }
.gp-dialog #level-row { margin: 0; padding: 9px 0; }
.gp-dialog .setting-row .gp-switch { appearance: none; flex: 0 0 44px; width: 44px; height: 28px; margin: 0; border: 1px solid var(--tf-control-border); border-radius: 24px; background: var(--tf-bg); cursor: pointer; }
.gp-switch::before { content: ''; display: block; width: 20px; height: 20px; margin: 3px; border-radius: 50%; background: var(--tf-muted); transition: transform var(--tf-motion); }
.gp-dialog .setting-row .gp-switch:checked { background: var(--tf-accent); border-color: var(--tf-accent); }
.gp-switch:checked::before { transform: translateX(16px); background: var(--tf-on-accent); }
.gp-switch:disabled { opacity: .65; cursor: default; }
.gp-dialog .panel-actions { grid-template-columns: 1fr 1fr; }
.gp-dialog .panel-actions .tf-button { margin: 0; min-height: 44px; font-size: .85rem; }
.gp-dialog .panel-hint { border-top: 1px solid var(--tf-border); padding-top: 15px; font-size: .75rem; line-height: 1.55; }
.gp-outcome { text-align: center; padding-top: 9px; }
.gp-kicker { margin: 0 0 8px; color: var(--tf-subtle); font-size: .78rem; line-height: 1.4; }
.gp-outcome > .gp-kicker { font-size: .85rem; }
.gp-outcome #finish-replay-preview { display: block; width: min(100%, 360px); height: 210px; margin: 14px auto 25px; }
.gp-completion-image svg { display: block; width: 100%; height: 100%; }
.gp-outcome h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: 12px; line-height: 1.12; }
.gp-outcome #finish-message { color: var(--tf-muted); margin: 0 0 28px; font-size: 1rem; }
.gp-completion-actions { display: grid; gap: 9px; }
.gp-completion-actions .tf-button { width: 100%; margin: 0; min-height: 48px; font-weight: 650; }
.gp-completion-note { color: var(--tf-subtle); font-size: .75rem; margin: 18px 0 0; }
.gp-discoveries { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--tf-border); }
.gp-rail:not(:has(.tf-ad:not([hidden]))) .gp-discoveries { margin-top: 0; padding-top: 0; border: 0; }
.gp-discoveries h2 { font-size: 1.15rem; letter-spacing: -.035em; line-height: 1.2; margin: 0 0 8px; }
.gp-suggested-game { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 10px 0; border-bottom: 1px solid var(--tf-border); color: var(--tf-text); text-decoration: none; }
.gp-suggested-game img { width: 64px; height: 52px; flex: 0 0 64px; object-fit: cover; border-radius: 8px; background: var(--tf-bg); }
.gp-suggested-game > span:not(:last-child) { flex: 1; min-width: 0; }
.gp-suggested-game strong { display: block; font-size: .85rem; font-weight: 600; line-height: 1.25; }
.gp-suggested-game small { display: block; margin-top: 5px; font-size: .72rem; color: var(--tf-muted); line-height: 1.4; }
.gp-suggested-game > span:last-child { color: var(--tf-link); }
.gp-dialog .gp-browse, .gp-dialog #parent-home { display: flex; min-height: 44px; justify-content: flex-start; padding-inline: 0; margin: 5px 0 0; font-size: .8rem; border: 0; background: transparent; box-shadow: none; }
@media (hover: hover) { .gp-suggested-game:hover strong { color: var(--tf-accent-text); } }
@media (min-width: 900px) and (max-width: 1000px) {
  .gp-frame { grid-template-columns: minmax(0, 1fr) 334px; }
  .gp-main { padding-inline: 24px; }
  .gp-rail { padding-inline: 16px; }
  .gp-home-label { display: none; }
  .gp-dialog .setting-select select { max-width: 165px; }
  .gp-pause { display: none; }
}
@media (max-width: 899px) {
  .gp-dialog, .gp-dialog--parents, .gp-dialog--parents:not(:has(.tf-ad:not([hidden]))) { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 24px); border-radius: 18px; }
  .gp-frame { grid-template-columns: minmax(0, 1fr); }
  .gp-main { padding: 20px 24px; }
  .gp-brand { margin-bottom: 16px; }
  .gp-brand .tf-brand { font-size: 1.18rem; }
  .gp-home-label { font-size: .65rem; }
  .gp-ad-host--desktop { display: none; }
  .gp-main > .gp-ad-host--mobile:has(.tf-ad:not([hidden])) { display: block; margin: 0 -24px 16px; padding-bottom: 16px; border-bottom: 1px solid var(--tf-border); }
  .gp-rail { border-left: 0; border-top: 1px solid var(--tf-border); padding: 20px 24px; }
  .gp-dialog--parents .gp-rail { display: none; }
  .gp-discoveries { margin: 0; padding: 0; border: 0; }
  .gp-discoveries h2 { font-size: 1.1rem; }
  .gp-outcome { padding-top: 0; }
  .gp-outcome #finish-replay-preview { height: 96px; margin-block: 8px 10px; }
  .gp-outcome h2 { font-size: 1.75rem; margin-bottom: 8px; }
  .gp-outcome #finish-message { font-size: .9rem; margin-bottom: 16px; }
  .gp-completion-actions { gap: 8px; }
  .gp-completion-note { margin-top: 12px; }
  .gp-dialog .setting-select select { max-width: 178px; font-size: .75rem; }
  .gp-parent-heading h2 { font-size: 1.8rem; }
  .gp-pause { display: none; }
  .gp-dialog .panel-actions { grid-template-columns: 1fr; }
  .gp-dialog .panel-actions > * { grid-column: 1; }
}
@media (max-width: 359px) {
  .gp-main { padding-inline: 18px; }
  .gp-rail { padding-inline: 16px; }
  .gp-home-label { display: none; }
  .gp-ad-host { display: none !important; }
  .gp-dialog .setting-select select { max-width: 153px; padding-left: 8px; }
  .gp-dialog .setting-row strong { font-size: .8rem; }
  .gp-dialog .setting-row small { font-size: .7rem; }
}
