﻿:root {
  color-scheme: light;
  font-family: "Leelawadee UI", "Noto Sans Thai", Tahoma, Arial, sans-serif;
  --graphite-950: #151a1f;
  --graphite-900: #1d2329;
  --graphite-850: #252c33;
  --graphite-800: #2d353d;
  --ink-950: #18212b;
  --ink-700: #495563;
  --ink-500: #596674;
  --ink: #18212b;
  --queue-muted: #b3bec7;
  --paper: #f4f1e9;
  --paper-raised: #fcfaf5;
  --paper-deep: #e8e3d8;
  --proof: #e8f0f3;
  --proof-deep: #d8e4e9;
  --line: #d3cec2;
  --line-strong: #b9b3a7;
  --blue: #205cca;
  --blue-dark: #17479e;
  --blue-soft: #dce8ff;
  --green: #247355;
  --green-soft: #dcefe6;
  --amber: #a65f12;
  --amber-soft: #f7e7cc;
  --red: #aa3f3f;
  --red-soft: #f6dddd;
  --slate-soft: #e2e7eb;
  --shadow-drawer: -18px 0 48px rgba(18, 27, 35, 0.2);
  --radius-control: 6px;
  --topbar-height: 68px;
  --bottom-nav-height: 0px;
}

* {
  box-sizing: border-box;
}

