/* =========================================================
   Model Selector Table — front end (v1.1)
   Override the custom properties on .mst to restyle.
   ========================================================= */

.mst {
  --mst-accent: #7a1f2e;
  --mst-ink: #1c1c1e;
  --mst-muted: #74747a;
  --mst-line: #ecebe7;
  --mst-surface: #ffffff;
  --mst-soft: #f7f6f3;
  --mst-radius: 14px;
  --mst-sticky-top: 120px;

  container: mst / inline-size;
  color: var(--mst-ink);
  margin: 0 0 48px;
  font-size: 15px;
  line-height: 1.4;
}

.mst *,
.mst *::before,
.mst *::after {
  box-sizing: border-box;
}

.mst-title {
  margin: 0 0 22px;
}

.mst-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Layout ---------- */

.mst-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 370px);
  gap: 40px;
  align-items: stretch;
}

.mst-layout--no-preview {
  grid-template-columns: minmax(0, 1fr);
}

.mst-table-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Table card grows so its bottom lines up with the preview card. */
.mst-table-area .mst-scroll {
  flex: 1 0 auto;
}

/* ---------- Table card ---------- */

.mst-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--mst-line);
  border-radius: var(--mst-radius);
  background: var(--mst-surface);
  box-shadow:
    0 1px 2px rgba(20, 20, 20, 0.04),
    0 18px 40px -18px rgba(20, 20, 20, 0.18);
}

.mst-scroll:focus-visible {
  outline: 2px solid var(--mst-accent);
  outline-offset: 3px;
}

.mst-table {
  width: 100%;
  min-width: 520px;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0;
  table-layout: fixed;
  background: transparent !important;
}

.mst-table th,
.mst-table td {
  padding: 0;
  border: 0 !important;
  background: transparent;
  vertical-align: middle;
  text-align: center;
  font-weight: inherit;
}

/* ---------- Header ---------- */

/* Keep theme table styles (e.g. .entry-content tr th { background: #ddd }) out of this table. */
.mst .mst-table tr th,
.mst .mst-table tr td {
  background: transparent;
}

/* Only the group header bars ("Powder Coat", "…with Keyed Lock Kit") get a background. */
.mst .mst-table tr.mst-group-head th {
  background: #eeece7;
  border-top: 1px solid var(--mst-line) !important;
  border-bottom: 1px solid var(--mst-line) !important;
}

/* Row hover tint still wins over the reset above. */
@media (hover: hover) {
  .mst .mst-table tr.mst-row:hover th,
  .mst .mst-table tr.mst-row:hover td {
    background: color-mix(in srgb, var(--mst-row) 9%, #ffffff);
  }
}

.mst-head-caption th {
  padding: 18px 12px 0 !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mst-muted);
}

.mst-head-caption th span {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Thin rules either side of the caption. */
.mst-head-caption th span::before,
.mst-head-caption th span::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--mst-line);
}

.mst-head-spacer {
  width: 30%;
}

.mst-head-cols th {
  padding: 10px 6px 16px !important;
  border-bottom: 1px solid var(--mst-line) !important;
}

.mst-head-cols .mst-head-finish {
  width: 30%;
  padding-left: 24px !important;
  text-align: left !important;
  vertical-align: bottom !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mst-muted);
}

.mst-head-size {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.05;
  color: var(--mst-ink);
}

.mst-head-dims {
  display: none;
}

/* ---------- Group header ---------- */

.mst-group-head th {
  padding: 15px 24px 8px !important;
  text-align: left !important;
}

.mst-table .mst-group:first-of-type .mst-group-head th {
  padding-top: 15px !important;
}

.mst-group-head-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mst-group-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mst-ink);
}

.mst-group-name::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin: 0 10px 3px 0;
  vertical-align: middle;
  background: var(--mst-accent);
}

.mst-group-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--mst-muted);
}

.mst-group-img {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--mst-line);
}

/* Space between groups. */
.mst-group + .mst-group .mst-row:last-child td,
.mst-group + .mst-group .mst-row:last-child th {
  border-bottom: 0 !important;
}

.mst-group--single .mst-row th,
.mst-group--single .mst-row td {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

/* ---------- Rows ---------- */

.mst-row th,
.mst-row td {
  padding: 2px 6px !important;
  border-bottom: 1px solid var(--mst-line) !important;
  transition: background-color 0.2s ease;
}

.mst-row {
  background: transparent;
}

/* Soft tint of the finish colour across the row on hover. */
@media (hover: hover) {
  .mst-row:hover th,
  .mst-row:hover td {
    background: color-mix(in srgb, var(--mst-row) 9%, #ffffff);
  }
}

.mst-row .mst-label {
  padding-left: 24px !important;
  text-align: left !important;
}

.mst-label-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mst-dot {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mst-row);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.12),
    inset 0 -6px 10px rgba(0, 0, 0, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.12);
}

