:root {
  color-scheme: light;
  --ink: #18211f;
  --muted: #64706d;
  --subtle: #87918d;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --line: #dfe6e1;
  --line-strong: #c5d1cb;
  --teal: #0b7f78;
  --teal-dark: #075e59;
  --teal-soft: #e5f4f2;
  --coral: #d95d4c;
  --coral-soft: #fbebe8;
  --gold: #b98210;
  --gold-soft: #fff3cf;
  --mint: #dff2e5;
  --shadow: 0 18px 50px rgba(35, 49, 43, 0.08);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(223, 242, 229, 0.55), rgba(251, 252, 250, 0) 34rem),
    var(--paper);
}

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

button {
  cursor: pointer;
}

button,
input,
select,
textarea {
  touch-action: manipulation;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.brand,
.status-panel,
.metrics-strip,
.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  padding: 20px;
  border-radius: var(--radius);
}

.brand-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  min-width: 0;
}

.brand-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--teal-dark);
}

.brand-info-button:hover {
  background: var(--teal-soft);
}

.brand-info-button svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.2;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 7px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--gold-soft);
  color: #71500a;
  font-size: 0.78rem;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 24px);
  grid-template-rows: repeat(2, 24px);
  gap: 6px;
  flex: 0 0 auto;
}

.brand-mark span {
  border-radius: 6px;
  border: 2px solid rgba(24, 33, 31, 0.88);
}

.brand-mark span:nth-child(1) {
  background: var(--teal);
}

.brand-mark span:nth-child(2) {
  background: var(--gold-soft);
}

.brand-mark span:nth-child(3) {
  background: var(--coral-soft);
}

.brand-mark span:nth-child(4) {
  background: var(--mint);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.1rem;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 1.04rem;
  line-height: 1.3;
}

.page-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(118px, 1fr));
  gap: 8px;
  align-self: stretch;
  min-width: 430px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.tab-button.is-active {
  background: var(--teal);
  color: #fff;
}

.app-page {
  display: none;
}

.app-page.is-active {
  display: grid;
  gap: 18px;
}

.status-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(210px, auto) auto;
  gap: 14px;
  align-items: center;
  padding: 20px;
  border-radius: var(--radius);
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--coral);
  box-shadow: 0 0 0 7px var(--coral-soft);
}

.status-dot.is-open {
  background: var(--teal);
  box-shadow: 0 0 0 7px var(--teal-soft);
}

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

.status-panel strong {
  font-size: 1.08rem;
  line-height: 1.35;
}

.status-panel span {
  color: var(--muted);
  font-size: 0.92rem;
}

.status-clock {
  text-align: right;
  min-width: 116px;
}

.status-clock strong {
  font-size: 1.55rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.status-main {
  min-width: 0;
}

.day-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 9px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfa;
  font-size: 0.88rem;
}

.day-toggle input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
}

.day-toggle span {
  color: var(--ink);
  font-weight: 900;
}

.day-toggle small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: var(--radius);
}

.metrics-strip article {
  min-width: 0;
  padding: 16px 18px;
  background: var(--panel);
}

.metrics-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.metrics-strip strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.38rem;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.timer-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.start-panel,
.live-panel,
.records-panel {
  min-width: 0;
}

.live-panel {
  min-height: 100%;
}

.control-column,
.main-column {
  display: grid;
  gap: 18px;
}

.panel {
  min-width: 0;
  padding: 18px;
  border-radius: var(--radius);
}

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

.panel-title > div {
  min-width: 0;
}

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

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
}

.ticket-fieldset {
  min-width: 0;
}

.ticket-editor {
  display: grid;
  gap: 8px;
}

.ticket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
}

.ticket-row select {
  padding-right: 38px;
}

.ticket-quantity-stepper {
  display: grid;
  grid-template-columns: 40px minmax(48px, 1fr) 40px;
  width: 100%;
  min-width: 0;
  min-height: 42px;
}

.ticket-quantity-stepper input {
  min-width: 0;
  padding: 0 4px;
  border-radius: 0;
  text-align: center;
  font-weight: 900;
  appearance: textfield;
}

.ticket-quantity-stepper input::-webkit-inner-spin-button,
.ticket-quantity-stepper input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.ticket-quantity-stepper .stepper-button {
  min-width: 40px;
}

.checkout-dialog .ticket-row {
  grid-template-columns: minmax(140px, 180px) auto minmax(0, 1fr);
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfa;
}

