.interactive-chart .chart-plot { position: relative; height: 166px; }
.desktop-line-chart.interactive-chart .chart-plot svg { display: block; width: 100%; height: 100%; }
.desktop-line-chart.interactive-chart .desktop-chart-labels { left: 0; right: 0; }
.chart-day-trigger {
  position: absolute; top: 8%; bottom: 14%; padding: 0; border: 0;
  border-radius: 0; background: transparent; cursor: crosshair;
  touch-action: pan-y;
}
.chart-day-trigger:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.chart-guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; pointer-events: none; }
.chart-scale { position: absolute; top: calc(8.333% - 6px); bottom: calc(14.167% - 6px); display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: 11px; line-height: 12px; pointer-events: none; }
.chart-scale-left { left: 0; }
.chart-scale-right { right: 0; text-align: right; }
.chart-inspector {
  position: absolute; z-index: 3; top: 8px; width: 235px; max-width: calc(100% - 16px);
  padding: 12px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink); box-shadow: 0 4px 16px #0002;
  font-size: 12px; line-height: 1.45;
}
.chart-inspector[hidden] { display: none; }
.chart-inspector > strong { font-size: 13px; }
.chart-inspector dl { display: grid; gap: 5px; margin: 9px 0; }
.chart-inspector dl > div { display: flex; justify-content: space-between; gap: 10px; }
.chart-inspector dt { color: var(--ink-soft); }
.chart-inspector dd { margin: 0; font-weight: 750; white-space: nowrap; }
.chart-open-day {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  width: 100%; min-height: 36px; padding: 7px 0 0; border: 0; border-top: 1px solid var(--line);
  background: transparent; color: var(--green); font: inherit; font-weight: 750; cursor: pointer;
}
.chart-open-day svg { width: 16px !important; height: 16px !important; flex: 0 0 auto; }
@media (min-width: 1020px) {
  .interactive-chart .chart-plot { height: 218px; }
}

