:root {
  color-scheme: dark;
  --ink: #112d2a;
  --cream: #ffe1ad;
  --teal: #10433f;
  --deep: #082b2a;
  --gold: #ffb726;
  --surface: #153c38;
  --line: #86b9a566;
  font: 16px/1.45 'Nunito', 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scrollbar-width: none; }
body { margin: 0; color: var(--cream); background: #193a36; }
body:has(.studio:not([hidden])) { overflow: hidden; }
h1, h2, h3, p, dl, dd, ol { margin: 0; overflow-wrap: anywhere; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
:is(button, a, input, select, summary):focus-visible { outline: none; }
:is(input, select):focus { background: #25574e; border-color: transparent; box-shadow: none; }
:is(.studio, .studio-dialog) :is(button, a, summary):focus-visible { color: var(--focus-ink, #fff9e8); }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px; padding: .55em .9em; border: 1px solid var(--line); border-radius: .65rem;
  color: var(--cream); background: linear-gradient(#184c46,#103b37); font-weight: 650; text-decoration: none;
  line-height: 1.2; text-align: center; max-width: 100%; overflow-wrap: anywhere;
  box-shadow: 0 3px var(--button-side, #0b2825);
}
button:not(:disabled), summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .62; }
.primary { --button-side: #a36728; --focus-ink: #08352d; border-color: #eeb14f; background: linear-gradient(#ffc861,#f3a325); color: #241507; }
:is(button, .brand, [data-nav], summary) { transition: transform 120ms ease-out, box-shadow 120ms ease-out; }
:where(button:not(:disabled), .brand, [data-nav], summary):is(:active,[aria-pressed="true"],[aria-expanded="true"],[aria-selected="true"]),
details[open] > summary { transform: translateY(3px); box-shadow: inset 0 2px 3px #20120a38; transition-duration: 65ms; }
@media (prefers-reduced-motion: reduce) {
  :is(button, .brand, [data-nav], summary) { transition: none; }
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.ui-icon { display: block; inline-size: 1.1em; block-size: 1.1em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.studio { position: relative; }
.studio-header { z-index: 2; }
.studio-header::before { display: none; }
.brand, .studio-header nav a { --focus-ink: #764320; color: inherit; font-weight: 700; text-decoration: none; }
.studio-header nav { display: flex; align-items: center; gap: .35rem; }
.studio-header nav a { display: grid; place-items: center; min-height: 44px; padding-inline: .7em; text-align: center; border-radius: .65rem; }
.studio-header nav a[aria-current="page"] { --focus-ink: #fff9e8; color: var(--cream); background: var(--teal); border-radius: 99px; }
.session-button { --button-side: #6e241a; border-color: #9b3422; border-radius: 99px; color: #fff1d7; background: #a83a2b; }

.handset { position: relative; display: flex; flex-direction: column; isolation: isolate; overflow: hidden; }
.phone-top { position: relative; z-index: 1; flex: none; display: flex; justify-content: space-between; align-items: center; padding-inline: .8em; color: #fff9df; font-size: .85em; }
.phone-game { flex: 1; min-height: 0; display: grid; align-content: center; justify-items: center; gap: .7em; text-align: center; }
.game-tiles { display: flex; justify-content: center; width: min(92%,26rem); gap: .14em; }
.tile {
  display: grid; place-items: center; flex: 0 1 1em; min-width: 0; height: 1.33em;
  color: #382007; background: linear-gradient(#ffe6b0,#ffc675);
  border: 1px solid #fff0cc; border-radius: .19em; box-shadow: 0 .1em 0 #7a4418, 0 .16em .36em #150d04a8;
  font-size: min(2.16em,calc(10.2em / var(--letter-count, 5))); font-weight: 760; line-height: 1;
}
.game-note { padding: .25em .65em; border-radius: .45em; color: #fff4d5; background: #123c32ed; font-size: .82em; font-weight: 750; }
.phone-game .game-note { max-width: 86%; }
.handset[data-mode="race"] .phone-game, .public-game[data-mode="race"] { background: radial-gradient(ellipse at top,#423970,#102632 68%); }
.race-scores { width: 84%; max-width: 360px; display: grid; gap: .6em; }
.race-scores p { padding: .45em .7em; border-left: .22em solid #ff8577; border-radius: .35em; background: #211a34; color: #fff5ec; font-weight: 780; }
.race-scores p:last-child { border-color: #65baff; }
.phone-label { display: flex; align-items: center; justify-content: space-between; gap: .45em; min-width: 0; font-weight: 700; }
.phone-label > span { min-width: 0; }
.phone-label button { flex: none; }

.active-game { display: flex; align-items: center; min-width: 0; gap: .55em; }
.active-game h1 { font-size: 1.55em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-game button { margin-left: auto; flex: none; }
.active-game > span { font-weight: 650; white-space: nowrap; }
.clock { display: grid; place-items: center; color: var(--cream); font-weight: 750; letter-spacing: .025em; font-variant-numeric: tabular-nums lining-nums; line-height: 1; }
.feed h2 { font-weight: 730; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .4em; text-align: center; }
.metric-button { --button-side: #a37347; --focus-ink: #70401c; min-width: 0; display: grid; align-content: center; justify-items: center; gap: .15em; color: var(--ink); background: #f5d2a2; border: 0; }
.metric-label { display: flex; align-items: center; justify-content: center; gap: .22em; max-width: 100%; font-size: .79em; font-weight: 700; line-height: 1.16; }
.metric-label .ui-icon { inline-size: .95em; block-size: .95em; }
.metric-label span { overflow: hidden; text-overflow: ellipsis; }
.metric-value { font-size: 1.38em; line-height: 1; font-weight: 760; font-variant-numeric: tabular-nums; }
.metric-label, .metric-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-body { display: flex; flex-direction: column; gap: .45em; min-height: 0; }
.feed ol, .history-list { list-style: none; padding: 0; min-height: 0; }
.feed ol { flex: 1; overflow: hidden; }
:is(.feed, .history-list) li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .55em; border-bottom: 1px solid var(--line); padding: .5em 0; overflow-wrap: anywhere; }
:is(.feed, .history-list) li b { display: block; font-weight: 650; }
:is(.feed, .history-list) li time { white-space: nowrap; font-size: .82em; }
.feed li > span > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-actions { display: flex; flex-wrap: wrap; gap: .35em; }

/* The scene contains only scenery and blank objects. Each hotspot is an HTML control. */
@media (min-width: 965px) and (min-height: 590px) {
  .studio[data-view="kontrol"] {
    container-type: inline-size;
    width: min(100%, 1900px, calc(100dvh * 1672 / 941)); margin-inline: auto; aspect-ratio: 1672 / 941;
    background: #10433f url('studyo-sahnesi.png') center / 100% 100% no-repeat;
    font-size: 1.23cqw;
  }
  [data-view="kontrol"] .studio-header { position: absolute; inset: 0; pointer-events: none; }
  [data-view="kontrol"] .studio-header::before { display: block; }
  [data-view="kontrol"] .studio-header :is(a, .session-button) { pointer-events: auto; position: absolute; display: grid; min-height: 0; place-items: center; }
  [data-view="kontrol"] .studio-header .brand { --brand-emblem-size: 3.05cqw; display: flex; justify-content: center; left: 9.8%; top: 2.37%; width: 26.15%; height: 6%; color: var(--ink); font-size: 2.18cqw; }
  [data-view="kontrol"] [data-nav] { top: 2.87%; height: 5%; padding: 0 .12em; font-size: 1.48cqw; color: var(--ink); line-height: 1.15; }
  [data-view="kontrol"] [data-nav="kontrol"] { left: 38.6%; width: 14.64%; }
  [data-view="kontrol"] [data-nav="kutuphane"] { left: 55%; width: 15.5%; }
  [data-view="kontrol"] [data-nav="yonetim"] { left: 72%; width: 8.5%; }
  [data-view="kontrol"] [data-nav][aria-current="page"] { color: #fff0cf; background: transparent; }
  [data-view="kontrol"] .studio-header .session-button { --key-x: 82.66cqw; --key-y: 1.6265cqw; --key-contact: #a45a45; --key-label-offset: .245cqw; display: flex; top: 2.89%; left: 82.66%; width: 12.78%; height: 5.08%; padding: 0; border: 0; background: transparent; font-size: 1.36cqw; }
  .control-scene { position: absolute; inset: 0; }
  .phone-slot, .console, .feed { display: contents; }
  .control-scene :is(.handset,.phone-label,.active-game,.clock,.start,.pause,.reset,.feed h2,.metrics,.feed-body) { position: absolute; }
  .handset { left: 7.86%; top: 27.65%; width: 15.75%; height: 53.35%; border-radius: 11% 11% 10% 10% / 5% 5% 5% 5%; font-size: 1.27cqw; }
  .phone-top { height: 7%; }
  .phone-game { transform: translateY(-10.1%); }
  .handset[data-mode="race"] .phone-game { transform: none; }
  .phone-label { display: contents; }
  .phone-label > span, .phone-label button { position: absolute; top: 85.31%; height: 4.09%; display: grid; place-items: center; color: var(--ink); }
  .phone-label > span { left: 5.7%; width: 11.85%; font-size: 1.47cqw; white-space: nowrap; }
  .phone-label button { --key-x: 19.25cqw; --key-y: 48.012cqw; --focus-ink: #70401c; display: flex; left: 19.25%; width: 6.25%; min-height: 0; padding: 0; border: 0; border-radius: 99px; background: transparent; font-size: 1.24cqw; }
  .active-game { left: 32.75%; top: 38.8%; width: 37.3%; height: 6.6%; color: var(--ink); font-size: 1.42cqw; }
  .active-game > span { padding-right: .65em; border-right: 1px solid #674323; }
  .active-game button { --key-x: 57.1815cqw; --key-y: 22.227cqw; --focus-ink: #70401c; width: 34.5%; height: 79%; min-height: 0; padding: 0 .18em; border: 0; border-radius: 99px; color: var(--ink); background: transparent; font-size: .85em; }
  .clock { left: 35%; top: 49.7%; width: 28.65%; height: 18.7%; font-size: 7.8cqw; text-shadow: 0 2px #0004; }
  /* Keep the original rim in the scene and give the sampled cap a short press. */
  .console :is(.start,.pause) {
    --key-y: 40.19cqw;
    --key-rim: 1.16cqw;
    top: var(--key-y); left: var(--key-x); width: var(--key-width); height: 6.18cqw;
    min-height: 0; z-index: 1; border: 0; border-radius: 2.45cqw;
    --focus-ink: #08352d; color: #34200c; background: transparent; padding: 0 .18em var(--key-rim);
    box-shadow: none; font-size: 1.87cqw;
  }
  .console .start { --key-x: 29.84cqw; --key-width: 20.58cqw; --key-contact: #ae7338; }
  .console .pause { --key-x: 51.38cqw; --key-width: 14.55cqw; --key-contact: #bd956e; }
  .scene-press {
    position: relative; isolation: isolate;
    --key-travel: 0cqw;
    transform: none; box-shadow: none; transition: none;
  }
  .scene-press::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    z-index: -2;
    background: linear-gradient(var(--key-contact, #bd956e), transparent .55cqw);
    opacity: 0;
    transition: opacity 105ms ease-out;
  }
  .scene-press::after {
    content: ''; position: absolute; inset: 0 0 var(--key-rim, .3cqw); z-index: -1;
    border-radius: inherit; pointer-events: none;
    background: url('studyo-sahnesi.png') calc(-1 * var(--key-x)) calc(-1 * var(--key-y)) / 100cqw auto no-repeat;
    transform: translateY(var(--key-travel));
    transition: transform 120ms ease-out;
  }
  .scene-press > :is(span, strong, svg) {
    transform: translateY(calc(var(--key-travel) + var(--key-label-offset, 0px)));
    transition: transform 120ms ease-out;
  }
  .scene-press:not(:disabled):is(:active,[aria-pressed="true"],[aria-expanded="true"]) {
    --key-travel: .22cqw; transform: none; box-shadow: none;
  }
  .scene-press:not(:disabled):is(:active,[aria-pressed="true"],[aria-expanded="true"])::before {
    opacity: .55; transition-duration: 50ms;
  }
  .scene-press:not(:disabled):is(:active,[aria-pressed="true"],[aria-expanded="true"])::after,
  .scene-press:not(:disabled):is(:active,[aria-pressed="true"],[aria-expanded="true"]) > :is(span, strong, svg) { transition-duration: 65ms; }
  @media (prefers-reduced-motion: reduce) {
    .scene-press::before, .scene-press::after,
    .scene-press > :is(span, strong, svg) { transition: none !important; }
  }
  .console .reset { --button-side: #a37347; --focus-ink: #08352d; left: 59.55%; top: 87%; width: 7.4%; height: 4.65%; padding: 0 .15em; min-height: 0; border: 1px solid #bf8b51; border-radius: 99px; color: #34200c; background: linear-gradient(#fce0b7,#e3b480); font-size: 1.03cqw; }
  .feed h2 { top: 25.2%; left: 79.8%; width: 17%; height: 6%; display: grid; place-items: center; font-size: 2.4cqw; }
  .metrics { top: 35.82%; left: 78.22%; width: 20.38%; height: 8.58%; gap: 2.8%; color: var(--ink); font-size: 1.34cqw; }
  .metric-button { --key-y: 20.16cqw; min-height: 0; border-radius: 20%; padding: 0 .16em; background: transparent; }
  .metric-button[data-kind="comment"] { --key-x: 78.22cqw; }
  .metric-button[data-kind="like"] { --key-x: 85.204cqw; }
  .metric-button[data-kind="gift"] { --key-x: 92.187cqw; }
  .feed-body { top: 49.05%; left: 78.9%; width: 19.35%; height: 29.5%; font-size: 1.05cqw; padding: .15em .5em .65em; }
  .feed-actions button { min-height: 0; border-radius: .45rem; color: #fff0cf; font-size: .85em; padding: .48em .58em; }
}

.workspace-heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: .65rem; margin-bottom: .9rem; }
.library { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr)); gap: 1rem; align-items: start; }
.setup { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .72rem 1rem; }
.game-card,.settings-card { min-width: 0; background: #164540; border: 1px solid var(--line); border-radius: .8rem; box-shadow: 0 .2rem 0 #00171388; }
.game-card { overflow: hidden; }
.game-cover { min-height: 9rem; display: grid; place-items: center; background: radial-gradient(ellipse at bottom,#3b7551,#153b32 70%); }
.game-cover[data-mode="race"] { background: radial-gradient(ellipse at bottom,#696084,#222938 70%); }
.game-card-content,.settings-card { padding: 1rem; }
.settings-card { display: grid; grid-template-rows: subgrid; grid-row: span 5; padding: 1.1rem; }
.settings-heading h3 { margin: 0 0 .4rem; font-size: 1.23rem; font-weight: 850; }
.settings-help { margin: 0; color: #e5d3b5; line-height: 1.42; font-size: .93rem; overflow-wrap: anywhere; }
.settings-fields { display: grid; align-content: start; gap: .62rem; }
.settings-card :is(label,.field-label) { margin-top: 0; }
.settings-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-content: start; }
.settings-actions button { flex: 1 1 7.5rem; min-height: 44px; justify-content: center; padding-inline: .55em; text-align: center; line-height: 1.2; }
.settings-extra { min-width: 0; }
.settings-extra details { margin-top: 0; padding-top: .2rem; }
.settings-extra summary { min-height: 44px; font-weight: 750; cursor: pointer; }
.settings-extra details :is(.settings-actions,label) { margin-top: .55rem; }
.settings-download { display: inline-flex; align-items: center; min-height: 44px; color: var(--cream); text-underline-offset: .2em; font-size: .9rem; }
.settings-card .form-feedback { margin: 0; border: 1px solid var(--line); padding: .55rem .7rem; overflow-wrap: anywhere; }
.settings-extra .form-feedback { margin-top: .65rem; }
.settings-card .form-feedback[data-kind="success"] { border-color: #79ab8a; color: #d0f2d6; }
.settings-card .form-feedback[data-kind="error"] { border-color: #d99478; color: #ffded2; background: #3c2926; }
.game-card-content h2 { margin-bottom: .4rem; }
.form-feedback { padding: .55rem .7rem; border-left: 2px solid #edbc69; background: #092e2a; border-radius: .35rem; margin-top: .65rem; color: #f9dcb6; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
form > button { margin-top: .7rem; margin-right: .3rem; }
label, .field-label { display: grid; gap: .25rem; margin-top: .7rem; font-weight: 620; }
.field-label label { margin: 0; }
input,select { min-height: 44px; min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: .6rem; color: var(--cream); background: var(--deep); padding: .55rem .7rem; }
input[readonly] { text-overflow: ellipsis; }
input[type="number"] { appearance: textfield; }
input::-webkit-inner-spin-button { appearance: none; }
input::file-selector-button { font: inherit; margin-right: .4rem; padding: .25em .5em; color: var(--cream); border: 1px solid var(--line); border-radius: .35rem; background: #184c46; box-shadow: 0 2px #0b2825; cursor: pointer; transition: transform 120ms ease-out, box-shadow 120ms ease-out; }
input[type="file"]:active::file-selector-button { transform: translateY(2px); box-shadow: inset 0 2px 3px #20120a38; }
@media (prefers-reduced-motion: reduce) { input::file-selector-button { transition: none; } }
details { margin-top: .85rem; border-top: 1px solid var(--line); padding-top: .6rem; }
summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 40px; border-radius: .45rem; list-style: none; }
summary::-webkit-details-marker { display: none; }
details[open] summary .ui-icon, .select-trigger[aria-expanded="true"] .ui-icon { transform: rotate(180deg); }
.field-grid { display: grid; grid-template-columns: 3fr 2fr; gap: .45rem; }
.select-shell { min-width: 0; }
.select-trigger { display: flex; justify-content: space-between; width: 100%; gap: .7rem; text-align: left; padding: .65rem .75rem; }
.select-menu { display: grid; gap: .22rem; margin-top: .35rem; padding: .35rem; border: 1px solid var(--line); border-radius: .7rem; background: #0a302b; }
.select-menu button { display: flex; justify-content: space-between; width: 100%; padding-inline: .6rem; text-align: left; border-color: transparent; background: transparent; box-shadow: none; }
.select-menu button[aria-selected="true"] { background: #214840; }
.select-menu button .ui-icon { visibility: hidden; }
.select-menu button[aria-selected="true"] .ui-icon { visibility: visible; color: #ffdfaa; }
.studio-dialog { width: min(510px,calc(100% - 1.25rem)); max-height: calc(100dvh - 1.25rem); padding: 0; border: 2px solid #d3a271; border-radius: 1.2rem; background: var(--deep); color: var(--cream); overflow: hidden; box-shadow: 0 .35rem 0 #875f3d, 0 1rem 3rem #070c0bbd; }
.studio-dialog[open] { display: flex; flex-direction: column; }
.studio-dialog.dialog-wide { width: min(1060px,calc(100% - 1.25rem)); }
#yonetim { width: min(1160px,calc(100% - 1.25rem)); }
.studio-dialog::backdrop { background: #0a1216a6; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; flex: none; gap: .65rem; padding: .65rem .95rem; background: linear-gradient(#ffdeac,#edbb85); color: var(--ink); box-shadow: inset 0 -2px #aa7645; }
.dialog-heading h2 { font-size: clamp(1.12rem, 3vw, 1.65rem); font-weight: 740; line-height: 1.15; }
.dialog-heading .close { --button-side: #aa7d52; --focus-ink: #70401c; flex: none; width: auto; min-height: 38px; color: var(--ink); border: 1px solid #9b6d46; background: #ffe3b9; }
.dialog-content { min-height: 0; overflow: auto; scrollbar-width: none; padding: 1rem; }
.dialog-content::-webkit-scrollbar { display: none; }
#yonetim > .dialog-content { padding: clamp(.8rem, 2vw, 1.3rem); }
@media (max-width: 840px) {
  .setup { grid-template-columns: minmax(0,1fr); gap: .9rem; }
  .settings-card { grid-row: auto; grid-template-rows: none; gap: .72rem; }
}
.session-details > div { display: grid; grid-template-columns: minmax(4rem, .4fr) 1fr; gap: .6rem; padding: .52rem 0; border-bottom: 1px solid var(--line); }
.session-details dt { font-weight: 700; }
.history-controls { justify-content: space-between; }
.public-game { width: min(100%,475px); min-height: 100svh; margin-inline: auto; display: grid; align-content: center; justify-items: center; gap: 1rem; background: #103b32 url('studyo-sahnesi.png') 9.3% 62.6% / 638% 200% no-repeat; color: #fff5da; padding: 1.25rem; text-align: center; }
.public-game > .game-note { font-size: 1.15rem; }
.embedded-preview { min-height: 0; width: min(100%,260px,calc(65dvh * 9 / 16)); aspect-ratio: 9 / 16; border-radius: .9rem; }

@media (max-width: 964px), (max-height: 589px) {
  .studio[data-view="kontrol"] { background: radial-gradient(ellipse at top,#38233f,transparent 45%),#103632; }
  .studio[data-view="kontrol"] { height: 100dvh; display: flex; flex-direction: column; }
  .studio[data-view="kontrol"] .studio-header { display: flex; flex: none; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .18rem .6rem; padding: .36rem .6rem; background: #f6c99c; color: var(--ink); }
  .studio-header nav { flex-wrap: wrap; }
  .studio > main { flex: 1; min-height: 0; }
  .control-scene { display: grid; height: 100%; grid-template-columns: minmax(145px,.75fr) minmax(0,1.25fr); grid-template-rows: auto auto minmax(0,1fr); gap: .55rem; max-width: 800px; margin-inline: auto; padding: .6rem; }
  .phone-slot { grid-row: span 3; display: grid; align-content: start; gap: .5rem; }
  .handset { width: min(100%,250px,calc(61dvh * 9 / 16)); aspect-ratio: 9/16; margin-inline: auto; border: 5px solid #e4a769; border-radius: 23px; background: #164938 url('studyo-sahnesi.png') 9.3% 62.6% / 638% 200% no-repeat; box-shadow: 0 .25rem #4b3122; }
  .phone-top { height: 12%; background: #0d2924; }
  .active-game,.console,.feed { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; padding: .52rem; box-shadow: 0 .21rem #00171366; }
  .active-game { flex-wrap: wrap; }
  .active-game h1 { font-size: 1.22rem; white-space: normal; }
  .active-game button { padding: .4em .6em; min-height: 36px; }
  .console { text-align: center; }
  .console .pause { --button-side: #a37347; --focus-ink: #08352d; background: linear-gradient(#ffe1b8,#e8bd91); color: #34200c; }
  .clock { font-size: clamp(2.1rem, 8vw, 4rem); margin-bottom: .35rem; }
  .feed { display: flex; flex-direction: column; overflow: hidden; }
  .feed h2 { font-size: 1.18rem; margin-bottom: .35rem; }
  .metrics { gap: .42rem; }
  .metric-button { border-radius: .48rem; padding: .4rem; }
  .feed-body { flex: 1; margin-top: .35rem; }
  .feed-actions button { min-height: 33px; font-size: .85rem; }
}
@media (max-width: 560px) {
  .studio-header nav { order: 2; justify-content: center; width: 100%; gap: .15rem; }
  .studio-header nav a { padding-inline: .46em; font-size: .81rem; min-height: 34px; }
  .session-button { min-height: 34px; font-size: .79rem; }
  .control-scene { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) auto auto auto; }
  .phone-slot { min-height: 0; grid-row: auto; overflow: hidden; grid-template-rows: minmax(0,1fr) auto; }
  .handset { width: auto; max-width: 100%; height: min(100%,35dvh); font-size: .78rem; }
  .phone-label { width: min(100%,225px); justify-self: center; font-size: .85rem; }
  .phone-label button,.console button { min-height: 34px; font-size: .82rem; }
  .active-game { font-size: .85rem; gap: .35rem; }
  .active-game h1 { font-size: 1rem; }
  .active-game button { min-height: 30px; }
  .feed ol { display: none; }
  .metric-button { padding: .25rem; }
  .metric-value { font-size: 1.1rem; }
  .feed-body { flex: none; }
}
.handset .device-picture { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; background: #071515; }
.handset img.device-picture { touch-action: none; cursor: crosshair; user-select: none; -webkit-user-drag: none; }
.handset.device-visible .phone-game { visibility: hidden; }
#phone-text { margin-top: .85rem; }
#control-result { white-space: normal; overflow-wrap: anywhere; }
