@charset "UTF-8";
@import url("./theme.css");
:root {
  font-size: 14px;
  line-height: 1.65;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  border: 1px solid var(--border);
  background: var(--raised);
  padding: 9px 15px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
  line-height: 1.5;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
button:hover:not(:disabled),
.button:hover {
  background: color-mix(in srgb, var(--blue) 14%, var(--raised));
  border-color: var(--blue);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  box-shadow: 0 4px 14px #3976cd25;
}
.primary:hover:not(:disabled) {
  background: #397ce1;
}
.ghost {
  background: transparent;
  color: var(--blue);
}
a {
  color: var(--blue);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
input,
select {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  padding: 6px 9px;
}
input[type="checkbox"] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  margin: 0;
  flex: none;
}
input[type="number"] {
  width: 140px;
}
input:focus,
select:focus {
  outline: 2px solid color-mix(in srgb, var(--blue) 50%, transparent);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 24px;
  letter-spacing: -0.6px;
}
h2 {
  font-size: 16px;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 15px;
}
small,
.hint,
.muted {
  font-size: 12px;
  color: var(--muted);
}
.hint {
  margin-top: 10px;
  line-height: 1.7;
}
.text-button {
  padding: 0;
  background: none;
  border: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
}
.text-button:hover {
  background: none !important;
  text-decoration: underline;
}
.shell {
  max-width: 1180px;
  width: calc(100% - 48px);
  margin: 28px auto;
}
.panel {
  background: color-mix(in srgb, var(--panel) 97%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.hero {
  padding: 24px 26px;
}
.heading,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.brand-icon {
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  font-size: 24px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 0 20px #4d92ff25;
}
.badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 9px;
  white-space: nowrap;
}
.theme-control {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.theme-control select {
  background: var(--raised);
  padding: 3px 8px;
  border-radius: 20px;
}
.hero > p {
  color: var(--muted);
  margin: 14px 0 18px;
  line-height: 1.8;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.hero-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 11px;
  color: var(--muted);
  gap: 10px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  margin-right: 5px;
  vertical-align: middle;
}
.dot.green {
  background: var(--green);
}
.monitor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.monitor-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.preview {
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 20%, #22385077, transparent 75%),
    var(--panel);
  position: relative;
  min-height: 340px;
}
.preview-caption {
  display: flex;
  justify-content: space-between;
  padding: 17px 20px;
  font-size: 11px;
  color: var(--muted);
}
.preview.live {
  width: min(
    100%,
    calc(clamp(150px, 100dvh - 500px, 720px) * var(--preview-ratio, 1.7778))
  );
  min-height: 0;
  justify-self: center;
}
.preview.live .preview-caption {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 8px;
  right: 8px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #0e141cb8;
  color: #e6edf6;
  font-size: 10px;
  pointer-events: none;
}
#placeholder {
  min-height: 285px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 10px 24px 32px;
}
#placeholder p {
  font-size: 13px;
  color: var(--muted);
}
#placeholder small {
  font-size: 11px;
}
.monitor-glyph {
  font-size: 38px;
  color: var(--blue);
  line-height: 1.2;
  margin-bottom: 6px;
}
.preview canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: auto;
}
#previewOff {
  height: 280px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.session {
  display: grid;
  grid-template-columns: 1fr 0.85fr 1.25fr;
  padding: 15px 18px;
}
.session > div {
  padding-left: 15px;
  border-left: 1px solid var(--border);
}
.session > div:first-child {
  padding-left: 0;
  border: 0;
}
.label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 3px;
}
.session strong {
  font-size: 18px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.session > div:last-child strong {
  font-size: 14px;
}
.overview {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
}
.overview .panel {
  padding: 17px;
}
.section-head {
  margin-bottom: 14px;
}
.section-head .muted {
  font-size: 10px;
}
.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  min-height: 156px;
  text-align: center;
}
.empty > span {
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 19px;
  color: var(--green);
}
.empty b {
  font-size: 13px;
}
.empty small {
  font-size: 11px;
}
#log {
  height: 165px;
  overflow: auto;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  overflow-wrap: anywhere;
}
#log > div {
  padding: 3px 0;
  border-bottom: 1px solid #8995a010;
}
#alerts {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}
#alerts li {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
#alerts small {
  display: block;
  font-size: 10px;
}
.control-panel {
  padding: 20px;
}
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.status-grid > div {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 11px;
  border-radius: 8px;
  min-height: 65px;
  overflow-wrap: anywhere;
}
.status-grid strong {
  font-size: 12px;
  font-weight: 600;
}
.status-grid .status-wide {
  grid-column: 1 / -1;
}
.status-grid > div:has(.bad) {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 9%, var(--bg));
}
.warning {
  color: var(--amber);
}
.options {
  display: grid;
  gap: 13px;
  margin: 21px 0 16px;
}
.options label,
.detail-body > label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.inline-between {
  justify-content: space-between;
}
.options select {
  font-size: 11px;
  padding: 4px 8px;
}
.control-panel details {
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 12px 0;
  list-style: none;
}
summary::before {
  content: "›";
  margin-right: 9px;
  color: var(--muted);
  display: inline-block;
}
details[open] > summary::before {
  transform: rotate(90deg);
}
.detail-body {
  padding-bottom: 10px;
}
.detail-body button {
  font-size: 11px;
  padding: 6px 9px;
}
.detail-body select {
  max-width: 200px;
  font-size: 11px;
}
.thresholds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}
.thresholds label {
  font-size: 10px;
  color: var(--muted);
}
.thresholds input {
  display: block;
  width: 100%;
  margin-top: 4px;
  font-size: 12px;
}
.bad {
  color: var(--red) !important;
}
.good {
  color: var(--green) !important;
}
.warn {
  color: var(--amber) !important;
}
.screen {
  scroll-margin-top: 20px;
}
.experience {
  margin-top: 36px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--blue);
  font-weight: 700;
}
.experience h1 {
  margin-top: 3px;
}
.goal-row {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 17px;
  font-size: 12px;
}
.goal-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
}
.goal-row input {
  width: 220px;
}
.goal-row button {
  font-size: 12px;
}
.goal-row #goalStatus {
  padding: 7px 0;
  color: var(--muted);
}
.goal-row .text-button {
  margin-left: auto;
  padding: 8px 0;
}
.divider {
  margin: 0 12px;
  color: var(--border);
}
progress {
  width: 100%;
  height: 7px;
  margin-top: 15px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  accent-color: var(--green);
}
progress::-webkit-progress-bar {
  background: var(--raised);
}
progress::-webkit-progress-value {
  background: var(--green);
}
.xp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.xp-cards .panel {
  padding: 17px 20px;
}
.xp-cards strong {
  display: block;
  font-size: 24px;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.xp-cards .label {
  font-size: 12px;
}
.accent-card {
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
}
.accent-card strong {
  color: var(--green);
}
.chart-panel {
  margin-top: 16px;
}
.chart-key {
  font-size: 11px;
  color: var(--muted);
}
#chart {
  width: 100%;
  height: 250px;
  display: block;
}
.chart-panel details {
  border-top: 1px solid var(--border);
  margin-top: 14px;
}
.chart-panel details p {
  margin: 0 0 10px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 25px 4px;
  font-size: 11px;
  color: var(--muted);
}
footer a {
  text-decoration: none;
}
dialog {
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: min(960px, 95vw);
  width: 880px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 30px 100px #0009;
}
dialog::backdrop {
  background: #000a;
  backdrop-filter: blur(5px);
}
dialog .section-head > button {
  padding: 4px 10px;
}
dialog canvas {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 15px auto;
  border-radius: 6px;
}
#selectionCanvas {
  cursor: crosshair;
  touch-action: none;
}
dialog#soundDialog {
  width: 450px;
}
.ocr-crop {
  max-height: 180px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
}
.ocr-crop canvas {
  max-width: none;
  margin: 0;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--raised);
  border: 1px solid var(--blue);
  border-radius: 10px;
  padding: 12px 22px;
  max-width: 90vw;
  box-shadow: 0 10px 35px #0006;
  font-size: 13px;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1450px) {
  .shell {
    margin-top: 36px;
  }
}
@media (max-width: 1000px) {
  .monitor-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .overview {
    grid-template-columns: 1fr;
  }
  .brand .badge {
    display: none;
  }
  .shell {
    width: calc(100% - 32px);
  }
  .hero {
    padding: 21px;
  }
  .toolbar {
    gap: 7px;
  }
  .toolbar button,
  .toolbar .button {
    font-size: 12px;
    padding: 9px 12px;
  }
}
@media (max-width: 760px) {
  .preview.live {
    width: 100%;
  }
  .monitor-grid {
    grid-template-columns: 1fr;
  }
  .shell {
    margin: 16px auto;
  }
  .heading {
    align-items: start;
  }
  h1 {
    font-size: 21px;
  }
  .brand {
    gap: 8px;
  }
  .brand-icon {
    width: 29px;
    height: 29px;
    font-size: 21px;
  }
  .theme-control {
    font-size: 10px;
    gap: 4px;
  }
  .theme-control select {
    max-width: 85px;
  }
  .hero {
    padding: 18px;
  }
  .hero > p {
    font-size: 13px;
  }
  .hero-foot {
    align-items: start;
  }
  .hero-foot .text-button {
    font-size: 10px;
  }
  .overview {
    grid-template-columns: 1fr 1fr;
  }
  .preview {
    min-height: 290px;
  }
  #placeholder {
    min-height: 245px;
  }
  .xp-cards {
    grid-template-columns: 1fr 1fr;
  }
  .xp-cards strong {
    font-size: 20px;
  }
  .goal-row {
    gap: 10px;
  }
  .goal-row input {
    width: 180px;
  }
  .goal-row .text-button {
    margin: 0;
  }
  .desktop-only {
    display: none;
  }
  .experience {
    margin-top: 26px;
  }
  footer {
    flex-wrap: wrap;
  }
  footer > span:nth-child(2) {
    display: none;
  }
  .theme-control select {
    padding: 4px;
  }
  .hero .toolbar .button {
    padding: 7px 10px;
  }
  .status-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .control-panel .options {
    grid-template-columns: 1fr 1fr;
  }
  .control-panel .options label {
    font-size: 11px;
  }
  .chart-panel {
    padding: 15px;
  }
  #chart {
    height: 210px;
  }
}
@media (max-width: 440px) {
  .overview {
    grid-template-columns: 1fr;
  }
  .status-grid {
    grid-template-columns: 1fr 1fr;
  }
  .control-panel .options {
    grid-template-columns: 1fr;
  }
  .hero .toolbar button {
    padding: 9px 10px;
  }
  .hero .toolbar #start {
    flex-grow: 1;
  }
  .hero .brand h1 {
    font-size: 19px;
  }
  .theme-control > select {
    font-size: 10px;
  }
  .theme-control {
    font-size: 0;
  }
  .session strong {
    font-size: 16px;
  }
  .xp-cards .panel {
    padding: 13px;
  }
  .xp-cards strong {
    font-size: 18px;
  }
  .xp-cards .label {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
