/* This is the first cascade layer: presentation replaces old layered !important paint.
   Dimensions, grids, canvas coordinates and input hit areas remain in the existing CSS. */
@layer studio-refresh {
/* Monochrome announcements; only paint and the inner viewport change. Header geometry is retained. */
html.refresh body #siteHeader .header-news-ticker {border-color:var(--concept-line)!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;text-shadow:none!important;filter:none!important;isolation:isolate}
html.refresh body #siteHeader .header-news-ticker::before,html.refresh body #siteHeader .header-news-ticker::after {content:none!important;background:none!important;box-shadow:none!important}
html.refresh body #siteHeader .ticker-symbol {position:absolute!important;left:9px!important;top:50%!important;transform:translateY(-50%)!important;width:14px!important;height:14px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.7!important;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;z-index:2;filter:none!important}
html.refresh body #siteHeader .header-news-ticker-viewport {margin-left:30px!important;width:calc(100% - 34px)!important;overflow:hidden!important;mask-image:linear-gradient(90deg,transparent,#000 10px,#000 calc(100% - 10px),transparent)}
html.refresh body #siteHeader :is(.header-news-ticker-track,.header-news-ticker-run,.header-news-ticker-item) {color:inherit!important;text-shadow:none!important;background:none!important;filter:none!important;font-variant-emoji:text}
html.refresh body #siteHeader .header-news-ticker-sep {color:inherit!important;opacity:.45}
html.refresh body #siteHeader .header-news-ticker-item {font-weight:600!important}
html.refresh body #siteHeader .header-news-ticker:hover .header-news-ticker-track {animation-play-state:paused!important}
html.refresh body #siteHeader :is(.ticker-resize-handle,.ticker-editor-toolbar) {border-color:var(--concept-accent)!important;background:var(--concept-surface)!important;color:var(--concept-accent)!important;box-shadow:none!important}
html.refresh body .admin-ticker-preview-text {color:var(--concept-accent)!important;background:var(--concept-accent-soft)!important;border-color:var(--concept-line)!important;box-shadow:none!important;text-shadow:none!important}
/* Both embedded chat games share the site palette, including after lazy game CSS loads. */
html.refresh body #chat #sharedGame {background:var(--concept-surface)!important;color:var(--concept-text)!important;border-color:var(--concept-line)!important;box-shadow:none!important;filter:none!important}
html.refresh body #chat #sharedGame :is(.shared-game-heading,#sharedGameStatus,.dice-score,.dice-player-label,.dice-total) {color:var(--concept-text)!important;text-shadow:none!important;background:none!important}
html.refresh body #chat #sharedGame .shared-game-heading>span {color:var(--concept-muted)!important}
html.refresh body #chat #sharedGame .dice-player {background:var(--concept-subtle)!important;border-color:var(--concept-line)!important;box-shadow:none!important}
html.refresh body #chat #sharedGame .dice-pair {background:var(--concept-field)!important;border-color:var(--concept-line)!important;box-shadow:none!important}
html.refresh body #chat #sharedGame .die {background:var(--concept-surface)!important;color:var(--concept-accent)!important;border-color:var(--concept-line)!important;box-shadow:0 2px 0 var(--concept-line)!important;filter:none!important}
html.refresh body #chat #sharedGame .die-pip {background:var(--concept-accent)!important;box-shadow:none!important}
html.refresh body #chat #sharedGame .die[data-value="0"]::after {color:var(--concept-muted)!important;text-shadow:none!important}
html.refresh body #chat #sharedGame .dice-round-winner {background:var(--concept-accent-soft)!important;border-color:var(--concept-accent)!important;box-shadow:inset 0 0 0 1px var(--concept-accent)!important}
html.refresh body #chat #sharedGame .shared-game-board button {background:var(--concept-field)!important;color:var(--concept-text)!important;border-color:var(--concept-line)!important;box-shadow:none!important;text-shadow:none!important;border-radius:8px!important}
html.refresh body #chat #sharedGame .shared-game-board button[data-mark="X"] {color:var(--concept-accent)!important}
html.refresh body #chat #sharedGame .shared-game-board button[data-mark="O"] {color:var(--concept-muted)!important}
html.refresh body #chat #sharedGame button.secondary {background:var(--concept-accent-soft)!important;color:var(--concept-accent)!important;border-color:var(--concept-line)!important;box-shadow:none!important;text-shadow:none!important}
html.refresh body #chat #sharedGame button.primary {background:var(--concept-primary)!important;color:var(--concept-primary-ink)!important;border-color:var(--concept-primary)!important;box-shadow:none!important;text-shadow:none!important}
html.refresh body #chat #sharedGame button:focus-visible {outline-color:var(--concept-accent)!important}
html.refresh body :is(.animal-tile,.cloud-animal-tile,#profileAnimalGrid button) {background:var(--concept-field)!important;border-color:var(--concept-line)!important;box-shadow:none!important;color:var(--concept-accent)!important;filter:none!important}
html.refresh body :is(.animal-tile,.cloud-animal-tile,#profileAnimalGrid button):hover {background:var(--concept-subtle)!important;border-color:var(--concept-accent)!important}
html.refresh body :is(.animal-tile,.cloud-animal-tile,#profileAnimalGrid button)[aria-pressed=true] {background:var(--concept-accent-soft)!important;border-color:var(--concept-accent)!important;box-shadow:inset 0 0 0 1px var(--concept-accent)!important;outline-color:var(--concept-accent)!important}
html.refresh body .animal-icon-svg {color:var(--concept-accent)!important;filter:none!important}
html.refresh body .animal-icon-svg>g {stroke-width:2.15!important}
html.refresh[data-theme=dark] body .animal-icon-svg>g {stroke-width:2.3!important}
html.refresh body :is(.animal-tile,.cloud-animal-tile,#profileAnimalGrid button):focus-visible {outline-color:var(--concept-accent)!important}
html.refresh body :is(.animal-tile,.cloud-animal-tile,#profileAnimalGrid button) small {color:var(--concept-muted)!important}
html.refresh body :is(.cloud-avatar,.cloud-friend-avatar,.friend-dm-avatar,.animal-display,.selected-animal) {background:var(--concept-accent-soft)!important;border-color:var(--concept-line)!important;box-shadow:none!important}
html.refresh body .cloud-section-heading {border-color:var(--concept-line)!important;box-shadow:none!important}
/* Controls and smaller panels that used to keep a blue/purple skin. */
html.refresh body :is(dialog,.modal-card,.menu-panel,.popover,.chat-extra-panel,.history-dialog,.peer-modal-card,.radio-mini-player,.heart-rating-dialog,.friend-game-dialog) {background:var(--concept-surface)!important;color:var(--concept-text)!important;border-color:var(--concept-line)!important;box-shadow:0 12px 36px #0003!important}
html.refresh body :is(dialog,.screen) :is(.secondary,.icon-button,.sound-choice,.sound-option,.package-tag,.cloud-badge,.status-pill) {background:var(--concept-subtle)!important;color:var(--concept-accent)!important;border-color:var(--concept-line)!important;box-shadow:none!important;text-shadow:none!important;filter:none!important}
html.refresh body :is(dialog,.screen) :is(input,textarea,select) {background:var(--concept-field)!important;color:var(--concept-text)!important;border-color:var(--concept-line)!important;box-shadow:none!important;accent-color:var(--concept-accent)}
html.refresh body :is(dialog,.screen) :is(input,textarea)::placeholder {color:var(--concept-muted)!important}
html.refresh body :is(dialog,.screen) :is(input,textarea,select):focus-visible {outline-color:var(--concept-accent)!important;border-color:var(--concept-accent)!important}
html.refresh body :is(.sound-choice,.sound-option)[aria-pressed=true] {background:var(--concept-accent-soft)!important;border-color:var(--concept-accent)!important;color:var(--concept-accent)!important}
/* Shared game furniture, including cloned online panels. */
html.refresh #games :is(.demo-game,.game-mode-picker,.friend-online-panel,.game-round-end,.arcade-pause-panel,.coin-arena,.mines-wrapper) {background:var(--concept-surface)!important;color:var(--concept-text)!important;border-color:var(--concept-line)!important;box-shadow:none!important;filter:none!important}
html.refresh #games :is(.demo-game,.game-mode-picker)::before,html.refresh #games :is(.demo-game,.game-mode-picker)::after {background:none!important;box-shadow:none!important;filter:none!important}
html.refresh #games :is(.demo-head,.snake-side,.retro-car-side,.tetris-side,.sea-panel,.coin-turn-card,.coin-stat,.game-help,.mines-toolbar,.mines-information,.mines-bottom,.coin-outcome,.coin-online-note,.friend-online-status,.arcade-timer) {background:var(--concept-subtle)!important;color:var(--concept-text)!important;border-color:var(--concept-line)!important;box-shadow:none!important;text-shadow:none!important}
html.refresh #games :is(.demo-head,.snake-side,.retro-car-side,.tetris-side,.sea-panel,.coin-turn-card,.game-help)::before,html.refresh #games :is(.demo-head,.snake-side,.retro-car-side,.tetris-side,.sea-panel,.coin-turn-card,.game-help)::after {background:none!important;box-shadow:none!important;filter:none!important}
html.refresh #games :is(h2,h3,.snake-label,.retro-car-title,.tetris-title,.sea-title-note,.coin-lead,.coin-mode-chip,.coin-stat b,.mines-information span,.ttt-score,.coin-turn-card strong) {color:var(--concept-text)!important;text-shadow:none!important;-webkit-text-fill-color:currentColor!important;background-image:none!important}
html.refresh #games :is(.game-help,.coin-turn-card small,.coin-turn-card p,.coin-lead small,.coin-stats,.coin-reset,.ttt-help,.sea-legend,.sea-counters,.mines-bottom,.snake-score,.tetris-score,.retro-score) {color:var(--concept-muted)!important;text-shadow:none!important}
html.refresh #games :is(button,.ttt-button,.retro-start,.tetris-start,.snake-start,.arcade-pause,.coin-mode-chip,select) {background:var(--concept-accent-soft)!important;color:var(--concept-accent)!important;border-color:var(--concept-line)!important;border-image:none!important;box-shadow:none!important;text-shadow:none!important;filter:none!important;border-radius:8px!important;-webkit-text-fill-color:currentColor!important}
html.refresh #games :is(button.primary,#startGame,#coinFlipBtn,#seaQuickRestart) {background:var(--concept-primary)!important;color:var(--concept-primary-ink)!important;border-color:var(--concept-primary)!important}
html.refresh #games button:hover:not(:disabled) {border-color:var(--concept-accent)!important}
html.refresh #games :is(button[aria-pressed=true],.coin-choice.selected) {background:var(--concept-accent-soft)!important;border-color:var(--concept-accent)!important;box-shadow:inset 0 0 0 1px var(--concept-accent)!important}
html.refresh #games :is(button,select,canvas):focus-visible {outline-color:var(--concept-accent)!important}
html.refresh #games :is(.snake-control-row,.snake-joystick,.retro-joystick,.retro-car-console,.retro-lcd,.tetris-console,.tetris-next,.tetris-controls,.tetris-joystick,.tetris-screen,.snake-side canvas,.tetris-next canvas,.retro-road,.sea-grid,.mines-board,.ttt-stage,.ttt-board,.checkers-wrap,.checkers-board) {background:var(--concept-field)!important;border-color:var(--concept-line)!important;box-shadow:none!important;color:var(--concept-text)!important;filter:none!important}
html.refresh #games :is(.retro-over,.tetris-over,.snake-over,.arcade-pause-overlay) {background:color-mix(in srgb,var(--concept-field) 94%,transparent)!important;color:var(--concept-text)!important;text-shadow:none!important;border-color:var(--concept-line)!important;box-shadow:none!important}
html.refresh #games :is(.retro-hud,.retro-hud b,.retro-hud span,.tetris-score,.snake-score,.arcade-timer) {color:var(--concept-accent)!important;text-shadow:none!important}
html.refresh #games .retro-hud {background:var(--concept-subtle)!important;border-color:var(--concept-line)!important;box-shadow:none!important}
html.refresh #games :is(.retro-lcd,.tetris-screen,.tetris-console,.snake-control-row,.coin-perspective)::before,html.refresh #games :is(.retro-lcd,.tetris-screen,.tetris-console,.snake-control-row,.coin-perspective)::after {background:none!important;box-shadow:none!important;filter:none!important}
html.refresh #games :is(.game-score,.tetris-score,.retro-score,.snake-score,.ttt-status,.sea-legend,.coin-stats,.coin-mode-chip,.mines-information,.style-picker,select) {background:var(--concept-subtle)!important;border-color:var(--concept-line)!important;box-shadow:none!important;text-shadow:none!important}
html.refresh #games .mines-information>div {background:var(--concept-subtle)!important;color:var(--concept-muted)!important;border-color:var(--concept-line)!important;box-shadow:none!important}
html.refresh #games .mines-information b {color:var(--concept-accent)!important;text-shadow:none!important}
html.refresh #games .game-help::before {content:none!important}
/* X and O use opposite values, with the sign itself carrying the meaning. */
html.refresh #games .ttt-cell {background:var(--concept-subtle)!important;border-color:var(--concept-line)!important;box-shadow:none!important;text-shadow:none!important;filter:none!important}
html.refresh #games .ttt-cell.ttt-x {color:var(--concept-accent)!important;-webkit-text-fill-color:var(--concept-accent)!important}
html.refresh #games .ttt-cell.ttt-o {color:var(--concept-muted)!important;-webkit-text-fill-color:var(--concept-muted)!important}
html.refresh #games .ttt-cell.win {background:var(--concept-accent-soft)!important;border-color:var(--concept-accent)!important}
/* Checker colours retain their game meaning without glossy plastic rings. */
html.refresh #games .checker-light {background:var(--concept-surface)!important;border-color:var(--concept-line)!important}
html.refresh #games .checker-dark {background:color-mix(in srgb,var(--concept-accent) 44%,var(--concept-field))!important;border-color:var(--concept-line)!important}
html.refresh #games .checker-cell {border:0!important;border-radius:0!important;padding:0!important}
html.refresh #games .checker-piece {
 width:72%!important;height:auto!important;aspect-ratio:1!important;box-sizing:border-box!important;border-radius:50%!important;
 background:#26302c!important;border-color:#121a16!important;box-shadow:inset 0 0 0 2px #ffffff28!important;filter:none!important;
}
html.refresh #games .checker-white {background:#f0f2ed!important;border-color:#84928a!important;box-shadow:inset 0 0 0 2px #ffffffb3!important}
html.refresh #games .checker-piece::before {background:none!important;border-color:currentColor!important;box-shadow:none!important;opacity:.35!important}
html.refresh #games .checker-piece::after {background:none!important;box-shadow:none!important;filter:none!important}
html.refresh #games .checker-king {color:var(--concept-accent)!important;text-shadow:none!important}
html.refresh #games .checker-selected {box-shadow:inset 0 0 0 2px var(--concept-accent)!important}
html.refresh #games .checker-move::after {background:var(--concept-accent)!important;box-shadow:none!important}
/* Battleship: empty water, ships, misses and hits have four clear values. */
html.refresh #games .sea-grid {background:var(--concept-line)!important}
html.refresh #games .sea-grid .sea-cell,
html.refresh #games .sea-grid .sea-cell:nth-child(odd) {position:relative!important;background:var(--concept-field)!important;border-color:var(--concept-line)!important;color:var(--concept-muted)!important;box-shadow:inset 0 0 0 1px var(--concept-line)!important;text-shadow:none!important;border-radius:2px!important;outline-offset:-2px!important}
html.refresh #games .sea-grid .sea-cell.sea-ship {background:var(--concept-accent-soft)!important;color:var(--concept-accent)!important;box-shadow:inset 0 0 0 2px var(--concept-accent)!important}
html.refresh #games .sea-grid .sea-cell.sea-miss {background:var(--concept-field)!important;color:var(--concept-muted)!important;box-shadow:inset 0 0 0 1px var(--concept-line)!important}
html.refresh #games .sea-grid .sea-cell.sea-hit {background:var(--concept-accent-soft)!important;color:var(--concept-accent)!important;box-shadow:inset 0 0 0 2px var(--concept-accent)!important}
html.refresh #games .sea-grid .sea-hit::after {content:none!important;border:0!important;box-shadow:none!important;background:none!important}
html.refresh #games .sea-grid .sea-cell.sea-sunk {background:var(--concept-primary)!important;color:var(--concept-primary-ink)!important;box-shadow:inset 0 0 0 1px var(--concept-accent)!important}
html.refresh #games .sea-grid .sea-cell:not(.sea-disabled):hover {background:var(--concept-accent-soft)!important;box-shadow:inset 0 0 0 2px var(--concept-accent)!important}
html.refresh #games .sea-grid .sea-cell:focus-visible {outline:2px solid var(--concept-accent)!important}
html.refresh #games .sea-counter {background:transparent!important;border-color:transparent!important;color:var(--concept-muted)!important;box-shadow:none!important;text-shadow:none!important}
html.refresh #games .sea-counter b {color:var(--concept-accent)!important}
html.refresh #games :is(.sea-toplabels,.sea-side) {color:var(--concept-muted)!important;text-shadow:none!important}
/* Mines have readable numbers and flags instead of a rainbow of number colours. */
html.refresh #games .mine-cell {background:var(--concept-accent-soft)!important;border-color:var(--concept-line)!important;color:var(--concept-accent)!important;box-shadow:none!important;text-shadow:none!important;border-radius:4px!important}
html.refresh #games .mine-cell.revealed {background:var(--concept-field)!important;border-color:var(--concept-line)!important;color:var(--concept-text)!important}
html.refresh #games .mine-cell.flagged {background:var(--concept-accent-soft)!important;color:var(--concept-accent)!important}
html.refresh #games .mine-cell.mine-exploded {background:var(--concept-primary)!important;color:var(--concept-primary-ink)!important;box-shadow:inset 0 0 0 2px var(--concept-accent)!important}
html.refresh #games :is(.mine-cell.flagged,.mine-cell.has-mine) {font-size:0!important}
html.refresh #games :is(.mine-cell.flagged,.mine-cell.has-mine)>* {display:none!important}
html.refresh #games :is(.mine-cell.flagged,.mine-cell.has-mine)::before {content:"";display:block;width:17px;height:17px;background:currentColor;mask:center/contain no-repeat var(--mine-symbol);-webkit-mask:center/contain no-repeat var(--mine-symbol)}
html.refresh #games .mine-cell.flagged {--mine-symbol:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M5 21V3l14 3-14 7m-3 8h7'/%3E%3C/svg%3E")}
html.refresh #games .mine-cell.has-mine {--mine-symbol:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath stroke='black' stroke-width='2' stroke-linecap='round' d='M12 2v3m0 14v3M2 12h3m14 0h3M5 5l2 2m10 10 2 2M5 19l2-2M17 7l2-2'/%3E%3C/svg%3E")}
/* Coin keeps its two faces and flip animation; only the paint changes. */
html.refresh #games .coin-face {background:var(--concept-accent-soft)!important;border-color:var(--concept-accent)!important;color:var(--concept-accent)!important;box-shadow:inset 0 0 0 2px var(--concept-surface)!important;filter:none!important;text-shadow:none!important}
html.refresh #games .coin-tails {background:var(--concept-subtle)!important;border-color:var(--concept-muted)!important;color:var(--concept-muted)!important}
html.refresh #games .coin-face :is(b,span,svg) {color:inherit!important;filter:none!important;text-shadow:none!important}
html.refresh #games .coin-turn-card.is-winner {border-color:var(--concept-accent)!important;background:var(--concept-accent-soft)!important;box-shadow:none!important}
/* Cars are real vector sprites in the site palette; their bounding boxes are untouched. */
html.refresh #games .retro-road {background:var(--concept-field)!important}
html.refresh #games .retro-road::before {background:repeating-linear-gradient(to bottom,var(--concept-line) 0 12px,transparent 12px 26px) 20% 0/1px 26px repeat-y,repeating-linear-gradient(to bottom,var(--concept-line) 0 12px,transparent 12px 26px) 40% 0/1px 26px repeat-y,repeating-linear-gradient(to bottom,var(--concept-line) 0 12px,transparent 12px 26px) 60% 0/1px 26px repeat-y,repeating-linear-gradient(to bottom,var(--concept-line) 0 12px,transparent 12px 26px) 80% 0/1px 26px repeat-y!important;box-shadow:none!important;filter:none!important;opacity:.55!important}
html.refresh #games .retro-road::after {background:none!important;border-color:var(--concept-line)!important;box-shadow:none!important;filter:none!important}
html.refresh #games :is(.retro-car,.retro-obstacle) {background-image:var(--studio-player-car)!important;background-color:transparent!important;background-size:100% 100%!important;background-repeat:no-repeat!important;border-color:transparent!important;box-shadow:none!important;filter:none!important;border-radius:0!important}
html.refresh #games .retro-obstacle {background-image:var(--studio-traffic-car)!important}
html.refresh #games :is(.retro-car,.retro-obstacle)::before,html.refresh #games :is(.retro-car,.retro-obstacle)::after {content:none!important;background:none!important;box-shadow:none!important;filter:none!important}
}
