:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --paper: #ffffff;
  --paper-soft: #f9fafc;
  --ink: #202936;
  --muted: #657386;
  --line: #d9e0ea;
  --line-strong: #bfccd9;
  --surface: #ffffff;
  --accent: #2364aa;
  --accent-weak: #e7f0fb;
  --good: #1b7f5a;
  --good-weak: #e5f5ef;
  --warn: #a86400;
  --warn-weak: #fff3d8;
  --bad: #b42318;
  --bad-weak: #fde8e7;
  --violet: #6d4bb3;
  --violet-weak: #f0ebfb;
  --shadow: 0 10px 30px rgba(25, 36, 55, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.uxr-shell {
  max-width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}

.uxr-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  background: #eef3f8;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  min-height: 44px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.mode-nav {
  display: grid;
  gap: 8px;
}

.mode-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
}

.mode-button span {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}

.mode-button.is-active {
  border-color: var(--accent);
  background: #fff;
  color: var(--accent);
  box-shadow: var(--shadow);
}

.mode-button.is-active span {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.side-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.side-panel strong {
  display: block;
  margin: 8px 0 4px;
}

.side-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.side-links {
  margin-top: auto;
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.section-label,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.uxr-main {
  min-width: 0;
  padding: 22px 24px 28px;
}

.topbar {
  min-height: 88px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.topbar h1 {
  margin: 6px 0 6px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.topbar p {
  margin: 0;
  color: var(--muted);
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.access-panel,
.stepper-wrap,
.step-page,
.step-footer {
  max-width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.access-panel {
  padding: 12px;
  margin-bottom: 14px;
  display: block;
}

.access-details summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.access-details summary::-webkit-details-marker {
  display: none;
}

.access-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr)) repeat(2, minmax(72px, auto)) minmax(110px, 1fr) repeat(2, minmax(64px, auto));
  gap: 8px;
}

input,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(35, 100, 170, 0.2);
  border-color: var(--accent);
}

.access-state {
  min-width: 126px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.stepper-wrap {
  padding: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.stepper {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(136px, 1fr);
  gap: 8px;
}

.step-tab {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
}

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

.step-tab strong {
  font-size: 13px;
  line-height: 1.25;
}

.step-tab small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.step-tab.is-active {
  border-color: var(--accent);
  background: var(--accent-weak);
  color: var(--accent);
}

.step-tab.is-done {
  border-color: rgba(27, 127, 90, 0.45);
  background: var(--good-weak);
}

.step-page {
  min-height: 520px;
  overflow-x: hidden;
  padding: 18px;
}

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

.step-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.step-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.step-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
  align-items: start;
}

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

.panel,
.item-card,
.summary-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
}

.panel {
  padding: 14px;
}

.panel-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-head h3 {
  min-width: 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.panel-head small {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-zone {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  display: grid;
  gap: 12px;
  align-items: center;
  justify-items: start;
}

.file-list,
.item-list,
.issue-list {
  display: grid;
  gap: 8px;
}

.file-row,
.issue-row,
.history-row {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.file-row span,
.issue-row span,
.history-row span {
  color: var(--muted);
  font-size: 12px;
}

.bucket-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
}

.bucket {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.bucket span,
.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.bucket strong,
.summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.1;
}

.item-card {
  padding: 12px;
  background: #fff;
}

.item-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.3;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}

.pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.pill.good {
  border-color: rgba(27, 127, 90, 0.35);
  background: var(--good-weak);
  color: var(--good);
}

.pill.warn {
  border-color: rgba(168, 100, 0, 0.35);
  background: var(--warn-weak);
  color: var(--warn);
}

.pill.bad {
  border-color: rgba(180, 35, 24, 0.35);
  background: var(--bad-weak);
  color: var(--bad);
}

.pill.info {
  border-color: rgba(35, 100, 170, 0.35);
  background: var(--accent-weak);
  color: var(--accent);
}

.pill.violet {
  border-color: rgba(109, 75, 179, 0.35);
  background: var(--violet-weak);
  color: var(--violet);
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.json-view {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: #dbeafe;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
}

.details-block {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.details-block summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.details-block .json-view {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  max-height: 220px;
}

.empty-state {
  min-height: 120px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 18px;
  background: #fff;
}

.step-footer {
  min-height: 64px;
  margin-top: 14px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.step-hint {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.primary-button,
.secondary-button,
.ghost-button,
.ghost-link {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 700;
  text-align: center;
}

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

.secondary-button {
  background: #fff;
  color: var(--ink);
}

.secondary-button.is-active {
  border-color: var(--accent);
  background: var(--accent-weak);
  color: var(--accent);
}

.group-list {
  display: grid;
  gap: 10px;
}

.reference-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.missing-summary-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.missing-summary-panel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.missing-summary-panel strong,
.missing-summary-panel span {
  display: block;
}

.missing-summary-panel > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.missing-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 8px;
}

.missing-summary-grid article {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  padding: 9px 10px;
}

.missing-summary-grid article.is-active {
  border-color: rgba(168, 100, 0, 0.35);
  background: var(--warn-weak);
}

.missing-summary-grid span {
  color: var(--muted);
  font-size: 12px;
}

.missing-summary-grid strong {
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.1;
}

.reference-panel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reference-panel strong,
.reference-panel span {
  display: block;
}

.reference-panel span {
  color: var(--muted);
  font-size: 12px;
}

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

.group-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.group-card summary::-webkit-details-marker {
  display: none;
}

.group-card summary strong,
.group-card summary small {
  display: block;
}

.group-card summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.group-card[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.group-action-row {
  min-height: 50px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.group-action-row span {
  color: var(--muted);
  font-size: 12px;
}

.compact-list {
  padding: 12px;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
}

.mini-list code {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  padding: 5px 7px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.wide-field {
  grid-template-columns: 118px minmax(0, 1fr);
}

.inline-check {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.schedule-metrics .summary-card {
  min-height: 78px;
  padding: 12px;
}

.workbench-layout {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.48fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.workbench-layout > .panel {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.version-card {
  transition: border-color 0.16s ease, background 0.16s ease;
}

.version-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-weak);
}

.version-card.is-comparison {
  border-color: var(--violet);
  background: var(--violet-weak);
}

.soft-score-panel {
  margin-top: 14px;
}

.soft-score-compare {
  margin-top: 12px;
}

.schedule-table {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: #fff;
}

.schedule-table-head,
.schedule-table-row {
  min-width: 680px;
  display: grid;
  grid-template-columns: 100px 1fr 1fr 1fr 96px;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
}

.schedule-table-head {
  color: var(--muted);
  background: var(--paper-soft);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}

.schedule-table-row {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.schedule-table-row:last-child {
  border-bottom: 0;
}

.schedule-table-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.soft-score-table .schedule-table-head,
.soft-score-table .schedule-table-row {
  min-width: 560px;
  grid-template-columns: minmax(128px, 1.1fr) 96px 86px minmax(180px, 1.4fr);
}

.segmented-control,
.action-type-grid {
  min-width: 0;
  display: inline-grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  padding: 4px;
}

.segmented-control {
  grid-template-columns: repeat(3, minmax(54px, 1fr));
}

.action-type-grid {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segmented-control button,
.action-type-grid button {
  min-width: 0;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.segmented-control button.is-active,
.action-type-grid button.is-active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.08);
}

.picked-assignment {
  min-height: 62px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-weak);
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.picked-assignment strong,
.picked-assignment span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.picked-assignment strong {
  color: var(--ink);
  font-size: 14px;
}

.picked-assignment span {
  color: var(--muted);
  font-size: 12px;
}

.picked-assignment.is-empty {
  border-style: dashed;
  background: #fff;
  color: var(--muted);
  place-items: center;
}

.action-result-summary {
  margin-top: 12px;
}

.timetable-shell {
  width: 100%;
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.timetable-toolbar {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.timetable-toolbar select {
  min-width: 0;
}

.timetable-grid {
  --day-count: 5;
  display: grid;
  grid-template-columns: 76px repeat(var(--day-count), minmax(132px, 1fr));
  min-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timetable-corner,
.timetable-day,
.timetable-period,
.timetable-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.timetable-corner,
.timetable-day,
.timetable-period {
  min-height: 38px;
  display: grid;
  place-items: center;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timetable-cell {
  min-height: 104px;
  padding: 6px;
  display: grid;
  align-content: start;
  gap: 6px;
  background: #fff;
}

.timetable-cell.has-conflict {
  background: var(--warn-weak);
}

.timetable-cell.is-drop-target {
  background: rgba(35, 100, 170, 0.08);
  box-shadow: inset 0 0 0 2px rgba(35, 100, 170, 0.35);
}

.timetable-cell.is-disabled {
  background: var(--surface);
}

.timetable-lesson,
.timetable-empty-slot {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.timetable-lesson {
  padding: 8px;
  display: grid;
  gap: 3px;
  user-select: none;
}

.timetable-lesson strong,
.timetable-lesson span,
.timetable-lesson small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.timetable-lesson strong {
  color: var(--ink);
  font-size: 13px;
}

.timetable-lesson span {
  color: var(--muted);
  font-size: 12px;
}

.timetable-lesson small {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.timetable-lesson.is-selected,
.timetable-empty-slot.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(35, 100, 170, 0.12);
}

.timetable-lesson.is-dragging {
  opacity: 0.56;
}

.timetable-lesson.is-drop-target {
  border-color: var(--accent);
  background: rgba(35, 100, 170, 0.08);
  box-shadow: 0 0 0 2px rgba(35, 100, 170, 0.16);
}

.timetable-lesson.is-locked {
  border-color: rgba(168, 100, 0, 0.38);
  background: var(--warn-weak);
}

.timetable-empty-slot {
  border-style: dashed;
  color: var(--muted);
  font-size: 12px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
}

.action-summary-list {
  display: grid;
  gap: 8px;
}

.action-summary-list div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.action-summary-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.action-summary-list strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.schedule-readiness-panel .schedule-metrics {
  margin-bottom: 10px;
}

.readiness-note {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.readiness-note.is-warn {
  border-color: rgba(168, 100, 0, 0.32);
  background: var(--warn-weak);
}

.readiness-note strong {
  color: var(--ink);
  font-size: 13px;
}

.readiness-note span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-issue-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.schedule-issue-groups article {
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.schedule-issue-groups article.is-blocking {
  border-color: rgba(185, 28, 28, 0.28);
  background: var(--bad-weak);
}

.schedule-issue-groups span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.schedule-issue-groups strong {
  color: var(--ink);
  font-size: 18px;
}

.schedule-issue {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr) auto;
  align-items: center;
}

.ghost-button,
.ghost-link {
  background: transparent;
  color: var(--muted);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 20;
  min-width: min(480px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  border-radius: 8px;
  background: #172033;
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

@media (max-width: 1100px) {
  .uxr-shell {
    grid-template-columns: 1fr;
  }

  .uxr-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mode-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .side-links {
    margin-top: 0;
  }

  .grid-2,
  .workbench-layout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 680px) {
  .uxr-main {
    padding: 16px 12px 22px;
  }

  .uxr-sidebar {
    padding: 14px 12px;
    gap: 12px;
  }

  .topbar,
  .step-head,
  .panel-head {
    display: block;
  }

  .panel-head small {
    display: block;
    margin-top: 4px;
  }

  .workbench-layout .panel-head small {
    display: none;
  }

  .top-actions,
  .step-status {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .access-grid,
  .bucket-grid,
  .timetable-toolbar,
  .grid-3 {
    grid-template-columns: 1fr;
  }

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

  .timetable-grid {
    min-width: calc(76px + var(--day-count) * 132px);
  }

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

  .side-panel,
  .side-links {
    display: none;
  }

  .stepper {
    grid-auto-columns: minmax(124px, 72vw);
  }

  .step-footer {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .group-action-row {
    align-items: stretch;
    flex-direction: column;
  }
}