.checkout-dialog .ticket-type-field {
  grid-column: 1 / -1;
}

.checkout-dialog .ticket-type-field select {
  min-height: 48px;
  padding-left: 12px;
  padding-right: 44px;
  font-size: 0.95rem;
}

.checkout-dialog .ticket-quantity-field {
  grid-column: 1;
}

.checkout-dialog .ticket-row .icon-button {
  grid-column: 2;
}

.ticket-row .icon-button:disabled,
.ticket-admin-row .icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ticket-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.muted-pill {
  background: #f8faf8;
  color: var(--muted);
}

.ticket-admin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.ticket-admin-form .primary-button {
  width: auto;
  min-width: 110px;
}

.ticket-admin-list {
  display: grid;
  gap: 9px;
}

.data-backup-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ticket-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

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

.checkout-summary div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfa;
}

.checkout-summary span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.checkout-summary strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.96rem;
  line-height: 1.25;
}

.stacked-form {
  display: grid;
  gap: 13px;
}

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

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

.start-time-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
}

.now-button {
  min-width: 84px;
}

.number-stepper {
  display: grid;
  grid-template-columns: 44px minmax(58px, 1fr) 44px;
  width: 100%;
  min-width: 0;
  min-height: 42px;
}

.number-stepper input {
  border-radius: 0;
  text-align: center;
  font-weight: 900;
  appearance: textfield;
}

.number-stepper input::-webkit-inner-spin-button,
.number-stepper input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.stepper-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.stepper-button:first-child {
  border-radius: 7px 0 0 7px;
  border-right: 0;
}

.stepper-button:last-child {
  border-radius: 0 7px 7px 0;
  border-left: 0;
}

.stepper-button:disabled {
  color: var(--subtle);
  background: #f3f5f4;
  cursor: default;
}

.stepper-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input,
select {
  min-height: 42px;
  padding: 0 11px;
}

input[type="date"],
input[type="datetime-local"] {
  display: block;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  -webkit-min-logical-width: 0;
}

select {
  text-overflow: ellipsis;
}

textarea {
  resize: vertical;
  min-height: 84px;
  padding: 10px 11px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 127, 120, 0.14);
}

.primary-button,
.ghost-button,
.icon-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button {
  width: 100%;
  padding: 0 16px;
  background: var(--teal);
  color: #fff;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.ghost-button {
  width: auto;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
}

.ghost-button:hover {
  background: #f5f8f6;
}

.danger-button {
  padding: 0 12px;
  background: var(--coral-soft);
  color: #9b2d20;
  border-color: rgba(217, 93, 76, 0.35);
}

.icon-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
}

button svg,
.icon-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.3;
}

.session-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 160px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-state.compact {
  min-height: 72px;
}

