/* GameRoch website — r20 candidate (themes). Website only, loaded after app-web-collections.css.
   Every rule starts with #gr-complete[data-host=app][data-platform=web], so the phone app cannot change.
   Three parts: (1) the Themes page, (2) the five premium themes as whole surface systems, (3) the character studio's
   tile badges. Colours come from the theme's own variables (js/core/themes.js writes them on #gr-complete). */

/* =============================================================== 1. THE THEMES PAGE =============================================================== */
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20{gap:26px}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-sec{gap:14px}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-motion{display:none}
/* the banner: what is being tried on, and the two ways out of it */
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-banner{border-color:color-mix(in srgb,var(--app-blue) 45%,var(--app-line));background:color-mix(in srgb,var(--app-blue) 9%,var(--app-panel))}
#gr-complete[data-host=app][data-platform=web] .gr-thw-banner-acts{display:flex;flex-wrap:wrap;gap:8px;flex:none}
#gr-complete[data-host=app][data-platform=web] .gr-thw-banner-acts .gr-thw-act{margin:0;min-width:128px}

/* the grids: three free looks in a row; five premium themes as two large and three regular on a computer */
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid{grid-template-columns:minmax(0,1fr);gap:14px}
@container gr-shell (min-width: 621px) {
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-free{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-premium{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-premium > :first-child{grid-column:1 / -1}
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-premium > :first-child{flex-direction:row;align-items:stretch;gap:6px}
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-premium > :first-child .gr-thw-pv{flex:0 0 58%}
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-premium > :first-child .gr-thw-meta{padding:12px 12px 6px}
}
@container gr-shell (min-width: 1100px) {
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-premium{grid-template-columns:repeat(6,minmax(0,1fr));gap:18px}
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-premium > *{grid-column:span 2}
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-premium > :nth-child(-n+2){grid-column:span 3}
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-premium > :first-child{flex-direction:column;gap:0}
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-premium > :first-child .gr-thw-pv{flex:none}
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-premium > :first-child .gr-thw-meta{padding:12px 8px 4px}
  #gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-grid.is-free{gap:18px}
}

/* a card: the preview, then name + state, mood, price, and Preview / Apply */
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-card{padding:10px;border-radius:22px;transition:border-color .15s ease,box-shadow .15s ease}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-card.is-world{border-color:var(--app-line)}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-card.is-current{border-color:var(--app-blue);box-shadow:0 0 0 1px var(--app-blue),0 18px 36px -28px color-mix(in srgb,var(--app-blue) 70%,transparent)}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-card.is-previewing{border-color:var(--app-blue);box-shadow:0 0 0 2px var(--app-blue)}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-meta{gap:7px;padding:12px 6px 4px}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-top h3{font:750 17px/1.2 'Outfit',sans-serif;letter-spacing:-.01em}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-line{font:500 13.5px/1.45 'DM Sans',sans-serif}
#gr-complete[data-host=app][data-platform=web] .gr-thw-price{display:flex;align-items:center;gap:6px;margin:2px 0 0;color:var(--app-ink);font:700 14px/1.2 'DM Sans',sans-serif}
#gr-complete[data-host=app][data-platform=web] .gr-thw-price.is-soon{color:var(--app-muted);font-weight:600;font-size:13px}
#gr-complete[data-host=app][data-platform=web] .gr-thw-why{margin:0;color:var(--app-muted);font:500 12.5px/1.35 'DM Sans',sans-serif}
#gr-complete[data-host=app][data-platform=web] .gr-thw-err{margin:0;color:var(--br-bad,#ae2646);font:600 12.5px/1.35 'DM Sans',sans-serif}
#gr-complete[data-host=app][data-platform=web] .gr-thw-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto;padding-top:4px}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-acts .gr-thw-act{flex:1 1 104px;margin:0;min-height:40px;height:auto;padding:9px 14px}
#gr-complete[data-host=app][data-platform=web] .gr-thw-act.is-ghost{background:transparent}
/* Apply is the one solid button on a card; Preview is the outlined one beside it */
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-act.is-primary{border-color:transparent;background:var(--app-blue);color:var(--gr-on,#fff)}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-act.is-primary:hover{background:color-mix(in srgb,var(--app-blue) 86%,#000);color:var(--gr-on,#fff)}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-act.is-ghost:hover{border-color:var(--app-blue);color:var(--app-blue);background:color-mix(in srgb,var(--app-blue) 6%,transparent)}
#gr-complete[data-host=app][data-platform=web] .gr-thw-act.is-buy{border-color:color-mix(in srgb,var(--app-blue) 55%,var(--app-line));color:var(--app-blue);background:color-mix(in srgb,var(--app-blue) 7%,var(--app-panel))}
#gr-complete[data-host=app][data-platform=web] .gr-thw-act:disabled,#gr-complete[data-host=app][data-platform=web] .gr-thw-act[aria-disabled=true]{opacity:.6;cursor:not-allowed}
#gr-complete[data-host=app][data-platform=web] .gr-thw-acts .gr-off-wrap,#gr-complete[data-host=app][data-platform=web] .gr-thw-acts > span{display:flex;flex:1 1 104px;min-width:0}
#gr-complete[data-host=app][data-platform=web] .gr-thw-acts > span > .gr-thw-act{flex:1}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-note{margin-top:auto;padding:8px 0 4px;font-weight:600;color:var(--app-muted)}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-state.is-current{background:var(--app-blue);color:var(--gr-on,#fff)}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-state{height:24px;font-size:12px}

/* the preview: a GameRoch page — top bar, side list, a game card, Play, a chip and three tiles — in the theme's colours */
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-pv{gap:0;padding:0;aspect-ratio:16/10;border-radius:16px}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-pv-bar{flex:none;height:13%}
#gr-complete[data-host=app][data-platform=web] .gr-thw-pv-body{display:flex;flex:1;min-height:0}
#gr-complete[data-host=app][data-platform=web] .gr-thw-pv-nav{display:flex;flex-direction:column;gap:7%;flex:0 0 17%;padding:5% 3%;border-inline-end:1px solid var(--pv-line);background:color-mix(in srgb,var(--pv-panel) 55%,transparent)}
#gr-complete[data-host=app][data-platform=web] .gr-thw-pv-nav i{display:block;height:7%;min-height:4px;border-radius:99px;background:var(--pv-sub);opacity:.45}
#gr-complete[data-host=app][data-platform=web] .gr-thw-pv-nav i.is-on{height:11%;opacity:1;background:var(--pv-tint);box-shadow:inset 3px 0 0 var(--pv-accent)}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-pv-main{display:flex;flex-direction:column;gap:6%;flex:1;min-width:0;padding:5% 5% 6%}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-pv-card{flex:1 1 58%;padding:3.5%}
#gr-complete[data-host=app][data-platform=web] .gr-thw-pv-tiles{display:flex;gap:4%;flex:0 0 28%}
#gr-complete[data-host=app][data-platform=web] .gr-thw-pv-tiles i{display:block;flex:1;border-radius:7px;border:1px solid var(--pv-line);
  background:linear-gradient(150deg,color-mix(in srgb,var(--pv-hero2) 70%,var(--pv-panel)),color-mix(in srgb,var(--pv-hero) 70%,var(--pv-panel)))}
#gr-complete[data-host=app][data-platform=web] .gr-thw-pv-tiles i:nth-child(2){background:linear-gradient(150deg,#f4a340,#d9603b)}
#gr-complete[data-host=app][data-platform=web] .gr-thw-pv-tiles i:nth-child(3){background:linear-gradient(150deg,#46c39b,#2a7fb8)}

/* ========================================================= 2. THE PREMIUM THEMES: A SURFACE SYSTEM =========================================================
   js/core/themes.js writes the palette (and --gr-raise, --gr-input, --gr-focus, --gr-ok, --gr-bad, --gr-scrim) onto
   #gr-complete. The components already read --gr-* / --br-* / --app-*; what follows covers what they did not:
   the page behind everything, the decoration layer, the header and side column, inputs, focus, disabled, selection,
   success and error, and the scrim behind a dialog. Game art is never tinted. */
html[data-host=app][data-platform=web]:has(#gr-complete[data-premium]){background:var(--gr-bg)}
#gr-complete[data-host=app][data-platform=web][data-premium]{background:var(--gr-bg);color:var(--gr-ink)}
/* the decoration: one static layer behind the content, drawn with the page (no animation, nothing for reduced motion to stop) */
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-app{background:var(--gr-decor,none),var(--gr-bg);background-color:var(--gr-bg)}
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-app::before{content:none;animation:none}
/* the header and the side column: the theme's own surfaces */
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-header{background:color-mix(in srgb,var(--gr-panel) 92%,transparent);border-color:var(--gr-line)}
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-sidebar{background:color-mix(in srgb,var(--gr-sidebar) 70%,transparent);border-color:var(--gr-line)}
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-rail .gr-navitem{color:var(--gr-sub)}
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-rail .gr-navitem:hover{background:var(--gr-raise);color:var(--gr-ink)}
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-rail .gr-navitem[aria-current=page]{background:var(--gr-tint);color:var(--gr-blue);box-shadow:inset 3px 0 0 var(--gr-blue)}
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-rail .gr-navitem[aria-current=page] svg{color:var(--gr-blue)}
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-rail-title{color:var(--gr-sub)}
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-bottom{background:var(--gr-panel);border-color:var(--gr-line)}
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-bottom [aria-current=page]{color:var(--gr-blue)}
/* inputs */
#gr-complete[data-host=app][data-platform=web][data-premium] :is(input[type=text],input[type=search],input[type=email],input:not([type]),textarea,select){
  background-color:var(--gr-input);border-color:var(--gr-line);color:var(--gr-ink)}
#gr-complete[data-host=app][data-platform=web][data-premium] :is(input,textarea)::placeholder{color:var(--gr-sub);opacity:1}
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-switch{accent-color:var(--gr-blue)}
/* focus: one ring in the theme's focus colour, never the browser's default blue */
#gr-complete[data-host=app][data-platform=web][data-premium] :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid var(--gr-focus);outline-offset:2px}
/* disabled: quieter, never invisible */
#gr-complete[data-host=app][data-platform=web][data-premium] :is(button,input,select,textarea):disabled{opacity:.58}
/* selection, success and error */
#gr-complete[data-host=app][data-platform=web][data-premium] ::selection{background:color-mix(in srgb,var(--gr-blue) 32%,transparent);color:var(--gr-ink)}
#gr-complete[data-host=app][data-platform=web][data-premium] :is([aria-selected=true],[aria-pressed=true]).nx-tab,
#gr-complete[data-host=app][data-platform=web][data-premium] .nx-tabs [aria-selected=true]{color:var(--gr-blue)}
#gr-complete[data-host=app][data-platform=web][data-premium] :is(.gr-thw-state.is-free,.gr-thw-state.is-mine,.gr-setw-saved){color:var(--gr-ok)}
#gr-complete[data-host=app][data-platform=web][data-premium] :is(.gr-herr,.gr-thw-err,.nxs-err,.gr-error){color:var(--gr-bad)}
/* dialogs: the theme's own scrim; the card is the theme's panel */
#gr-complete[data-host=app][data-platform=web][data-premium] :is(.gr-modal,.gr-sheet-wrap,.gr-overlay){background-color:var(--gr-scrim)}
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-modal-card{background:var(--gr-panel);color:var(--gr-ink);border-color:var(--gr-line)}
/* cards sit on the theme's panel, raised parts on its raise */
#gr-complete[data-host=app][data-platform=web][data-premium] :is(.nx-card,.gr-card){border-color:var(--gr-line)}

/* ================================================================ 3. THE CHARACTER STUDIO ================================================================
   A tile's badge ("Trying on", "Equipped") is never cut: it spans the top of the picture, centred, and wraps
   to a second line before it would be clipped (German, Tamil). */
#gr-complete[data-host=app][data-platform=web] .nxs .nxs-badge{top:7px;inset-inline:6px;width:fit-content;max-width:none;margin-inline:auto;
  padding:3px 8px;white-space:normal;overflow:visible;text-overflow:clip;text-align:center;font-size:10.5px;line-height:1.15;overflow-wrap:anywhere}
#gr-complete[data-host=app][data-platform=web] .nxs button.nxs-tile[aria-pressed=true]:has(.nxs-badge:not([data-b=""])) .nxs-badge{inset-inline:6px}

/* ---- the premium themes, part by part: what the shared rules wrote in fixed colours (measured, 14 Nov 2026) ----
   A control filled with the accent carries the theme's own text-on-accent (white on Arctic mint was 1.6:1); the
   "doing well" green and the Roch Points mark follow the theme's success colour and tone. */
#gr-complete[data-host=app][data-platform=web][data-premium] :is(.gr-appbtn,.gr-appplay,.gr-gd-post,.gr-lb-you,.gr-lb-go,.gr-play,.nx-btn.is-primary){color:var(--gr-on)}
#gr-complete[data-host=app][data-platform=web][data-premium] :is(.gr-appbtn,.gr-appplay,.gr-gd-post,.gr-lb-go) svg{color:inherit}
#gr-complete[data-host=app][data-platform=web][data-premium] :is(.gr-lb-z.is-up,.gr-lb-zone.is-up,.gr-live,.gr-ms.is-done .gr-ms-t small,.app-wl-amt){color:var(--gr-ok)}
#gr-complete[data-host=app][data-platform=web][data-premium] .gr-pulse{--pl-live:var(--gr-ok)}
#gr-complete[data-host=app][data-platform=web][data-premium][data-tone=dark] .gr-hdl-rp{color:#c4b8ff;background:rgba(124,99,255,.2)}

/* the studio's "Equipped" badge: a deeper green, so its white word reads at AA in every theme (was 3.4:1) */
#gr-complete[data-host=app][data-platform=web] .nxs .nxs-badge[data-b=equipped]{background:#0d7a43;color:#fff}

/* a name never breaks inside a word: the state chip moves under it when the card is narrow */
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-top{flex-wrap:wrap;row-gap:6px}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-top h3{overflow-wrap:normal;word-break:normal;hyphens:none}
#gr-complete[data-host=app][data-platform=web] .gr-thw.is-r20 .gr-thw-acts .gr-thw-act{flex-basis:132px;white-space:nowrap}
