:root {
  color: #173632;
  background: #f3f6f4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: 0;
  --ink: #173632;
  --muted: #62726e;
  --line: #d8e1dc;
  --line-strong: #c4d0ca;
  --surface: #ffffff;
  --canvas: #f3f6f4;
  --soft: #ebf2ef;
  --teal: #15524d;
  --teal-strong: #103f3c;
  --mint: #62cdb2;
  --coral: #ff6b63;
  --yellow: #ffc95c;
  --amber: #9b5e0a;
  --red: #a83d38;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 0; background: var(--canvas); }
::selection { color: #fff; background: var(--teal); }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, a, input, textarea, select { outline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #0f766e; }

.shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  padding: 0 clamp(20px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d3ddd8;
  background: rgba(255,255,255,.96);
  box-shadow: 0 1px 0 rgba(16,63,60,.02);
  backdrop-filter: blur(14px);
}
.brand, .brand > div, .top-actions, .section-title, .form-actions, .save-cluster { display: flex; align-items: center; }
.brand { gap: 12px; min-width: 0; }
.brand > div { align-items: flex-start; flex-direction: column; line-height: 1.18; }
.brand strong { color: var(--teal-strong); font-size: .92rem; white-space: nowrap; }
.brand span { margin-top: 4px; color: var(--muted); font-size: .7rem; }
.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(16,63,60,.14);
}
.brand-mark.large { width: 60px; height: 60px; margin-bottom: 28px; }
.top-actions { gap: 8px; }
.app-switcher { min-width: 210px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .7rem; font-weight: 700; }
.app-switcher > span { flex: none; }
.app-switcher select { min-height: 38px; margin: 0; padding: 6px 30px 6px 10px; background: #f8faf9; font-size: .74rem; }
.connection { display: inline-flex; align-items: center; gap: 8px; margin-right: 8px; color: var(--muted); font-size: .76rem; font-weight: 650; }
.connection i { width: 8px; height: 8px; border-radius: 50%; background: #96a39f; }
.connection.online i { background: #2aa574; box-shadow: 0 0 0 3px #dcf4e9; }

.workspace-layout {
  width: min(1440px, 100%);
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  min-width: 0;
  padding: 34px 22px 26px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #f8faf9;
}
.sidebar-heading { padding: 0 10px 24px; border-bottom: 1px solid var(--line); }
.sidebar-heading span, .sidebar-status > span { color: var(--coral); font-size: .64rem; font-weight: 800; }
.sidebar-heading strong, .sidebar-heading small, .sidebar-status strong, .sidebar-status small { display: block; }
.sidebar-heading strong { margin-top: 7px; color: var(--teal-strong); font-size: 1rem; }
.sidebar-heading small { margin-top: 4px; color: var(--muted); font-size: .7rem; }
.section-nav { display: grid; gap: 5px; margin-top: 18px; }
.section-nav a {
  min-height: 42px;
  padding: 0 11px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  color: #566763;
  border-left: 3px solid transparent;
  border-radius: 0 5px 5px 0;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 650;
  transition: color .16s, background .16s, border-color .16s;
}
.section-nav a > span { color: #92a09c; font-size: .62rem; font-variant-numeric: tabular-nums; }
.section-nav a:hover { color: var(--teal); background: #eef4f1; }
.section-nav a.active { color: var(--teal-strong); border-left-color: var(--coral); background: #e5f0ec; }
.section-nav a.active > span { color: var(--teal); }
.sidebar-status { margin-top: auto; padding: 18px 10px 4px; border-top: 1px solid var(--line); }
.sidebar-status strong { margin-top: 6px; font-size: .76rem; }
.sidebar-status small { margin-top: 3px; color: var(--muted); font-size: .67rem; }

main { width: min(1160px, 100%); min-width: 0; margin: 0 auto; padding: 42px 40px 84px; }
main:focus { outline: none; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: .66rem; font-weight: 850; letter-spacing: 0; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; color: var(--teal-strong); font-size: 1.9rem; line-height: 1.16; }
.page-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: .82rem; }
.release-state { min-width: 148px; padding: 5px 0 5px 16px; text-align: right; border-left: 3px solid var(--yellow); }
.release-state span { display: block; color: var(--muted); font-size: .7rem; }
.release-state strong { display: block; margin-top: 4px; color: var(--teal-strong); font-size: .88rem; overflow-wrap: anywhere; }

.section { padding: 38px 0 42px; border-bottom: 1px solid var(--line); scroll-margin-top: 82px; }
.section-title[id] { scroll-margin-top: 84px; }
.section-title { justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-title h2 { margin: 0; color: var(--teal-strong); font-size: 1.18rem; }
.section-title > span { color: var(--muted); font-size: .73rem; }
.coverage-note { margin: -8px 0 20px; padding: 11px 13px; color: #4e625d; border-left: 3px solid var(--yellow); background: #fff8e8; font-size: .72rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric { min-width: 0; min-height: 108px; padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--teal); border-radius: 6px; background: var(--surface); box-shadow: 0 5px 16px rgba(23,54,50,.035); }
.metric:nth-child(2) { border-top-color: var(--coral); }
.metric:nth-child(3) { border-top-color: var(--yellow); }
.metric:nth-child(4) { border-top-color: var(--mint); }
.metric span { color: var(--muted); font-size: .74rem; }
.metric strong { display: block; margin-top: 10px; color: var(--teal-strong); font-size: 1.62rem; line-height: 1; font-variant-numeric: tabular-nums; }
.metric small { display: block; margin-top: 10px; color: #70807b; font-size: .65rem; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 31px; }
h3 { margin-bottom: 11px; color: var(--ink); font-size: .8rem; }
.data-list { min-height: 39px; border-top: 2px solid var(--line-strong); }
.data-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .76rem; }
.data-row span { color: var(--muted); overflow-wrap: anywhere; }
.empty { padding: 12px 0; color: #687772; font-size: .76rem; }
.analytics-block { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.analytics-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.analytics-heading h3 { margin: 0; font-size: .88rem; }
.analytics-heading p { margin: 5px 0 0; color: var(--muted); font-size: .7rem; }
.chart-legend { display: flex; gap: 14px; color: var(--muted); font-size: .67rem; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 2px; background: var(--teal); }
.chart-legend i.new { background: var(--coral); }
.trend-scroll { overflow-x: auto; padding-bottom: 4px; }
.trend-chart { min-width: 660px; height: 170px; display: grid; grid-template-columns: repeat(14, minmax(34px, 1fr)); gap: 8px; border-bottom: 1px solid var(--line-strong); }
.trend-day { min-width: 0; display: grid; grid-template-rows: 1fr 24px; gap: 7px; }
.trend-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; min-height: 130px; }
.trend-bars i { width: min(12px, 38%); min-height: 0; border-radius: 3px 3px 0 0; background: var(--teal); }
.trend-bars i.new { background: var(--coral); }
.trend-day > span { color: #71817c; font-size: .58rem; text-align: center; font-variant-numeric: tabular-nums; }
.game-performance { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.game-performance-head, .game-performance-row { display: grid; grid-template-columns: minmax(220px, 1.7fr) repeat(5, minmax(76px, .55fr)); align-items: center; gap: 12px; padding: 11px 15px; }
.game-performance-head { color: var(--muted); background: var(--soft); font-size: .63rem; font-weight: 800; }
.game-performance-row + .game-performance-row { border-top: 1px solid var(--line); }
.game-performance-row > span { color: #42534f; font-size: .73rem; font-variant-numeric: tabular-nums; }
.performance-game { min-width: 0; display: flex; align-items: center; gap: 12px; }
.performance-game > b { color: var(--coral); font-size: .64rem; }
.performance-game span { min-width: 0; }
.performance-game strong, .performance-game small { display: block; overflow-wrap: anywhere; }
.performance-game strong { color: var(--teal-strong); font-size: .77rem; }
.performance-game small { margin-top: 2px; color: var(--muted); font-size: .61rem; }
.analytics-summary { margin-top: 30px; }

.control-band { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 20px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); box-shadow: 0 5px 16px rgba(23,54,50,.025); }
.control-band > label + label { border-left: 1px solid var(--line); }
.control-band.critical:has(#killSwitch:checked) { border-color: #d98c85; background: #fff7f6; }
.control-band #killSwitch:checked + i { background: var(--red); }
.switch-row { min-height: 76px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; }
.switch-row span { min-width: 0; }
.switch-row strong { display: block; font-size: .84rem; }
.switch-row small { display: block; margin-top: 4px; color: var(--muted); font-size: .7rem; }
.switch-row input, .mini-switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i, .mini-switch i { flex: none; width: 40px; height: 24px; border-radius: 12px; background: #aab5b1; position: relative; transition: background .16s; }
.switch-row i::after, .mini-switch i::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .16s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch-row input:checked + i, .mini-switch input:checked + i { background: var(--teal); }
.switch-row input:checked + i::after, .mini-switch input:checked + i::after { transform: translateX(16px); }
.switch-row input:focus-visible + i, .mini-switch input:focus-visible + i { outline: 2px solid #0f766e; outline-offset: 3px; }
.switch-row.compact { min-height: 50px; padding: 8px 0; border-bottom: 1px solid var(--line); }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.app-settings-grid > form, .app-settings-grid fieldset { min-width: 0; height: 100%; }
.app-settings-grid fieldset { display: flex; flex-direction: column; }
.app-settings-grid .form-actions { margin-top: auto; padding-top: 22px; }
.website-link { color: var(--teal); font-size: .73rem; font-weight: 750; text-decoration-thickness: 1px; text-underline-offset: 3px; }
input[readonly] { color: #6d7c78; background: #eef2f0; cursor: default; }
fieldset { min-width: 0; margin: 0; padding: 19px 20px 22px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: 0 5px 16px rgba(23,54,50,.025); }
legend { padding: 0 8px; color: var(--teal-strong); font-size: .81rem; font-weight: 800; }
fieldset > label:not(.switch-row), .field-grid label { display: block; margin-top: 16px; color: #485956; font-size: .72rem; font-weight: 650; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
input[type="text"], input[type="url"], input[type="number"], input[type="password"], textarea, select {
  width: 100%; min-height: 44px; margin-top: 7px; padding: 9px 12px; color: var(--ink); background: #f9fbfa;
  border: 1px solid #c3d0ca; border-radius: 5px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
input:hover, textarea:hover { border-color: #9fafa8; }
input:focus, textarea:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 3px rgba(21,82,77,.08); }
textarea { resize: vertical; }
label small { display: block; margin-top: 5px; color: var(--muted); font-weight: 400; font-size: .68rem; }
.placement-table { margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: 0 5px 16px rgba(23,54,50,.025); }
.placement-head, .placement-row { display: grid; grid-template-columns: minmax(180px, 1fr) 80px 105px minmax(170px, .8fr); align-items: center; gap: 14px; padding: 12px 16px; }
.placement-head { color: #526560; background: var(--soft); font-size: .67rem; font-weight: 800; text-transform: uppercase; }
.placement-row + .placement-row { border-top: 1px solid var(--line); }
.placement-row strong, .placement-row small { display: block; }
.placement-row strong { font-size: .78rem; }
.placement-row small { margin-top: 3px; color: var(--muted); font-size: .66rem; overflow-wrap: anywhere; }
.placement-row input { margin-top: 0; }
.placement-control { min-height: 44px; display: flex; align-items: center; }
.mini-switch { width: 48px; height: 44px; display: flex; align-items: center; cursor: pointer; }
.placement-reward { color: var(--muted); font-size: .74rem; }
.mobile-label { display: none; }
.form-actions { justify-content: space-between; gap: 20px; margin-top: 22px; padding-top: 2px; }
.validation-note { color: var(--muted); font-size: .7rem; }
.save-cluster { flex: none; gap: 12px; }
.form-status { min-width: 76px; color: var(--muted); font-size: .7rem; text-align: right; }
.form-status.dirty { color: var(--amber); font-weight: 700; }
.form-status.saving { color: var(--teal); }
.form-status.saved { color: #237750; }
.form-status.error { color: var(--red); font-weight: 700; }

.button { min-height: 40px; border-radius: 5px; padding: 8px 15px; border: 1px solid transparent; cursor: pointer; font-size: .76rem; font-weight: 750; transition: background .16s, border-color .16s, box-shadow .16s, transform .16s; }
.button:disabled { opacity: .58; cursor: wait; }
.button.primary { color: white; background: var(--teal); border-color: var(--teal); box-shadow: 0 3px 9px rgba(21,82,77,.14); }
.button.primary:hover { background: var(--teal-strong); box-shadow: 0 5px 14px rgba(21,82,77,.18); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button.quiet { color: #40534f; background: transparent; border-color: var(--line-strong); }
.button.quiet:hover { background: var(--soft); }
.button.full { width: 100%; margin-top: 6px; }

.feedback-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.feedback-summary > div { min-height: 76px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 6px; background: var(--surface); }
.feedback-summary > div:nth-child(2) { border-left-color: var(--yellow); }
.feedback-summary > div:nth-child(3) { border-left-color: var(--mint); }
.feedback-summary > div:nth-child(4) { border-left-color: var(--coral); }
.feedback-summary span { display: block; color: var(--muted); font-size: .69rem; }
.feedback-summary strong { display: block; margin-top: 7px; color: var(--teal-strong); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.feedback-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.feedback-toolbar label { color: var(--muted); font-size: .72rem; font-weight: 700; }
.feedback-toolbar select { width: min(190px, 45vw); min-height: 40px; margin: 0; padding: 7px 32px 7px 10px; background: var(--surface); }
.feedback-toolbar .button { margin-left: auto; }
.feedback-list { display: grid; gap: 12px; }
.feedback-card { min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-left: 3px solid var(--coral); border-radius: 6px; background: var(--surface); box-shadow: 0 5px 16px rgba(23,54,50,.03); }
.feedback-card[data-status="in_review"] { border-left-color: var(--yellow); }
.feedback-card[data-status="resolved"] { border-left-color: var(--mint); }
.feedback-card[data-status="closed"] { border-left-color: #93a09c; }
.feedback-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.feedback-card-head > div { min-width: 0; }
.feedback-card-head strong { display: block; color: var(--teal-strong); font-size: .84rem; }
.feedback-card-head small { display: block; margin-top: 4px; color: var(--muted); font-size: .67rem; overflow-wrap: anywhere; }
.feedback-category { display: inline-block; margin-bottom: 7px; padding: 3px 7px; color: #7a3e31; border: 1px solid #efd0ca; border-radius: 4px; background: #fff4f1; font-size: .63rem; font-weight: 800; }
.feedback-card-head select { width: 132px; min-height: 38px; margin: 0; padding: 7px 8px; background: #f9fbfa; }
.feedback-message { margin: 15px 0 13px; color: var(--ink); font-size: .8rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-meta { display: flex; flex-wrap: wrap; gap: 6px 13px; margin-bottom: 14px; color: var(--muted); font-size: .67rem; }
.feedback-meta span { overflow-wrap: anywhere; }
.feedback-editor { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; padding-top: 13px; border-top: 1px solid var(--line); }
.feedback-editor label { color: var(--muted); font-size: .68rem; font-weight: 700; }
.feedback-editor textarea { min-height: 70px; margin-top: 6px; }
.feedback-editor .button { min-width: 104px; }

.catalog-list { border-top: 2px solid var(--line-strong); }
.catalog-row { display: grid; grid-template-columns: 44px minmax(170px, 1fr) minmax(150px, .8fr) 112px 82px; gap: 14px; align-items: center; min-height: 68px; border-bottom: 1px solid var(--line); }
.game-index { width: 34px; height: 34px; display: grid; place-items: center; color: var(--teal-strong); background: #dff1eb; border-radius: 6px; font-size: .7rem; font-weight: 800; }
.game-name strong, .game-name small { display: block; }
.game-name strong { font-size: .83rem; }
.game-name small, .mechanic { color: var(--muted); font-size: .68rem; overflow-wrap: anywhere; }
.status-pill { justify-self: start; padding: 4px 8px; color: #7a4a08; background: #fff4d8; border: 1px solid #ecd59c; border-radius: 4px; font-size: .64rem; font-weight: 750; text-transform: uppercase; }
.level-count { text-align: right; font-size: .72rem; font-variant-numeric: tabular-nums; }

.auth-layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: #e8efec; }
.auth-layer::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 36%; background: var(--teal-strong); }
.auth-layer::after { content: "OPERATIONS / PUZZLE LAB"; position: absolute; left: clamp(26px, 5vw, 72px); bottom: 42px; color: rgba(255,255,255,.54); font-size: .66rem; font-weight: 800; }
.auth-layer[hidden] { display: none; }
.auth-panel { position: relative; width: min(448px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 22px 60px rgba(16,63,60,.18); }
.auth-panel::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: 8px 0 0 8px; background: var(--coral); }
.auth-panel h1 { margin-bottom: 10px; color: var(--teal-strong); font-size: 1.45rem; }
.auth-panel > p:not(.eyebrow):not(.auth-error) { color: var(--muted); font-size: .78rem; }
.auth-fields { display: grid; gap: 15px; margin-top: 24px; }
.auth-panel label { display: block; margin: 0; color: var(--ink); font-size: .73rem; font-weight: 700; }
.auth-panel label input { margin-top: 7px; }
.auth-error { min-height: 20px; margin: 0 0 7px; color: var(--red); font-size: .72rem; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 60; max-width: min(390px, calc(100vw - 44px)); padding: 12px 15px; color: #fff; background: #203f3c; border-radius: 5px; box-shadow: 0 7px 22px rgba(0,0,0,.16); font-size: .75rem; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #812f2a; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1000px) {
  .workspace-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { top: 68px; z-index: 15; height: 54px; padding: 0 20px; display: block; overflow: hidden; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(248,250,249,.97); backdrop-filter: blur(12px); }
  .sidebar-heading, .sidebar-status { display: none; }
  .section-nav { height: 54px; margin: 0; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; }
  .section-nav::-webkit-scrollbar { display: none; }
  .section-nav a { min-height: 36px; padding: 0 10px; grid-template-columns: 24px auto; border-left: 0; border-bottom: 3px solid transparent; border-radius: 5px 5px 0 0; white-space: nowrap; scroll-snap-align: start; }
  .section-nav a.active { border-left-color: transparent; border-bottom-color: var(--coral); }
  main { padding-top: 34px; }
  .section, .section-title[id] { scroll-margin-top: 138px; }
}

@media (max-width: 800px) {
  .app-switcher { min-width: 170px; }
  .app-switcher > span { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .game-performance { display: grid; gap: 10px; overflow: visible; border: 0; background: transparent; }
  .game-performance-head { display: none; }
  .game-performance-row { padding: 15px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
  .game-performance-row + .game-performance-row { border-top: 1px solid var(--line); }
  .performance-game { grid-column: 1 / -1; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
  .game-performance-row > span { display: flex; justify-content: space-between; gap: 10px; }
  .game-performance-row > span::before { content: attr(data-label); color: var(--muted); font-size: .64rem; }
  .placement-head { display: none; }
  .placement-row { grid-template-columns: minmax(0, 1fr) minmax(104px, .6fr); gap: 10px 16px; padding: 17px 16px; }
  .placement-row > div:first-child { grid-column: 1 / -1; }
  .placement-control, .placement-cap, .placement-reward { min-width: 0; }
  .placement-control { justify-content: space-between; }
  .placement-cap { display: block; }
  .placement-reward { grid-column: 1 / -1; display: flex; justify-content: space-between; padding-top: 9px; border-top: 1px solid var(--line); }
  .mobile-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: .66rem; font-weight: 650; }
  .placement-control .mobile-label { margin: 0; }
  .placement-reward .mobile-label { margin: 0; }
  .catalog-row { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 12px 0; }
  .catalog-row .mechanic { grid-column: 2 / -1; }
  .status-pill { grid-column: 2; }
  .level-count { grid-column: 3; grid-row: 1; }
  .feedback-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .topbar { height: 64px; padding: 0 14px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand > div, .connection span { display: none; }
  .app-switcher { min-width: 0; width: min(150px, 38vw); }
  .connection { margin-right: 0; }
  .top-actions { gap: 5px; }
  .top-actions .button { min-height: 38px; padding-inline: 9px; white-space: nowrap; }
  .sidebar { top: 64px; padding-inline: 12px; }
  main { padding: 27px 14px 66px; }
  h1 { font-size: 1.62rem; }
  .page-heading { align-items: flex-start; }
  .release-state { min-width: 104px; max-width: 42%; }
  .section, .section-title[id] { scroll-margin-top: 130px; }
  .section { padding: 32px 0 36px; }
  .section-title { align-items: flex-start; margin-bottom: 20px; }
  .section-title > span { padding-top: 2px; text-align: right; overflow-wrap: anywhere; }
  .analytics-heading { align-items: flex-start; flex-direction: column; }
  .chart-legend { align-self: stretch; }
  .trend-scroll { margin-right: -14px; padding-right: 14px; }
  .control-band { grid-template-columns: minmax(0, 1fr); }
  .control-band > label + label { border-left: 0; border-top: 1px solid var(--line); }
  .field-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .form-actions { align-items: stretch; flex-direction: column; gap: 14px; }
  .save-cluster { width: 100%; justify-content: space-between; }
  .save-cluster .button { min-width: 152px; }
  .auth-layer { padding: 18px; }
  .auth-layer::before { width: 100%; height: 29%; }
  .auth-layer::after { display: none; }
  .auth-panel { padding: 32px 25px; }
  .feedback-card { padding: 16px 14px; }
  .feedback-card-head { align-items: stretch; flex-direction: column; gap: 10px; }
  .feedback-card-head select { width: 100%; }
  .feedback-editor { grid-template-columns: minmax(0, 1fr); }
  .feedback-editor .button { width: 100%; }
}

@media (max-width: 380px) {
  .brand > div { display: none; }
  .page-heading { gap: 12px; }
  .page-heading h1 { font-size: 1.45rem; white-space: nowrap; }
  .metric { padding: 15px 13px; }
  .metric strong { font-size: 1.4rem; }
  .section-nav a { padding-inline: 8px; }
  .placement-row { grid-template-columns: minmax(0, 1fr); }
  .placement-reward { grid-column: 1; }
  .release-state { min-width: 96px; }
  .section-title { gap: 10px; }
  .section-title h2 { font-size: 1.08rem; }
  .section-title > span { max-width: 43%; }
  fieldset { padding-inline: 15px; }
  .save-cluster { align-items: stretch; flex-direction: column; gap: 8px; }
  .form-status { min-width: 0; text-align: left; }
  .save-cluster .button { width: 100%; min-width: 0; }
  .auth-layer { padding: 14px; }
  .auth-panel { padding: 28px 21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