.mst-label-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--mst-ink);
  line-height: 1.25;
}

/* ---------- Model chips ---------- */

.mst-chip {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 150px;
  min-height: 30px;
  margin: 0;
  padding: 5px 6px;
  border: 1px solid color-mix(in srgb, var(--mst-row) 35%, #dedcd6);
  border-radius: 999px;
  background: #fff;
  color: var(--mst-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

@media (hover: hover) {
  .mst-chip:not(.is-selected):hover {
    border-color: var(--mst-row);
    background: color-mix(in srgb, var(--mst-row) 12%, #ffffff);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.35);
  }
}

.mst-chip:focus-visible {
  outline: 2px solid var(--mst-accent);
  outline-offset: 3px;
}

.mst-chip.is-selected {
  border-color: var(--mst-row);
  background: var(--mst-row);
  color: var(--mst-row-fg);
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px var(--mst-row),
    0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

.mst-na {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  color: #c4c2bc;
  font-size: 16px;
  cursor: default;
}

.mst-footnote {
  margin-top: 16px;
  padding: 0 4px;
  color: var(--mst-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- Preview panel ---------- */

.mst-preview {
  display: flex;
  flex-direction: column;
  scroll-margin-top: var(--mst-sticky-top);
}

.mst-preview-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow: hidden;
  border: 1px solid var(--mst-line);
  border-radius: var(--mst-radius);
  background: var(--mst-surface);
  box-shadow:
    0 1px 2px rgba(20, 20, 20, 0.04),
    0 24px 48px -20px rgba(20, 20, 20, 0.25);
}

.mst-preview-media {
  position: relative;
  flex: 1 1 auto;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 90% at 50% 35%, #ffffff 0%, var(--mst-soft) 70%);
}

.mst-preview-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
  mix-blend-mode: multiply;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

/* ---------- Magnifier zoom ---------- */

.mst-preview-media {
  overflow: hidden;
}

.mst-preview-media.is-zoomable:not(.is-empty) {
  cursor: zoom-in;
}

.mst-preview-media.is-empty {
  cursor: default;
}

.mst-preview-media.is-zooming {
  cursor: crosshair;
  touch-action: none;
}

.mst-preview-media.is-zooming .mst-preview-img {
  transform: scale(var(--mst-zoom, 2.5));
  transition: opacity 0.3s ease, transform 0.25s ease;
}

.mst-zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  color: var(--mst-ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mst-preview-media.is-zoomable:not(.is-empty) .mst-zoom-hint {
  display: inline-flex;
}

.mst-preview-media.is-zooming .mst-zoom-hint {
  opacity: 0;
}

.mst-preview-img.is-loading {
  opacity: 0;
  transform: scale(0.98);
}

.mst-preview-placeholder {
  display: none;
  color: var(--mst-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mst-preview-media.is-empty .mst-preview-placeholder {
  display: block;
}

.mst-preview-media.is-empty .mst-preview-img {
  display: none;
}

.mst-preview-body {
  padding: 22px 24px 24px;
  border-top: 1px solid var(--mst-line);
}

.mst-preview-eyebrow {
  margin: 0 0 6px !important;
  color: var(--mst-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mst-preview-model {
  margin: 0 0 16px !important;
  color: var(--mst-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
}

.mst-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.mst-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  padding: 6px 12px;
  border: 1px solid var(--mst-line);
  border-radius: 999px;
  background: var(--mst-soft);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
}

.mst-tag[hidden] {
  display: none;
}

.mst-tag-caption {
  color: var(--mst-muted);
  font-weight: 500;
}

.mst-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.mst-preview-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
  margin: 20px 0 0 !important;
  padding: 0;
}

.mst-preview-specs[hidden] {
  display: none;
}

.mst-spec {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--mst-soft);
}

.mst-spec dt {
  margin: 0 0 3px;
  color: var(--mst-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mst-spec dd {
  margin: 0;
  color: var(--mst-ink);
  font-size: 16px;
  font-weight: 600;
}

/* ---------- Narrow container: preview above the table ---------- */

@container mst (max-width: 900px) {

  .mst-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .mst-preview {
    position: static;
    order: -1;
  }

  .mst-preview-card {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  }

  .mst-preview-media {
    aspect-ratio: auto;
    min-height: 220px;
    height: 100%;
  }

  .mst-preview-body {
    border-top: 0;
    border-left: 1px solid var(--mst-line);
  }
}

/* ---------- Phone-width container ---------- */

@container mst (max-width: 580px) {

  .mst-layout {
    gap: 18px;
  }

  .mst-preview-card {
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  }

  .mst-preview-media {
    min-height: 150px;
  }

  .mst-preview-img {
    padding: 8px;
  }

  .mst-preview-body {
    padding: 14px 14px 16px;
  }

  .mst-preview-eyebrow {
    font-size: 10px;
    margin-bottom: 3px !important;
  }

  .mst-preview-model {
    font-size: 21px;
    margin-bottom: 10px !important;
  }

  .mst-tag {
    padding: 4px 9px;
    font-size: 11.5px;
  }

  .mst-preview-specs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 12px !important;
  }

  .mst-spec {
    padding: 6px 7px;
    border-radius: 8px;
  }

  .mst-spec dt {
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .mst-spec dd {
    font-size: 13px;
  }

  .mst {
    --mst-radius: 12px;
  }

  .mst-table {
    min-width: 320px;
  }

  .mst-head-spacer,
  .mst-head-finish {
    width: 31%;
  }

  .mst-head-caption th {
    padding-top: 14px !important;
    font-size: 9.5px;
    letter-spacing: 0.12em;
  }

  .mst-head-cols th {
    padding: 8px 2px 12px !important;
  }

  .mst-head-cols .mst-head-finish {
    padding-left: 12px !important;
    font-size: 9.5px;
    letter-spacing: 0.12em;
  }

  .mst-head-size {
    font-size: 22px;
  }

  .mst-group-head th {
    padding: 16px 12px 6px !important;
  }

  .mst-group-name {
    font-size: 10.5px;
    letter-spacing: 0.1em;
  }

  .mst-group-name::before {
    width: 12px;
    margin-right: 7px;
  }

  .mst-group-count {
    display: none;
  }

  .mst-group-img {
    width: 26px !important;
    height: 26px !important;
  }

  .mst-row th,
  .mst-row td {
    padding: 2px 2px !important;
  }

  .mst-row .mst-label {
    padding-left: 12px !important;
  }

  .mst-label-inner {
    gap: 7px;
  }

  .mst-dot {
    width: 16px;
    height: 16px;
  }

  .mst-label-text {
    font-size: 12.5px;
  }

  .mst-chip {
    min-height: 30px;
    padding: 5px 4px;
    font-size: 10.5px;
    letter-spacing: 0;
    white-space: normal;
    border-radius: 10px;
  }

  .mst-chip.is-selected {
    box-shadow:
      0 0 0 2px #fff,
      0 0 0 3.5px var(--mst-row),
      0 8px 16px -8px rgba(0, 0, 0, 0.5);
  }

  .mst-na {
    min-height: 30px;
  }

  .mst-footnote {
    font-size: 12px;
  }
}

/* =========================================================
   Adaptive layout + many-column responsiveness (v1.4)
   ========================================================= */

.mst {
  --mst-label-min: 200px;  /* finish / component column */
  --mst-col-min: 92px;     /* each size column */
}

/* Never squeeze columns below a readable width: scroll sideways instead. */
.mst-table {
  min-width: max(520px, calc(var(--mst-label-min) + var(--mst-cols, 4) * var(--mst-col-min)));
}

/* Pinned first column while scrolling sideways. */
.mst .mst-table tr th.mst-label,
.mst .mst-table tr th.mst-head-finish,
.mst .mst-table tr td.mst-head-spacer {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--mst-surface);
}

.mst-group-head-inner {
  position: sticky;
  left: 24px;
}

.mst.is-scrolled .mst-table th.mst-label,
.mst.is-scrolled .mst-table th.mst-head-finish,
.mst.is-scrolled .mst-table td.mst-head-spacer {
  box-shadow: 8px 0 10px -8px rgba(0, 0, 0, 0.18);
}

.mst.is-scrollable .mst-group-head-inner {
  display: inline-flex;
}

.mst.is-scrollable .mst-group-count {
  display: none;
}

/* Fade on the right edge = "there is more, swipe". */
.mst-table-area {
  position: relative;
}

.mst-table-area::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 40px;
  border-radius: 0 var(--mst-radius) var(--mst-radius) 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 85%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mst.can-scroll-right .mst-table-area::after {
  opacity: 1;
}

/* While the script measures the natural heights. */
.mst.is-measuring .mst-layout {
  align-items: start;
}

.mst.is-measuring .mst-table-area .mst-scroll {
  flex: none;
}

/* Stacked layout on wide screens: short tables (or too many columns to sit
   beside the preview) get the full width, and the preview becomes a wide
   card underneath instead of a tall column with empty space beside it. */
@container mst (min-width: 901px) {

  .mst.is-stacked .mst-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .mst.is-stacked .mst-table-area .mst-scroll {
    flex: none;
  }

  .mst.is-stacked .mst-preview {
    order: 1;
  }

  .mst.is-stacked .mst-preview-card {
    display: grid;
    grid-template-columns: minmax(280px, 40%) minmax(0, 1fr);
  }

  .mst.is-stacked .mst-preview-media {
    min-height: 340px;
    height: 100%;
  }

  .mst.is-stacked .mst-preview-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 34px;
    border-top: 0;
    border-left: 1px solid var(--mst-line);
  }

  .mst.is-stacked .mst-preview-specs {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

@container mst (max-width: 900px) {

  .mst-table {
    --mst-label-min: 170px;
    --mst-col-min: 76px;
  }
}

@container mst (max-width: 580px) {

  .mst-table {
    --mst-label-min: 100px;
    --mst-col-min: 56px;
    min-width: max(300px, calc(var(--mst-label-min) + var(--mst-cols, 4) * var(--mst-col-min)));
  }

  .mst-group-head-inner {
    left: 12px;
  }
}

/* =========================================================
   Popup (lightbox)
   ========================================================= */

html.mst-lb-open,
html.mst-lb-open body {
  overflow: hidden !important;
}

.mst-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mst-lightbox[hidden] {
  display: none;
}

.mst-lightbox.is-open {
  opacity: 1;
}

.mst-lightbox *,
.mst-lightbox *::before,
.mst-lightbox *::after {
  box-sizing: border-box;
}

.mst-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 14, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mst-lb-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1100px, 100%);
  height: min(860px, 100%);
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: scale(0.97) translateY(8px);
  transition: transform 0.25s ease;
}

.mst-lightbox.is-open .mst-lb-frame {
  transform: none;
}

.mst-lb-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  background: radial-gradient(110% 80% at 50% 40%, #ffffff 0%, #f3f1ec 75%);
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
}

.mst-lightbox.is-zoomed .mst-lb-stage {
  cursor: grab;
}

.mst-lightbox.is-dragging .mst-lb-stage {
  cursor: grabbing;
}

.mst-lb-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  mix-blend-mode: multiply;
  will-change: transform;
  -webkit-user-drag: none;
}

.mst-lb-img.is-animating {
  transition: transform 0.25s ease;
}

.mst-lb-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px 14px 24px;
  border-top: 1px solid #ecebe7;
  background: #fff;
  color: #1c1c1e;
}

.mst-lb-caption {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.mst-lb-caption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
}

.mst-lb-caption span {
  color: #74747a;
  font-size: 13px;
}

.mst-lb-tools {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #ecebe7;
  border-radius: 999px;
  background: #f7f6f3;
}

.mst-lb-btn,
.mst-lb-level,
.mst-lb-close {
  appearance: none;
  margin: 0;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.mst-lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: #1c1c1e;
  transition: background-color 0.15s ease;
}

.mst-lb-btn:hover:not(:disabled) {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.mst-lb-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.mst-lb-level {
  min-width: 56px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: transparent;
  color: #1c1c1e;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.mst-lb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #1c1c1e;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease;
}

.mst-lb-close:hover {
  transform: rotate(90deg);
}

.mst-lb-btn:focus-visible,
.mst-lb-level:focus-visible,
.mst-lb-close:focus-visible,
.mst-preview-media:focus-visible {
  outline: 2px solid var(--mst-accent, #7a1f2e);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .mst-lightbox {
    padding: 0;
  }

  .mst-lb-frame {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .mst-lb-stage {
    padding: 12px;
  }

  .mst-lb-bar {
    padding: 10px 12px 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .mst-lb-caption strong {
    font-size: 17px;
  }

  .mst-lb-caption span {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mst-lightbox,
  .mst-lb-frame,
  .mst-lb-img.is-animating,
  .mst-preview-media.is-zooming .mst-preview-img,
  .mst-chip,
  .mst-preview-img,
  .mst-row th,
  .mst-row td {
    transition: none;
  }
}