.session-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.session-card.outside {
  border-color: rgba(217, 93, 76, 0.4);
  background: linear-gradient(180deg, #fff, var(--coral-soft));
}

.session-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.session-card h3 {
  overflow-wrap: anywhere;
}

.session-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.pill.warn {
  background: var(--coral-soft);
  color: #9b2d20;
}

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

.time-box {
  min-width: 0;
  padding: 10px;
  border-radius: 7px;
  background: #f8faf8;
  border: 1px solid var(--line);
}

.time-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.time-box strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.session-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.session-actions .primary-button,
.session-actions .ghost-button,
.session-actions .danger-button {
  width: auto;
  flex: 1 1 120px;
}

.records-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.history-records-panel {
  display: grid;
  gap: 14px;
}

.history-records-panel .panel-title {
  margin-bottom: 0;
}

.history-filters {
  display: grid;
  grid-template-columns: minmax(126px, 0.8fr) repeat(2, minmax(132px, 0.9fr)) repeat(2, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfa;
}

.history-filters .ghost-button {
  min-width: 82px;
}

.records-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.records-table th,
.records-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

.records-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #fbfcfa;
}

.records-table td {
  color: var(--ink);
}

.records-table .table-name {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.records-table .muted {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.row-actions {
  display: inline-flex;
  gap: 7px;
}

.row-actions button {
  min-height: 34px;
}

.edit-dialog {
  width: min(680px, calc(100% - 28px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(24, 33, 31, 0.22);
}

.edit-dialog::backdrop {
  background: rgba(18, 30, 27, 0.42);
}

.app-info-dialog {
  width: min(620px, calc(100% - 28px));
}

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

.release-item {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfa;
}

.release-item.is-current {
  border-color: rgba(11, 127, 120, 0.42);
  background: var(--teal-soft);
}

.release-item > header {
  align-items: flex-start;
}

.release-item > header > div {
  display: grid;
  gap: 3px;
}

.release-item strong {
  font-size: 1.05rem;
}

.release-item header span,
.release-item li {
  color: var(--muted);
  font-size: 0.88rem;
}

.release-item ul {
  display: grid;
  gap: 7px;
  margin: 13px 0 0;
  padding-left: 1.25rem;
  line-height: 1.55;
}

.release-current-badge {
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--teal);
  color: #fff !important;
  font-size: 0.75rem !important;
  font-weight: 900;
  white-space: nowrap;
}

.dialog-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.dialog-body header,
.dialog-body footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inline-delete-confirm {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(217, 93, 76, 0.34);
  border-radius: 7px;
  background: var(--coral-soft);
}

.inline-delete-confirm strong {
  color: var(--ink);
  line-height: 1.45;
}

.inline-delete-confirm > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--coral);
  border-radius: 7px;
  background: var(--coral);
  color: #fff;
  font-weight: 900;
}

.danger-button:disabled {
  cursor: default;
  opacity: 0.55;
}

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

.dialog-body footer {
  margin-top: 2px;
}

.dialog-body footer .primary-button,
.dialog-body footer .ghost-button {
  width: auto;
  padding: 0 16px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(380px, calc(100vw - 44px));
  padding: 12px 14px;
  border-radius: 7px;
  background: #18211f;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 40px rgba(24, 33, 31, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.login-shell {
  width: min(430px, 100%);
}

.login-panel {
  display: grid;
  gap: 18px;
}

.login-brand {
  width: 100%;
}

.login-form {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.login-error,
.login-hint {
  margin: 0;
  font-size: 0.84rem;
}

.login-error {
  color: #9b2d20;
  font-weight: 800;
}

.login-hint {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1120px) {
  .app-header,
  .timer-layout {
    grid-template-columns: 1fr;
  }

  .status-panel {
    grid-template-columns: auto minmax(0, 1fr) minmax(210px, auto);
  }

  .status-clock {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 14px;
  }

  .brand,
  .status-panel,
  .panel {
    padding: 15px;
  }

  .brand {
    min-height: auto;
    gap: 12px;
  }

  .brand-mark {
    grid-template-columns: repeat(2, 20px);
    grid-template-rows: repeat(2, 20px);
    gap: 5px;
  }

  .brand-info-button {
    width: 40px;
    height: 40px;
  }

  .page-tabs {
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tab-button {
    gap: 5px;
    min-height: 48px;
    padding: 0 6px;
    font-size: 0.88rem;
  }

  h1 {
    font-size: 1.55rem;
  }

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

  .day-toggle {
    grid-column: 1 / -1;
  }

  .status-clock {
    grid-column: 1 / -1;
    text-align: left;
  }

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

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .form-row,
  .session-grid,
  .time-stack,
  .ticket-admin-form,
  .checkout-summary,
  .history-filters {
    grid-template-columns: 1fr;
  }

  .start-time-field {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
    overflow: hidden;
    contain: inline-size;
  }

  .start-time-field > label {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    contain: inline-size;
  }

  input[type="date"],
  input[type="datetime-local"] {
    box-sizing: border-box;
    inline-size: 1px;
    min-inline-size: 100%;
    max-inline-size: 100%;
    font-size: 16px;
  }

  .ticket-row {
    grid-template-columns: 1fr 142px auto;
  }

  .checkout-dialog .ticket-row {
    grid-template-columns: minmax(132px, 170px) auto minmax(0, 1fr);
  }

  .panel-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-title .ghost-button {
    width: 100%;
  }

  .session-card header {
    grid-template-columns: 1fr;
  }

  .records-table {
    min-width: 0;
  }

  .records-table thead {
    display: none;
  }

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

  .records-table tbody {
    display: grid;
    gap: 12px;
  }

  .records-table tr {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
  }

  .records-table td {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 7px 0;
    border-bottom: 0;
    overflow-wrap: anywhere;
  }

  .records-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
  }

  .records-table td[colspan] {
    display: block;
  }

  .records-table td[colspan]::before {
    content: "";
  }

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

@media (max-width: 420px) {
  .metrics-strip {
    grid-template-columns: 1fr;
  }
}