::selection {
  color: #fff;
  background: var(--blue);
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  color: var(--ink-950);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.55;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

input,
textarea {
  caret-color: var(--blue);
}

input::placeholder,
textarea::placeholder {
  color: #66717b;
  opacity: 1;
}

button,
select,
input[type="checkbox"] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

button,
input,
textarea,
select,
summary {
  outline: none;
}

:focus-visible {
  outline: 3px solid rgba(32, 92, 202, 0.34);
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  border-color: var(--blue) !important;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
strong {
  font-weight: 700;
}

code,
pre {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.button,
.icon-button,
.text-button {
  border: 0;
  background: none;
}

.button {
  min-height: 42px;
  padding: 0.62rem 1rem;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 700;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button-compact {
  min-height: 36px;
  padding: 0.42rem 0.72rem;
  font-size: 0.82rem;
}

.button-primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.button-primary:hover:not(:disabled) {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.button-quiet {
  color: var(--ink-700);
  background: rgba(255, 255, 255, 0.48);
  border-color: var(--line);
}

.button-quiet:hover:not(:disabled) {
  color: var(--ink-950);
  background: #fff;
  border-color: var(--line-strong);
}

.button-warning {
  color: #fff;
  background: var(--amber);
  border-color: var(--amber);
}

.button-warning:hover:not(:disabled) {
  background: #834809;
}

.button-danger {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.button-danger-quiet {
  color: var(--red);
  background: transparent;
  border-color: rgba(170, 63, 63, 0.32);
}

.button-danger-quiet:hover:not(:disabled) {
  background: var(--red-soft);
}

.icon-button {
  min-width: 38px;
  min-height: 38px;
  padding: 0.35rem 0.55rem;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.76;
}

.icon-button:hover {
  opacity: 1;
}

.text-button {
  padding: 0.2rem;
  color: var(--blue-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Login */
.alert {
  padding: 0.7rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.45;
}

.alert-error {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(170, 63, 63, 0.35);
}

.login-page {
  min-height: 100vh;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(2rem, 6vh, 4rem);
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem);
  color: var(--paper);
  background:
    radial-gradient(1100px 520px at 50% -12%, rgba(92, 143, 240, 0.13), transparent 62%),
    var(--graphite-950);
}

.login-intro {
  max-width: 460px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-signal {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6ea2ff;
  box-shadow: 0 0 0 4px rgba(110, 162, 255, 0.2);
}

.login-intro h1 {
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1.2;
}

.login-intro > p {
  margin: 0 0 1.5rem;
  color: rgba(244, 241, 233, 0.72);
}

.login-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.login-promises > div {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(244, 241, 233, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.login-promises dt {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 233, 0.5);
  font-weight: 700;
}

.login-promises dd {
  margin: 0;
  color: var(--paper);
  font-weight: 700;
}

.login-panel {
  width: min(100%, 420px);
  padding: clamp(1.75rem, 5vw, 2.25rem);
  color: var(--ink-950);
  background: var(--paper-raised);
  border-top: 5px solid var(--blue);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.login-panel h2 {
  margin: 0 0 0.3rem;
  font-size: 1.35rem;
}

.login-panel .supporting {
  margin: 0 0 1.4rem;
  color: var(--ink-700);
}

.login-panel form {
  display: grid;
  gap: 1rem;
}

.button-block {
  width: 100%;
}

.security-note {
  margin: 1.1rem 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-700);
}

@media (min-width: 960px) {
  .login-shell {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    column-gap: clamp(3rem, 6vw, 6rem);
  }
}

.field {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
}

.field input,
.field-block input,
.field-block textarea,
.select-field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
}

.field input {
  min-height: 48px;
  padding: 0.7rem 0.8rem;
}

.login-card .button {
  width: 100%;
  margin-top: 0.35rem;
}

.error-banner {
  margin-bottom: 1rem;
  padding: 0.75rem 0.85rem;
  color: #722d2d;
  background: var(--red-soft);
  border: 1px solid rgba(170, 63, 63, 0.46);
  border-top: 3px solid var(--red);
}

/* Application frame */
.admin-body {
  height: 100%;
  overflow: hidden;
}

.app-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto var(--topbar-height) minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  position: relative;
  z-index: 30;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(260px, 1fr);
  align-items: stretch;
  color: #fff;
  background: var(--graphite-950);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-block {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.15rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--blue);
  border-radius: 5px;
  font: 800 0.76rem/1 "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0.08em;
}

.brand-copy {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 0.25rem;
  color: #aab5bf;
  font: 700 0.7rem/1 "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0.13em;
}

.primary-nav {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
}

.nav-tab {
  position: relative;
  min-width: 106px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 0.9rem;
  color: #9facb7;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 700;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab.is-active {
  color: #fff;
  border-bottom-color: #5c8ff0;
}

.topbar-status {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  padding: 0 1.1rem;
}

.runtime-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.runtime-summary > span:last-child {
  min-width: 0;
  display: grid;
  line-height: 1.2;
}

.runtime-summary strong,
.runtime-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-summary strong {
  font-size: 0.77rem;
}

.runtime-summary small {
  margin-top: 0.18rem;
  color: #9facb7;
  font-size: 0.67rem;
}

.status-light {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  background: #7f8b95;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(127, 139, 149, 0.12);
}

.status-light.is-ready {
  background: #5bc48f;
  box-shadow: 0 0 0 4px rgba(91, 196, 143, 0.13);
}

.status-light.is-attention {
  background: #f0aa52;
  box-shadow: 0 0 0 4px rgba(240, 170, 82, 0.13);
}

.status-light.is-loading {
  animation: pulse 1.5s infinite;
}

.topbar .button-quiet {
  color: #d8dfe4;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.17);
}

.topbar .icon-button {
  color: #aab5bf;
}

.proof-toggle {
  display: none;
}

.global-notice {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  top: calc(var(--topbar-height) + 12px);
  left: 50%;
  width: min(560px, calc(100vw - 24px));
  padding: 0.72rem 1rem;
  color: #fff;
  background: var(--graphite-850);
  border: 1px solid #55616b;
  border-top: 3px solid var(--blue);
  box-shadow: 0 12px 34px rgba(21, 26, 31, 0.25);
  transform: translateX(-50%);
}

.global-notice.is-error {
  border-top-color: #e66a6a;
}

.global-notice.is-success {
  border-top-color: #5bc48f;
}

.app-main,
.page-view {
  min-width: 0;
  min-height: 0;
}

.app-main {
  position: relative;
  /* Only the inner panes scroll; the frame must not become a programmatic scrollport. */
  overflow: clip;
}

.page-view.is-active {
  height: 100%;
}

.schedule-workspace {
  display: grid;
  grid-template-columns: minmax(286px, 316px) minmax(510px, 1fr) minmax(330px, 378px);
  overflow: hidden;
}

/* Schedule queue */
.queue-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: #edf1f4;
  background: var(--graphite-900);
  border-right: 1px solid #0f1317;
}

.pane-heading,
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.queue-heading {
  min-height: 88px;
  padding: 1rem 1rem 0.8rem 1.15rem;
}

.queue-heading h1 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.1;
}

.count-label {
  margin-left: 0.25rem;
  color: #83909b;
  font: 700 0.72rem/1 "Cascadia Mono", Consolas, monospace;
}

.queue-tools {
  padding: 0 0.8rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-box {
  height: 39px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.7rem;
  color: #9aa7b2;
  background: var(--graphite-850);
  border: 1px solid #39424a;
  border-radius: 6px;
  font-size: 0.69rem;
  font-weight: 700;
}

.search-box:focus-within {
  border-color: #668fe1;
}

.search-box input {
  min-width: 0;
  width: 100%;
  height: 100%;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 0.82rem;
}

.search-box input::placeholder {
  color: #788590;
}

.segmented-filter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 0.6rem;
  padding: 2px;
  background: #151a1f;
  border-radius: 5px;
}

.segmented-filter button {
  min-height: 31px;
  padding: 0.25rem 0.35rem;
  color: #91a0ab;
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
}

.segmented-filter button:hover {
  color: #fff;
}

.segmented-filter button.is-active {
  color: #fff;
  background: var(--graphite-800);
  box-shadow: inset 0 0 0 1px #43505b;
}

.schedule-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #48545e transparent;
}

.schedule-row {
  position: relative;
  width: 100%;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.schedule-row-select {
  width: 100%;
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 0.9rem 0.85rem 1.15rem;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}

.schedule-row:hover,
.schedule-row:focus-within {
  background: rgba(255, 255, 255, 0.035);
}

.schedule-row.is-selected {
  background: #29333c;
  box-shadow: inset 0 0 0 1px #527ac3;
}

.schedule-row.is-dragging {
  opacity: 0.62;
  border: 1px solid #85aef7;
  box-shadow: 0 0 0 1px rgba(133, 174, 247, 0.4);
}

.schedule-row-top,
.schedule-row-meta,
.schedule-row-foot {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.schedule-row-name {
  overflow: hidden;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-state {
  flex: 0 0 auto;
  color: #a7b2bb;
  font-size: 0.66rem;
}

.schedule-state::before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 0.3rem;
  vertical-align: 1px;
  background: #72808b;
  border-radius: 50%;
}

.schedule-state.is-enabled::before {
  background: #55bb87;
}

.schedule-state.is-attention {
  color: #efb76f;
}

.schedule-state.is-attention::before {
  background: #e09a47;
}

.schedule-row-meta,
.schedule-row-foot {
  color: #93a0aa;
  font-size: 0.7rem;
}

.schedule-row-meta span,
.schedule-row-foot span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-row-foot {
  color: #6f7d88;
  padding-right: 6.5rem;
}

.schedule-row-actions {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  display: flex;
  gap: 0.28rem;
}

.schedule-quick-toggle,
.schedule-row-delete {
  min-width: 38px;
  min-height: 28px;
  padding: 0.2rem 0.42rem;
  color: #aeb9c1;
  background: #252d34;
  border: 1px solid #46515a;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
}

.schedule-quick-toggle:hover:not(:disabled) {
  color: #fff;
  border-color: #71808c;
}

.schedule-row-delete:hover:not(:disabled) {
  color: #f3d0d0;
  border-color: #8a4d4d;
}

.inline-warning {
  margin: 0.65rem;
  padding: 0.55rem 0.65rem;
  color: #6f4717;
  background: var(--amber-soft);
  border: 1px solid rgba(166, 95, 18, 0.42);
  font-size: 0.75rem;
}

.queue-pane .inline-warning {
  color: #f1cca0;
  background: #3b3024;
  border-color: rgba(216, 145, 63, 0.48);
}

.empty-state {
  align-self: center;
  padding: 2rem 1.35rem;
  color: var(--ink-700);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink-950);
}

.empty-state p {
  margin: 0;
  font-size: 0.8rem;
}

.queue-pane .empty-state,
.queue-pane .empty-state strong {
  color: #93a0aa;
}

/* Editor */
.editor-pane {
  min-width: 0;
  min-height: 0;
  background: var(--paper);
  border-right: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editor-empty {
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-content: center;
  justify-items: start;
  max-width: 440px;
  margin: auto;
  padding: 2rem;
}

.editor-empty-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 1.5rem;
  color: var(--blue);
  border: 2px solid var(--blue);
  font: 800 0.9rem/1 "Cascadia Mono", Consolas, monospace;
}

.editor-empty h2 {
  margin-bottom: 0.45rem;
  font-size: 1.55rem;
  line-height: 1.25;
}

.editor-empty > p {
  margin-bottom: 1.5rem;
  color: var(--ink-700);
}

.schedule-form {
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.editor-scroll {
  scroll-padding-top: 100px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #aaa59a transparent;
}

.editor-toolbar {
  position: sticky;
  z-index: 6;
  top: 0;
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.15rem 0.8rem 1.35rem;
  background: rgba(244, 241, 233, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.editor-title-group {
  min-width: 0;
  flex: 1;
}

.editor-title-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.editor-title-line h2 {
  max-width: 100%;
  overflow: hidden;
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dirty-badge {
  flex: 0 0 auto;
  padding: 0.15rem 0.4rem;
  color: #74460d;
  background: var(--amber-soft);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.editor-mode-label {
  flex: 0 0 auto;
  color: var(--ink-500);
  font-size: 0.67rem;
  font-weight: 700;
}

.editor-tools {
  display: flex;
  gap: 0.4rem;
}

.mobile-back {
  display: none;
}

.conflict-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 1.35rem 0;
  padding: 0.8rem 0.9rem;
  color: #654116;
  background: var(--amber-soft);
  border: 1px solid rgba(166, 95, 18, 0.48);
  border-top: 3px solid var(--amber);
}

.conflict-banner strong,
.conflict-banner p {
  display: block;
}

.conflict-banner p {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
}

.form-error-summary {
  margin: 1rem 1.35rem 0;
  padding: 0.75rem 0.85rem;
  color: #742f2f;
  background: var(--red-soft);
  border: 1px solid rgba(170, 63, 63, 0.46);
  border-top: 3px solid var(--red);
  font-size: 0.82rem;
}

.editor-section {
  display: block;
  padding: 1.35rem 1.35rem 1.45rem;
  border-bottom: 1px solid var(--line);
}

.section-body {
  min-width: 0;
}

.section-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h3 {
  margin-bottom: 0.15rem;
  font-size: 0.96rem;
}

.section-heading p {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.73rem;
}

.section-stat {
  color: var(--ink-500);
  font-size: 0.72rem;
  font-weight: 700;
}

.field-block {
  display: grid;
  gap: 0.38rem;
}

.field-label {
  color: var(--ink-700);
  font-size: 0.75rem;
  font-weight: 700;
}

.field-block input,
.field-block textarea,
.select-field select {
  padding: 0.65rem 0.72rem;
}

.field-block input {
  min-height: 42px;
}

.field-block textarea {
  min-height: 270px;
  resize: vertical;
  line-height: 1.72;
  tab-size: 2;
}

.field-block input[aria-invalid="true"],
.field-block textarea[aria-invalid="true"] {
  border-color: var(--red);
  background: #fffafa;
}

.field-error {
  min-height: 0;
  color: var(--red);
  font-size: 0.7rem;
  font-weight: 600;
}

.field-error:empty {
  display: none;
}

.field-hint {
  display: block;
  color: var(--ink-500);
  font-size: 0.7rem;
  margin-top: 0.15rem;
}

.toggle-control {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink-700);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.toggle-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  width: 38px;
  height: 21px;
  background: #a9afb4;
  border-radius: 20px;
  transition: background 140ms ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 140ms ease;
}

.toggle-control input:checked + .toggle-track {
  background: var(--green);
}

.toggle-control input:checked + .toggle-track::after {
  transform: translateX(17px);
}

.toggle-control input:focus-visible + .toggle-track {
  outline: 3px solid rgba(32, 92, 202, 0.34);
  outline-offset: 2px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(40px, 1fr));
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.weekday-quick {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.weekday-quick button {
  flex: 1;
  min-height: 32px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-700);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.6rem;
}

.weekday-quick button:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.weekday-grid button,
.target-option {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.target-option {
  font: inherit;
  color: inherit;
  text-align: left;
}

.weekday-grid button {
  min-height: 38px;
  display: grid;
  place-items: center;
  color: var(--ink-700);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
}

.weekday-grid button[aria-pressed="true"] {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.weekday-grid button:focus-visible,
.target-option:focus-visible {
  outline: 3px solid rgba(32, 92, 202, 0.34);
  outline-offset: 2px;
}

.time-row {
  display: block;
  margin-top: 0.8rem;
}

.time-24h {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.time-slots {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.time-24h-inputs {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
}

.time-remove {
  min-width: 44px;
  min-height: 38px;
  margin-bottom: 1.05rem;
  color: var(--red);
  background: var(--paper-raised);
  border: 1px solid rgba(170, 63, 63, 0.45);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.time-part {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.time-part input {
  width: 92px;
  font: 700 1.55rem/1 "Cascadia Mono", Consolas, monospace;
  padding: 0.5rem 0.6rem;
  background: var(--paper-raised);
  border: 2px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink-950);
  text-align: center;
}

.time-part input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(32, 92, 202, 0.15);
}

.time-part-label {
  font-size: 0.68rem;
  color: var(--ink-500);
  text-align: center;
}

.time-colon {
  font: 700 1.6rem/1 "Cascadia Mono", Consolas, monospace;
  color: var(--ink-700);
  padding-bottom: 0.85rem;
}

.time-help {
  font-size: 0.72rem;
  color: var(--ink-500);
  margin-top: 0.15rem;
}

.timezone-note {
  font-size: 0.72rem;
  color: var(--ink-500);
  margin-top: 0.2rem;
}

.timezone-note strong {
  color: var(--ink-700);
  font-weight: 700;
}

.timing-summary {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--ink-700);
  font-weight: 600;
}

.target-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.target-option-row {
  min-width: 0;
  display: flex;
  gap: 0.35rem;
  align-items: stretch;
}

.target-option-row .target-option {
  flex: 1;
}

.target-remove {
  min-width: 52px;
  padding: 0 0.7rem;
  color: var(--red);
  background: var(--paper-raised);
  border: 1px solid rgba(170, 63, 63, 0.45);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.target-remove:hover:not(:disabled) {
  background: var(--red-soft);
}

.custom-target-entry {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.custom-target-entry label {
  min-width: 0;
  flex: 1;
}

.custom-target-entry input {
  width: 100%;
  min-height: 36px;
  padding: 0.42rem 0.62rem;
  background: rgba(255, 255, 255, 0.48);
  border: 1px dashed var(--line-strong);
  border-radius: 5px;
  font-size: 0.74rem;
}

.target-option {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  min-height: 58px;
  padding: 0.6rem 0.7rem;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.target-option[aria-pressed="true"] {
  background: var(--blue-soft);
  border-color: rgba(32, 92, 202, 0.5);
}

.target-check {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}

.target-check::after {
  content: "";
  width: 5px;
  height: 9px;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: translateY(-1px) rotate(45deg);
}

.target-option[aria-pressed="true"] .target-check {
  background: var(--blue);
  border-color: var(--blue);
}

.target-option[aria-pressed="true"] .target-check::after {
  border-color: #fff;
}

.target-copy {
  min-width: 0;
  display: grid;
  line-height: 1.3;
}

.target-copy strong,
.target-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-copy strong {
  font-size: 0.78rem;
}

.target-copy small {
  margin-top: 0.12rem;
  color: var(--ink-500);
  font: 600 0.62rem/1.3 "Cascadia Mono", Consolas, monospace;
}

.token-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.token-toolbar button {
  min-height: 44px;
  padding: 0.25rem 0.52rem;
  color: #35517d;
  background: #e5ebf4;
  border: 1px solid #c3cedd;
  border-radius: 4px;
  font-size: 0.67rem;
  font-weight: 700;
}

.token-toolbar button:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.textarea-meta {
  min-height: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-500);
  font-size: 0.68rem;
}

.token-guide {
  margin-top: 0.75rem;
  color: var(--ink-700);
  font-size: 0.72rem;
}

.token-guide summary {
  width: fit-content;
  color: var(--blue-dark);
  font-weight: 700;
  cursor: pointer;
}

.token-guide p {
  margin: 0.6rem 0 0;
  padding: 0.65rem 0.75rem;
  background: var(--paper-deep);
  border: 1px solid var(--line-strong);
}

.token-guide code {
  color: var(--blue-dark);
  font-size: 0.69rem;
}

.editor-footer {
  position: relative;
  z-index: 7;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--paper-raised);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -7px 20px rgba(24, 33, 43, 0.05);
}

.save-state {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-500);
  font-size: 0.72rem;
}

.save-state > span:first-child {
  width: 7px;
  height: 7px;
  background: #929ba3;
  border-radius: 50%;
}

.save-state.is-dirty > span:first-child {
  background: var(--amber);
}

.save-state.is-saving > span:first-child {
  background: var(--blue);
  animation: pulse 1.1s infinite;
}

.save-state.is-saved > span:first-child {
  background: var(--green);
}

.footer-actions {
  display: flex;
  gap: 0.5rem;
}

/* Telegram proof */
.proof-pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24) 25%, transparent 25%) 0 0 / 24px 24px,
    var(--proof);
}

.proof-heading {
  min-height: 81px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #c1d0d6;
}

.proof-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.proof-heading p {
  margin: 0.08rem 0 0;
  color: var(--ink-700);
  font-size: 0.68rem;
}

.close-proof {
  display: none;
}

.proof-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
}

.proof-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.status-chip,
.history-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 25px;
  padding: 0.2rem 0.48rem;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 800;
}

.status-chip.is-neutral,
.history-status.is-neutral {
  color: #53616b;
  background: var(--slate-soft);
}

.status-chip.is-ready,
.history-status.is-success {
  color: #1f644a;
  background: var(--green-soft);
}

.status-chip.is-attention,
.history-status.is-attention {
  color: #76440d;
  background: var(--amber-soft);
}

.status-chip.is-error,
.history-status.is-error {
  color: #762f2f;
  background: var(--red-soft);
}

.telegram-stage {
  min-height: 290px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem 0.75rem 1.2rem;
  background: #cbdde4;
  border: 1px solid #b6cbd3;
  border-radius: 7px;
  box-shadow: inset 0 0 50px rgba(76, 114, 130, 0.11);
}

.telegram-date {
  align-self: center;
  margin-bottom: 1rem;
  padding: 0.24rem 0.55rem;
  color: #fff;
  background: #4a5f6c;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
}

.telegram-bubble {
  position: relative;
  width: min(94%, 330px);
  padding: 0.72rem 0.78rem 1.25rem;
  background: #fff;
  border-radius: 12px 12px 12px 3px;
  box-shadow: 0 1px 2px rgba(36, 59, 70, 0.18);
}

.telegram-bubble::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: -7px;
  border-right: 8px solid #fff;
  border-top: 8px solid transparent;
}

.telegram-bubble pre {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.8rem;
  line-height: 1.55;
}

.telegram-time {
  position: absolute;
  right: 0.55rem;
  bottom: 0.35rem;
  color: #5c6a75;
  font-size: 0.7rem;
}

.proof-note {
  margin: 0.65rem 0 0;
  color: var(--ink-700);
  font-size: 0.68rem;
}

.proof-checks {
  margin: 0.85rem 0 0;
  padding: 0;
  border-top: 1px solid #bdcdd3;
}

.proof-checks > div {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.48rem 0;
  border-bottom: 1px solid #c6d5da;
  font-size: 0.69rem;
}

.proof-checks dt {
  color: var(--ink-700);
}

.proof-checks dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.proof-checks dd.is-ready {
  color: var(--green);
}

.proof-checks dd.is-attention {
  color: var(--amber);
}

.send-result {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #becfd6;
}

.send-result h3 {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.send-result p {
  margin-bottom: 0.6rem;
  color: #51636b;
  font-size: 0.72rem;
}

.send-result pre {
  max-height: 230px;
  overflow: auto;
  margin: 0.6rem 0;
  padding: 0.75rem;
  color: #25333b;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #becfd6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 0.75rem;
}

.result-list {
  display: grid;
  gap: 0.35rem;
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}

.result-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(81, 99, 107, 0.18);
  font-size: 0.7rem;
}

.result-list strong {
  text-align: right;
}

.proof-footer {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  background: rgba(238, 245, 247, 0.94);
  border-top: 1px solid #b8cbd2;
}

.proof-footer > div {
  min-width: 0;
  display: grid;
  line-height: 1.25;
}

.proof-footer strong {
  font-size: 0.75rem;
}

.proof-footer span {
  max-width: 180px;
  overflow: hidden;
  margin-top: 0.18rem;
  color: var(--ink-700);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-scrim {
  position: fixed;
  z-index: 39;
  inset: var(--topbar-height) 0 var(--bottom-nav-height) 0;
  background: rgba(16, 23, 29, 0.44);
  border: 0;
}

/* History and system */
.desk-page {
  overflow-y: auto;
  padding: clamp(1rem, 3vw, 2.25rem);
  background: var(--paper);
}

.page-heading {
  max-width: 1240px;
  margin: 0 auto 1.5rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line-strong);
}

.page-heading h1 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.page-heading > div > p:last-child {
  margin: 0;
  color: var(--ink-700);
}

.page-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
}

.select-field {
  display: grid;
  gap: 0.25rem;
  color: var(--ink-700);
  font-size: 0.68rem;
  font-weight: 700;
}

.select-field select {
  min-width: 168px;
  min-height: 42px;
}

.history-table-wrap,
.system-grid,
.desk-page > .inline-warning {
  max-width: 1240px;
  margin-right: auto;
  margin-left: auto;
}

.history-table-wrap {
  overflow-x: auto;
  background: var(--paper-raised);
  border: 1px solid var(--line);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 0.75rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.history-table th {
  color: var(--ink-500);
  background: var(--paper-deep);
  font-size: 0.67rem;
  letter-spacing: 0.04em;
}

.history-table td {
  font-size: 0.76rem;
}

.history-table tr:last-child td {
  border-bottom: 0;
}

.history-table tbody tr:hover {
  background: #fff;
}

.history-primary {
  display: grid;
  line-height: 1.3;
}

.history-primary small,
.history-error {
  margin-top: 0.2rem;
  color: var(--ink-500);
  font-size: 0.65rem;
}

.history-error {
  max-width: 260px;
  color: var(--red);
}

.system-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(280px, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}

.system-grid > section {
  min-width: 0;
  padding: 1.3rem;
  background: var(--paper-raised);
}

.system-primary {
  grid-row: auto;
}

.system-section-heading {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.system-section-heading h2 {
  margin-bottom: 0.12rem;
  font-size: 0.98rem;
}

.system-section-heading p {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.7rem;
}

.fact-list {
  margin: 0;
}

.fact-list > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.fact-list dt {
  color: var(--ink-500);
  font-size: 0.72rem;
}

.fact-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  font-weight: 700;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.metric-cell {
  min-width: 0;
  padding: 0.65rem;
  background: var(--paper);
  border-top: 3px solid var(--line-strong);
}

.metric-cell.is-attention {
  border-top-color: var(--amber);
}

.metric-cell.is-success {
  border-top-color: var(--green);
}

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

.metric-cell strong {
  font: 800 1.25rem/1.2 "Cascadia Mono", Consolas, monospace;
}

.metric-cell span {
  overflow: hidden;
  margin-top: 0.25rem;
  color: var(--ink-500);
  font-size: 0.63rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-settings-panel {
  grid-column: 1 / -1;
}

.settings-heading {
  align-items: flex-start;
  justify-content: space-between;
}

.telegram-settings-note {
  margin-bottom: 1rem;
  padding: 0.8rem 0.9rem;
  color: var(--ink-700);
  background: var(--blue-soft);
  border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--line));
  border-radius: var(--radius-control);
  font-size: 13px;
  line-height: 1.55;
}

.telegram-settings-form {
  display: grid;
  gap: 1.2rem;
}

.telegram-token-field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.telegram-token-field label span,
.field-help,
.telegram-settings-actions p {
  color: var(--ink-500);
  font-size: 13px;
}

.secret-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.secret-input-row input {
  min-width: 0;
  min-height: 44px;
  padding: 0.65rem 0.72rem;
  color: var(--ink-950);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  font: inherit;
}

.secret-input-row input:focus {
  border-color: var(--blue);
  outline: 3px solid color-mix(in srgb, var(--blue) 18%, transparent);
  outline-offset: 1px;
}

.field-help {
  margin: 0.4rem 0 0;
  line-height: 1.55;
}

.telegram-settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.telegram-settings-actions p {
  max-width: 65ch;
  margin: 0;
}

.telegram-settings-actions .button {
  flex: 0 0 auto;
}

/* Dialogs */
.desk-dialog {
  width: min(460px, calc(100vw - 28px));
  padding: 0;
  color: var(--ink-950);
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 26px 80px rgba(15, 22, 28, 0.4);
}

.desk-dialog::before {
  content: '';
  display: block;
  height: 4px;
  background: var(--blue);
}

.desk-dialog-warning::before {
  background: var(--amber);
}

.desk-dialog::backdrop {
  background: rgba(13, 19, 24, 0.62);
  backdrop-filter: blur(2px);
}

.desk-dialog form {
  padding: 1.45rem;
}

.desk-dialog h2 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.desk-dialog p {
  margin-bottom: 1.15rem;
  color: var(--ink-700);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.dialog-actions-three {
  display: grid;
  grid-template-columns: auto auto minmax(150px, 1fr);
}

.dialog-targets {
  display: grid;
  gap: 0.4rem;
  max-height: 180px;
  overflow-y: auto;
  padding: 0.75rem;
  background: var(--paper-deep);
}

.dialog-targets span {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
}

.dialog-targets code {
  color: var(--ink-500);
  font-size: 0.65rem;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@media (max-width: 1399px) {
  .schedule-workspace {
    grid-template-columns: minmax(286px, 316px) minmax(0, 1fr);
  }

  .proof-toggle {
    display: inline-flex;
  }

  .proof-pane {
    position: fixed;
    z-index: 40;
    top: var(--topbar-height);
    right: 0;
    bottom: var(--bottom-nav-height);
    width: min(410px, 100vw);
    box-shadow: var(--shadow-drawer);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 180ms ease, visibility 180ms ease;
  }

  .proof-pane.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .close-proof {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: minmax(170px, 1fr) auto minmax(120px, 1fr);
  }

  .runtime-summary small {
    display: none;
  }

  .nav-tab {
    min-width: 90px;
  }

  .editor-section {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .target-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 899px) {
  .topbar {
    grid-template-columns: minmax(150px, 1fr) auto minmax(96px, auto);
  }

  .brand-block {
    padding-left: 0.8rem;
  }

  .brand-copy small,
  .runtime-summary {
    display: none;
  }

  .topbar-status {
    gap: 0.45rem;
    padding-right: 0.7rem;
  }

  .nav-tab {
    min-width: 82px;
    padding-right: 0.55rem;
    padding-left: 0.55rem;
  }

  .schedule-workspace {
    position: relative;
    display: block;
  }

  .queue-pane,
  .editor-pane {
    position: absolute;
    inset: 0;
  }

  .admin-body:not(.mobile-editor-open) .editor-pane {
    display: none;
  }

  .admin-body.mobile-editor-open .queue-pane {
    display: none;
  }

  .mobile-back {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .editor-toolbar {
    min-height: 72px;
    padding-left: 0.8rem;
  }

  .history-table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .history-table,
  .history-table tbody,
  .history-table tr,
  .history-table td {
    display: block;
    width: 100%;
  }

  .history-table thead {
    display: none;
  }

  .history-table tbody {
    display: grid;
    gap: 0.75rem;
  }

  .history-table tr {
    padding: 0.75rem;
    background: var(--paper-raised);
    border: 1px solid var(--line);
  }

  .history-table td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.42rem 0;
    border-bottom: 1px solid var(--line);
  }

  .history-table td::before {
    content: attr(data-label);
    color: var(--ink-500);
    font-size: 0.66rem;
    font-weight: 700;
  }

  .history-table td:last-child {
    justify-items: end;
    border-bottom: 0;
  }

  .system-grid {
    grid-template-columns: 1fr;
  }

  .system-primary {
    grid-row: auto;
  }
}

@media (max-width: 599px) {
  :root {
    --topbar-height: 57px;
    --bottom-nav-height: 62px;
  }

  .results-body { --bottom-nav-height: 96px; }

  .admin-body {
    background: var(--graphite-950);
  }

  .app-shell {
    height: 100svh;
    grid-template-rows: auto var(--topbar-height) minmax(0, 1fr);
    padding-bottom: var(--bottom-nav-height);
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-copy strong {
    font-size: 0.82rem;
  }

  .primary-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    height: var(--bottom-nav-height);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--graphite-950);
    border-top: 1px solid #303940;
  }

  .nav-tab {
    min-width: 0;
    min-height: 44px;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.35rem;
    border-top: 3px solid transparent;
    border-bottom: 0;
    font-size: 0.68rem;
  }

  .results-nav { grid-template-rows: repeat(2, 48px); }

  .results-body button,
  .results-body select,
  .results-body .rp-checkbox-field {
    min-height: 44px;
  }

  .nav-tab.is-active {
    border-top-color: #5c8ff0;
    border-bottom-color: transparent;
  }

  .topbar-status {
    grid-column: 2;
  }

  .proof-toggle {
    padding: 0.38rem 0.55rem;
    font-size: 0.68rem;
  }

  .topbar .icon-button {
    min-width: 44px;
    min-height: 44px;
  }

  .queue-heading {
    min-height: 77px;
    padding: 0.85rem;
  }

  .queue-tools {
    padding-right: 0.65rem;
    padding-left: 0.65rem;
  }

  .schedule-row {
    min-height: 92px;
    padding: 0.85rem;
  }

  .editor-toolbar {
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
  }

  .editor-title-group {
    order: 3;
    flex-basis: 100%;
  }

  .editor-tools {
    margin-left: auto;
  }

  .editor-tools .button-quiet {
    min-height: 38px;
  }

  .conflict-banner {
    align-items: stretch;
    flex-direction: column;
    margin: 0.75rem 0.75rem 0;
  }

  .form-error-summary {
    margin: 0.75rem 0.75rem 0;
  }

  .editor-section {
    display: block;
    padding: 1rem 0.8rem 1.15rem;
  }

  .section-heading {
    gap: 0.65rem;
  }

  .weekday-grid {
    grid-template-columns: repeat(7, minmax(34px, 1fr));
    gap: 0.22rem;
  }

  .weekday-grid button {
    min-height: 40px;
    font-size: 0.68rem;
  }

  .weekday-quick {
    gap: 0.3rem;
  }

  .weekday-quick button {
    font-size: 0.72rem;
    min-height: 28px;
  }

  .time-part input {
    width: 72px;
    font-size: 1.25rem;
    padding: 0.4rem 0.4rem;
  }

  .time-part-label {
    font-size: 0.7rem;
  }

  .time-colon {
    font-size: 1.35rem;
    padding-bottom: 0.65rem;
  }

  .time-row {
    flex-wrap: wrap;
  }

  .compact-field {
    width: 90px;
  }

  .timezone-note {
    flex-basis: 100%;
    padding: 0.4rem 0 0;
  }

  .field-block textarea {
    min-height: 330px;
  }

  .editor-footer {
    min-height: 78px;
    align-items: stretch;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
  }

  .save-state {
    min-height: 18px;
  }

  .footer-actions {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
  }

  .proof-pane {
    width: 100vw;
  }

  .proof-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .proof-footer span {
    max-width: none;
  }

  .proof-footer .button {
    width: 100%;
  }

  .desk-page {
    padding: 1rem 0.75rem;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 1rem;
  }

  .page-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .select-field select {
    min-width: 0;
  }

  .history-table td {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .system-grid > section {
    padding: 1rem;
  }

  .fact-list > div {
    grid-template-columns: 115px minmax(0, 1fr);
  }

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

  .settings-heading,
  .telegram-token-field label,
  .telegram-settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .telegram-settings-actions .button {
    width: 100%;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .dialog-actions-three {
    grid-template-columns: 1fr;
  }
}

@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;
  }
}


/* Global send ordering (v12): list bottom wins ties */
.queue-heading-actions { display: flex; gap: 0.4rem; align-items: center; }
.queue-heading-actions .button-quiet { color: #fff; border-color: var(--graphite-800); background: var(--graphite-850); }
.queue-heading-actions .button-quiet:hover { background: var(--graphite-800); }
.queue-heading-actions .button-quiet[aria-pressed="true"] { color: var(--graphite-950); background: #fff; border-color: #fff; }
.queue-order-guide { padding: 0.72rem 1rem; border-block: 1px solid var(--graphite-800); background: var(--graphite-850); }
.queue-order-guide[hidden], .queue-order-actions[hidden] { display: none; }
.queue-order-guide strong { display: block; color: #fff; font-size: 13px; }
.queue-order-guide p { margin: 0.18rem 0 0; color: var(--queue-supporting); font-size: 12px; line-height: 1.45; }
.schedule-row.is-ordering { background: var(--graphite-850); }
.schedule-row.is-ordering + .schedule-row.is-ordering { border-top: 1px solid rgba(255, 255, 255, 0.04); }
.schedule-row.is-ordering .schedule-row-select { padding-bottom: 3.75rem; cursor: default; }
.schedule-row.is-ordering[draggable="true"] { cursor: grab; }
.schedule-row.is-ordering[draggable="true"]:active { cursor: grabbing; }
.schedule-order-rank { flex: 0 0 auto; padding: 0.22rem 0.45rem; color: #fff; background: var(--blue-dark); border-radius: 4px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.schedule-order-rank.is-first { color: var(--graphite-950); background: var(--green-soft); }
.schedule-row.is-ordering .schedule-row-actions { inset-inline: 1.15rem 0.9rem; bottom: 0.65rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.schedule-order-button { min-height: 44px; padding: 0.45rem 0.55rem; color: #d8e0e6; background: var(--graphite-900); border: 1px solid #4b5862; border-radius: 6px; font-size: 12px; font-weight: 800; }
.schedule-order-button.is-sooner { color: #fff; border-color: var(--blue); background: var(--blue-dark); }
.schedule-order-button:hover:not(:disabled) { border-color: var(--queue-supporting); }
.schedule-order-button.is-sooner:hover:not(:disabled) { background: var(--blue); }
.schedule-order-button:disabled { opacity: 0.32; cursor: not-allowed; }
.queue-order-actions { padding: 0.7rem 0.8rem; border-top: 1px solid var(--graphite-800); background: var(--graphite-950); }
.queue-order-actions > span { display: block; margin-bottom: 0.5rem; color: var(--queue-supporting); font-size: 12px; line-height: 1.4; }
.queue-order-actions > div { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 0.45rem; }
.queue-order-actions .button { width: 100%; min-height: 44px; }

/* Priority audit log (v10) */
.priority-log-block { margin: 1.5rem 0; }
.priority-log-list { display: flex; flex-direction: column; gap: 0.4rem; }
.priority-log-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; flex-wrap: wrap; }
.priority-log-meta { display: flex; flex-direction: column; min-width: 8rem; }
.priority-log-meta span { font-size: 0.75rem; color: var(--queue-muted); }
.priority-log-change { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.priority-log-change code { background: var(--slate-soft); padding: 0.1rem 0.4rem; border-radius: 4px; font-weight: 700; }
.priority-log-change em { font-style: normal; color: var(--queue-muted); }

.desk-page .priority-log-block { max-width: 56rem; }

/* ------------------------------------------------------------------ *
 * Unified control room - module bar (MERGE Phase 3)
 * Persist across both modules; topbar sits below it per module
 * ---------------------------------------------------------------- */
.module-bar {
  position: relative;
  z-index: 31;
  display: flex;
  align-items: stretch;
  min-width: 0;
  background: var(--graphite-950);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.module-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  color: #9facb7;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.module-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.module-link.is-active {
  color: #fff;
  box-shadow: inset 0 -2px 0 #5c8ff0;
  background: rgba(255, 255, 255, 0.03);
}

.brand-mark-results {
  color: var(--graphite-950);
  background: #eab95c;
}

.results-nav .nav-tab {
  min-width: 0;
  padding: 0 0.72rem;
  font-size: 0.8rem;
}

.results-nav .nav-tab.is-active {
  border-bottom-color: #eab95c;
}

/* ------------------------------------------------------------------ *
 * Results module pieces (MERGE Phase 3)
 * ---------------------------------------------------------------- */
.rp-loading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.15rem 0.4rem;
  color: var(--queue-supporting);
  font-size: 13px;
}

.rp-loading[hidden] { display: none; }

.rp-offline-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin: 0 1.15rem 1rem;
  padding: 0.75rem 0.9rem;
  color: #fff;
  background: #7a2d30;
  border: 1px solid #a03b40;
  border-radius: 8px;
}

.rp-offline-banner[hidden] { display: none; }

.rp-offline-copy { display: grid; gap: 0.15rem; min-width: 12rem; }
.rp-offline-copy strong { font-size: 0.85rem; }
.rp-offline-copy div { color: #eecfcf; font-size: 0.78rem; }
.rp-offline-meta { color: #eecfcf; font-size: 0.72rem; }
.rp-offline-close { margin-inline-start: auto; }

.rp-alert-banner { margin: 0 1.15rem 1rem; padding: 0.7rem 0.9rem; color: #3f2c14; background: #f5e4bd; border: 1px solid #e0c074; border-radius: 8px; font-size: 0.8rem; }
.rp-alert-banner[hidden] { display: none; }

.rp-grid { margin-inline: 1.15rem; width: auto; }

.rp-list { display: flex; flex-direction: column; gap: 0.55rem; margin: 0 1.15rem; }

.rp-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.rp-row-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 8rem; }
.rp-row-main strong { color: var(--graphite-950); }
.rp-row-sub { color: var(--queue-muted); font-size: 0.75rem; font-family: "Cascadia Mono", Consolas, monospace; }
.rp-row-detail { color: var(--ink-700); font-size: 0.78rem; }
.rp-row-state { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.rp-row-actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.rp-inline-actions { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.rp-source-row .rp-row-main { flex: 1 1 340px; }
.rp-bot-row.is-archived { background: var(--paper-deep); opacity: 0.76; }

.rp-telegram-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); gap: 1rem; margin: 0 1.15rem 1.15rem; }
.rp-registry-section { min-width: 0; padding: 0.9rem; background: var(--paper-raised); border: 1px solid var(--line); }
.rp-registry-section .system-section-heading { margin-bottom: 0.75rem; }
.rp-list-flush { margin: 0; }

.rp-table th { text-align: start; }

.rp-num { font-family: "Cascadia Mono", Consolas, monospace; font-weight: 800; font-variant-numeric: tabular-nums; }
.rp-round-cell { font-family: "Cascadia Mono", Consolas, monospace; font-size: 0.78rem; }

.rp-routing-grid { display: flex; flex-direction: column; gap: 0.9rem; margin: 0 1.15rem; }
.rp-route-row { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: clip; scroll-margin-top: 1rem; }
.rp-route-row > summary { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.8rem 0.9rem; cursor: pointer; list-style: none; }
.rp-route-row > summary::-webkit-details-marker { display: none; }
.rp-route-row > summary::after { content: "+"; order: 3; width: 28px; height: 28px; display: grid; place-items: center; color: var(--blue-dark); border: 1px solid var(--line-strong); border-radius: 4px; font: 800 1rem/1 "Cascadia Mono", Consolas, monospace; }
.rp-route-row[open] > summary { background: var(--paper-raised); border-bottom: 1px solid var(--line); }
.rp-route-row[open] > summary::after { content: "−"; }
.rp-route-head-main { min-width: 0; display: grid; gap: 0.12rem; }
.rp-route-head-main strong { color: var(--graphite-950); }
.rp-route-head-main small { overflow: hidden; color: var(--ink-700); font-size: 0.76rem; text-overflow: ellipsis; white-space: nowrap; }
.rp-route-head-state { display: flex; align-items: center; gap: 0.4rem; margin-inline-start: auto; }
.rp-route-editor { display: grid; gap: 0.75rem; padding: 0.9rem; }
.rp-bot-route { min-width: 0; margin: 0; padding: 0.75rem; border: 1px solid var(--line); border-radius: 6px; }
.rp-bot-route legend { display: flex; align-items: center; gap: 0.5rem; padding: 0 0.35rem; color: var(--graphite-950); font-weight: 700; }
.rp-bot-route legend input { width: 18px; height: 18px; accent-color: var(--blue); }
.rp-bot-route legend small { color: var(--queue-muted); font: 0.72rem/1.4 "Cascadia Mono", Consolas, monospace; }
.rp-route-filter { min-height: 38px; display: flex; align-items: center; justify-content: flex-end; gap: 0.65rem; }
.rp-route-filter input { min-height: 36px; width: min(240px, 100%); padding: 0.42rem 0.55rem; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.rp-route-selected { color: var(--ink-700); font-size: 0.76rem; font-weight: 700; }
.rp-route-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.4rem 0.8rem; margin: 0.65rem 0; }
.rp-route-check { min-height: 40px; display: flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.45rem; background: var(--paper); border: 1px solid transparent; border-radius: 4px; font-size: 0.82rem; }
.rp-route-check:has(input:checked) { color: var(--blue-dark); background: var(--blue-soft); border-color: var(--blue); font-weight: 700; }
.rp-route-check input { width: 18px; height: 18px; accent-color: var(--blue); }
.rp-bot-route-tools { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; flex-wrap: wrap; padding-top: 0.55rem; border-top: 1px solid var(--line); }
.rp-route-foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; padding: 0.75rem 0.9rem; background: rgba(252, 250, 245, 0.97); border-top: 1px solid var(--line); }
.rp-route-hint { color: var(--ink-700); font-size: 0.75rem; }

.rp-site-deliveries { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.6rem; margin: 0 0 1rem; }
.rp-site-delivery-card { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: 8px; }
.rp-site-delivery-line { display: flex; flex-direction: column; gap: 0.15rem; }
.rp-site-delivery-line strong { color: var(--graphite-950); font-family: "Cascadia Mono", Consolas, monospace; }
.rp-site-delivery-line span { color: var(--queue-muted); font-size: 0.75rem; }
.rp-delivery-detail { margin: 0 0 1rem; }
.rp-history-route, .rp-history-evidence { display: grid; gap: 0.12rem; }
.rp-history-route span, .rp-history-evidence span { color: var(--ink-700); font-size: 0.75rem; }
.rp-history-evidence strong { font-size: 0.78rem; }
.rp-history-actions .button { min-width: max-content; }
.rp-test-results { display: grid; gap: 0.45rem; min-width: min(70vw, 420px); }
.rp-test-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.25rem 0.7rem; padding: 0.55rem 0.65rem; border: 1px solid var(--line); }
.rp-test-result small { grid-column: 1 / -1; color: var(--ink-700); }

.rp-ops-tools { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.2rem; }
.rp-ops-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.rp-ops-row > span:first-child { display: grid; gap: 0.1rem; min-width: 12rem; }
.rp-ops-row strong { color: var(--graphite-950); font-size: 0.84rem; }
.rp-ops-row small { color: var(--queue-muted); font-size: 0.75rem; }
.rp-ops-inline { display: flex; align-items: center; gap: 0.4rem; }
.rp-ops-detail { margin: 0.6rem 0 0; color: var(--queue-muted); font-size: 0.75rem; white-space: pre-wrap; }

.rp-config-block { display: grid; gap: 0.55rem; }
.rp-config-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-size: 0.8rem; color: var(--graphite-950); }
.rp-config-export { max-height: 220px; overflow: auto; margin: 0; padding: 0.7rem; background: var(--graphite-950); color: #d8e0e6; border-radius: 8px; font: 0.72rem/1.5 "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.rp-import-form { display: grid; gap: 0.55rem; margin-top: 1.1rem; }
.rp-import-form label { display: grid; gap: 0.15rem; }
.rp-import-form label strong { color: var(--graphite-950); font-size: 0.84rem; }
.rp-import-form label span { color: var(--queue-muted); font-size: 0.75rem; }
.rp-import-form textarea { min-height: 118px; padding: 0.6rem 0.7rem; font: 0.72rem/1.5 "Cascadia Mono", Consolas, monospace; resize: vertical; }
.rp-config-actions p { color: var(--queue-muted); font-size: 0.75rem; margin: 0; }

.rp-audit-list { display: flex; flex-direction: column; gap: 0.4rem; max-height: 260px; overflow: auto; }
.rp-audit-row { display: grid; gap: 0.1rem; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; }
.rp-audit-row strong { color: var(--graphite-950); font-size: 0.8rem; }
.rp-audit-row span { color: var(--queue-muted); font-size: 0.75rem; }
.rp-audit-row code { color: var(--queue-supporting); font-size: 0.72rem; font-variant-numeric: tabular-nums; }

.rp-calendar-markets { display: grid; gap: 0.5rem; margin-top: 0.7rem; }
.rp-calendar-market { display: grid; gap: 0.3rem; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; }
.rp-calendar-market-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.rp-calendar-market-head strong { color: var(--graphite-950); font-size: 0.84rem; }
.rp-calendar-market-meta { display: grid; gap: 0.15rem; }
.rp-calendar-market-meta span { color: var(--queue-muted); font-size: 0.75rem; line-height: 1.45; }

.rp-form-dialog h2 { margin-bottom: 0.75rem; }
.rp-dialog-fields { display: grid; gap: 0.65rem; min-width: min(70vw, 420px); }
.rp-dialog-fields .field-block { display: grid; gap: 0.2rem; }
.rp-dialog-fields .field-block span { font-weight: 700; font-size: 0.76rem; color: var(--graphite-950); }
.rp-field-group { display: grid; gap: 0.2rem; }
.rp-field-hint { margin: 0; font-size: 0.72rem; line-height: 1.5; color: var(--queue-muted); }
.rp-field-hint code { font: 0.72rem/1.5 "Cascadia Mono", Consolas, monospace; color: var(--queue-supporting); }
.rp-checkbox-field { display: flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; }
.rp-checkbox-field input { accent-color: var(--blue); }

.rp-dryrun-body { max-height: 40vh; overflow: auto; margin: 0; padding: 0.7rem; background: var(--graphite-950); color: #d8e0e6; border-radius: 8px; font: 0.75rem/1.55 "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; }

@media (max-width: 1080px) {
  .results-nav .nav-tab { padding: 0 0.5rem; font-size: 0.76rem; }
  .module-link { padding: 0.45rem 0.8rem; }
}

@media (max-width: 899px) {
  .module-bar { overflow-x: auto; }
  .module-link { flex: 1 0 auto; justify-content: center; }
  .results-nav { overflow-x: auto; }
  .rp-grid { margin-inline: 0; }
  .rp-ops-row, .rp-row-actions, .rp-ops-inline { justify-content: flex-start; }
  .rp-site-deliveries { grid-template-columns: 1fr; }
  .rp-telegram-layout { grid-template-columns: 1fr; margin-inline: 0; }
}

@media (max-width: 599px) {
  .module-link { min-height: 44px; }
  .rp-row-actions .button-compact { min-height: 44px; }
  .rp-route-checks { grid-template-columns: 1fr; }
  .rp-route-check { min-height: 44px; }
  .rp-route-row > summary { align-items: flex-start; }
  .rp-route-head-state { margin-inline-start: 0; }
  .rp-route-head-main small { white-space: normal; }
  .rp-bot-route-tools { align-items: stretch; }
  .rp-bot-route legend, .rp-bot-route-tools .rp-checkbox-field { min-height: 44px; }
  .rp-route-filter input { min-height: 44px; }
  .rp-bot-route-tools .button { width: 100%; min-height: 44px; }
  .rp-route-foot .button { width: 100%; min-height: 44px; }
  .rp-offline-banner { align-items: flex-start; }
  .rp-offline-close { margin-inline-start: 0; }
}
