/* Complete interface palettes. Achievement art and exported posters retain their own colors. */
:root{--lime:var(--v2-soft);--purple:var(--v2-soft);--peach:var(--v2-soft)}
:root[data-theme] :is(input,textarea,select){accent-color:var(--v2-accent)}
:root[data-theme] :is(input:not([type=color]):not([type=checkbox]):not([type=radio]),textarea,select){background:var(--v2-input);color:var(--v2-text);border-color:var(--v2-border)}
:root[data-theme] ::placeholder{color:var(--v2-sub);opacity:1}
:root[data-theme] :is(button,a,input,select,textarea):focus-visible{outline:3px solid var(--v2-focus);outline-offset:3px}
:root[data-theme] :is(.nav-label,.nav a,.sidebar-footer,.breadcrumb,.eyebrow,.stat-label,.card-meta,.page-footer,.catalog-caption,.chip,.tab,.title-card p,.level-label){color:var(--v2-sub)}
:root[data-theme] :is(.link-button,.link,.rank-points,.podium-points){color:var(--v2-link)}
:root[data-theme] :is(.nav a.active,.nav a:hover,.chip.active,.chip:hover,.tabs .active,.notice,.mini-note,.v2-campaign,.branding-control,.ai-icon-intro,.selected-choice,.icon-tile:hover,.icon-tile.selected){background:var(--v2-soft);color:var(--v2-text);border-color:var(--v2-border)}
:root[data-theme] :is(.v2-campaign p,.v2-campaign-time span,.mini-note .pixel-icon){color:var(--v2-sub)}
:root[data-theme] :is(.empty,.search-box,.filter-select,.icon-tile,.theme-button,.feed-row,.activity-row){border-color:var(--v2-border)}
:root[data-theme] :is(.feed-row.unread,.feed-row.is-unread){background:var(--v2-soft)}
:root[data-theme] .mobile-nav{background:var(--v2-panel);border-color:var(--v2-border)}
:root[data-theme] .mobile-nav a{color:var(--v2-sub)}
:root[data-theme] .mobile-nav a.active{color:var(--v2-link)}
:root[data-theme] .mobile-nav a.create,:root[data-theme] .brandmark{background:var(--v2-accent);color:var(--v2-accent-text)}
:root[data-theme] .button.danger{background:var(--v2-danger);color:var(--v2-danger-bg)}
:root[data-theme] .danger-text{color:var(--v2-danger)!important}
:root[data-theme] .form-error{color:var(--v2-danger)}
:root[data-theme] .v2-limited-dot{background:var(--v2-link)}
:root[data-theme] .v2-nameplate.paper{background:var(--v2-soft);color:var(--v2-text);border-color:var(--v2-border)}
:root[data-theme] .podium-person.podium-1{background:var(--v2-soft)}
:root[data-theme] .choice-modal,:root[data-theme] .icon-tile{background:var(--v2-panel);color:var(--v2-text)}
:root[data-theme] .progress{background:var(--v2-soft)}
.theme-pack-icon{width:22px;height:22px;object-fit:contain;image-rendering:pixelated;flex:none}
.theme-pack-icon.theme-mascot{width:36px;height:36px}.empty>.theme-pack-icon{width:64px;height:64px;margin:0 auto 18px}.brandmark .theme-pack-icon{width:30px;height:30px}.mini-note .theme-pack-icon{display:block;margin-bottom:8px;width:28px;height:28px}.mobile-nav .create .theme-pack-icon{width:32px;height:32px}
[data-theme-hidden]{display:none!important}
:root[data-pixel=true] :is(.button,.chip,.round-button){border-radius:7px}
:root[data-pixel=true] .nav a.active{box-shadow:inset 3px 0 var(--v2-accent)}
.theme-gallery-modal{width:min(780px,calc(100vw - 28px));max-width:780px;color:var(--v2-text)}
.theme-gallery-modal .modal-body{padding:24px 28px}.theme-gallery-modal .modal-head{position:sticky;top:0;z-index:3}
.tg-intro h2{font-size:26px;margin:10px 0}.tg-intro p,.tg-section p{font-size:12px;line-height:1.8;color:var(--v2-sub)}
.tg-scene{background:var(--tg-bg);color:var(--tg-text);border:1px solid var(--tg-line);border-radius:18px;overflow:hidden;margin:22px 0 16px;box-shadow:0 8px 24px #00000008}
.tg-scene-top{display:flex;justify-content:space-between;padding:13px 20px;background:var(--tg-panel);border-bottom:1px solid var(--tg-line);font-size:12px}
.tg-scene-body{display:flex;align-items:center;gap:16px;padding:24px 24px 18px}.tg-scene-body h3{font-size:25px;margin:6px 0 0}.tg-scene-body small{color:var(--tg-muted);font-size:11px}.tg-mascot{width:60px;height:60px;image-rendering:pixelated}.tg-spark{display:grid;place-items:center;background:var(--tg-soft);color:var(--tg-link);width:60px;height:60px;border-radius:15px;font-size:32px}
.tg-scene-stats{display:flex;align-items:center;gap:24px;padding:0 24px 22px}.tg-scene-stats>span{display:grid;gap:4px;color:var(--tg-muted);font-size:10px}.tg-scene-stats b{font-size:22px;color:var(--tg-text)}.tg-scene-stats button{margin-left:auto;background:var(--tg-accent);color:var(--tg-onaccent);border:0;border-radius:9px;padding:12px 16px;font-size:12px;pointer-events:none}
.tg-scene-nav{display:flex;justify-content:space-around;align-items:center;border-top:1px solid var(--tg-line);background:var(--tg-panel);height:44px;color:var(--tg-link)}.tg-scene-nav img{width:26px;height:26px;image-rendering:pixelated}
.tg-mode{display:flex;background:var(--v2-soft);padding:4px;border-radius:12px;gap:4px}.tg-mode button{flex:1;min-width:0;border:0;background:none;color:var(--v2-sub);border-radius:9px;padding:11px 5px;font-size:12px}.tg-mode button[aria-pressed=true]{background:var(--v2-panel);color:var(--v2-text);box-shadow:0 2px 6px #00000009;font-weight:700}
.tg-reset{margin-top:16px;padding:12px 15px;width:100%;text-align:left;background:var(--v2-panel);color:var(--v2-text);border:1px solid var(--v2-border);border-radius:10px}.tg-reset[aria-pressed=true]{border-color:var(--v2-accent)}
.tg-section{margin:28px 0 14px}.tg-section h3{font-size:18px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0}.tg-section h3 small{font-size:10px;letter-spacing:1px;background:var(--v2-soft);padding:5px 8px;border-radius:6px;font-weight:500}.tg-section p{margin:8px 0 0}
.tg-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.tg-tile{padding:8px;text-align:left;min-width:0;background:var(--v2-panel);border:2px solid var(--v2-border);border-radius:13px;color:var(--v2-text);transition:border-color .15s,transform .15s}.tg-tile:hover{transform:translateY(-2px);border-color:var(--v2-sub)}.tg-tile[aria-pressed=true]{border-color:var(--v2-accent);box-shadow:0 0 0 1px var(--v2-accent)}
.tg-mini{display:block;height:90px;border:1px solid;border-radius:7px;overflow:hidden;position:relative}.tg-mini-bar{height:17px;display:flex;gap:4px;padding:5px}.tg-mini-bar i{width:6px;height:6px;border-radius:50%}.tg-mini>img{height:52px;width:52px;position:absolute;top:25px;left:calc(50% - 26px);image-rendering:pixelated}.tg-mini-block{display:block;position:absolute;left:12px;right:12px;top:28px;height:38px;border-radius:5px;padding:11px}.tg-mini-block i{display:block;width:45%;height:15px;border-radius:4px}.tg-mini-lines{display:block;position:absolute;left:12px;right:12px;bottom:9px;border-bottom:3px solid}
.tg-tile-title{display:flex;gap:3px;justify-content:space-between;align-items:center;font-size:13px;font-weight:650;margin:10px 1px 5px}.tg-tile-title small{font-size:9px;white-space:nowrap;font-weight:400;color:var(--v2-sub)}.tg-tile-desc{display:block;font-size:10px;line-height:1.6;min-height:32px;color:var(--v2-sub);margin:0 1px}.tg-selection{display:block;font-size:10px;color:var(--v2-link);margin:8px 1px 2px}
.tg-stat-check{margin-top:28px!important;font-size:12px}.tg-save{position:sticky;bottom:0;z-index:2;background:var(--v2-panel);padding:16px 28px;display:flex;align-items:center;gap:12px;border-top:1px solid var(--v2-border);padding-bottom:max(16px,env(safe-area-inset-bottom))}.tg-save>span{font-size:12px;flex:1;min-width:0;line-height:1.5}.tg-save>.button{flex:none}
@media(max-width:640px){.theme-gallery-modal .modal-body{padding:18px 16px}.tg-intro h2{font-size:22px}.tg-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tg-scene-body{padding:18px 16px 14px}.tg-scene-stats{padding:0 16px 18px;gap:16px}.tg-scene-body h3{font-size:22px}.tg-scene-stats button{padding:11px 9px;font-size:11px}.tg-save{padding:14px 16px}.tg-save>.button{padding:12px;font-size:12px}.tg-tile-title{font-size:12px}.tg-section h3{font-size:17px}}
:root[data-theme] .hero{background:var(--v2-soft)}
:root[data-theme] :is(.hero p,.hero .eyebrow,.hero-spark,.hero-stamp,.stat-card .stat-icon,.title-card .pixel-icon){color:var(--v2-sub)}
:root[data-theme] :is(.hero-stamp,.stat-card .stat-icon){background:var(--v2-panel);border-color:var(--v2-border)}
:root[data-theme] .hero .button{background:var(--v2-accent);color:var(--v2-accent-text)}
:root[data-theme] :is(.poster-modal .modal-head,.choice-modal .modal-head){background:var(--v2-panel)}
:root[data-theme] .catalog-tools-search:focus-within{border-color:var(--v2-focus);background:var(--v2-input)}
.tg-tile[aria-pressed=true]{border-color:var(--v2-focus);box-shadow:0 0 0 1px var(--v2-focus)}
:root[data-theme] .close-btn{background:var(--v2-soft);color:var(--v2-text);border-color:var(--v2-border)}
:root[data-theme] .level-pill{background:var(--v2-soft);color:var(--v2-text)}
.hero-stamp .theme-mascot{width:64px;height:64px}
/* Square leaderboard: use the active theme on every rank. */
.mobile-square-rank {
  background: var(--v2-panel);
  color: var(--v2-text);
  border-color: var(--v2-border);
}

.mobile-square-rank .rank-podium .podium-person {
  background: var(--v2-panel);
  border-color: var(--v2-border);
}

.mobile-square-rank .rank-podium .podium-1 {
  background: var(--v2-soft);
}

.mobile-square-rank .podium-person small,
.mobile-square-rank .link-button {
  color: var(--v2-text);
}

.mobile-square-rank .ranking-caption,
.mobile-square-rank h2 small {
  color: var(--v2-sub);
}

.growth-heading-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.growth-heading-actions .button { white-space:nowrap; }
@media(max-width:640px) {
  .growth-heading-actions .button { padding:10px 13px; font-size:10px; }
  .page-intro:has(.growth-heading-actions) { flex-wrap:wrap; }
  .growth-heading-actions { margin-left:auto; }
}


[data-theme="pixel-duck"]{--scene-page:url("theme-assets/pixel-duck/scene-page.svg")}
[data-theme="pixel-eggplant"]{--scene-page:url("theme-assets/pixel-eggplant/scene-page.svg")}
[data-theme="pixel-adventurer"]{--scene-page:url("theme-assets/pixel-adventurer/scene-page.svg")}
[data-theme="pixel-cat"]{--scene-page:url("theme-assets/pixel-cat/scene-page.svg")}
[data-theme="pixel-dino"]{--scene-page:url("theme-assets/pixel-dino/scene-page.svg")}

/* 2.3.0: sparse, non-interactive background art with zero layout footprint. */
:root[data-pixel=true] .main{background-image:none}
[data-pixel-surface]{position:relative;isolation:isolate}
.pixel-vignette{position:absolute;inset:0;z-index:-1;overflow:hidden;border-radius:inherit;pointer-events:none;user-select:none;opacity:.15}
:root[data-mode=dark] .pixel-vignette{opacity:.12}
.pixel-vignette .pixel-bg-item{display:block;position:absolute;width:44px;height:44px;object-fit:contain;image-rendering:pixelated}
.pixel-vignette .pixel-bg-item-0{right:9%;top:14%}
.pixel-vignette .pixel-bg-item-1{right:31%;bottom:12%;width:32px;height:32px}
[data-pixel-surface=hero] .pixel-bg-item-0{right:18%;top:11%}
[data-pixel-surface=hero] .pixel-bg-item-1{right:39%;bottom:20%}
[data-pixel-surface=profile] .pixel-bg-item-0{right:20%;top:17%}
[data-pixel-surface=profile] .pixel-bg-item-1{right:7%;bottom:16%}
[data-pixel-surface=goals] .pixel-bg-item-0{right:11%;top:18%}
[data-pixel-surface=goals] .pixel-bg-item-1{right:30%;bottom:17%}
[data-pixel-surface=campaign] .pixel-bg-item-0{right:31%;top:12%;width:34px;height:34px}
[data-pixel-surface=campaign] .pixel-bg-item-1{right:12%;bottom:9%;width:26px;height:26px}
:root[data-pixel=true] .topbar{gap:12px}
.pixel-header-art{display:block;width:clamp(45px,18vw,110px);height:28px;object-fit:contain;image-rendering:pixelated;flex:0 1 auto;min-width:0;margin-right:auto;pointer-events:none}
:root[data-pixel=true] .top-actions{flex-shrink:0}
:root[data-pixel=true] .stat-card .theme-pack-icon{width:34px;height:34px}
:root[data-pixel=true] .mobile-nav .theme-pack-icon{width:28px;height:28px}
:root[data-pixel=true] .mobile-nav a.active:not(.create) .theme-pack-icon{background:var(--v2-soft);border-radius:6px;box-shadow:0 0 0 3px var(--v2-soft)}
.tg-scene-body{position:relative;isolation:isolate}
.tg-scene .pixel-preview-art{position:absolute;inset:0;z-index:-1;opacity:.15;pointer-events:none;overflow:hidden}
.pixel-preview-art img{position:absolute;right:10px;bottom:5px;height:44px;width:auto;image-rendering:pixelated}
.tg-mini .tg-mini-detail{height:32px;width:auto;left:auto;right:7px;top:auto;bottom:8px}
@media(max-width:640px){.pixel-vignette .pixel-bg-item{width:38px;height:38px}.pixel-vignette .pixel-bg-item-1{width:28px;height:28px}}
@media(prefers-reduced-motion:reduce){.tg-tile{transition:none}}

/* 2.4.0: title/actions and identity/edit share their rows at every phone width. */
.page-intro.growth-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px 16px}
.page-intro.growth-heading>div:first-child{display:contents}
.page-intro.growth-heading h1{grid-column:1;grid-row:1;margin:0;white-space:nowrap}
.page-intro.growth-heading p{grid-column:1/-1;grid-row:2;margin:0}
.growth-heading .growth-heading-actions{grid-column:2;grid-row:1;flex-wrap:nowrap;align-items:center;margin:0}
.growth-edit-short{display:none}
.v2-profile .v2-profile-name h2{margin:0}
@media(max-width:760px){
 .page-intro.growth-heading{gap:10px 8px}
 .growth-heading h1{font-size:clamp(20px,5vw,28px)}
 .growth-heading .growth-heading-actions{gap:6px}
 .growth-heading .growth-heading-actions .button{padding:10px;font-size:11px;min-height:40px}
 .growth-heading .growth-edit-full{display:none}.growth-heading .growth-edit-short{display:inline}
 .v2-profile .v2-profile-person{grid-template-columns:52px minmax(0,1fr) auto;gap:14px 10px}
 .v2-profile .v2-profile-person>.avatar{width:52px;height:52px}
 .v2-profile .v2-profile-edit{grid-column:3;grid-row:1;min-width:0;padding:9px;display:flex;align-items:center;gap:4px;min-height:36px}
 .v2-profile .v2-profile-edit .line-icon{width:16px;height:16px}
 .v2-profile .v2-profile-badges,.v2-profile .v2-profile-bio{grid-column:1/-1}
 .v2-profile .v2-profile-long-name .v2-profile-name h2{font-size:clamp(14px,3.6vw,21px)}
}
@media(max-width:480px){
 .v2-profile .v2-profile-long-name .v2-profile-edit span{display:none}
 .v2-profile .v2-profile-person{grid-template-columns:44px minmax(0,1fr) auto;column-gap:8px}
 .v2-profile .v2-profile-person>.avatar{width:44px;height:44px}
 .v2-profile .v2-profile-edit{font-size:11px;padding:8px}
 .growth-heading .growth-heading-actions .line-icon{display:none}
}
@media(max-width:360px){
 .growth-heading .growth-heading-actions .button{padding:8px;font-size:10px}
 .v2-profile{padding:18px}
}

/* Shared controls must use a matched foreground/background in every palette. */
:root :is(.theme-button,.choice-tabs button,.admin-icon-selector,.admin-card-stat,.admin-review-status,.admin-evidence-grid a,.reminder-choice,.ai-result-preview,.crop-preview,.icon-option,.empty,.share-url,.admin-review-modal .modal-head){background:var(--v2-panel);color:var(--v2-text);border-color:var(--v2-border)}
:root :is(.theme-button.selected,.choice-tabs button.active,.choice-tabs button.selected,.admin-card-stat.selected,.icon-option.selected,.preview-switch button.selected){background:var(--v2-soft);color:var(--v2-text);border-color:var(--v2-accent)}
:root .choice-tabs button{min-width:0;overflow-wrap:anywhere}
:root .admin-icon-selector :is(span,small){color:var(--v2-text)}
:root :is(.upload-label,.custom-palette,.preview-switch,.admin-tabs .chip){background:var(--v2-panel);color:var(--v2-text);border-color:var(--v2-border)}
:root .admin-tabs .chip.active{background:var(--v2-accent);color:var(--v2-accent-text)}
:root .public-profile .profile-stats>a{color:var(--v2-text);background:var(--v2-panel)}
:root .public-profile .profile-stats>a:hover{background:var(--v2-soft)}
:root .public-profile .profile-stats>a strong{display:block}

#device-reminders .row{display:flex;flex-wrap:wrap;gap:8px}#device-reminders .button{white-space:normal}#local-reminder-status{line-height:1.7}