.day-picker {
  max-width: 100%;
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.day-event {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.day-event:hover { color: var(--green); }
.day-event small { color: var(--muted); }
.day-event-title { display: flex; align-items: start; justify-content: space-between; gap: 12px; color: var(--ink); }
.day-event-title svg { width: 18px; height: 18px; flex: 0 0 18px; }
.needs-outcomes { display: grid; gap: 10px; margin: 20px 0 0; font-size: 14px; }
.needs-outcomes div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.needs-outcomes dd { margin: 0; font-weight: 700; }
.trend-card.needs-trend.selected { background: var(--blue-soft); border-color: var(--blue); }
.trend-card.needs-trend .trend-rank { background: var(--blue-soft); color: var(--blue); }
.mobile-trend-detail.needs .mobile-product-nav > span,
.mobile-trend-detail.needs .mobile-product-metric strong { color: var(--blue); }
.mobile-trend-detail.needs .mobile-product-metric { background: var(--blue-soft); }
.desktop-trend-detail-header.needs .desktop-trend-kind,
.desktop-trend-detail-header.needs .desktop-trend-metric strong { color: var(--blue); }
.segment-control[aria-label="Вид трендов"] { grid-template-columns: repeat(3, minmax(0, 1fr)); height: auto; min-height: 54px; }
[aria-label="Вид трендов"] button { white-space: normal; min-width: 0; min-height: 48px; line-height: 1.3; }

@font-face {
  font-family: "Manrope";
  src: url("assets/Manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #10201a;
  --ink-soft: #42524b;
  --muted: #718079;
  --line: #dfe6e2;
  --line-strong: #cbd6d0;
  --surface: #ffffff;
  --surface-soft: #f3f6f4;
  --surface-green: #e8f3ee;
  --green: #167a55;
  --green-dark: #102d24;
  --green-deep: #102d24;
  --green-bright: #2ba974;
  --blue: #3369d8;
  --blue-soft: #eaf0fd;
  --amber: #e2a620;
  --amber-soft: #fff4d7;
  --coral: #d85e49;
  --coral-soft: #fdebe7;
  --danger-ink: #7a271a;
  --danger-muted: #7a4a42;
  --danger-border: #f2b8b5;
  --danger-bg: #fff7f6;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --nav-bg: rgba(255, 255, 255, 0.97);
  --skeleton-bg: #e2e9e5;
  --skeleton-shine: rgba(255, 255, 255, 0.62);
  --shadow: 0 14px 40px rgba(15, 45, 35, 0.12);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef6f1;
  --ink-soft: #bdcbc4;
  --muted: #91a49b;
  --line: #30463d;
  --line-strong: #456157;
  --surface: #17251f;
  --surface-soft: #0f1915;
  --surface-green: #203a30;
  --green: #52c28f;
  --green-dark: #dff5ea;
  --green-deep: #0a1712;
  --green-bright: #72d6a9;
  --blue: #82a8ff;
  --blue-soft: #203258;
  --amber: #f0bd4f;
  --amber-soft: #463817;
  --coral: #ff8877;
  --coral-soft: #48251f;
  --danger-ink: #ffb4a9;
  --danger-muted: #dca49b;
  --danger-border: #70423a;
  --danger-bg: #351f1b;
  --topbar-bg: rgba(15, 25, 21, 0.96);
  --nav-bg: rgba(15, 25, 21, 0.97);
  --skeleton-bg: #20332b;
  --skeleton-shine: rgba(114, 214, 169, 0.1);
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface-soft);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.desktop-only,
.desktop-overview,
.desktop-dialogue-detail,
.desktop-trend-detail,
.desktop-studios-view {
  display: none;
}

.dialogues-workspace,
.dialogues-browser,
.trends-workspace,
.trends-browser {
  min-width: 0;
}

.workspace {
  min-height: 100vh;
  padding-bottom: calc(78px + var(--safe-bottom));
}

.loading-screen,
.state-screen {
  min-height: 100vh;
  padding: calc(40px + var(--safe-top)) 28px calc(40px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--green-deep);
  color: #fff;
}

.loading-screen img {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.loading-title {
  margin-top: 20px;
  font-size: 25px;
  font-weight: 800;
}

.loading-copy {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
}

.loading-line {
  width: 150px;
  height: 3px;
  margin-top: 26px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.loading-line span {
  display: block;
  width: 52px;
  height: 100%;
  background: #65d2a6;
  animation: loading 1.15s ease-in-out infinite;
}

@keyframes loading {
  from { transform: translateX(-54px); }
  to { transform: translateX(152px); }
}

.state-screen {
  background: var(--surface-soft);
  color: var(--ink);
}

.state-screen h1 {
  margin: 22px 0 8px;
  font-size: 24px;
}

.state-screen p {
  max-width: 320px;
  margin: 0 0 24px;
  color: var(--muted);
}

.login-logo {
  width: 68px;
  height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(8, 47, 36, 0.14);
}

.state-screen > .eyebrow {
  margin: 18px 0 0;
  color: var(--green);
}

.web-login-form {
  width: min(100%, 360px);
  padding: 18px;
  display: grid;
  gap: 10px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(8, 47, 36, 0.08);
}

.web-login-form label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.web-login-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.web-login-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(7, 131, 74, 0.12);
}

.web-login-form .button {
  width: 100%;
}

.web-login-form .button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.web-login-error {
  min-height: 16px;
  margin: 0 !important;
  color: var(--coral) !important;
  font-size: 12px;
}

.login-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.state-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--coral);
  background: var(--coral-soft);
  border-radius: 50%;
}

.state-icon svg {
  width: 27px;
  height: 27px;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  height: calc(64px + var(--safe-top));
  padding: var(--safe-top) 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand-button,
.scope-button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.brand-button {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.brand-button img {
  flex: 0 0 auto;
  border-radius: 8px;
}

.brand-button span {
  min-width: 0;
  display: grid;
  line-height: 1.05;
}

.brand-button strong {
  font-size: 16px;
  font-weight: 800;
}

.brand-button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.scope-button {
  min-width: 0;
  height: 36px;
  padding: 0 10px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.scope-button span {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-button svg {
  width: 17px;
  height: 17px;
}

.topbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.refresh-button,
.settings-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border-color: var(--line);
}

.refresh-button:disabled {
  cursor: wait;
}

.refresh-button.refreshing svg {
  animation: refresh-spin 700ms linear infinite;
}

@keyframes refresh-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 420px) {
  .topbar {
    padding-right: 10px;
    padding-left: 10px;
    gap: 8px;
  }

  .brand-button {
    gap: 7px;
  }

  .brand-button img {
    width: 34px;
    height: 34px;
  }

  .brand-button strong {
    font-size: 14px;
  }

  .brand-button small {
    display: none;
  }

  .topbar-actions {
    gap: 5px;
  }

  .scope-button {
    height: 34px;
    padding: 0 7px;
    gap: 6px;
    font-size: 12px;
  }

  .scope-button span {
    max-width: 88px;
  }

  .refresh-button,
  .settings-button {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
}

.main-content {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.screen {
  display: none;
  min-height: calc(100vh - 142px);
  padding: 22px 16px 36px;
}

.screen.active {
  display: block;
}

.screen-heading,
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.screen-heading {
  margin-bottom: 18px;
}

.screen-heading h1,
.sheet-header h2 {
  margin: 1px 0 0;
  font-size: 25px;
  line-height: 1.16;
  font-weight: 800;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 800;
  text-transform: uppercase;
}

.icon-button {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.icon-button:active {
  background: var(--surface-soft);
}

.network-hero {
  position: relative;
  min-height: 248px;
  padding: 24px;
  overflow: hidden;
  color: #fff;
  background: var(--green-deep);
  border-radius: 8px;
}

.hero-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-topline span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 14px;
  font-weight: 700;
}

.hero-badge {
  padding: 6px 9px;
  color: #9ee8c8 !important;
  border: 1px solid rgba(158, 232, 200, 0.3);
  border-radius: 6px;
}

.hero-score {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.hero-score strong {
  font-size: 64px;
  line-height: 0.92;
  font-weight: 750;
}

.hero-score span {
  padding-bottom: 7px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 15px;
  font-weight: 700;
}

.hero-metrics {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  padding-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-metric strong {
  display: block;
  font-size: 19px;
  line-height: 1.1;
}

.hero-metric span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

.overview-grid {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.content-panel {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel-title {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-title h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.panel-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.link-button,
.text-button {
  border: 0;
  padding: 0;
  color: var(--green);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.quality-chart {
  height: 130px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.chart-column {
  min-width: 0;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.chart-bar-wrap {
  width: 100%;
  min-height: 84px;
  display: flex;
  align-items: flex-end;
}

.chart-bar {
  width: 100%;
  min-height: 4px;
  background: var(--green);
  border-radius: 3px 3px 0 0;
}

.chart-column:nth-child(3n + 2) .chart-bar {
  background: var(--blue);
}

.chart-column span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.insight-grid {
  display: grid;
  gap: 10px;
}

.insight-item {
  min-width: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.insight-item.positive {
  background: var(--surface-green);
}

.insight-item.growth {
  background: var(--amber-soft);
}

.insight-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: rgba(255, 255, 255, 0.75);
}

.growth .insight-icon {
  color: #a26900;
}

.insight-item strong,
.insight-item small {
  display: block;
}

.insight-item strong {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.city-score-list {
  display: grid;
  gap: 15px;
}

.city-score-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 2fr 32px;
  align-items: center;
  gap: 12px;
}

.city-score-row strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-track,
.trend-meter {
  display: block;
  height: 6px;
  overflow: hidden;
  background: var(--line);
  border-radius: 4px;
}

.score-track span,
.trend-meter span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.city-score-row > span {
  text-align: right;
  font-size: 14px;
  font-weight: 800;
}

.mobile-dashboard {
  display: grid;
  gap: 12px;
}

.mobile-dashboard-heading {
  padding: 2px 2px 4px;
}

.mobile-dashboard-heading h1 {
  margin: 3px 0 3px;
  font-size: 25px;
  line-height: 1.15;
}

.mobile-dashboard-heading > span {
  color: var(--muted);
  font-size: 13px;
}

.mobile-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-kpi {
  min-width: 0;
  min-height: 108px;
  padding: 14px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mobile-kpi-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--surface-green);
  border-radius: 50%;
}

.mobile-kpi-icon svg {
  width: 17px;
  height: 17px;
}

.mobile-kpi small,
.mobile-kpi strong,
.mobile-kpi em {
  display: block;
}

.mobile-kpi small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.mobile-kpi strong {
  margin-top: 3px;
  font-size: 24px;
  line-height: 1;
}

.mobile-kpi em {
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-kpi em.up { color: var(--green); }
.mobile-kpi em.down { color: var(--coral); }

.mobile-dashboard-panel {
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mobile-panel-title {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mobile-panel-title h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.mobile-panel-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.mobile-chart-legend {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.mobile-chart-legend span::before {
  width: 12px;
  height: 2px;
  margin-right: 5px;
  display: inline-block;
  vertical-align: middle;
  background: var(--green);
  content: "";
}

.mobile-chart-legend span:last-child::before {
  background: var(--blue);
}

.mobile-dashboard .desktop-line-chart {
  position: relative;
  height: 190px;
}

.mobile-dashboard .desktop-line-chart svg {
  width: 100%;
  height: 166px;
  overflow: visible;
}

.mobile-dashboard .chart-grid line {
  stroke: #e7ece9;
  stroke-width: 1;
}

.mobile-dashboard .chart-axis-labels text {
  fill: var(--muted);
  font-size: 14px;
  stroke: none;
}

.mobile-dashboard .desktop-line-chart polyline {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-dashboard .quality-line { stroke: var(--green); }
.mobile-dashboard .conversion-line { stroke: var(--blue); }
.mobile-dashboard .quality-dots circle { fill: #fff; stroke: var(--green); stroke-width: 3; }
.mobile-dashboard .conversion-dots circle { fill: #fff; stroke: var(--blue); stroke-width: 3; }

.mobile-dashboard .desktop-chart-labels {
  position: absolute;
  right: 2%;
  bottom: 0;
  left: 5%;
  height: 18px;
}

.mobile-dashboard .desktop-chart-labels span {
  position: absolute;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
  transform: translateX(-50%);
}

.mobile-dashboard .attention-list {
  display: grid;
}

.mobile-dashboard .attention-row {
  width: 100%;
  min-height: 64px;
  padding: 10px 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto 15px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.mobile-dashboard .attention-row:first-child { border-top: 0; }

.mobile-dashboard .attention-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--coral);
  background: var(--coral-soft);
  border-radius: 50%;
}

.mobile-dashboard .attention-row.warning .attention-icon { color: #a26900; background: var(--amber-soft); }
.mobile-dashboard .attention-row.benchmark .attention-icon { color: var(--blue); background: var(--blue-soft); }
.mobile-dashboard .attention-icon svg { width: 16px; height: 16px; }
.mobile-dashboard .attention-row strong,
.mobile-dashboard .attention-row small { display: block; }
.mobile-dashboard .attention-row strong { font-size: 12px; }
.mobile-dashboard .attention-row small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.mobile-dashboard .attention-row b { color: var(--coral); font-size: 15px; }
.mobile-dashboard .attention-row.warning b { color: #a26900; }
.mobile-dashboard .attention-row.benchmark b { color: var(--blue); }
.mobile-dashboard .attention-row > svg { width: 14px; color: var(--muted); }

.mobile-factor-group + .mobile-factor-group {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mobile-factor-group h3 {
  margin: 0 0 5px;
  color: var(--coral);
  font-size: 13px;
}

.mobile-factor-group.positive h3 { color: var(--green); }

.mobile-dashboard .factor-row {
  width: 100%;
  min-height: 48px;
  padding: 7px 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.mobile-dashboard .factor-status { color: var(--green); }
.mobile-dashboard .negative-factor .factor-status { color: var(--coral); }
.mobile-dashboard .factor-status svg { width: 15px; height: 15px; }
.mobile-dashboard .factor-row strong,
.mobile-dashboard .factor-row small { display: block; }
.mobile-dashboard .factor-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-dashboard .factor-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.mobile-dashboard .factor-meter { height: 5px; overflow: hidden; background: var(--line); border-radius: 3px; }
.mobile-dashboard .factor-meter i { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.mobile-dashboard .negative-factor .factor-meter i { background: var(--amber); }

.mobile-dashboard .desktop-case-row,
.mobile-dashboard .ranking-row {
  width: 100%;
  min-height: 62px;
  padding: 9px 0;
  display: grid;
  align-items: center;
  gap: 8px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.mobile-dashboard .desktop-case-row { grid-template-columns: 34px minmax(0, 1fr) auto 15px; }
.mobile-dashboard .ranking-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
.mobile-dashboard .desktop-case-row:first-child,
.mobile-dashboard .ranking-row:first-child { border-top: 0; }
.mobile-dashboard .case-play { width: 34px; height: 34px; display: grid; place-items: center; color: var(--green); background: var(--surface-green); border-radius: 50%; }
.mobile-dashboard .case-play svg { width: 15px; height: 15px; margin-left: 2px; }
.mobile-dashboard .desktop-case-row small,
.mobile-dashboard .desktop-case-row strong,
.mobile-dashboard .desktop-case-row em,
.mobile-dashboard .ranking-row strong,
.mobile-dashboard .ranking-row small { display: block; }
.mobile-dashboard .desktop-case-row small { color: var(--green); font-size: 10px; font-style: normal; font-weight: 750; }
.mobile-dashboard .desktop-case-row.negative small { color: var(--coral); }
.mobile-dashboard .desktop-case-row strong,
.mobile-dashboard .ranking-row strong { margin-top: 2px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-dashboard .desktop-case-row em,
.mobile-dashboard .ranking-row small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.mobile-dashboard .desktop-case-row b { color: var(--green); font-size: 14px; }
.mobile-dashboard .desktop-case-row.negative b { color: var(--coral); }
.mobile-dashboard .desktop-case-row > svg { width: 14px; color: var(--muted); }
.mobile-dashboard .ranking-place { width: 22px; height: 22px; display: grid; place-items: center; color: var(--green-dark); background: var(--surface-green); border-radius: 50%; font-size: 10px; font-weight: 800; }
.mobile-dashboard .ranking-row b { color: var(--green); font-size: 14px; }

.muted-copy {
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
}

.search-field {
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-field svg {
  flex: 0 0 auto;
  color: var(--muted);
}

.search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.search-field input::placeholder {
  color: #99a49e;
}

.chip-row {
  margin: 14px -16px 0;
  padding: 0 16px 2px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  height: 34px;
  padding: 0 12px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.chip.active {
  color: #fff;
  background: var(--green-deep);
  border-color: var(--green-deep);
}

.list-meta {
  margin: 17px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

#dialogues-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialogue-signal-chip {
  min-width: 0;
  padding: 6px 8px 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #f2c2b9;
  border-radius: 16px;
  background: var(--coral-soft);
  color: #a83b2c;
  font: inherit;
  cursor: pointer;
}

.dialogue-signal-chip svg {
  width: 13px;
  height: 13px;
}

.dialogue-list,
.trend-list,
.studio-list {
  display: grid;
  gap: 10px;
}

.dialogue-card {
  position: relative;
  width: 100%;
  padding: 16px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.play-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  align-self: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  cursor: pointer;
}

.play-button svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

.dialogue-card-main {
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.dialogue-meta,
.dialogue-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.category-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
}

.category-dot.booking { background: var(--blue); }
.category-dot.service { background: var(--coral); }
.category-dot.consultation { background: var(--amber); }

.dialogue-meta span,
.dialogue-footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dialogue-meta .score-badge {
  margin-left: auto;
  padding: 3px 6px;
  color: var(--green-dark);
  background: var(--surface-green);
  border-radius: 4px;
  font-weight: 800;
}

.dialogue-card h3 {
  margin: 8px 0 4px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialogue-card p {
  margin: 0 0 10px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dialogue-open {
  width: 34px;
  height: 44px;
  display: grid;
  place-items: center;
  align-self: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segment-control {
  height: 42px;
  padding: 3px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  background: var(--line);
  border-radius: 8px;
}

.segment-control button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.segment-control button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 5px rgba(16, 32, 26, 0.08);
}

.trend-card {
  width: 100%;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.trend-card-top {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
}

.trend-rank {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--coral);
  background: var(--coral-soft);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
}

.positive-trend .trend-rank {
  color: var(--green);
  background: var(--surface-green);
}

.trend-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.trend-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.trend-card-summary {
  margin: 11px 0 0 !important;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft) !important;
  font-size: 12px !important;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.trend-meter {
  margin-top: 14px;
}

.trend-card:not(.positive-trend) .trend-meter span {
  background: var(--coral);
}

.studio-group-title {
  margin: 12px 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.studio-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.studio-summary {
  width: 100%;
  padding: 16px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.studio-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 8px;
}

.studio-summary h3 {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.studio-score {
  text-align: right;
}

.studio-score strong,
.studio-score small {
  display: block;
}

.studio-score strong {
  color: var(--green-dark);
  font-size: 16px;
}

.studio-score small {
  color: var(--muted);
  font-size: 11px;
}

.studio-summary > svg {
  color: var(--muted);
  transition: transform 160ms ease;
}

.studio-card.expanded .studio-summary > svg {
  transform: rotate(90deg);
}

.studio-days {
  display: none;
  border-top: 1px solid var(--line);
}

.studio-card.expanded .studio-days {
  display: block;
}

.studio-day {
  min-height: 58px;
  padding: 10px 12px 10px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 38px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.studio-day:last-child {
  border-bottom: 0;
}

.studio-day strong,
.studio-day small {
  display: block;
}

.studio-day strong {
  font-size: 14px;
}

.studio-day small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.day-score {
  padding: 4px 7px;
  color: var(--green-dark);
  background: var(--surface-green);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
}

.download-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--green);
  background: var(--surface-green);
  cursor: pointer;
}

.mobile-studios-product {
  display: grid;
  gap: 12px;
}

.mobile-studio-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-studio-kpis section {
  min-width: 0;
  min-height: 82px;
  padding: 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1px 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mobile-studio-kpis section > span {
  width: 28px;
  height: 28px;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--surface-green);
  border-radius: 50%;
}

.mobile-studio-kpis svg {
  width: 15px;
  height: 15px;
}

.mobile-studio-kpis strong {
  align-self: end;
  font-size: 19px;
  line-height: 1;
}

.mobile-studio-kpis small {
  align-self: start;
  color: var(--muted);
  font-size: 10px;
}

.mobile-studios-section {
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mobile-studio-ranking,
.mobile-studio-cases {
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.mobile-studio-row {
  border-bottom: 1px solid var(--line);
}

.mobile-studio-row:last-child {
  border-bottom: 0;
}

.mobile-studio-summary {
  width: 100%;
  min-height: 88px;
  padding: 11px 0;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto 15px;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  text-align: left;
}

.mobile-studio-rank {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: var(--surface-green);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.mobile-studio-copy {
  min-width: 0;
}

.mobile-studio-copy strong,
.mobile-studio-copy small,
.mobile-studio-copy em,
.mobile-studio-score strong,
.mobile-studio-score small {
  display: block;
}

.mobile-studio-copy > strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-studio-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.mobile-studio-copy em {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--coral);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-studio-copy em.positive {
  color: var(--green);
}

.mobile-studio-copy em svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.mobile-studio-score {
  text-align: right;
}

.mobile-studio-score strong {
  color: var(--green);
  font-size: 15px;
}

.mobile-studio-score small {
  color: var(--muted);
  font-size: 10px;
}

.mobile-studio-summary > svg {
  width: 14px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.mobile-studio-row.expanded .mobile-studio-summary > svg {
  transform: rotate(90deg);
}

.mobile-studio-days {
  display: none;
  margin: 0 -16px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
}

.mobile-studio-row.expanded .mobile-studio-days {
  display: block;
}

.mobile-studio-day {
  min-height: 60px;
  padding: 10px 12px 10px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.mobile-studio-day:last-child {
  border-bottom: 0;
}

.mobile-studio-day strong,
.mobile-studio-day small {
  display: block;
}

.mobile-studio-day strong {
  font-size: 11px;
}

.mobile-studio-day small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.mobile-studio-day > span:nth-child(2) {
  text-align: right;
}

.mobile-studio-day > span:nth-child(2) strong {
  color: var(--green);
}

.mobile-studio-day .download-button {
  width: 34px;
  height: 34px;
}

.mobile-studio-day .download-button svg {
  width: 15px;
  height: 15px;
}

.mobile-studio-cases .studio-case-row,
.mobile-studios-section .system-row {
  width: 100%;
  min-height: 60px;
  padding: 9px 0;
  display: grid;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.mobile-studio-cases .studio-case-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.mobile-studio-cases .studio-case-row:last-child,
.mobile-studios-section .system-row:last-child {
  border-bottom: 0;
}

.mobile-studio-cases .case-play {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--surface-green);
  border-radius: 50%;
}

.mobile-studio-cases .case-play svg {
  width: 15px;
  height: 15px;
  margin-left: 2px;
}

.mobile-studio-cases strong,
.mobile-studio-cases small {
  display: block;
}

.mobile-studio-cases strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-studio-cases small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-studio-cases b {
  color: var(--green);
  font-size: 14px;
}

.mobile-studio-cases b.low {
  color: var(--coral);
}

.mobile-system-group + .mobile-system-group {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mobile-system-group h3 {
  margin: 0;
  color: var(--coral);
  font-size: 12px;
}

.mobile-system-group.positive h3 {
  color: var(--green);
}

.mobile-studios-section .system-row {
  grid-template-columns: 22px minmax(0, 1fr);
}

.mobile-studios-section .system-row > span:first-child {
  color: var(--green);
}

.mobile-studios-section .system-row.negative > span:first-child {
  color: var(--coral);
}

.mobile-studios-section .system-row svg {
  width: 16px;
  height: 16px;
}

.mobile-studios-section .system-row strong,
.mobile-studios-section .system-row small {
  display: block;
}

.mobile-studios-section .system-row strong {
  font-size: 11px;
}

.mobile-studios-section .system-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.empty-state {
  padding: 44px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  color: var(--muted);
}

.empty-state h3 {
  margin: 14px 0 5px;
  font-size: 15px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.bottom-nav {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(68px + var(--safe-bottom));
  padding: 6px 8px var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--nav-bg);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

body[data-can-view-access="false"] .bottom-nav {
  grid-template-columns: repeat(5, 1fr);
}

.bottom-nav button {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
}

.bottom-nav button.active {
  color: var(--green);
}

.sheet-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  background: rgba(9, 25, 19, 0.48);
  backdrop-filter: blur(3px);
}

.bottom-sheet,
.detail-sheet {
  position: fixed;
  z-index: 80;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: min(88vh, 760px);
  padding: 8px 18px calc(18px + var(--safe-bottom));
  overflow-y: auto;
  background: var(--surface);
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow);
  animation: sheet-in 180ms ease-out;
}

.detail-sheet {
  top: max(18px, var(--safe-top));
  max-height: none;
  padding: 0 0 calc(24px + var(--safe-bottom));
  border-radius: 8px 8px 0 0;
}

@keyframes sheet-in {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 2px auto 16px;
  background: var(--line-strong);
  border-radius: 3px;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.sheet-header h2 {
  font-size: 21px;
}

.filter-section {
  margin-top: 24px;
}

.filter-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.option-grid-three {
  grid-template-columns: repeat(3, 1fr);
}

.option-grid button {
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.option-grid button.active {
  color: var(--green-dark);
  background: var(--surface-green);
  border-color: #9bcab6;
}

.check-list {
  max-height: 310px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.dialogue-studio-options {
  max-height: 190px;
}

.filter-empty {
  margin: 0;
  padding: 14px 2px;
  color: var(--muted);
  font-size: 13px;
}

.dialogue-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dialogue-date-grid label {
  min-width: 0;
  padding: 8px 10px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.dialogue-date-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.dialogue-date-grid input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.dialogue-date-grid label:focus-within {
  border-color: #7eb99f;
  box-shadow: 0 0 0 2px rgba(12, 130, 76, 0.1);
}

.check-option {
  width: 100%;
  min-height: 53px;
  padding: 8px 2px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.check-option strong,
.check-option small {
  display: block;
}

.check-option strong {
  font-size: 14px;
}

.check-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.check-mark {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.check-mark svg {
  width: 14px;
  height: 14px;
  opacity: 0;
}

.check-option.active .check-mark {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.check-option.active .check-mark svg {
  opacity: 1;
}

.sheet-actions {
  position: sticky;
  bottom: calc(-18px - var(--safe-bottom));
  margin: 24px -18px calc(-18px - var(--safe-bottom));
  padding: 12px 18px calc(18px + var(--safe-bottom));
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 9px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.sheet-actions.single-action {
  grid-template-columns: 1fr;
}

.button {
  min-height: 46px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button-primary {
  border: 1px solid var(--green);
  color: #fff;
  background: var(--green);
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--surface-soft);
}

.detail-hero {
  padding: 18px 18px 22px;
  color: #fff;
  background: var(--green-deep);
}

.detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-nav .icon-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.detail-category {
  color: #9ee8c8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-hero h2 {
  margin: 24px 0 8px;
  font-size: 24px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.detail-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.detail-score-row {
  margin-top: 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.detail-score {
  padding: 7px 10px;
  color: var(--green-dark);
  background: #9ee8c8;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 850;
}

.detail-score-row span:last-child {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.detail-body {
  padding: 0 18px;
}

.detail-audio-slot {
  width: calc(100% + 36px);
  margin: -1px -18px 0;
}

.detail-audio {
  width: 100%;
  margin: 0;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  background: var(--surface-green);
  border: 0;
  border-bottom: 1px solid #cfe1d8;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.detail-audio-slot.expanded > .detail-audio {
  display: none;
}

.detail-audio .play-button {
  flex: 0 0 auto;
}

.detail-audio strong,
.detail-audio small {
  display: block;
}

.detail-audio strong {
  font-size: 14px;
}

.detail-audio small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.detail-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.detail-section:last-child {
  border-bottom: 0;
}

.detail-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 850;
}

.detail-section p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-fact {
  min-width: 0;
}

.detail-fact span,
.detail-fact strong {
  display: block;
}

.detail-fact span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-fact strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.criteria-list {
  display: grid;
  gap: 12px;
}

.criterion {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
}

.criterion-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--surface-green);
  border-radius: 50%;
}

.criterion.partial .criterion-icon,
.criterion.not_done .criterion-icon {
  color: #a26900;
  background: var(--amber-soft);
}

.criterion-icon svg {
  width: 13px;
  height: 13px;
}

.criterion strong,
.criterion small {
  display: block;
}

.criterion strong {
  font-size: 13px;
}

.criterion small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.trend-detail-metric {
  margin: 18px 0;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-soft);
  border-radius: 8px;
}

.trend-detail-metric strong {
  font-size: 22px;
}

.trend-detail-metric span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.trend-example {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.trend-example:first-child {
  border-top: 0;
}

.trend-example button {
  margin-top: 10px;
}

.mobile-product-detail {
  min-height: 100%;
  background: var(--surface-soft);
}

.mobile-product-header {
  padding: 14px 18px 20px;
  color: var(--ink);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.mobile-product-nav {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-product-nav .icon-button {
  flex: 0 0 auto;
  color: var(--ink-soft);
  background: var(--surface-soft);
}

.mobile-product-nav > span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-product-nav > span svg {
  width: 16px;
  height: 16px;
}

.mobile-trend-detail.negative .mobile-product-nav > span {
  color: var(--coral);
}

.mobile-product-header h2 {
  margin: 18px 0 6px;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.2;
}

.mobile-product-header > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.mobile-product-metric {
  margin-top: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-green);
  border-radius: 8px;
}

.mobile-trend-detail.negative .mobile-product-metric {
  background: var(--coral-soft);
}

.mobile-product-metric strong {
  color: var(--green);
  font-size: 20px;
}

.mobile-trend-detail.negative .mobile-product-metric strong {
  color: var(--coral);
}

.mobile-product-metric span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.mobile-product-body {
  padding: 0 18px 30px;
}

.mobile-product-body > .detail-audio-slot {
  width: calc(100% + 36px);
  margin: 0 -18px;
}

.mobile-product-body .detail-audio {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
}

.mobile-product-body .detail-audio > svg {
  width: 16px;
  color: var(--muted);
}

.mobile-analysis-section {
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}

.mobile-analysis-section > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-analysis-section h3 {
  margin: 4px 0 7px;
  font-size: 15px;
}

.mobile-analysis-section p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.mobile-analysis-section.success > span,
.mobile-analysis-section.success h3 {
  color: var(--green);
}

.mobile-analysis-section.action > span,
.mobile-analysis-section.action h3 {
  color: #a26900;
}

.mobile-trend-detail.positive .mobile-analysis-section.action > span,
.mobile-trend-detail.positive .mobile-analysis-section.action h3 {
  color: var(--green);
}

.mobile-analysis-section.examples {
  border-bottom: 0;
}

.mobile-analysis-section.examples .trend-example-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-analysis-section.examples .trend-example-heading span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--surface-green);
  border-radius: 50%;
}

.mobile-analysis-section.examples .trend-example-heading svg {
  width: 14px;
  height: 14px;
}

.mobile-dialogue-score {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.mobile-dialogue-score > span {
  padding: 9px 12px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--green-dark);
  background: var(--surface-green);
  border-radius: 7px;
}

.mobile-dialogue-score strong {
  font-size: 20px;
  line-height: 1;
}

.mobile-dialogue-score small {
  font-size: 11px;
}

.mobile-dialogue-score p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

.mobile-criteria-section {
  padding: 20px 0;
}

.mobile-section-heading {
  margin-bottom: 11px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mobile-section-heading h3,
.mobile-section-heading small {
  display: block;
}

.mobile-section-heading h3 {
  margin: 0;
  font-size: 15px;
}

.mobile-section-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.mobile-section-heading > strong {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 13px;
}

.mobile-criteria-list {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mobile-criterion-item {
  border-top: 1px solid var(--line);
}

.mobile-criterion-item:first-child {
  border-top: 0;
}

.mobile-criterion {
  width: 100%;
  min-height: 62px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  border: 0;
  background: var(--surface);
  text-align: left;
}

.mobile-criterion > span:first-child {
  color: var(--green);
}

.mobile-criterion.partial > span:first-child,
.mobile-criterion.not_done > span:first-child,
.mobile-criterion.unclear > span:first-child {
  color: var(--amber);
}

.mobile-criterion.not_applicable > span:first-child {
  color: var(--muted);
}

.mobile-criterion svg {
  width: 17px;
  height: 17px;
}

.mobile-criterion strong,
.mobile-criterion small {
  display: block;
}

.mobile-criterion strong {
  font-size: 12px;
  line-height: 1.35;
}

.mobile-criterion small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.mobile-criterion-item.expanded .criterion-chevron {
  transform: rotate(90deg);
}

.mobile-criterion-comment {
  display: none;
  padding: 0 12px 13px 45px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
}

.mobile-criterion-item.expanded .mobile-criterion-comment {
  display: block;
}

.mobile-criterion-comment > p,
.mobile-criterion-comment > q {
  margin: 10px 0 0;
  display: block;
  font-size: 11px;
  font-style: normal;
  line-height: 1.55;
}

.mobile-criterion-comment > q,
.mobile-objection-step q {
  color: var(--muted);
}

.mobile-criterion-comment q::before,
.mobile-criterion-comment q::after {
  content: "";
}

.mobile-objection {
  margin-top: 11px;
  padding-top: 1px;
  border-top: 1px solid var(--line);
}

.mobile-client-phrase strong,
.mobile-client-phrase q {
  display: block;
}

.mobile-client-phrase q {
  margin-top: 4px;
  color: var(--ink-soft);
  font-style: normal;
}

.mobile-objection-steps {
  margin-top: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.mobile-objection-step {
  padding: 10px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line);
}

.mobile-objection-step:first-child {
  border-top: 0;
}

.mobile-objection-step > span:first-child {
  color: var(--green);
}

.mobile-objection-step.partial > span:first-child,
.mobile-objection-step.not_done > span:first-child,
.mobile-objection-step.unclear > span:first-child {
  color: var(--amber);
}

.mobile-objection-step svg {
  width: 15px;
  height: 15px;
}

.mobile-objection-step strong,
.mobile-objection-step small {
  display: block;
}

.mobile-objection-step strong { font-size: 11px; }
.mobile-objection-step small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.mobile-objection-step p { margin: 6px 0 0; font-size: 11px; line-height: 1.5; }
.mobile-objection-step q { margin-top: 6px; display: block; font-size: 11px; font-style: normal; line-height: 1.5; }

.mobile-criterion-recommendation {
  margin-top: 11px !important;
  padding: 10px;
  background: var(--amber-soft);
  border-radius: 7px;
}

.mobile-criterion-recommendation strong {
  margin-bottom: 4px;
  display: block;
}

.mobile-next-step {
  margin-bottom: 18px;
  padding: 13px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  color: var(--green-dark);
  background: var(--surface-green);
  border-radius: 8px;
}

.mobile-next-step.neutral {
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
}

.mobile-next-step svg { width: 18px; height: 18px; }
.mobile-next-step strong { font-size: 12px; }
.mobile-next-step p { margin: 4px 0 0; font-size: 11px; line-height: 1.5; }

.mobile-dialogue-facts {
  padding-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border-top: 1px solid var(--line);
}

.mobile-dialogue-facts small,
.mobile-dialogue-facts strong {
  display: block;
}

.mobile-dialogue-facts small {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.mobile-dialogue-facts strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.audio-dock {
  position: fixed;
  z-index: 90;
  right: 10px;
  bottom: calc(76px + var(--safe-bottom));
  left: 10px;
  min-height: 112px;
  padding: 8px 9px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 34px 34px;
  grid-template-rows: 40px 24px 28px 14px;
  align-items: center;
  gap: 6px 8px;
  overflow: hidden;
  color: #fff;
  background: var(--green-deep);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(13, 39, 30, 0.28);
}

body.detail-open .audio-dock {
  bottom: calc(12px + var(--safe-bottom));
}

body.audio-active .detail-sheet {
  padding-bottom: calc(136px + var(--safe-bottom));
}

body.audio-active.audio-inline .detail-sheet {
  padding-bottom: 0;
}

.audio-dock.inline-audio {
  position: relative;
  inset: auto;
  width: 100%;
  min-height: 126px;
  margin: 0;
  padding: 12px 18px 10px;
  color: var(--ink);
  background: var(--surface-green);
  border: 0;
  border-bottom: 1px solid #cfe1d8;
  border-radius: 0;
  box-shadow: none;
}

.audio-dock.inline-audio .audio-toggle {
  color: #fff;
  background: var(--green);
}

.audio-dock.inline-audio .audio-copy {
  color: var(--ink);
}

.audio-dock.inline-audio .audio-copy span,
.audio-dock.inline-audio .audio-timeline {
  color: var(--muted);
}

.audio-dock.inline-audio .icon-button {
  color: var(--ink-soft);
  background: rgba(16, 45, 36, 0.06);
}

.audio-dock.inline-audio .audio-stop {
  color: var(--ink-soft) !important;
  background: rgba(16, 45, 36, 0.08) !important;
}

.audio-dock.inline-audio .audio-waveform-layer span {
  background: rgba(16, 45, 36, 0.18);
}

.audio-dock.inline-audio .audio-waveform-played span {
  background: var(--green);
}

.audio-dock.inline-audio .audio-playhead {
  background: var(--green-dark);
}

.audio-dock.inline-audio[data-audio-state="paused"] .audio-state-line i,
.audio-dock.inline-audio[data-audio-state="stopped"] .audio-state-line i {
  background: rgba(16, 45, 36, 0.38);
}

.audio-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--green-dark);
  background: #9ee8c8;
  cursor: pointer;
}

.audio-toggle .pause-icon,
.audio-dock.playing .audio-toggle .play-icon {
  display: none;
}

.audio-dock.playing .audio-toggle .pause-icon {
  display: block;
}

.audio-copy {
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.audio-copy strong,
.audio-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-copy strong {
  font-size: 13px;
}

.audio-copy span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.audio-state-line {
  display: flex !important;
  align-items: center;
  gap: 5px;
}

.audio-state-line i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  background: #9ee8c8;
  border-radius: 50%;
}

.audio-dock[data-audio-state="loading"] .audio-state-line i,
.audio-dock[data-audio-state="buffering"] .audio-state-line i {
  background: #f2bd45;
  animation: audio-pulse 900ms ease-in-out infinite alternate;
}

.audio-dock[data-audio-state="paused"] .audio-state-line i,
.audio-dock[data-audio-state="stopped"] .audio-state-line i {
  background: rgba(255, 255, 255, 0.48);
}

.audio-dock[data-audio-state="error"] .audio-state-line i {
  background: #ff7b68;
}

@keyframes audio-pulse {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

.audio-dock .icon-button {
  width: 34px;
  height: 34px;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  border: 0;
}

.audio-stop {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.audio-speed {
  grid-column: 1 / -1;
  display: inline-flex;
  justify-self: start;
  padding: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.audio-speed button {
  min-width: 42px;
  height: 20px;
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.audio-speed button.active {
  color: var(--green-dark);
  background: #9ee8c8;
}

.audio-dock.inline-audio .audio-speed {
  background: rgba(16, 45, 36, 0.07);
}

.audio-dock.inline-audio .audio-speed button {
  color: var(--muted);
}

.audio-dock.inline-audio .audio-speed button.active {
  color: #fff;
  background: var(--green);
}

.audio-waveform {
  --audio-progress: 0%;
  position: relative;
  grid-column: 1 / -1;
  width: 100%;
  height: 28px;
  overflow: hidden;
  cursor: pointer;
}

.audio-waveform-layer {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(120, minmax(1px, 1fr));
  align-items: center;
  gap: 1px;
  pointer-events: none;
}

.audio-waveform-layer span {
  min-height: 2px;
  height: max(2px, calc(var(--level) * 100%));
  background: rgba(255, 255, 255, 0.24);
  border-radius: 1px;
}

.audio-waveform-played {
  clip-path: inset(0 calc(100% - var(--audio-progress)) 0 0);
}

.audio-waveform-played span {
  background: #9ee8c8;
}

.audio-waveform input {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.audio-playhead {
  position: absolute;
  z-index: 2;
  top: 1px;
  bottom: 1px;
  left: var(--audio-progress);
  width: 2px;
  background: #fff;
  border-radius: 1px;
  transform: translateX(-1px);
  pointer-events: none;
}

.audio-timeline {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.audio-timeline span:nth-child(2) {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-timeline span:last-child {
  text-align: right;
}

.toast {
  position: fixed;
  z-index: 120;
  right: 20px;
  bottom: calc(92px + var(--safe-bottom));
  left: 20px;
  padding: 12px 14px;
  color: #fff;
  background: #1b2924;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--skeleton-bg);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--skeleton-shine) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: shimmer 1.3s ease-in-out infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

@media (min-width: 760px) {
  .topbar {
    padding-right: 28px;
    padding-left: 28px;
  }

  .screen {
    padding: 28px;
  }

  .overview-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  }

  .network-hero {
    min-height: 270px;
  }

  .overview-grid .content-panel:first-child {
    grid-row: span 2;
  }

  .dialogue-list,
  .trend-list,
  .studio-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-group-title {
    grid-column: 1 / -1;
  }

  .chip-row {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .bottom-sheet,
  .detail-sheet {
    right: 24px;
    left: auto;
    width: min(480px, calc(100vw - 48px));
    border-radius: 8px 8px 0 0;
  }

  .audio-dock {
    right: 24px;
    left: auto;
    width: 390px;
  }
}

@media (min-width: 1020px) {
  .workspace {
    padding: 0 0 0 84px;
  }

  .topbar {
    left: 84px;
  }

  .bottom-nav {
    top: 0;
    right: auto;
    bottom: 0;
    width: 84px;
    height: auto;
    padding: 18px 7px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    background: var(--green-deep);
    border: 0;
  }

  body[data-can-view-access="false"] .bottom-nav {
    display: flex;
  }

  .bottom-nav button {
    min-height: 62px;
    color: rgba(255, 255, 255, 0.56);
    border-radius: 8px;
  }

  .bottom-nav button.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
  }

  .screen {
    min-height: calc(100vh - 64px);
  }

  .network-hero {
    min-height: 290px;
  }

  .dialogue-list,
  .trend-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .studio-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audio-dock {
    bottom: 24px;
  }
}

@media (min-width: 1020px) {
  body {
    background: var(--surface-soft);
  }

  .desktop-only,
  .desktop-overview,
  .desktop-dialogue-detail,
  .desktop-trend-detail,
  .desktop-studios-view {
    display: block;
  }

  .mobile-only,
  .mobile-overview,
  .mobile-studios-view {
    display: none;
  }

  .main-content {
    max-width: 1540px;
    margin: 0 auto;
  }

  .screen {
    min-height: calc(100vh - 64px);
    padding: 24px 28px 36px;
  }

  .desktop-page-heading {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
  }

  .desktop-page-heading h1 {
    margin: 3px 0 3px;
    font-size: 26px;
    line-height: 1.2;
  }

  .desktop-page-heading > div > span {
    color: var(--muted);
    font-size: 13px;
  }

  .desktop-page-heading .button {
    width: auto;
    min-width: 150px;
  }

  .desktop-kpi-grid {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .desktop-kpi {
    min-width: 0;
    min-height: 104px;
    padding: 16px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .desktop-kpi .kpi-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: var(--surface-green);
    border-radius: 50%;
  }

  .desktop-kpi .kpi-icon svg {
    width: 21px;
    height: 21px;
  }

  .desktop-kpi small,
  .desktop-kpi strong,
  .desktop-kpi em {
    display: block;
  }

  .desktop-kpi small {
    color: var(--ink-soft);
    font-size: 12px;
    font-style: normal;
    font-weight: 750;
  }

  .desktop-kpi strong {
    margin-top: 2px;
    font-size: 25px;
    line-height: 1.1;
  }

  .desktop-kpi em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
  }

  .desktop-kpi em.up,
  .studio-delta.up {
    color: var(--green);
  }

  .desktop-kpi em.down,
  .studio-delta.down {
    color: var(--coral);
  }

  .desktop-panel {
    min-width: 0;
    padding: 17px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .desktop-panel-title {
    min-height: 38px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .desktop-panel-title h2 {
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
  }

  .desktop-panel-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
  }

  .desktop-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
    gap: 12px;
    align-items: stretch;
  }

  .overview-column {
    display: contents;
  }

  .desktop-analytics-grid .desktop-trend-panel {
    grid-area: 1 / 1;
    align-self: start;
  }

  .desktop-analytics-grid .factors-panel {
    grid-area: 2 / 1;
  }

  .desktop-analytics-grid .latest-day-panel {
    grid-area: 1 / 2 / 3 / 3;
  }

  .desktop-analytics-grid .attention-panel {
    grid-area: 3 / 1;
    display: flex;
    flex-direction: column;
  }

  .desktop-analytics-grid .attention-list {
    flex: 1;
  }

  .desktop-analytics-grid .ranking-panel {
    grid-area: 3 / 2;
  }

  .desktop-trend-panel {
    min-height: 326px;
  }

  .chart-legend {
    display: flex;
    gap: 15px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
  }

  .chart-legend span::before {
    width: 18px;
    height: 2px;
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
    background: var(--green);
    content: "";
  }

  .chart-legend .conversion::before {
    background: var(--blue);
  }

  .desktop-line-chart {
    position: relative;
    height: 244px;
  }

  .desktop-line-chart svg {
    width: 100%;
    height: 218px;
    overflow: visible;
  }

  .desktop-line-chart .chart-grid line {
    stroke: #e7ece9;
    stroke-width: 1;
  }

  .desktop-line-chart .chart-axis-labels text {
    fill: var(--muted);
    font-size: 12px;
    stroke: none;
  }

  .desktop-line-chart polyline {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .desktop-line-chart .quality-line {
    stroke: var(--green);
  }

  .desktop-line-chart .conversion-line {
    stroke: var(--blue);
  }

  .desktop-line-chart .quality-dots circle {
    fill: var(--surface);
    stroke: var(--green);
    stroke-width: 2.2;
  }

  .desktop-line-chart .conversion-dots circle {
    fill: var(--surface);
    stroke: var(--blue);
    stroke-width: 2.2;
  }

  .desktop-chart-labels {
    position: absolute;
    right: 2.2%;
    bottom: 0;
    left: 5.2%;
    height: 18px;
  }

  .desktop-chart-labels span {
    position: absolute;
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
    transform: translateX(-50%);
  }

  .attention-list {
    display: grid;
  }

  .attention-row {
    width: 100%;
    min-height: 74px;
    padding: 11px 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 10px;
    border: 0;
    border-top: 1px solid var(--line);
    background: transparent;
    text-align: left;
    cursor: pointer;
  }

  .attention-row:first-child {
    border-top: 0;
  }

  .attention-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--coral);
    background: var(--coral-soft);
    border-radius: 50%;
  }

  .attention-row.warning .attention-icon {
    color: #a26900;
    background: var(--amber-soft);
  }

  .attention-row.benchmark .attention-icon {
    color: var(--blue);
    background: var(--blue-soft);
  }

  .attention-row strong,
  .attention-row small {
    display: block;
  }

  .attention-row strong {
    font-size: 13px;
  }

  .attention-row small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
  }

  .attention-row b {
    color: var(--coral);
    font-size: 16px;
  }

  .attention-row.warning b {
    color: #a26900;
  }

  .attention-row.benchmark b {
    color: var(--blue);
  }

  .attention-row > svg {
    width: 16px;
    color: var(--muted);
  }

  .desktop-lower-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr);
    gap: 12px;
  }

  .factors-panel {
    grid-row: span 2;
  }

  .factor-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .factor-columns h3,
  .system-columns h3 {
    margin: 0 0 6px;
    font-size: 12px;
  }

  .factor-row {
    width: 100%;
    min-height: 42px;
    padding: 6px 0;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 68px;
    align-items: center;
    gap: 7px;
    border: 0;
    border-top: 1px solid var(--line);
    background: transparent;
    text-align: left;
    cursor: pointer;
  }

  .factor-status {
    color: var(--green);
  }

  .negative-factor .factor-status {
    color: var(--coral);
  }

  .factor-status svg {
    width: 15px;
    height: 15px;
  }

  .factor-row strong,
  .factor-row small {
    display: block;
  }

  .factor-row strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .factor-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
  }

  .factor-meter {
    height: 5px;
    overflow: hidden;
    background: var(--line);
    border-radius: 3px;
  }

  .factor-meter i {
    display: block;
    height: 100%;
    background: var(--green);
    border-radius: inherit;
  }

  .negative-factor .factor-meter i {
    background: var(--amber);
  }

  .desktop-case-row,
  .ranking-row {
    width: 100%;
    min-height: 66px;
    padding: 10px 0;
    display: grid;
    align-items: center;
    gap: 9px;
    border: 0;
    border-top: 1px solid var(--line);
    background: transparent;
    text-align: left;
    cursor: pointer;
  }

  .desktop-case-row {
    grid-template-columns: 34px minmax(0, 1fr) auto 16px;
  }

  .desktop-case-row:first-child,
  .ranking-row:first-child {
    border-top: 0;
  }

  .case-play {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: var(--surface-green);
    border-radius: 50%;
  }

  .case-play svg {
    width: 16px;
    height: 16px;
    margin-left: 2px;
  }

  .desktop-case-row small,
  .desktop-case-row strong,
  .desktop-case-row em,
  .ranking-row strong,
  .ranking-row small {
    display: block;
  }

  .desktop-case-row small {
    color: var(--green);
    font-size: 10px;
    font-style: normal;
    font-weight: 750;
  }

  .desktop-case-row.negative small {
    color: var(--coral);
  }

  .desktop-case-row strong,
  .ranking-row strong {
    margin-top: 2px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-case-row em,
  .ranking-row small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-case-row b {
    color: var(--green);
    font-size: 15px;
  }

  .desktop-case-row.negative b {
    color: var(--coral);
  }

  .desktop-case-row > svg {
    width: 15px;
    color: var(--muted);
  }

  .ranking-row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }

  .ranking-place {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: var(--green-dark);
    background: var(--surface-green);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
  }

  .ranking-row b {
    color: var(--green);
    font-size: 15px;
  }

  .muted-copy {
    margin: 12px 0;
    color: var(--muted);
    font-size: 12px;
  }

  [data-screen="trends"] {
    padding: 0;
  }

  .trends-workspace {
    min-height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: 390px minmax(0, 1fr);
    background: var(--surface);
  }

  .trends-browser {
    max-height: calc(100vh - 64px);
    padding: 22px 16px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface-soft);
    border-right: 1px solid var(--line);
  }

  .trends-browser .screen-heading {
    margin-bottom: 12px;
  }

  .trends-browser .screen-heading h1 {
    font-size: 21px;
  }

  .trends-browser .segment-control {
    height: 38px;
    flex: 0 0 38px;
  }

  .trends-browser .list-meta {
    margin: 12px 0 9px;
    flex: 0 0 auto;
  }

  .trends-browser .trend-list {
    min-height: 0;
    margin: 0 -16px;
    padding: 0 10px 24px;
    flex: 1 1 auto;
    display: block;
    overflow-y: auto;
  }

  .trends-browser .trend-card {
    min-height: 92px;
    margin: 0 0 8px;
    padding: 13px;
  }

  .trends-browser .trend-card.selected {
    border-color: var(--danger-border);
    background: var(--coral-soft);
    box-shadow: 0 0 0 1px rgba(216, 94, 73, 0.08);
  }

  .trends-browser .trend-card.positive-trend.selected {
    border-color: #88c9ac;
    background: var(--surface-green);
    box-shadow: 0 0 0 1px rgba(7, 131, 74, 0.07);
  }

  .trends-browser .trend-card-top {
    grid-template-columns: 34px minmax(0, 1fr) 17px;
    gap: 10px;
  }

  .trends-browser .trend-rank {
    width: 34px;
    height: 34px;
  }

  .trends-browser .trend-card h3 {
    font-size: 13px;
  }

  .trends-browser .trend-card p {
    font-size: 10px;
  }

  .trends-browser .trend-meter {
    margin-top: 10px;
  }

  .desktop-trend-detail {
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--surface);
  }

  .desktop-trend-detail-header {
    min-height: 142px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border-bottom: 1px solid var(--line);
  }

  .desktop-trend-kind {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--coral);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .desktop-trend-detail-header.positive .desktop-trend-kind {
    color: var(--green);
  }

  .desktop-trend-kind svg {
    width: 14px;
    height: 14px;
  }

  .desktop-trend-detail-header h2 {
    max-width: 720px;
    margin: 8px 0 5px;
    font-size: 23px;
    line-height: 1.2;
  }

  .desktop-trend-detail-header p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
  }

  .desktop-trend-metric {
    min-width: 142px;
    padding-left: 22px;
    border-left: 1px solid var(--line);
    text-align: right;
  }

  .desktop-trend-metric strong,
  .desktop-trend-metric span {
    display: block;
  }

  .desktop-trend-metric strong {
    color: var(--coral);
    font-size: 25px;
  }

  .desktop-trend-detail-header.positive .desktop-trend-metric strong {
    color: var(--green);
  }

  .desktop-trend-metric span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
  }

  .desktop-trend-detail-body {
    min-height: calc(100vh - 206px);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  }

  .desktop-trend-analysis {
    padding: 10px 28px 36px;
  }

  .desktop-trend-analysis section {
    padding: 26px 0;
    border-bottom: 1px solid var(--line);
  }

  .desktop-trend-analysis section:last-child {
    border-bottom: 0;
  }

  .desktop-trend-analysis .section-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .desktop-trend-analysis section.warning .section-label {
    color: #a26900;
  }

  .desktop-trend-analysis section.positive .section-label {
    color: var(--green);
  }

  .desktop-trend-analysis h3 {
    margin: 7px 0 10px;
    font-size: 15px;
  }

  .desktop-trend-analysis p {
    max-width: 680px;
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.65;
  }

  .desktop-trend-examples {
    padding: 24px 28px 36px;
    background: var(--surface-soft);
    border-left: 1px solid var(--line);
  }

  .desktop-trend-example {
    margin-top: 12px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .desktop-trend-example:first-of-type {
    margin-top: 0;
  }

  .trend-example-heading {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .trend-example-heading span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: var(--surface-green);
    border-radius: 50%;
  }

  .trend-example-heading svg {
    width: 14px;
    height: 14px;
  }

  .desktop-trend-example p {
    margin: 11px 0 0;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.55;
  }

  .desktop-trend-example .button {
    width: auto;
    min-width: 148px;
    margin-top: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .desktop-trend-example .button svg {
    width: 14px;
    height: 14px;
  }

  [data-screen="dialogues"] {
    padding: 0;
  }

  .dialogues-workspace {
    min-height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: 370px minmax(0, 1fr);
    background: var(--surface);
  }

  .dialogues-browser {
    max-height: calc(100vh - 64px);
    padding: 22px 16px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface-soft);
    border-right: 1px solid var(--line);
  }

  .dialogues-browser .screen-heading {
    margin-bottom: 12px;
  }

  .dialogues-browser .screen-heading h1 {
    font-size: 21px;
  }

  .dialogues-browser .search-field {
    flex: 0 0 40px;
    height: 40px;
  }

  .dialogues-browser .chip-row {
    min-height: 31px;
    margin: 10px 0 0;
    padding: 0 0 2px;
    flex: 0 0 31px;
    align-items: center;
    overflow-y: hidden;
  }

  .dialogues-browser .chip {
    height: 29px;
    padding: 0 9px;
    font-size: 11px;
  }

  .dialogues-browser .list-meta {
    margin: 10px 0 7px;
    flex: 0 0 auto;
  }

  .dialogues-browser .dialogue-list {
    min-height: 0;
    margin: 0 -16px;
    padding: 0 10px 24px;
    flex: 1 1 auto;
    display: block;
    overflow-y: auto;
  }

  .dialogues-browser .dialogue-card {
    min-height: 90px;
    margin: 0;
    padding: 12px 8px;
    grid-template-columns: 34px minmax(0, 1fr) 22px;
    gap: 9px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  .dialogues-browser .dialogue-card.selected {
    margin: 4px 0;
    padding: 11px 8px;
    background: var(--blue-soft);
    border: 1px solid #a9bfee;
    border-radius: 6px;
  }

  .dialogues-browser .play-button {
    width: 34px;
    height: 34px;
  }

  .dialogues-browser .dialogue-meta span,
  .dialogues-browser .dialogue-footer span {
    font-size: 10px;
  }

  .dialogues-browser .dialogue-card h3 {
    margin: 5px 0 3px;
    font-size: 13px;
  }

  .dialogues-browser .dialogue-card p {
    display: none;
  }

  .dialogues-browser .dialogue-footer {
    margin-top: 6px;
  }

  .dialogues-browser .dialogue-open {
    width: 22px;
  }

  .desktop-dialogue-detail {
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--surface);
  }

  .desktop-detail-header {
    min-height: 112px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
  }

  .desktop-detail-category {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
  }

  .desktop-detail-header h2 {
    margin: 7px 0 4px;
    font-size: 20px;
    line-height: 1.25;
  }

  .desktop-detail-header p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
  }

  .desktop-detail-score {
    min-width: 76px;
    text-align: right;
  }

  .desktop-detail-score small,
  .desktop-detail-score strong {
    display: block;
  }

  .desktop-detail-score small {
    color: var(--muted);
    font-size: 11px;
  }

  .desktop-detail-score strong {
    color: var(--green);
    font-size: 32px;
    line-height: 1.1;
  }

  .desktop-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  }

  .desktop-detail-content,
  .desktop-evaluation {
    min-width: 0;
    padding: 18px 22px 34px;
  }

  .desktop-evaluation {
    border-left: 1px solid var(--line);
    background: var(--surface-soft);
  }

  .desktop-audio-wrap {
    width: 100%;
    margin: 0 0 16px;
  }

  .desktop-audio-launch {
    width: 100%;
    min-height: 74px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    background: var(--surface-green);
    border: 1px solid #cfe1d8;
    border-radius: 7px;
    text-align: left;
    cursor: pointer;
  }

  .desktop-audio-launch strong,
  .desktop-audio-launch small {
    display: block;
  }

  .desktop-audio-launch strong {
    font-size: 13px;
  }

  .desktop-audio-launch small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
  }

  .detail-audio-slot.expanded > .desktop-audio-launch {
    display: none;
  }

  .desktop-audio-wrap .audio-dock.inline-audio {
    border: 1px solid #cfe1d8;
    border-radius: 7px;
  }

  .desktop-detail-section {
    padding: 16px 0;
    border-top: 1px solid var(--line);
  }

  .desktop-detail-section h3 {
    margin: 0 0 7px;
    font-size: 13px;
  }

  .desktop-detail-section p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.65;
  }

  .desktop-detail-section.success h3 {
    color: var(--green);
  }

  .desktop-detail-section.warning h3 {
    color: #a26900;
  }

  .desktop-evaluation-title {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .desktop-evaluation-title h3 {
    margin: 0;
    font-size: 15px;
  }

  .desktop-evaluation-title span {
    color: var(--muted);
    font-size: 11px;
  }

  .desktop-criteria-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
  }

  .desktop-criterion-item {
    border-top: 1px solid var(--line);
  }

  .desktop-criterion-item:first-child {
    border-top: 0;
  }

  .desktop-criterion {
    width: 100%;
    min-height: 54px;
    padding: 9px 10px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    border: 0;
    background: var(--surface);
    text-align: left;
    cursor: pointer;
  }

  .desktop-criterion:hover {
    background: var(--surface-soft);
  }

  .desktop-criterion > span:first-child {
    color: var(--green);
  }

  .desktop-criterion.partial > span:first-child,
  .desktop-criterion.not_done > span:first-child {
    color: var(--amber);
  }

  .desktop-criterion.not_applicable > span:first-child {
    color: var(--muted);
  }

  .desktop-criterion svg {
    width: 18px;
    height: 18px;
  }

  .desktop-criterion strong,
  .desktop-criterion small {
    display: block;
  }

  .desktop-criterion strong {
    font-size: 11px;
  }

  .desktop-criterion small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
  }

  .criterion-chevron {
    display: grid;
    place-items: center;
    color: var(--muted);
    transition: transform 160ms ease;
  }

  .criterion-chevron svg {
    width: 15px;
    height: 15px;
  }

  .desktop-criterion-item.expanded .criterion-chevron {
    transform: rotate(90deg);
  }

  .desktop-criterion-comment {
    display: none;
    padding: 0 12px 12px 42px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    border-top: 1px solid var(--line);
  }

  .desktop-criterion-item.expanded .desktop-criterion-comment {
    display: block;
  }

  .desktop-criterion-comment > p {
    margin: 10px 0 0;
    font-size: 10px;
    line-height: 1.5;
  }

  .desktop-criterion-comment q,
  .objection-step q {
    margin-top: 7px;
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    line-height: 1.45;
  }

  .criterion-objection {
    margin-top: 10px;
    padding-top: 1px;
    border-top: 1px solid var(--line);
  }

  .criterion-objection > p {
    margin: 9px 0 0;
    font-size: 10px;
    line-height: 1.5;
  }

  .criterion-objection > p strong,
  .criterion-recommendation strong {
    margin-bottom: 3px;
    display: block;
  }

  .objection-steps {
    margin-top: 9px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
  }

  .objection-step {
    padding: 8px;
    display: grid;
    grid-template-columns: 19px minmax(0, 1fr);
    gap: 7px;
    border-top: 1px solid var(--line);
  }

  .objection-step:first-child {
    border-top: 0;
  }

  .objection-step > span:first-child {
    color: var(--green);
  }

  .objection-step.partial > span:first-child,
  .objection-step.not_done > span:first-child,
  .objection-step.unclear > span:first-child {
    color: var(--amber);
  }

  .objection-step svg {
    width: 15px;
    height: 15px;
  }

  .objection-step strong,
  .objection-step small {
    display: block;
  }

  .objection-step strong {
    font-size: 10px;
  }

  .objection-step small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 10px;
  }

  .objection-step p {
    margin: 5px 0 0;
    font-size: 10px;
    line-height: 1.45;
  }

  .desktop-next-step {
    margin-top: 14px;
    padding: 12px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    color: var(--green-dark);
    background: var(--surface-green);
    border-radius: 7px;
  }

  .desktop-next-step.neutral {
    color: var(--ink-soft);
    background: var(--surface-soft);
  }

  .desktop-next-step strong {
    font-size: 11px;
  }

  .desktop-next-step p {
    margin: 3px 0 0;
    font-size: 10px;
    line-height: 1.45;
  }

  .desktop-dialogue-facts {
    margin-top: 14px;
    padding-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    border-top: 1px solid var(--line);
  }

  .desktop-dialogue-facts small,
  .desktop-dialogue-facts strong {
    display: block;
  }

  .desktop-dialogue-facts small {
    color: var(--muted);
    font-size: 10px;
  }

  .desktop-dialogue-facts strong {
    margin-top: 2px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  [data-screen="studios"] .screen-heading {
    margin-bottom: 10px;
  }

  [data-screen="studios"] .chip-row {
    margin: 0 0 14px;
    padding: 0;
  }

  .studio-list {
    display: block;
  }

  .studio-kpi-grid {
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .studio-kpi-grid section {
    min-height: 84px;
    padding: 14px;
    display: grid;
    grid-template-columns: 38px auto;
    grid-template-rows: auto auto;
    align-content: center;
    column-gap: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .studio-kpi-grid section > span {
    width: 38px;
    height: 38px;
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    color: var(--green);
    background: var(--surface-green);
    border-radius: 50%;
  }

  .studio-kpi-grid strong {
    font-size: 21px;
    line-height: 1.1;
  }

  .studio-kpi-grid small {
    color: var(--muted);
    font-size: 11px;
  }

  .studio-table-panel {
    padding: 0;
    overflow-x: auto;
  }

  .studio-table-head,
  .desktop-studio-summary {
    min-width: 1080px;
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) 70px 70px 70px 80px 110px 55px minmax(180px, 1fr) 24px;
    align-items: center;
    gap: 8px;
  }

  .studio-table-head {
    min-height: 42px;
    padding: 0 14px;
    color: var(--muted);
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
    font-size: 10px;
    font-weight: 750;
  }

  .desktop-studio-row {
    min-width: 1080px;
    border-bottom: 1px solid var(--line);
  }

  .desktop-studio-row:last-child {
    border-bottom: 0;
  }

  .desktop-studio-summary {
    width: 100%;
    min-height: 70px;
    padding: 9px 14px;
    background: var(--surface);
    border: 0;
    text-align: left;
    cursor: pointer;
  }

  .desktop-studio-summary:hover {
    background: var(--surface-soft);
  }

  .desktop-studio-name {
    min-width: 0;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
  }

  .desktop-studio-name i {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: var(--green-dark);
    background: var(--surface-green);
    border-radius: 50%;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
  }

  .desktop-studio-name strong,
  .desktop-studio-name small {
    display: block;
  }

  .desktop-studio-name strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-studio-name small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
  }

  .desktop-studio-summary > span,
  .desktop-studio-summary > b {
    font-size: 12px;
    font-weight: 700;
  }

  .desktop-studio-summary .studio-value {
    color: var(--green);
    font-size: 15px;
  }

  .studio-spark {
    height: 36px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
  }

  .studio-spark i {
    width: 6px;
    display: block;
    background: var(--green);
    border-radius: 2px 2px 0 0;
  }

  .studio-problem {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .studio-problem.has-problem {
    color: #9a6500;
  }

  .desktop-studio-summary > svg {
    width: 15px;
    color: var(--muted);
    transition: transform 160ms ease;
  }

  .desktop-studio-row.expanded .desktop-studio-summary > svg {
    transform: rotate(90deg);
  }

  .desktop-studio-days {
    display: none;
    padding: 6px 14px 10px 49px;
    background: var(--surface-soft);
    border-top: 1px solid var(--line);
  }

  .desktop-studio-row.expanded .desktop-studio-days {
    display: block;
  }

  .desktop-studio-day {
    min-height: 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 60px 60px 38px;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
  }

  .desktop-studio-day:last-child {
    border-bottom: 0;
  }

  .desktop-studio-day strong,
  .desktop-studio-day small {
    display: block;
  }

  .desktop-studio-day strong {
    font-size: 11px;
  }

  .desktop-studio-day small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
  }

  .studio-analysis-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }

  .studio-systems {
    grid-column: 1 / -1;
  }

  .desktop-category-list,
  .studio-case-list {
    display: grid;
  }

  .desktop-category-row {
    min-height: 42px;
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(80px, 1fr) 30px;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--line);
  }

  .desktop-category-row:first-child {
    border-top: 0;
  }

  .desktop-category-row > span:first-child {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
  }

  .desktop-category-row .score-track {
    height: 5px;
  }

  .desktop-category-row .score-track i {
    display: block;
    height: 100%;
    background: var(--green);
  }

  .desktop-category-row strong {
    text-align: right;
    font-size: 12px;
  }

  .studio-case-row {
    min-height: 62px;
    padding: 8px 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border: 0;
    border-top: 1px solid var(--line);
    background: transparent;
    text-align: left;
    cursor: pointer;
  }

  .studio-case-row:first-child {
    border-top: 0;
  }

  .studio-case-row strong,
  .studio-case-row small {
    display: block;
  }

  .studio-case-row strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .studio-case-row small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
  }

  .studio-case-row b {
    color: var(--green);
    font-size: 14px;
  }

  .studio-case-row b.low {
    color: var(--coral);
  }

  .system-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .system-row {
    width: 100%;
    min-height: 44px;
    padding: 7px 0;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border: 0;
    border-top: 1px solid var(--line);
    background: transparent;
    text-align: left;
    cursor: pointer;
  }

  .system-row > span:first-child {
    color: var(--green);
  }

  .system-row.negative > span:first-child {
    color: var(--coral);
  }

  .system-row svg {
    width: 17px;
    height: 17px;
  }

  .system-row strong,
  .system-row small {
    display: block;
  }

  .system-row strong {
    font-size: 11px;
  }

  .system-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
  }
}

@media (min-width: 1360px) {
  .desktop-lower-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(270px, 0.72fr) minmax(270px, 0.72fr);
  }

  .factors-panel {
    grid-row: auto;
  }

  .studio-analysis-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(340px, 1.15fr);
  }

  .studio-systems {
    grid-column: auto;
  }
}

.category-performance-panel {
  margin-top: 0;
}

.category-performance-list {
  display: grid;
}

.category-performance-row {
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 9px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 15px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.category-performance-row:first-child { border-top: 0; }
.category-performance-row > svg { width: 14px; color: var(--muted); }
.category-performance-name { min-width: 0; display: flex; align-items: center; gap: 8px; }
.category-performance-name > span { min-width: 0; }
.category-performance-name strong,
.category-performance-name small,
.category-performance-rate small,
.category-performance-rate b,
.category-performance-rate em,
.category-performance-score small,
.category-performance-score b { display: block; }
.category-performance-name strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.category-performance-name small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.category-performance-score { display: none; }
.category-performance-rate { text-align: right; }
.category-performance-rate small,
.category-performance-score small { color: var(--muted); font-size: 10px; }
.category-performance-rate b,
.category-performance-score b { margin-top: 1px; color: var(--green); font-size: 14px; }
.category-performance-rate em { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.category-performance-rate em.up { color: var(--green); }
.category-performance-rate em.down { color: var(--coral); }

.latest-day-export {
  min-height: 32px;
  padding: 0 10px;
  flex: 0 0 auto;
  font-size: 11px;
}

.latest-day-export svg { width: 14px; height: 14px; }
.latest-day-summary > p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.latest-day-metrics { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.latest-day-metrics > span { min-width: 0; padding: 10px 8px; border-left: 1px solid var(--line); }
.latest-day-metrics > span:first-child { padding-left: 0; border-left: 0; }
.latest-day-metrics small,
.latest-day-metrics strong { display: block; }
.latest-day-metrics small { color: var(--muted); font-size: 10px; }
.latest-day-metrics strong { margin-top: 3px; color: var(--green); font-size: 16px; }
.latest-day-dialogues { width: 100%; min-height: 40px; padding: 9px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; background: transparent; color: var(--green-dark); font-size: 11px; font-weight: 800; text-align: left; cursor: pointer; }
.latest-day-more { width: 100%; padding: 9px 0 0; border: 0; background: transparent; color: var(--green); font: inherit; font-size: 12px; font-weight: 800; text-align: left; cursor: pointer; }
.latest-day-more:hover, .latest-day-more:focus-visible, .latest-day-dialogues:hover, .latest-day-dialogues:focus-visible { text-decoration: underline; }
.latest-day-more:focus-visible, .latest-day-dialogues:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }
.latest-day-dialogues > span { min-width: 0; display: flex; align-items: center; gap: 7px; }
.latest-day-dialogues svg { width: 15px; height: 15px; flex: 0 0 auto; }

.improvements-heading {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.improvements-heading h1 { margin: 3px 0 2px; font-size: 24px; line-height: 1.2; }
.improvements-heading > div > span { color: var(--muted); font-size: 12px; }
.improvements-segment {
  margin-bottom: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.improvements-segment button { min-width: 0; font-size: 11px; white-space: nowrap; }
.improvements-list { display: grid; gap: 10px; }

.improvement-card {
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.improvement-card.recommended { border-color: #edd9a6; }
.improvement-card.confirmed { border-color: #a9d5c1; }
.improvement-card > header,
.improvement-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.improvement-scope { min-width: 0; display: flex; align-items: center; gap: 8px; }
.improvement-scope > svg { flex: 0 0 auto; width: 18px; color: var(--green); }
.improvement-card.recommended .improvement-scope > svg { color: #ba7d13; }
.improvement-scope strong,
.improvement-scope small { display: block; }
.improvement-scope strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.improvement-scope small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.improvement-status { padding: 4px 7px; color: var(--green); background: var(--surface-green); border-radius: 5px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.improvement-card.recommended .improvement-status { color: #9b6812; background: #fff3d5; }
.improvement-card.confirmed .improvement-status { color: #fff; background: var(--green); }
.improvement-card-body { min-height: 230px; padding: 14px 0; }
.improvement-card-body h3 { margin: 0; font-size: 14px; line-height: 1.35; }
.improvement-baseline { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.improvement-baseline strong { color: var(--ink); }
.improvement-action { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.improvement-action > span { color: var(--green); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.improvement-action p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.improvement-check { margin-top: 14px; padding: 10px; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; color: var(--green-dark); background: var(--surface-green); border-radius: 7px; }
.improvement-check svg { width: 18px; }
.improvement-check p { margin: 0; font-size: 11px; line-height: 1.45; }
.improvement-progress { margin-top: 15px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.improvement-progress strong,
.improvement-progress small { display: block; }
.improvement-progress strong { color: var(--ink-soft); font-size: 11px; line-height: 1.4; }
.improvement-progress small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.improvement-progress b { color: var(--green); font-size: 16px; }
.improvement-meter { height: 5px; margin-top: 8px; overflow: hidden; background: var(--surface-soft); border-radius: 3px; }
.improvement-meter span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.improvement-card > footer { padding-top: 10px; border-top: 1px solid var(--line); }
.improvement-card > footer .button { width: auto; min-width: 0; min-height: 34px; padding: 0 11px; font-size: 11px; }
.button-quiet { color: var(--green); background: transparent; border: 0; }
.trend-plan-button { width: auto; min-width: 0; margin-top: 14px; padding-inline: 14px; }

body[data-can-export="false"] [data-export-day],
body[data-can-export="false"] [data-export-source],
body[data-can-write="false"] [data-adopt-trend-code],
body[data-can-write="false"] [data-improvement-id],
body[data-can-write="false"] [data-write-only] { opacity: .5; cursor: not-allowed; }
.studio-admin-dialog fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.studio-admin-dialog fieldset:disabled { opacity: .65; }
.readonly-hint { padding: 12px; border-radius: 10px; background: var(--surface-green); color: var(--ink-soft); }
button:disabled { cursor: not-allowed; }
.employee-form select { width: 100%; min-height: 42px; }


.knowledge-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.knowledge-heading h1 { margin: 2px 0 2px; font-size: 25px; line-height: 1.2; }
.knowledge-heading > div > span { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; }
.knowledge-add { width: auto; min-width: 124px; padding-inline: 14px; }
.knowledge-add svg { width: 17px; height: 17px; }
.knowledge-tabs { margin-bottom: 4px; }

.knowledge-list {
  margin-top: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.knowledge-list > .empty-state { border: 0; }
.knowledge-row {
  min-width: 0;
  min-height: 104px;
  padding: 14px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
}

.knowledge-row:last-child { border-bottom: 0; }
.knowledge-file-type {
  width: 48px;
  height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: var(--green);
  background: var(--surface-green);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.knowledge-file-type svg { width: 21px; height: 21px; }
.knowledge-file-type b { font-size: 10px; letter-spacing: 0; }
.knowledge-main { min-width: 0; }
.chart-axis-note { font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; line-height: 1.5; }
.studio-connections { margin: 18px 0 26px; min-width: 0; }
.studio-connections h2 { font-size: 18px; margin: 0; }
.studio-connections .section-row { margin-bottom: 12px; }
#studio-connections-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#studio-connections-list .chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; }
#studio-connections-list .chip b { font-variant-numeric: tabular-nums; }
.studio-status-button { background: transparent; border: 0; padding: 6px 0; margin: 0 20px 12px 54px; cursor: pointer; text-align: left; font: inherit; font-size: 13px; }
.studio-status-button:hover { text-decoration: underline; }
.studio-status-button svg { width: 14px; height: 14px; }
.studio-status-button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.studio-connection { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.studio-connection { display: grid; grid-template-columns: minmax(0, 1fr) 16px; grid-template-rows: 1fr auto; align-items: start; gap: 12px 8px; padding: 16px; min-height: 126px; box-sizing: border-box; cursor: pointer; font: inherit; font-size: 15px; color: var(--ink); text-align: left; }
.studio-connection:hover { background: var(--surface-green); }
.studio-connection:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.studio-connection > svg { width: 16px; height: 16px; color: var(--muted); }
.studio-connection strong { grid-column: 1; overflow-wrap: anywhere; line-height: 1.4; }
.studio-connection .connection-state { grid-column: 1 / -1; }
.detail-sheet.connection-sheet { top: 50%; bottom: auto; left: 50%; right: auto; transform: translate(-50%, -50%); width: min(540px, calc(100vw - 32px)); max-height: 85dvh; border-radius: 8px; padding: 24px; animation: none; }
.connection-dialog .sheet-header { padding: 0; margin-bottom: 18px; align-items: start; }
.connection-dialog h2 { font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
.connection-dialog .connection-detail { margin-top: 20px; padding: 16px 0 0; font-size: 15px; }
.connection-city { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-bottom: 4px; }
.connection-state { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.connection-state::before { content: ""; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.connection-recording, .connection-online { color: var(--green); }
.connection-offline, .connection-problem { color: var(--coral); }
.connection-idle, .connection-unknown, .connection-unconnected, .connection-recovering { color: var(--ink-soft); }
.connection-detail { border-top: 1px solid var(--line); padding: 12px 16px 16px; font-size: 14px; line-height: 1.6; color: var(--ink-soft); overflow-wrap: anywhere; }
.connection-detail p { margin: 6px 0; }
.connection-device + .connection-device { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.connection-error { border-left: 2px solid var(--coral); padding-left: 12px; }
@media (max-width: 767px) {
  #studio-connections-list { gap: 8px; }
  .studio-status-button { margin-left: 44px; margin-right: 14px; }
  .studio-connection { min-height: 102px; gap: 8px; padding: 12px 14px; }
  .detail-sheet.connection-sheet { padding: 20px; }
}
#knowledge-tabs button { flex: 0 0 auto; padding: 9px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink-soft); font: inherit; font-size: 14px; white-space: nowrap; cursor: pointer; }
#knowledge-tabs button.active { color: var(--green); background: var(--surface-green); border-color: var(--green); }
.knowledge-rule-review { margin-top: 14px; max-width: 820px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.knowledge-rule-review summary { cursor: pointer; padding: 10px 0; color: var(--green); font-weight: 700; }
.knowledge-rule { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.knowledge-rule p { margin: 0; }
.knowledge-rule blockquote { margin: 0; padding: 8px 12px; border-left: 2px solid var(--line); color: var(--ink-soft); }
.knowledge-rule textarea { box-sizing: border-box; width: 100%; min-height: 100px; resize: vertical; font-size: 16px; line-height: 1.5; }
.knowledge-rule-select { display: flex; align-items: center; gap: 10px; }
.knowledge-rule-select input { width: 20px; height: 20px; accent-color: var(--green); flex-shrink: 0; }
.knowledge-rule-review > .button { max-width: 100%; white-space: normal; margin-top: 12px; }
.knowledge-main > .knowledge-rule-status { font-size: 14px; font-weight: 700; margin-block: 10px; }
.knowledge-row:has(details[open]) { align-items: start; }
.knowledge-title-line { min-width: 0; display: flex; align-items: center; gap: 8px; }
.knowledge-title-line strong { min-width: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-title-line > span { padding: 4px 7px; flex: 0 0 auto; color: var(--green); background: var(--surface-green); border-radius: 5px; font-size: 10px; font-weight: 800; }
.knowledge-main > p { max-width: 760px; margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.knowledge-meta { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: 10px; }
.knowledge-meta span { min-width: 0; display: inline-flex; align-items: center; gap: 4px; }
.knowledge-meta svg { width: 12px; height: 12px; }
.knowledge-actions { display: flex; align-items: center; gap: 7px; }
.knowledge-actions .icon-button { width: 38px; height: 38px; color: var(--ink-soft); }
.knowledge-delete { color: var(--coral) !important; }
.knowledge-delete.confirm { color: #fff !important; background: var(--coral); border-color: var(--coral); }

.knowledge-upload-form { margin-top: 20px; display: grid; gap: 18px; }
.knowledge-upload-form .filter-section { margin-top: 0; }
.knowledge-file-field {
  min-height: 86px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  cursor: pointer;
}

.knowledge-file-field input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.knowledge-file-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; color: var(--green); background: var(--surface-green); border-radius: 7px; }
.knowledge-file-icon svg { width: 21px; height: 21px; }
.knowledge-file-field > span:last-of-type { min-width: 0; }
.knowledge-file-field strong,
.knowledge-file-field small { display: block; }
.knowledge-file-field strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-file-field small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.field-label textarea {
  width: 100%;
  min-height: 96px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}

.field-label textarea:focus { border-color: #7eb99f; box-shadow: 0 0 0 2px rgba(12, 130, 76, 0.1); }
.knowledge-source-options { max-height: 210px; margin-top: 10px; }
.knowledge-form-actions {
  position: sticky;
  bottom: calc(-18px - var(--safe-bottom));
  margin: 2px -18px calc(-18px - var(--safe-bottom));
  padding: 12px 18px calc(18px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.knowledge-form-actions .button { width: 100%; }

.employees-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.employees-heading h1 { margin: 2px 0 0; font-size: 25px; }
.employees-heading > div > span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.employees-add { width: auto; min-width: 116px; padding-inline: 14px; }
.employees-add svg,
.access-code-result .button svg { width: 17px; height: 17px; }

.access-role-note {
  margin-top: 18px;
  padding: 13px 15px;
  display: grid;
  gap: 3px;
  color: var(--green-dark);
  background: var(--surface-green);
  border-left: 3px solid var(--green);
}

.access-role-note strong { font-size: 13px; }
.access-role-note span { color: var(--ink-soft); font-size: 11px; line-height: 1.5; }

.employees-list {
  margin-top: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.employee-row {
  min-height: 82px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.employee-row:last-child { border-bottom: 0; }
.employee-row.blocked { background: var(--coral-soft); }
.employee-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: var(--surface-green);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 850;
}

.employee-main,
.employee-name-line { min-width: 0; display: flex; align-items: center; }
.employee-main { flex-direction: column; align-items: flex-start; gap: 3px; }
.employee-name-line { width: 100%; gap: 6px; }
.employee-name-line strong { min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.employee-name-line small { color: var(--muted); font-size: 10px; }
.employee-status-dot { width: 6px; height: 6px; flex: 0 0 auto; background: var(--green); border-radius: 50%; }
.employee-row.invited .employee-status-dot { background: #d59b23; }
.employee-row.blocked .employee-status-dot { background: #d85e49; }
.employee-meta { max-width: 100%; overflow: hidden; color: var(--ink-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.employee-activity { color: var(--muted); font-size: 10px; }
.employee-edit { width: 36px; height: 36px; }
.employee-owner-mark { padding: 4px 7px; color: var(--green); background: var(--surface-green); border-radius: 5px; font-size: 10px; font-weight: 800; }

.employee-form { margin-top: 20px; }
.field-label { display: grid; gap: 7px; }
.field-label > span { font-size: 13px; font-weight: 800; }
.field-label input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.field-label input:focus { border-color: #7eb99f; box-shadow: 0 0 0 2px rgba(12, 130, 76, 0.1); }
.employee-role-options button { min-height: 64px; display: grid; align-content: center; gap: 3px; }
.employee-role-options strong,
.employee-role-options span { display: block; }
.employee-role-options span { color: var(--muted); font-size: 10px; line-height: 1.35; }
.employee-access-section .section-row { align-items: center; }
.employee-access-section .section-row h3 { margin-bottom: 2px; }
.employee-access-section .section-row p { margin: 0; color: var(--muted); font-size: 10px; }
.employee-source-options { max-height: 230px; margin-top: 10px; }

.access-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.access-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.access-toggle > span { width: 34px; height: 20px; padding: 2px; display: block; background: var(--line-strong); border-radius: 10px; transition: background 150ms ease; }
.access-toggle > span::after { content: ""; width: 16px; height: 16px; display: block; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform 150ms ease; }
.access-toggle input:checked + span { background: var(--green); }
.access-toggle input:checked + span::after { transform: translateX(14px); }
.access-toggle b { font-size: 11px; white-space: nowrap; }

.employee-form-actions {
  position: sticky;
  bottom: calc(-18px - var(--safe-bottom));
  margin: 22px -18px calc(-18px - var(--safe-bottom));
  padding: 12px 18px calc(18px + var(--safe-bottom));
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr);
  gap: 9px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.employee-form-actions .button:only-child { grid-column: 1 / -1; }

.employee-delete-zone {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.button-danger-quiet {
  width: 100%;
  color: var(--coral);
  background: var(--surface);
  border: 1px solid var(--danger-border);
}

.button-danger {
  color: #fff;
  background: #b42318;
  border-color: #b42318;
}

.employee-delete-confirm {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 8px;
}

.employee-delete-confirm > div:first-child {
  display: grid;
  gap: 4px;
}

.employee-delete-confirm strong { color: var(--danger-ink); }
.employee-delete-confirm span { color: var(--danger-muted); font-size: 15px; line-height: 1.45; }

.employee-delete-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
#employee-rotate-code.hidden + #employee-submit { grid-column: 1 / -1; }

.access-code-result { margin-top: 24px; display: grid; gap: 14px; }
.access-code-result p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.access-code-result code { min-width: 0; padding: 18px 10px; overflow-wrap: anywhere; color: var(--green-dark); background: var(--surface-green); border: 1px dashed #80b89f; border-radius: 8px; font-size: 20px; font-weight: 850; letter-spacing: 0; text-align: center; }
.access-code-result small { color: var(--muted); font-size: 11px; line-height: 1.45; }

.settings-content {
  margin-top: 20px;
  display: grid;
  gap: 18px;
}

.settings-account {
  padding: 14px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.settings-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: var(--surface-green);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 850;
}

.settings-account strong,
.settings-account span { display: block; }
.settings-account strong { font-size: 15px; }
.settings-account div > span { margin-top: 3px; color: var(--muted); font-size: 11px; }

.settings-section { margin: 0; }
.settings-section .section-row h3 { margin-bottom: 2px; }
.settings-section .section-row p { margin: 0; color: var(--muted); font-size: 11px; }
.settings-theme-control { height: 46px; margin-top: 10px; grid-template-columns: repeat(3, 1fr); }
.settings-theme-control button { padding: 0 6px; font-size: 12px; font-weight: 750; }

.settings-session-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.settings-logout { display: flex; align-items: center; justify-content: center; gap: 8px; }
.settings-logout svg { width: 17px; height: 17px; }

html[data-theme="dark"] .improvement-card.recommended .improvement-status {
  color: var(--amber);
  background: var(--amber-soft);
}

.crm-list-badge {
  min-height: 18px;
  padding: 2px 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--green);
  background: var(--surface-green);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 850;
}

.crm-list-badge.warning,
.crm-list-badge.negative { color: var(--coral); background: var(--coral-soft); }
.crm-list-badge.pending { color: var(--amber); background: var(--amber-soft); }
.crm-list-badge svg { width: 10px; height: 10px; }

.crm-pilot-badge {
  padding: 4px 7px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 4px;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.crm-pilot-summary > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.crm-pilot-metrics {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.crm-pilot-metrics > span {
  min-width: 0;
  padding: 10px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.crm-pilot-metrics > span:nth-child(-n + 2) { border-top: 0; }
.crm-pilot-metrics > span:nth-child(odd) { border-left: 0; }
.crm-pilot-metrics small,
.crm-pilot-metrics strong { display: block; }
.crm-pilot-metrics small { color: var(--muted); font-size: 10px; }
.crm-pilot-metrics strong { margin-top: 3px; font-size: 17px; }
.crm-pilot-metrics .positive strong { color: var(--green); }
.crm-pilot-metrics .negative strong { color: var(--coral); }
.crm-pilot-metrics .pending strong,
.crm-pilot-metrics .warning strong { color: var(--amber); }

.crm-example-list { margin-top: 12px; border-top: 1px solid var(--line); }
.crm-example {
  width: 100%;
  min-height: 54px;
  padding: 10px 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.crm-example > svg { width: 14px; height: 14px; color: var(--muted); }
.crm-example-status {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--surface-green);
  border-radius: 50%;
}
.crm-example.warning .crm-example-status,
.crm-example.negative .crm-example-status { color: var(--coral); background: var(--coral-soft); }
.crm-example.pending .crm-example-status { color: var(--amber); background: var(--amber-soft); }
.crm-example-status svg { width: 15px; height: 15px; }
.crm-example strong,
.crm-example small { display: block; }
.crm-example strong { font-size: 11px; }
.crm-example small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.crm-result-card {
  margin: 16px 0;
  padding: 14px;
  background: var(--surface-green);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
.crm-result-card.warning,
.crm-result-card.negative { background: var(--coral-soft); }
.crm-result-card.pending { background: var(--amber-soft); }
.crm-result-card.unmatched { background: var(--surface-soft); }
.crm-result-heading {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}
.crm-result-heading > span:first-child {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--surface);
  border-radius: 50%;
}
.crm-result-card.warning .crm-result-heading > span:first-child,
.crm-result-card.negative .crm-result-heading > span:first-child { color: var(--coral); }
.crm-result-card.pending .crm-result-heading > span:first-child { color: var(--amber); }
.crm-result-heading svg { width: 16px; height: 16px; }
.crm-result-heading small,
.crm-result-heading h3 { display: block; }
.crm-result-heading small { color: var(--muted); font-size: 10px; }
.crm-result-heading h3 { margin: 2px 0 0; font-size: 14px; }
.crm-result-heading em { padding: 3px 6px; color: var(--blue); background: var(--blue-soft); border-radius: 4px; font-size: 10px; font-style: normal; font-weight: 850; }
.crm-result-card > p { margin: 11px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.crm-result-facts { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.crm-result-facts small,
.crm-result-facts strong { display: block; }
.crm-result-facts small { color: var(--muted); font-size: 10px; }
.crm-result-facts strong { margin-top: 2px; overflow-wrap: anywhere; font-size: 11px; }
.crm-open-link { width: fit-content; min-height: 34px; margin-top: 13px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.crm-open-link svg { width: 13px; height: 13px; }

@media (min-width: 760px) {
  .crm-pilot-summary { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(280px, 1fr); column-gap: 22px; align-items: start; }
  .crm-pilot-summary > p { padding-top: 3px; font-size: 13px; }
  .crm-pilot-metrics { grid-column: 1; grid-row: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .crm-pilot-metrics > span,
  .crm-pilot-metrics > span:nth-child(-n + 2) { border-top: 0; }
  .crm-pilot-metrics > span:nth-child(odd) { border-left: 1px solid var(--line); }
  .crm-pilot-metrics > span:first-child { border-left: 0; }
  .crm-example-list { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; border-top: 0; }
}

@media (min-width: 760px) {
  .employees-heading h1 { font-size: 28px; }
  .employee-row { min-height: 76px; grid-template-columns: 42px minmax(0, 1fr) auto; padding-inline: 18px; }
  .employee-avatar { width: 42px; height: 42px; }
  .knowledge-heading h1 { font-size: 28px; }
  .knowledge-row { min-height: 94px; padding-inline: 18px; }
}

@media (min-width: 1020px) {
  [data-screen="employees"] { max-width: 1040px; margin: 0 auto; }
  [data-screen="knowledge"] { max-width: 1120px; margin: 0 auto; }
  .access-role-note { grid-template-columns: 220px minmax(0, 1fr); align-items: center; }
  .employee-row { grid-template-columns: 44px minmax(0, 1fr) 100px; }
  .employee-main { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(260px, 1.3fr) 130px; align-items: center; gap: 20px; }
  .employee-name-line { align-self: center; }
  .employee-meta { font-size: 12px; }
  .employee-activity { font-size: 11px; }
  .employee-edit { justify-self: end; }
  .employee-owner-mark { justify-self: end; }
  .knowledge-upload-sheet { width: min(560px, calc(100vw - 48px)); }
}

@media (max-width: 480px) {
  .bottom-nav button { font-size: 10px; }
  .knowledge-heading { align-items: flex-start; }
  .knowledge-heading > div > span { max-width: 210px; }
  .knowledge-add { min-width: 42px; width: 42px; height: 42px; padding: 0; font-size: 0; }
  .knowledge-add svg { width: 19px; height: 19px; }
  .knowledge-row { grid-template-columns: 42px minmax(0, 1fr); align-items: start; gap: 10px; }
  .knowledge-file-type { width: 42px; height: 50px; }
  .knowledge-title-line { align-items: flex-start; flex-direction: column; gap: 5px; }
  .knowledge-title-line strong { width: 100%; white-space: normal; }
  .knowledge-actions { grid-column: 2; justify-content: flex-end; margin-top: -2px; }
}

@media (min-width: 760px) {
  .improvements-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1020px) {
  .desktop-overview > .category-performance-panel { margin-top: 12px; }
  .desktop-overview .category-performance-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .desktop-overview .category-performance-row { min-height: 76px; grid-template-columns: minmax(0, 1fr) 40px 62px 14px; border-top: 0; border-left: 1px solid var(--line); padding: 7px 0 7px 16px; }
  .desktop-overview .category-performance-row:first-child { border-left: 0; padding-left: 0; }
  .desktop-overview .category-performance-score { display: block; text-align: right; }
  .improvements-heading h1 { font-size: 26px; }
  .improvements-segment { width: 430px; }
  .improvements-segment button { font-size: 12px; }
  .improvements-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .improvement-card-body { min-height: 245px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.push-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; font-size: 15px; cursor: pointer; }
.push-toggle input { appearance: none; position: relative; width: 44px; height: 26px; flex: 0 0 44px; border: 1px solid #73877d; border-radius: 14px; background: #78877f; cursor: pointer; }
.push-toggle input::before { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; }
.push-toggle input:checked { background: #147d5b; border-color: #147d5b; }
.push-toggle input:checked::before { transform: translateX(18px); }
.push-toggle input:disabled { opacity: 0.5; cursor: default; }
.push-toggle input:focus-visible { outline: 2px solid #2b8cbc; outline-offset: 3px; }
.push-status { font-size: 14px; line-height: 1.5; margin: 8px 0 14px; overflow-wrap: anywhere; }
.push-schedule { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 0; margin: 12px 0; border: 0; min-width: 0; }
.push-schedule label { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 14px; }
.push-schedule input, .push-schedule select { width: 100%; min-width: 0; height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); font: inherit; font-size: 16px; box-sizing: border-box; color-scheme: light; }
[data-theme="dark"] .push-schedule input, [data-theme="dark"] .push-schedule select { color-scheme: dark; }
.push-schedule:disabled { opacity: 0.55; }

.studio-admin-dialog { width:min(640px,calc(100vw - 32px)); max-height:90dvh; overflow:auto; border:1px solid #e2e6ed; border-radius:20px; padding:24px; color:#202b42; background:#fff; font:inherit; }
.studio-admin-dialog::backdrop { background:rgb(23 34 54 / 42%); }
.studio-admin-dialog label { display:grid; gap:7px; font-size:14px; margin:12px 0; }
.studio-admin-dialog input,.studio-admin-dialog select,.studio-admin-dialog textarea { width:100%; min-width:0; padding:10px; border:1px solid #c7d1df; border-radius:9px; background:#fff; color:inherit; font:inherit; box-sizing:border-box; }
.studio-admin-dialog input:focus-visible,.studio-admin-dialog select:focus-visible,.studio-admin-dialog button:focus-visible { outline:3px solid #799bc9; outline-offset:2px; }
.studio-admin-dialog button { cursor:pointer; min-height:42px; }
.studio-admin-dialog button:disabled { opacity:.6; cursor:wait; }
.studio-admin-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 16px; }
.studio-admin-dialog .studio-admin-check { display:flex; align-items:center; }
.studio-admin-check input { width:20px; height:20px; }
.studio-admin-hint { font-size:13px; color:#526078; }
.studio-admin-connect { border-top:1px solid #e2e6ed; margin-top:24px; padding-top:12px; }
.studio-admin-connect button { margin:4px 4px 4px 0; }
.studio-admin-dialog textarea { min-height:110px; overflow-wrap:anywhere; }
.studio-admin-dialog [data-message] { color:#8c3434; }
@media(max-width:540px) { .studio-admin-grid { grid-template-columns:1fr; } .studio-admin-dialog { padding:16px; } }

.studio-setup-steps { padding-left:24px; }
.studio-setup-steps > li { padding:12px 0 16px 6px; border-bottom:1px solid #e2e6ed; }
.studio-setup-steps p { font-size:14px; line-height:1.55; }
.studio-setup-steps a { display:inline-block; padding:12px 16px; text-decoration:none; }
.studio-setup-steps a:focus-visible { outline:3px solid #799bc9; outline-offset:2px; }
.studio-admin-dialog .primary-button { background:#304e78; color:#fff; border:1px solid #304e78; border-radius:10px; padding:10px 16px; }
.studio-admin-dialog .secondary-button { background:#f1f4f8; color:#233c5d; border:1px solid #c9d3e0; border-radius:10px; padding:10px 14px; }
.studio-admin-dialog details { margin-top:16px; font-size:14px; line-height:1.55; }

.technical-events { margin-top:20px; border-top:1px solid var(--border, #53606a); padding-top:16px; }
.technical-events p { line-height:1.5; }
.technical-incident { border-left:3px solid #d8a34e; padding:10px 14px; margin:10px 0; background:rgba(216,163,78,.08); border-radius:4px; }
.technical-events details { padding:12px 0; }
.technical-events summary { cursor:pointer; font-weight:600; }
.technical-note { font-size:12px; opacity:.8; }

#notifications-button { position: relative; flex-shrink: 0; }
#notifications-count { position: absolute; top: 0; right: 0; min-width: 15px; border-radius: 8px; padding: 1px 3px; background: #9c3b29; color: white; font: 10px/1.3 sans-serif; }

/* Studio management entry points; preserve existing analytics rows. */
.studio-management-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:0 16px 12px; }
.studio-management-actions .studio-status-button { margin:0; }
.studio-manage-button { min-height:40px; margin-left:auto; }
.studio-connection-help { font-size:13px; line-height:1.5; color:var(--muted); max-width:680px; }
[data-screen="studios"] .screen-heading { flex-wrap:wrap; gap:12px; }
@media(max-width:600px) { .studio-management-actions { padding:0 12px 12px; } }

.studio-admin-dialog { background:var(--surface); color:var(--ink); border:1px solid var(--line); max-height:calc(100dvh - 32px); overflow-y:auto; }
.studio-admin-dialog input,.studio-admin-dialog select,.studio-admin-dialog textarea { background:var(--surface-soft); color:var(--ink); border-color:var(--line-strong); }
.studio-admin-dialog .primary-button { background:var(--green); border-color:var(--green); color:white; }
.studio-admin-dialog .secondary-button { background:var(--surface-soft); color:var(--ink); border-color:var(--line); }
.studio-admin-hint { color:var(--muted); }
.studio-admin-dialog h3 { margin-top:20px; }
.studio-admin-dialog::backdrop { background:rgba(0,0,0,.45); }

[data-studio-admin-launch],.studio-manage-button { border:1px solid var(--line-strong); border-radius:10px; padding:10px 16px; background:var(--surface); color:var(--ink); font:inherit; font-size:14px; font-weight:600; cursor:pointer; min-height:42px; }
[data-studio-admin-launch]:hover,.studio-manage-button:hover { background:var(--surface-green); }
[data-studio-admin-launch]:focus-visible,.studio-manage-button:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
.studio-admin-dialog summary { cursor:pointer; font-weight:600; padding:8px 0; }
.studio-admin-dialog button[data-close] { border:1px solid var(--line); border-radius:10px; background:var(--surface-soft); color:var(--ink); min-width:42px; }

/* Compact per-address delivery details. */
.studio-delivery[hidden] { display:none; }
.studio-delivery { margin:0 16px 16px; padding:16px; border:1px solid var(--line); border-radius:12px; }
.studio-delivery-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.studio-delivery-heading label { display:flex; align-items:center; flex-wrap:wrap; gap:12px; font-weight:600; }
.studio-delivery input { font:inherit; color:inherit; color-scheme:light dark; background:transparent; border:1px solid var(--line); padding:8px; border-radius:8px; max-width:100%; }
.studio-delivery dl { margin:16px 0 0; display:grid; gap:10px; }
.studio-delivery dl div { display:flex; justify-content:space-between; gap:16px; }
.studio-delivery dt { color:var(--muted); }
.studio-delivery dd { margin:0; text-align:right; }
.studio-delivery-note { margin:14px 0 0; font-size:12px; color:var(--muted); }
@media(max-width:600px) { .studio-delivery { margin:0 12px 12px; padding:12px; } .studio-delivery dl div { display:block; } .studio-delivery dd { text-align:left; margin-top:3px; } }

.studio-company-filter { display:flex; align-items:center; gap:12px; margin:12px 0; }
.studio-company-filter[hidden] { display:none; }
.studio-company-filter select { font:inherit; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:8px; max-width:75%; }
.studio-company-heading { margin:0; padding:14px 20px; background:var(--surface-soft); font-size:15px; }
.studio-history-day { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-top:1px solid var(--line); }
.studio-history-day small { display:block; color:var(--muted); margin-top:4px; }
.studio-delivery-analysis { margin-top:20px; padding-top:12px; border-top:1px solid var(--line); }
.studio-delivery-analysis h3 { font-size:15px; }
span.studio-status-button { cursor:default; }
span.studio-status-button:hover { text-decoration:none; }

/* One disclosure control per studio card. */
.desktop-studio-summary, .mobile-studio-summary { cursor: default; }
[data-delivery-label] { display: inline-flex; align-items: center; gap: 6px; }
[data-delivery-label] svg { width: 16px; height: 16px; }
[data-delivery-label][aria-expanded="true"] svg { transform: rotate(90deg); }
