:root {
  --studio-bg: #0b131e;
  --studio-surface: #111e2d;
  --studio-raised: #17273a;
  --studio-border: #34475e;
  --studio-ink: #eef5fc;
  --studio-muted: #b2c3d4;
  --studio-accent: #9dd4ed;
  --studio-violet: #baa8f5;
}

body:has(.studio-page) { background: var(--studio-bg); }
body:has(.studio-page) .site-header, body:has(.studio-page) .site-footer { background: #0a111b; border-color: var(--studio-border); }
body:has(.studio-page) :is(.site-brand,.site-wallet,.site-nav a,.footer-inner nav a,.footer-inner nav button,.footer-inner p) { color: var(--studio-ink); }
body:has(.studio-page) :is(.site-wallet,.language-choice) { border-color: var(--studio-border); }
body:has(.studio-page) .site-mark, body:has(.studio-page) .language-choice button[aria-pressed='true'] { background: #addaf0; color: #102237; }
body:has(.studio-page) .language-choice button { color: var(--studio-muted); }
body:has(.studio-page) .site-wallet:hover { background: var(--studio-raised); }
body:has(.studio-page) .site-nav a:is(.active,:hover) { border-color: var(--studio-accent); color: var(--studio-accent); }
body:has(.studio-page) :focus-visible { outline-color: var(--studio-accent); }

.studio-page { color: var(--studio-ink); line-height: 1.6; }
.studio-page :is(h1,h2,h3) { color: var(--studio-ink); }
.studio-page :is(.studio-muted, .directory-intro p, .detail-copy p, .detail-reward) { color: var(--studio-muted); }
.studio-heading { margin: clamp(.6rem, 2.75vw, 2.4rem) 0 clamp(1.3rem, 3.5vw, 2.75rem); }
.studio-heading h1 { font-size: clamp(2.25rem, 5vw, 4.75rem); font-weight: 825; line-height: 1.12; letter-spacing: -.063em; }
.studio-heading p { max-width: 47rem; margin: .8rem 0 0; color: var(--studio-muted); }
.studio-panel { padding: clamp(1.1rem, 3vw, 2.3rem); border: 1px solid var(--studio-border); border-radius: .85rem; background: var(--studio-surface); }
.studio-panel h2 { font-size: clamp(1.28rem, 2.7vw, 1.8rem); line-height: 1.3; letter-spacing: -.037em; }
.studio-panel p { margin: .6rem 0 0; color: var(--studio-muted); }
.studio-primary, .studio-secondary, .studio-page .site-cta, .studio-tabs a { display: inline-flex; min-height: 2.9rem; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: .52rem; padding: .57rem 1rem; font: inherit; font-weight: 720; line-height: 1.35; color: #142737; background: var(--studio-accent); text-decoration: none; }
.studio-primary:hover:not(:disabled), .studio-page .site-cta:hover { background: #c5ecfb; color: #142737; }
.studio-secondary, .studio-tabs a { color: var(--studio-ink); background: var(--studio-raised); border-color: var(--studio-border); }
.studio-secondary:hover:not(:disabled), .studio-tabs a:hover { background: #224059; }
.studio-link, .studio-page .site-text-link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--studio-accent); font-weight: 720; text-decoration: underline; text-underline-offset: .25em; }
.studio-link:hover, .studio-page .site-text-link:hover { color: #d4f2ff; }
.studio-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; margin-top: 1.15rem; }
.studio-notice { padding: .8rem 1rem; border-inline-start: 3px solid #78abc9; background: var(--studio-surface); color: var(--studio-muted); line-height: 1.7; }

.activity-cover { --cover: #7ad2e6; isolation: isolate; background: radial-gradient(ellipse at 67% 32%, #264461, #13283b 65%, #0e1b2a); color: var(--cover); }
.activity-cover::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .17; background: repeating-linear-gradient(90deg, transparent 0 24px, #90b2ca 24px 25px), repeating-linear-gradient(0deg, transparent 0 24px, #90b2ca 24px 25px); mask-image: linear-gradient(110deg, #0008, #000, transparent); }
.cover-sequence, .cover-quiz { --cover: #b7a6ef; background: radial-gradient(ellipse at 69% 33%, #3b3d65, #26213c 67%, #1a1c32); }
.cover-association, .cover-match { --cover: #91dbc5; background: radial-gradient(ellipse at 66% 28%, #235055, #17353f 66%, #0f222d); }
.cover-scene { --cover: #9cc9f4; background: radial-gradient(ellipse at 65% 40%, #2b4664, #172c41 65%, #101e2d); }
.cover-geometry { position: absolute; display: grid; }
.cover-geometry i { display: block; }
.geometry-path { grid-template-columns: repeat(4, 1fr); width: 40%; aspect-ratio: 1; gap: 5%; transform: rotate(-11deg); }
.geometry-path i { background: #102334; border: 1px solid #7dabc9; border-radius: 10%; }
.geometry-path .lit { border-color: var(--cover); background: var(--cover); box-shadow: 0 0 13px #87d3ed66; }
.geometry-sequence { width: 48%; gap: .43rem; transform: rotate(-10deg); }
.geometry-sequence i { height: clamp(.55rem, 3.6cqw, 1.4rem); border-radius: 2px; width: 90%; border: 1px solid var(--cover); background: #8773c348; }
.geometry-sequence i:nth-child(2) { width: 65%; margin-left: 20%; background: #c8b8fd; }
.geometry-sequence i:nth-child(3) { width: 84%; margin-left: 9%; }
.geometry-sequence i:nth-child(4) { width: 49%; margin-left: 34%; background: #a993ee; }
.geometry-association { width: 46%; aspect-ratio: 1; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); transform: rotate(-18deg); }
.geometry-association i { position: relative; justify-self: center; align-self: center; z-index: 1; width: 52%; aspect-ratio: 1; background: #18333f; border: 2px solid var(--cover); border-radius: 25%; }
.geometry-association i:nth-child(2) { grid-row: span 2; background: var(--cover); box-shadow: 0 0 20px #91dbc570; }
.geometry-association::before, .geometry-association::after { content: ''; width: 58%; position: absolute; left: 20%; top: 38%; border-top: 1px solid var(--cover); transform: rotate(25deg); }
.geometry-association::after { top: 63%; transform: rotate(-25deg); }
.geometry-routine { width: 50%; aspect-ratio: 1; grid-template-columns: repeat(3, 1fr); align-items: center; transform: rotate(-13deg); }
.geometry-routine i { border: 1px solid var(--cover); width: 100%; aspect-ratio: 1; border-radius: 50%; }
.geometry-routine i:nth-child(2) { box-shadow: 0 0 30px #97d7fa55; background: #6fb9db; margin-top: -50%; }
.geometry-routine i:nth-child(3) { border-style: dashed; margin-top: 21%; }
.geometry-match { width: 42%; aspect-ratio: 1; }
.geometry-match i { grid-area: 1/1; width: 54%; height: 75%; border: 1px solid var(--cover); border-radius: 10%; align-self: center; transform: translateX(14%) rotate(-16deg); background: #224d56; }
.geometry-match i + i { justify-self: end; transform: translateX(-10%) rotate(16deg); background: #508c84; }
.geometry-quiz { width: 53%; grid-template-columns: repeat(7, 1fr); gap: 6%; align-items: center; }
.geometry-quiz i { height: 7cqw; min-height: .7rem; background: var(--cover); border-radius: 5px; }
.geometry-quiz i:nth-child(2n) { height: 13cqw; }
.geometry-quiz i:nth-child(4) { height: 21cqw; }
.geometry-scene { grid-template-columns: repeat(3, 1fr); gap: 9%; width: 53%; aspect-ratio: 1.56; transform: rotate(-10deg); }
.geometry-scene i { border: 1px solid #8fb4d5; border-radius: 12%; background: #42638055; }
.geometry-scene i:is(:nth-child(2),:nth-child(6)) { background: #bddcfa; box-shadow: 0 0 17px #9cc9f47a; }
.geometry-scene::after { content: ''; position: absolute; top: 36%; left: 13%; width: 38%; aspect-ratio: 1; border: 2px solid #caebfd; border-radius: 50%; box-shadow: 0 0 15px #7fd6ff8a; }

.studio-page .activity-grid { row-gap: clamp(1rem, 3vw, 2rem); }
.studio-page .activity-card a { border: 1px solid var(--studio-border); border-radius: .8rem; background: var(--studio-surface); padding: .8rem; }
.studio-page .activity-card a:hover { border-color: #779bb4; }
.studio-page .activity-card h2 { font-size: clamp(1.28rem, 2.5vw, 1.8rem); font-weight: 810; letter-spacing: -.045em; }
.studio-page .activity-card :is(.activity-meta,p) { color: var(--studio-muted); }
.studio-page .activity-meta { color: var(--studio-accent); }
.studio-page .activity-meta span + span { border-color: var(--studio-border); }
.studio-page .activity-card .activity-duration { margin-top: auto; font-size: .92rem; color: var(--studio-accent); }
.studio-page .activity-more, .studio-page .activity-card a:hover .activity-more { color: var(--studio-accent); align-self: start; }
.studio-page .catalog-toolbar { border-color: var(--studio-border); }
.studio-page .filter-group button { color: var(--studio-ink); border-color: var(--studio-border); }
.studio-page .filter-group button:hover:not([aria-pressed='true']) { background: var(--studio-raised); }
.studio-page .filter-group button[aria-pressed='true'] { background: var(--studio-accent); color: #0c2436; }
.studio-page .catalog-count { color: var(--studio-muted); }

.challenge-page { max-width: 54rem; margin-inline: auto; }
.challenge-stage, .challenge-compare { display: grid; align-items: start; justify-items: start; }
.challenge-progress { display: flex; gap: .54rem; margin-bottom: 1.15rem; }
.challenge-progress span { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: .4rem; border: 1px solid var(--studio-border); color: var(--studio-muted); }
.challenge-progress .current { color: #142737; background: var(--studio-accent); border-color: var(--studio-accent); font-weight: 760; }
.challenge-progress .done { color: var(--studio-accent); border-color: var(--studio-accent); }
.challenge-stage > button, .challenge-result > button { margin-top: 1rem; }
.challenge-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .54rem; width: min(100%, 24rem); margin-top: 1.2rem; }
.challenge-cell { display: grid; place-items: center; width: 100%; aspect-ratio: 1.15; min-width: 0; min-height: 2.8rem; border: 1px solid #4b6883; border-radius: .42rem; padding: 0; font-size: 1.23rem; background: var(--studio-raised); color: var(--studio-muted); }
.challenge-cell.active { color: #112738; background: var(--studio-accent); border-color: var(--studio-accent); font-weight: 800; opacity: 1; }
.challenge-learn-list { padding: 0; margin: 1.2rem 0 .3rem; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; width: 100%; }
.challenge-learn-list li { display: grid; align-content: start; min-height: 4rem; padding: .64rem .72rem; border: 1px solid #44647c; border-radius: .5rem; background: var(--studio-raised); }
.challenge-learn-list li span { color: var(--studio-accent); }
.challenge-options { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.15rem 0 .2rem; }
.challenge-options button { background: var(--studio-raised); color: var(--studio-ink); border: 1px solid #4b6883; border-radius: .45rem; padding: .66rem .88rem; }
.challenge-options button[aria-pressed='true'] { opacity: 1; background: var(--studio-accent); color: #112738; }
.challenge-score { display: flex; gap: .65rem; align-items: baseline; margin-top: .25rem; color: var(--studio-accent); }
.challenge-score strong { font-size: clamp(3rem, 10vw, 6rem); line-height: 1; letter-spacing: -.075em; }
.challenge-result .studio-link { margin-inline-start: .8rem; }
.challenge-compare { margin-top: 1.125rem; }
.challenge-compare label { color: var(--studio-ink); font-weight: 740; margin: 1rem 0 .32rem; }
.challenge-compare select { box-sizing: border-box; min-height: 3rem; max-width: 100%; padding: .5rem .9rem; color: var(--studio-ink); background: var(--studio-raised); border: 1px solid var(--studio-border); border-radius: .5rem; font: inherit; }
#challenge-comparison { width: 100%; }
.comparison-data { margin-top: 1rem; }
.comparison-numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.comparison-numbers > div { display: grid; border-top: 1px solid var(--studio-border); padding-top: .7rem; }
.comparison-numbers small { color: var(--studio-muted); }
.comparison-numbers strong { font-size: clamp(1.4rem, 4vw, 2.1rem); color: var(--studio-accent); }
.comparison-bar { margin-top: 1rem; position: relative; height: .65rem; background: #2a3f54; border-radius: 2rem; }
.comparison-bar span { display: block; width: var(--value); height: 100%; background: var(--studio-accent); border-radius: 2rem; }
.comparison-bar i { display: block; position: absolute; top: -.23rem; bottom: -.23rem; inset-inline-start: var(--value); border-inline-start: 3px solid var(--studio-violet); }
.comparison-legend { display: flex; gap: .7rem 1rem; flex-wrap: wrap; margin-top: .55rem; color: var(--studio-muted); font-size: .92rem; }
.comparison-legend span::before { content: ''; display: inline-block; width: .68rem; height: .68rem; margin-inline-end: .35rem; background: var(--studio-accent); border-radius: 50%; }
.comparison-legend span + span::before { background: var(--studio-violet); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.scene-page { max-width: 59rem; margin-inline: auto; }
.scene-opening, .scene-handoff { background: radial-gradient(ellipse at top right, #1b3853, var(--studio-surface) 64%); }
.scene-modes, .scene-score-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-top: 1.25rem; }
.scene-modes article, .scene-score-card { border: 1px solid var(--studio-border); border-radius: .68rem; padding: 1rem; background: #162638; }
.scene-modes article { display: flex; align-items: flex-start; flex-direction: column; }
.scene-modes article p { margin-bottom: .9rem; }
.scene-modes article button { margin-top: auto; }
.scene-page .scene-note { margin-top: 1.15rem; padding: .72rem .9rem; background: #142436; border-left: 3px solid #709dbe; color: var(--studio-muted); }
.scene-handoff > button, .scene-case > button { margin-top: 1.1rem; }
.scene-case .scene-case-meta { color: var(--studio-accent); font-weight: 710; margin: 0 0 .48rem; }
.scene-board { margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; list-style: none; }
.scene-board li { position: relative; min-width: 0; }
.scene-board li:not(:has(button)), .scene-board li button { display: grid; align-content: center; justify-items: start; width: 100%; min-height: 4.7rem; text-align: start; padding: .7rem .8rem; border: 1px solid #476983; border-radius: .5rem; background: #172b3d; color: var(--studio-ink); }
.scene-board li span { font-size: .91rem; color: #c2d4e5; line-height: 1.45; }
.scene-board li strong { font-size: 1.05rem; line-height: 1.45; }
.scene-board li button[aria-pressed='true'], .scene-options button[aria-pressed='true'] { background: var(--studio-accent); color: #142737; border-color: var(--studio-accent); }
.scene-board li button[aria-pressed='true'] span { color: #2e4b61; }
.scene-options, .scene-signals { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.1rem; }
.scene-signals span { min-width: 6rem; text-align: center; border: 1px solid #5782a0; padding: .5rem .7rem; border-radius: .4rem; background: #192b40; color: var(--studio-accent); font: 650 1.25rem/1.4 'Cascadia Mono', Consolas, monospace; }
.scene-score-card p { display: flex; align-items: baseline; gap: .4rem; margin: 0; }
.scene-score-card p strong { color: var(--studio-accent); font-size: clamp(2.45rem, 6vw, 4.5rem); line-height: 1.24; letter-spacing: -.07em; }
.scene-score-card dl { margin: .5rem 0 0; }
.scene-score-card dl div { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; border-top: 1px solid var(--studio-border); padding: .43rem 0; }
.scene-score-card dd { margin: 0; white-space: nowrap; font-weight: 730; }
.scene-solutions { margin-top: 1rem; padding: .6rem .78rem; background: #142436; border-radius: .4rem; }
.scene-solutions summary { cursor: pointer; color: var(--studio-accent); font-weight: 730; }
.scene-solutions > div { border-top: 1px solid var(--studio-border); padding-top: .68rem; margin-top: .68rem; }

.profile-overview, .profile-details, .market-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.profile-details, .profile-ledger { margin-top: 1rem; }
.profile-balance { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .9rem 1.5rem; background: radial-gradient(ellipse at top right, #1b4157, var(--studio-surface) 65%); }
.profile-balance strong { font-size: clamp(2.6rem, 5vw, 4.5rem); letter-spacing: -.07em; line-height: 1.15; color: var(--studio-accent); }
.profile-balance small { font-size: .48em; }
.profile-service-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.profile-service-links a { display: flex; gap: .55rem; align-items: center; min-height: 2.8rem; border: 1px solid var(--studio-border); border-radius: .45rem; padding: .45rem .75rem; color: var(--studio-ink); }
.profile-service-links a:hover { background: var(--studio-raised); }
.profile-list { padding: 0; margin: .6rem 0 0; list-style: none; }
.profile-list li { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .72rem 0; border-bottom: 1px solid var(--studio-border); }
.profile-list small { display: block; color: var(--studio-muted); }
.profile-list li b { white-space: nowrap; color: var(--studio-accent); }
.profile-ledger summary { font-size: 1.08rem; font-weight: 730; cursor: pointer; }
.partner-mark { position: relative; display: inline-block; width: 1.6rem; height: 1.6rem; border: 1px solid #5391b4; border-radius: .38rem; color: var(--studio-accent); background: #1a3b52; flex: 0 0 auto; }
.partner-mark::before, .partner-mark::after { content: ''; position: absolute; pointer-events: none; }
.mark-shopping::before { inset: 31% 25% 19%; border: 1px solid currentColor; border-radius: 12%; }
.mark-shopping::after { width: 24%; height: 18%; inset: 16% auto auto 38%; border: 1px solid currentColor; border-radius: 60% 60% 0 0; }
.mark-hospital::before { inset: 21% 45%; background: currentColor; }
.mark-hospital::after { inset: 45% 21%; background: currentColor; }
.mark-care::before { inset: 24% 46% 24% 19%; border: 1px solid currentColor; border-radius: 50%; }
.mark-care::after { inset: 24% 19% 24% 46%; border: 1px solid currentColor; border-radius: 50%; }
.market-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .7rem 1.5rem; }
.studio-tabs { display: flex; gap: .55rem; flex-wrap: wrap; margin: 1.25rem 0; }
.studio-tabs a[aria-current='page'] { color: #102336; background: var(--studio-accent); }
.market-offer { display: flex; align-items: stretch; flex-direction: column; }
.offer-top { display: inline-flex; gap: .6rem; align-items: center; margin-bottom: .75rem; color: var(--studio-accent); font-weight: 720; }
.offer-actions { display: flex; flex-wrap: wrap; gap: .65rem; justify-content: space-between; align-items: center; padding-top: 1rem; margin-top: auto; }
.offer-actions strong { color: var(--studio-accent); font-size: 1.2rem; }
.market-detail { margin-top: 1rem; border-color: #6895af; }

@media (max-width: 950px) { .site-bar { gap: .7rem; } .site-nav { gap: .85rem; } }
@media (max-width: 780px) { .site-bar { grid-template-columns: 1fr auto; padding-top: .6rem; } .site-nav { grid-column: 1/-1; grid-row: 2; overflow: auto; gap: 1rem; } }
@media (max-width: 580px) {
  .profile-overview, .profile-details, .market-grid { grid-template-columns: 1fr; }
  .challenge-learn-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-page .activity-detail { gap: 1.35rem; }
  .scene-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scene-modes, .scene-score-grid { grid-template-columns: 1fr; }
}
