/* One companion, two shells. Existing content and game artwork stay intact. */
body.companion-active {
  --shell-header: 76px;
  --shell-rail: 216px;
  --shell-surface: #09121c;
  --shell-line: #263746;
  background: #050b11;
}
.companion-active .screen-backdrop { opacity: .18; }
.companion-active .texture-layer { opacity: .12; }
.companion-active .app-topbar {
  position: fixed; inset: 0 0 auto; z-index: 30;
  height: var(--shell-header); display: grid;
  grid-template-columns: calc(var(--shell-rail) - 24px) minmax(0, 1fr) auto;
  align-items: center; gap: 24px; padding: 0 24px;
  border-bottom: 1px solid var(--shell-line); background: #070e16;
}
.companion-active .brand-link { grid-column: 1; grid-row: 1; width: fit-content; }
.companion-active .brand-link img { width: 132px; }
@media (min-width: 821px) {
  .companion-active .app-topbar::before {
    content: ''; position: absolute; inset: 0 auto 0 calc(var(--shell-rail) - 1px);
    width: 1px; background: var(--shell-line); pointer-events: none;
  }
  .companion-active .brand-link {
    position: absolute; inset: 0 auto 0 0; width: var(--shell-rail);
    grid-column: auto; grid-row: auto;
    display: flex; align-items: center; justify-content: center;
  }
}
.companion-active .wallet-actions { grid-column: 3; grid-row: 1; max-width: none; flex-wrap: nowrap; align-items: center; }
.companion-active .wallet-button { min-height: 40px; min-width: 40px; box-shadow: none; background: #0b1720; border-color: #334a58; }
.companion-active .wallet-disconnect-button { color: #9fb2c8; }
.companion-active .profile-header-share-button { color: #14f195; }
.companion-active .profile-header-share-button,
.companion-active .wallet-disconnect-button { transition: background-color .15s, border-color .15s, color .15s; }
.companion-active .profile-header-share-button:hover,
.companion-active .wallet-disconnect-button:hover { background: #10201f; border-color: #14f195; color: #eff8f5; }
.companion-active .profile-header-share-button:focus-visible,
.companion-active .wallet-disconnect-button:focus-visible { background: #10201f; border-color: #14f195; color: #eff8f5; outline: 2px solid #14f195; outline-offset: 3px; }
.companion-active .profile-first-shell {
  width: 100%; min-height: 100dvh; padding: calc(var(--shell-header) + 8px) 28px 40px calc(var(--shell-rail) + 28px);
}
.companion-workspace.profile-workspace {
  display: block; width: min(100%, 1280px); margin-inline: auto;
}
.companion-workspace::before { content: none; }
.companion-view { min-width: 0; display: grid; align-content: start; gap: 20px; outline: none; }
.companion-view[hidden] { display: none !important; }
.companion-rail {
  position: fixed; z-index: 25; top: var(--shell-header); bottom: 0; left: 0;
  width: var(--shell-rail); padding: 28px 16px 20px; border-right: 1px solid var(--shell-line);
  display: flex; flex-direction: column; gap: 24px; background: #070e16;
}
.companion-rail .companion-nav { position: static; display: grid; gap: 8px; padding: 0; border: 0; background: none; box-shadow: none; }
.companion-rail .companion-nav a {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 12px 16px;
  text-decoration: none; color: #8ea4b6; background: transparent; border: 1px solid transparent;
  font: 600 15px/1.4 var(--app-ui-font); transition: background-color .15s, color .15s;
}
.companion-rail .companion-nav .rewards-alert-dot {
  position: absolute; top: 9px; right: 11px; width: 8px; height: 8px;
  background: #14f195; border: 1px solid #071019; box-shadow: 0 0 0 1px #14f195;
}
.companion-rail .companion-nav svg { width: 21px; height: 21px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; }
.companion-nav .companion-nav-icon { display:block; width:21px; height:21px; flex:none; background:currentColor; -webkit-mask:var(--nav-icon) center/contain no-repeat; mask:var(--nav-icon) center/contain no-repeat; }
.companion-nav a[href="#companion-profile"] { --nav-icon:url('/assets/icons/app/profile.svg'); }
.companion-nav a[href="#companion-progress"] { --nav-icon:url('/assets/icons/app/progress.svg'); }
.companion-nav a[href="#companion-collection"] { --nav-icon:url('/assets/icons/app/collection.svg'); }
.companion-nav a[href="#companion-rewards"] { --nav-icon:url('/assets/icons/app/rewards.svg'); }
.companion-nav a[href="#companion-studio"] { --nav-icon:url('/assets/icons/app/studio.svg'); }
.companion-rail .companion-nav a[aria-current] { color: #14f195; border-color: #234a3e; background: #0c211c; box-shadow: inset 2px 0 #14f195; }
.companion-rail .companion-nav a:hover { color: #eff8f5; background: #10201f; }
.companion-rail .mini-profile-bar {
  position: static; inset: auto; display: grid; gap: 14px; margin-top: auto; padding: 18px 0 0;
  width: 100%; opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  border: 0; border-top: 1px solid var(--shell-line); background: none; box-shadow: none;
}
.companion-rail .mini-profile-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.companion-rail .mini-profile-avatar { width: 36px; height: 36px; min-width: 36px; }
.companion-rail .mini-profile-id strong { overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.companion-rail .mini-profile-stats { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; min-width: 0; padding-right: 46px; }
.companion-rail .mini-profile-stats > span { font: 12px/1.5 var(--app-ui-font); color: #8198aa; }
.companion-rail .mini-share-button { position: absolute; right: 0; bottom: 0; box-shadow: none; }
.companion-workspace .profile-card, .companion-workspace .profile-module { border-color: var(--shell-line); background: var(--shell-surface); box-shadow: none; }
.companion-view-profile { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); align-items: start; }
.companion-view-profile > .profile-card { grid-column: 1 / -1; width: 100%; overflow: visible; }
.companion-view-profile .profile-banner { height: clamp(230px, 22vw, 300px); overflow: visible; background: #0b181f; }
.companion-view-profile .profile-banner > img { object-position: center 48%; }
.companion-view-profile .profile-banner::after { background: linear-gradient(180deg, #020b0d10 20%, #020b0d38 68%, #020b0dbb); }
.companion-view-profile .profile-main-row {
  bottom: -34px; padding: 0 28px; gap: 20px; align-items: center; background: none;
}
.companion-view-profile .profile-main-row .profile-avatar { width: 112px; border: 4px solid #09121c; box-shadow: 0 0 0 1px #375345; }
.companion-view-profile .profile-identity h2 { font-size: clamp(24px, 2.7vw, 36px); line-height: 1.4; margin: 0 0 38px; max-width: min(700px, 60vw); }
.companion-view-profile .profile-stat-strip { padding-top: 48px; border-bottom: 1px solid var(--shell-line); background: #09121c; }
.companion-view-profile .profile-stat-strip article { min-height: 84px; padding: 14px 28px 18px; border-color: var(--shell-line); border-bottom: 0; background: transparent; }
.companion-view-profile .profile-stat-strip article:not(:last-child) { border-right: 1px solid var(--shell-line); }
.companion-view-profile .profile-stat-strip strong { margin-top: 6px; font-size: 23px; }
.companion-view-profile .profile-stat-strip article > span { font-size: 9px; color: #8fa8b7; }
.companion-view-profile .profile-more-stats { border: 0; }
.companion-view-profile .profile-more-stats summary { padding: 16px 28px; }
.companion-view-profile .profile-extra-stats { background: #071018; border-color: var(--shell-line); }
.companion-view-profile .profile-tools { justify-content: flex-end; gap: 10px; padding: 14px 28px; border-bottom: 1px solid var(--shell-line); background: #09121c; }
.companion-view-profile .profile-tools a, .companion-view-profile .profile-tools button { flex: none; min-width: 0; min-height: 42px; padding: 9px 16px; }
.companion-view-profile .profile-tools a { background: #103023; border-color: #2c694d; }
.companion-view-profile .profile-tools a:hover, .companion-view-profile .profile-tools a:focus-visible { background: #164332; border-color: var(--accent); }
.companion-view-profile .profile-tools button { background: transparent; border-color: var(--shell-line); }
.companion-view-profile .profile-tools button:hover, .companion-view-profile .profile-tools button:focus-visible { color: var(--accent); border-color: var(--accent); background: #10221e; }
.companion-view-profile > .referral-strip { margin: 0; padding: 20px; grid-template-columns: 1fr 1fr; gap: 18px; border: 1px solid var(--shell-line); background: #09121c; }
.companion-view-profile .referral-code-row { grid-column: 1 / -1; }
.companion-view-profile > .profile-actions-grid { margin: 0; grid-template-columns: minmax(0, 1fr); }
.companion-view-profile .profile-side-stack { width: 100%; }
.companion-view-profile .giveaway-module { padding: 20px; }
.companion-view-progress > .milestone-module { padding: 28px; gap: 22px; }
.companion-view-progress .next-goal { padding: 28px; background: #0b211c; border-color: #285c49; }
.companion-view-progress .next-goal h3 { font-size: 36px; }
.companion-view-progress .milestone-details .milestone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.companion-view-progress .milestone-details .milestone-card { background: #0b1620; border-color: #263746; padding: 20px; }
.companion-view-progress .milestone-details summary { padding: 18px 20px; }
.companion-view-collection .collection-hub { padding: 28px; grid-template-columns: minmax(200px, 240px) minmax(0, 1fr); column-gap: 32px; background: #09121c; }
.companion-view-collection .world-scenery { opacity: .09; }
.companion-view-collection .collection-hub .binder-page { width: min(100%, 590px); }
.companion-view-collection .collection-hub .binder-grid { padding: 12px; gap: 12px; background: #050d14; border-color: #263746; }
.companion-view-collection .collection-hub .binder-controls .collection-filters button { background: #0b1721; border-color: #293e4d; }
.companion-view-collection .collection-hub .binder-controls [aria-pressed='true'] { background: #0d2a21; border-color: #2d6c50; }
.companion-view-collection .binder-grid .asset-card { border-color: #30424b; }
.companion-view-studio .studio-module { min-height: 360px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; padding: 40px; background: #091b19; }
.companion-view-studio .studio-module h2, .companion-view-studio .studio-module p { margin: 0; }
.companion-view-studio .studio-module button { min-width: 200px; min-height: 48px; }
.companion-view-studio .studio-coming-soon { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); align-items:start; gap:20px 28px; background:#09121c; }
.studio-coming-soon-heading { grid-column:1 / -1; }
.studio-coming-soon-heading h2 { font-family:var(--app-display-font,"Dogica Pixel Bold"),monospace; font-size:clamp(18px,2vw,30px); line-height:1.5; }
.studio-coming-soon-art { position:relative; min-width:0; height:330px; width:100%; display:grid; place-items:center; border:1px solid #334b59; background:radial-gradient(circle at 50% 60%,#204c49,#102029 63%,#09141b); }
.studio-coming-soon-art canvas { width:242px; height:330px; max-width:100%; max-height:100%; object-fit:contain; image-rendering:pixelated; }
.studio-coming-soon-art [data-teaser-status] { position:absolute; color:#9fb2c8; font-size:12px; }
.studio-coming-soon-copy { display:grid; gap:18px; min-width:0; }
.studio-teaser-controls { display:grid; gap:12px; }
.studio-teaser-controls fieldset { border:0; padding:0; min-width:0; }
.studio-teaser-controls legend { color:#9fb2c8; font:600 12px/1.5 var(--app-ui-font,system-ui); margin-bottom:6px; }
.studio-teaser-controls fieldset div { display:flex; flex-wrap:wrap; gap:6px; }
.studio-teaser-controls button { min-width:0!important; min-height:40px!important; padding:8px 12px; border:1px solid #40576a; color:#d8e5eb; background:#10202c; cursor:pointer; }
.studio-teaser-controls button[aria-pressed="true"] { border-color:#14f195; background:#123b30; color:#bfffe0; }
.studio-coming-soon-note { display:inline-block; width:fit-content; border:1px solid #14f195; background:#14f195; color:#071b15; padding:12px 16px; text-decoration:none; font:700 14px/1.4 var(--app-ui-font,system-ui); }
.studio-coming-soon-note:hover { background:#70ffc2; }
.companion-active :is(button,input,select,textarea,a,.profile-module,.profile-card,.referral-strip,.asset-action-panel) { border-radius: 0; }
.companion-active .app-feedback { bottom: 20px; right: 20px; max-width: min(420px, calc(100vw - 40px)); box-shadow: 0 12px 32px #0008; }
.companion-active .asset-action-sheet { justify-items: end; padding: 0; background: #02081080; }
.companion-active .asset-action-panel {
  width: min(460px, 100vw); height: 100dvh; max-height: 100dvh; padding: 28px;
  border: 0; border-left: 1px solid #334a58; background: #09121c;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 22px;
}
.companion-active .asset-action-preview { flex: none; width: 100%; }
.companion-active .asset-action-copy { text-align: left; }
.companion-active .asset-action-sheet .asset-action-preview { max-height: none; }
.companion-active .asset-action-buttons { width: 100%; }
@media (min-width: 821px) {
  .companion-active .asset-action-sheet { place-items: center; padding: 20px; }
  .companion-active .asset-action-panel {
    width: min(560px, calc(100vw - 40px)); height: auto; max-height: calc(100dvh - 40px);
    overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr);
    gap: 12px; padding: 20px; border: 1px solid #334a58;
  }
  .companion-active .asset-action-preview { width: min(100%, 220px, 28dvh); max-height: min(220px, 28dvh); justify-self: center; }
  .companion-active .asset-action-copy { text-align: center; }
  .companion-active .asset-action-sheet.is-reveal #asset-action-cancel { display: none; }
}
@media (min-width: 1700px) {
  .companion-active .profile-first-shell { padding-inline: calc(var(--shell-rail) + 48px) 48px; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  body.companion-active { --shell-rail: 184px; }
  .companion-active .profile-first-shell { padding-inline: calc(var(--shell-rail) + 20px) 20px; }
  .companion-view-profile { grid-template-columns: minmax(0, 1fr); }
  .companion-view-collection .collection-hub { column-gap: 20px; grid-template-columns: minmax(170px, 200px) minmax(0, 1fr); padding: 20px; }
  .companion-view-profile .profile-identity h2 { max-width: 44vw; }
}
@media (max-width: 820px) {
  body.companion-active { --shell-header: calc(62px + env(safe-area-inset-top)); --shell-rail: 0px; }
  .companion-active .app-topbar {
    grid-template-columns: 104px minmax(0, 1fr) auto; gap: 8px;
    height: var(--shell-header); padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  }
  .companion-active .brand-link img { width: 96px; }
  .companion-active .wallet-actions { gap: 6px; }
  .companion-active .wallet-button { min-width: 40px; min-height: 40px; }
  .companion-active .profile-first-shell { padding: var(--shell-header) 14px calc(94px + env(safe-area-inset-bottom)); }
  .companion-view { gap: 16px; min-height: calc(100dvh - var(--shell-header) - 94px); }
  .companion-view-profile { grid-template-columns: minmax(0, 1fr); }
  .companion-view-profile > .profile-card { margin-inline: -14px; width: calc(100% + 28px); border: 0; border-bottom: 1px solid var(--shell-line); }
  .companion-view-profile .profile-banner { height: 190px; }
  .companion-view-profile .profile-main-row { bottom: -28px; padding: 0 18px; gap: 14px; }
  .companion-view-profile .profile-main-row .profile-avatar { width: 84px; }
  .companion-view-profile .profile-identity h2 { font-size: clamp(18px, 5vw, 24px); max-width: calc(100vw - 140px); margin-bottom: 30px; }
  .companion-view-profile .profile-stat-strip { padding-top: 40px; }
  .companion-view-profile .profile-stat-strip article { min-height: 76px; padding: 12px 18px 16px; }
  .companion-view-profile .profile-stat-strip article > span { font-size: 8px; }
  .companion-view-profile .profile-stat-strip strong { font-size: clamp(14px, 4vw, 18px); }
  .companion-view-profile .profile-more-stats summary { padding: 14px 18px; }
  .companion-view-profile .profile-more-stats summary span { font-size: 11px; }
  .companion-view-profile .profile-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 18px; gap: 8px; }
  .companion-view-profile .profile-tools a, .companion-view-profile .profile-tools button { width: 100%; min-width: 0; padding: 10px 8px; font-size: 13px; gap: 8px; }
  .companion-view-profile > .referral-strip { padding: 18px; }
  .companion-view-profile .giveaway-module { padding: 18px; }
  .companion-view-progress, .companion-view-collection, .companion-view-rewards, .companion-view-studio { padding-top: 16px; }
  .companion-view-progress > .milestone-module { padding: 18px; gap: 18px; }
  .companion-view-progress .next-goal { padding: 18px; }
  .companion-view-progress .next-goal h3 { font-size: 26px; }
  .companion-view-progress .milestone-details .milestone-grid { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .companion-view-progress .milestone-details summary { padding: 16px 12px; }
  .companion-view-progress .milestone-details summary span { display: block; margin: 8px 0 0; }
  .companion-view-collection .collection-hub { padding: 18px 12px; grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .companion-view-collection .collection-hub .binder-grid { padding: 8px; gap: 8px; }
  .companion-view-collection .collection-hub .binder-page { display: contents; }
  .companion-view-collection .collection-hub .module-title h2 { font-size: 11px; }
  .companion-view-collection .collection-hub .module-title strong { font-size: 12px; }
  .companion-view-collection .binder-pagination { min-height: 46px; }
  .companion-view-collection .world-scenery { opacity: .07; }
  .companion-view-studio .studio-module { min-height: 320px; padding: 24px; }
  .companion-view-studio .studio-coming-soon { grid-template-columns:1fr; gap:12px; padding:16px; }
  .studio-coming-soon-art { height:156px; }
  .studio-coming-soon-art canvas { width:110px; height:156px; }
  .studio-coming-soon-copy, .studio-teaser-controls { gap:8px; }
  .studio-teaser-controls legend { margin-bottom:3px; }
  .studio-teaser-controls button { min-height:36px!important; padding:6px 10px; }
  .companion-rail { display: contents; }
  .companion-rail .mini-profile-bar { display: none; }
  .companion-rail .companion-nav {
    position: fixed; z-index: 30; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
    padding: 6px max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    border-top: 1px solid #2b3e4a; background: #071019; box-shadow: none;
  }
  .companion-rail .companion-nav a { display: grid; justify-content: center; justify-items: center; gap: 5px; min-height: 54px; padding: 7px 4px; font-size: 12px; border: 0; border-top: 2px solid transparent; }
  .companion-rail .companion-nav a[aria-current] { border-color: #14f195; box-shadow: none; background: #0c211c; }
  .companion-rail .companion-nav svg { width: 20px; height: 20px; }
  .companion-rail .companion-nav-icon { width:20px; height:20px; }
  .companion-active .app-feedback { bottom: calc(84px + env(safe-area-inset-bottom)); right: 12px; left: 12px; max-width: none; padding: 14px; }
  .companion-active .asset-action-sheet { align-items: end; justify-items: center; padding: 0; }
  .companion-active .asset-action-panel { width: 100%; height: auto; max-height: calc(100dvh - env(safe-area-inset-top) - 20px); padding: 24px 20px max(24px, env(safe-area-inset-bottom)); border: 0; border-top: 1px solid #334a58; gap: 18px; }
  .companion-active .asset-action-preview { width: min(100%, 280px); align-self: center; }
  .companion-active .asset-action-sheet.is-world .asset-action-preview { width: 100%; }
  .companion-active .asset-action-copy { text-align: center; }
}
@media (max-width: 360px) {
  .companion-active .app-topbar { grid-template-columns: 88px minmax(0, 1fr) auto; }
  .companion-active .brand-link img { width: 84px; }
  .companion-view-profile .profile-tools { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .companion-rail .companion-nav a { transition: none; }
}
/* Keep the social identity above the stats surface, and bound the legacy full-bleed card. */
.companion-view-profile > .profile-card { margin-left: 0; border: 1px solid var(--shell-line); }
.companion-view-profile .profile-main-row { z-index: 4; }
.companion-view-collection .collection-hub::before { content: none; }
.companion-active .secondary-button { min-height: 44px; font: 600 14px/1.4 var(--app-ui-font); letter-spacing: normal; box-shadow: none; }
.companion-active .referral-code-row code { min-height: 44px; font: 14px/1.5 var(--app-ui-font); }
.companion-active .referral-strip-label > span { font-size: 9px; }
.companion-active .referral-strip-stat > span { font: 12px/1.5 var(--app-ui-font); }
.companion-active .giveaway-module .module-note, .companion-active .giveaway-checkline { font: 14px/1.6 var(--app-ui-font); text-transform: none; }
.companion-active .giveaway-module h3 { font-size: 16px; line-height: 1.7; }
.companion-active .giveaway-live-strip { font-size: 8px; }
.companion-active .giveaway-entry-row input { font: 15px/1.5 var(--app-ui-font); min-height: 44px; }
.companion-active .giveaway-requirements summary { font: 14px/1.5 var(--app-ui-font); }
.companion-active .wallet-button { min-height: 44px; min-width: 44px; }
@media (min-width: 1101px) {
  .companion-view-profile:has(.profile-actions-grid) > .profile-card { grid-column: 1; grid-row: 1; }
  .companion-view-profile:has(.profile-actions-grid) > .referral-strip { grid-column: 1; grid-row: 2; }
  .companion-view-profile > .profile-actions-grid { grid-column: 2; grid-row: 1 / span 2; }
  .companion-view-profile:has(.profile-actions-grid) .profile-banner { height: 260px; }
  .companion-view-profile:has(.profile-actions-grid) .profile-identity h2 { font-size: clamp(22px, 2.2vw, 32px); max-width: min(500px, 34vw); }
}
@media (max-width: 820px) {
  .companion-view-profile > .profile-card { margin-inline: -14px; border: 0; border-bottom: 1px solid var(--shell-line); }
  .companion-active .giveaway-module h3 { font-size: 15px; }
}
@media (max-width: 820px) {
  /* The profile cover reaches the viewport edge; controls sit over the artwork. */
  .companion-active[data-companion-view='profile'] .app-topbar {
    position: absolute;
    background: transparent;
    border-bottom: 0;
  }
  .companion-active[data-companion-view='profile'] .profile-first-shell { padding-top: 0; }
  .companion-active[data-companion-view='profile'] .profile-banner { height: calc(190px + var(--shell-header)); }
}
/* Studio shares the companion chrome, navigation and content bounds. */
.companion-active .app-topbar { border-bottom: 0; }
.companion-view-studio > [hidden], .studio-workspace[hidden] { display: none !important; }
.studio-workspace { width: 100%; height: calc(100dvh - var(--shell-header) - 68px); min-height: 0; display: flex; flex-direction: column; }
.companion-view-studio .studio-editor {
  min-height: 0; min-width: 0; width: 100%; max-width: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
  background: transparent; border: 0; overflow: hidden;
  scroll-padding-block: 8px;
}
.studio-heading-actions { display: flex; align-items: center; gap: 18px; flex: none; }
.companion-active .studio-workspace .studio-editor .studio-heading h2 {
  font-family: var(--app-display-font); font-weight: 400; font-synthesis: none;
  font-size: 20px; line-height: 1.7; letter-spacing: normal;
}
.studio-workspace .studio-heading { flex-shrink: 0; }
.studio-workspace .studio-notice, .studio-workspace .studio-flow { flex-shrink: 0; }
.studio-workspace .studio-layout { display: grid; flex: 1; min-height: 0; align-items: stretch; gap: 28px; }
.studio-workspace .studio-preview { position: relative; width: min(100%, calc(100dvh - var(--shell-header) - 290px)); max-height: 100%; justify-self: center; align-self: start; }
.studio-workspace .studio-controls { display: flex; flex-direction: column; min-height: 0; }
.studio-workspace .studio-category-tabs, .studio-workspace .studio-picker-heading { flex-shrink: 0; }
.studio-workspace .studio-trait-scroller { position: relative; flex: 1; min-height: 0; min-width: 0; overflow: hidden; }
.studio-workspace .studio-trait-grid { overflow-y: auto; width: 100%; height: 100%; min-height: 0; align-content: start; overscroll-behavior: contain; padding-right: 16px; box-sizing: border-box; scrollbar-width: none; }
.studio-workspace .studio-trait-grid::-webkit-scrollbar { display: none; width: 0; }
.studio-workspace .studio-trait-scrollbar { position: absolute; z-index: 2; top: 2px; right: 1px; bottom: 2px; width: 9px; background: #10212b; border: 1px solid #314d55; touch-action: none; cursor: pointer; }
.studio-workspace .studio-trait-scrollbar[hidden] { display: none; }
.studio-workspace .studio-trait-scrollbar-thumb { width: 100%; background: #416e69; min-height: 28px; }
.studio-workspace .studio-trait-scrollbar:hover .studio-trait-scrollbar-thumb { background: #14f195; }
@media (min-width: 1400px) {
  .studio-workspace .studio-trait-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.studio-workspace .studio-review { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.studio-workspace .studio-review p { margin: 6px 0; }
.studio-workspace .studio-download, .studio-workspace .studio-status { flex-shrink: 0; }
@media (max-width: 820px) {
  .companion-active[data-companion-view='studio'] .profile-first-shell { padding: calc(var(--shell-header) + 12px) 14px calc(82px + env(safe-area-inset-bottom)); }
  .companion-view-studio { padding-top: 0; min-height: 0; }
  .studio-workspace { height: calc(100dvh - var(--shell-header) - 94px - env(safe-area-inset-bottom)); }
  .companion-active .studio-workspace .studio-editor .studio-heading h2 { font-size: 16px; }
  .studio-heading-actions { gap: 10px; }
  .studio-workspace .studio-draft-indicator { display: none; }
  .studio-workspace .studio-layout { display: flex; flex-direction: column; gap: 10px; }
  .studio-workspace .studio-preview { width: 100%; max-height: none; align-self: auto; }
  .studio-workspace .studio-stage { height: clamp(126px, 20dvh, 180px); }
  .studio-workspace [data-studio-step='review'] .studio-stage,
  .studio-workspace [data-studio-step='upload'] .studio-stage { height: clamp(112px, 17dvh, 150px); }
  .studio-workspace .studio-editor .studio-recolor { bottom: calc(68px + env(safe-area-inset-bottom)); max-height: calc(100dvh - var(--shell-header) - 90px); }
}
/* The launch card's large button sizing must not cascade into editor controls. */
.companion-view-studio .studio-editor button { min-width: 0; }
.studio-workspace .studio-tabs button { min-height: 36px; }
.studio-workspace .studio-category-tabs button { min-height: 44px; }
.studio-workspace .studio-heading button { min-height: 40px; }
@media (max-width: 820px) {
  .studio-workspace .studio-preview { display: grid; grid-template-columns: minmax(0,1fr) 88px; gap: 8px; padding: 8px; align-items: center; }
  .studio-workspace .studio-preview-tools { flex-direction: column; gap: 0; }
  .studio-workspace .studio-tabs { flex-direction: column; width: 100%; margin: 0; }
  .studio-workspace .studio-tabs button { min-height: 36px; }
  .studio-workspace .studio-editor [data-motion] { min-height: 28px; margin: 3px 0 0; }
}

/* Persistent collectible states are independent of rarity and selection color. */
.companion-active .asset-card { position: relative; }
.companion-active .collectible-state,
.companion-active .collectible-new {
  position: absolute; z-index: 2; pointer-events: none;
  font: 600 11px/1.3 var(--app-ui-font); text-transform: none;
  padding: 5px 7px; border: 1px solid #3a4c58; background: #09121cf2; color: #bed0dc;
}
.companion-active .collectible-state { inset: auto 5px 5px auto; }
.companion-active .collectible-state[data-state='equipped'] { color: #14f195; border-color: #32705b; background: #08241ef5; }
.companion-active .collectible-state[data-state='missing'] { color: #9cabb8; }
.companion-active .collectible-new { inset: 5px auto auto 5px; color: #071019; background: #14f195; border-color: #14f195; }
.companion-active .asset-art { background-color: #152530; }
.companion-active .app-feedback[data-kind='is-allowed'] { border-color: #32705b; padding-block: 12px; }
.companion-active .app-feedback[data-kind='is-allowed'] strong::before { content: '✓ '; color: #14f195; }
.companion-active .app-feedback[data-kind='is-claim-success'] { border-color: #14f195; padding-block: 12px; }
.companion-active .app-feedback[data-kind='is-claim-success'] strong::before { content: '✓ '; color: #14f195; }
.companion-active .app-feedback p { font-size: 13px; }
.companion-active .asset-action-panel { overflow-y: auto; overscroll-behavior: contain; }
.companion-active .asset-action-buttons { margin-top: auto; flex-shrink: 0; }
.companion-active .asset-action-buttons :is(button,a) { min-height: 44px; }
.companion-active .asset-action-buttons :is(#asset-action-avatar,#asset-action-banner) { color: #04130d; background: #14f195; border-color: #14f195; }
.companion-active .asset-action-buttons #asset-action-avatar:not([hidden]) { grid-column: 1 / -1; }
.companion-active .asset-action-buttons button[aria-busy='true'] { opacity: .75; cursor: progress; }
.companion-active .asset-action-feedback:empty { display: none; }
.companion-active .asset-action-feedback[data-kind='busy'] { color: #bed0dc; }
.companion-active .asset-action-feedback[data-kind='is-error'] { color: #ffb5b5; }
.companion-active #asset-action-ownership { color: #b5c6d2; }
.companion-active [data-equipped='true'] #asset-action-ownership { color: #14f195; }
@media (max-width: 820px) {
  .companion-active .asset-action-buttons {
    position: sticky; bottom: calc(-1 * max(24px, env(safe-area-inset-bottom)));
    background: #09121c; z-index: 3; padding: 14px 0 max(24px, env(safe-area-inset-bottom));
    margin-bottom: calc(-1 * max(24px, env(safe-area-inset-bottom)));
    border-top: 1px solid var(--shell-line); gap: 8px;
  }
  .companion-active .asset-action-buttons :is(#asset-action-avatar,#asset-action-banner) { grid-column: 1 / -1; }
  .companion-active .asset-action-sheet.is-reveal #asset-action-cancel { grid-column: 1 / -1; width: min(100%, 220px); justify-self: center; }
  .companion-view-collection .binder-pagination { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 4; padding: 8px; background: #09121c; border: 1px solid var(--shell-line); }
  .companion-active .collectible-state { font-size: 10px; padding: 4px 5px; }
}
/* Reserve the profile's main shapes while the initial session loads. Refreshes keep existing content. */
.companion-loading-layout { width: min(100%,1280px); margin: 0 auto; text-align: left; border: 1px solid #263746; background: #09121c; }
.companion-loading-layout :is(i,span) { display: block; background: #172a36; }
.loading-cover { height: clamp(230px,22vw,300px); background: #12222e; }
.loading-identity { display: flex; align-items: center; gap: 20px; padding: 0 28px; margin-top: -56px; }
.loading-identity i { width: 112px; height: 112px; border: 4px solid #09121c; }
.loading-identity span { width: 190px; max-width: 50%; height: 20px; }
.loading-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; padding: 24px 28px; border-bottom: 1px solid #263746; }
.loading-stats i { height: 40px; }
.loading-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 24px 28px; }
.loading-panels i { height: 180px; }
.app-startup:not([data-state='loading']) .companion-loading-layout { display: none; }
/* Align initial placeholders with the loaded shell instead of shifting a centered splash. */
body.is-starting .app-topbar { position: fixed; inset: 0 0 auto; height: 76px; z-index: 30; padding: 0 24px; border: 0; background: #070e16; }
body.is-starting .app-topbar .brand-link { position: absolute; inset: 0 auto 0 0; width: 216px; display: flex; align-items: center; justify-content: center; }
body.is-starting .app-topbar .brand-link img { width: 132px; }
.app-startup[data-state='loading'] { justify-content: flex-start; position: relative; min-height: 100dvh; padding: 104px 28px 40px 244px; gap: 0; }
.app-startup[data-state='loading'] > [role='status'] { position: fixed; z-index: 31; bottom: 24px; right: 24px; max-width: calc(100vw - 48px); padding: 16px; border: 1px solid #263746; background: #09121c; text-align: left; }
.app-startup[data-state='loading'] .app-startup-indicator { width: 83px; height: 61px; position: fixed; bottom: 136px; right: 28px; z-index: 31; }
.loading-panels i { height: 180px; }
.loading-navigation { position: fixed; inset: 76px auto 0 0; width: 216px; padding: 28px 16px; border-right: 1px solid #263746; background: #070e16; display: flex; flex-direction: column; gap: 12px; }
.loading-navigation i { display: block; height: 52px; background: #10212c; }
.app-startup:not([data-state='loading']) .loading-navigation { display: none; }
@media (min-width: 821px) and (max-width: 1100px) {
  body.is-starting .app-topbar .brand-link, .loading-navigation { width: 184px; }
  .app-startup[data-state='loading'] { padding-inline: 204px 20px; }
}
@media (max-width: 820px) {
  body.is-starting .app-topbar { height: calc(62px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0; background: transparent; }
  body.is-starting .app-topbar .brand-link { position: static; width: fit-content; }
  body.is-starting .app-topbar .brand-link img { width: 96px; }
  .app-startup[data-state='loading'] { padding: 0 0 100px; }
  .companion-loading-layout { border-inline: 0; }
  .loading-cover { height: calc(252px + env(safe-area-inset-top)); }
  .loading-identity { padding-inline: 18px; margin-top: -36px; }
  .loading-identity i { width: 72px; height: 72px; }
  .loading-stats { padding: 24px 18px; }
  .loading-panels { grid-template-columns: 1fr; padding: 20px 18px; }
  .loading-panels i { height: 100px; }
  .loading-navigation { inset: auto 0 0; width: 100%; height: calc(73px + env(safe-area-inset-bottom)); flex-direction: row; padding: 8px 12px max(8px,env(safe-area-inset-bottom)); border: 0; border-top: 1px solid #263746; z-index: 30; }
  .loading-navigation i { flex: 1; height: 100%; }
  .app-startup[data-state='loading'] > [role='status'] { bottom: calc(88px + env(safe-area-inset-bottom)); right: 12px; left: 12px; max-width: none; }
  .app-startup[data-state='loading'] .app-startup-indicator { bottom: calc(200px + env(safe-area-inset-bottom)); right: 16px; }
}

/* Keep the workspace title anchored when create-only controls disappear. */
.studio-workspace .studio-heading { min-height: 40px; height: 40px; }
.studio-workspace .studio-heading-actions { min-height: 40px; }
.companion-active .collectible-state { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; font-size: 14px; line-height: 1; }

/* Size the editor from its available space, including recovery controls. */
.studio-workspace .studio-layout { container-type: size; overflow: hidden; }
.studio-workspace .studio-controls { min-height: 0; height: 100%; overflow: hidden; }
.studio-workspace .studio-preview {
  display: grid; grid-template-rows: minmax(0, 1fr) auto auto;
  width: min(100%, calc(100cqh - 120px)); height: 100%; min-height: 0;
  box-sizing: border-box; align-self: stretch;
}
.studio-workspace .studio-stage { min-height: 0; height: 100%; aspect-ratio: auto; }
.studio-workspace .studio-notice { position: relative; overflow: visible; }
.studio-workspace .studio-notice[open] > p {
  position: absolute; inset: 100% 0 auto; z-index: 8; margin: 0;
  padding: 12px; border: 1px solid var(--shell-line); background: #09121c;
}
.studio-workspace .studio-resume { flex-shrink: 0; }
.studio-workspace .studio-flow { margin-block: 8px 12px; }
.studio-workspace .studio-resume button { min-height: 44px; padding-block: 6px; }
.studio-workspace .studio-picker-heading { margin-block: 6px; }
@media (max-width: 820px) {
  .studio-workspace .studio-layout { gap: 8px; }
  .studio-workspace .studio-preview {
    grid-template-columns: minmax(0, 1fr) 88px;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%; height: auto; flex: 0 0 clamp(116px, 29cqh, 210px);
  }
  .studio-workspace .studio-stage,
  .studio-workspace [data-studio-step='review'] .studio-stage,
  .studio-workspace [data-studio-step='upload'] .studio-stage { height: 100%; }
  .studio-workspace .studio-preview-tools { grid-column: 2; grid-row: 1 / -1; }
  .studio-workspace .studio-frame-controls { grid-column: 1; grid-row: 2; }
  .studio-workspace .studio-resume { flex-wrap: nowrap; margin: 4px 0; }
  .studio-workspace .studio-resume button { flex: 1; min-height: 44px; padding: 6px; font-size: 11px; }
  .studio-workspace .studio-picker-heading { margin: 4px 0; }
  .studio-workspace .studio-picker-heading button { min-height: 32px; }
  .studio-workspace .studio-download { min-height: 44px; margin-top: 6px; }
  .studio-workspace .studio-status { padding: 0; margin: 3px 0; min-height: 14px; }
  .studio-workspace .studio-controls { flex: 1; height: auto; }
  .studio-workspace .studio-tabs button { min-height: 32px; }
}
@media (max-width: 820px) and (max-height: 700px) {
  .companion-active[data-companion-view='studio'] .profile-first-shell { padding-top: calc(var(--shell-header) + 6px); }
  .studio-workspace { height: calc(100dvh - var(--shell-header) - 88px - env(safe-area-inset-bottom)); }
  .studio-workspace .studio-heading,
  .studio-workspace .studio-heading-actions { height: 32px; min-height: 32px; }
  .studio-workspace .studio-heading button { min-height: 32px; }
  .studio-workspace .studio-flow { margin-block: 4px 6px; }
  .studio-workspace .studio-resume { margin-block: 2px; }
  .studio-workspace .studio-picker-heading { margin-block: 2px; }
  .studio-workspace .studio-preview { flex-basis: 100px; padding: 4px; gap: 4px; }
  .studio-workspace .studio-notice summary { min-height: 22px; }
  .studio-workspace .studio-category-tabs { padding-bottom: 2px; }
}

/* Keep older giveaway results and prize claims reachable alongside new entries. */
.giveaway-selector { display: grid; gap: 8px; margin: 16px 0; color: var(--muted, #9fb2c8); }
.giveaway-selector select { width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid #304350; border-radius: 0; background: #0c1922; color: #eef4ff; font: inherit; }

.giveaway-digital-claim { display: grid; gap: 14px; margin-top: 16px; padding: 16px; border: 1px solid #00e99a; background: #071c18; min-width: 0; }
.giveaway-network { color: #00e99a; font: 11px/1.5 var(--app-ui-font); letter-spacing: .08em; }
.giveaway-digital-claim [data-prize-claim] { width: 100%; min-height: 48px; border-radius: 0; white-space: normal; }
.giveaway-digital-claim [data-prize-link] { color: #00e99a; font: 14px/1.5 var(--app-ui-font); overflow-wrap: anywhere; }
.giveaway-digital-claim [hidden] { display: none; }
.giveaway-digital-claim [data-prize-claim] { background: #00e99a; color: #03150e; border: 1px solid #00e99a; padding: 12px 16px; font: 700 15px/1.4 var(--app-ui-font); cursor: pointer; }
.giveaway-digital-claim [data-prize-claim]:disabled { background: #123e31; color: #b6eed8; border-color: #28644e; opacity: 1; cursor: default; }
.giveaway-digital-claim [data-prize-claim]:focus-visible { outline: 2px solid #ecfff8; outline-offset: 3px; }
.giveaway-digital-claim [data-prize-phone-panel] { display: grid; gap: 12px; }
.giveaway-digital-claim [data-prize-phone-panel][hidden] { display: none; }
.giveaway-digital-claim [data-prize-qr] { padding: 12px; width: fit-content; background: #fff; }
.giveaway-digital-claim [data-prize-qr] img { width: 176px; height: 176px; image-rendering: pixelated; }
.giveaway-digital-claim [data-prize-phone-link] { color: #00e99a; }
@media (max-width: 820px) { .giveaway-phone-action, .giveaway-digital-claim [data-prize-phone-panel] { display: none; } }

/* Giveaways: outstanding prizes remain above discovery, history stays quiet. */
.giveaway-hub { display: grid; gap: 24px; min-width: 0; }
.giveaway-hub [hidden] { display: none !important; }
.giveaway-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.companion-active .giveaway-section-heading h3 { margin: 0; font: 11px/1.7 'Dogica Pixel Bold', 'Dogica Pixel', monospace; color: #e9f3f6; }
.giveaway-section-heading > span { color: #14f195; font: 600 13px/1.5 var(--app-ui-font); white-space: nowrap; }
.past-drops{min-width:0;padding-top:20px;border-top:1px solid #315344}
.past-drops-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.past-drop-card{min-width:0;border:1px solid #344956;background:#0b1822;overflow:hidden}
.past-drop-art{display:grid;place-items:center;aspect-ratio:1;background:radial-gradient(circle at 68% 24%,#55427c77,transparent 52%),linear-gradient(145deg,#12352d,#101c35);overflow:hidden}
.past-drop-art img{display:block;width:100%;height:100%;object-fit:contain}
.past-drop-card[data-prize-kind='token'] .past-drop-art img{width:52%;height:52%;max-width:180px;max-height:180px;object-fit:contain;filter:drop-shadow(8px 8px 0 #07141d88)}
.past-drop-card[data-token='usdc'] .past-drop-art img{filter:invert(1) drop-shadow(8px 8px 0 #07141d88)}
.past-drop-card[data-prize-kind='cnft-v1'] .past-drop-art img{image-rendering:pixelated}
.past-drop-placeholder{display:grid;place-items:center;width:52%;aspect-ratio:1;border:3px solid #14f195;color:#14f195;background:#07141d;font:clamp(30px,5vw,60px)/1 var(--app-display-font);box-shadow:8px 8px 0 #8a62cb77}
.past-drop-card[data-prize-kind='physical'] .past-drop-placeholder{border-color:#a683ee;color:#e3d3ff;box-shadow:8px 8px 0 #14f19566}
.past-drop-copy{padding:12px;min-width:0}.past-drop-copy>span{color:#14f195;font:600 11px/1.4 var(--app-ui-font);text-transform:uppercase;letter-spacing:.04em}.past-drop-copy h4{margin:7px 0 5px;color:#ecf4f3;font:600 14px/1.4 var(--app-ui-font);overflow-wrap:anywhere}.past-drop-copy p{margin:0;color:#9fb2c8;font:12px/1.4 var(--app-ui-font)}
@media(max-width:820px){.past-drops-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.past-drop-copy{padding:10px}.past-drop-copy h4{font-size:12px}}
.giveaway-prize-list { display: grid; gap: 12px; }
.companion-view-profile [data-outstanding-prize] { padding: 16px; border: 1px solid #28634e; border-left: 3px solid #14f195; background: #091d18; }
[data-outstanding-prize] .giveaway-live-strip > span { display: none; }
[data-outstanding-prize] .giveaway-live-strip { margin-bottom: 10px; padding: 0; background: none; border: 0; }
[data-outstanding-prize] .giveaway-headline { margin-bottom: 0; }
[data-outstanding-prize] .giveaway-eyebrow { display: none; }
[data-outstanding-prize] .giveaway-digital-claim { border: 0; background: none; padding: 0; margin-top: 12px; gap: 10px; }
[data-outstanding-prize] .giveaway-network { font-size: 10px; }
.giveaway-history { border: 1px solid #293c49; background: #09121c; min-width: 0; }
.giveaway-history > summary { display: flex; align-items: center; gap: 12px; padding: 16px; min-height: 48px; cursor: pointer; list-style: none; font: 600 14px/1.5 var(--app-ui-font); }
.giveaway-history > summary::-webkit-details-marker { display: none; }
.giveaway-history [data-history-count] { color: #91a8b8; }
.giveaway-chevron { margin-left: auto; color: #14f195; font-size: 20px; }
.giveaway-history[open] > summary .giveaway-chevron { transform: rotate(45deg); }
.giveaway-history-item { border-top: 1px solid #293c49; }
.giveaway-history-item > summary { display: grid; gap: 6px; padding: 16px; cursor: pointer; font: 600 14px/1.5 var(--app-ui-font); overflow-wrap: anywhere; }
.giveaway-history-item > summary small { font-weight: 400; color: #91a8b8; }
.giveaway-history .giveaway-module { border: 0; margin: 0; }
.giveaway-history summary:focus-visible { outline: 2px solid #14f195; outline-offset: -4px; }
.giveaway-empty { color: #91a8b8; font: 14px/1.6 var(--app-ui-font); margin: 0; }
.giveaway-hub .giveaway-claim-grid input { min-width: 0; }
@media (max-width: 820px) {
  .giveaway-hub { gap: 20px; }
  .giveaway-hub button { min-height: 44px; }
}

/* Rewards has its own companion section; profile identity remains unchanged. */
.profile-reward-notice{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:18px 0;padding:16px 20px;border:1px solid #285b49;border-left:3px solid #14f195;background:#0c211c;color:#d9f3e7;text-decoration:none;font:14px/1.5 Arial}
.profile-reward-notice[hidden]{display:none!important}.profile-reward-notice>span:last-child{color:#14f195;font-weight:700}
.profile-home-cards{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:10px;padding:16px 28px;background:#09121c}
.profile-home-action,.profile-visit-changes{min-width:0;min-height:112px;border:1px solid var(--shell-line);background:#0b1b24;padding:16px 18px}
.profile-home-action{display:flex;align-items:center;justify-content:space-between;gap:16px;border-left:3px solid #14f195}
.profile-home-kicker{display:block;margin:0;color:#14f195;font:600 11px/1.5 var(--app-ui-font);letter-spacing:.05em;text-transform:uppercase}
.profile-visit-heading h3{display:block;margin:0;color:#e6f1f3;font:400 12px/1.5 var(--app-display-font)}
.profile-home-action p,.profile-visit-changes p{margin:10px 0 0;color:#d6e4e9;font:14px/1.45 var(--app-ui-font)}
.profile-home-action a{flex:none;display:inline-flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid #14f195;background:#14f195;color:#061812;font:700 13px/1.2 var(--app-ui-font);text-decoration:none}
.profile-home-action a:hover,.profile-home-action a:focus-visible{background:#a4ffd7}
.profile-visit-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.profile-visit-heading span{color:#8fa8b7;font:12px/1.3 var(--app-ui-font);white-space:nowrap}
.profile-visit-heading h3{white-space:nowrap}
@media(min-width:821px) and (max-width:1180px){.profile-home-cards{grid-template-columns:1fr}}
@media(max-width:820px){.profile-home-cards{grid-template-columns:1fr;padding:12px 18px;gap:8px}.profile-home-action,.profile-visit-changes{min-height:0;padding:13px 14px}.profile-home-action p,.profile-visit-changes p{font-size:13px}.profile-home-action a{padding:10px 12px;font-size:12px}}
.rewards-heading{position:relative;isolation:isolate;min-height:116px;margin-bottom:24px;padding:4px 0 22px;border-bottom:1px solid #315344;overflow:hidden}
.rewards-heading::before{content:'';position:absolute;z-index:-1;inset:0 0 0 48%;background:linear-gradient(135deg,transparent 28%,#14f19513 28% 36%,transparent 36% 54%,#8d64d823 54% 62%,transparent 62%),repeating-linear-gradient(0deg,transparent 0 9px,#7b70bb13 9px 10px);mask-image:linear-gradient(90deg,transparent,#000 32%);pointer-events:none}
.rewards-heading::after{content:'';position:absolute;right:0;bottom:0;width:88px;height:3px;background:linear-gradient(90deg,#14f195 0 34%,#75c4d9 34% 67%,#a16ad7 67%);pointer-events:none}
.rewards-heading h2{margin:0;color:#eafaf4}.rewards-heading p,.rewards-empty p{font:15px/1.6 var(--app-ui-font);color:#abc4c6}.rewards-heading p{margin:8px 0 0}
.companion-view-rewards{width:100%;min-width:0}.companion-view-rewards #companion-rewards{min-width:0;padding:28px;border:1px solid var(--shell-line);background:radial-gradient(circle at 95% 0,#34558b24,transparent 34%),radial-gradient(circle at 8% 40%,#14f1950b,transparent 42%),var(--shell-surface)}.companion-view-rewards .giveaway-hub{width:100%;max-width:none;margin:auto}.rewards-empty{border:1px solid #315044;border-left:3px solid #14f195;padding:28px;background:linear-gradient(110deg,#0c241d,#09121c 68%)}
.claimed-prize-spotlight{position:relative;overflow:hidden;display:grid;gap:18px;max-width:1100px;margin:0 auto 24px;padding:24px;border:1px solid #14f195;border-left:4px solid #14f195;background:radial-gradient(circle at 86% 20%,rgba(20,241,149,.17),transparent 34%),linear-gradient(120deg,rgba(126,95,196,.13),transparent 55%),#0a1b1b;color:#e9f3f6}
.claimed-prize-burst{position:absolute;right:22px;top:10px;color:#14f195;letter-spacing:13px;font-size:20px;opacity:.65;pointer-events:none}
.claimed-prize-kicker{position:relative;color:#14f195;font:10px/1.6 'Dogica Pixel Bold',monospace;letter-spacing:.03em}
.claimed-prize-main{position:relative;display:flex;align-items:center;gap:22px;min-width:0}
.claimed-prize-art{display:grid;place-items:center;flex:0 0 112px;width:112px;height:112px;border:1px solid #3a725e;background:#102b28;overflow:hidden}
.claimed-prize-art img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.claimed-prize-symbol{color:#14f195;font-size:62px}
.claimed-prize-main h3{margin:0 0 10px;font:13px/1.8 'Dogica Pixel Bold',monospace;overflow-wrap:anywhere}
.claimed-prize-main p{margin:0;color:#b7d2cc;font:15px/1.5 var(--app-ui-font)}
.claimed-prize-actions{position:relative;display:flex;flex-wrap:wrap;gap:10px}
.claimed-prize-actions :is(button,a){min-height:44px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
@media(max-width:600px){.claimed-prize-spotlight{padding:18px;gap:14px}.claimed-prize-art{flex-basis:84px;width:84px;height:84px}.claimed-prize-main{gap:14px}.claimed-prize-main h3{font-size:10px}.claimed-prize-main p{font-size:13px}.claimed-prize-actions{display:grid;grid-template-columns:1fr 1fr}.claimed-prize-actions [data-view-claimed-prize]{grid-column:1/-1}}
@media(max-width:820px){.companion-rail .companion-nav{grid-template-columns:repeat(5,minmax(0,1fr))}.companion-rail .companion-nav a{font-size:11px}.profile-reward-notice{padding:14px;gap:10px;font-size:12px}.companion-view-rewards #companion-rewards{padding:18px 12px}}
@media(max-width:820px){.rewards-heading{min-height:98px;margin-bottom:18px;padding-bottom:16px}.rewards-heading::before{inset:0 0 0 40%}}
@media(max-width:360px){.companion-rail .companion-nav a{font-size:10px;padding-inline:2px}}

/* Mobile Studio is one workspace: fixed preview and actions, bounded content. */
.studio-review-body { display:contents; }
@media(max-width:820px) {
  .companion-active[data-companion-view='studio'] .profile-first-shell { padding-top:calc(var(--shell-header) + 4px); padding-inline:12px; }
  .studio-workspace { height:calc(100dvh - var(--shell-header) - 82px - env(safe-area-inset-bottom)); }
  .studio-workspace .studio-heading,.studio-workspace .studio-heading-actions { height:36px; min-height:36px; }
  .studio-workspace .studio-heading button { min-height:36px; padding:4px 10px; }
  .studio-workspace .studio-flow { margin:4px 0 8px; gap:6px; }
  .studio-workspace .studio-flow li { padding-top:5px; font-size:10px; }
  .studio-workspace .studio-flow li span { margin-left:4px; }
  .studio-workspace .studio-notice summary { min-height:22px; }
  .studio-workspace .studio-layout { gap:8px; }
  .studio-workspace .studio-preview {
    flex:0 0 clamp(120px,21dvh,164px); grid-template-columns:auto minmax(0,1fr);
    grid-template-rows:minmax(0,1fr) auto; padding:6px; gap:6px 12px;
  }
  .studio-workspace .studio-stage,
  .studio-workspace [data-studio-step='review'] .studio-stage,
  .studio-workspace [data-studio-step='upload'] .studio-stage {
    width:auto; height:100%; aspect-ratio:1; grid-column:1; grid-row:1 / -1; justify-self:start;
  }
  .studio-workspace .studio-preview-tools { grid-column:2; grid-row:1; min-width:0; }
  .studio-workspace .studio-tabs { flex-direction:column; gap:2px; padding:2px; }
  .studio-workspace .studio-tabs button { min-height:36px; padding:2px 6px; }
  .studio-workspace .studio-frame-controls { grid-column:2; grid-row:2; margin:0; gap:3px; }
  .studio-workspace .studio-frame-controls button { min-height:32px; padding:2px 4px; font-size:10px; }
  .studio-workspace .studio-frame-controls output { font-size:10px; min-width:28px; }
  .studio-workspace .studio-preview:has(.studio-frame-controls:not([hidden])) .studio-tabs { flex-direction:row; }
  .studio-workspace .studio-preview:has(.studio-frame-controls:not([hidden])) .studio-tabs button { min-height:40px; font-size:10px; }
  .studio-workspace .studio-controls {
    display:grid; grid-template-columns:minmax(0,1fr) 64px;
    grid-template-rows:auto auto auto minmax(0,1fr) auto auto;
    grid-template-areas:'categories categories' 'colors colors' 'merch merch' 'traits traits' 'action action' 'status status';
    gap:6px; height:auto; min-height:0;
  }
  .studio-workspace .studio-category-tabs { grid-area:categories; padding:0; gap:2px; border:0; }
  .studio-workspace .studio-category-tabs button { min-height:40px; font-size:11px; }
  .studio-workspace .studio-original-entry { grid-area:original; margin:0; min-height:38px; padding:4px 9px; font-size:11px; }
  .studio-workspace .studio-picker-heading { display:contents; }
  .studio-workspace .studio-picker-heading h3 { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .studio-workspace .studio-picker-heading button { grid-area:colors; min-height:38px; padding:4px; font-size:11px; }
  .studio-workspace [data-claim-merch] { grid-area:merch; margin:0; }
  .studio-workspace .studio-trait-scroller { grid-area:traits; }
  .studio-workspace .studio-trait-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; padding:2px 16px 6px 2px; overflow-x:hidden; }
  .studio-workspace .studio-trait-tile { padding:4px !important; gap:4px; }
  .studio-workspace .studio-trait-tile > span { font-size:10px; line-height:1.25; padding-bottom:2px; }
  .studio-workspace .studio-trait-tile[aria-pressed=true]::after { width:15px; height:15px; font-size:10px; line-height:15px; right:5px; top:5px; }
  .studio-workspace .studio-download { grid-area:action; margin:0; min-height:44px; }
  .studio-workspace .studio-status { grid-area:status; margin:0; padding:0; min-height:12px; font-size:10px; }
  .studio-workspace .studio-review { display:flex; flex-direction:column; overflow:hidden; padding:0; gap:0; scroll-padding:0; }
  .studio-workspace .studio-review-body { display:block; flex:1; min-height:0; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; padding:2px 2px 10px; scroll-padding:8px; }
  .studio-workspace .studio-review-body > .studio-eyebrow { display:none; }
  .studio-workspace .studio-review-body > h3 { font-size:16px; margin:0 0 4px; }
  .studio-workspace .studio-review-body > p { margin:4px 0; font-size:12px; }
  .studio-workspace .studio-review-name { gap:4px; margin:8px 0; }
  .studio-workspace .studio-review-name input { min-height:42px; }
  .studio-workspace .studio-review-trait-details { margin:8px 0; }
  .studio-workspace .studio-review-actions {
    position:static; flex-shrink:0; display:flex; flex-wrap:wrap; gap:6px;
    margin:0; padding:8px 0 2px; border-top:1px solid #263746; background:#09121c;
  }
  .studio-workspace .studio-review-actions > :is(button,a) { flex:1; min-height:44px; margin:0; padding:8px; font-size:12px; }
  .studio-workspace .studio-review-actions > [data-prepare] { flex:2; }
  .studio-workspace .studio-review-actions > [data-mobile-primary] { flex-basis:100%; display:flex; align-items:center; justify-content:center; color:#06131a; background:#14f195; border:1px solid #14f195; text-decoration:none; font-weight:700; }
  .studio-workspace .studio-review-status { flex-shrink:0; margin:0; font-size:10px !important; }
  .studio-workspace [data-studio-step='review'] .studio-preview,
  .studio-workspace [data-studio-step='upload'] .studio-preview { flex-basis:clamp(104px,17dvh,132px); }
  .studio-workspace .studio-editor:has(.studio-review-name input:focus) .studio-preview { flex-basis:90px; }
}
@media(max-width:820px) and (max-height:700px) {
  .studio-workspace .studio-preview { flex-basis:112px; }
  .studio-workspace [data-studio-step='review'] .studio-preview,.studio-workspace [data-studio-step='upload'] .studio-preview { flex-basis:100px; }
  .studio-workspace .studio-heading,.studio-workspace .studio-heading-actions { min-height:32px; height:32px; }
  .studio-workspace .studio-flow { margin-block:2px 5px; }
}
@media(max-width:820px) {
  body.companion-active[data-companion-view='studio']:has(.studio-workspace:not([hidden]) > .studio-editor:not(.studio-claim-editor)) { height:100dvh; overflow:hidden; }
  .companion-active[data-companion-view='studio']:has(.studio-workspace:not([hidden]) > .studio-editor:not(.studio-claim-editor)) .profile-first-shell { box-sizing:border-box; height:100dvh; min-height:0; overflow:hidden; padding-bottom:calc(74px + env(safe-area-inset-bottom)); }
}
@media(max-width:820px) and (max-height:700px) {
  .studio-workspace .studio-tabs button { min-height:28px; }
}


/* Rewards discovery and scoped post-entry dialogs. */
.giveaway-current { min-width:0; }
.giveaway-card-grid { display:flex; box-sizing:border-box; max-width:100%; gap:16px; align-items:stretch; overflow-x:auto; scroll-snap-type:x mandatory; scroll-padding-inline:2px; padding:2px 2px 12px; scrollbar-width:thin; scrollbar-color:#416e69 #10212b; }
.giveaway-card-grid::-webkit-scrollbar { height:8px; }
.giveaway-card-grid::-webkit-scrollbar-track { background:#10212b; }
.giveaway-card-grid::-webkit-scrollbar-thumb { background:#416e69; border:1px solid #10212b; border-radius:0; }
.giveaway-card-grid::-webkit-scrollbar-thumb:hover { background:#14f195; }
.giveaway-card-grid .giveaway-module { flex:0 0 min(100%,540px); box-sizing:border-box; margin:0; min-width:0; padding:20px; scroll-snap-align:start; }
.giveaway-carousel-controls { display:flex; align-items:center; gap:8px; }
.giveaway-carousel-controls span { margin-right:5px; color:var(--text-secondary); font:600 13px/1.4 var(--app-ui-font); white-space:nowrap; }
.giveaway-carousel-controls button { display:grid; place-items:center; width:36px; min-height:36px; padding:0; border:1px solid var(--stroke); background:#101d28; color:var(--text-primary); font:20px/1 var(--app-ui-font); cursor:pointer; }
.giveaway-carousel-controls button:hover,.giveaway-carousel-controls button:focus-visible { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.giveaway-card-grid .giveaway-live-strip { padding:0 0 12px; background:none; border:0; }
.giveaway-card-grid .giveaway-eyebrow { display:none; }
.giveaway-card-top { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:16px; min-width:0; }
.giveaway-card-top .giveaway-headline { min-width:0; overflow-wrap:anywhere; }
.giveaway-card-top .giveaway-description { margin:8px 0 0; color:var(--text-secondary); font:14px/1.5 var(--app-ui-font); overflow-wrap:break-word; }
.giveaway-prize-art { display:grid;place-items:center;width:112px;aspect-ratio:1;overflow:hidden;border:1px solid var(--stroke);background:linear-gradient(135deg,#0a1820,#142634 60%,#0a121e); }
.giveaway-prize-art img { display:block;width:100%;height:100%;object-fit:contain;image-rendering:auto; }
.giveaway-card-grid .giveaway-requirements { margin:16px 0; border-block:1px solid #293c49; padding:12px 0; }
.giveaway-card-grid .giveaway-requirements summary { cursor:pointer; min-height:30px; }
.giveaway-deadline { color:#9bb0c0; font:14px/1.6 var(--app-ui-font); }
.giveaway-deadline.is-newer { color:#14f195; }
.giveaway-deadline.is-halfway { color:#6de5ef; }
.giveaway-deadline.is-ending { color:#cc83f5; font-variant-numeric:tabular-nums; }
.giveaway-card-grid button.primary-button { width:100%; min-height:48px; }
.giveaway-entry-dialog { position:relative;width:min(520px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto; box-sizing:border-box; padding:48px 24px 24px; border:1px solid var(--stroke-strong); border-radius:0; background:#111a29; color:var(--text-primary); }
.giveaway-entry-dialog::backdrop { background:rgba(1,2,7,.9); }
.giveaway-entry-dialog h3,.giveaway-entry-dialog h4 { font-family:'Dogica Pixel Bold',monospace; font-size:18px; line-height:1.6; }
.giveaway-entry-dialog h4 { margin-top:24px; font-size:10px; }
.giveaway-entry-dialog [data-close-entry] { position:absolute;right:8px;top:6px;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid var(--stroke);background:transparent;color:var(--accent);font:24px/1 Arial,sans-serif;cursor:pointer }
.giveaway-entry-dialog [data-close-entry]:hover{background:var(--accent-soft)}
.giveaway-entry-dialog [data-close-entry]:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.giveaway-entry-dialog label { display:grid; gap:8px; }
.giveaway-entry-dialog input { width:100%; min-width:0; box-sizing:border-box; }
.giveaway-entry-dialog [data-entry-error] { color:#ffacb3; }
.giveaway-shipping-notice{display:grid;gap:10px;margin:20px 0 18px;padding-top:16px;border-top:1px solid var(--stroke)}
.giveaway-shipping-notice strong{color:var(--accent);font:10px/1.7 'Dogica Pixel Bold',monospace}
.giveaway-shipping-notice p{margin:0;color:var(--text-secondary);font:14px/1.6 var(--app-ui-font)}
.giveaway-entry-dialog label.giveaway-country-confirm{display:flex;align-items:flex-start;gap:12px;margin-top:6px;padding:13px;border:1px solid var(--stroke);background:#0e141d;cursor:pointer;font:14px/1.5 var(--app-ui-font)}
.giveaway-entry-dialog .giveaway-country-confirm input{width:20px;height:20px;min-width:20px;margin:1px 0 0;accent-color:#14f195}
.giveaway-entry-dialog .giveaway-country-confirm span{min-width:0}
.giveaway-entry-dialog [data-submit-giveaway-entry]{width:100%;min-height:48px}
.companion-view-rewards [data-outstanding-prize] { border-left:3px solid #14f195; padding:16px; background:#091d18; }
@media(max-width:820px) { .giveaway-card-grid .giveaway-module {flex-basis:100%;padding:16px;} .giveaway-prize-art {width:88px;} .giveaway-entry-dialog{padding:48px 18px 18px;} }
.companion-active .giveaway-card-grid .giveaway-module { gap:12px; }
.companion-active .giveaway-card-grid .giveaway-requirements { margin:0; }
.companion-active .giveaway-card-grid .giveaway-deadline { margin:0; }
.companion-active .giveaway-requirements summary { font:15px/1.6 var(--app-ui-font); text-transform:none; }
.companion-active .giveaway-card-grid .giveaway-requirements ul { gap:9px; margin-top:12px; }
.companion-active .giveaway-card-grid .giveaway-requirements li { grid-template-columns:24px minmax(0,1fr); gap:10px; align-items:start; font:15px/1.5 var(--app-ui-font); }
.companion-active .giveaway-card-grid .giveaway-requirements li .requirement-status { color:#9fb4c1; font:700 18px/1.25 var(--app-ui-font); text-align:center; }
.companion-active .giveaway-card-grid .giveaway-requirements li strong { overflow:visible; white-space:normal; text-overflow:clip; font:600 15px/1.5 var(--app-ui-font); }
.companion-active .giveaway-card-grid .giveaway-requirements li.is-met span,.companion-active .giveaway-card-grid .giveaway-requirements li.is-met strong { color:var(--accent); }
.companion-active .giveaway-card-grid .giveaway-requirements li.is-unmet span { color:#cc83f5; }
.companion-active .giveaway-hub .primary-button { background:#00ed9d; border:1px solid #00ed9d; border-radius:0; padding:12px 16px; color:#041810; font:700 15px/1.5 var(--app-ui-font); min-height:48px; cursor:pointer; }
.companion-active .giveaway-hub .primary-button:disabled { background:#153c30; color:#9cdcc5; border-color:#28634e; cursor:default; }
.companion-active .giveaway-hub button:focus-visible,.companion-active .giveaway-hub summary:focus-visible { outline:2px solid #ecfff8; outline-offset:3px; }

/* Keep an active mint approval inside the bounded Studio workspace. */
.studio-workspace .studio-review:has([data-mint-open]) .studio-review-body {
  display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  gap:8px; width:100%; min-width:0; box-sizing:border-box; padding:8px 12px 16px;
  overflow-y:auto; overflow-x:hidden;
}
.studio-workspace .studio-review:has([data-mint-open]) .studio-review-body > :not(.studio-mint) { display:none; }
.studio-workspace .studio-review:has([data-mint-open]) .studio-mint {
  display:flex; flex-direction:column; align-items:center; width:min(100%,340px);
  min-width:0; margin:0; padding:0; border:0; text-align:center;
}
.studio-workspace .studio-review:has([data-mint-open]) .studio-mint-qr {
  box-sizing:border-box; max-width:100%; margin:4px auto;
}
.studio-workspace .studio-review:has([data-mint-open]) .studio-mint [data-mint-open] {
  box-sizing:border-box; justify-content:center; width:100%; margin:4px 0;
}
.studio-workspace .studio-review:has([data-mint-open]) .studio-mint [data-mint-cancel] {
  margin:4px 0;
}
@media(min-width:821px) {
  .studio-workspace .studio-review:has([data-mint-open]) .studio-review-actions,
  .studio-workspace .studio-review:has([data-mint-open]) .studio-review-status { display:none; }
}
/* The completed mint is a reward screen; keep file and asset IDs in disclosures. */
.studio-workspace .studio-editor:has(.studio-mint[data-mint-active]) .studio-preview,
.studio-workspace .studio-editor:has(.studio-mint[data-mint-active]) .studio-flow { display:none; }
.studio-workspace .studio-editor:has(.studio-mint[data-mint-active]) .studio-layout {
  display:flex; flex:1; min-height:0; justify-content:center; align-items:stretch;
}
.studio-workspace .studio-editor:has(.studio-mint[data-mint-active]) .studio-review {
  display:flex; flex-direction:column; justify-content:center; width:100%; max-width:620px; margin:auto;
}
.studio-workspace .studio-review:has([data-mint-active]) .studio-review-body > :not(.studio-mint) { display:none; }
.studio-workspace .studio-review:has([data-mint-active]) .studio-mint { border:0; padding:0; margin:0; text-align:center; }
.studio-workspace .studio-editor:has(.studio-mint[data-mint-complete]) { display:flex; flex-direction:column; }
.studio-workspace .studio-editor:has(.studio-mint[data-mint-complete]) .studio-heading,
.studio-workspace .studio-editor:has(.studio-mint[data-mint-complete]) .studio-preview,
.studio-workspace .studio-editor:has(.studio-mint[data-mint-complete]) .studio-flow,
.studio-workspace .studio-editor:has(.studio-mint[data-mint-complete]) .studio-notice,
.studio-workspace .studio-editor:has(.studio-mint[data-mint-complete]) .studio-resume { display:none; }
.studio-workspace .studio-editor:has(.studio-mint[data-mint-complete]) .studio-layout {
  display:flex; flex:1; min-height:0; justify-content:center; align-items:stretch;
}
.studio-workspace .studio-editor:has(.studio-mint[data-mint-complete]) .studio-review {
  width:100%; max-width:620px; margin:auto;
}
.studio-workspace .studio-review:has([data-mint-complete]) { display:flex; flex:1; flex-direction:column; justify-content:center; overflow:hidden; }
.studio-workspace .studio-review:has([data-mint-complete]) .studio-review-body {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  flex:1; width:100%; min-width:0; box-sizing:border-box; gap:10px; padding:12px 16px;
  overflow-y:auto; overflow-x:hidden; text-align:center;
}
.studio-workspace .studio-review:has([data-mint-complete]) .studio-review-body > :not(.studio-mint) { display:none; }
.studio-workspace .studio-review:has([data-mint-complete]) .studio-review-actions,
.studio-workspace .studio-review:has([data-mint-complete]) .studio-review-status { display:none; }
.studio-workspace .studio-review [data-mint-complete] {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; width:min(100%,560px);
  min-width:0; margin:0; padding:0; border:0;
}
.studio-mint-celebration-jump { display:block; width:auto; height:clamp(190px,32dvh,310px); aspect-ratio:88 / 125; image-rendering:pixelated; object-fit:contain; }
body.companion-active .studio-workspace .studio-editor .studio-review .studio-mint-celebration-title {
  margin:0; color:#eafff6; font:400 clamp(16px,1.5vw,20px)/1.7 var(--app-display-font,monospace);
  font-synthesis:none;
}
.studio-workspace .studio-mint-celebration-copy { margin:0; color:#b9d3d2; font:400 14px/1.5 var(--app-ui-font,system-ui); }
.studio-workspace .studio-review [data-mint-complete] .studio-mint-transaction { color:#81eec4; font:600 13px/1.4 var(--app-ui-font,system-ui); text-underline-offset:3px; }
.studio-workspace .studio-review [data-mint-complete] .studio-mint-share,
.studio-workspace .studio-review [data-mint-complete] .studio-mint-download,
.studio-workspace .studio-review [data-mint-complete] [data-create-another] { box-sizing:border-box; display:flex; align-items:center; justify-content:center; width:min(100%,300px); min-height:46px; margin:0; padding:10px 16px; border:1px solid #14f195; border-radius:0; font:700 13px/1.4 var(--app-ui-font,system-ui); text-decoration:none; }
.studio-workspace .studio-review [data-mint-complete] .studio-mint-share { background:#14f195; color:#061b13; }
.studio-workspace .studio-review [data-mint-complete] .studio-mint-download { background:#0e1b25; color:#e5f7f0; border-color:#466375; }
.studio-workspace .studio-review [data-mint-complete] [data-create-another] { background:#0e1b25; color:#e5f7f0; border-color:#466375; }
@media(min-width:821px) {
  .studio-workspace .studio-editor:has(.studio-mint[data-mint-complete]) .studio-review { max-width:900px; }
  .studio-workspace .studio-review [data-mint-complete] { width:100%; }
  body.companion-active .studio-workspace .studio-editor .studio-review .studio-mint-celebration-title { white-space:nowrap; }
}
@media(max-width:820px) {
  .studio-workspace .studio-review:has([data-mint-complete]) .studio-review-body { justify-content:center; gap:0; padding:4px 8px; }
  .studio-workspace .studio-review:has([data-mint-complete]) .studio-mint-celebration-jump { height:clamp(140px,26dvh,240px); }
  .studio-workspace .studio-review:has([data-mint-complete]) .studio-review-actions { display:none !important; }
}
/* Approved colors replace the oversized bottom drawer with a Studio-local palette. */
.studio-workspace .studio-controls { position:relative; }
.studio-workspace .studio-editor .studio-recolor {
  position:absolute; inset:48px 0 auto; z-index:12; box-sizing:border-box;
  width:100%; max-width:none; max-height:calc(100% - 52px); min-height:0; margin:0;
  padding:16px; overflow-y:auto; border:1px solid #365467;
  background:#0d1b25; box-shadow:0 16px 36px #0008;
}
.studio-workspace .studio-editor .studio-recolor summary { color:#f3f9fa; font:400 16px/1.5 var(--app-display-font,system-ui); }
.studio-workspace .studio-editor .studio-recolor > p { clear:both; margin:8px 0 14px; color:#a8bdc9; font-size:13px; }
.studio-workspace .studio-editor [data-close-colors] { position:absolute; top:10px; right:12px; float:none; margin:0; min-width:76px; }
.studio-workspace .studio-color-target-select { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.studio-workspace .studio-color-targets { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 14px; }
.studio-workspace .studio-color-targets button {
  min-height:36px; margin:0; padding:6px 10px; border:1px solid #3b5665;
  background:#10232e; color:#c5d4dd; font:600 12px/1.3 var(--app-ui-font,system-ui);
}
.studio-workspace .studio-color-targets button[aria-pressed='true'] { border-color:#14f195; background:#0d382c; color:#14f195; }
.studio-workspace .studio-editor .studio-colors { display:grid; grid-template-columns:repeat(auto-fit,minmax(84px,1fr)); gap:8px; margin:0 0 14px; }
.studio-workspace .studio-editor .studio-colors button {
  display:flex; flex-direction:column; align-items:stretch; gap:6px; width:auto; min-width:0; min-height:88px;
  margin:0; padding:6px; border:1px solid #3b5665; background:#122632;
  color:#dce8ec; font:600 11px/1.2 var(--app-ui-font,system-ui); text-align:center;
}
.studio-workspace .studio-editor .studio-colors button::before { content:''; display:block; height:48px; background:var(--swatch-color); border:1px solid #ffffff40; }
.studio-workspace .studio-editor .studio-colors button[aria-pressed='true'] { border-color:#14f195; outline:1px solid #14f195; outline-offset:1px; }
.studio-workspace .studio-editor [data-reset] { min-height:40px; margin:0; }
@media(max-width:820px) {
  .studio-workspace .studio-editor .studio-recolor { inset:46px 0 auto; max-height:calc(100% - 50px); padding:10px; }
  .studio-workspace .studio-editor .studio-colors { grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
  .studio-workspace .studio-editor .studio-colors button { min-height:65px; padding:4px; font-size:9px; }
  .studio-workspace .studio-editor .studio-colors button::before { height:34px; }
}

/* Studio creation controls */
.studio-workspace .studio-review-body,
.studio-workspace .studio-recolor {
  scrollbar-width: thin;
  scrollbar-color: #416e69 #10212b;
}
.studio-workspace .studio-review-body::-webkit-scrollbar,
.studio-workspace .studio-recolor::-webkit-scrollbar { width: 8px; height: 8px; }
.studio-workspace .studio-review-body::-webkit-scrollbar-track,
.studio-workspace .studio-recolor::-webkit-scrollbar-track { background: #10212b; }
.studio-workspace .studio-review-body::-webkit-scrollbar-thumb,
.studio-workspace .studio-recolor::-webkit-scrollbar-thumb { background: #416e69; border: 1px solid #10212b; border-radius: 0; }
.studio-workspace .studio-review-body::-webkit-scrollbar-thumb:hover,
.studio-workspace .studio-recolor::-webkit-scrollbar-thumb:hover { background: #14f195; }
.studio-workspace .studio-original-entry { width: max-content; max-width: 100%; gap: 12px; padding: 8px 14px; justify-content: center; margin: 0; }
.studio-workspace .studio-heading-actions { gap: 8px; }
.studio-workspace .studio-heading-actions [data-owned-originals] { font-size: 11px; white-space: nowrap; }
.studio-workspace .studio-resume:not([hidden]) { display: flex; justify-content: flex-end; gap: 8px; margin: 4px 0 0; }
.studio-workspace .studio-resume button { min-height: 36px; padding: 5px 10px; font-size: 11px; }
.studio-workspace .studio-resume [data-discard] { color: #a8bcca; }
.studio-workspace .studio-stage[data-view='thumbnail'] canvas { transform: scale(1.07); transform-origin: center bottom; }
@media(min-width:821px) {
  .studio-workspace .studio-preview { width: min(100%, calc(100cqh - 90px)); }
}
@media(max-width:820px) {
  .studio-workspace .studio-heading-actions [data-owned-originals] { font-size: 9px; padding: 4px 6px; min-height: 32px; }
  .studio-workspace .studio-heading-actions [data-random] { font-size: 10px; padding: 4px 6px; }
  .studio-workspace .studio-controls {
    grid-template-rows: auto auto auto minmax(0,1fr) auto auto auto;
    grid-template-areas: 'categories categories' 'colors colors' 'merch merch' 'traits traits' 'action action' 'recovery recovery' 'status status';
  }
  .studio-workspace .studio-original-entry { width: auto; }
  .studio-workspace .studio-resume:not([hidden]) { grid-area: recovery; justify-content: center; flex-wrap: wrap; }
  .studio-workspace .studio-resume button { flex: 1 1 120px; }
}
