/* Dedicated names prevent the archived header/label rules leaking into tiles. */
.foxy-ui .fx-study-wall-launch { margin:0 20px 16px; min-height:44px; }
body.fx-study-wall-open { overflow:hidden; }
dialog.fx-study-wall { width:min(1160px,calc(100vw - 48px)); max-width:none; max-height:calc(100dvh - 48px); padding:0; border:1px solid var(--fx-line); border-radius:18px; background:var(--fx-surface); color:var(--fx-text); font:14px/1.5 system-ui,sans-serif; overflow:hidden; box-sizing:border-box; }
dialog.fx-study-wall[open] { display:flex; flex-direction:column; }
.fx-study-wall::backdrop { background:#090d15b8; backdrop-filter:blur(4px); }
.fx-study-wall * { box-sizing:border-box; }
.fx-study-wall .fx-study-wall-head { position:relative; display:flex; justify-content:space-between; align-items:center; flex:none; gap:20px; padding:20px 24px; border-bottom:1px solid var(--fx-line); }
.fx-study-wall h2 { margin:0; font-size:22px; line-height:1.3; }
.fx-study-wall p { margin:6px 0 0; color:var(--fx-muted); }
.fx-study-wall button { display:inline-flex; align-items:center; justify-content:center; flex:none; min-height:44px; width:auto; height:auto; margin:0; padding:10px 14px; border:1px solid var(--fx-line); border-radius:10px; background:var(--fx-subtle); color:var(--fx-text); font:600 14px/1.4 system-ui; cursor:pointer; }
.fx-study-wall button:disabled { opacity:.45; cursor:default; }
.fx-study-wall .fx-study-wall-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px 24px; padding:16px 24px; border-bottom:1px solid var(--fx-line); flex:none; }
.fx-study-wall label { display:flex; position:static; align-items:center; justify-content:flex-start; gap:8px; width:auto; min-width:0; margin:0; padding:0; color:var(--fx-text); font:inherit; }
.fx-study-wall input[type=checkbox] { appearance:none; position:static; display:inline-grid; place-content:center; flex:none; width:18px; min-width:18px; height:18px; margin:0; padding:0; border:1.5px solid var(--fx-muted); border-radius:5px; background:var(--fx-surface); color:var(--fx-on-accent); cursor:pointer; }
.fx-study-wall .fx-study-wall-option { color:var(--fx-muted); }
.fx-study-wall select { appearance:auto; width:auto; min-width:90px; min-height:44px; margin:0; padding:8px 12px; background:var(--fx-subtle); background-image:none!important; color:var(--fx-text); border:1px solid var(--fx-line); border-radius:10px; font:inherit; }
.fx-study-wall .fx-study-wall-count { margin:0; white-space:nowrap; }
.fx-study-wall .fx-study-wall-selection { display:flex; flex-wrap:wrap; gap:8px; margin-inline-start:auto; }
.fx-study-wall .fx-study-wall-body { display:grid; grid-template-columns:220px minmax(0,1fr); gap:24px; min-height:0; overflow:auto; overscroll-behavior:contain; padding:24px; }
.fx-study-wall h3 { margin:0 0 12px; font-size:15px; }
.fx-study-wall .fx-study-wall-choices { display:grid; gap:8px; }
.fx-study-wall .fx-study-wall-source { padding:12px; min-height:48px; border:1px solid var(--fx-line); border-radius:10px; background:var(--fx-subtle); cursor:pointer; }
.fx-study-wall .fx-study-wall-source:has(:checked) { border-color:var(--fx-accent); background:var(--fx-tint); }
.fx-study-wall .fx-study-wall-grid { display:grid; grid-template-columns:repeat(var(--study-wall-columns,2),minmax(0,1fr)); align-content:start; gap:16px; min-width:0; }
.fx-study-wall .fx-study-wall-tile { display:flex; flex-direction:column; min-width:0; margin:0; padding:0; border:1px solid var(--fx-line); border-radius:12px; overflow:hidden; background:var(--fx-subtle); }
.fx-study-wall .fx-study-wall-tile-head { position:static; display:flex; align-items:center; justify-content:space-between; gap:8px; width:auto; min-width:0; padding:10px 12px; }
.fx-study-wall .fx-study-wall-tile-head strong { min-width:0; overflow-wrap:anywhere; }
.fx-study-wall .fx-study-wall-tile-head span { color:var(--fx-muted); font-size:12px; white-space:nowrap; }
.fx-study-wall .fx-study-wall-screen { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:10px; aspect-ratio:16/9; background:#101318; color:#aeb6c1; }
.fx-study-wall .fx-study-wall-screen svg { width:28px; height:28px; }
.fx-study-wall .fx-study-wall-empty { grid-column:1/-1; border:1px dashed var(--fx-line); padding:36px 20px; text-align:center; border-radius:12px; }
.fx-study-wall :is(button,input,select):focus-visible { outline:2px solid var(--fx-accent); outline-offset:3px; }
@media(max-width:800px) {
  .fx-study-wall .fx-study-wall-body { grid-template-columns:minmax(0,1fr); }
  .fx-study-wall .fx-study-wall-choices { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
  dialog.fx-study-wall { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border-radius:12px; }
  .fx-study-wall .fx-study-wall-head { padding:16px; gap:12px; }
  .fx-study-wall h2 { font-size:18px; }
  .fx-study-wall .fx-study-wall-head p { font-size:12px; }
  .fx-study-wall .fx-study-wall-toolbar { padding:12px 16px; gap:12px; }
  .fx-study-wall .fx-study-wall-grid-label { display:none; }
  .fx-study-wall .fx-study-wall-selection { margin-inline-start:0; }
  .fx-study-wall .fx-study-wall-body { padding:16px; gap:16px; }
  .fx-study-wall .fx-study-wall-grid { grid-template-columns:minmax(0,1fr); }
}

/* Shared studio language: calm surfaces, orange selection, consistent SVG controls. */
body.foxy-ui dialog.fx-study-wall { width:min(1320px,calc(100vw - 40px)); border-radius:20px; box-shadow:0 24px 90px #0005; }
.fx-study-wall .fx-study-icon, .fx-study-wall .fx-study-icon * { color:inherit !important; stroke:currentColor !important; fill:none !important; }
.fx-study-wall .fx-study-wall-head { padding:20px 24px; gap:14px; }
.fx-study-wall .fx-study-wall-head > div { flex:1; min-width:0; }
.fx-study-wall .fx-study-wall-symbol { width:44px; height:44px; display:grid; place-items:center; background:var(--fx-tint); color:var(--fx-accent-ink); border-radius:12px; flex:none; }
.fx-study-wall .fx-study-wall-symbol svg { width:23px; height:23px; }
.fx-study-wall h2 { font-size:22px; font-weight:700; overflow-wrap:anywhere; }
.fx-study-wall button { gap:7px; min-width:0; white-space:normal; overflow-wrap:anywhere; line-height:1.4; }
.fx-study-wall button[hidden], .fx-study-wall article[hidden] { display:none !important; }
.fx-study-wall .fx-study-wall-toolbar { padding:14px 24px; gap:12px; background:var(--fx-surface); }
.fx-study-wall .fx-study-wall-options { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-inline-start:auto; }
.fx-study-wall .fx-study-wall-option { border:1px solid var(--fx-line); border-radius:9px; padding:10px 12px; min-height:44px; background:var(--fx-subtle); }
.fx-study-wall .fx-study-wall-option svg { width:17px; height:17px; }
.fx-study-wall .fx-study-wall-stop { color:var(--fx-danger,#ed8b91); }
.fx-study-wall .fx-study-wall-body { grid-template-columns:220px minmax(0,1fr); gap:20px; background:var(--fx-subtle); align-items:start; padding:20px; }
.fx-study-wall .fx-study-wall-sources { min-width:0; padding:0; border:1px solid var(--fx-line); border-radius:14px; background:var(--fx-surface); }
.fx-study-wall .fx-study-wall-sources > summary { display:flex; align-items:center; gap:9px; padding:14px; cursor:pointer; list-style:none; }
.fx-study-wall .fx-study-wall-sources > summary::-webkit-details-marker { display:none; }
.fx-study-wall .fx-study-wall-sources > summary::after { content:none; }
.fx-study-wall .fx-study-wall-sources > summary > svg:last-child { width:16px; height:16px; transform:rotate(90deg); }
.fx-study-wall .fx-study-wall-sources:not([open]) > summary > svg:last-child { transform:none; }
.fx-study-wall .fx-study-wall-sources h3 { flex:1; margin:0; overflow-wrap:anywhere; }
.fx-study-wall .fx-study-wall-total { font-size:12px; color:var(--fx-muted); }
.fx-study-wall .fx-study-wall-selection { margin:0; padding:0 12px 12px; display:grid; grid-template-columns:1fr; gap:8px; }
.fx-study-wall .fx-study-wall-selection button { width:100%; font-size:12px; padding:8px; }
.fx-study-wall .fx-study-wall-all { color:var(--fx-accent-ink); }
.fx-study-wall .fx-study-wall-choices { padding:0 12px 12px; gap:6px; max-height:clamp(126px,calc(100dvh - 430px),420px); overflow:auto; scrollbar-gutter:stable; }
.fx-study-wall .fx-study-wall-source { padding:10px; min-height:46px; gap:8px; font-size:13px; border-radius:9px; }
.fx-study-wall .fx-study-wall-source > span:last-child { min-width:0; overflow-wrap:anywhere; }
.fx-study-wall .fx-study-wall-source-icon { display:flex; flex:none; color:var(--fx-muted); }
.fx-study-wall .fx-study-wall-source-icon svg { width:17px; height:17px; }
.fx-study-wall .fx-study-wall-source:has(:checked) { color:var(--fx-accent-ink); }
.fx-study-wall .fx-study-wall-source:has(:checked) .fx-study-wall-source-icon { color:inherit; }
.fx-study-wall .fx-study-wall-stage { min-width:0; }
.fx-study-wall .fx-study-wall-stage-head { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:14px; min-height:30px; }
.fx-study-wall .fx-study-wall-count { font-size:13px; color:var(--fx-text); font-weight:600; white-space:normal; }
.fx-study-wall .fx-study-wall-offline { font-size:12px; color:var(--fx-muted); margin-inline-start:auto; }
.fx-study-wall .fx-study-wall-grid { gap:14px; }
.fx-study-wall .fx-study-wall-tile { border-radius:14px; background:var(--fx-surface); }
.fx-study-wall .fx-study-wall-tile-head { padding:8px 12px; flex-wrap:wrap; min-height:52px; }
.fx-study-wall .fx-study-wall-tile-head > div { min-width:0; display:grid; gap:2px; }
.fx-study-wall .fx-study-wall-tile-head strong { font-size:13px; }
.fx-study-wall .fx-study-wall-tile-head .fx-study-wall-tile-state { font-size:11px; padding:3px 7px; border:1px solid var(--fx-line); border-radius:20px; margin-inline-start:auto; }
.fx-study-wall .fx-study-wall-screen { min-height:92px; max-height:clamp(92px,calc((100dvh - 530px)/2),210px); padding:12px 10px; text-align:center; font-size:12px; background:radial-gradient(ellipse at center,#1f2934,#111820); }
.fx-study-wall .fx-study-wall-screen svg { width:30px; height:30px; color:#9caab9; }
.fx-study-wall .fx-study-wall-tile-actions { display:flex; gap:6px; padding:6px 10px; justify-content:flex-end; border-top:1px solid var(--fx-line); }
.fx-study-wall .fx-study-wall-tile-actions button { padding:6px; min-height:34px; width:34px; }
.fx-study-wall .fx-study-wall-tile-actions button svg { width:18px; height:18px; }
.fx-study-wall .fx-study-wall-empty { margin:0; background:var(--fx-surface); padding:50px 20px; }
.fx-study-wall-focused .fx-study-wall-sources { display:none; }
.fx-study-wall-focused .fx-study-wall-grid-label { display:none; }
.fx-study-wall.fx-study-wall-focused .fx-study-wall-body { grid-template-columns:minmax(0,1fr); }
.fx-study-wall.fx-study-wall-focused .fx-study-wall-grid { grid-template-columns:minmax(0,1fr); }
.fx-study-wall-focused .fx-study-wall-screen { min-height:200px; max-height:48dvh; }
@media(max-width:1000px) {
  .fx-study-wall .fx-study-wall-body { grid-template-columns:190px minmax(0,1fr); }
  .fx-study-wall .fx-study-wall-options { margin-inline-start:0; }
}
@media(max-width:800px) {
  .fx-study-wall .fx-study-wall-body { grid-template-columns:minmax(0,1fr); gap:14px; }
  .fx-study-wall .fx-study-wall-selection { display:flex; }
  .fx-study-wall .fx-study-wall-selection button { flex:1; }
  .fx-study-wall .fx-study-wall-choices { grid-template-columns:repeat(3,minmax(0,1fr)); max-height:126px; }
}
@media(max-width:600px) {
  body.foxy-ui dialog.fx-study-wall { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border-radius:14px; }
  .fx-study-wall .fx-study-wall-head { padding:14px; gap:10px; }
  .fx-study-wall .fx-study-wall-symbol { display:none; }
  .fx-study-wall h2 { font-size:18px; }
  .fx-study-wall .fx-study-wall-close { font-size:12px; padding:8px 10px; }
  .fx-study-wall .fx-study-wall-toolbar { padding:12px 14px; gap:8px; }
  .fx-study-wall .fx-study-wall-toolbar > button { flex:1; font-size:12px; padding:8px; }
  .fx-study-wall .fx-study-wall-options { width:100%; gap:8px; }
  .fx-study-wall .fx-study-wall-option { flex:1; font-size:12px; padding:8px; gap:6px; }
  .fx-study-wall .fx-study-wall-option svg { display:none; }
  .fx-study-wall .fx-study-wall-body { padding:12px; }
  .fx-study-wall .fx-study-wall-choices { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .fx-study-wall .fx-study-wall-offline { margin:0; }
  .fx-study-wall .fx-study-wall-tile-head { min-height:56px; }
  .fx-study-wall .fx-study-wall-screen { max-height:none; min-height:150px; }
  .fx-study-wall .fx-study-wall-tile-actions button { width:44px; min-height:44px; }
}
.fx-study-wall .fx-study-wall-time { display:block; padding:6px 12px; color:var(--fx-muted); font-size:11px; overflow-wrap:anywhere; }
.fx-study-wall .fx-study-wall-tile-head span { white-space:normal; overflow-wrap:anywhere; }
.fx-study-wall .fx-study-wall-session { margin:0 0 12px; overflow-wrap:anywhere; font-size:12px; }
.fx-study-wall .fx-study-wall-screen { background:var(--fx-bg,var(--fx-subtle)); color:var(--fx-muted); }
.fx-study-wall .fx-study-wall-screen svg { color:var(--fx-accent-ink); }
.fx-study-wall .fx-study-wall-source-group { display:grid; grid-column:1/-1; gap:8px; min-width:0; }
.fx-study-wall .fx-study-wall-source-group > .fx-study-wall-session { grid-column:1/-1; margin:2px 0 4px; }
@media(max-width:800px) { .fx-study-wall .fx-study-wall-source-group { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* The same field, selection and disabled states as the rest of FOXY. */
.fx-study-wall .fx-study-wall-grid-label > .fx-select-control { width:78px; flex:none; }
html[data-foxy-design=studio] .foxy-ui .fx-study-wall-grid-label .fx-select-trigger { min-height:44px; width:100%; padding:10px 12px; justify-content:space-between; font-size:14px; }
.fx-study-wall input[type=checkbox]::before { content:''; width:8px; height:5px; border:solid currentColor; border-width:0 0 2px 2px; transform:translateY(-1px) rotate(-45deg) scale(0); }
.fx-study-wall input[type=checkbox]:checked { background:var(--fx-accent); border-color:var(--fx-accent); }
.fx-study-wall input[type=checkbox]:checked::before { transform:translateY(-1px) rotate(-45deg) scale(1); }
.fx-study-wall input[type=checkbox]:disabled { border-color:var(--fx-line); background:var(--fx-hover); cursor:not-allowed; }
.fx-study-wall .fx-study-wall-option:has(:disabled) { cursor:not-allowed; }


/* Live wall: real media inside the local tile geometry. */
.foxy-ui .fx-sessions .fx-card-heading .fx-study-wall-launch { margin:0; }
.fx-study-wall .fx-study-wall-launch { gap:8px; }
.fx-study-wall .fx-study-wall-launch svg { width:18px; height:18px; }
.fx-study-wall .fx-study-wall-screen { position:relative; overflow:hidden; padding:0; }
.fx-study-wall .fx-study-wall-screen video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#0d1116; display:none; }
.fx-study-wall .fx-study-wall-tile[data-state=live] .fx-study-wall-screen video { display:block; }
.fx-study-wall .fx-study-wall-tile[data-state=live] .fx-study-wall-placeholder { display:none; }
.fx-study-wall .fx-study-wall-placeholder { display:flex; flex-direction:column; align-items:center; gap:10px; }
.fx-study-wall .fx-study-wall-tile[data-state=live] .fx-study-wall-tile-state { color:#3ecf8e; }
.fx-study-wall .fx-study-wall-tile[data-state=error] .fx-study-wall-tile-state { color:var(--fx-danger,#ed8b91); }
.fx-study-wall .fx-study-wall-tile[data-state=offline] .fx-study-wall-tile-state { color:var(--fx-muted); }
.fx-study-wall .fx-study-wall-source > span:last-child { min-width:0; font-size:13px; overflow-wrap:anywhere; }
.fx-study-wall .fx-study-wall-source-label { display:grid; gap:2px; min-width:0; }
.fx-study-wall .fx-study-wall-source-label strong { min-width:0; font-weight:600; overflow-wrap:anywhere; }
.fx-study-wall .fx-study-wall-source-label small { min-width:0; font-size:11px; font-weight:400; color:var(--fx-muted); overflow-wrap:anywhere; }
.fx-study-wall .fx-study-wall-source:has(:checked) .fx-study-wall-source-label small { color:inherit; opacity:.75; }
.fx-study-wall .fx-study-wall-source-icon { display:inline-flex; flex:none; color:var(--fx-accent-ink); }
.fx-study-wall .fx-study-wall-source-icon svg { width:16px; height:16px; }
.fx-study-wall .fx-study-wall-note { margin:10px 0 0; padding:0 12px 12px; font-size:12px; color:var(--fx-muted); }
.fx-study-wall .fx-study-wall-note:empty { display:none; }
.fx-study-wall .fx-study-wall-tile-actions button.is-on { color:var(--fx-accent); border-color:var(--fx-accent); }
