:root {
  --bg: #151617;
  --bg-deep: #090a0b;
  --metal-1: #6a6d6f;
  --metal-2: #3c3f41;
  --metal-3: #1c1e20;
  --metal-edge: rgba(242, 242, 238, .34);
  --line: rgba(232, 232, 226, .16);
  --line-strong: rgba(238, 238, 232, .34);
  --text: #f4f4f1;
  --muted: #bcbdb9;
  --dim: #8f918e;
  --accent: #68ded0;
  --green: #86e6aa;
  --orange: #efc47d;
  --red: #ff8a90;
  --shadow: 0 14px 42px rgba(0, 0, 0, .48);
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.014) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.009) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 50% -20%, rgba(255,255,255,.12), transparent 38%),
    linear-gradient(180deg, #202224, #111214 48%, #090a0b);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.35;
}
button, input, select { font: inherit; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }

.page-shell { width: min(1540px, calc(100% - 22px)); margin: 0 auto; padding: 10px 0 38px; }
.metal-panel {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.022) 0 1px, rgba(0,0,0,.018) 1px 3px, transparent 3px 7px),
    linear-gradient(115deg, rgba(255,255,255,.08), transparent 20%, rgba(255,255,255,.025) 48%, transparent 72%),
    linear-gradient(180deg, rgba(91,94,96,.98), rgba(49,52,54,.99) 16%, rgba(27,29,31,.995));
  border: 1px solid var(--metal-edge);
  box-shadow: inset 0 1px rgba(255,255,255,.16), inset 0 -1px rgba(0,0,0,.58), var(--shadow);
}
.riveted { position: relative; }
.riveted::before,
.riveted::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fafafa 0 10%, #a7a8a6 31%, #565856 62%, #171817 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 1px 2px rgba(0,0,0,.82);
  pointer-events: none;
}
.riveted::before { left: 8px; }
.riveted::after { right: 8px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 80px;
  padding: 10px 17px 10px 20px;
  border-radius: 15px;
  overflow: hidden;
}
.hero-copy { min-width: 0; }
.eyebrow, .section-kicker {
  margin-bottom: 2px;
  color: var(--accent);
  font-size: .61rem;
  font-weight: 900;
  letter-spacing: .17em;
  text-transform: uppercase;
}
h1 { margin-bottom: 2px; font-size: clamp(1.46rem, 2.5vw, 2.12rem); line-height: 1.02; letter-spacing: -.035em; }
.hero-summary { margin-bottom: 0; color: var(--muted); font-size: .74rem; }
.server-card {
  min-width: 230px;
  padding: 8px 11px;
  border: 1px solid rgba(235,235,229,.28);
  border-radius: 9px;
  background: rgba(10,11,12,.58);
  box-shadow: inset 0 1px rgba(255,255,255,.07);
}
.status-line { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; font-size: .78rem; }
.server-card small { color: var(--muted); font-size: .66rem; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #838582; }
.status-dot.online, .status-dot.completed { background: var(--green); box-shadow: 0 0 12px rgba(134,230,170,.65); }
.status-dot.running { background: var(--orange); box-shadow: 0 0 12px rgba(239,196,125,.68); animation: pulse 1.2s infinite; }
.status-dot.failed, .status-dot.cancelled, .status-dot.timed_out { background: var(--red); }
@keyframes pulse { 50% { transform: scale(1.3); } }

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: 7px 0;
  padding: 3px;
  border-radius: 10px;
  box-shadow: inset 0 1px rgba(255,255,255,.12), 0 5px 18px rgba(0,0,0,.32);
  scrollbar-width: thin;
}
.tab-btn {
  flex: 0 0 auto;
  min-width: 132px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(8,9,10,.35);
  color: #d0d0cc;
  cursor: pointer;
  font-size: .74rem;
  font-weight: 850;
}
.tab-btn:hover { color: white; background: rgba(255,255,255,.075); }
.tab-btn.active {
  color: #111211;
  border-color: rgba(255,255,255,.62);
  background: linear-gradient(180deg, #f1f1ee, #c7c8c5 47%, #858987 49%, #b9bbb8);
  box-shadow: inset 0 1px white, 0 3px 10px rgba(0,0,0,.38);
}

/* Tab DOM remains persistent in v1.19.40 so Global comet animation never restarts on task polling. */
.tab-btn, .tab-dropdown-item { position: relative; isolation: isolate; }

.workspace { display: grid; grid-template-columns: minmax(470px, .92fr) minmax(570px, 1.22fr); gap: 10px; align-items: start; }
.left-column, .right-column { display: grid; gap: 10px; min-width: 0; }
.card { min-width: 0; border-radius: var(--radius); overflow: hidden; }
.card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 16px 9px;
  border-bottom: 1px solid rgba(238,238,232,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(0,0,0,.14));
}
.card-header.compact { padding-top: 10px; padding-bottom: 8px; }
.setup-header { min-height: 70px; padding-top: 10px; padding-bottom: 7px; }
.preview-header { min-height: 60px; padding-top: 9px; padding-bottom: 7px; }
.card-header h2 { margin-bottom: 2px; font-size: 1.02rem; letter-spacing: -.018em; }
.card-header p:last-child { margin-bottom: 0; color: var(--muted); font-size: .71rem; }
.card-body { min-width: 0; padding: 12px 16px 15px; }
.setup-body { padding-top: 10px; }
.preview-body { min-width: 0; padding-top: 10px; }
.model-badge {
  max-width: 260px;
  padding: 5px 8px;
  border: 1px solid rgba(238,238,232,.27);
  border-radius: 8px;
  color: #ededeb;
  background: rgba(8,9,10,.42);
  font-size: .62rem;
  font-weight: 760;
  line-height: 1.25;
  text-align: center;
}

.form-section > h3, .compact-heading { margin-bottom: 8px; font-size: .86rem; }
.inline-section-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.inline-section-title h3 { margin-bottom: 0; font-size: .86rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 11px; }
.domain-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 4px; color: #e2e2de; font-size: .69rem; font-weight: 800; }
.field small { display: block; margin-top: 4px; color: var(--dim); font-size: .62rem; }
input, select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: none;
  color: var(--text);
  background: linear-gradient(180deg, rgba(9,10,11,.96), rgba(27,29,30,.96));
  box-shadow: inset 0 1px 3px rgba(0,0,0,.82), 0 1px rgba(255,255,255,.045);
}
select { color-scheme: dark; }
select option { color: #141514; background: #eeeeeb; }
select option:checked { color: #ffffff; background: #4c5150; }
input[type="number"] { min-width: 96px; padding-right: 12px; font-variant-numeric: tabular-nums; appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(104,222,208,.10), inset 0 1px 3px rgba(0,0,0,.76); }
input:invalid, .invalid-input { border-color: var(--red) !important; }
input[readonly] { color: #d1d2cf; background: rgba(15,16,17,.72); }
.input-pair { display: grid; grid-template-columns: minmax(115px,1fr) minmax(116px,.72fr); gap: 6px; }
.wide-number { grid-template-columns: minmax(125px,1fr) minmax(116px,.82fr); }
.section-divider { height: 1px; margin: 13px 0; background: linear-gradient(90deg, transparent, rgba(238,238,232,.30), transparent); }
.section-title-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 9px; }
.compact-row { margin-bottom: 8px; }
.section-title-row h3 { margin-bottom: 2px; font-size: .86rem; }
.section-title-row p { margin-bottom: 0; color: var(--muted); font-size: .68rem; }
.pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(104,222,208,.08);
  border: 1px solid rgba(104,222,208,.22);
  color: #d7fffa;
  font-size: .62rem;
  font-weight: 850;
  white-space: nowrap;
}
.inline-validation { min-height: 16px; margin-top: 5px; color: var(--red); font-size: .65rem; }
.probe-builder { display: grid; grid-template-columns: 1.15fr .9fr .72fr .72fr auto; gap: 7px; align-items: end; }
.align-end { align-self: end; }
.probe-list { display: grid; gap: 6px; margin-top: 8px; }
.probe-list.empty { padding: 9px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); font-size: .68rem; text-align: center; }
.probe-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; align-items: center; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(8,9,10,.43); font-size: .68rem; }
.probe-row small { color: var(--muted); }
.remove-probe { border: 0; background: transparent; color: var(--red); cursor: pointer; font-weight: 900; }
.schedule-grid { display: grid; grid-template-columns: repeat(2, minmax(210px,1fr)); gap: 9px 10px; }
.frame-count-field { grid-column: 1 / -1; max-width: 245px; }

.preview-body canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #17191a;
  box-shadow: inset 0 0 18px rgba(0,0,0,.70);
}
#geometryCanvas { height: clamp(220px, 24vw, 340px); cursor: crosshair; }
#initialCanvas { height: clamp(200px, 18vw, 280px); }
.initial-preview-card { min-width: 0; align-self: start; }
.initial-preview-card .preview-body { overflow: hidden; }
.preview-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; color: var(--muted); font-size: .64rem; }
.preview-subheader { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin: 10px 2px 6px; }
.preview-subheader h3 { margin-bottom: 0; font-size: .83rem; }
.preview-subheader span { color: var(--muted); font-size: .63rem; }

.run-card .card-body { padding-top: 11px; padding-bottom: 12px; }
.run-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.button-row { display: flex; gap: 7px; flex-wrap: wrap; }
.primary-btn, .secondary-btn, .danger-btn, .icon-btn { border-radius: 7px; cursor: pointer; font-weight: 840; transition: 140ms ease; }
.primary-btn {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.62);
  color: #111211;
  background: linear-gradient(180deg, #f1f1ee, #c6c7c4 48%, #878a88 50%, #b8bab7);
  box-shadow: inset 0 1px white, 0 4px 10px rgba(0,0,0,.38);
}
.primary-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.secondary-btn { min-height: 38px; padding: 8px 12px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(156,158,157,.28), rgba(28,30,31,.62)); }
.danger-btn { min-height: 38px; padding: 8px 12px; border: 1px solid rgba(255,138,144,.38); color: #ffdadd; background: rgba(118,35,42,.27); }
button:disabled { opacity: .38; cursor: not-allowed; transform: none !important; }
.job-summary { display: flex; align-items: center; gap: 7px; font-size: .73rem; }
.progress-shell { height: 9px; margin-top: 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(3,4,5,.82); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #b9bab7, var(--accent), var(--green)); transition: width .2s ease; }
.progress-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; color: var(--muted); font-size: .64rem; }

.viewer-card { margin-top: 10px; }
.viewer-header { align-items: end; }
.viewer-actions { display: flex; gap: 7px; align-items: end; }
.compact-field { min-width: 200px; }
.result-stage { position: relative; min-height: 420px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 9px; background: #181a1b; overflow: auto; }
.result-stage img { display: block; width: 100%; height: auto; }
.stage-overlay[hidden] { display: none !important; }
.stage-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(20,21,22,.84); text-align: center; }
.stage-overlay strong { display: block; margin-bottom: 4px; }
.stage-overlay span { color: var(--muted); font-size: .73rem; }
.spinner { width: 36px; height: 36px; margin: 0 auto 9px; border: 4px solid rgba(255,255,255,.12); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.frame-toolbar { display: flex; justify-content: center; align-items: end; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.icon-btn { width: 42px; height: 39px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(158,160,159,.25), rgba(22,24,25,.70)); }
.play-btn { width: 46px; color: var(--accent); }
.frame-number { display: grid; grid-template-columns: minmax(90px,1fr) auto; align-items: center; min-width: 220px; height: 39px; border: 1px solid var(--line-strong); border-radius: 7px; background: rgba(8,9,10,.87); overflow: hidden; }
.frame-number input { min-width: 105px; height: 37px; border: 0; border-radius: 0; background: transparent; text-align: center; font-size: .92rem; }
.frame-number span { padding-right: 11px; color: var(--muted); font-size: .72rem; font-weight: 850; }
.field-inline { display: flex; align-items: end; gap: 5px; }
.field-inline label { margin-bottom: 11px; color: var(--muted); font-size: .64rem; font-weight: 800; }
.suffix-input { display: grid; grid-template-columns: 68px auto; align-items: center; height: 39px; border: 1px solid var(--line-strong); border-radius: 7px; background: rgba(8,9,10,.87); overflow: hidden; }
.suffix-input input { width: 68px; min-width: 68px; height: 37px; border: 0; border-radius: 0; background: transparent; text-align: center; }
.suffix-input span { padding-right: 8px; color: var(--muted); font-size: .7rem; }
.preload-status { align-self: center; max-width: 230px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: #d0d0cd; background: rgba(8,9,10,.46); font-size: .62rem; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preload-status.ready { color: #d7f8e2; border-color: rgba(134,230,170,.30); }
.preload-status.loading { color: #f5dfba; border-color: rgba(239,196,125,.32); }
.validation-message { min-height: 16px; margin-top: 4px; color: var(--red); text-align: center; font-size: .65rem; }

.lower-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 10px; margin-top: 10px; }
.compare-controls { display: grid; grid-template-columns: 1.25fr 1.25fr .85fr .5fr auto; gap: 7px; align-items: end; }
.compare-stage { min-height: 190px; display: grid; place-items: center; margin-top: 10px; border: 1px dashed var(--line-strong); border-radius: 8px; overflow: auto; color: var(--muted); background: rgba(8,9,10,.38); font-size: .72rem; }
.compare-stage img { display: block; width: 100%; height: auto; }
.table-wrap { overflow-x: auto; }
.jobs-table { width: 100%; border-collapse: collapse; font-size: .67rem; }
.jobs-table th, .jobs-table td { padding: 7px 7px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.jobs-table th { color: #e0e0dc; }
.jobs-table td { color: var(--muted); }
.jobs-table button { padding: 4px 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: rgba(255,255,255,.05); cursor: pointer; font-size: .63rem; }
.state-chip { padding: 3px 6px; border-radius: 999px; border: 1px solid var(--line); font-weight: 800; }
.state-chip.completed { color: #c9f8d9; border-color: rgba(134,230,170,.28); }
.state-chip.running, .state-chip.queued { color: #f5dfba; border-color: rgba(239,196,125,.28); }
.state-chip.failed, .state-chip.cancelled, .state-chip.timed_out, .state-chip.unstable { color: #ffd2d5; border-color: rgba(255,138,144,.28); }
footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; padding: 9px 3px; color: #858784; font-size: .63rem; }

.tooltip-bubble {
  position: fixed;
  z-index: 9999;
  max-width: 330px;
  padding: 8px 10px;
  border: 1px solid rgba(240,240,235,.42);
  border-radius: 8px;
  color: #f4f4f0;
  background: linear-gradient(180deg, rgba(85,87,87,.98), rgba(25,27,27,.99));
  box-shadow: 0 10px 28px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.13);
  font-size: .69rem;
  line-height: 1.38;
  pointer-events: none;
}

@media (max-width: 1120px) {
  .workspace, .lower-grid { grid-template-columns: 1fr; }
  .probe-builder { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .probe-builder button { grid-column: 1 / -1; }
  #geometryCanvas { height: clamp(220px, 40vw, 360px); }
  #initialCanvas { height: clamp(190px, 31vw, 290px); }
}
@media (max-width: 760px) {
  .page-shell { width: calc(100% - 12px); padding-top: 6px; }
  .hero { grid-template-columns: 1fr; gap: 8px; padding: 12px 15px; }
  .server-card { width: 100%; min-width: 0; }
  .form-grid, .domain-grid, .schedule-grid, .probe-builder, .compare-controls { grid-template-columns: 1fr; }
  .frame-count-field, .field.full { grid-column: auto; max-width: none; }
  .card-header, .card-body { padding-left: 12px; padding-right: 12px; }
  .card-header, .viewer-header, .run-toolbar, .preview-footer, footer { flex-direction: column; align-items: stretch; }
  .viewer-actions { flex-direction: column; align-items: stretch; }
  .compact-field { min-width: 0; }
  .result-stage { min-height: 240px; }
  .frame-number { min-width: 155px; }
  .field-inline { width: 100%; justify-content: center; }
  .preload-status { max-width: 100%; text-align: center; }
  #geometryCanvas { height: 230px; }
  #initialCanvas { height: 200px; }
}

.initial-preview-card .card-header { min-height: 54px; }
.initial-preview-card .card-body { padding-top: 8px; padding-bottom: 10px; }
.initial-header p:last-child { margin-bottom: 0; }

/* v1.4.0/v1.5.1 Meteotsunami authenticated workflow */
.auth-status { display:block; margin-top:3px; color:#d5c98d; font-size:.68rem; }
.auth-status.authenticated { color:#8de2b0; }
.meteo-workflow { border:1px solid rgba(205,210,207,.28); border-radius:10px; padding:12px; background:rgba(12,13,13,.34); }
.meteo-auth-message { display:flex; flex-direction:column; gap:2px; margin-bottom:10px; color:#d8dcda; }
.meteo-auth-message span { color:#aeb4b1; font-size:.76rem; }
.meteo-auth-message a { color:#7be8dc; }
.meteo-preview-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.preview-confirm-row { display:flex !important; align-items:center; gap:8px; margin-top:10px; color:#e5e7e4 !important; }
.preview-confirm-row input { width:18px; height:18px; flex:0 0 auto; }
#geometryCanvas { touch-action:none; cursor:crosshair; }
#probeSection[hidden] { display:none !important; }

/* v1.5.1 shared FluidLab login and proportional Meteotsunami previews */
.auth-control-row { display:flex; align-items:center; justify-content:space-between; gap:9px; margin-top:3px; }
.auth-control-row .auth-status { margin-top:0; min-width:0; }
.auth-action-btn {
  flex:0 0 auto;
  min-height:24px;
  padding:3px 8px;
  border:1px solid rgba(235,236,232,.28);
  border-radius:6px;
  color:#ededeb;
  background:linear-gradient(180deg, rgba(161,164,162,.25), rgba(30,32,32,.62));
  box-shadow:inset 0 1px rgba(255,255,255,.10);
  font-size:.61rem;
  font-weight:820;
  cursor:pointer;
}
.auth-action-btn:hover { filter:brightness(1.12); }
.inline-login-btn {
  margin-left:6px;
  padding:2px 7px;
  border:1px solid rgba(132,230,216,.35);
  border-radius:5px;
  color:#dffffa;
  background:rgba(67,132,123,.18);
  font:inherit;
  font-weight:820;
  cursor:pointer;
}

#geometryCanvas.meteo-proportional,
#initialCanvas.meteo-proportional {
  height:auto !important;
  aspect-ratio:var(--meteo-aspect, 1.2);
}
.preview-card.meteo-proportional-card .preview-body,
.initial-preview-card.meteo-proportional-card .preview-body { overflow:visible; }

.login-modal[hidden] { display:none !important; }
.login-modal {
  position:fixed;
  inset:0;
  z-index:10020;
  display:grid;
  place-items:center;
  padding:18px;
}
.login-backdrop {
  position:absolute;
  inset:0;
  background:rgba(4,5,5,.76);
  backdrop-filter:blur(5px);
}
.login-panel {
  position:relative;
  z-index:1;
  width:min(440px, 100%);
  padding:22px;
  border-radius:14px;
  box-shadow:0 28px 80px rgba(0,0,0,.72), inset 0 1px rgba(255,255,255,.16);
}
.login-panel h2 { margin:0 34px 6px 0; font-size:1.2rem; }
.login-copy { margin:0 0 16px; color:var(--muted); font-size:.76rem; line-height:1.5; }
.login-panel form { display:grid; gap:11px; }
.login-close {
  position:absolute;
  top:10px;
  right:12px;
  width:30px;
  height:30px;
  border:1px solid rgba(240,240,235,.24);
  border-radius:7px;
  color:#ededeb;
  background:rgba(12,13,13,.42);
  font-size:1.25rem;
  line-height:1;
  cursor:pointer;
}
.login-message { min-height:20px; color:#d8dcda; font-size:.72rem; }
.login-message.error { color:#ff9da2; }
.login-message.success { color:#91e9b4; }
.login-verification-help {
  display:grid;
  gap:5px;
  margin-top:1px;
  padding:10px 11px;
  border:1px solid rgba(255,190,72,.42);
  border-radius:8px;
  background:rgba(255,176,32,.08);
  color:var(--text);
  font-size:.72rem;
  line-height:1.45;
}
.login-verification-help[hidden] { display:none !important; }
.login-verification-help strong { color:#ffd27a; }
.login-verification-help a {
  width:max-content;
  max-width:100%;
  color:#ffd27a;
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:2px;
}

.login-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:2px; }
.login-note { margin:14px 0 0; padding-top:11px; border-top:1px solid rgba(235,236,232,.14); color:var(--dim); font-size:.65rem; line-height:1.45; }
body.login-open { overflow:hidden; }

@media (max-width:760px) {
  .auth-control-row { align-items:flex-start; }
  .login-panel { padding:18px; }
  .login-actions { flex-direction:column; }
  .login-actions button { width:100%; }
}

/* v1.6.0 persistent Meteotsunami Last Preview workflow */
.meteo-preview-mode {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0 0 9px;
  padding:7px 9px;
  border:1px solid rgba(220,223,220,.22);
  border-radius:7px;
  background:rgba(224,226,223,.06);
}
.meteo-preview-mode strong { color:#f0f1ef; font-size:.78rem; letter-spacing:.025em; }
.meteo-preview-mode span { color:#b8bdb9; font-size:.69rem; }
.meteo-workflow.preview-locked {
  border-color:rgba(121,224,190,.36);
  box-shadow:inset 0 0 0 1px rgba(121,224,190,.06);
}
.meteo-workflow.preview-editing { border-color:rgba(227,194,112,.34); }
#parameterForm :is(input, select):disabled,
#domainGridForm :is(input, select):disabled {
  opacity:.76;
  color:#d7dad7;
  border-color:rgba(220,223,220,.18);
  background:linear-gradient(180deg, rgba(25,27,27,.96), rgba(12,13,13,.98));
  cursor:not-allowed;
}
#parameterForm :is(input, select):disabled:hover,
#domainGridForm :is(input, select):disabled:hover { filter:none; }

/* v1.7.0 run-history and account controls */
.setup-header-tools { display: grid; justify-items: end; gap: 8px; min-width: 280px; }
.run-mode-control {
  display: grid;
  grid-template-columns: auto 98px auto;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid rgba(238,238,233,.34);
  border-radius: 11px;
  color: #aeb0ad;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, rgba(0,0,0,.025) 1px 3px),
    linear-gradient(180deg, #151716, #292b2a 48%, #0d0f0e);
  box-shadow: inset 0 3px 8px rgba(0,0,0,.78), inset 0 -1px rgba(255,255,255,.12), 0 1px rgba(255,255,255,.08);
  font-size: .66rem;
  font-weight: 850;
  white-space: nowrap;
}
.run-mode-control span.active { color: #ffe074; text-shadow: 0 0 8px rgba(255,224,116,.22); }
.run-mode-control input[type="range"] {
  width: 98px;
  height: 24px;
  min-width: 98px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: grab;
  accent-color: #d8d9d5;
}
.run-mode-control input[type="range"]:active { cursor: grabbing; }
.run-mode-control input[type="range"]::-webkit-slider-runnable-track {
  height: 14px;
  border: 1px solid #050606;
  border-radius: 999px;
  background: linear-gradient(180deg, #070808, #242625);
  box-shadow: inset 0 3px 5px rgba(0,0,0,.9), 0 1px rgba(255,255,255,.12);
}
.run-mode-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 36px;
  height: 20px;
  margin-top: -4px;
  border: 1px solid #f3f3ef;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #d9dad7 0 2px, #a8aaa7 2px 4px);
  box-shadow: 0 2px 5px rgba(0,0,0,.8), inset 0 1px #fff;
}
.run-mode-control input[type="range"]::-moz-range-track { height: 14px; border: 1px solid #050606; border-radius: 999px; background: #101211; box-shadow: inset 0 3px 5px rgba(0,0,0,.9); }
.run-mode-control input[type="range"]::-moz-range-thumb { width: 36px; height: 20px; border: 1px solid #f3f3ef; border-radius: 999px; background: #c4c6c3; box-shadow: 0 2px 5px rgba(0,0,0,.8); }

.field.locked-field { position: relative; opacity: .72; }
.field.locked-field::after {
  content: "🔒";
  position: absolute;
  right: 9px;
  top: 29px;
  z-index: 2;
  font-size: .78rem;
  filter: grayscale(1);
  pointer-events: none;
}
.field.locked-field input,
.field.locked-field select { padding-right: 34px; color: #b8bab7; background: rgba(13,14,14,.82); }
.last-run-locked .schedule-grid,
.last-run-locked #probeSection { opacity: .68; }
.last-run-locked .schedule-grid input,
.last-run-locked .schedule-grid select,
.last-run-locked #probeSection input,
.last-run-locked #probeSection select,
.last-run-locked #probeSection button { pointer-events: none; }

.gated-card { position: relative; min-height: 260px; }
.auth-gate-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 28px;
  border-radius: inherit;
  text-align: center;
  background: rgba(18,19,19,.88);
  backdrop-filter: blur(3px) grayscale(.6);
}
.auth-gate-overlay[hidden] { display: none !important; }
.auth-gate-overlay strong { color: #f0f0eb; font-size: 1rem; }
.auth-gate-overlay span { max-width: 420px; color: #b8bab6; font-size: .72rem; line-height: 1.5; }
.gate-login-btn { min-width: 110px; }

.auth-status.authenticated .auth-user,
.signed-user-name { color: #ffe074; font-weight: 950; text-shadow: 0 0 9px rgba(255,224,116,.18); }

.playback-cluster {
  display: flex;
  align-items: center;
  height: 41px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8,9,9,.98), rgba(31,33,32,.95));
  box-shadow: inset 0 2px 5px rgba(0,0,0,.72);
  overflow: hidden;
}
.playback-cluster .play-btn { width: 43px; height: 35px; border: 0; border-right: 1px solid var(--line); border-radius: 6px 0 0 6px; }
.playback-cluster .compact-suffix { height: 35px; border: 0; border-radius: 0 6px 6px 0; background: transparent; }
.playback-cluster .compact-suffix input { height: 33px; width: 48px; min-width: 48px; }
.compact-frame-number { min-width: 142px; width: 142px; grid-template-columns: 78px auto; }
.compact-frame-number input { min-width: 68px; width: 68px; }

.quota-job-summary { margin: 12px 0; padding: 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(8,9,9,.62); color: #d2d3cf; font-size: .72rem; line-height: 1.55; }
.delete-job-btn { color: #ffd1d4 !important; border-color: rgba(255,138,144,.35) !important; background: rgba(107,28,34,.28) !important; }
.expires-soon { color: #ffe074 !important; }

/* Meteotsunami maps use the full canvas without external coordinate labels. */
body.meteotsunami-active #previewHint { max-width: 60%; }

@media (max-width: 820px) {
  .setup-header-tools { justify-items: start; min-width: 0; }
  .run-mode-control { grid-template-columns: auto 86px auto; }
  .run-mode-control input[type="range"] { width: 86px; min-width: 86px; }
  .compact-frame-number { width: 132px; min-width: 132px; }
}
.run-mode-control span.unavailable { opacity: .42; }
.compact-frame-number { min-width: 116px; width: 116px; grid-template-columns: 54px auto; }
.compact-frame-number input { min-width: 50px; width: 50px; padding-inline: 6px; }
@media (max-width: 820px) {
  .compact-frame-number { width: 110px; min-width: 110px; grid-template-columns: 50px auto; }
}

/* v1.8.0 run-mode placement, locking transition, and Meteotsunami preview controls */
.setup-header-tools { min-width: 0; }
.model-parameter-zone {
  position: relative;
  padding: 0;
  border: 1px solid rgba(230,231,227,.24);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(12,13,13,.28);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.model-parameter-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, rgba(0,0,0,.025) 1px 4px),
    linear-gradient(135deg, rgba(218,219,216,.42), rgba(136,139,137,.28) 48%, rgba(205,207,204,.35));
  transition: opacity .2s ease;
}
.model-parameter-zone.last-run {
  border-color: rgba(239,240,236,.58);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 4px 14px rgba(0,0,0,.24);
}
.model-parameter-zone.last-run::before { opacity: 1; }
.model-parameter-zone > * { position: relative; z-index: 1; }
.run-mode-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 7px 10px 7px 13px;
  border-bottom: 1px solid rgba(232,233,229,.25);
  background: linear-gradient(180deg, rgba(122,125,123,.22), rgba(23,24,24,.28));
}
.run-mode-caption {
  color: #d7d8d4;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.run-mode-dock .run-mode-control { margin-left: auto; }
.model-parameter-content { padding: 12px 12px 13px; }
.model-parameter-content .compact-heading { margin-bottom: 9px; }
.model-parameter-zone.last-run .compact-heading,
.model-parameter-zone.last-run .field label { color: #f4f4ef; text-shadow: 0 1px 2px rgba(0,0,0,.72); }

/* Output timing remains editable in Last Run. */
.last-run-locked .schedule-grid { opacity: 1 !important; }
.last-run-locked .schedule-grid input,
.last-run-locked .schedule-grid select { pointer-events: auto !important; opacity: 1 !important; }

/* Give the probe type and coordinates more room. */
.probe-builder {
  grid-template-columns: minmax(118px,1.22fr) minmax(62px,.52fr) minmax(88px,.78fr) minmax(88px,.78fr) 64px;
  gap: 5px;
}
.probe-add-btn {
  width: 64px;
  min-width: 64px;
  padding: 5px 6px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: .62rem;
  line-height: 1.02;
  white-space: normal;
}

.initial-header { align-items: center; }
.meteo-preview-header-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(235,236,232,.31);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(9,10,10,.88), rgba(48,50,49,.76));
  box-shadow: inset 0 2px 5px rgba(0,0,0,.7), 0 1px rgba(255,255,255,.08);
}
.meteo-preview-header-controls[hidden] { display: none !important; }
.meteo-preview-header-controls .icon-btn {
  width: 36px;
  height: 32px;
  min-height: 32px;
}
.meteo-preview-frame-label {
  min-width: 54px;
  padding-inline: 7px;
  text-align: center;
}
.meteo-preview-play { color: var(--accent); }
.meteo-generate-row { display: block; }
.meteo-generate-row .primary-btn { width: 100%; }

@media (max-width: 1120px) {
  .probe-builder { grid-template-columns: 1.25fr .55fr .8fr .8fr 64px; }
  .probe-builder button { grid-column: auto; }
}
@media (max-width: 760px) {
  .run-mode-dock { align-items: stretch; flex-direction: column; }
  .run-mode-dock .run-mode-control { margin-left: 0; align-self: flex-start; }
  .probe-builder { grid-template-columns: 1fr; }
  .probe-builder button { grid-column: auto; width: 100%; min-width: 0; flex-direction: row; gap: 4px; }
  .initial-header { align-items: stretch; }
  .meteo-preview-header-controls { align-self: flex-start; }
}

/* v1.9.0 operational statistics entry */
.server-card { position: relative; padding-right: 42px; }
.statistics-admin-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(230, 235, 232, 0.34);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(225, 229, 226, 0.18), rgba(36, 39, 39, 0.75));
  color: #f0f1ee;
  text-decoration: none;
  font-size: 17px;
  line-height: 1;
  box-shadow: inset 0 1px rgba(255,255,255,.18), 0 2px 8px rgba(0,0,0,.35);
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
  z-index: 3;
}
.statistics-admin-btn:hover,
.statistics-admin-btn:focus-visible {
  transform: rotate(18deg);
  border-color: rgba(105, 223, 206, .8);
  background: linear-gradient(180deg, rgba(105, 223, 206, .24), rgba(34, 38, 37, .88));
  outline: none;
}

/* v1.10.0 compact history/comparison layout and synchronized-field feedback */

/* All actionable controls now use the same machined hover and press behavior. */
button,
.statistics-admin-btn,
.inline-login-btn,
.auth-action-btn {
  transition: transform .12s ease, filter .12s ease, border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
button:not(:disabled):hover,
.inline-login-btn:hover,
.auth-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.10);
  border-color: rgba(255,255,250,.62);
  box-shadow: inset 0 1px rgba(255,255,255,.22), 0 5px 12px rgba(0,0,0,.42);
}
button:not(:disabled):active,
.inline-login-btn:active,
.auth-action-btn:active {
  transform: translateY(1px) scale(.985);
  filter: brightness(.94);
  box-shadow: inset 0 3px 7px rgba(0,0,0,.66), 0 1px 2px rgba(0,0,0,.32);
}
button:focus-visible,
.statistics-admin-btn:focus-visible,
.inline-login-btn:focus-visible,
.auth-action-btn:focus-visible {
  outline: 2px solid rgba(255,224,116,.88);
  outline-offset: 2px;
}

/* Inputs and dropdowns reveal their interactive boundary before focus. */
input:not([type="range"]),
select {
  transition: border-color .14s ease, box-shadow .14s ease, filter .14s ease, background .14s ease;
}
input:not([type="range"]):hover:not(:disabled):not([readonly]),
select:hover:not(:disabled) {
  border-color: rgba(242,243,237,.68);
  filter: brightness(1.08);
  box-shadow: 0 0 0 2px rgba(232,234,228,.08), inset 0 1px 3px rgba(0,0,0,.72);
}
input:not([type="range"]):active:not(:disabled):not([readonly]),
select:active:not(:disabled) {
  filter: brightness(.97);
}

/* Start/cancel/export now form the top operational strip of Live Output. */
.live-run-strip {
  display: grid;
  grid-template-columns: auto minmax(300px, 1fr);
  gap: 14px;
  align-items: center;
  padding: 9px 16px 10px;
  border-bottom: 1px solid rgba(238,238,232,.18);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 1px, rgba(0,0,0,.018) 1px 4px),
    linear-gradient(180deg, rgba(12,13,13,.28), rgba(0,0,0,.22));
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.live-run-actions { align-items: center; }
.live-job-progress { min-width: 0; }
.live-job-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .68rem;
}
.live-job-progress .progress-shell { margin-top: 5px; }
.live-job-progress .progress-meta { margin-top: 3px; }
.viewer-card { overflow: hidden; }

/* Comparison and Recent Jobs share the viewport equally. */
.lower-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.compare-controls {
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto;
  grid-template-rows: auto auto;
  gap: 7px 8px;
}
.compare-controls > .field:nth-child(1) { grid-column: 1; grid-row: 1; }
.compare-controls > .field:nth-child(2) { grid-column: 2; grid-row: 1; }
.compare-controls > .field:nth-child(3) { grid-column: 1; grid-row: 2; }
.compare-controls > .field:nth-child(4) { grid-column: 2; grid-row: 2; }
.compare-controls > #compareBtn { grid-column: 3; grid-row: 2; min-width: 86px; }

/* Expiration date and time are two compact lines without increasing row height. */
.jobs-table th,
.jobs-table td { vertical-align: middle; }
.expiry-stamp {
  display: inline-grid;
  grid-auto-flow: row;
  gap: 0;
  line-height: 1.02;
  white-space: normal;
  font-size: .61rem;
  font-variant-numeric: tabular-nums;
}
.expiry-stamp > span { display: block; }

/* Linked controls visibly announce that one edit updates the other control. */
@keyframes linkedYellowPulse {
  0%, 100% {
    border-color: rgba(255,222,92,.72);
    box-shadow: 0 0 0 2px rgba(255,222,92,.10), 0 0 9px rgba(255,222,92,.16), inset 0 1px 3px rgba(0,0,0,.72);
  }
  50% {
    border-color: #ffe266;
    box-shadow: 0 0 0 3px rgba(255,226,102,.22), 0 0 17px rgba(255,226,102,.42), inset 0 1px 3px rgba(0,0,0,.68);
  }
}
.linked-sync-active :is(input:not([type="range"]), select),
.linked-track-active :is(input:not([type="range"]), select) {
  animation: linkedYellowPulse .58s ease-in-out infinite;
  border-color: #ffe266 !important;
}
.linked-sync-active label,
.linked-track-active label { color: #ffe98e; }

@media (max-width: 1120px) {
  .live-run-strip { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .live-run-strip { padding-inline: 12px; }
  .live-run-actions > button { flex: 1 1 auto; }
  .compare-controls { grid-template-columns: 1fr; grid-template-rows: none; }
  .compare-controls > .field:nth-child(n),
  .compare-controls > #compareBtn { grid-column: 1; grid-row: auto; }
  .compare-controls > #compareBtn { width: 100%; }
}
.statistics-admin-btn:active {
  transform: rotate(18deg) translateY(1px) scale(.96);
  filter: brightness(.92);
}
@media (max-width: 1120px) {
  .lower-grid { grid-template-columns: 1fr; }
}

/* v1.11.0 job controls precede results and expose numerical health. */
.viewer-card > .live-run-strip {
  border-bottom: 1px solid rgba(238,238,232,.22);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.022) 0 1px, rgba(0,0,0,.022) 1px 4px),
    linear-gradient(180deg, rgba(78,80,79,.42), rgba(20,21,21,.52));
}
.viewer-card > .viewer-header {
  border-top: 1px solid rgba(0,0,0,.58);
}
.numerical-health {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 210px;
  padding: 4px 9px;
  border: 1px solid rgba(174,178,176,.30);
  border-radius: 999px;
  color: #c6c9c6;
  background: rgba(6,7,7,.40);
  box-shadow: inset 0 1px rgba(255,255,255,.045);
  white-space: nowrap;
}
.numerical-health strong { color: #e1e3df; font-size: .68rem; }
.health-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #777b78;
  box-shadow: 0 0 0 2px rgba(119,123,120,.12);
}
.numerical-health.monitoring .health-dot { background: #d8bd75; box-shadow: 0 0 10px rgba(216,189,117,.55); animation: pulse 1.2s infinite; }
.numerical-health.stable { border-color: rgba(124,218,158,.36); color: #ccebd6; }
.numerical-health.stable .health-dot { background: #7cda9e; box-shadow: 0 0 11px rgba(124,218,158,.58); }
.numerical-health.warning { border-color: rgba(255,213,91,.55); color: #ffe49b; background: rgba(88,67,13,.22); }
.numerical-health.warning .health-dot { background: #ffd55b; box-shadow: 0 0 13px rgba(255,213,91,.72); }
.numerical-health.warning strong { color: #ffe49b; }
.numerical-health.unstable { border-color: rgba(255,105,105,.62); color: #ffc0c0; background: rgba(99,18,18,.28); }
.numerical-health.unstable .health-dot { background: #ff6969; box-shadow: 0 0 14px rgba(255,105,105,.75); }
.numerical-health.unstable strong { color: #ffc0c0; }

.preflight-stability {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(180,184,181,.22);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(5,6,6,.24);
  font-size: .66rem;
  line-height: 1.3;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.preflight-stability::before {
  content: "◆";
  color: #9b9f9c;
  font-size: .58rem;
}
.preflight-stability.good { border-color: rgba(124,218,158,.34); color: #ccebd6; background: rgba(25,76,44,.16); }
.preflight-stability.good::before { color: #7cda9e; }
.preflight-stability.caution { border-color: rgba(255,213,91,.46); color: #ffe49b; background: rgba(88,67,13,.18); }
.preflight-stability.caution::before { color: #ffd55b; }
.preflight-stability.locked { opacity: .76; }

.status-dot.unstable { background: var(--red); box-shadow: 0 0 13px rgba(255,105,105,.65); }

@media (max-width: 900px) {
  .live-job-status-row { flex-wrap: wrap; }
  .numerical-health { order: 3; flex: 1 1 100%; min-width: 0; }
}


/* v1.12.1 experiment-aware probes and compact run-mode placement */
#geometryCanvas { cursor: crosshair; }
#geometryCanvas.probe-placement-locked { cursor: not-allowed; }
#geometryCanvas:not(.probe-placement-locked):hover {
  outline: 1px solid rgba(255, 221, 101, .54);
  box-shadow: 0 0 0 3px rgba(255, 221, 101, .08), inset 0 0 26px rgba(255, 221, 101, .035);
}

.domain-grid-title-row,
.model-parameter-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.domain-grid-title-row { margin-bottom: 8px; }
.model-parameter-title-row { margin-bottom: 9px; }
.model-parameter-title-row .compact-heading { margin: 0; }
.domain-grid-title-tools {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}
.grid-run-mode-mount,
.model-run-mode-mount {
  width: 33.333%;
  min-width: 210px;
  max-width: 280px;
  margin-left: auto;
}
.grid-run-mode-mount:empty,
.model-run-mode-mount:empty { display: none; }

/* Restore the earlier neutral graphite background and remove directional belt effects. */
.run-mode-dock {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  box-shadow: none;
}
.run-mode-control {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(42px, 1fr) 82px minmax(42px, 1fr);
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(238,238,233,.34);
  border-radius: 11px;
  overflow: visible;
  color: #aeb0ad;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, rgba(0,0,0,.025) 1px 3px),
    linear-gradient(180deg, #151716, #292b2a 48%, #0d0f0e);
  box-shadow: inset 0 3px 8px rgba(0,0,0,.78), inset 0 -1px rgba(255,255,255,.12), 0 1px rgba(255,255,255,.08);
  font-family: inherit;
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
}
.run-mode-control::before { content: none !important; }
.run-mode-control span {
  font-weight: 850;
  text-align: center;
  text-transform: none;
  transition: color .14s ease, text-shadow .14s ease;
}
.run-mode-control span.active {
  color: #ffe074;
  transform: none;
  text-shadow: 0 0 8px rgba(255,224,116,.22);
}
.run-mode-control span.unavailable { opacity: .42; }
.run-mode-control input[type="range"] {
  width: 82px;
  min-width: 82px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: grab;
  accent-color: #d8d9d5;
}
.run-mode-control input[type="range"]:active { cursor: grabbing; }
.run-mode-control input[type="range"]::-webkit-slider-runnable-track {
  height: 14px;
  border: 1px solid #050606;
  border-radius: 999px;
  background: linear-gradient(180deg, #070808, #242625);
  box-shadow: inset 0 3px 5px rgba(0,0,0,.9), 0 1px rgba(255,255,255,.12);
}
.run-mode-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 40px;
  height: 20px;
  margin-top: -4px;
  border: 1px solid #f3f3ef;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, #dedfdb 0 2px, #a7aaa6 2px 4px),
    linear-gradient(180deg, #ecece8, #9a9d99);
  box-shadow: 0 2px 5px rgba(0,0,0,.8), inset 0 1px #fff;
  transition: transform .12s ease, filter .12s ease;
}
.run-mode-control input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(.95);
  filter: brightness(1.1);
}
.run-mode-control input[type="range"]::-moz-range-track {
  height: 14px;
  border: 1px solid #050606;
  border-radius: 999px;
  background: linear-gradient(180deg, #070808, #242625);
  box-shadow: inset 0 3px 5px rgba(0,0,0,.9), 0 1px rgba(255,255,255,.12);
}
.run-mode-control input[type="range"]::-moz-range-thumb {
  width: 40px;
  height: 20px;
  border: 1px solid #f3f3ef;
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, #dedfdb 0 2px, #a7aaa6 2px 4px);
  box-shadow: 0 2px 5px rgba(0,0,0,.8), inset 0 1px #fff;
}

.domain-grid-section.last-run {
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(224, 224, 216, .12), rgba(111, 112, 108, .08));
  box-shadow: inset 0 0 0 1px rgba(236, 236, 227, .22);
  transition: background .2s ease, box-shadow .2s ease;
}

@media (max-width: 880px) {
  .grid-run-mode-mount,
  .model-run-mode-mount {
    width: 46%;
    min-width: 205px;
  }
}
@media (max-width: 620px) {
  .domain-grid-title-row,
  .model-parameter-title-row { align-items: stretch; flex-direction: column; }
  .domain-grid-title-tools { width: 100%; }
  .grid-run-mode-mount,
  .model-run-mode-mount { width: 100%; max-width: none; min-width: 0; }
}


/* v1.12.3 compact capacity badge, exact run-mode thumb, and integrated probe placement */
.domain-grid-title-row h3,
#domainSectionTitle {
  white-space: nowrap;
}

.grid-run-mode-mount,
.model-run-mode-mount {
  width: 26.6667%;
  min-width: 174px;
  max-width: 224px;
}

.run-mode-control {
  min-height: 32px;
  grid-template-columns: minmax(38px, 1fr) 64px minmax(38px, 1fr);
  gap: 4px;
  padding: 4px 6px;
  border-radius: 10px;
  font-size: .60rem;
}

.run-mode-control input[type="range"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 64px !important;
  min-width: 64px !important;
  height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  vertical-align: middle;
}
.run-mode-control input[type="range"]::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  width: 64px;
  height: 20px;
  border: 1px solid #050606;
  border-radius: 10px;
  background: linear-gradient(180deg, #070808, #242625);
  box-shadow: inset 0 3px 5px rgba(0,0,0,.90), 0 1px rgba(255,255,255,.12);
}
.run-mode-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 40px !important;
  height: 20px !important;
  margin-top: -1px !important;
  border: 1px solid #f3f3ef !important;
  border-radius: 6px !important;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.46) 0 1px, rgba(80,82,80,.34) 1px 3px),
    linear-gradient(180deg, #ecece8 0%, #c7c9c5 45%, #989b97 100%) !important;
  box-shadow: 0 2px 5px rgba(0,0,0,.82), inset 0 1px #fff !important;
}
.run-mode-control input[type="range"]::-moz-range-track {
  width: 64px;
  height: 20px;
  border: 1px solid #050606;
  border-radius: 10px;
  background: linear-gradient(180deg, #070808, #242625);
  box-shadow: inset 0 3px 5px rgba(0,0,0,.90), 0 1px rgba(255,255,255,.12);
}
.run-mode-control input[type="range"]::-moz-range-thumb {
  width: 40px !important;
  height: 20px !important;
  border: 1px solid #f3f3ef !important;
  border-radius: 6px !important;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.46) 0 1px, rgba(80,82,80,.34) 1px 3px),
    linear-gradient(180deg, #ecece8 0%, #c7c9c5 45%, #989b97 100%) !important;
  box-shadow: 0 2px 5px rgba(0,0,0,.82), inset 0 1px #fff !important;
}

#gridCellBadge.grid-capacity-badge {
  min-width: 86px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 3px 7px;
  border-radius: 10px;
  line-height: 1;
  white-space: nowrap;
}
.grid-capacity-fraction {
  width: 48px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: .60rem;
  line-height: 1.02;
}
.grid-capacity-current {
  padding: 0 1px 2px;
  border-bottom: 1px solid currentColor;
}
.grid-capacity-limit { padding: 2px 1px 0; }
.grid-capacity-unit {
  align-self: center;
  color: inherit;
  font-size: .52rem;
  line-height: 1.02;
  text-align: left;
}
.fixed-grid-badge .grid-fixed-value {
  font-size: .62rem;
  font-variant-numeric: tabular-nums;
}

.preview-body {
  position: relative;
}
.geometry-probe-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.geometry-probe-section > .section-divider {
  display: none;
}
.geometry-probe-section .section-title-row {
  margin-bottom: 8px;
}
.probe-cursor-hint {
  position: fixed;
  z-index: 10020;
  pointer-events: none;
  padding: 6px 9px;
  border: 1px solid rgba(255,224,116,.72);
  border-radius: 7px;
  color: #fff0ad;
  background: linear-gradient(180deg, rgba(68,69,66,.97), rgba(19,20,19,.98));
  box-shadow: 0 7px 20px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.12);
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .02em;
  white-space: nowrap;
}
.probe-cursor-hint[hidden] { display: none !important; }

@keyframes probe-location-ready-pulse {
  0%, 100% {
    border-color: rgba(255,221,70,.72);
    box-shadow: 0 0 0 1px rgba(255,221,70,.24), 0 0 8px rgba(255,215,45,.24), inset 0 1px rgba(255,255,255,.14);
  }
  50% {
    border-color: #ffe35c;
    box-shadow: 0 0 0 2px rgba(255,227,92,.42), 0 0 20px rgba(255,215,45,.58), inset 0 1px rgba(255,255,255,.20);
  }
}
.probe-add-btn.probe-location-ready:not(:disabled) {
  color: #241c00;
  background: linear-gradient(180deg, #fff19a, #d9a914);
  animation: probe-location-ready-pulse .72s ease-in-out infinite;
}

@media (max-width: 880px) {
  .grid-run-mode-mount,
  .model-run-mode-mount {
    width: 34%;
    min-width: 174px;
  }
}
@media (max-width: 620px) {
  .grid-run-mode-mount,
  .model-run-mode-mount {
    width: 100%;
    max-width: none;
  }
  #gridCellBadge.grid-capacity-badge { align-self: flex-start; }
}


/* v1.12.3 precise capacity fraction, compact 1.5:1 run-mode thumb, and 0.5-second lock transitions */
.grid-run-mode-mount,
.model-run-mode-mount {
  width: 29.3334%;
  min-width: 200px;
  max-width: 246px;
}

.run-mode-control {
  grid-template-columns: minmax(55px, 1fr) 68px minmax(58px, 1fr);
  gap: 4px;
  min-height: 36px;
  padding: 5px 7px;
  font-size: .86rem;
  transition:
    color .5s ease,
    background .5s ease,
    border-color .5s ease,
    box-shadow .5s ease,
    filter .5s ease;
}
.run-mode-control span {
  transition: color .5s ease, text-shadow .5s ease, opacity .5s ease;
}

/* The transparent native range keeps keyboard, click, and drag behavior.
   The visible shell and thumb provide exact geometry and smooth movement. */
.run-mode-slider-shell {
  position: relative;
  display: block;
  width: 68px;
  height: 24px;
  border: 1px solid #050606;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #070808, #242625);
  box-shadow: inset 0 3px 5px rgba(0,0,0,.90), 0 1px rgba(255,255,255,.12);
  transition: background .5s ease, border-color .5s ease, box-shadow .5s ease;
}
.run-mode-slider-shell input[type="range"] {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  cursor: grab;
}
.run-mode-slider-shell input[type="range"]:active { cursor: grabbing; }
.run-mode-slider-shell input[type="range"]::-webkit-slider-runnable-track,
.run-mode-slider-shell input[type="range"]::-webkit-slider-thumb,
.run-mode-slider-shell input[type="range"]::-moz-range-track,
.run-mode-slider-shell input[type="range"]::-moz-range-thumb {
  opacity: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.run-mode-slider-thumb {
  position: absolute;
  z-index: 2;
  top: 2px;
  left: 2px;
  width: 30px;
  height: 20px;
  border: 1px solid #f3f3ef;
  border-radius: 7px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 1px, rgba(72,74,72,.42) 1px 3px) center / 20px 100% no-repeat,
    linear-gradient(180deg, #eeeeea 0%, #c8cac6 45%, #979a96 100%);
  box-shadow: 0 2px 5px rgba(0,0,0,.82), inset 0 1px #fff;
  pointer-events: none;
  transition: left .5s ease, filter .5s ease, box-shadow .5s ease, background .5s ease;
}
.run-mode-control.last-selected .run-mode-slider-thumb {
  left: 34px;
}
.run-mode-control:active .run-mode-slider-thumb {
  filter: brightness(1.12);
  box-shadow: 0 1px 3px rgba(0,0,0,.9), inset 0 1px #fff;
}

/* The bar width is governed by the longer denominator only. */
.grid-capacity-fraction {
  width: max-content;
  min-width: 6ch;
  justify-items: stretch;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.grid-capacity-current,
.grid-capacity-limit {
  width: 100%;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
  text-align: right;
}
.grid-capacity-current {
  padding-bottom: 2px;
  border-bottom-width: 1px;
}
.grid-capacity-limit { padding-top: 2px; }

.domain-grid-section,
.model-parameter-zone,
.model-parameter-zone::before {
  transition:
    background .5s ease,
    box-shadow .5s ease,
    border-color .5s ease,
    opacity .5s ease,
    filter .5s ease !important;
}
.domain-grid-section.last-run,
.model-parameter-zone.last-run {
  transition-duration: .5s !important;
}

@media (max-width: 880px) {
  .grid-run-mode-mount,
  .model-run-mode-mount {
    width: 37.4%;
    min-width: 200px;
  }
}
@media (max-width: 620px) {
  .grid-run-mode-mount,
  .model-run-mode-mount {
    width: 100%;
    max-width: none;
  }
}


/* v1.13.0 tabbed New/Last mode, settings-driven style selection, and layout fixes */
.field.locked-field::after {
  right: 11px;
  top: 50%;
  transform: translateY(4px);
  font-size: .8rem;
}

.schedule-grid {
  grid-template-columns: repeat(2, minmax(0,1fr));
}
.schedule-grid .input-pair {
  grid-template-columns: minmax(0,1fr) 110px;
  gap: 6px;
}
.schedule-grid input,
.schedule-grid select {
  min-width: 0;
}
.schedule-grid .field.frame-count-field {
  grid-column: 1 / span 1;
}

.grid-run-mode-mount,
.model-run-mode-mount {
  width: 34%;
  min-width: 230px;
  max-width: 320px;
}
.run-mode-dock {
  width: 100%;
}

#gridCellBadge.grid-capacity-badge {
  min-width: 74px;
  gap: 5px;
  padding: 4px 8px;
}
.grid-capacity-fraction {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: end;
  align-items: center;
  width: calc(var(--digits, 6) * .74ch);
  min-width: calc(var(--digits, 6) * .74ch);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1.02;
}
.grid-capacity-current,
.grid-capacity-limit {
  display: inline-block;
  justify-self: end;
  text-align: right;
}
.grid-capacity-current {
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.grid-capacity-limit { padding-top: 2px; }
.grid-capacity-unit {
  display: inline-flex;
  align-items: center;
  font-size: .54rem;
  line-height: 1;
}

/* Settings-driven visibility */
body[data-run-mode-style="tabs"] .run-mode-control { display: none; }
body[data-run-mode-style="slider"] .run-mode-tabs { display: none !important; }
body[data-run-mode-style="tabs"] .run-mode-tabs { display: inline-grid !important; }

/* Slider mode refreshed metallic style */
body[data-run-mode-style="slider"] .run-mode-control {
  grid-template-columns: minmax(62px, 1fr) 84px minmax(62px, 1fr);
  gap: 6px;
  padding: 6px 10px;
  border: 2px solid rgba(216, 198, 132, .85);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(128,104,42,.95), rgba(56,45,17,.96));
  box-shadow: inset 0 1px rgba(255,255,255,.18), 0 8px 18px rgba(0,0,0,.28);
}
body[data-run-mode-style="slider"] .run-mode-control span {
  font-size: .9rem;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(255,233,130,.5), 0 0 2px rgba(255,255,255,.35);
}
body[data-run-mode-style="slider"] .run-mode-slider-shell {
  width: 84px;
  height: 26px;
  border: 2px solid rgba(248,244,210,.72);
  background: linear-gradient(180deg, rgba(160,165,170,.78), rgba(82,88,90,.88));
  box-shadow: inset 0 3px 8px rgba(0,0,0,.35), inset 0 -1px 0 rgba(255,255,255,.12), 0 1px 0 rgba(255,255,255,.08);
}
body[data-run-mode-style="slider"] .run-mode-slider-thumb {
  top: 2px;
  left: 2px;
  width: 36px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.75);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.62) 0 1px, rgba(90,92,92,.45) 1px 4px) center / 20px 100% no-repeat,
              linear-gradient(180deg, #f4f4ee 0%, #c4c8c8 45%, #8f9497 100%);
  box-shadow: 0 2px 6px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.9);
}
body[data-run-mode-style="slider"] .run-mode-control.last-selected .run-mode-slider-thumb { left: 44px; }
body[data-run-mode-style="slider"] .run-mode-control span.active { color: #ffe174; }
body[data-run-mode-style="slider"] .run-mode-control span.unavailable { opacity: .42; }

/* Tab mode */
.run-mode-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  align-self: end;
}
.run-mode-tab {
  height: 36px;
  border: 1px solid rgba(218,223,223,.42);
  background: linear-gradient(180deg, rgba(58,60,62,.92), rgba(26,28,30,.98));
  color: #d9dfdf;
  font-size: .86rem;
  font-weight: 800;
  border-bottom-color: rgba(118,123,126,.85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 0 rgba(0,0,0,.25);
  border-radius: 12px 12px 0 0;
  padding: 0 12px;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .12s ease;
}
.run-mode-tab + .run-mode-tab {
  margin-left: -1px;
}
.run-mode-tab.active {
  background: linear-gradient(180deg, rgba(131,137,139,.98), rgba(88,93,96,.96));
  color: #101112;
  border-bottom-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
  position: relative;
  z-index: 2;
}
.run-mode-tab.unavailable { opacity: .48; }
.run-mode-tab:hover:not(.active):not(:disabled) { background: linear-gradient(180deg, rgba(72,74,77,.96), rgba(32,34,36,.99)); }
.run-mode-tab:active:not(:disabled) { transform: translateY(1px); }
.run-mode-tab:focus-visible { outline: 2px solid #f4d97b; outline-offset: 2px; }

.setup-body.tabbed-runmode-standard #domainGridSection,
.setup-body.tabbed-runmode-standard #modelParameterZone {
  background: linear-gradient(180deg, rgba(114,118,120,.26), rgba(50,53,55,.28));
  border-color: rgba(198,205,206,.26);
}
.setup-body.tabbed-runmode-standard #domainGridSection {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
  margin-bottom: 0;
}
.setup-body.tabbed-runmode-standard #modelParameterZone {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: 0;
}
.setup-body.tabbed-runmode-standard > .section-divider:first-of-type {
  display: none;
}
.setup-body.tabbed-runmode-standard #modelParameterZone .model-parameter-title-row {
  padding-top: 6px;
}
.setup-body.tabbed-runmode-standard.last-run-locked #domainGridSection,
.setup-body.tabbed-runmode-standard.last-run-locked #modelParameterZone,
.setup-body.tabbed-runmode-meteo #modelParameterZone.last-run {
  background: linear-gradient(180deg, rgba(148,150,150,.32), rgba(82,84,84,.34));
}

.setup-body.tabbed-runmode-meteo #modelParameterZone {
  background: linear-gradient(180deg, rgba(114,118,120,.26), rgba(50,53,55,.28));
  border-color: rgba(198,205,206,.26);
}

@media (max-width: 880px) {
  .schedule-grid {
    grid-template-columns: 1fr;
  }
  .grid-run-mode-mount,
  .model-run-mode-mount {
    width: 46%;
    min-width: 220px;
  }
}
@media (max-width: 620px) {
  .grid-run-mode-mount,
  .model-run-mode-mount {
    width: 100%;
    max-width: none;
  }
  .run-mode-tab,
  body[data-run-mode-style="slider"] .run-mode-control span {
    font-size: .8rem;
  }
  .schedule-grid .input-pair {
    grid-template-columns: minmax(0,1fr) 92px;
  }
}


/* v1.13.1 restored slider appearance, dedicated slider row, and inline grid usage */
.domain-grid-title-row,
.model-parameter-title-row {
  flex-wrap: wrap;
}

body[data-run-mode-style="slider"] .grid-run-mode-mount,
body[data-run-mode-style="slider"] .model-run-mode-mount {
  order: -1;
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  max-width: none;
  display: flex;
  justify-content: flex-end;
  margin: 0 0 5px;
}

body[data-run-mode-style="slider"] .run-mode-dock {
  width: 41.15%;
  min-width: 264px;
  max-width: 352px;
  margin-left: auto;
}

/* Restore the earlier neutral slider: dark recessed track and silver grooved thumb.
   The complete module uses a lightly aged white-silver skin so it remains distinct. */
body[data-run-mode-style="slider"] .run-mode-control {
  grid-template-columns: minmax(70px, 1fr) 92px minmax(70px, 1fr);
  gap: 5px;
  min-height: 30px;
  padding: 2px 8px;
  border: 2px solid rgba(236, 238, 234, .82);
  border-radius: 10px;
  background:
    repeating-linear-gradient(100deg, rgba(255,255,255,.05) 0 2px, rgba(60,62,62,.025) 2px 5px),
    repeating-linear-gradient(0deg, rgba(45,46,46,.025) 0 1px, rgba(255,255,255,.025) 1px 4px),
    linear-gradient(180deg, #e8e9e5 0%, #c9cbc8 48%, #aeb1af 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(40,42,42,.25),
    0 2px 5px rgba(0,0,0,.38);
}

body[data-run-mode-style="slider"] .run-mode-control span {
  color: #373a3a;
  font-size: 1.08rem;
  line-height: 1;
  font-weight: 850;
  text-shadow: 0 1px rgba(255,255,255,.62);
}

body[data-run-mode-style="slider"] .run-mode-control span.active {
  color: #5d4500;
  text-shadow: 0 0 5px rgba(255,220,80,.55), 0 1px rgba(255,255,255,.65);
}

body[data-run-mode-style="slider"] .run-mode-control span.unavailable {
  color: #777b7a;
  opacity: .55;
  text-shadow: 0 1px rgba(255,255,255,.45);
}

body[data-run-mode-style="slider"] .run-mode-slider-shell {
  width: 92px;
  height: 24px;
  border: 1px solid #050606;
  border-radius: 12px;
  background: linear-gradient(180deg, #080909 0%, #242625 100%);
  box-shadow:
    inset 0 3px 6px rgba(0,0,0,.92),
    inset 0 -1px 0 rgba(255,255,255,.10),
    0 1px 0 rgba(255,255,255,.38);
}

body[data-run-mode-style="slider"] .run-mode-slider-thumb {
  top: 2px;
  left: 2px;
  width: 30px;
  height: 20px;
  border: 1px solid #f3f3ef;
  border-radius: 7px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 1px, rgba(72,74,72,.42) 1px 3px) center / 20px 100% no-repeat,
    linear-gradient(180deg, #eeeeea 0%, #c8cac6 45%, #979a96 100%);
  box-shadow: 0 2px 5px rgba(0,0,0,.82), inset 0 1px #fff;
}

body[data-run-mode-style="slider"] .run-mode-control.last-selected .run-mode-slider-thumb {
  left: 60px;
}

body[data-run-mode-style="slider"] .run-mode-control:active .run-mode-slider-thumb {
  filter: brightness(1.1);
  box-shadow: 0 1px 3px rgba(0,0,0,.9), inset 0 1px #fff;
}

/* Tabs keep the compact header position; only slider mode owns a full row. */
body[data-run-mode-style="tabs"] .grid-run-mode-mount,
body[data-run-mode-style="tabs"] .model-run-mode-mount {
  order: initial;
}

#gridCellBadge.grid-capacity-inline {
  min-width: 0;
  width: auto;
  min-height: 28px;
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  padding: 4px 8px;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .61rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.domain-grid-title-tools {
  margin-left: auto;
  justify-content: flex-end;
}

@media (max-width: 880px) {
  body[data-run-mode-style="slider"] .run-mode-dock {
    width: 52%;
    min-width: 250px;
  }
}

@media (max-width: 620px) {
  body[data-run-mode-style="slider"] .run-mode-dock {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  body[data-run-mode-style="slider"] .run-mode-control {
    grid-template-columns: minmax(64px,1fr) 86px minmax(64px,1fr);
  }
  body[data-run-mode-style="slider"] .run-mode-slider-shell { width: 86px; }
  body[data-run-mode-style="slider"] .run-mode-control.last-selected .run-mode-slider-thumb { left: 54px; }
}


/* v1.13.2 centered slider, compact Meteotsunami grid header, and unified standard Last Run shell */
body[data-run-mode-style="slider"] .grid-run-mode-mount,
body[data-run-mode-style="slider"] .model-run-mode-mount {
  justify-content: center;
}
body[data-run-mode-style="slider"] .run-mode-dock {
  width: 45.25%;
  min-width: 286px;
  max-width: 388px;
  margin-left: auto;
  margin-right: auto;
}
body[data-run-mode-style="slider"] .run-mode-control span {
  font-size: .86rem;
}

/* Keep fixed regional-grid capacity on one line. */
#gridCellBadge.fixed-grid-badge {
  white-space: nowrap;
  min-width: 0;
  width: auto;
  font-size: .61rem;
}

/* Meteotsunami: reclaim vertical space above Regional Grid and Track. */
body.meteotsunami-active .setup-body {
  padding-top: 5px;
}
body.meteotsunami-active #domainGridSection .domain-grid-title-row {
  margin-top: -2px;
  margin-bottom: 6px;
}

/* Standard Last Run: one continuous locked enclosure for Domain & Grid + Model Parameters. */
.setup-config-shell {
  position: relative;
  min-width: 0;
  transition: background .5s ease, border-color .5s ease, box-shadow .5s ease, padding .5s ease;
}
.setup-config-shell.standard-last-run {
  padding: 10px 11px 11px;
  border: 1px solid rgba(239,240,236,.56);
  border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, rgba(0,0,0,.022) 1px 4px),
    linear-gradient(145deg, rgba(207,210,208,.31), rgba(116,120,119,.21) 48%, rgba(188,191,189,.26));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 4px 14px rgba(0,0,0,.24);
}
.setup-config-shell.standard-last-run > #domainGridSection,
.setup-config-shell.standard-last-run > #modelParameterZone {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.setup-config-shell.standard-last-run > #modelParameterZone::before {
  opacity: 0 !important;
}
.setup-config-shell.standard-last-run > .section-divider {
  height: 1px;
  margin: 12px 0;
  background: rgba(239,240,236,.19);
}
.setup-config-shell.standard-last-run #domainGridSection.last-run {
  padding: 0;
}
.setup-config-shell.standard-last-run #modelParameterZone.last-run .model-parameter-content {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

@media (max-width: 880px) {
  body[data-run-mode-style="slider"] .run-mode-dock {
    width: 56%;
    min-width: 270px;
  }
}
@media (max-width: 620px) {
  body[data-run-mode-style="slider"] .run-mode-dock {
    width: 100%;
    min-width: 0;
  }
  .setup-config-shell.standard-last-run {
    padding: 8px;
  }
}


/* v1.13.3 compact form controls and Last Run interaction guidance */
input:not([type="range"]),
select {
  height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 10px;
  padding-right: 10px;
}
input[type="number"] {
  padding-right: 10px;
}

.last-run-locked .locked-field {
  cursor: pointer;
}
.last-run-locked .locked-field :is(input, select, button):disabled {
  pointer-events: none;
}
.last-run-action-disabled {
  opacity: .38;
  cursor: pointer !important;
  filter: grayscale(.25);
}
.last-run-action-disabled:hover,
.last-run-action-disabled:active {
  opacity: .48;
  transform: none !important;
}

@keyframes run-mode-guide-flash {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255,221,72,0), 0 0 0 0 rgba(255,221,72,0);
  }
  18%, 58% {
    box-shadow: 0 0 0 3px rgba(255,221,72,.98), 0 0 18px 5px rgba(255,210,36,.72);
  }
  38%, 78% {
    box-shadow: 0 0 0 1px rgba(255,221,72,.42), 0 0 7px 2px rgba(255,210,36,.28);
  }
}
.run-mode-dock.run-mode-attention {
  position: relative;
  z-index: 12;
  border-radius: 13px;
  animation: run-mode-guide-flash .9s ease-in-out 2;
}
.run-mode-dock.run-mode-attention .run-mode-control,
.run-mode-dock.run-mode-attention .run-mode-tabs {
  border-color: #ffe04f !important;
}

@media (prefers-reduced-motion: reduce) {
  .run-mode-dock.run-mode-attention {
    animation: none;
    outline: 3px solid #ffe04f;
    box-shadow: 0 0 14px rgba(255,210,36,.65);
  }
}


/* v1.13.4 compact controls, matched slider corners, and Meteotsunami badge placement */
input:not([type="range"]),
select {
  height: 30px;
  min-height: 30px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: inherit;
  line-height: 1.05;
}

/* Keep compound result controls visually proportional to the smaller fields. */
.frame-number,
.suffix-input {
  height: 33px;
}
.frame-number input,
.suffix-input input,
.playback-cluster .compact-suffix input {
  height: 29px;
  min-height: 29px;
}

/* The track and grooved thumb now use the same corner radius. */
body[data-run-mode-style="slider"] .run-mode-slider-shell,
body[data-run-mode-style="slider"] .run-mode-slider-thumb {
  border-radius: 7px;
}

/* Put the long Meteotsunami backend badge at the lower-right of the setup header,
   clear of the upper-right rivet. */
body.meteotsunami-active .setup-header {
  position: relative;
  min-height: 104px;
}
body.meteotsunami-active .setup-header > :first-child {
  padding-right: 250px;
}
body.meteotsunami-active .setup-header-tools {
  position: absolute;
  right: 16px;
  bottom: 9px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  max-width: 245px;
}
body.meteotsunami-active .setup-header-tools .model-badge {
  max-width: 245px;
  margin: 0;
}

@media (max-width: 700px) {
  body.meteotsunami-active .setup-header {
    min-height: 0;
  }
  body.meteotsunami-active .setup-header > :first-child {
    padding-right: 0;
  }
  body.meteotsunami-active .setup-header-tools {
    position: static;
    max-width: none;
    width: 100%;
    justify-content: flex-start;
    margin-top: 6px;
  }
  body.meteotsunami-active .setup-header-tools .model-badge {
    max-width: 100%;
  }
}


/* v1.13.5 Meteotsunami badge return, centered lock icons, and more compact controls */
input:not([type="range"]),
select {
  height: 28px;
  min-height: 28px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
}
.frame-number,
.suffix-input {
  height: 31px;
}
.frame-number input,
.suffix-input input,
.playback-cluster .compact-suffix input {
  height: 27px;
  min-height: 27px;
}

/* Restore the Meteotsunami solver badge to the original top-right flow layout,
   while adding extra right-side breathing room so the rivet remains visible. */
body.meteotsunami-active .setup-header {
  position: relative;
  min-height: 70px;
}
body.meteotsunami-active .setup-header > :first-child {
  padding-right: 0;
}
body.meteotsunami-active .setup-header-tools {
  position: static;
  right: auto;
  bottom: auto;
  display: grid;
  justify-items: end;
  align-content: start;
  max-width: 270px;
  padding-right: 14px;
  margin-right: 8px;
}
body.meteotsunami-active .setup-header-tools .model-badge {
  max-width: 238px;
  margin: 0 4px 0 0;
}

/* Make every lock icon sit at the same vertical center relative to its control. */
.field.locked-field {
  position: relative;
}
.field.locked-field::after {
  top: auto;
  bottom: 7px;
  right: 11px;
  transform: none;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.field.locked-field input,
.field.locked-field select {
  padding-right: 32px;
}

@media (max-width: 700px) {
  body.meteotsunami-active .setup-header-tools {
    position: static;
    max-width: none;
    width: 100%;
    justify-content: flex-start;
    margin-top: 6px;
    padding-right: 0;
    margin-right: 0;
  }
  body.meteotsunami-active .setup-header-tools .model-badge {
    max-width: 100%;
    margin-right: 0;
  }
}


/* v1.13.6: slider-only run mode and original Meteotsunami badge position */
body[data-run-mode-style="slider"] .run-mode-control {
  display: grid !important;
}
.run-mode-tabs,
body[data-run-mode-style="tabs"] .run-mode-tabs {
  display: none !important;
}

/* Restore the original upper-right badge position. The original 16 px inset is
   increased by only 2 px so the badge clears the corner rivet. */
body.meteotsunami-active .setup-header {
  position: relative;
  min-height: 70px;
}
body.meteotsunami-active .setup-header > :first-child {
  padding-right: 252px;
}
body.meteotsunami-active .setup-header-tools {
  position: absolute;
  top: 10px;
  right: 18px;
  bottom: auto;
  display: grid;
  justify-items: end;
  align-content: start;
  width: auto;
  max-width: 245px;
  min-width: 0;
  padding: 0;
  margin: 0;
}
body.meteotsunami-active .setup-header-tools .model-badge {
  max-width: 245px;
  margin: 0;
}

@media (max-width: 700px) {
  body.meteotsunami-active .setup-header > :first-child {
    padding-right: 0;
  }
  body.meteotsunami-active .setup-header-tools {
    position: static;
    width: 100%;
    max-width: none;
    justify-items: start;
    margin-top: 6px;
  }
  body.meteotsunami-active .setup-header-tools .model-badge {
    max-width: 100%;
  }
}


/* v1.13.7 exact Meteotsunami badge copy and tighter run-mode top spacing */
body.meteotsunami-active .setup-header-tools .model-badge {
  white-space: pre-line;
  min-width: 220px;
}

/* Pull the dedicated New Run / Last Run row closer to the top edge of its
   containing Domain & Grid or Model Parameters section. */
body[data-run-mode-style="slider"] .grid-run-mode-mount,
body[data-run-mode-style="slider"] .model-run-mode-mount {
  margin-top: -6px;
}


/* v1.13.8 ultra-compact Meteotsunami solver badge */
body.meteotsunami-active .setup-header > :first-child {
  padding-right: 204px;
}
body.meteotsunami-active .setup-header-tools {
  max-width: none;
}
body.meteotsunami-active .setup-header-tools .model-badge {
  width: max-content;
  min-width: 0;
  max-width: none;
  padding: 1px 3px;
  border-radius: 5px;
  line-height: 1.04;
  white-space: pre-line;
}

@media (max-width: 700px) {
  body.meteotsunami-active .setup-header > :first-child {
    padding-right: 0;
  }
  body.meteotsunami-active .setup-header-tools .model-badge {
    width: auto;
    max-width: 100%;
  }
}


/* v1.13.9 three-line TAMU TRG solver credit and main-site backlink */
.back-site-link {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin: 0 0 3px;
  color: #f0d979;
  font-size: .68rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: .015em;
  transition: color .18s ease, text-shadow .18s ease, transform .12s ease;
}
.back-site-link:hover {
  color: #fff1a6;
  text-shadow: 0 0 8px rgba(255,225,116,.35);
}
.back-site-link:active { transform: translateY(1px); }
.back-site-link:focus-visible { outline: 2px solid #f4d97b; outline-offset: 2px; border-radius: 3px; }

/* Restore the regular badge padding while preserving intentional line breaks. */
body.meteotsunami-active .setup-header > :first-child {
  padding-right: 224px;
}
body.meteotsunami-active .setup-header-tools .model-badge {
  width: auto;
  min-width: 204px;
  max-width: 218px;
  padding: 5px 8px;
  border-radius: 8px;
  line-height: 1.25;
  white-space: pre-line;
}

@media (max-width: 700px) {
  body.meteotsunami-active .setup-header > :first-child { padding-right: 0; }
  body.meteotsunami-active .setup-header-tools .model-badge {
    min-width: 0;
    max-width: 100%;
  }
}


/* v1.13.10 compact solver-credit width and relocated main-site backlink */
.back-site-link {
  margin: 4px 0 0;
  font-size: .816rem;
}

/* Keep the established vertical padding and halve only the left/right padding. */
body.meteotsunami-active .setup-header-tools .model-badge {
  padding: 5px 4px;
}


/* v1.13.11 compact solver badge, aligned playback controls, and selectable themes */
body.meteotsunami-active .setup-header-tools .model-badge {
  width: max-content;
  min-width: 0;
  max-width: none;
  padding: 5px 6px;
}
body.meteotsunami-active .setup-header > :first-child {
  padding-right: 196px;
}

.frame-toolbar {
  --frame-control-height: 42px;
  align-items: center;
}
.frame-toolbar > .icon-btn,
.frame-toolbar > .playback-cluster,
.frame-toolbar > .frame-number {
  height: var(--frame-control-height);
  min-height: var(--frame-control-height);
  margin: 0;
  align-self: center;
}
.frame-toolbar > .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.frame-toolbar .playback-cluster {
  padding: 0;
}
.frame-toolbar .playback-cluster .play-btn,
.frame-toolbar .playback-cluster .compact-suffix,
.frame-toolbar .frame-number input {
  height: 40px;
  min-height: 40px;
}
.frame-toolbar .playback-cluster .compact-suffix input {
  height: 40px;
  min-height: 40px;
}
.frame-toolbar .preload-status {
  align-self: center;
}

/* Graphite is the preserved current appearance and remains the default. */
body[data-theme="graphite"] {
  color-scheme: dark;
}

/* The texture layers are intentionally preserved in every theme; only their palette changes. */
body[data-theme="silver"] {
  color-scheme: light;
  --bg: #e7e8e7;
  --bg-deep: #c9cccd;
  --metal-1: #fbfbfa;
  --metal-2: #d9dbdc;
  --metal-3: #b9bdbe;
  --metal-edge: rgba(53,58,61,.38);
  --line: rgba(47,52,55,.20);
  --line-strong: rgba(35,40,43,.36);
  --text: #202426;
  --muted: #555d60;
  --dim: #737b7e;
  --accent: #087f86;
  --green: #187c50;
  --orange: #9a5b0c;
  --red: #b33b45;
  --shadow: 0 14px 36px rgba(49,54,57,.22);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(0deg, rgba(50,55,58,.025) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 50% -20%, rgba(255,255,255,.92), transparent 42%),
    linear-gradient(180deg, #f4f5f4, #d9dcdd 48%, #c4c8ca);
}
body[data-theme="silver"] .metal-panel {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.42) 0 1px, rgba(36,42,45,.035) 1px 3px, transparent 3px 7px),
    linear-gradient(115deg, rgba(255,255,255,.72), transparent 24%, rgba(255,255,255,.22) 50%, transparent 74%),
    linear-gradient(180deg, #fafafa, #dfe1e1 20%, #c5c9ca);
  box-shadow: inset 0 1px rgba(255,255,255,.95), inset 0 -1px rgba(54,60,62,.18), var(--shadow);
}
body[data-theme="silver"] :is(input:not([type="range"]), select, .frame-number, .suffix-input, .result-stage, .compare-stage) {
  color: #222729;
  background: rgba(252,252,251,.88);
}
body[data-theme="silver"] :is(.server-card, .playback-cluster, .preload-status, .quota-job-summary) {
  color: var(--text);
  background: rgba(245,246,245,.76);
}
body[data-theme="silver"] .tab-btn { color: #394043; background: rgba(255,255,255,.30); }
body[data-theme="silver"] .tab-btn:hover { color: #111; background: rgba(255,255,255,.66); }
body[data-theme="silver"] .stage-overlay { background: rgba(235,237,237,.88); }
body[data-theme="silver"] .back-site-link { color: #805b00; }

body[data-theme="solarized-light"] {
  color-scheme: light;
  --bg: #fdf6e3;
  --bg-deep: #eee8d5;
  --metal-1: #fffaf0;
  --metal-2: #eee8d5;
  --metal-3: #d7cfb8;
  --metal-edge: rgba(88,110,117,.36);
  --line: rgba(88,110,117,.20);
  --line-strong: rgba(88,110,117,.38);
  --text: #073642;
  --muted: #586e75;
  --dim: #839496;
  --accent: #268bd2;
  --green: #859900;
  --orange: #b58900;
  --red: #dc322f;
  --shadow: 0 14px 38px rgba(7,54,66,.17);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(0deg, rgba(88,110,117,.025) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 50% -20%, rgba(255,255,255,.78), transparent 42%),
    linear-gradient(180deg, #fffaf0, #fdf6e3 48%, #eee8d5);
}
body[data-theme="solarized-light"] .metal-panel {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.30) 0 1px, rgba(88,110,117,.035) 1px 3px, transparent 3px 7px),
    linear-gradient(115deg, rgba(255,255,255,.48), transparent 22%, rgba(255,255,255,.16) 50%, transparent 74%),
    linear-gradient(180deg, #fffaf0, #f1ead8 20%, #ddd4bd);
  box-shadow: inset 0 1px rgba(255,255,255,.88), inset 0 -1px rgba(88,110,117,.15), var(--shadow);
}
body[data-theme="solarized-light"] :is(input:not([type="range"]), select, .frame-number, .suffix-input, .result-stage, .compare-stage) {
  color: #073642;
  background: rgba(255,250,240,.90);
}
body[data-theme="solarized-light"] :is(.server-card, .playback-cluster, .preload-status, .quota-job-summary) {
  color: var(--text);
  background: rgba(238,232,213,.78);
}
body[data-theme="solarized-light"] .tab-btn { color: #586e75; background: rgba(255,250,240,.34); }
body[data-theme="solarized-light"] .tab-btn:hover { color: #073642; background: rgba(255,250,240,.72); }
body[data-theme="solarized-light"] .stage-overlay { background: rgba(253,246,227,.90); }
body[data-theme="solarized-light"] .back-site-link { color: #b58900; }

body[data-theme="ocean-steel"] {
  color-scheme: dark;
  --bg: #13222a;
  --bg-deep: #071116;
  --metal-1: #617782;
  --metal-2: #344b56;
  --metal-3: #142832;
  --metal-edge: rgba(201,229,238,.32);
  --line: rgba(202,229,238,.15);
  --line-strong: rgba(202,229,238,.32);
  --text: #eef8fa;
  --muted: #b7cdd2;
  --dim: #7f9aa1;
  --accent: #55e0d3;
  --green: #81e6ac;
  --orange: #f0c47a;
  --red: #ff8790;
  --shadow: 0 15px 44px rgba(0,10,15,.56);
  background:
    repeating-linear-gradient(90deg, rgba(219,244,250,.018) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(0deg, rgba(219,244,250,.012) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 50% -20%, rgba(123,173,189,.18), transparent 40%),
    linear-gradient(180deg, #203943, #10242d 48%, #071116);
}
body[data-theme="ocean-steel"] .metal-panel {
  background:
    repeating-linear-gradient(90deg, rgba(221,245,250,.025) 0 1px, rgba(0,12,17,.025) 1px 3px, transparent 3px 7px),
    linear-gradient(115deg, rgba(190,230,238,.10), transparent 21%, rgba(190,230,238,.035) 50%, transparent 74%),
    linear-gradient(180deg, #58717c, #314a55 18%, #142832);
}
body[data-theme="ocean-steel"] :is(input:not([type="range"]), select, .frame-number, .suffix-input, .result-stage, .compare-stage) {
  color: #eef8fa;
  background: rgba(6,19,25,.88);
}
body[data-theme="ocean-steel"] :is(.server-card, .playback-cluster, .preload-status, .quota-job-summary) {
  background: rgba(5,18,24,.66);
}

@media (max-width: 700px) {
  body.meteotsunami-active .setup-header > :first-child { padding-right: 0; }
}


/* v1.13.12 readable light themes, stripe-free Silver/Solarized, and Paper Folder watercolor theme */

/* Silver and Solarized Light use soft broad gradients instead of vertical brushed stripes. */
body[data-theme="silver"] {
  background:
    radial-gradient(circle at 16% 4%, rgba(255,255,255,.96), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(255,255,255,.48), transparent 32%),
    linear-gradient(145deg, #f7f8f8 0%, #e5e7e8 42%, #cbd0d2 100%);
}
body[data-theme="silver"] .metal-panel {
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.72), transparent 30%),
    linear-gradient(118deg, rgba(255,255,255,.56), transparent 28%, rgba(255,255,255,.18) 62%, transparent 86%),
    linear-gradient(180deg, #fbfcfc 0%, #e8eaeb 44%, #cbd0d1 100%);
}
body[data-theme="solarized-light"] {
  background:
    radial-gradient(circle at 18% 4%, rgba(255,255,255,.78), transparent 29%),
    radial-gradient(circle at 84% 10%, rgba(181,137,0,.08), transparent 30%),
    linear-gradient(145deg, #fffdf6 0%, #fdf6e3 48%, #e8dfc8 100%);
}
body[data-theme="solarized-light"] .metal-panel {
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.62), transparent 31%),
    linear-gradient(118deg, rgba(255,255,255,.42), transparent 28%, rgba(181,137,0,.045) 65%, transparent 88%),
    linear-gradient(180deg, #fffdf5 0%, #f7f0dc 45%, #e3d9bf 100%);
}

/* Shared contrast repair for every light theme. */
body[data-theme="silver"],
body[data-theme="solarized-light"],
body[data-theme="paper-folder"] {
  color-scheme: light;
  color: var(--text);
}
body[data-theme="silver"] select,
body[data-theme="solarized-light"] select,
body[data-theme="paper-folder"] select {
  color-scheme: light;
}
body[data-theme="silver"] :is(h1,h2,h3,.compact-heading,.field label,.jobs-table th,.numerical-health strong,.meteo-preview-mode strong,.run-mode-caption),
body[data-theme="solarized-light"] :is(h1,h2,h3,.compact-heading,.field label,.jobs-table th,.numerical-health strong,.meteo-preview-mode strong,.run-mode-caption),
body[data-theme="paper-folder"] :is(h1,h2,h3,.compact-heading,.field label,.jobs-table th,.numerical-health strong,.meteo-preview-mode strong,.run-mode-caption) {
  color: var(--text) !important;
  text-shadow: none !important;
}
body[data-theme="silver"] :is(.hero-summary,.card-header p:last-child,.section-title-row p,.preview-footer,.preview-subheader span,.progress-meta,.field small,.jobs-table td,.probe-row small,.login-copy,.login-note,.meteo-auth-message span,.meteo-preview-mode span,.live-job-status-row,footer),
body[data-theme="solarized-light"] :is(.hero-summary,.card-header p:last-child,.section-title-row p,.preview-footer,.preview-subheader span,.progress-meta,.field small,.jobs-table td,.probe-row small,.login-copy,.login-note,.meteo-auth-message span,.meteo-preview-mode span,.live-job-status-row,footer),
body[data-theme="paper-folder"] :is(.hero-summary,.card-header p:last-child,.section-title-row p,.preview-footer,.preview-subheader span,.progress-meta,.field small,.jobs-table td,.probe-row small,.login-copy,.login-note,.meteo-auth-message span,.meteo-preview-mode span,.live-job-status-row,footer) {
  color: var(--muted) !important;
}
body[data-theme="silver"] .card-header,
body[data-theme="solarized-light"] .card-header,
body[data-theme="paper-folder"] .card-header {
  border-bottom-color: var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.46), rgba(58,64,66,.055));
}
body[data-theme="silver"] :is(input:not([type="range"]),select,.frame-number,.suffix-input),
body[data-theme="solarized-light"] :is(input:not([type="range"]),select,.frame-number,.suffix-input),
body[data-theme="paper-folder"] :is(input:not([type="range"]),select,.frame-number,.suffix-input) {
  color: var(--text);
  background: rgba(255,255,255,.84);
  border-color: var(--line-strong);
  box-shadow: inset 0 1px 2px rgba(48,52,54,.16), 0 1px rgba(255,255,255,.70);
}
body[data-theme="solarized-light"] :is(input:not([type="range"]),select,.frame-number,.suffix-input),
body[data-theme="paper-folder"] :is(input:not([type="range"]),select,.frame-number,.suffix-input) {
  background: rgba(255,252,241,.90);
}
body[data-theme="silver"] input[readonly],
body[data-theme="solarized-light"] input[readonly],
body[data-theme="paper-folder"] input[readonly],
body[data-theme="silver"] #parameterForm :is(input,select):disabled,
body[data-theme="silver"] #domainGridForm :is(input,select):disabled,
body[data-theme="solarized-light"] #parameterForm :is(input,select):disabled,
body[data-theme="solarized-light"] #domainGridForm :is(input,select):disabled,
body[data-theme="paper-folder"] #parameterForm :is(input,select):disabled,
body[data-theme="paper-folder"] #domainGridForm :is(input,select):disabled,
body[data-theme="silver"] .field.locked-field :is(input,select),
body[data-theme="solarized-light"] .field.locked-field :is(input,select),
body[data-theme="paper-folder"] .field.locked-field :is(input,select) {
  opacity: 1;
  color: #3f4547;
  border-color: rgba(45,51,54,.30);
  background: rgba(225,228,229,.90);
  -webkit-text-fill-color: currentColor;
}
body[data-theme="solarized-light"] #parameterForm :is(input,select):disabled,
body[data-theme="solarized-light"] #domainGridForm :is(input,select):disabled,
body[data-theme="solarized-light"] .field.locked-field :is(input,select) {
  color: #43575d;
  background: rgba(232,225,205,.92);
}
body[data-theme="paper-folder"] #parameterForm :is(input,select):disabled,
body[data-theme="paper-folder"] #domainGridForm :is(input,select):disabled,
body[data-theme="paper-folder"] .field.locked-field :is(input,select) {
  color: #594b34;
  background: rgba(230,214,171,.92);
}
body[data-theme="silver"] .field.locked-field,
body[data-theme="solarized-light"] .field.locked-field,
body[data-theme="paper-folder"] .field.locked-field {
  opacity: .92;
}
body[data-theme="silver"] .field.locked-field::after,
body[data-theme="solarized-light"] .field.locked-field::after,
body[data-theme="paper-folder"] .field.locked-field::after {
  filter: grayscale(1) contrast(1.15);
}
body[data-theme="silver"] :is(.model-parameter-zone,.meteo-workflow,.meteo-preview-mode,.preflight-stability,.quota-job-summary,.probe-row,.compare-stage,.numerical-health),
body[data-theme="solarized-light"] :is(.model-parameter-zone,.meteo-workflow,.meteo-preview-mode,.preflight-stability,.quota-job-summary,.probe-row,.compare-stage,.numerical-health),
body[data-theme="paper-folder"] :is(.model-parameter-zone,.meteo-workflow,.meteo-preview-mode,.preflight-stability,.quota-job-summary,.probe-row,.compare-stage,.numerical-health) {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255,255,255,.30);
}
body[data-theme="silver"] .model-parameter-zone.last-run::before,
body[data-theme="solarized-light"] .model-parameter-zone.last-run::before,
body[data-theme="paper-folder"] .model-parameter-zone.last-run::before {
  background: linear-gradient(140deg, rgba(255,255,255,.48), rgba(74,80,82,.10) 52%, rgba(255,255,255,.24));
}
body[data-theme="solarized-light"] .model-parameter-zone.last-run::before {
  background: linear-gradient(140deg, rgba(255,253,244,.56), rgba(181,137,0,.075) 52%, rgba(88,110,117,.06));
}
body[data-theme="paper-folder"] .model-parameter-zone.last-run::before {
  background: linear-gradient(140deg, rgba(255,247,211,.52), rgba(177,111,55,.10) 52%, rgba(61,130,134,.07));
}
body[data-theme="silver"] .setup-config-shell.standard-last-run,
body[data-theme="solarized-light"] .setup-config-shell.standard-last-run,
body[data-theme="paper-folder"] .setup-config-shell.standard-last-run {
  color: var(--text);
  border-color: var(--line-strong);
  background: linear-gradient(145deg, rgba(255,255,255,.42), rgba(72,78,80,.085) 54%, rgba(255,255,255,.18));
}
body[data-theme="silver"] :is(.meteo-auth-message,.login-message,.preview-confirm-row),
body[data-theme="solarized-light"] :is(.meteo-auth-message,.login-message,.preview-confirm-row),
body[data-theme="paper-folder"] :is(.meteo-auth-message,.login-message,.preview-confirm-row) {
  color: var(--text) !important;
}
body[data-theme="silver"] :is(.auth-status.authenticated,.auth-status.authenticated .auth-user,.signed-user-name),
body[data-theme="solarized-light"] :is(.auth-status.authenticated,.auth-status.authenticated .auth-user,.signed-user-name),
body[data-theme="paper-folder"] :is(.auth-status.authenticated,.auth-status.authenticated .auth-user,.signed-user-name) {
  color: var(--green) !important;
  text-shadow: none;
}
body[data-theme="silver"] :is(.secondary-btn,.icon-btn,.auth-action-btn,.jobs-table button),
body[data-theme="solarized-light"] :is(.secondary-btn,.icon-btn,.auth-action-btn,.jobs-table button),
body[data-theme="paper-folder"] :is(.secondary-btn,.icon-btn,.auth-action-btn,.jobs-table button) {
  color: var(--text);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(115,122,124,.18));
  box-shadow: inset 0 1px rgba(255,255,255,.82), 0 2px 5px rgba(50,55,58,.16);
}
body[data-theme="silver"] .danger-btn,
body[data-theme="solarized-light"] .danger-btn,
body[data-theme="paper-folder"] .danger-btn {
  color: #8f2630;
  background: rgba(179,59,69,.10);
}
body[data-theme="silver"] :is(.playback-cluster,.preload-status,.server-card,.quota-job-summary),
body[data-theme="solarized-light"] :is(.playback-cluster,.preload-status,.server-card,.quota-job-summary),
body[data-theme="paper-folder"] :is(.playback-cluster,.preload-status,.server-card,.quota-job-summary) {
  color: var(--text);
  background: rgba(255,255,255,.52);
  box-shadow: inset 0 1px rgba(255,255,255,.78), 0 2px 8px rgba(50,55,58,.10);
}
body[data-theme="silver"] .preload-status.ready,
body[data-theme="solarized-light"] .preload-status.ready,
body[data-theme="paper-folder"] .preload-status.ready { color: #17663d; }
body[data-theme="silver"] .preload-status.loading,
body[data-theme="solarized-light"] .preload-status.loading,
body[data-theme="paper-folder"] .preload-status.loading { color: #89520d; }
body[data-theme="silver"] :is(.live-run-strip,.viewer-card > .live-run-strip),
body[data-theme="solarized-light"] :is(.live-run-strip,.viewer-card > .live-run-strip),
body[data-theme="paper-folder"] :is(.live-run-strip,.viewer-card > .live-run-strip) {
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(74,80,82,.06));
  border-color: var(--line);
}
body[data-theme="silver"] .progress-shell,
body[data-theme="solarized-light"] .progress-shell,
body[data-theme="paper-folder"] .progress-shell {
  background: rgba(74,80,82,.18);
}
body[data-theme="silver"] .pill,
body[data-theme="solarized-light"] .pill,
body[data-theme="paper-folder"] .pill {
  color: var(--accent);
  background: rgba(38,139,210,.065);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}
body[data-theme="silver"] .jobs-table th,
body[data-theme="solarized-light"] .jobs-table th,
body[data-theme="paper-folder"] .jobs-table th {
  background: rgba(255,255,255,.28);
}
body[data-theme="silver"] .stage-overlay,
body[data-theme="solarized-light"] .stage-overlay,
body[data-theme="paper-folder"] .stage-overlay {
  color: var(--text);
}

/* Pale manila folder with aged paper fibres and watercolor-marker accents. */
body[data-theme="paper-folder"] {
  --bg: #e9d79e;
  --bg-deep: #c9aa63;
  --metal-1: #fff2bf;
  --metal-2: #ead49a;
  --metal-3: #c7aa67;
  --metal-edge: rgba(102,77,35,.42);
  --line: rgba(91,70,34,.20);
  --line-strong: rgba(82,61,27,.38);
  --text: #3f3423;
  --muted: #6c5d43;
  --dim: #87775a;
  --accent: #247b83;
  --green: #3d8054;
  --orange: #b8692d;
  --red: #b53f4a;
  --shadow: 0 14px 34px rgba(93,67,25,.23);
  background:
    radial-gradient(circle at 12% 8%, rgba(207,86,93,.075), transparent 18%),
    radial-gradient(circle at 82% 9%, rgba(39,130,143,.075), transparent 20%),
    radial-gradient(circle at 56% 76%, rgba(222,159,48,.08), transparent 24%),
    repeating-linear-gradient(7deg, rgba(94,66,27,.025) 0 1px, transparent 1px 6px),
    linear-gradient(145deg, #f7e9b8 0%, #ead79b 48%, #d1b570 100%);
}
body[data-theme="paper-folder"] .metal-panel {
  background:
    radial-gradient(circle at 10% 16%, rgba(215,76,91,.085), transparent 18%),
    radial-gradient(circle at 88% 14%, rgba(41,132,150,.08), transparent 20%),
    radial-gradient(circle at 58% 86%, rgba(216,153,44,.075), transparent 25%),
    repeating-linear-gradient(5deg, rgba(91,66,29,.025) 0 1px, transparent 1px 6px),
    linear-gradient(180deg, #fff1bd 0%, #edd99d 48%, #d0b574 100%);
  box-shadow: inset 0 1px rgba(255,250,220,.92), inset 0 -1px rgba(102,77,35,.16), var(--shadow);
}
body[data-theme="paper-folder"] .tabs {
  background:
    radial-gradient(circle at 18% 50%, rgba(44,139,154,.10), transparent 22%),
    radial-gradient(circle at 58% 50%, rgba(213,75,97,.09), transparent 24%),
    radial-gradient(circle at 88% 50%, rgba(226,158,47,.10), transparent 22%),
    rgba(255,244,204,.58);
}
body[data-theme="paper-folder"] .tab-btn { color: #56472f; background: rgba(255,247,214,.45); }
body[data-theme="paper-folder"] .tab-btn:nth-child(4n+1) { border-bottom-color: rgba(31,128,140,.48); }
body[data-theme="paper-folder"] .tab-btn:nth-child(4n+2) { border-bottom-color: rgba(190,65,91,.46); }
body[data-theme="paper-folder"] .tab-btn:nth-child(4n+3) { border-bottom-color: rgba(208,131,37,.50); }
body[data-theme="paper-folder"] .tab-btn:nth-child(4n) { border-bottom-color: rgba(89,121,74,.48); }
body[data-theme="paper-folder"] .tab-btn.active {
  color: #2f291f;
  background:
    radial-gradient(circle at 18% 50%, rgba(47,145,157,.22), transparent 38%),
    radial-gradient(circle at 84% 50%, rgba(209,82,103,.18), transparent 36%),
    linear-gradient(180deg, #fff8dc, #ead79d);
}
body[data-theme="paper-folder"] .section-kicker,
body[data-theme="paper-folder"] .eyebrow { color: #287d87; }
body[data-theme="paper-folder"] .back-site-link { color: #a5522d; }
body[data-theme="paper-folder"] .primary-btn {
  color: #2e3023;
  border-color: rgba(70,99,72,.48);
  background:
    radial-gradient(circle at 20% 50%, rgba(40,139,149,.22), transparent 40%),
    radial-gradient(circle at 82% 50%, rgba(221,151,40,.20), transparent 38%),
    linear-gradient(180deg, #fff6cd, #d9c47f);
}
body[data-theme="paper-folder"] .model-badge {
  color: #fff8df;
  background: rgba(76,62,43,.82);
  border-color: rgba(255,245,210,.40);
}


/* v1.13.13 stable Last Run presentation, flash-free theme boot, and readable single-wash themes */

/* A rebuilt form must never lose the visual state represented by the application state. */
body.last-run-active .model-parameter-zone.last-run::before,
body[data-run-mode-state="last"] .model-parameter-zone.last-run::before {
  opacity: 1 !important;
}
body.last-run-active:not(.meteotsunami-active) .setup-config-shell,
body[data-run-mode-state="last"]:not(.meteotsunami-active) .setup-config-shell {
  padding: 10px 11px 11px;
  border: 1px solid rgba(239,240,236,.56);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 4px 14px rgba(0,0,0,.24);
}
body.last-run-active:not(.meteotsunami-active) .setup-config-shell > #domainGridSection,
body.last-run-active:not(.meteotsunami-active) .setup-config-shell > #modelParameterZone {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* High-contrast job state chips and secondary text for every palette. */
body[data-theme="graphite"] .state-chip.completed,
body[data-theme="ocean-steel"] .state-chip.completed {
  color: #d8ffe5;
  background: rgba(50,150,91,.20);
  border-color: rgba(134,230,170,.52);
}
body[data-theme="graphite"] :is(.state-chip.running,.state-chip.queued),
body[data-theme="ocean-steel"] :is(.state-chip.running,.state-chip.queued) {
  color: #ffe7b9;
  background: rgba(192,130,29,.20);
  border-color: rgba(239,196,125,.48);
}
body[data-theme="graphite"] :is(.state-chip.failed,.state-chip.cancelled,.state-chip.timed_out,.state-chip.unstable),
body[data-theme="ocean-steel"] :is(.state-chip.failed,.state-chip.cancelled,.state-chip.timed_out,.state-chip.unstable) {
  color: #ffd9dc;
  background: rgba(186,55,65,.20);
  border-color: rgba(255,138,144,.48);
}
body[data-theme="silver"] .state-chip.completed,
body[data-theme="solarized-light"] .state-chip.completed,
body[data-theme="paper-folder"] .state-chip.completed {
  color: #145f39 !important;
  background: rgba(48,145,86,.14);
  border-color: rgba(30,117,65,.38);
}
body[data-theme="silver"] :is(.state-chip.running,.state-chip.queued),
body[data-theme="solarized-light"] :is(.state-chip.running,.state-chip.queued),
body[data-theme="paper-folder"] :is(.state-chip.running,.state-chip.queued) {
  color: #754708 !important;
  background: rgba(196,132,28,.14);
  border-color: rgba(151,94,10,.34);
}
body[data-theme="silver"] :is(.state-chip.failed,.state-chip.cancelled,.state-chip.timed_out,.state-chip.unstable),
body[data-theme="solarized-light"] :is(.state-chip.failed,.state-chip.cancelled,.state-chip.timed_out,.state-chip.unstable),
body[data-theme="paper-folder"] :is(.state-chip.failed,.state-chip.cancelled,.state-chip.timed_out,.state-chip.unstable) {
  color: #8b2630 !important;
  background: rgba(186,62,72,.12);
  border-color: rgba(154,43,52,.32);
}
body[data-theme="silver"] :is(.server-card small,.auth-status,.jobs-table td,.preview-footer,.grid-capacity-current,.grid-capacity-limit),
body[data-theme="solarized-light"] :is(.server-card small,.auth-status,.jobs-table td,.preview-footer,.grid-capacity-current,.grid-capacity-limit),
body[data-theme="paper-folder"] :is(.server-card small,.auth-status,.jobs-table td,.preview-footer,.grid-capacity-current,.grid-capacity-limit) {
  color: var(--muted) !important;
}
body[data-theme="silver"] :is(.state-chip,.jobs-table button,.pill,.grid-capacity-badge,.fixed-grid-badge),
body[data-theme="solarized-light"] :is(.state-chip,.jobs-table button,.pill,.grid-capacity-badge,.fixed-grid-badge),
body[data-theme="paper-folder"] :is(.state-chip,.jobs-table button,.pill,.grid-capacity-badge,.fixed-grid-badge) {
  opacity: 1;
  text-shadow: none;
}
body[data-theme="silver"] :is(button:disabled,.delete-job-btn:disabled),
body[data-theme="solarized-light"] :is(button:disabled,.delete-job-btn:disabled),
body[data-theme="paper-folder"] :is(button:disabled,.delete-job-btn:disabled) {
  color: #5d6264 !important;
  -webkit-text-fill-color: currentColor;
  opacity: .78;
}

/* Reinforce the light-theme Last Run enclosure after any New/Last toggle. */
body.last-run-active[data-theme="silver"]:not(.meteotsunami-active) .setup-config-shell,
body.last-run-active[data-theme="silver"] .model-parameter-zone.last-run::before {
  background: rgba(178,184,187,.42);
  border-color: rgba(55,62,65,.42);
}
body.last-run-active[data-theme="solarized-light"]:not(.meteotsunami-active) .setup-config-shell,
body.last-run-active[data-theme="solarized-light"] .model-parameter-zone.last-run::before {
  background: rgba(214,202,169,.48);
  border-color: rgba(88,110,117,.38);
}
body.last-run-active[data-theme="paper-folder"]:not(.meteotsunami-active) .setup-config-shell,
body.last-run-active[data-theme="paper-folder"] .model-parameter-zone.last-run::before {
  background: rgba(207,183,126,.46);
  border-color: rgba(91,70,34,.42);
}

/* Paper Folder uses neutral aged paper plus one watercolor wash per component. */
body[data-theme="paper-folder"] {
  background:
    repeating-linear-gradient(7deg, rgba(94,66,27,.026) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(97deg, rgba(255,255,255,.09) 0 1px, transparent 1px 11px),
    linear-gradient(145deg, #f5e7b6 0%, #e7d39a 49%, #ceb06e 100%);
}
body[data-theme="paper-folder"] .metal-panel {
  background:
    repeating-linear-gradient(6deg, rgba(91,66,29,.024) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #fff0ba 0%, #ead59a 50%, #cfb170 100%);
}
body[data-theme="paper-folder"] .card-header {
  background: rgba(211,154,56,.12);
}
body[data-theme="paper-folder"] .tabs {
  background: rgba(255,244,204,.64);
}
body[data-theme="paper-folder"] .tab-btn {
  color: #4f422e;
  background: transparent;
}
body[data-theme="paper-folder"] .tab-btn:nth-child(4n+1) { background: rgba(42,135,145,.11); border-bottom-color: rgba(31,128,140,.55); }
body[data-theme="paper-folder"] .tab-btn:nth-child(4n+2) { background: rgba(190,65,91,.10); border-bottom-color: rgba(190,65,91,.52); }
body[data-theme="paper-folder"] .tab-btn:nth-child(4n+3) { background: rgba(208,131,37,.12); border-bottom-color: rgba(208,131,37,.56); }
body[data-theme="paper-folder"] .tab-btn:nth-child(4n) { background: rgba(89,121,74,.11); border-bottom-color: rgba(89,121,74,.54); }
body[data-theme="paper-folder"] .tab-btn:nth-child(4n+1).active { background: rgba(42,135,145,.25); }
body[data-theme="paper-folder"] .tab-btn:nth-child(4n+2).active { background: rgba(190,65,91,.22); }
body[data-theme="paper-folder"] .tab-btn:nth-child(4n+3).active { background: rgba(208,131,37,.25); }
body[data-theme="paper-folder"] .tab-btn:nth-child(4n).active { background: rgba(89,121,74,.23); }
body[data-theme="paper-folder"] .primary-btn {
  color: #163f43;
  border-color: rgba(35,119,129,.48);
  background: rgba(42,135,145,.22);
  box-shadow: inset 0 1px rgba(255,255,255,.45), 0 2px 5px rgba(74,58,25,.14);
}
body[data-theme="paper-folder"] :is(.secondary-btn,.jobs-table button) {
  color: #294e69;
  border-color: rgba(55,104,137,.42);
  background: rgba(70,127,164,.16);
}
body[data-theme="paper-folder"] :is(.icon-btn,.auth-action-btn) {
  color: #68430e;
  border-color: rgba(168,105,20,.40);
  background: rgba(211,143,48,.17);
}
body[data-theme="paper-folder"] :is(.danger-btn,.delete-job-btn) {
  color: #8a2932;
  border-color: rgba(165,49,60,.38);
  background: rgba(190,65,78,.15);
}
body[data-theme="paper-folder"] :is(.pill,.grid-capacity-badge,.fixed-grid-badge) {
  color: #2f6441;
  border-color: rgba(55,116,76,.38);
  background: rgba(69,137,89,.13);
}
body[data-theme="paper-folder"] :is(.meteo-auth-message,.login-message,.preview-confirm-row) {
  border-color: rgba(55,116,76,.34);
  background: rgba(69,137,89,.11);
}
body[data-theme="paper-folder"] :is(.preflight-stability,.quota-job-summary) {
  border-color: rgba(169,108,22,.32);
  background: rgba(211,143,48,.11);
}
body[data-theme="paper-folder"] :is(.playback-cluster,.live-run-strip,.viewer-card > .live-run-strip) {
  border-color: rgba(55,104,137,.32);
  background: rgba(70,127,164,.10);
}
body[data-theme="paper-folder"] .tab-btn.active,
body[data-theme="paper-folder"] .primary-btn,
body[data-theme="paper-folder"] :is(.secondary-btn,.icon-btn,.auth-action-btn,.danger-btn,.delete-job-btn) {
  background-image: none !important;
}

/* v1.13.14 fail-safe Last Run locking, silver-groove switch, and quick theme control */

/* The switch is now a recessed silver housing with one narrow black groove. */
body[data-run-mode-style="slider"] .run-mode-slider-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid #6e7271;
  background:
    linear-gradient(180deg, #f4f5f2 0%, #c9ccca 48%, #979c9a 100%);
  box-shadow:
    inset 0 3px 5px rgba(30,33,33,.42),
    inset 0 -2px 3px rgba(255,255,255,.72),
    0 1px 0 rgba(255,255,255,.55),
    0 1px 3px rgba(0,0,0,.42);
}
body[data-run-mode-style="slider"] .run-mode-slider-shell::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 7px;
  right: 7px;
  top: 50%;
  height: 6px;
  transform: translateY(-50%);
  border: 1px solid rgba(0,0,0,.92);
  border-radius: 4px;
  background: #090a0a;
  box-shadow:
    inset 0 2px 3px rgba(0,0,0,.96),
    0 1px 0 rgba(255,255,255,.34);
}
body[data-run-mode-style="slider"] .run-mode-slider-thumb {
  z-index: 2;
}

/* Theme selector lives with backend status; the gear follows the sign button. */
.server-card {
  padding-right: 12px;
}
.server-theme-row {
  display: grid;
  grid-template-columns: auto minmax(128px, 1fr);
  align-items: center;
  gap: 7px;
  margin-top: 5px;
}
.server-theme-row label {
  color: var(--muted);
  font-size: .64rem;
  font-weight: 800;
}
.server-theme-row select {
  width: 100%;
  min-width: 0;
  height: 25px;
  min-height: 25px;
  padding: 0 24px 0 7px;
  font-size: .65rem;
  font-weight: 750;
}
.auth-action-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
.statistics-admin-btn {
  position: static;
  top: auto;
  right: auto;
  flex: 0 0 29px;
}

/* Body state is the source of truth for lock visuals, even if a form is rebuilt. */
body[data-last-run-inputs-locked="true"] #parameterForm .field:not(.meteo-workflow),
body[data-last-run-inputs-locked="true"]:not(.meteotsunami-active) #domainGridForm .field {
  position: relative;
  opacity: .78;
}
body[data-last-run-inputs-locked="true"] #parameterForm .field:not(.meteo-workflow)::after,
body[data-last-run-inputs-locked="true"]:not(.meteotsunami-active) #domainGridForm .field::after {
  content: "🔒";
  position: absolute;
  z-index: 4;
  right: 11px;
  bottom: 7px;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-size: .8rem;
  line-height: 1;
  filter: grayscale(1);
  pointer-events: none;
}
body[data-last-run-inputs-locked="true"] #parameterForm :is(input, select, textarea):disabled,
body[data-last-run-inputs-locked="true"]:not(.meteotsunami-active) #domainGridForm :is(input, select, textarea):disabled {
  cursor: not-allowed;
  pointer-events: none;
  padding-right: 32px;
  color: #b8bab7;
  background: rgba(13,14,14,.84);
  -webkit-text-fill-color: currentColor;
  opacity: 1;
}
body[data-theme="silver"][data-last-run-inputs-locked="true"] #parameterForm :is(input,select,textarea):disabled,
body[data-theme="silver"][data-last-run-inputs-locked="true"]:not(.meteotsunami-active) #domainGridForm :is(input,select,textarea):disabled {
  color: #3f4547;
  background: rgba(220,224,225,.94);
}
body[data-theme="solarized-light"][data-last-run-inputs-locked="true"] #parameterForm :is(input,select,textarea):disabled,
body[data-theme="solarized-light"][data-last-run-inputs-locked="true"]:not(.meteotsunami-active) #domainGridForm :is(input,select,textarea):disabled {
  color: #40565d;
  background: rgba(229,222,201,.95);
}
body[data-theme="paper-folder"][data-last-run-inputs-locked="true"] #parameterForm :is(input,select,textarea):disabled,
body[data-theme="paper-folder"][data-last-run-inputs-locked="true"]:not(.meteotsunami-active) #domainGridForm :is(input,select,textarea):disabled {
  color: #594b34;
  background: rgba(226,210,167,.95);
}

@media (max-width: 760px) {
  .server-theme-row { grid-template-columns: 64px minmax(0,1fr); }
  .auth-control-row { align-items: center; }
}


/* v1.13.15 administrator default theme, personal local overrides, and three-row server card */
.server-card {
  min-width: 300px;
  padding: 7px 10px;
}
.server-card .status-line {
  margin-bottom: 3px;
}
.server-meta-row {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  margin-bottom: 4px;
}
.server-meta-row > small {
  min-width: 0;
  margin: 0;
  line-height: 1.15;
  white-space: nowrap;
}
.server-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
}
.server-controls-row > .auth-status {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.server-theme-row {
  flex: 1 1 auto;
  grid-template-columns: auto minmax(104px, 1fr);
  gap: 6px;
  min-width: 0;
  margin-top: 0;
}
.server-theme-row select {
  max-width: 148px;
}
.auth-control-row {
  margin-top: 0;
}
.auth-action-group {
  gap: 5px;
}
.auth-action-btn,
.statistics-admin-btn {
  height: 25px;
  min-height: 25px;
}
.auth-action-btn {
  padding-top: 0;
  padding-bottom: 0;
}
.statistics-admin-btn {
  flex: 0 0 25px;
  width: 25px;
  font-size: 15px;
}

@media (max-width: 760px) {
  .server-card { min-width: 0; }
  .server-meta-row > small { white-space: normal; }
  .server-controls-row { align-items: center; }
  .server-controls-row > .auth-status { max-width: 110px; }
  .server-theme-row { grid-template-columns: auto minmax(0,1fr); }
  .server-theme-row select { max-width: none; }
}


/* v1.13.16 compact theme selector, absolute administrator gear, and header limit copy */
.server-card {
  position: relative;
}
.server-card .status-line {
  padding-right: 30px;
}
.server-theme-row {
  flex: 0 0 auto;
  grid-template-columns: auto 118px;
}
.server-theme-row select {
  width: 118px;
  max-width: 118px;
}
.statistics-admin-btn {
  position: absolute;
  z-index: 4;
  top: 7px;
  right: 7px;
  width: 25px;
  height: 25px;
  min-height: 25px;
  margin: 0;
}
.auth-action-group {
  gap: 0;
}
@media (max-width: 760px) {
  .server-theme-row { grid-template-columns: auto 118px; }
  .server-theme-row select { width: 118px; max-width: 118px; }
}


/* v1.13.18 compact backend-status panel and narrow theme selector */
.server-card {
  padding: 4px 5px;
  min-width: 276px;
}
.server-card .status-line {
  margin-bottom: 1px;
  padding-right: 28px;
}
.server-meta-row {
  margin-bottom: 2px;
}
.server-meta-row > small {
  line-height: 1.05;
}
.server-controls-row {
  gap: 4px;
  align-items: end;
}
.server-theme-row {
  flex: 0 0 auto;
  grid-template-columns: auto 83px;
  gap: 4px;
}
.server-theme-row label {
  margin-bottom: 0;
}
.server-theme-row select {
  width: 83px;
  max-width: 83px;
  padding-left: 5px;
  padding-right: 18px;
  font-size: .78rem;
}
.auth-action-group {
  gap: 0;
}
.auth-action-btn,
.statistics-admin-btn {
  height: 25px;
  min-height: 25px;
}
.statistics-admin-btn {
  top: 5px;
  right: 5px;
}
.server-controls-row > .auth-status {
  flex: 0 1 98px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.02;
  text-align: left;
  align-self: center;
}
.auth-status-label,
.auth-user-block {
  display: block;
}
.auth-status.authenticated .auth-status-label {
  color: inherit;
  font-size: .62rem;
  line-height: 1.02;
}
.auth-status.authenticated .auth-user.auth-user-block {
  margin-top: 1px;
  line-height: 1.02;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
@media (max-width: 760px) {
  .server-card { min-width: 0; padding: 4px 5px; }
  .server-theme-row { grid-template-columns: auto 83px; }
  .server-theme-row select { width: 83px; max-width: 83px; }
  .server-controls-row > .auth-status { flex-basis: 90px; }
}


/* v1.13.19 refined status-panel spacing, compact theme names, divider, and sky-blue Ocean */
.server-card {
  padding: 6px 9px;
}
.server-card .status-line {
  padding-right: 30px;
}
.statistics-admin-btn {
  top: 6px;
  right: 7px;
}
.server-controls-row {
  gap: 6px;
}
.server-theme-row {
  grid-template-columns: auto 91px;
  gap: 4px;
}
.server-theme-row select {
  width: 91px;
  max-width: 91px;
  padding-left: 5px;
  padding-right: 18px;
}
.server-controls-row > .auth-status {
  position: relative;
  flex-basis: 102px;
  padding-left: 12px;
}
.server-controls-row > .auth-status::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(190,194,194,.14) 12%,
    rgba(190,194,194,.55) 20%,
    rgba(190,194,194,.55) 80%,
    rgba(190,194,194,.14) 88%,
    transparent 100%);
}

/* Ocean now uses a brighter sky-blue metal palette. */
body[data-theme="ocean-steel"] {
  color-scheme: dark;
  --bg: #5ca9d6;
  --bg-deep: #183f5b;
  --metal-1: #bfe8fa;
  --metal-2: #70bde4;
  --metal-3: #2c78a8;
  --metal-edge: rgba(232,249,255,.62);
  --line: rgba(224,246,255,.25);
  --line-strong: rgba(232,249,255,.56);
  --text: #f7fcff;
  --muted: #d8eef8;
  --dim: #a8d2e6;
  --accent: #89f1ea;
  --green: #9cf0b8;
  --orange: #ffe09a;
  --red: #ff9ba4;
  --shadow: 0 15px 44px rgba(10,53,83,.42);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 48% -15%, rgba(222,247,255,.45), transparent 42%),
    linear-gradient(180deg, #8ed1ee 0%, #55a9d5 42%, #2d77a5 75%, #174463 100%);
}
body[data-theme="ocean-steel"] .metal-panel {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, rgba(20,82,118,.025) 1px 3px, transparent 3px 7px),
    linear-gradient(115deg, rgba(239,251,255,.20), transparent 22%, rgba(255,255,255,.07) 50%, transparent 74%),
    linear-gradient(180deg, #a6dbef 0%, #72bbe0 18%, #327fae 100%);
}
body[data-theme="ocean-steel"] :is(input:not([type="range"]), select, .frame-number, .suffix-input, .result-stage, .compare-stage) {
  color: #f5fbff;
  background: rgba(19,67,96,.88);
}
body[data-theme="ocean-steel"] :is(.server-card, .playback-cluster, .preload-status, .quota-job-summary) {
  background: rgba(18,67,97,.72);
}

@media (max-width: 760px) {
  .server-card { padding: 6px 9px; }
  .server-theme-row { grid-template-columns: auto 91px; }
  .server-theme-row select { width: 91px; max-width: 91px; }
  .server-controls-row > .auth-status { flex-basis: 96px; padding-left: 10px; }
}


/* v1.13.20 header-panel refinements: narrow theme chevrons, boxed auth zone, spaced server limits */
.server-card {
  padding: 7px 10px;
}
.server-card .status-line {
  padding-right: 34px;
}
.server-meta-row > small {
  letter-spacing: 0;
}
.server-controls-row {
  gap: 8px;
  align-items: stretch;
}
.server-theme-row {
  grid-template-columns: auto 100px;
  gap: 4px;
  align-content: center;
}
.server-theme-row select {
  width: 100px;
  max-width: 100px;
  padding-left: 6px;
  padding-right: 24px;
}
#themeQuickSelect {
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%),
    linear-gradient(225deg, transparent 50%, currentColor 50%),
    linear-gradient(315deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 12px) calc(50% - 5px),
    calc(100% - 7px) calc(50% - 5px),
    calc(100% - 12px) calc(50% + 5px),
    calc(100% - 7px) calc(50% + 5px);
  background-size: 5px 5px, 5px 5px, 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.auth-session-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: -7px;
  margin-right: -10px;
  margin-bottom: -7px;
  padding: 9px 10px 7px 12px;
  min-height: calc(100% + 14px);
  background: rgba(0,0,0,.07);
  border-top: 1px solid rgba(128,132,134,.42);
  border-left: 1px solid rgba(128,132,134,.42);
  border-top-left-radius: 20px;
  box-shadow: inset 0 2px 7px rgba(0,0,0,.15), inset 1px 0 0 rgba(255,255,255,.08);
}
.server-controls-row > .auth-status {
  position: relative;
  flex: 0 1 120px;
  padding-left: 0;
}
.server-controls-row > .auth-status::before {
  display: none;
}
.auth-status.authenticated {
  color: var(--accent);
}
.auth-status.authenticated .auth-user.auth-user-block {
  font-size: .98rem;
  font-weight: 900;
  line-height: 1.05;
  margin-top: 0;
}
.auth-action-group {
  gap: 0;
  align-self: center;
}
body[data-theme="silver"] .auth-session-box,
body[data-theme="solarized-light"] .auth-session-box,
body[data-theme="paper-folder"] .auth-session-box {
  background: rgba(89,91,91,.07);
  border-top-color: rgba(115,118,120,.34);
  border-left-color: rgba(115,118,120,.34);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.10), inset 1px 0 0 rgba(255,255,255,.16);
}
body[data-theme="graphite"] .auth-session-box,
body[data-theme="ocean-steel"] .auth-session-box {
  background: rgba(255,255,255,.04);
  border-top-color: rgba(210,214,216,.18);
  border-left-color: rgba(210,214,216,.18);
}
@media (max-width: 760px) {
  .server-card { padding: 7px 10px; }
  .server-theme-row { grid-template-columns: auto 100px; }
  .server-theme-row select { width: 100px; max-width: 100px; }
  .auth-session-box { margin-right: -10px; margin-bottom: -7px; padding: 8px 10px 7px 10px; gap: 8px; }
  .server-controls-row > .auth-status { flex-basis: 104px; }
}


/* v1.13.21 header control polishing: smaller theme arrows, tighter auth dock, edge-flush session box */
#themeQuickSelect {
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%),
    linear-gradient(225deg, transparent 50%, currentColor 50%),
    linear-gradient(315deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 10px) calc(50% - 4px),
    calc(100% - 6px) calc(50% - 4px),
    calc(100% - 10px) calc(50% + 4px),
    calc(100% - 6px) calc(50% + 4px);
  background-size: 4px 4px, 4px 4px, 4px 4px, 4px 4px;
}
.server-theme-row select {
  padding-right: 18px;
}
.auth-session-box {
  gap: 8px;
  margin-top: -1px;
  margin-right: -10px;
  margin-bottom: -7px;
  padding: 5px 6px 4px 10px;
  min-height: calc(100% + 8px);
  border-top: 1px solid rgba(128,132,134,.42);
  border-left: 1px solid rgba(128,132,134,.42);
  border-right: 1px solid rgba(128,132,134,.28);
  border-bottom: 1px solid rgba(128,132,134,.28);
  border-top-left-radius: 10px;
  border-bottom-right-radius: 10px;
  box-shadow: inset 0 2px 7px rgba(0,0,0,.15), inset 1px 0 0 rgba(255,255,255,.08);
}
body[data-theme="silver"] .auth-session-box,
body[data-theme="solarized-light"] .auth-session-box,
body[data-theme="paper-folder"] .auth-session-box {
  border-right-color: rgba(115,118,120,.25);
  border-bottom-color: rgba(115,118,120,.25);
}
body[data-theme="graphite"] .auth-session-box,
body[data-theme="ocean-steel"] .auth-session-box {
  border-right-color: rgba(210,214,216,.12);
  border-bottom-color: rgba(210,214,216,.12);
}
.server-controls-row > .auth-status {
  flex: 0 1 118px;
}
.auth-action-group {
  margin-right: 0;
}
@media (max-width: 760px) {
  .auth-session-box {
    margin-right: -10px;
    margin-bottom: -7px;
    padding: 5px 6px 4px 8px;
    gap: 6px;
    min-height: calc(100% + 8px);
  }
}


/* v1.13.22 header fine-tuning: 10% narrower theme field, breathing username, larger pale gear */
.server-theme-row {
  grid-template-columns: auto 90px;
}
.server-theme-row select {
  width: 90px;
  max-width: 90px;
  padding-left: 6px;
  padding-right: 16px;
}
#themeQuickSelect {
  background-position:
    calc(100% - 9px) calc(50% - 3px),
    calc(100% - 5px) calc(50% - 3px),
    calc(100% - 9px) calc(50% + 3px),
    calc(100% - 5px) calc(50% + 3px);
  background-size: 3px 3px, 3px 3px, 3px 3px, 3px 3px;
}
.auth-session-box {
  padding: 4px 4px 3px 10px;
  min-height: calc(100% + 7px);
  border-top-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
.server-controls-row > .auth-status {
  flex: 0 1 116px;
}
.auth-status.authenticated .auth-user.auth-user-block {
  font-size: .92rem;
  line-height: 1.16;
  padding-bottom: 1px;
  animation: username-breathe 2s ease-in-out infinite;
}
@keyframes username-breathe {
  0%, 100% { color: #8aa900; text-shadow: none; }
  50% { color: #b8f54a; text-shadow: 0 0 5px rgba(184,245,74,.26); }
}
.statistics-admin-btn {
  width: 33px;
  height: 33px;
  min-height: 33px;
  top: 5px;
  right: 7px;
  border: 1px solid rgba(160,164,164,.22);
  border-radius: 9px;
  background: rgba(232,234,235,.34);
  color: rgba(245,246,247,.94);
  font-size: 25px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
  backdrop-filter: blur(1px);
}
.statistics-admin-btn:hover,
.statistics-admin-btn:focus-visible {
  transform: rotate(12deg);
  border-color: rgba(160,164,164,.35);
  background: rgba(234,236,237,.42);
}
body[data-theme="silver"] .statistics-admin-btn,
body[data-theme="solarized-light"] .statistics-admin-btn,
body[data-theme="paper-folder"] .statistics-admin-btn {
  border-color: rgba(142,146,146,.18);
  background: rgba(210,213,214,.22);
  color: rgba(90,96,101,.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
body[data-theme="graphite"] .statistics-admin-btn,
body[data-theme="ocean-steel"] .statistics-admin-btn {
  border-color: rgba(220,224,226,.16);
  background: rgba(222,225,227,.16);
}
@media (max-width: 760px) {
  .server-theme-row { grid-template-columns: auto 90px; }
  .server-theme-row select { width: 90px; max-width: 90px; }
  .auth-session-box { padding: 4px 4px 3px 8px; min-height: calc(100% + 7px); }
}


/* v1.13.23 header refinement: compact theme field, animated username glow, image-based admin gear */
.server-card {
  padding: 7px 10px 3px;
}
.server-controls-row {
  margin-top: 3px;
}
.server-theme-row {
  grid-template-columns: auto 82px;
  align-items: end;
}
.server-theme-row select {
  width: 82px;
  max-width: 82px;
  padding-left: 6px;
  padding-right: 14px;
}
#themeQuickSelect {
  background-position:
    calc(100% - 8px) calc(50% - 3px),
    calc(100% - 5px) calc(50% - 3px),
    calc(100% - 8px) calc(50% + 3px),
    calc(100% - 5px) calc(50% + 3px);
  background-size: 3px 3px, 3px 3px, 3px 3px, 3px 3px;
}
.auth-session-box {
  padding: 2px 4px 2px 10px;
  min-height: calc(100% + 5px);
  margin-bottom: -3px;
}
.server-controls-row > .auth-status {
  flex: 0 1 116px;
  overflow: visible;
}
.auth-status.authenticated .auth-user.auth-user-block {
  font-size: 1rem;
  line-height: 1.22;
  padding-bottom: 2px;
  overflow: visible;
  text-overflow: clip;
  animation: username-breathe 2s ease-in-out infinite;
}
.auth-session-box .auth-action-btn {
  font-size: 1rem;
  padding: 2px 9px;
}
@keyframes username-breathe {
  0%, 100% { color: #8aa900; text-shadow: none; }
  50% { color: #c8ff54; text-shadow: 0 0 6px rgba(200,255,84,.24); }
}
.statistics-admin-btn {
  top: 7px;
  right: 7px;
  width: 29px;
  height: 29px;
  min-height: 29px;
  padding: 2px;
  border: 1px solid rgba(128,132,134,.28);
  border-radius: 7px;
  background: rgba(0,0,0,.07);
  color: transparent;
  font-size: 0;
  line-height: 0;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.10), inset 1px 0 0 rgba(255,255,255,.16);
  transform: none !important;
}
.statistics-admin-btn::before {
  content: '';
  position: absolute;
  inset: 2px;
  background: center / contain no-repeat url('assets/admin-gear.png');
  transform-origin: 50% 50%;
}
.statistics-admin-btn:hover,
.statistics-admin-btn:focus-visible {
  border-color: rgba(128,132,134,.28);
  background: rgba(0,0,0,.07);
  outline: none;
}
.statistics-admin-btn:hover::before,
.statistics-admin-btn:focus-visible::before {
  animation: gear-spin 2.4s linear infinite;
}
@keyframes gear-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
body[data-theme="silver"] .statistics-admin-btn,
body[data-theme="solarized-light"] .statistics-admin-btn,
body[data-theme="paper-folder"] .statistics-admin-btn {
  background: rgba(89,91,91,.07);
  border-color: rgba(115,118,120,.25);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.10), inset 1px 0 0 rgba(255,255,255,.16);
}
body[data-theme="graphite"] .statistics-admin-btn,
body[data-theme="ocean-steel"] .statistics-admin-btn {
  background: rgba(255,255,255,.04);
  border-color: rgba(210,214,216,.12);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.18), inset 1px 0 0 rgba(255,255,255,.08);
}
@media (max-width: 760px) {
  .server-card { padding: 7px 10px 3px; }
  .server-theme-row { grid-template-columns: auto 82px; }
  .server-theme-row select { width: 82px; max-width: 82px; }
  .auth-session-box { padding: 2px 4px 2px 8px; min-height: calc(100% + 5px); margin-bottom: -3px; }
}


/* v1.13.24 header refinements: centered theme label, smaller sign-out text, updated admin gear asset */
.server-theme-row {
  grid-template-columns: auto 82px;
  align-items: center;
}
.server-theme-row label {
  align-self: center;
  line-height: 1;
  margin-top: 1px;
}
.server-theme-row select {
  width: 82px;
  max-width: 82px;
}
.auth-session-box {
  padding: 1px 4px 1px 10px;
  min-height: calc(100% + 3px);
  margin-bottom: -3px;
}
.server-controls-row > .auth-status {
  flex: 0 1 116px;
}
.auth-status.authenticated .auth-user.auth-user-block {
  font-size: .92rem;
  line-height: 1.24;
  padding-bottom: 2px;
  animation: username-breathe 2s ease-in-out infinite;
}
.auth-session-box .auth-action-btn {
  font-size: .92rem;
  padding: 2px 8px;
}
.statistics-admin-btn {
  top: 3px;
  right: 4px;
  width: 29px;
  height: 29px;
  min-height: 29px;
  padding: 2px;
  border-radius: 7px;
}
.statistics-admin-btn::before {
  inset: 2px;
  background: center / contain no-repeat url('assets/admin-gear-v2.png');
}
.statistics-admin-btn:hover,
.statistics-admin-btn:focus-visible {
  transform: none !important;
}
body[data-theme="silver"] .statistics-admin-btn,
body[data-theme="solarized-light"] .statistics-admin-btn,
body[data-theme="paper-folder"] .statistics-admin-btn {
  background: rgba(89,91,91,.07);
  border-color: rgba(115,118,120,.25);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.10), inset 1px 0 0 rgba(255,255,255,.16);
}
body[data-theme="graphite"] .statistics-admin-btn,
body[data-theme="ocean-steel"] .statistics-admin-btn {
  background: rgba(255,255,255,.04);
  border-color: rgba(210,214,216,.12);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.18), inset 1px 0 0 rgba(255,255,255,.08);
}
@media (max-width: 760px) {
  .server-theme-row { grid-template-columns: auto 82px; align-items: center; }
  .auth-session-box { padding: 1px 4px 1px 8px; min-height: calc(100% + 3px); margin-bottom: -3px; }
}


/* v1.13.25 typography and preview-box refinements */
.auth-session-box .auth-action-btn {
  font-size: .78rem;
  font-weight: 820;
}
.auth-status.authenticated .auth-user.auth-user-block {
  font-size: .78rem;
  font-weight: 820;
  color: #8aa900;
  animation: username-breathe 2s ease-in-out infinite;
}
@keyframes username-breathe {
  0%, 100% { color: #8aa900; text-shadow: none; }
  50% { color: #c8ff54; text-shadow: 0 0 6px rgba(200,255,84,.26); }
}
.signed-user-name {
  font-size: 1em;
  font-weight: inherit;
}
.preview-auth-status strong,
#meteotsunamiAccountState strong {
  font-size: .78rem;
  font-weight: 800;
}
.preview-auth-status .signed-user-name,
#meteotsunamiAccountState .signed-user-name {
  font-size: 1em;
  font-weight: inherit;
}


/* v1.13.26 strong visible breathing effect for authenticated header username */
.auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  display: inline-block !important;
  color: #7ea800 !important;
  animation: username-breathe-strong 2s ease-in-out infinite !important;
  will-change: color, text-shadow, filter;
}
@keyframes username-breathe-strong {
  0%, 100% {
    color: #7ea800;
    text-shadow: 0 0 0 rgba(201,255,92,0);
    filter: brightness(1);
  }
  50% {
    color: #d2ff5c;
    text-shadow: 0 0 8px rgba(210,255,92,.42), 0 0 16px rgba(210,255,92,.18);
    filter: brightness(1.08);
  }
}


/* v1.13.27 smaller gear, subtle frame, no MAX prefix */
.statistics-admin-btn {
  top: 3px;
  right: 3px;
  width: 25px;
  height: 25px;
  min-height: 25px;
  padding: 2px;
  border: 1px solid rgba(128,132,134,.16);
  border-radius: 6px;
  background: rgba(0,0,0,.05);
  box-shadow: inset 0 1px 4px rgba(0,0,0,.08), inset 1px 0 0 rgba(255,255,255,.12);
}
.statistics-admin-btn::before {
  inset: 2px;
}
.statistics-admin-btn:hover,
.statistics-admin-btn:focus-visible {
  border-color: rgba(128,132,134,.16);
  background: rgba(0,0,0,.05);
}
body[data-theme="silver"] .statistics-admin-btn,
body[data-theme="solarized-light"] .statistics-admin-btn,
body[data-theme="paper-folder"] .statistics-admin-btn {
  background: rgba(89,91,91,.05);
  border-color: rgba(115,118,120,.16);
  box-shadow: inset 0 1px 4px rgba(0,0,0,.07), inset 1px 0 0 rgba(255,255,255,.14);
}
body[data-theme="graphite"] .statistics-admin-btn,
body[data-theme="ocean-steel"] .statistics-admin-btn {
  background: rgba(255,255,255,.03);
  border-color: rgba(210,214,216,.10);
  box-shadow: inset 0 1px 4px rgba(0,0,0,.14), inset 1px 0 0 rgba(255,255,255,.06);
}


/* v1.13.28 icon-only sign-out button and grey-to-green username breathing */
.auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  color: #7d7f80 !important;
  animation: username-breathe-header 2s ease-in-out infinite !important;
  will-change: color, text-shadow, filter;
}
@keyframes username-breathe-header {
  0%, 100% {
    color: #7d7f80;
    text-shadow: none;
    filter: brightness(1);
  }
  50% {
    color: #caff58;
    text-shadow: 0 0 7px rgba(202,255,88,.40), 0 0 14px rgba(202,255,88,.16);
    filter: brightness(1.08);
  }
}
.auth-session-box .auth-action-btn.icon-only-logout {
  position: relative;
  width: 25px;
  min-width: 25px;
  height: 25px;
  min-height: 25px;
  padding: 2px;
  border: 1px solid rgba(128,132,134,.16);
  border-radius: 6px;
  background: rgba(0,0,0,.05);
  box-shadow: inset 0 1px 4px rgba(0,0,0,.08), inset 1px 0 0 rgba(255,255,255,.12);
  color: transparent;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}
.auth-session-box .auth-action-btn.icon-only-logout::before {
  content: '';
  position: absolute;
  inset: 2px;
  background: center / contain no-repeat url('assets/signout-icon.png');
}
.auth-session-box .auth-action-btn.icon-only-logout:hover,
.auth-session-box .auth-action-btn.icon-only-logout:focus-visible {
  transform: translateY(-1px);
  filter: none;
  border-color: rgba(128,132,134,.22);
  background: rgba(0,0,0,.05);
  box-shadow: inset 0 1px 4px rgba(0,0,0,.08), inset 1px 0 0 rgba(255,255,255,.12), 0 4px 10px rgba(0,0,0,.18);
}
.auth-session-box .auth-action-btn.icon-only-logout:active {
  transform: translateY(1px) scale(.985);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.16);
}
body[data-theme="silver"] .auth-session-box .auth-action-btn.icon-only-logout,
body[data-theme="solarized-light"] .auth-session-box .auth-action-btn.icon-only-logout,
body[data-theme="paper-folder"] .auth-session-box .auth-action-btn.icon-only-logout {
  background: rgba(89,91,91,.05);
  border-color: rgba(115,118,120,.16);
  box-shadow: inset 0 1px 4px rgba(0,0,0,.07), inset 1px 0 0 rgba(255,255,255,.14);
}
body[data-theme="graphite"] .auth-session-box .auth-action-btn.icon-only-logout,
body[data-theme="ocean-steel"] .auth-session-box .auth-action-btn.icon-only-logout {
  background: rgba(255,255,255,.03);
  border-color: rgba(210,214,216,.10);
  box-shadow: inset 0 1px 4px rgba(0,0,0,.14), inset 1px 0 0 rgba(255,255,255,.06);
}


/* v1.13.29 stronger grey-to-green 3s breathing, simple grey theme arrow, equal preview account sizing */
.auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  color: #8b8d90 !important;
  animation: username-breathe-header-v1329 3s ease-in-out infinite !important;
}
@keyframes username-breathe-header-v1329 {
  0%, 100% {
    color: #8b8d90;
    text-shadow: none;
    filter: brightness(1);
  }
  50% {
    color: #d3ff63;
    text-shadow: 0 0 8px rgba(211,255,99,.44), 0 0 18px rgba(211,255,99,.20);
    filter: brightness(1.10);
  }
}
#themeQuickSelect {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2388898b' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 10px 6px;
  background-position: calc(100% - 6px) 50%;
  padding-right: 20px !important;
}
.preview-auth-status strong,
#meteotsunamiAccountState strong {
  font-size: .78rem;
  font-weight: 800;
}
.preview-auth-status .signed-user-name,
#meteotsunamiAccountState .signed-user-name {
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
  text-shadow: none !important;
}


/* v1.13.30 explicit preview account sizing and 6s white-green breathing header effect */
.auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  color: #f3f5f6 !important;
  animation: username-breathe-header-v1330 6s ease-in-out infinite !important;
  will-change: color, text-shadow, filter;
}
@keyframes username-breathe-header-v1330 {
  0%, 100% {
    color: #f3f5f6;
    text-shadow: none;
    filter: brightness(1);
  }
  25%, 75% {
    color: #6fd157;
    text-shadow: 0 0 3px rgba(111,209,87,.18);
    filter: brightness(1.03);
  }
  50% {
    color: #d8ff63;
    text-shadow: 0 0 10px rgba(216,255,99,.55), 0 0 20px rgba(216,255,99,.26), 0 0 30px rgba(216,255,99,.12);
    filter: brightness(1.12);
  }
}
.preview-auth-line,
#meteotsunamiAccountState .preview-auth-line {
  display: flex;
  align-items: baseline;
  gap: .28rem;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.1;
}
.preview-auth-label,
#meteotsunamiAccountState .preview-auth-label {
  font-size: 1em;
  font-weight: 800;
  color: inherit;
}
.preview-signed-user-name,
#meteotsunamiAccountState .preview-signed-user-name {
  font-size: 1em !important;
  font-weight: 800 !important;
  line-height: 1.1;
  color: #1b8f5a !important;
  text-shadow: none !important;
  vertical-align: baseline;
}
.preview-auth-status strong,
#meteotsunamiAccountState strong {
  font-size: inherit !important;
  font-weight: inherit !important;
}
.preview-auth-status .signed-user-name,
#meteotsunamiAccountState .signed-user-name {
  font-size: inherit !important;
  font-weight: inherit !important;
}


/* v1.13.31 Jade theme, exact white-green breathing cycle, and mobile-safe Last Run lock guidance */
.auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  color: #ffffff !important;
  animation: username-breathe-header-v1331 6s linear infinite !important;
  will-change: color, text-shadow, filter;
}
@keyframes username-breathe-header-v1331 {
  0%, 100% {
    color: #ffffff;
    text-shadow: none;
    filter: brightness(1);
  }
  25%, 75% {
    color: #52d6a2;
    text-shadow: 0 0 4px rgba(82,214,162,.22);
    filter: brightness(1.03);
  }
  50% {
    color: #b8ff63;
    text-shadow: 0 0 10px rgba(184,255,99,.72), 0 0 22px rgba(184,255,99,.44), 0 0 38px rgba(184,255,99,.22);
    filter: brightness(1.16);
  }
}
.preview-auth-line,
#meteotsunamiAccountState .preview-auth-line {
  display: flex;
  align-items: baseline;
  gap: .28rem;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.1;
}
.preview-auth-label,
.preview-signed-user-name,
#meteotsunamiAccountState .preview-auth-label,
#meteotsunamiAccountState .preview-signed-user-name {
  font-size: 1em !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  vertical-align: baseline;
}
.preview-signed-user-name,
#meteotsunamiAccountState .preview-signed-user-name {
  color: #1b8f5a !important;
}
#themeQuickSelect {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23888c90' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 10px 6px;
  background-position: calc(100% - 7px) 50%;
  padding-right: 20px !important;
}
body[data-theme="jade"] {
  --bg: #5d6368;
  --bg-deep: #3f474d;
  --metal-1: #7b8388;
  --metal-2: #666d73;
  --metal-3: #50585d;
  --metal-edge: rgba(210,218,221,.18);
  --line: rgba(208,218,222,.16);
  --line-strong: rgba(222,232,236,.30);
  --text: #f3f6f7;
  --muted: #d3dde0;
  --dim: #b6c4c9;
  --accent: #5fd9d2;
  --green: #62e0cb;
  --orange: #ff9a40;
  --red: #ff754c;
  --shadow: 0 18px 42px rgba(15,18,20,.34);
  background:
    radial-gradient(circle at 12% 10%, rgba(95,217,210,.11), transparent 19%),
    radial-gradient(circle at 86% 8%, rgba(255,154,64,.11), transparent 18%),
    radial-gradient(circle at 52% 82%, rgba(255,196,84,.08), transparent 24%),
    linear-gradient(155deg, #6b7378 0%, #596166 48%, #434b50 100%);
}
body[data-theme="jade"] .metal-panel {
  background:
    radial-gradient(circle at 12% 16%, rgba(95,217,210,.08), transparent 20%),
    radial-gradient(circle at 86% 18%, rgba(255,154,64,.08), transparent 18%),
    linear-gradient(180deg, #757d82 0%, #656d72 48%, #51595e 100%);
  box-shadow: inset 0 1px rgba(255,255,255,.11), inset 0 -1px rgba(0,0,0,.16), var(--shadow);
}
body[data-theme="jade"] .tabs {
  background: linear-gradient(180deg, rgba(132,140,145,.32), rgba(59,66,70,.32));
}
body[data-theme="jade"] .tab-btn {
  color: #d9e7ea;
  background: rgba(44,49,53,.34);
  border-bottom-color: rgba(95,217,210,.24);
}
body[data-theme="jade"] .tab-btn.active {
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 50%, rgba(92,226,215,.18), transparent 35%),
    radial-gradient(circle at 84% 50%, rgba(255,161,77,.17), transparent 34%),
    linear-gradient(180deg, rgba(141,150,155,.84), rgba(81,89,94,.86));
  border-bottom-color: rgba(95,217,210,.56);
}
body[data-theme="jade"] .section-kicker,
body[data-theme="jade"] .eyebrow { color: #6fe7df; }
body[data-theme="jade"] .back-site-link { color: #ffb356; }
body[data-theme="jade"] .primary-btn {
  color: #1b2629;
  border-color: rgba(93,217,210,.30);
  background: linear-gradient(180deg, #8de9e0, #5ccbc2);
  box-shadow: inset 0 1px rgba(255,255,255,.35), 0 8px 16px rgba(29,50,55,.25);
}
body[data-theme="jade"] .model-badge {
  color: #f6f8f8;
  background: rgba(54,60,64,.92);
  border-color: rgba(255,176,92,.40);
}
body[data-theme="jade"] :is(.server-card,.playback-cluster,.preload-status,.quota-job-summary,.model-parameter-zone,.meteo-workflow,.meteo-preview-mode,.preflight-stability,.probe-row,.compare-stage,.numerical-health) {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(47,53,57,.32);
}
body[data-theme="jade"] :is(input,select,textarea) {
  color: #f4f8f9;
  background: linear-gradient(180deg, rgba(27,31,34,.88), rgba(45,51,55,.92));
  border-color: rgba(215,225,228,.18);
}
body[data-theme="jade"] :is(input,select,textarea):disabled,
body[data-theme="jade"] .field.locked-field :is(input,select) {
  color: #d6dde0;
  background: rgba(111,118,123,.48);
  -webkit-text-fill-color: currentColor;
}
body[data-theme="jade"] .setup-config-shell.standard-last-run,
body.last-run-active[data-theme="jade"]:not(.meteotsunami-active) .setup-config-shell,
body.last-run-active[data-theme="jade"] .model-parameter-zone.last-run::before {
  color: var(--text);
  border-color: rgba(222,232,236,.34);
  background: linear-gradient(145deg, rgba(147,155,160,.30), rgba(54,61,66,.28) 55%, rgba(96,104,109,.24));
}
body[data-theme="jade"] .state-chip.completed {
  color: #dffff1;
  background: rgba(95,217,210,.16);
  border-color: rgba(111,235,224,.40);
}
body[data-theme="jade"] :is(.state-chip.running,.state-chip.queued) {
  color: #ffe9bf;
  background: rgba(255,166,82,.15);
  border-color: rgba(255,176,92,.38);
}
body[data-theme="jade"] :is(.state-chip.failed,.state-chip.cancelled,.state-chip.timed_out,.state-chip.unstable) {
  color: #ffd7cc;
  background: rgba(255,117,76,.14);
  border-color: rgba(255,129,92,.34);
}
body[data-theme="jade"] :is(.state-chip,.jobs-table button,.pill,.grid-capacity-badge,.fixed-grid-badge) {
  opacity: 1;
  text-shadow: none;
}
body[data-theme="jade"] .pill {
  color: #79ece5;
  background: rgba(95,217,210,.08);
  border-color: rgba(95,217,210,.28);
}
body[data-theme="jade"] .jobs-table th {
  background: rgba(255,255,255,.06);
}
body[data-theme="jade"] .jobs-table td,
body[data-theme="jade"] .preview-footer,
body[data-theme="jade"] .grid-capacity-current,
body[data-theme="jade"] .grid-capacity-limit,
body[data-theme="jade"] .auth-status,
body[data-theme="jade"] .server-card small {
  color: var(--muted) !important;
}
body[data-theme="jade"] .secondary-btn,
body[data-theme="jade"] .icon-btn,
body[data-theme="jade"] .auth-action-btn,
body[data-theme="jade"] .jobs-table button {
  color: var(--text);
  border-color: rgba(222,232,236,.20);
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(54,60,64,.26));
  box-shadow: inset 0 1px rgba(255,255,255,.20), 0 2px 5px rgba(0,0,0,.18);
}
body[data-theme="jade"] .danger-btn {
  color: #ffd6c7;
  background: rgba(255,117,76,.12);
}
body[data-theme="jade"] .stage-overlay {
  color: var(--text);
}
body[data-theme="jade"] .progress-shell {
  background: rgba(18,22,24,.30);
}
body[data-theme="jade"] .preload-status.ready { color: #8bfff0; }
body[data-theme="jade"] .preload-status.loading { color: #ffc36b; }
body[data-theme="jade"] .live-run-strip,
body[data-theme="jade"] .viewer-card > .live-run-strip {
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(0,0,0,.08));
  border-color: var(--line);
}
body[data-theme="jade"] :is(.auth-status.authenticated,.auth-status.authenticated .auth-user,.signed-user-name) {
  color: #7dffdf !important;
  text-shadow: none;
}


/* v1.13.32 accent-colored authenticated user glow and exact slider/track centering */
.auth-session-box {
  isolation: isolate;
  overflow: hidden;
}
.auth-session-box.authenticated-session::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  opacity: .035;
  filter: blur(15px);
  transform: scale(.76);
  pointer-events: none;
  animation: authenticated-panel-glow 6s ease-in-out infinite;
}
.auth-session-box.authenticated-session > * {
  position: relative;
  z-index: 1;
}
.auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  color: var(--accent) !important;
  text-shadow: 0 0 2px currentColor;
  filter: none !important;
  animation: authenticated-user-glow 6s ease-in-out infinite !important;
}
@keyframes authenticated-user-glow {
  0%, 100% {
    text-shadow: 0 0 1px currentColor, 0 0 3px transparent;
  }
  50% {
    text-shadow: 0 0 5px currentColor, 0 0 12px currentColor, 0 0 22px currentColor;
  }
}
@keyframes authenticated-panel-glow {
  0%, 100% {
    opacity: .025;
    transform: scale(.72);
    filter: blur(17px);
  }
  50% {
    opacity: .20;
    transform: scale(1.10);
    filter: blur(11px);
  }
}
body[data-run-mode-style="slider"] .run-mode-slider-shell {
  position: relative;
  display: flex;
  align-items: center;
}
body[data-run-mode-style="slider"] .run-mode-slider-shell::before {
  top: 50% !important;
  transform: translateY(-50%) !important;
}
body[data-run-mode-style="slider"] .run-mode-slider-thumb {
  top: 50% !important;
  transform: translateY(-50%) !important;
}


/* v1.13.33 fixed eyebrow-colored username, 12s bright-white glow, light-gray header icons */
.auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  color: var(--accent) !important;
  text-shadow: none !important;
  filter: none !important;
  animation: authenticated-user-white-glow-v1333 12s ease-in-out infinite !important;
}
body[data-theme="paper-folder"] .auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  color: #287d87 !important;
}
body[data-theme="jade"] .auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  color: #6fe7df !important;
}
@keyframes authenticated-user-white-glow-v1333 {
  0%, 100% {
    text-shadow: 0 0 0 rgba(255,255,255,0);
  }
  50% {
    text-shadow:
      0 0 5px rgba(255,255,255,.98),
      0 0 11px rgba(255,255,255,.88),
      0 0 20px rgba(255,255,255,.66),
      0 0 32px rgba(255,255,255,.38);
  }
}
.auth-session-box.authenticated-session::before {
  background: #ffffff !important;
  animation: authenticated-panel-white-glow-v1333 12s ease-in-out infinite !important;
}
@keyframes authenticated-panel-white-glow-v1333 {
  0%, 100% {
    opacity: 0;
    transform: scale(.76);
    filter: blur(18px);
  }
  50% {
    opacity: .34;
    transform: scale(1.16);
    filter: blur(10px);
  }
}
.statistics-admin-btn::before,
.auth-session-box .auth-action-btn.icon-only-logout::before {
  filter: brightness(0) saturate(100%) invert(84%) !important;
  opacity: .96;
}


/* v1.13.34 theme-aware header icons and stronger Jade active-tab rails */
/* Dark themes: keep the gear and logout glyphs light grey. */
body[data-theme="graphite"] .statistics-admin-btn::before,
body[data-theme="graphite"] .auth-session-box .auth-action-btn.icon-only-logout::before,
body[data-theme="ocean-steel"] .statistics-admin-btn::before,
body[data-theme="ocean-steel"] .auth-session-box .auth-action-btn.icon-only-logout::before,
body[data-theme="jade"] .statistics-admin-btn::before,
body[data-theme="jade"] .auth-session-box .auth-action-btn.icon-only-logout::before {
  filter: brightness(0) saturate(100%) invert(84%) !important;
  opacity: .96;
}
/* Light themes: use dark grey glyphs for clear contrast. */
body[data-theme="silver"] .statistics-admin-btn::before,
body[data-theme="silver"] .auth-session-box .auth-action-btn.icon-only-logout::before,
body[data-theme="solarized-light"] .statistics-admin-btn::before,
body[data-theme="solarized-light"] .auth-session-box .auth-action-btn.icon-only-logout::before,
body[data-theme="paper-folder"] .statistics-admin-btn::before,
body[data-theme="paper-folder"] .auth-session-box .auth-action-btn.icon-only-logout::before {
  filter: brightness(0) saturate(100%) invert(30%) !important;
  opacity: .96;
}
/* Jade active model tab: orange-red upper rail + cyan lower rail, both 2 px.
   Reduce vertical padding by 1 px so the tab keeps the same overall height. */
body[data-theme="jade"] .tab-btn.active {
  padding-top: 6px;
  padding-bottom: 6px;
  border-top: 2px solid #ff754c;
  border-bottom: 2px solid #5fd9d2;
  border-left-color: rgba(235,242,244,.34);
  border-right-color: rgba(235,242,244,.34);
}


/* v1.13.36 deeper Ocean palette and optional corner-arc hardware variants */
body[data-theme="ocean-steel"] {
  --bg: #061a2e;
  --bg-deep: #020b16;
  --metal-1: #4c9ac7;
  --metal-2: #155781;
  --metal-3: #082a48;
  --metal-edge: rgba(188,225,246,.34);
  --line: rgba(190,225,245,.16);
  --line-strong: rgba(194,229,248,.34);
  --text: #f1f8fd;
  --muted: #bed7e7;
  --dim: #7ea8c1;
  --accent: #63d8ef;
  --green: #7ce7c1;
  --orange: #ffc16c;
  --red: #ff8795;
  background:
    radial-gradient(ellipse at 15% -5%, rgba(103,197,245,.34), transparent 34%),
    radial-gradient(ellipse at 85% 14%, rgba(46,132,193,.18), transparent 31%),
    linear-gradient(155deg, #4aa8dc 0%, #176da7 22%, #0b4675 47%, #062a4d 70%, #031529 100%);
}
body[data-theme="ocean-steel"] .metal-panel {
  background:
    radial-gradient(ellipse at 14% 0%, rgba(139,215,249,.22), transparent 28%),
    linear-gradient(120deg, rgba(159,223,250,.13), transparent 26%, rgba(52,145,201,.07) 58%, transparent 82%),
    linear-gradient(180deg, #438eb8 0%, #1b608c 18%, #0c416a 48%, #072a49 74%, #041b32 100%);
  box-shadow: inset 0 1px rgba(224,246,255,.18), inset 0 -1px rgba(0,7,16,.64), var(--shadow);
}
body[data-theme="ocean-steel"] :is(input:not([type="range"]),select,.frame-number,.suffix-input,.result-stage,.compare-stage) {
  background: rgba(2,18,34,.90);
}
body[data-theme="ocean-steel"] :is(.server-card,.playback-cluster,.preload-status,.quota-job-summary) {
  background: rgba(2,20,37,.72);
}

/* Arc theme variants retain their base palette; only the corner hardware changes. */
.theme-arc {
  --arc-size: 14px;
  --arc-inset-x: 3px;
  --arc-inset-y: 2px;
}
.theme-arc .riveted::before,
.theme-arc .riveted::after {
  width: var(--arc-size);
  height: var(--arc-size);
  top: var(--arc-inset-y);
  border-radius: 0;
  background: transparent center / contain no-repeat;
  box-shadow: none;
}
.theme-arc .riveted::before {
  left: var(--arc-inset-x);
  background-image: var(--arc-left-svg);
}
.theme-arc .riveted::after {
  right: var(--arc-inset-x);
  background-image: var(--arc-right-svg);
}
body.theme-arc[data-theme="graphite"],
body.theme-arc[data-theme="ocean-steel"],
body.theme-arc[data-theme="jade"] {
  --arc-color: #d7dde0;
  --arc-highlight: rgba(255,255,255,.92);
}
body.theme-arc[data-theme="silver"],
body.theme-arc[data-theme="solarized-light"],
body.theme-arc[data-theme="paper-folder"] {
  --arc-color: #686d70;
  --arc-highlight: rgba(255,255,255,.72);
}
.theme-arc {
  --arc-left-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2.8 15.2 A12.4 12.4 0 0 1 15.2 2.8' fill='none' stroke='%23bcc2c5' stroke-width='3.35' stroke-linecap='round'/%3E%3Cpath d='M3.5 14.4 A11.35 11.35 0 0 1 14.4 3.5' fill='none' stroke='rgba(255,255,255,0.92)' stroke-width='1.15' stroke-linecap='round'/%3E%3C/svg%3E");
  --arc-right-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.8 2.8 A12.4 12.4 0 0 1 17.2 15.2' fill='none' stroke='%23bcc2c5' stroke-width='3.35' stroke-linecap='round'/%3E%3Cpath d='M4.2 3.55 A11.35 11.35 0 0 1 14.9 14.2' fill='none' stroke='rgba(255,255,255,0.92)' stroke-width='1.15' stroke-linecap='round'/%3E%3C/svg%3E");
}
body.theme-arc[data-theme="graphite"],
body.theme-arc[data-theme="ocean-steel"],
body.theme-arc[data-theme="jade"] {
  --arc-left-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2.8 15.2 A12.4 12.4 0 0 1 15.2 2.8' fill='none' stroke='%23d7dde0' stroke-width='3.35' stroke-linecap='round'/%3E%3Cpath d='M3.5 14.4 A11.35 11.35 0 0 1 14.4 3.5' fill='none' stroke='rgba(255,255,255,0.92)' stroke-width='1.15' stroke-linecap='round'/%3E%3C/svg%3E");
  --arc-right-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.8 2.8 A12.4 12.4 0 0 1 17.2 15.2' fill='none' stroke='%23d7dde0' stroke-width='3.35' stroke-linecap='round'/%3E%3Cpath d='M4.2 3.55 A11.35 11.35 0 0 1 14.9 14.2' fill='none' stroke='rgba(255,255,255,0.92)' stroke-width='1.15' stroke-linecap='round'/%3E%3C/svg%3E");
}
body.theme-arc[data-theme="silver"],
body.theme-arc[data-theme="solarized-light"],
body.theme-arc[data-theme="paper-folder"] {
  --arc-left-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2.8 15.2 A12.4 12.4 0 0 1 15.2 2.8' fill='none' stroke='%23686d70' stroke-width='3.35' stroke-linecap='round'/%3E%3Cpath d='M3.5 14.4 A11.35 11.35 0 0 1 14.4 3.5' fill='none' stroke='rgba(255,255,255,0.72)' stroke-width='1.15' stroke-linecap='round'/%3E%3C/svg%3E");
  --arc-right-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.8 2.8 A12.4 12.4 0 0 1 17.2 15.2' fill='none' stroke='%23686d70' stroke-width='3.35' stroke-linecap='round'/%3E%3Cpath d='M4.2 3.55 A11.35 11.35 0 0 1 14.9 14.2' fill='none' stroke='rgba(255,255,255,0.72)' stroke-width='1.15' stroke-linecap='round'/%3E%3C/svg%3E");
}


/* v1.13.38 username-only yellow breathing glow and one-second logout hover fade */
/* Disable the older whole-session glow: the glow now belongs only to the username area. */
.auth-session-box.authenticated-session::before {
  content: none !important;
  animation: none !important;
}
.auth-session-box #authStatus.authenticated {
  position: relative;
  isolation: isolate;
  overflow: visible;
}
.auth-session-box #authStatus.authenticated::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -12px;
  right: -12px;
  top: -9px;
  bottom: -9px;
  border-radius: 10px;
  background: #fff15a;
  opacity: 0;
  filter: blur(15px);
  transform: scale(.72);
  pointer-events: none;
  animation: authenticated-username-area-yellow-glow-v1338 10s ease-in-out infinite;
}
.auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  color: var(--accent) !important;
  filter: none !important;
  animation: authenticated-user-yellow-glow-v1338 10s ease-in-out infinite !important;
}
body[data-theme="paper-folder"] .auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  color: #287d87 !important;
}
body[data-theme="jade"] .auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  color: #6fe7df !important;
}
@keyframes authenticated-user-yellow-glow-v1338 {
  0%, 100% {
    text-shadow: 0 0 0 rgba(255,241,90,0);
  }
  50% {
    text-shadow:
      0 0 5px rgba(255,247,118,1),
      0 0 11px rgba(255,235,45,.96),
      0 0 21px rgba(255,215,0,.78),
      0 0 34px rgba(255,196,0,.46);
  }
}
@keyframes authenticated-username-area-yellow-glow-v1338 {
  0%, 100% {
    opacity: 0;
    transform: scale(.72);
    filter: blur(16px);
  }
  50% {
    opacity: .30;
    transform: scale(1.08);
    filter: blur(11px);
  }
}
.auth-session-box .auth-action-btn.icon-only-logout::before {
  transition: filter 1s ease, opacity 1s ease;
}
.auth-session-box .auth-action-btn.icon-only-logout:hover::before,
.auth-session-box .auth-action-btn.icon-only-logout:focus-visible::before {
  filter: brightness(0) saturate(100%) invert(89%) sepia(99%) saturate(1463%) hue-rotate(353deg) brightness(109%) contrast(106%) !important;
  opacity: 1;
}


/* v1.13.39 accent-colored username glow and stationary Sign out hover */
.auth-session-box #authStatus.authenticated {
  --auth-username-glow: var(--accent);
}
body[data-theme="paper-folder"] .auth-session-box #authStatus.authenticated {
  --auth-username-glow: #287d87;
}
body[data-theme="jade"] .auth-session-box #authStatus.authenticated {
  --auth-username-glow: #6fe7df;
}
.auth-session-box #authStatus.authenticated::before {
  background: var(--auth-username-glow) !important;
  animation: authenticated-username-area-accent-glow-v1339 8s ease-in-out infinite !important;
}
.auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  animation: authenticated-user-accent-glow-v1339 8s ease-in-out infinite !important;
}
@keyframes authenticated-user-accent-glow-v1339 {
  0%, 100% {
    text-shadow: 0 0 0 transparent;
    filter: brightness(1);
  }
  50% {
    text-shadow:
      0 0 5px var(--auth-username-glow),
      0 0 12px var(--auth-username-glow),
      0 0 23px var(--auth-username-glow),
      0 0 36px var(--auth-username-glow);
    filter: brightness(1.34) saturate(1.12);
  }
}
@keyframes authenticated-username-area-accent-glow-v1339 {
  0%, 100% {
    opacity: 0;
    transform: scale(.74);
    filter: blur(16px);
  }
  50% {
    opacity: .34;
    transform: scale(1.07);
    filter: blur(10px);
  }
}
.auth-session-box .auth-action-btn.icon-only-logout,
.auth-session-box .auth-action-btn.icon-only-logout:hover,
.auth-session-box .auth-action-btn.icon-only-logout:focus-visible,
.auth-session-box .auth-action-btn.icon-only-logout:active {
  transform: none !important;
}
.auth-session-box .auth-action-btn.icon-only-logout {
  transition: border-color .8s ease, background-color .8s ease, box-shadow .8s ease !important;
}
.auth-session-box .auth-action-btn.icon-only-logout::before {
  transition: filter .8s ease, opacity .8s ease !important;
}
.auth-session-box .auth-action-btn.icon-only-logout:hover,
.auth-session-box .auth-action-btn.icon-only-logout:focus-visible {
  border-color: rgba(255,194,62,.52) !important;
  background: rgba(255,194,62,.08) !important;
  box-shadow:
    inset 0 1px 4px rgba(0,0,0,.08),
    inset 1px 0 0 rgba(255,255,255,.12),
    0 0 8px rgba(255,194,62,.26),
    0 0 15px rgba(255,194,62,.12) !important;
}
.auth-session-box .auth-action-btn.icon-only-logout:hover::before,
.auth-session-box .auth-action-btn.icon-only-logout:focus-visible::before {
  filter: brightness(0) saturate(100%) invert(85%) sepia(98%) saturate(1325%) hue-rotate(331deg) brightness(106%) contrast(104%) !important;
  opacity: 1;
}


/* v1.13.44 clickable New Run / Last Run labels and deferred lock transition */
.run-mode-control .run-mode-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  user-select: none;
  transition: background .14s ease, box-shadow .14s ease, color .14s ease, text-shadow .14s ease, transform .08s ease;
}
.run-mode-control .run-mode-label:hover {
  background: rgba(255,255,255,.075);
  box-shadow: 0 2px 5px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.16);
  text-shadow: 0 0 7px currentColor;
}
.run-mode-control .run-mode-label:active {
  transform: translateY(1px);
  background: rgba(0,0,0,.10);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.48), inset 0 -1px 0 rgba(255,255,255,.06);
}
.run-mode-control .run-mode-label:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 1px;
}
.run-mode-control.run-mode-transitioning .run-mode-label,
.run-mode-control.run-mode-transitioning .run-mode-slider-shell {
  pointer-events: none;
}
body[data-run-mode-style="slider"] .run-mode-slider-thumb {
  transition: left .5s ease, filter .5s ease, box-shadow .5s ease, background .5s ease !important;
}
body[data-theme="silver"] .run-mode-control .run-mode-label:hover,
body[data-theme="solarized-light"] .run-mode-control .run-mode-label:hover,
body[data-theme="paper-folder"] .run-mode-control .run-mode-label:hover {
  background: rgba(40,44,46,.07);
  box-shadow: 0 2px 4px rgba(45,48,50,.16), inset 0 1px 0 rgba(255,255,255,.42);
}
body[data-theme="silver"] .run-mode-control .run-mode-label:active,
body[data-theme="solarized-light"] .run-mode-control .run-mode-label:active,
body[data-theme="paper-folder"] .run-mode-control .run-mode-label:active {
  background: rgba(50,54,56,.09);
  box-shadow: inset 0 2px 4px rgba(40,44,46,.22), inset 0 -1px 0 rgba(255,255,255,.32);
}


/* v1.13.45 header visual-effects layer: water light, Meteotsunami comet border, and title shadow engine */
.hero {
  isolation: isolate;
}
.hero > :not(.hero-water-light) {
  position: relative;
  z-index: 2;
}
.hero-water-light {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  inset: -42% -20% -48%;
  opacity: .52;
  filter: blur(31px);
  transform: translate3d(0,0,0) scale(1.04);
  background:
    radial-gradient(ellipse 32% 48% at 14% 36%, rgba(255,255,255,.66) 0%, rgba(255,255,255,.28) 24%, transparent 67%),
    radial-gradient(ellipse 40% 35% at 52% 18%, rgba(255,255,255,.55) 0%, rgba(255,255,255,.21) 27%, transparent 70%),
    radial-gradient(ellipse 30% 46% at 88% 58%, rgba(255,255,255,.58) 0%, rgba(255,255,255,.18) 26%, transparent 68%);
  background-size: 130% 130%, 145% 145%, 138% 138%;
  animation: fluidlab-water-light-drift 19s ease-in-out infinite alternate;
  will-change: transform, background-position, opacity;
}
@keyframes fluidlab-water-light-drift {
  0%   { transform: translate3d(-4%, 2%, 0) scale(1.03) rotate(-1deg); background-position: 0% 16%, 47% 0%, 100% 62%; opacity: .43; }
  24%  { transform: translate3d(2%, -4%, 0) scale(1.08) rotate(.5deg); background-position: 10% 30%, 59% 9%, 88% 48%; opacity: .57; }
  53%  { transform: translate3d(5%, 3%, 0) scale(1.05) rotate(1.1deg); background-position: 18% 12%, 42% 22%, 94% 72%; opacity: .49; }
  78%  { transform: translate3d(-1%, 5%, 0) scale(1.10) rotate(-.6deg); background-position: 3% 37%, 68% 4%, 81% 58%; opacity: .60; }
  100% { transform: translate3d(-5%, -2%, 0) scale(1.04) rotate(.7deg); background-position: 14% 18%, 52% 28%, 100% 43%; opacity: .46; }
}
body[data-theme="silver"] .hero-water-light,
body[data-theme="solarized-light"] .hero-water-light,
body[data-theme="paper-folder"] .hero-water-light {
  opacity: .38;
  mix-blend-mode: soft-light;
}
body[data-theme="graphite"] .hero-water-light,
body[data-theme="ocean-steel"] .hero-water-light,
body[data-theme="jade"] .hero-water-light {
  mix-blend-mode: screen;
}

#fluidLabTitle {
  position: relative;
  z-index: 2;
}
#fluidLabTitle .title-shadow-letter {
  display: inline-block;
  white-space: pre;
  will-change: text-shadow;
}

@property --meteo-comet-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.tab-btn[data-experiment="global_tsunami"] {
  position: relative;
  isolation: isolate;
}
.tab-btn[data-experiment="global_tsunami"]::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 5;
  inset: -1px;
  padding: 3px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--meteo-comet-angle),
    transparent 0deg 250deg,
    rgba(116,213,255,.05) 272deg,
    rgba(132,223,255,.28) 296deg,
    rgba(206,245,255,.76) 318deg,
    rgba(255,255,255,1) 332deg,
    rgba(160,226,255,.58) 344deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  filter: drop-shadow(0 0 3px rgba(185,236,255,.78)) drop-shadow(0 0 6px rgba(103,198,244,.34));
  animation: meteo-comet-orbit 8s linear infinite;
}
@keyframes meteo-comet-orbit { to { --meteo-comet-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .hero-water-light { animation-duration: 48s; }
  .tab-btn[data-experiment="global_tsunami"]::after { animation-duration: 24s; }
}

/* Effects settings are rendered on the administrator page; these rules disable legacy username CSS animations so JS owns the configured glow. */
.auth-session-box #authStatus.authenticated::before { display: none !important; animation: none !important; }
.auth-session-box #authStatus.authenticated .auth-user.auth-user-block { animation: none !important; }


/* v1.13.47 username text color is theme-owned; configurable Effects control only the background glow. */
body { --fluidlab-eyebrow-color: var(--accent); }
body[data-theme="paper-folder"] { --fluidlab-eyebrow-color: #287d87; }
body[data-theme="jade"] { --fluidlab-eyebrow-color: #6fe7df; }
.eyebrow, .section-kicker { color: var(--fluidlab-eyebrow-color) !important; }
.auth-session-box #authStatus.authenticated .auth-user.auth-user-block {
  position: relative;
  z-index: 0;
  overflow: visible !important;
  color: var(--fluidlab-eyebrow-color) !important;
  text-shadow: none !important;
  filter: none !important;
}
.auth-session-box #authStatus.authenticated .auth-user.auth-user-block::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: calc(-1 * var(--auth-username-glow-inset-x, 8px));
  right: calc(-1 * var(--auth-username-glow-inset-x, 8px));
  top: calc(-1 * var(--auth-username-glow-inset-y, 4px));
  bottom: calc(-1 * var(--auth-username-glow-inset-y, 4px));
  border-radius: 999px;
  background: var(--auth-username-glow-background, transparent);
  filter: blur(var(--auth-username-glow-blur, 6px));
  pointer-events: none;
}

/* v1.13.48 local Lucide multimedia playback icons. Button dimensions/layout are unchanged. */
.lucide-media-icon {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  background-color: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  pointer-events: none;
}
.lucide-play { -webkit-mask-image: url('assets/lucide/play.svg'); mask-image: url('assets/lucide/play.svg'); }
.lucide-pause { -webkit-mask-image: url('assets/lucide/pause.svg'); mask-image: url('assets/lucide/pause.svg'); }
.lucide-step-back { -webkit-mask-image: url('assets/lucide/step-back.svg'); mask-image: url('assets/lucide/step-back.svg'); }
.lucide-step-forward { -webkit-mask-image: url('assets/lucide/step-forward.svg'); mask-image: url('assets/lucide/step-forward.svg'); }
.lucide-skip-back { -webkit-mask-image: url('assets/lucide/skip-back.svg'); mask-image: url('assets/lucide/skip-back.svg'); }
.lucide-skip-forward { -webkit-mask-image: url('assets/lucide/skip-forward.svg'); mask-image: url('assets/lucide/skip-forward.svg'); }


/* v1.13.49 playback-control alignment and compact Simulation Results toolbar. */
/* Every icon-only control uses the button content box as its centering reference. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.icon-btn > .lucide-media-icon {
  margin: 0;
  align-self: center;
}

/* Pressure-Forcing Preview retains its existing dimensions; only centering changes. */
.meteo-preview-header-controls .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Simulation Results controls are approximately 20% smaller than v1.13.48. */
.frame-toolbar {
  --frame-control-height: 34px;
  gap: 6px;
}
.frame-toolbar > .icon-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}
.frame-toolbar .lucide-media-icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

.frame-toolbar > .playback-cluster {
  height: 34px;
  min-height: 34px;
  padding: 0;
}
.frame-toolbar .playback-cluster .play-btn {
  width: 34px;
  min-width: 34px;
  height: 32px;
  min-height: 32px;
  padding: 0;
}
.frame-toolbar .playback-cluster .compact-suffix {
  width: 68px;
  min-width: 68px;
  height: 32px;
  min-height: 32px;
  grid-template-columns: 44px 24px;
  align-items: center;
}
.frame-toolbar .playback-cluster .compact-suffix input {
  width: 44px;
  min-width: 44px;
  height: 32px;
  min-height: 32px;
  padding: 0 2px;
  font-size: .82rem;
  line-height: 1;
  text-align: center;
}
.frame-toolbar .playback-cluster .compact-suffix span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0;
  font-size: .82rem;
  line-height: 1;
  text-align: center;
}

/* The complete frame-number box is exactly twice as wide as it is high. */
.frame-toolbar > .compact-frame-number {
  width: 68px;
  min-width: 68px;
  height: 34px;
  min-height: 34px;
  grid-template-columns: 28px 40px;
  align-items: center;
}
.frame-toolbar .compact-frame-number input {
  width: 28px;
  min-width: 28px;
  height: 32px;
  min-height: 32px;
  padding: 0 1px;
  font-size: .82rem;
  line-height: 1;
  text-align: center;
}
.frame-toolbar .compact-frame-number span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0;
  font-size: .82rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

/* v1.14.2 Preview playback controls now use the same visual treatment as Simulation Results. */
.meteo-preview-header-controls {
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.meteo-preview-header-controls .icon-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}
.meteo-preview-header-controls .lucide-media-icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}
/* Never let an empty result <img> override the useful no-output overlay. */
#resultImage[hidden] {
  display: none !important;
}


/* v1.14.6 shared registration entry and subtle horizontal Silver brushing */
.login-signup-block {
  display: grid;
  gap: 5px;
  justify-items: end;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(235,236,232,.12);
}
.login-signup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  color: inherit;
  text-decoration: none;
}
.login-signup-block small {
  max-width: 410px;
  color: var(--dim);
  font-size: .64rem;
  line-height: 1.4;
  text-align: right;
}
@media (max-width:760px) {
  .login-signup-block { justify-items: stretch; }
  .login-signup-btn { width: 100%; }
  .login-signup-block small { max-width: none; text-align: left; }
}

/* Silver and Silver_arc share data-theme="silver". The first layer is an
   intentionally faint 3 px horizontal grain; the broad gradients underneath
   retain the existing polished Silver palette. */
body[data-theme="silver"] .metal-panel {
  background:
    repeating-linear-gradient(0deg,
      rgba(255,255,255,.040) 0,
      rgba(255,255,255,.040) .45px,
      rgba(72,78,81,.018) .65px,
      transparent 1px,
      transparent 3px),
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.72), transparent 30%),
    linear-gradient(118deg, rgba(255,255,255,.56), transparent 28%, rgba(255,255,255,.18) 62%, transparent 86%),
    linear-gradient(180deg, #fbfcfc 0%, #e8eaeb 44%, #cbd0d1 100%);
}

/* v1.15.2 Sediment Transport setup-above-canvas layout; Regions 2-6 remain unified and aligned. */
.tab-btn { min-width:108px; padding-left:8px; padding-right:8px; line-height:1.08; }
.tab-btn.tab-multiline { min-width: 94px; padding-left: 7px; padding-right: 7px; }
.tab-btn .tab-label-line { display:block; white-space:nowrap; }
.field.locked-field { display:grid; grid-template-columns:minmax(0,1fr); opacity:.72; }
.field.locked-field > label { grid-column:1; grid-row:1; }
.field.locked-field > :is(input, select, textarea, button) { grid-column:1; grid-row:2; }
.field.locked-field > small { grid-column:1; grid-row:3; }
.field.locked-field::after { content:"🔒"; position:relative!important; inset:auto!important; grid-column:1; grid-row:2; align-self:center; justify-self:end; width:16px; height:16px; margin-right:9px; transform:none!important; display:inline-flex; align-items:center; justify-content:center; line-height:1; font-size:.76rem; z-index:3; pointer-events:none; filter:grayscale(1); }
body.sediment-active .workspace, body.sediment-active > .viewer-card, body.sediment-active .page-shell > .viewer-card { display:none!important; }
.sediment-workspace { margin:0 0 10px; }
.sediment-workspace[hidden] { display:none!important; }
.sediment-interactive-card { overflow:visible; }
.sediment-header { align-items:center; }
.sediment-body { padding:10px; }
.sediment-setup-region { padding:2px 2px 9px; margin:0 0 8px; border:0; border-bottom:1px solid color-mix(in srgb,var(--line-strong) 72%,transparent); background:transparent; box-shadow:none; }
.sediment-lab-canvas { --sediment-map-size:clamp(500px,46vw,720px); --sediment-wave-controls-width:188px; --sediment-inlet-width:104px; --sediment-y-profile-width:224px; --sediment-colorbar-width:70px; display:block; padding:8px; border:1px solid var(--line-strong); border-radius:10px; background: color-mix(in srgb, var(--bg-deep) 34%, transparent); box-shadow:inset 0 1px 0 color-mix(in srgb,var(--text) 8%,transparent),inset 0 0 20px color-mix(in srgb,#000 14%,transparent); }
.sediment-stage-scroll { width:100%; min-width:0; overflow-x:auto; overflow-y:hidden; padding-bottom:2px; scrollbar-width:thin; }
.sediment-visual-grid { display:grid; grid-template-columns:var(--sediment-wave-controls-width) var(--sediment-inlet-width) var(--sediment-map-size) var(--sediment-y-profile-width) var(--sediment-colorbar-width); grid-template-rows:var(--sediment-map-size) 178px; grid-template-areas:"forcing inlet map yprofile colorbar" ". . xprofile . ."; align-items:stretch; justify-content:center; gap:0; min-width:calc(var(--sediment-wave-controls-width) + var(--sediment-inlet-width) + var(--sediment-map-size) + var(--sediment-y-profile-width) + var(--sediment-colorbar-width)); }
.sediment-region { min-width:0; position:relative; border:1px solid var(--line-strong); border-radius:0; background:color-mix(in srgb,var(--bg-deep) 46%,transparent); box-shadow:inset 0 1px 0 color-mix(in srgb,var(--text) 7%,transparent),inset 0 0 14px color-mix(in srgb,var(--bg-deep) 30%,transparent); }
.sediment-region-5 { grid-area:forcing; padding:7px; border-radius:8px 0 0 0; z-index:2; }
.sediment-region-6 { grid-area:inlet; border-left:0; overflow:hidden; }
.sediment-region-2 { grid-area:map; border-left:0; overflow:hidden; }
.sediment-region-3 { grid-area:yprofile; border-left:0; overflow:hidden; }
.sediment-colorbar-region { grid-area:colorbar; min-width:0; position:relative; border:1px solid var(--line-strong); border-left:0; background:color-mix(in srgb,var(--bg-deep) 46%,transparent); overflow:hidden; }
.sediment-region-4 { grid-area:xprofile; border-top:0; overflow:hidden; border-radius:0 0 8px 8px; }
.sediment-section-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:7px; }
.sediment-section-heading > div:first-child { display:flex; align-items:center; gap:7px; min-width:0; }
.sediment-section-heading.compact { margin-bottom:6px; }
.sediment-section-heading h3 { margin:0; font-size:.80rem; }
.sediment-section-heading p { margin:1px 0 0; color:var(--muted); font-size:.59rem; line-height:1.25; }
.sediment-region-number { display:inline-grid; place-items:center; width:22px; height:22px; flex:0 0 auto; border:1px solid var(--line-strong); border-radius:6px; color:var(--accent); background:color-mix(in srgb,var(--bg) 78%,transparent); font-size:.66rem; font-weight:900; }
.sediment-plot-label { position:absolute; z-index:5; top:7px; left:7px; display:inline-flex; align-items:center; gap:5px; max-width:calc(100% - 14px); padding:3px 6px 3px 3px; border:1px solid color-mix(in srgb,var(--line-strong) 88%,transparent); border-radius:7px; color:var(--text); background:color-mix(in srgb,var(--bg-deep) 82%,transparent); box-shadow:0 2px 8px color-mix(in srgb,#000 24%,transparent); backdrop-filter:blur(5px); pointer-events:none; font-size:.61rem; font-weight:800; white-space:nowrap; }
.sediment-plot-label .sediment-region-number { width:18px; height:18px; border-radius:5px; font-size:.58rem; }
.sediment-run-mode-control { display:grid; grid-template-columns:auto 70px auto; align-items:center; gap:5px; }
.sediment-mode-label { min-height:25px; padding:2px 6px; border:0; border-radius:6px; background:transparent; color:var(--muted); cursor:pointer; font-size:.67rem; font-weight:850; }
.sediment-mode-label:hover { color:var(--text); background:color-mix(in srgb,var(--text) 7%,transparent); }
.sediment-mode-label.active { color:var(--orange); text-shadow:0 0 7px color-mix(in srgb,var(--orange) 45%,transparent); }
.sediment-mode-label.unavailable { opacity:.42; }
.sediment-mode-track { position:relative; width:70px; height:16px; border:1px solid var(--line-strong); border-radius:999px; background:color-mix(in srgb,var(--bg-deep) 82%,#000 18%); box-shadow:inset 0 2px 4px color-mix(in srgb,#000 55%,transparent); }
.sediment-mode-thumb { position:absolute; top:2px; left:2px; width:30px; height:10px; border:1px solid color-mix(in srgb,var(--text) 55%,transparent); border-radius:999px; background:linear-gradient(180deg,color-mix(in srgb,var(--text) 72%,var(--bg)),color-mix(in srgb,var(--text) 28%,var(--bg))); transition:left .5s ease; }
.sediment-run-mode-control.last-selected .sediment-mode-thumb { left:36px; }
.sediment-setup-grid { display:grid; grid-template-columns:repeat(4,minmax(125px,1fr)) minmax(128px,.75fr); gap:7px; align-items:end; }
.sediment-control-shell { position:relative; display:block; }
.sediment-control-shell > :is(input,select) { width:100%; }
.sediment-base-field.is-locked .sediment-control-shell::after { content:"🔒"; position:absolute; right:9px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:15px; height:15px; font-size:.73rem; line-height:1; filter:grayscale(1); pointer-events:none; }
.sediment-base-field.is-locked .sediment-control-shell > :is(input,select) { padding-right:31px; opacity:.74; }
.sediment-run-cell { display:grid; gap:3px; align-self:end; }
.sediment-run-cell small { color:var(--dim); font-size:.56rem; line-height:1.2; }
.sediment-forcing-grid { display:grid; grid-template-columns:1fr; gap:5px; }
.sediment-forcing-grid .field { gap:2px; }
.sediment-forcing-grid .field label { font-size:.59rem; line-height:1.15; }
.sediment-forcing-grid :is(input,select) { width:100%; min-width:0; min-height:29px; padding-top:4px; padding-bottom:4px; }
.sediment-inlet-span-readout { display:flex; justify-content:space-between; align-items:center; gap:6px; margin-top:6px; color:var(--dim); font-size:.56rem; }
.sediment-inlet-span-readout strong { color:var(--text); font-size:.58rem; }
.sediment-apply-btn { width:100%; margin-top:6px; }
.sediment-inline-status { display:block; min-height:1.2em; margin-top:4px; color:var(--dim); font-size:.56rem; line-height:1.25; }
.sediment-region canvas,.sediment-colorbar-region canvas { display:block; width:100%; height:100%; border:0; border-radius:0; background:var(--bg-deep); box-shadow:none; }
#sedimentInletCanvas { cursor:ns-resize; touch-action:none; }
#sedimentMapCanvas { cursor:crosshair; touch-action:none; }
#sedimentYProfileCanvas,#sedimentColorbarCanvas,#sedimentXProfileCanvas { cursor:default; }
.sediment-map-footer { position:absolute; z-index:5; right:7px; bottom:6px; left:7px; display:flex; justify-content:space-between; gap:8px; padding:3px 6px; border-radius:6px; color:var(--muted); background:color-mix(in srgb,var(--bg-deep) 76%,transparent); backdrop-filter:blur(4px); font-size:.57rem; pointer-events:none; }
.sediment-toolbar { display:flex; align-items:end; gap:7px; flex-wrap:wrap; padding:0 2px; margin-top:8px; }
.sediment-speed-field { display:grid; grid-template-columns:auto 112px; align-items:center; gap:6px; }
.sediment-speed-field label { margin:0; }
.sediment-toolbar .preload-status { margin-left:auto; min-width:245px; }
.sediment-recording { color:var(--red)!important; box-shadow:0 0 10px color-mix(in srgb,var(--red) 35%,transparent)!important; }
body[data-theme="silver"] .sediment-lab-canvas,body[data-theme="silver"] .sediment-region,body[data-theme="silver"] .sediment-colorbar-region,body[data-theme="solarized-light"] .sediment-lab-canvas,body[data-theme="solarized-light"] .sediment-region,body[data-theme="solarized-light"] .sediment-colorbar-region,body[data-theme="paper-folder"] .sediment-lab-canvas,body[data-theme="paper-folder"] .sediment-region,body[data-theme="paper-folder"] .sediment-colorbar-region { background:color-mix(in srgb,var(--bg) 80%,transparent); box-shadow:inset 0 1px 0 rgba(255,255,255,.46),inset 0 0 12px color-mix(in srgb,var(--bg-deep) 16%,transparent); }
@media (max-width:1320px) { .sediment-lab-canvas { --sediment-map-size:560px; --sediment-wave-controls-width:180px; --sediment-y-profile-width:210px; } .sediment-setup-grid { grid-template-columns:repeat(3,minmax(135px,1fr)); } }
@media (max-width:900px) { .sediment-lab-canvas { --sediment-map-size:520px; --sediment-wave-controls-width:176px; --sediment-y-profile-width:204px; } .sediment-section-heading { align-items:flex-start; } .sediment-setup-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .sediment-toolbar .preload-status { width:100%; margin-left:0; } }
@media (max-width:560px) { .sediment-section-heading { flex-direction:column; } .sediment-setup-grid { grid-template-columns:1fr; } .sediment-run-mode-control { width:100%; grid-template-columns:auto 70px auto; } .sediment-lab-canvas { --sediment-map-size:500px; } }

/* v1.15.3 Sediment Transport compact aligned canvas refinement. */
.sediment-lab-canvas {
  --sediment-plot-header-height:28px;
  --sediment-wave-controls-width:114px;
  --sediment-inlet-width:104px;
  --sediment-y-profile-width:112px;
  --sediment-x-profile-height:90px;
}
.sediment-canvas-statusbar {
  min-height:26px;
  margin:0 0 6px;
  padding:3px 7px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:10px;
  border:1px solid color-mix(in srgb,var(--line-strong) 78%,transparent);
  border-radius:7px;
  background:color-mix(in srgb,var(--bg-deep) 52%,transparent);
  color:var(--muted);
  font-size:.59rem;
  line-height:1.15;
  white-space:nowrap;
}
.sediment-canvas-status { overflow:hidden; text-overflow:ellipsis; }
.sediment-frame-status { color:var(--text); font-weight:800; text-align:center; }
.sediment-transect-status { text-align:right; overflow:hidden; text-overflow:ellipsis; }
.sediment-visual-grid {
  grid-template-columns:var(--sediment-wave-controls-width) var(--sediment-inlet-width) var(--sediment-map-size) var(--sediment-y-profile-width) var(--sediment-colorbar-width);
  grid-template-rows:calc(var(--sediment-map-size) + var(--sediment-plot-header-height)) calc(var(--sediment-x-profile-height) + var(--sediment-plot-header-height));
}
.sediment-region,
.sediment-colorbar-region {
  display:grid;
  grid-template-rows:var(--sediment-plot-header-height) minmax(0,1fr);
}
.sediment-region-5 { padding:0; }
.sediment-plot-header {
  min-width:0;
  height:var(--sediment-plot-header-height);
  padding:0 5px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom:1px solid color-mix(in srgb,var(--line-strong) 74%,transparent);
  background:color-mix(in srgb,var(--bg) 72%,var(--bg-deep));
  color:var(--text);
  font-size:.60rem;
  font-weight:850;
  line-height:1;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  box-sizing:border-box;
}
.sediment-colorbar-header { font-size:.56rem; }
.sediment-plot-body {
  min-width:0;
  min-height:0;
  overflow:hidden;
  background:var(--bg-deep);
}
.sediment-map-body { width:var(--sediment-map-size); height:var(--sediment-map-size); }
.sediment-forcing-panel {
  min-width:0;
  min-height:0;
  padding:5px;
  overflow:hidden;
  box-sizing:border-box;
}
.sediment-forcing-grid { gap:4px; }
.sediment-forcing-grid .field { gap:1px; min-width:0; }
.sediment-forcing-grid .field label { font-size:.53rem; line-height:1.08; overflow-wrap:anywhere; }
.sediment-forcing-grid :is(input,select) {
  width:100%;
  min-width:0;
  min-height:25px;
  height:25px;
  padding:2px 4px;
  font-size:.60rem;
}
.sediment-inlet-span-readout { margin-top:5px; gap:3px; font-size:.51rem; }
.sediment-inlet-span-readout strong { font-size:.53rem; }
.sediment-apply-btn { min-height:26px; margin-top:5px; padding:3px 5px; font-size:.60rem; }
.sediment-inline-status { margin-top:3px; font-size:.50rem; line-height:1.15; }
.sediment-region canvas,.sediment-colorbar-region canvas { width:100%; height:100%; }
.sediment-map-footer { display:none!important; }
.sediment-region-number { display:none!important; }
.sediment-plot-label { display:none!important; }
.sediment-toolbar .preload-status { display:none!important; }
@media (max-width:1320px) {
  .sediment-lab-canvas { --sediment-wave-controls-width:114px; --sediment-y-profile-width:112px; }
}
@media (max-width:900px) {
  .sediment-lab-canvas { --sediment-wave-controls-width:114px; --sediment-y-profile-width:112px; }
  .sediment-canvas-statusbar { grid-template-columns:1fr auto; }
  .sediment-transect-status { grid-column:1 / -1; text-align:center; }
}
/* Pixel geometry: keep the map plot itself exactly square while borders remain visible. */
.sediment-visual-grid {
  grid-template-columns:var(--sediment-wave-controls-width) var(--sediment-inlet-width) calc(var(--sediment-map-size) + 1px) var(--sediment-y-profile-width) var(--sediment-colorbar-width);
  grid-template-rows:calc(var(--sediment-map-size) + var(--sediment-plot-header-height) + 2px) calc(var(--sediment-x-profile-height) + var(--sediment-plot-header-height) + 1px);
  min-width:calc(var(--sediment-wave-controls-width) + var(--sediment-inlet-width) + var(--sediment-map-size) + 1px + var(--sediment-y-profile-width) + var(--sediment-colorbar-width));
}
.sediment-region-4 { border-left:0; }

/* v1.15.4 Sediment Transport bedform/waiting-state refinement. */
@keyframes sediment-waiting-pulse {
  0%,100% { opacity:.42; text-shadow:0 0 2px transparent; }
  50% { opacity:1; text-shadow:0 0 10px color-mix(in srgb,var(--orange) 58%,transparent); }
}
.sediment-canvas-status.waiting-for-results {
  color:var(--orange);
  font-weight:900;
  letter-spacing:.02em;
  animation:sediment-waiting-pulse 1.05s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .sediment-canvas-status.waiting-for-results { animation:none; opacity:1; }
}

/* v1.15.5 Sediment live-stream / exact spatial registration refinement. */
.sediment-visual-grid {
  grid-template-columns:var(--sediment-wave-controls-width) var(--sediment-inlet-width) var(--sediment-map-size) var(--sediment-y-profile-width) var(--sediment-colorbar-width);
  grid-template-rows:calc(var(--sediment-map-size) + var(--sediment-plot-header-height) + 2px) calc(var(--sediment-x-profile-height) + var(--sediment-plot-header-height) + 1px);
  min-width:calc(var(--sediment-wave-controls-width) + var(--sediment-inlet-width) + var(--sediment-map-size) + var(--sediment-y-profile-width) + var(--sediment-colorbar-width));
  column-gap:0!important;
  row-gap:0!important;
}
.sediment-region-5,
.sediment-region-6,
.sediment-region-2,
.sediment-region-3,
.sediment-region-4,
.sediment-colorbar-region { margin:0!important; }
.sediment-region-6 .sediment-plot-body,
.sediment-region-2 .sediment-plot-body,
.sediment-region-3 .sediment-plot-body,
.sediment-region-4 .sediment-plot-body { padding:0!important; margin:0!important; }
#sedimentInletCanvas,
#sedimentMapCanvas,
#sedimentYProfileCanvas,
#sedimentXProfileCanvas { margin:0!important; padding:0!important; }
.sediment-region-6 { border-right:1px solid var(--line-strong); }
.sediment-region-2 { border-left:0; }

/* v1.15.7 model information, Sediment workflow guidance, and compact alignment. */
.model-info-stack {
  display:grid;
  justify-items:center;
  gap:4px;
  max-width:270px;
}
.model-info-stack .model-badge { width:100%; box-sizing:border-box; }
.model-info-trigger {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:2px 7px;
  border:0;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:.59rem;
  font-weight:800;
  line-height:1.1;
  cursor:pointer;
  transition:color .18s ease, text-shadow .18s ease;
}
.model-info-trigger:hover,
.model-info-trigger:focus-visible {
  color:var(--text);
  text-shadow:0 0 7px color-mix(in srgb,var(--accent) 35%,transparent);
}
.model-info-question {
  width:15px;
  height:15px;
  display:inline-grid;
  place-items:center;
  border:1px solid currentColor;
  border-radius:50%;
  font-size:.58rem;
  font-weight:950;
  line-height:1;
}
.model-info-modal[hidden] { display:none!important; }
.model-info-modal {
  position:fixed;
  inset:0;
  z-index:10080;
  display:grid;
  place-items:center;
  padding:22px;
}
.model-info-backdrop {
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.42);
  backdrop-filter:blur(2px);
}
.model-info-panel {
  position:relative;
  z-index:1;
  width:min(700px,calc(100vw - 44px));
  max-height:min(78vh,760px);
  overflow:auto;
  box-sizing:border-box;
  padding:20px 22px 19px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:11px;
  background:linear-gradient(180deg,#42484e 0%,#31363b 100%);
  color:#f7f7f5;
  box-shadow:0 18px 54px rgba(0,0,0,.48),inset 0 1px 0 rgba(255,255,255,.18);
}
.model-info-close {
  position:absolute;
  top:8px;
  right:9px;
  width:28px;
  height:28px;
  border:1px solid rgba(255,255,255,.24);
  border-radius:7px;
  background:rgba(0,0,0,.16);
  color:#fff;
  font-size:1rem;
  cursor:pointer;
}
.model-info-kicker {
  margin:0 34px 3px 0;
  color:#a8edf2;
  font-size:.64rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.model-info-panel h2 { margin:0 34px 12px 0; color:#fff; font-size:1.18rem; }
.model-info-method,.model-info-basis {
  display:grid;
  gap:3px;
  margin:0 0 10px;
  padding:9px 11px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:7px;
  background:rgba(0,0,0,.14);
  color:#e9ebec;
  font-size:.72rem;
  line-height:1.42;
}
.model-info-method strong,.model-info-basis strong { color:#fff; font-size:.67rem; letter-spacing:.02em; }
.model-info-list { margin:12px 0 0; padding:0 0 0 20px; color:#f2f3f3; font-size:.72rem; line-height:1.46; }
.model-info-list li { margin:0 0 7px; padding-left:2px; }
body.model-info-open { overflow:hidden; }

.sediment-run-mode-control {
  padding:3px 5px;
  border:1px solid color-mix(in srgb,var(--line-strong) 92%,transparent);
  border-radius:999px;
  background:color-mix(in srgb,var(--bg-deep) 38%,transparent);
  box-shadow:inset 0 1px 0 color-mix(in srgb,var(--text) 8%,transparent);
}
.sediment-mode-track {
  cursor:ew-resize;
  touch-action:none;
  user-select:none;
}
.sediment-mode-track:focus-visible {
  outline:1px solid var(--accent);
  outline-offset:2px;
}
.sediment-run-cell small {
  order:0;
  margin:0 0 2px;
  color:var(--muted);
  line-height:1.24;
}
.sediment-run-cell .primary-btn { order:1; }
.sediment-live-forcing-callout {
  margin:0 0 5px;
  color:#ff4d4d;
  font-size:.53rem;
  font-weight:950;
  line-height:1.15;
  text-align:center;
  text-transform:uppercase;
  letter-spacing:.015em;
  text-shadow:0 0 6px rgba(255,55,55,.22);
}
.sediment-preset-field {
  margin-top:5px;
  padding-top:5px;
  border-top:1px solid color-mix(in srgb,var(--line-strong) 52%,transparent);
}
.sediment-preset-field label { color:var(--text)!important; font-weight:900!important; }
.sediment-dynamic-coordinate {
  color:#ff5050;
  font-weight:950;
  text-shadow:0 0 5px rgba(255,55,55,.22);
}
/* Region 4 starts with its plot, so the plot itself touches the Live Bed map
   above; the dynamic X-section title sits below the plot as requested. */
.sediment-region-4 {
  grid-template-rows:minmax(0,1fr) var(--sediment-plot-header-height)!important;
  border-top:0!important;
}
.sediment-x-section-footer {
  border-top:1px solid color-mix(in srgb,var(--line-strong) 74%,transparent);
  border-bottom:0;
}
/* Inlet Preview uses the full horizontal track and meets the bed map without
   an intermediate blank strip. */
.sediment-region-6 { border-left:0!important; border-right:0!important; }
.sediment-region-6 .sediment-plot-body,
#sedimentInletCanvas { width:100%!important; max-width:none!important; }
.sediment-region-2 { border-left:0!important; }

@media (max-width:760px) {
  .model-info-panel { width:calc(100vw - 24px); padding:17px 16px; }
}


/* v1.15.8 Sediment Transport interaction polish. */
.sediment-run-cell {
  padding:5px 6px;
  border:1px solid color-mix(in srgb,var(--line-strong) 58%,transparent);
  border-radius:8px;
  background:color-mix(in srgb,var(--bg-deep) 28%,transparent);
  box-shadow:
    0 1px 3px color-mix(in srgb,#000 16%,transparent),
    inset 0 1px 0 color-mix(in srgb,var(--text) 9%,transparent),
    inset 0 -2px 4px color-mix(in srgb,var(--bg-deep) 28%,transparent);
}
.sediment-run-cell:hover {
  border-color:color-mix(in srgb,var(--line-strong) 78%,transparent);
  box-shadow:
    0 2px 5px color-mix(in srgb,#000 20%,transparent),
    inset 0 1px 0 color-mix(in srgb,var(--text) 12%,transparent),
    inset 0 -2px 4px color-mix(in srgb,var(--bg-deep) 30%,transparent);
}
.sediment-mode-label {
  border:1px solid transparent;
  border-radius:999px;
}
.sediment-mode-label:hover,
.sediment-mode-label:focus-visible {
  border-color:color-mix(in srgb,var(--line-strong) 58%,transparent);
  border-radius:999px;
  background:color-mix(in srgb,var(--text) 7%,transparent);
  outline:none;
}
.model-info-trigger {
  border:1px solid transparent;
  border-radius:8px;
  transition:color .18s ease,text-shadow .18s ease,border-color .18s ease,background .18s ease;
}
.model-info-trigger:hover,
.model-info-trigger:focus-visible {
  border-color:color-mix(in srgb,var(--line-strong) 58%,transparent);
  border-radius:8px;
  background:color-mix(in srgb,var(--text) 6%,transparent);
  outline:none;
}
#sedimentForcingPreset { font-size:.60rem!important; }
.sediment-status-number {
  color:#ff5050;
  font-weight:950;
  text-shadow:0 0 5px rgba(255,55,55,.20);
}
.sediment-map-body { position:relative; }
.sediment-transect-hint {
  position:absolute;
  z-index:12;
  top:18px;
  left:50%;
  width:178px;
  max-width:calc(100% - 16px);
  transform:translateX(-50%);
  padding:6px 7px;
  border:1px solid rgba(255,255,255,.30);
  border-radius:8px;
  background:rgba(46,49,53,.94);
  color:#fff;
  box-shadow:0 5px 16px rgba(0,0,0,.30);
  font-size:.60rem;
  line-height:1.28;
  pointer-events:none;
}
.sediment-transect-hint::before {
  content:"";
  position:absolute;
  top:-6px;
  left:50%;
  width:10px;
  height:10px;
  transform:translateX(-50%) rotate(45deg);
  border-left:1px solid rgba(255,255,255,.30);
  border-top:1px solid rgba(255,255,255,.30);
  background:rgba(46,49,53,.94);
}
.sediment-transect-hint[hidden] { display:none!important; }
.sediment-transect-hint label {
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:5px;
  margin-top:5px;
  color:#f0f0ee;
  font-size:.56rem;
  cursor:pointer;
  pointer-events:auto;
}
.sediment-transect-hint input { margin:0; }

/* v1.15.9 Sediment Transport inlet-air and animated transect-handle correction. */
/* Only Inlet Preview has intentional top/bottom breathing room. Live Bed,
   Y-Section, Scale, and X-Section return to edge-to-edge plot bodies. */
.sediment-lab-canvas { --sediment-inlet-control-air:10px; }
.sediment-visual-grid {
  grid-template-rows:
    calc(var(--sediment-map-size) + var(--sediment-plot-header-height) + 2px)
    calc(var(--sediment-x-profile-height) + var(--sediment-plot-header-height) + 1px);
}
.sediment-region-2 .sediment-plot-body,
.sediment-region-3 .sediment-plot-body,
.sediment-colorbar-region .sediment-plot-body,
.sediment-region-6 .sediment-plot-body {
  padding:0!important;
  margin:0!important;
}
.sediment-region-2 #sedimentMapCanvas,
.sediment-region-3 #sedimentYProfileCanvas,
.sediment-colorbar-region #sedimentColorbarCanvas,
.sediment-region-6 #sedimentInletCanvas {
  height:100%!important;
  margin:0!important;
  padding:0!important;
}
/* Live Bed's lower edge remains directly attached to X-Section. */
.sediment-region-2 { border-bottom:0!important; }
.sediment-region-4 { border-top:0!important; }

/* CSS-animated bidirectional handles replace the old solid endpoint triangles.
   Pink vertical transect moves left/right; dark-blue horizontal transect moves up/down. */
.sediment-map-body { position:relative; overflow:visible; }
.sediment-transect-resize-handle {
  position:absolute;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
  font-family:Arial,sans-serif;
  font-size:13px;
  font-weight:950;
  line-height:1;
  text-shadow:0 0 3px rgba(0,0,0,.78),0 0 5px rgba(255,255,255,.18);
}
.sediment-transect-resize-x {
  width:30px;
  height:14px;
  color:#ff2d95;
  transform:translateX(-50%);
  gap:2px;
}
.sediment-transect-resize-y {
  width:14px;
  height:30px;
  color:#1557d6;
  transform:translateY(-50%);
  flex-direction:column;
  gap:0;
}
@keyframes sediment-transect-left-pulse { 0%,100%{transform:translateX(0)} 50%{transform:translateX(-2px)} }
@keyframes sediment-transect-right-pulse { 0%,100%{transform:translateX(0)} 50%{transform:translateX(2px)} }
@keyframes sediment-transect-up-pulse { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-2px)} }
@keyframes sediment-transect-down-pulse { 0%,100%{transform:translateY(0)} 50%{transform:translateY(2px)} }
.sediment-transect-resize-x span:first-child { animation:sediment-transect-left-pulse .95s ease-in-out infinite; }
.sediment-transect-resize-x span:last-child { animation:sediment-transect-right-pulse .95s ease-in-out infinite; }
.sediment-transect-resize-y span:first-child { animation:sediment-transect-up-pulse .95s ease-in-out infinite; }
.sediment-transect-resize-y span:last-child { animation:sediment-transect-down-pulse .95s ease-in-out infinite; }
@media (prefers-reduced-motion:reduce) {
  .sediment-transect-resize-handle span { animation:none!important; }
}

/* Keep the first-use hint compact; the checkbox sits directly before its text. */
.sediment-transect-hint label {
  display:inline-flex!important;
  width:auto!important;
  align-items:center;
  justify-content:flex-start;
  gap:3px!important;
  white-space:nowrap;
}
.sediment-transect-hint input[type="checkbox"] {
  appearance:auto!important;
  width:11px!important;
  height:11px!important;
  min-width:11px!important;
  min-height:11px!important;
  max-width:11px!important;
  margin:0!important;
  padding:0!important;
  flex:0 0 11px!important;
  box-shadow:none!important;
}


/* v1.15.10 Sediment Transport pixel-registration and stemless-handle correction. */
/* One geometry source of truth: all top-row plot bodies are exactly map-size high. */
.sediment-visual-grid {
  grid-template-rows:
    calc(var(--sediment-plot-header-height) + var(--sediment-map-size) + 2px)
    calc(var(--sediment-x-profile-height) + var(--sediment-plot-header-height) + 1px)!important;
  row-gap:0!important;
}
.sediment-region-6,
.sediment-region-2,
.sediment-region-3,
.sediment-colorbar-region {
  grid-template-rows:var(--sediment-plot-header-height) var(--sediment-map-size)!important;
  height:calc(var(--sediment-plot-header-height) + var(--sediment-map-size) + 2px)!important;
  align-self:start;
}
.sediment-region-6 .sediment-plot-body,
.sediment-region-2 .sediment-plot-body,
.sediment-region-3 .sediment-plot-body,
.sediment-colorbar-region .sediment-plot-body {
  width:100%!important;
  height:var(--sediment-map-size)!important;
  min-height:var(--sediment-map-size)!important;
  max-height:var(--sediment-map-size)!important;
  padding:0!important;
  margin:0!important;
}
#sedimentInletCanvas,
#sedimentMapCanvas,
#sedimentYProfileCanvas,
#sedimentColorbarCanvas {
  display:block!important;
  width:100%!important;
  height:100%!important;
  padding:0!important;
  margin:0!important;
}
/* Keep one shared boundary line between Live Bed and X-Section; never a blank strip. */
.sediment-region-2 {
  border-bottom:1px solid var(--line-strong)!important;
}
.sediment-region-4 {
  grid-template-rows:var(--sediment-x-profile-height) var(--sediment-plot-header-height)!important;
  height:calc(var(--sediment-x-profile-height) + var(--sediment-plot-header-height) + 1px)!important;
  border-top:0!important;
  margin-top:0!important;
  align-self:start;
}
.sediment-region-4 .sediment-plot-body {
  width:100%!important;
  height:var(--sediment-x-profile-height)!important;
  min-height:var(--sediment-x-profile-height)!important;
  padding:0!important;
  margin:0!important;
}
#sedimentXProfileCanvas {
  display:block!important;
  width:100%!important;
  height:100%!important;
  padding:0!important;
  margin:0!important;
}
/* Inlet and Live Bed share the same outer top/bottom pixels. */
.sediment-region-6,
.sediment-region-2 { margin-top:0!important; margin-bottom:0!important; }

/* Fixed black, stemless triangular drag arrowheads, visually matching Inlet Preview. */
.sediment-transect-resize-handle {
  color:#111!important;
  font-size:0!important;
  text-shadow:none!important;
  filter:none!important;
}
.sediment-transect-resize-handle .sediment-arrowhead {
  display:block;
  width:0;
  height:0;
  flex:0 0 auto;
}
.sediment-transect-resize-x { width:24px!important; height:12px!important; gap:4px!important; }
.sediment-transect-resize-y { width:12px!important; height:24px!important; gap:4px!important; }
.sediment-arrowhead-left {
  border-top:4px solid transparent;
  border-bottom:4px solid transparent;
  border-right:6px solid #111;
}
.sediment-arrowhead-right {
  border-top:4px solid transparent;
  border-bottom:4px solid transparent;
  border-left:6px solid #111;
}
.sediment-arrowhead-up {
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-bottom:6px solid #111;
}
.sediment-arrowhead-down {
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:6px solid #111;
}
/* No first-use transect bubble from v1.15.10 onward. */
.sediment-transect-hint { display:none!important; }


/* v1.15.11 Sediment Transport asymmetric-air pixel alignment correction. */
/* Geometry rule:
   - Inlet Preview body = 10 px top air + map-size physical domain + 10 px bottom air.
   - Live Bed/Y-Section body = 10 px top air + map-size physical domain + 0 px bottom air.
   Thus the physical 0..W domains have identical top/bottom pixels, while only the
   Inlet canvas extends 10 px below for its lower controls. X-Section starts at the
   Live Bed lower edge, not at the Inlet canvas lower edge. */
.sediment-lab-canvas {
  --sediment-plot-top-air:10px;
  --sediment-inlet-bottom-air:10px;
}
.sediment-visual-grid {
  grid-template-rows:
    calc(var(--sediment-plot-header-height) + var(--sediment-map-size) + var(--sediment-plot-top-air) + 2px)
    calc(var(--sediment-x-profile-height) + var(--sediment-plot-header-height) + 1px)!important;
  row-gap:0!important;
  overflow:visible;
}
.sediment-region-2,
.sediment-region-3,
.sediment-colorbar-region {
  grid-template-rows:
    var(--sediment-plot-header-height)
    calc(var(--sediment-map-size) + var(--sediment-plot-top-air))!important;
  height:calc(var(--sediment-plot-header-height) + var(--sediment-map-size) + var(--sediment-plot-top-air) + 2px)!important;
  align-self:start;
}
.sediment-region-2 .sediment-plot-body,
.sediment-region-3 .sediment-plot-body,
.sediment-colorbar-region .sediment-plot-body {
  height:calc(var(--sediment-map-size) + var(--sediment-plot-top-air))!important;
  min-height:calc(var(--sediment-map-size) + var(--sediment-plot-top-air))!important;
  max-height:calc(var(--sediment-map-size) + var(--sediment-plot-top-air))!important;
}
.sediment-region-6 {
  grid-template-rows:
    var(--sediment-plot-header-height)
    calc(var(--sediment-map-size) + var(--sediment-plot-top-air) + var(--sediment-inlet-bottom-air))!important;
  height:calc(var(--sediment-plot-header-height) + var(--sediment-map-size) + var(--sediment-plot-top-air) + var(--sediment-inlet-bottom-air) + 2px)!important;
  align-self:start;
  z-index:3;
}
.sediment-region-6 .sediment-plot-body {
  height:calc(var(--sediment-map-size) + var(--sediment-plot-top-air) + var(--sediment-inlet-bottom-air))!important;
  min-height:calc(var(--sediment-map-size) + var(--sediment-plot-top-air) + var(--sediment-inlet-bottom-air))!important;
  max-height:calc(var(--sediment-map-size) + var(--sediment-plot-top-air) + var(--sediment-inlet-bottom-air))!important;
}
#sedimentInletCanvas,
#sedimentMapCanvas,
#sedimentYProfileCanvas,
#sedimentColorbarCanvas {
  display:block!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
}
/* Live Bed still owns the shared boundary immediately above X-Section. */
.sediment-region-2 { border-bottom:1px solid var(--line-strong)!important; }
.sediment-region-4 { border-top:0!important; margin-top:0!important; }

/* v1.15.12 Sediment Transport zero-air geometry and boundary-anchored inlet handles. */
/* No plot spacer remains in Inlet Preview, Live Bed, or Y-Section. All three
   physical domains occupy the full map-size body. X-Section begins on the very
   next grid pixel under Live Bed; its own plot also starts at y=0. */
.sediment-lab-canvas {
  --sediment-plot-top-air:0px;
  --sediment-inlet-bottom-air:0px;
  --sediment-inlet-control-air:0px;
}
.sediment-visual-grid {
  grid-template-rows:
    calc(var(--sediment-plot-header-height) + var(--sediment-map-size) + 1px)
    calc(var(--sediment-x-profile-height) + var(--sediment-plot-header-height) + 2px)!important;
  row-gap:0!important;
}
.sediment-region-6,
.sediment-region-2,
.sediment-region-3,
.sediment-colorbar-region {
  grid-template-rows:var(--sediment-plot-header-height) var(--sediment-map-size)!important;
  height:calc(var(--sediment-plot-header-height) + var(--sediment-map-size) + 1px)!important;
  min-height:0!important;
  margin:0!important;
  align-self:start!important;
  border-bottom:0!important;
}
.sediment-region-6 .sediment-plot-body,
.sediment-region-2 .sediment-plot-body,
.sediment-region-3 .sediment-plot-body,
.sediment-colorbar-region .sediment-plot-body {
  width:100%!important;
  height:var(--sediment-map-size)!important;
  min-height:var(--sediment-map-size)!important;
  max-height:var(--sediment-map-size)!important;
  padding:0!important;
  margin:0!important;
}
#sedimentInletCanvas,
#sedimentMapCanvas,
#sedimentYProfileCanvas,
#sedimentColorbarCanvas {
  display:block!important;
  width:100%!important;
  height:100%!important;
  padding:0!important;
  margin:0!important;
}
/* Zero whitespace and zero extra section border between Live Bed and X-Section. */
.sediment-region-2 { border-bottom:0!important; }
.sediment-region-4 {
  grid-template-rows:var(--sediment-x-profile-height) var(--sediment-plot-header-height)!important;
  height:calc(var(--sediment-x-profile-height) + var(--sediment-plot-header-height) + 1px)!important;
  margin:0!important;
  border-top:0!important;
  align-self:start!important;
}
.sediment-region-4 .sediment-plot-body {
  height:var(--sediment-x-profile-height)!important;
  min-height:var(--sediment-x-profile-height)!important;
  padding:0!important;
  margin:0!important;
}
#sedimentXProfileCanvas { display:block!important; width:100%!important; height:100%!important; margin:0!important; padding:0!important; }

/* Inlet resize indicators are overlays, not canvas spacer content. Their anchor
   pixel is the physical inlet boundary. The upper arrow moves outward/up; the
   lower arrow moves outward/down. */
.sediment-region-6 { overflow:visible!important; z-index:4; }
.sediment-region-6 .sediment-plot-body { position:relative; overflow:visible!important; }
.sediment-inlet-boundary-handle {
  position:absolute;
  z-index:20;
  left:50%;
  width:14px;
  height:0;
  pointer-events:none;
}
.sediment-inlet-boundary-handle > span {
  position:absolute;
  left:50%;
  width:0;
  height:0;
  filter:drop-shadow(0 0 1px rgba(255,255,255,.22));
}
.sediment-inlet-boundary-upper > span {
  bottom:0;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-bottom:6px solid #111;
  animation:sediment-inlet-upper-outward .9s ease-in-out infinite;
}
.sediment-inlet-boundary-lower > span {
  top:0;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:6px solid #111;
  animation:sediment-inlet-lower-outward .9s ease-in-out infinite;
}
@keyframes sediment-inlet-upper-outward {
  0%,100% { transform:translate(-50%,0); }
  50% { transform:translate(-50%,-3px); }
}
@keyframes sediment-inlet-lower-outward {
  0%,100% { transform:translate(-50%,0); }
  50% { transform:translate(-50%,3px); }
}
@media (prefers-reduced-motion:reduce) {
  .sediment-inlet-boundary-handle > span { animation:none!important; }
}


/* v1.15.13 Sediment directional handles, section colors, and larger canvas typography. */
/* Inlet boundary handles are interactive: both directions in-domain; only the feasible
   reverse direction is shown at a hard 0/10 m edge. */
.sediment-inlet-boundary-handle {
  width:22px!important;
  height:24px!important;
  transform:translate(-50%,-50%);
  pointer-events:auto!important;
  cursor:grab!important;
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
}
.sediment-inlet-boundary-handle:active { cursor:grabbing!important; }
.sediment-inlet-boundary-handle > .sediment-inlet-arrow {
  position:relative!important;
  left:auto!important; top:auto!important; bottom:auto!important;
  width:0!important; height:0!important;
  border:0!important;
  filter:none!important;
}
.sediment-inlet-boundary-handle > .sediment-inlet-arrow[hidden] { display:none!important; }
.sediment-inlet-arrow-up {
  border-left:4px solid transparent!important;
  border-right:4px solid transparent!important;
  border-bottom:6px solid #111!important;
  animation:sediment-transect-up-pulse .95s ease-in-out infinite!important;
}
.sediment-inlet-arrow-down {
  border-left:4px solid transparent!important;
  border-right:4px solid transparent!important;
  border-top:6px solid #111!important;
  animation:sediment-transect-down-pulse .95s ease-in-out infinite!important;
}
/* Every visible resize arrow is an actual drag target and shows the hand cursor. */
.sediment-transect-resize-handle { pointer-events:auto!important; cursor:grab!important; }
.sediment-transect-resize-handle:active { cursor:grabbing!important; }
.sediment-transect-resize-handle .sediment-arrowhead[hidden] { display:none!important; }
#sedimentInletCanvas, #sedimentMapCanvas { cursor:grab!important; }
#sedimentInletCanvas:active, #sedimentMapCanvas:active { cursor:grabbing!important; }

/* Section identity follows its matching fixed transect/profile color. */
.sediment-region-3 .sediment-plot-header,
.sediment-region-3 .sediment-dynamic-coordinate { color:#ff2d95!important; }
.sediment-region-4 .sediment-plot-header,
.sediment-region-4 .sediment-dynamic-coordinate { color:#1557d6!important; }

/* One typography step larger throughout the Sediment interactive canvas, including
   Wave Maker labels/values, headers, status text and controls. */
.sediment-lab-canvas .sediment-plot-header { font-size:.72rem!important; }
.sediment-lab-canvas .sediment-forcing-grid .field label { font-size:.60rem!important; }
.sediment-lab-canvas .sediment-forcing-grid input,
.sediment-lab-canvas .sediment-forcing-grid select,
.sediment-lab-canvas #sedimentForcingPreset { font-size:.67rem!important; }
.sediment-lab-canvas .sediment-live-forcing-callout { font-size:.64rem!important; }
.sediment-lab-canvas .sediment-inlet-span-readout { font-size:.58rem!important; }
.sediment-lab-canvas .sediment-inlet-span-readout strong { font-size:.60rem!important; }
.sediment-lab-canvas .sediment-inline-status { font-size:.57rem!important; }
.sediment-lab-canvas .sediment-apply-btn { font-size:.67rem!important; }
.sediment-lab-canvas .sediment-canvas-status,
.sediment-lab-canvas .sediment-frame-status,
.sediment-lab-canvas .sediment-transect-status { font-size:.68rem!important; }

/* v1.15.14 Sediment cursor-coordinate guides and Canvas inlet arrows. */
.sediment-region-2 .sediment-plot-body,
.sediment-region-3 .sediment-plot-body,
.sediment-region-4 .sediment-plot-body {
  position:relative!important;
}
.sediment-cursor-overlay {
  position:absolute!important;
  inset:0!important;
  z-index:8!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  pointer-events:none!important;
}
/* Region 3 uses two compact title lines instead of truncating the enlarged text. */
.sediment-region-3 .sediment-plot-header {
  flex-direction:column!important;
  gap:1px!important;
  justify-content:center!important;
  padding:1px 4px!important;
  line-height:.98!important;
  white-space:normal!important;
  text-overflow:clip!important;
}
.sediment-region-3 .sediment-plot-header > span {
  display:block;
  white-space:nowrap;
}
/* The profile canvases now report coordinates, while only actual drag handles use a hand cursor. */
#sedimentMapCanvas,
#sedimentYProfileCanvas,
#sedimentXProfileCanvas { cursor:crosshair!important; }
#sedimentInletCanvas { cursor:ns-resize!important; }
.sediment-inlet-boundary-handle {
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  pointer-events:auto!important;
  cursor:grab!important;
}
.sediment-inlet-boundary-handle:active { cursor:grabbing!important; }

/* v1.15.15 Wave Maker Apply cooldown. */
#sedimentApplyForcingBtn:disabled {
  color:color-mix(in srgb,var(--text) 42%,#777)!important;
  background:color-mix(in srgb,var(--panel) 74%,#888)!important;
  border-color:color-mix(in srgb,var(--line-strong) 55%,#777)!important;
  box-shadow:inset 0 1px 1px rgba(255,255,255,.08)!important;
  cursor:not-allowed!important;
  filter:saturate(.2)!important;
  opacity:.82!important;
}
.sediment-forcing-cooldown input,
.sediment-forcing-cooldown select {
  cursor:not-allowed!important;
}
.sediment-region-6.sediment-forcing-cooldown #sedimentInletCanvas,
.sediment-region-6.sediment-forcing-cooldown .sediment-inlet-boundary-handle {
  cursor:not-allowed!important;
  pointer-events:none!important;
}


/* v1.15.16 muted live-status green and compact Sediment controls. */
.sediment-status-number,
.sediment-cursor-coordinate-number {
  color:#3f9d68!important;
  font-weight:850!important;
  text-shadow:none!important;
  font-variant-numeric:tabular-nums;
}

/* Keep the setup Run control compact without affecting other experiment buttons. */
#sedimentRunBtn {
  min-height:31px!important;
  padding:5px 10px!important;
  font-size:.76rem!important;
  line-height:1.1!important;
}

/* Sediment playback/export row: smaller controls with one common vertical centerline. */
.sediment-toolbar {
  align-items:center!important;
  gap:6px!important;
}
#sedimentStopBtn,
#sedimentSnapshotBtn,
#sedimentRecordBtn {
  min-height:31px!important;
  height:31px!important;
  padding:4px 9px!important;
  font-size:.75rem!important;
  line-height:1!important;
}
#sedimentPlayBtn {
  width:31px!important;
  min-width:31px!important;
  height:31px!important;
  min-height:31px!important;
  padding:0!important;
}
#sedimentPlayBtn .lucide-media-icon {
  width:14px!important;
  height:14px!important;
  flex-basis:14px!important;
}
.sediment-speed-field {
  display:inline-flex!important;
  align-items:center!important;
  align-self:center!important;
  gap:6px!important;
  min-height:31px!important;
}
.sediment-speed-field label {
  display:flex!important;
  align-items:center!important;
  align-self:center!important;
  height:31px!important;
  margin:0!important;
  line-height:1!important;
}
#sedimentAnimationSpeed {
  min-height:31px!important;
  height:31px!important;
  padding-top:3px!important;
  padding-bottom:3px!important;
  align-self:center!important;
  font-size:.65rem!important;
}

/* v1.15.18 initial-section preview + post-Run Wave Maker attention cue. */
@keyframes sediment-live-forcing-attention-pulse {
  0%,100% { transform:scale(1); }
  50% { transform:scale(1.10); }
}
.sediment-live-forcing-callout.sediment-live-forcing-attention {
  transform-origin:center center!important;
  animation:sediment-live-forcing-attention-pulse 1.35s ease-in-out infinite!important;
  will-change:transform;
}

/* v1.16.0 Sediment Particles: Flume-style setup and progressive particle viewer. */
.particle-viewer-controls {
  display:flex;
  align-items:flex-end;
  gap:7px;
}
.particle-viewer-controls[hidden],
.particle-result-canvas[hidden] { display:none!important; }
.particle-viewer-controls .field { min-width:145px; }
.particle-result-canvas {
  display:block;
  width:100%;
  height:min(58vh,520px);
  min-height:360px;
  background:#151718;
}
body[data-theme="silver"] .particle-result-canvas,
body[data-theme="solarized-light"] .particle-result-canvas {
  background:#d7d9d7;
}
@media (max-width:900px) {
  .particle-viewer-controls { width:100%; flex-wrap:wrap; }
  .particle-viewer-controls .field { min-width:0; flex:1 1 140px; }
  .particle-result-canvas { min-height:300px; height:46vh; }
}

/* v1.16.1 Sediment Particles playback-state and setup compaction. */
body.sediment-particles-active .model-info-stack {
  width: 360px;
  max-width: 360px;
  flex: 0 0 360px;
}
body.sediment-particles-active .model-info-stack .model-badge {
  max-width: none;
  padding-inline: 10px;
}
body.sediment-particles-active .model-info-trigger {
  white-space: nowrap;
}
body.sediment-particles-active #setupConfigShell > .section-divider {
  margin: 5px 0;
}
body.sediment-particles-active #modelParameterZone .model-parameter-content {
  padding-top: 8px;
  padding-bottom: 9px;
}
body.sediment-particles-active #modelParameterZone .model-parameter-content .compact-heading {
  margin-bottom: 6px;
}
body.sediment-particles-active #parameterForm {
  gap: 7px 8px;
}

@media (min-width: 1121px) {
  body.sediment-particles-active .workspace {
    grid-template-columns: minmax(690px, 1fr) minmax(690px, 1fr);
  }
  body.sediment-particles-active #parameterForm {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.sediment-particles-active .model-info-stack {
    width: 100%;
    max-width: 100%;
    flex-basis: auto;
  }
}

/* v1.16.2 Sediment Particles: strict 50/50 desktop fit and bounded compiler badge. */
body.sediment-particles-active .setup-header > :first-child {
  min-width: 0;
  flex: 1 1 66.666%;
}
body.sediment-particles-active .setup-header-tools {
  width: 33.333%;
  max-width: 33.333%;
  min-width: 0;
  flex: 0 1 33.333%;
  margin-left: auto;
  justify-items: end;
}
body.sediment-particles-active .model-info-stack {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: none;
  justify-items: end;
}
body.sediment-particles-active .model-info-stack .model-badge {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
body.sediment-particles-active .model-info-trigger {
  max-width: 100%;
  white-space: nowrap;
  justify-self: end;
}
body.sediment-particles-active #parameterForm {
  column-gap: 6px;
  row-gap: 7px;
}
body.sediment-particles-active #parameterForm :is(input, select) {
  padding-left: 8px;
  padding-right: 8px;
}

@media (min-width: 1121px) {
  body.sediment-particles-active .workspace {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }
  body.sediment-particles-active .workspace > .left-column,
  body.sediment-particles-active .workspace > .right-column {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  body.sediment-particles-active #parameterForm {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.sediment-particles-active .setup-header > :first-child {
    flex-basis: auto;
  }
  body.sediment-particles-active .setup-header-tools {
    width: 100%;
    max-width: 100%;
    flex-basis: auto;
    margin-left: 0;
    justify-items: start;
  }
  body.sediment-particles-active .model-info-stack {
    justify-items: start;
  }
}

/* v1.16.3 universal Default reset control beside New Run / Last Run. */
.run-default-btn {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid rgba(210, 214, 211, .52);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(238,239,235,.88), rgba(175,179,176,.88));
  color: #343837;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 2px 4px rgba(0,0,0,.22);
  font: inherit;
  font-size: .67rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: filter .14s ease, box-shadow .14s ease, transform .08s ease;
}
.run-default-btn:hover,
.run-default-btn:focus-visible {
  filter: brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 2px 6px rgba(0,0,0,.28), 0 0 0 1px rgba(255,224,116,.20);
}
.run-default-btn:active { transform: translateY(1px); }
.run-default-btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

body[data-run-mode-style="slider"] .run-mode-dock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: min(58%, 450px);
  min-width: 340px;
  max-width: 450px;
}
body[data-run-mode-style="slider"] .run-mode-control { min-width: 0; }
body[data-run-mode-style="slider"] .run-mode-dock .run-default-btn { justify-self: end; }

#sedimentRunModeControl {
  grid-template-columns: auto 70px auto auto;
}
#sedimentRunModeControl .sediment-default-btn {
  min-height: 25px;
  padding: 3px 8px;
  margin-left: 1px;
  font-size: .64rem;
}

@media (max-width: 620px) {
  body[data-run-mode-style="slider"] .run-mode-dock {
    width: 100%;
    min-width: 0;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .run-default-btn { padding-inline: 8px; }
}
@media (max-width: 560px) {
  #sedimentRunModeControl {
    width: 100%;
    grid-template-columns: auto 70px auto auto;
  }
}

/* v1.17.1 Sediment Particles fully coupled water/particle/bed result controls. */
body.sediment-particles-active .particle-viewer-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(100%, 720px);
}
body.sediment-particles-active .particle-viewer-controls .field {
  min-width: 118px;
  flex: 0 1 158px;
}
body.sediment-particles-active .particle-viewer-controls .compact-field select {
  width: 100%;
}
@media (max-width: 900px) {
  body.sediment-particles-active .particle-viewer-controls {
    justify-content: stretch;
    max-width: 100%;
  }
  body.sediment-particles-active .particle-viewer-controls .field {
    min-width: 0;
    flex: 1 1 138px;
  }
}

/* v1.19.x [GPU] Global Tsunami ------------------------------------------------ */
.global-tsunami-workspace { display: block; margin-top: 18px; }
.global-tsunami-workspace[hidden] { display: none !important; }
.global-tsunami-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .96fr); gap: 18px; align-items: stretch; }
.global-tsunami-setup-card, .global-initial-card { min-width: 0; }
.global-tsunami-setup-body { position: relative; }
.global-world-pill { white-space: nowrap; }
.global-source-tabs, .global-result-toggle { display: flex; gap: 6px; flex-wrap: wrap; }
.global-source-tabs .segment-btn, .global-result-toggle .segment-btn { min-width: 88px; }
.global-gaussian-fields, .global-output-fields { margin-top: 14px; }
.global-readonly-value { min-height: 40px; display: flex; align-items: center; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--panel) 82%, transparent); font-variant-numeric: tabular-nums; }
.global-start-row { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.global-queue-bar { margin-top: 10px; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; gap: 9px; background: color-mix(in srgb, var(--panel) 88%, var(--accent) 12%); font-size: .92rem; font-variant-numeric: tabular-nums; }
.global-queue-bar strong { white-space: nowrap; }
.global-auth-gate { margin-bottom: 14px; padding: 12px; border: 1px solid color-mix(in srgb, var(--orange) 52%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--orange) 9%, var(--panel)); display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; }
.global-auth-gate[hidden] { display: none !important; }
.global-auth-gate strong { grid-column: 1; }
.global-auth-gate span { grid-column: 1; color: var(--muted); }
.global-auth-gate button { grid-column: 2; grid-row: 1 / span 2; }
.global-initial-body { min-height: 455px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#globalGaussianPreview, #globalPreparedSourceImage { width: 100%; height: auto; max-height: 610px; object-fit: contain; display: block; }
#globalPreparedSourceImage[hidden], #globalGaussianPreview[hidden] { display: none !important; }
.global-results-card, .global-recent-card { margin-top: 18px; }
.global-live-strip { grid-template-columns: 1fr; }
.global-viewer-actions { align-items: center; gap: 12px; }
.global-result-stage { min-height: 540px; }
#globalResultImage { width: 100%; max-height: 78vh; object-fit: contain; }
.global-frame-toolbar { justify-content: center; }
.global-jobs-table td, .global-jobs-table th { white-space: nowrap; }
.global-jobs-table td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; }
.tab-btn[data-experiment="global_tsunami"] .tab-label-line:first-child { font-weight: 800; }
body.global-tsunami-active > .tooltip-bubble { z-index: 1000; }
@media (max-width: 1080px) {
  .global-tsunami-grid { grid-template-columns: 1fr; }
  .global-initial-body { min-height: 360px; }
  .global-result-stage { min-height: 420px; }
}
@media (max-width: 680px) {
  .global-output-fields, .global-gaussian-fields { grid-template-columns: 1fr; }
  .global-start-row, .global-viewer-actions { flex-wrap: wrap; }
  .global-queue-bar { align-items: flex-start; }
}

/* v1.19.1 Global Tsunami layout, queue, run-mode, and playback refinements ----- */
body.global-tsunami-active main.page-shell > section.workspace,
body.global-tsunami-active main.page-shell > article.viewer-card,
body.global-tsunami-active main.page-shell > section.lower-grid {
  display: none !important;
}

/* Route the first paint before asynchronous settings/auth/API work completes.
   The default/saved Global workspace is visible immediately, so the static
   Flume scaffold can never flash while FluidLab is still booting. */
html:not(.fluidlab-app-ready)[data-initial-experiment="global_tsunami"] body main.page-shell > section.workspace,
html:not(.fluidlab-app-ready)[data-initial-experiment="global_tsunami"] body main.page-shell > article.viewer-card,
html:not(.fluidlab-app-ready)[data-initial-experiment="global_tsunami"] body main.page-shell > section.lower-grid {
  display: none !important;
}
html:not(.fluidlab-app-ready)[data-initial-experiment="global_tsunami"] body #globalTsunamiWorkspace[hidden] {
  display: block !important;
}
html:not(.fluidlab-app-ready)[data-initial-experiment]:not([data-initial-experiment="global_tsunami"]):not([data-initial-experiment="flume"]) body main.page-shell > section.workspace,
html:not(.fluidlab-app-ready)[data-initial-experiment]:not([data-initial-experiment="global_tsunami"]):not([data-initial-experiment="flume"]) body main.page-shell > article.viewer-card,
html:not(.fluidlab-app-ready)[data-initial-experiment]:not([data-initial-experiment="global_tsunami"]):not([data-initial-experiment="flume"]) body main.page-shell > section.lower-grid {
  display: none !important;
}

.global-tsunami-grid {
  grid-template-columns: minmax(290px, 1fr) minmax(0, 2fr);
  gap: 14px;
  align-items: stretch;
}
.global-tsunami-setup-card { min-width: 0; }
.global-setup-header { align-items: flex-start; gap: 10px; }
.global-setup-header > div:first-child { min-width: 0; }
.global-worker-badge {
  display: grid;
  gap: 3px;
  min-width: 126px;
  padding: 6px 8px;
  line-height: 1.18;
  text-align: left;
  white-space: nowrap;
}
.global-worker-line { display: flex; align-items: center; gap: 6px; }
.global-worker-ready-line { font-weight: 800; }
.global-worker-badge .status-dot { width: 7px; height: 7px; }
.global-worker-badge.not-ready .global-worker-ready-line { color: var(--red); }
.global-worker-badge.ready .global-worker-ready-line { color: var(--green); }

.global-domain-grid-section { margin-top: 0; }
.global-domain-title-row {
  grid-template-columns: 1fr auto;
  grid-template-areas: "run tools" "title tools";
  gap: 7px 10px;
  align-items: center;
}
.global-domain-title-row > h3 { grid-area: title; margin: 0; }
.global-domain-title-row > .domain-grid-title-tools { grid-area: tools; align-self: end; }
.global-run-mode-dock {
  grid-area: run;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.global-run-mode-dock .run-mode-control {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 250px;
}
.global-run-mode-dock .run-mode-label { font-size: .78rem; }
.global-fixed-grid {
  margin-top: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.global-fixed-grid input[readonly] {
  cursor: default;
  opacity: .88;
  font-variant-numeric: tabular-nums;
}

.global-source-radios {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: nowrap;
  margin-top: 9px;
}
.global-source-radio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  font-size: .9rem;
}
.global-source-radio input { accent-color: var(--accent); margin: 0; }
.global-source-radio:has(input:checked) span { font-weight: 800; color: var(--accent); }
.global-source-radio:has(input:disabled) { opacity: .55; cursor: default; }
.global-gaussian-fields input:disabled,
.global-schedule-grid input:disabled,
.global-schedule-grid select:disabled,
.global-inline-output-control input:disabled,
.global-inline-output-control select:disabled {
  opacity: .48;
  filter: saturate(.35);
  cursor: not-allowed;
  background: color-mix(in srgb, var(--panel) 74%, var(--line) 26%);
}

.global-schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.global-total-frames-field { grid-column: 1 / -1; max-width: 48%; }
.global-output-summary { margin-top: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.global-output-summary .global-readonly-value { min-height: 34px; font-size: .84rem; }
.global-inline-output-control {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}
.global-output-pair { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; }
.global-output-pair + .global-output-pair { margin-left: 1ch; }
.global-inline-output-control input,
.global-inline-output-control select {
  flex: 0 0 auto;
  min-width: 0;
  height: 25px;
  min-height: 25px;
  border-radius: 5px;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
.global-inline-output-control #globalOutskip,
.global-inline-output-control #globalPlotskip {
  width: 20px;
  padding: 2px 0;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}
.global-inline-output-control #globalOutskip::-webkit-inner-spin-button,
.global-inline-output-control #globalOutskip::-webkit-outer-spin-button,
.global-inline-output-control #globalPlotskip::-webkit-inner-spin-button,
.global-inline-output-control #globalPlotskip::-webkit-outer-spin-button,
.global-inline-output-control #globalPlotDpi::-webkit-inner-spin-button,
.global-inline-output-control #globalPlotDpi::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
.global-inline-output-control #globalPlotDpi {
  width: 32px;
  padding: 2px 1px;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}
.global-inline-output-control #globalRegrid { width: 44px; min-width: 44px; padding: 2px 14px 2px 1px; }
.global-runtime-stack { display: inline-grid; gap: 2px; line-height: 1.15; }
.global-runtime-stack strong { display: inline-block; min-width: 36px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .025em; }

.global-queue-number {
  color: var(--green);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 7px color-mix(in srgb, var(--green) 30%, transparent);
}

.global-initial-card { min-width: 0; }
.global-initial-body {
  min-height: 440px;
  padding: 10px;
}
.global-initial-body.prepared-source {
  padding: 0;
  min-height: 0;
  align-items: stretch;
  justify-content: stretch;
}
#globalPreparedSourceImage {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: cover;
  object-position: center;
}
#globalGaussianPreview { width: 100%; max-height: 660px; }

.global-result-toggle .segment-btn {
  min-width: 70px;
  transition: box-shadow .12s ease, transform .12s ease, background .12s ease;
}
.global-result-toggle .segment-btn.active,
.global-result-toggle .segment-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 23%, var(--panel));
  box-shadow: inset 0 2px 5px rgba(0,0,0,.42), inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, var(--line));
  transform: translateY(1px);
  font-weight: 800;
}

@media (max-width: 1080px) {
  .global-tsunami-grid { grid-template-columns: 1fr; }
  .global-total-frames-field { max-width: none; }
}
@media (max-width: 680px) {
  .global-fixed-grid, .global-schedule-grid, .global-output-summary { grid-template-columns: 1fr; }
  .global-total-frames-field { grid-column: auto; }
  .global-source-radios { gap: 8px; flex-wrap: wrap; }
  .global-domain-title-row { display: flex; flex-wrap: wrap; }
  .global-run-mode-dock { width: 100%; }
}

/* v1.19.2 Global Tsunami compact controls and smoother playback --------------- */
.global-auth-gate[hidden] { display: none !important; }

/* Only the readiness lamp carries green/red state; keep the status copy readable. */
.global-worker-badge.ready .global-worker-ready-line,
.global-worker-badge.not-ready .global-worker-ready-line {
  color: var(--text);
}
.global-worker-badge .status-dot.online { background: var(--green); box-shadow: 0 0 8px color-mix(in srgb, var(--green) 70%, transparent); }
.global-worker-badge .status-dot.failed { background: var(--red); box-shadow: 0 0 8px color-mix(in srgb, var(--red) 60%, transparent); }

/* Native radio controls only: no tile, border, hover panel, or lift effect. */
.global-source-radios { gap: 12px; }
.global-source-radio,
.global-source-radio:hover,
.global-source-radio:focus-within,
.global-source-radio:active {
  border: 0 !important;
  outline: 0;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  padding: 0 !important;
}
.global-source-radio input { width: auto; min-width: 0; height: auto; }
.global-source-radio span { background: transparent !important; box-shadow: none !important; }

/* Keep duration, interval and frame count on one compact row. */
.global-schedule-grid {
  grid-template-columns: minmax(112px, 1fr) minmax(112px, 1fr) minmax(88px, .78fr);
  gap: 7px;
  align-items: start;
}
.global-schedule-grid .field { min-width: 0; }
.global-schedule-grid .field > label { font-size: .72rem; line-height: 1.05; white-space: nowrap; }
.global-schedule-grid .input-pair.wide-number { display: grid; grid-template-columns: minmax(48px, 64px) minmax(60px, 78px); gap: 4px; }
.global-schedule-grid .input-pair.wide-number input { min-width: 0; width: 100%; padding-left: 7px; padding-right: 5px; }
.global-schedule-grid .input-pair.wide-number select { min-width: 0; width: 100%; padding-left: 5px; padding-right: 18px; }
.global-total-frames-field { grid-column: auto; max-width: none; }
.global-total-frames-field input { width: 68px; max-width: 68px; }
.global-total-frames-field small { display: block; margin-top: 3px; font-size: .66rem; line-height: 1.15; }

.global-readonly-value {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.25;
  gap: 1px;
}
.global-readonly-value > span { display: block; white-space: nowrap; }

/* Queue and job controls belong to the result/output area, not the parameter card. */
.global-results-command-strip {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 93%, var(--accent) 7%);
}
.global-results-command-strip .global-queue-bar {
  margin: 0 0 8px;
  width: 100%;
  min-height: 36px;
}
.global-results-command-strip .global-start-row { margin: 0; }
.global-live-strip { margin-top: 0; }

/* Strong inward green selection glow for z / zmax. */
.global-result-toggle .segment-btn.active,
.global-result-toggle .segment-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--green) 18%, var(--panel));
  border-color: color-mix(in srgb, var(--green) 65%, var(--line));
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,.48),
    inset 0 0 10px 2px color-mix(in srgb, var(--green) 58%, transparent),
    0 0 0 1px color-mix(in srgb, var(--green) 18%, transparent);
  color: var(--text);
  transform: translateY(1px);
}

/* Double-buffer the streamed WebP frames and use a very short crossfade. */
.global-result-stage { position: relative; }
#globalResultImage { position: relative; z-index: 1; width: 100%; max-height: 78vh; object-fit: contain; }
#globalResultImageNext {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: 78vh;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 85ms ease-out;
  will-change: opacity;
}
#globalResultImageNext.global-frame-fade-in { opacity: 1; }
#globalResultImageNext[hidden] { display: none !important; }

@media (max-width: 680px) {
  .global-schedule-grid { grid-template-columns: 1fr; }
  .global-total-frames-field input { width: 100%; max-width: none; }
}

/* v1.19.3 Global Tsunami layout/state polish --------------------------------- */
/* Bright readiness lamp with a black edge; status text itself remains neutral. */
.global-worker-badge .status-dot.online {
  width: 8px;
  height: 8px;
  background: #7cff00 !important;
  border: 1px solid #000 !important;
  box-sizing: border-box;
  box-shadow: 0 0 7px rgba(124,255,0,.9), 0 0 2px rgba(0,0,0,.9) !important;
}
.global-worker-badge .status-dot.failed {
  width: 8px;
  height: 8px;
  border: 1px solid #000 !important;
  box-sizing: border-box;
}

/* Force these to be plain native radio controls, overriding FluidLab's generic input styling. */
.global-source-radio,
.global-source-radio:hover,
.global-source-radio:focus-within,
.global-source-radio:active {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  padding: 0 !important;
}
.global-source-radio input[type="radio"],
.global-source-radio input[type="radio"]:hover,
.global-source-radio input[type="radio"]:focus,
.global-source-radio input[type="radio"]:active {
  -webkit-appearance: radio !important;
  appearance: auto !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  margin: 0 3px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
}

/* Center New Run / Last Run across the row, while Default stays pinned right. */
.global-domain-title-row {
  grid-template-columns: 1fr auto;
  grid-template-areas: "run run" "title tools";
}
.global-run-mode-dock {
  grid-column: 1 / -1;
  position: relative;
  justify-content: center;
  width: 100%;
  min-height: 34px;
}
.global-run-mode-dock .run-mode-control {
  flex: 0 1 250px;
  width: min(250px, calc(100% - 92px));
  margin-inline: auto;
}
.global-run-mode-dock > .run-default-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* Duration and interval share row one. Total Output Frames owns row two. */
.global-schedule-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}
.global-schedule-grid .input-pair.wide-number {
  display: grid;
  grid-template-columns: minmax(52px, 68px) minmax(82px, 104px);
  gap: 4px;
}
.global-schedule-grid .input-pair.wide-number select {
  padding-left: 7px;
  padding-right: 20px;
}
.global-total-frames-field {
  grid-column: 1 / -1 !important;
  width: auto;
  max-width: none !important;
}
.global-total-frames-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}
.global-total-frames-field .global-total-frames-row input {
  flex: 0 0 88px;
  width: 88px;
  max-width: 88px;
}
.global-total-frames-field .global-total-frames-row small {
  display: inline;
  margin: 0;
  white-space: nowrap;
}

/* Queue stays on its own row; Start/Cancel and job status share the next row, like standard FluidLab output. */
.global-results-command-strip { padding-bottom: 9px; }
.global-start-status-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.global-start-status-row .global-start-row {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.global-inline-job-progress { min-width: 0; }
.global-inline-status-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: .78rem;
}
.global-inline-status-line .job-summary { flex: 0 0 auto; }
#globalProgressPercent { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
#globalProgressMessage {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.global-inline-job-progress .progress-shell { margin-top: 4px; }

@media (max-width: 760px) {
  .global-start-status-row { grid-template-columns: 1fr; }
  .global-inline-status-line { flex-wrap: wrap; }
  #globalProgressMessage { white-space: normal; }
}


/* v1.19.4 shared status lamps, compact model menu, and no-flash playback ------- */
/* Use one readable black-edged lamp language everywhere. */
.status-dot {
  width: 8px;
  height: 8px;
  border: 1px solid #000 !important;
  box-sizing: border-box;
  background: #d7d9d6 !important;
  box-shadow: 0 0 2px rgba(255,255,255,.38) !important;
}
.status-dot.online,
.status-dot.completed {
  background: #7cff00 !important;
  box-shadow: 0 0 7px rgba(124,255,0,.88), 0 0 2px rgba(0,0,0,.85) !important;
}
.status-dot.running {
  background: #f0c36f !important;
  border-color: #000 !important;
  box-shadow: 0 0 7px rgba(240,195,111,.70) !important;
}
.status-dot.failed,
.status-dot.cancelled,
.status-dot.timed_out {
  background: #ff6969 !important;
  border-color: #000 !important;
  box-shadow: 0 0 6px rgba(255,105,105,.58) !important;
}
.health-dot {
  width: 8px;
  height: 8px;
  border: 1px solid #000 !important;
  box-sizing: border-box;
  background: #d7d9d6 !important;
  box-shadow: 0 0 2px rgba(255,255,255,.38) !important;
}
.numerical-health.monitoring .health-dot {
  background: #f0c36f !important;
  box-shadow: 0 0 7px rgba(240,195,111,.70) !important;
}
.numerical-health.stable .health-dot {
  background: #7cff00 !important;
  box-shadow: 0 0 7px rgba(124,255,0,.88), 0 0 2px rgba(0,0,0,.85) !important;
}
.numerical-health.warning .health-dot { border-color: #000 !important; }
.numerical-health.unstable .health-dot { border-color: #000 !important; }

/* Keep the Global Tsunami worker copy neutral; only its lamp carries state color. */
.global-worker-badge.ready .global-worker-ready-line,
.global-worker-badge.not-ready .global-worker-ready-line { color: var(--text) !important; }

/* Five less-used flow solvers live under the rightmost hover menu. */
.tabs { overflow: visible; position: relative; }
.tab-dropdown {
  position: relative;
  flex: 0 0 auto;
  z-index: 40;
}
.tab-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
}
.tab-dropdown-arrow { font-size: .72em; opacity: .72; transform: translateY(-1px); }
.tab-dropdown-menu {
  position: absolute;
  z-index: 200;
  top: calc(100% + 3px);
  right: 0;
  min-width: 190px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, #111 6%);
  box-shadow: 0 10px 24px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
}
.tab-dropdown:hover .tab-dropdown-menu,
.tab-dropdown:focus-within .tab-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.tab-dropdown-item {
  display: block;
  width: 100%;
  min-height: 31px;
  padding: 6px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-size: .72rem;
  font-weight: 760;
  cursor: pointer;
}
.tab-dropdown-item:hover,
.tab-dropdown-item:focus-visible {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  transform: none !important;
  box-shadow: none !important;
  outline: none;
}
.tab-dropdown-item.active {
  background: color-mix(in srgb, var(--accent) 23%, var(--panel));
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 52%, var(--line));
}

/* Global source selectors are real radio semantics with a fully custom circle;
   the generic FluidLab input chrome can no longer leak a square around them. */
.global-source-radio { position: relative; }
.global-source-radio input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  pointer-events: none;
}
.global-source-radio > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.global-source-radio > span::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--text) 58%, var(--line));
  background: color-mix(in srgb, var(--panel) 90%, #fff 10%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.28);
}
.global-source-radio input[type="radio"]:checked + span::before {
  border-color: color-mix(in srgb, var(--accent) 78%, #111 22%);
  background: radial-gradient(circle, var(--accent) 0 38%, color-mix(in srgb, var(--panel) 90%, #fff 10%) 42% 100%);
}
.global-source-radio:hover > span,
.global-source-radio:focus-within > span { background: transparent !important; box-shadow: none !important; }
.global-source-radio:focus-within > span::before { outline: 1px solid color-mix(in srgb, var(--accent) 72%, transparent); outline-offset: 2px; }

/* Absolute centering of Default must survive the generic button hover transform. */
.global-run-mode-dock > .run-default-btn { transform: translateY(-50%) !important; }
.global-run-mode-dock > .run-default-btn:hover,
.global-run-mode-dock > .run-default-btn:focus-visible { transform: translateY(calc(-50% - 1px)) !important; }
.global-run-mode-dock > .run-default-btn:active { transform: translateY(calc(-50% + 1px)) scale(.985) !important; }

/* Keep playback controls centered while the preload/status copy owns a fixed
   right-side slot. Applies to Global Tsunami and every standard model tab. */
.frame-toolbar {
  position: relative;
  min-height: 38px;
  padding-left: 250px;
  padding-right: 250px;
  box-sizing: border-box;
}
.frame-toolbar > .preload-status {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 238px;
  max-width: 238px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

/* Decoded double-buffer image swap for every standard FluidLab result viewer. */
.result-stage { position: relative; }
#resultImage { position: relative; z-index: 1; }
#resultImageNext {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 65ms ease-out;
  will-change: opacity;
}
#resultImageNext.result-frame-fade-in { opacity: 1; }
#resultImageNext[hidden] { display: none !important; }

@media (max-width: 1050px) {
  .frame-toolbar { padding-left: 0; padding-right: 0; padding-bottom: 29px; }
  .frame-toolbar > .preload-status {
    top: auto;
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    transform: none;
    text-align: center;
  }
}


/* v1.19.5 dropdown opacity, selected-radio clarity, and TAMU queue polish ------- */
/* The previous dropdown used var(--panel), which is intentionally undefined in
   older FluidLab themes; that invalidated background and made the menu transparent. */
.tab-dropdown-menu {
  background: #303437 !important;
  opacity: 0;
}
body[data-theme="graphite"] .tab-dropdown-menu,
body[data-theme="ocean-steel"] .tab-dropdown-menu,
body[data-theme="jade"] .tab-dropdown-menu { background: #303437 !important; }
body[data-theme="silver"] .tab-dropdown-menu { background: #e7ebec !important; }
body[data-theme="solarized-light"] .tab-dropdown-menu { background: #fdf6e3 !important; }
body[data-theme="paper-folder"] .tab-dropdown-menu { background: #f5eed8 !important; }

/* Checked Global Tsunami source: neutral white ring with an unmistakable black dot. */
.global-source-radio input[type="radio"]:checked + span::before {
  border-color: #222 !important;
  background: radial-gradient(circle, #050505 0 34%, #fff 39% 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 0 0 1px rgba(0,0,0,.08) !important;
}

/* v1.19.7 New Run visual reset and tighter Global Tsunami section spacing ---- */
/* Keep cached Last Run image src/decoded pixels resident, but make New Run
   genuinely blank on screen. The hidden attribute must win over image rules. */
#globalResultImage[hidden],
#globalResultImageNext[hidden] {
  display: none !important;
}

/* The two dividers immediately before Initial Wave Source and Simulation &
   Output created too much vertical breathing room in the compact 1/3 column. */
.global-tsunami-setup-body > .section-divider {
  margin-top: 6px;
  margin-bottom: 6px;
}

/* v1.19.12 mobile-only Global Tsunami ergonomics ----------------------------- */
@media (max-width: 680px) {
  /* Keep New Run / Last Run anchored left on phones; Default stays pinned right. */
  .global-run-mode-dock {
    justify-content: flex-start;
    padding-right: 78px;
    box-sizing: border-box;
  }
  .global-run-mode-dock .run-mode-control {
    flex: 0 1 auto;
    width: min(252px, calc(100% - 4px));
    max-width: 252px;
    margin-inline: 0;
  }
  .global-run-mode-dock > .run-default-btn {
    right: 0;
  }

  /* Queue heading gets its own row; submit/start metrics use the full width below it. */
  .global-results-command-strip .global-queue-bar {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    grid-template-areas:
      "lamp title"
      ". metrics";
    column-gap: 8px;
    row-gap: 4px;
    align-items: start;
    padding: 8px 10px;
  }
  .global-results-command-strip .global-queue-bar > .status-dot {
    grid-area: lamp;
    margin-top: .35em;
  }
  .global-results-command-strip .global-queue-bar > strong {
    grid-area: title;
    white-space: normal;
    line-height: 1.2;
  }
  #globalQueueText {
    grid-area: metrics;
    display: block;
    width: 100%;
    min-width: 0;
    line-height: 1.35;
  }

  /* Fit every result playback control on one phone row. The preload/status pill
     remains on the dedicated row below through the existing absolute positioning. */
  .frame-toolbar {
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 3px;
    width: calc(100% + 12px);
    margin-left: -6px;
    margin-right: -6px;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 30px;
  }
  .frame-toolbar > .icon-btn {
    width: 30px;
    min-width: 30px;
    height: 32px;
    min-height: 32px;
  }
  .frame-toolbar .lucide-media-icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }
  .frame-toolbar > .playback-cluster {
    width: 88px;
    min-width: 88px;
    height: 32px;
    min-height: 32px;
  }
  .frame-toolbar .playback-cluster .play-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
  }
  .frame-toolbar .playback-cluster .compact-suffix {
    width: 58px;
    min-width: 58px;
    height: 30px;
    min-height: 30px;
    grid-template-columns: 38px 20px;
  }
  .frame-toolbar .playback-cluster .compact-suffix input {
    width: 38px;
    min-width: 38px;
    height: 30px;
    min-height: 30px;
    padding: 0 1px;
    font-size: .78rem;
  }
  .frame-toolbar .playback-cluster .compact-suffix span {
    height: 30px;
    font-size: .76rem;
  }
  .frame-toolbar > .compact-frame-number {
    width: 62px;
    min-width: 62px;
    height: 32px;
    min-height: 32px;
    grid-template-columns: 26px 36px;
  }
  .frame-toolbar .compact-frame-number input {
    width: 26px;
    min-width: 26px;
    height: 30px;
    min-height: 30px;
    padding: 0 1px;
    font-size: .78rem;
  }
  .frame-toolbar .compact-frame-number span {
    height: 30px;
    font-size: .76rem;
  }

  /* Global Tsunami uses a standalone interval field instead of playback-cluster. */
  .global-frame-toolbar > .suffix-input.compact-suffix {
    width: 58px;
    min-width: 58px;
    height: 32px;
    min-height: 32px;
    grid-template-columns: 38px 20px;
  }
  .global-frame-toolbar > .suffix-input.compact-suffix input {
    width: 38px;
    min-width: 38px;
    height: 30px;
    min-height: 30px;
    padding: 0 1px;
    font-size: .78rem;
  }
  .global-frame-toolbar > .suffix-input.compact-suffix span {
    height: 30px;
    padding-right: 2px;
    font-size: .76rem;
  }
}

/* v1.19.12 run timing, live queue emphasis, and prepared-source metadata ------- */
/* The GPU queue is a live server/workstation surface: make it visibly different
   from ordinary parameter panels with a light recessed instrument treatment. */
.global-results-command-strip .global-queue-bar {
  background: #d9dcda !important;
  color: #1d2528 !important;
  border: 1px solid #8b9290 !important;
  box-shadow:
    inset 3px 3px 5px rgba(0,0,0,.42),
    inset -1px -1px 2px rgba(255,255,255,.78),
    0 1px 0 rgba(255,255,255,.42) !important;
}
.global-results-command-strip .global-queue-bar strong { color: #172126; }
.global-results-command-strip .global-queue-bar .global-queue-number {
  color: #0b8f40 !important;
  text-shadow: 0 0 5px rgba(65,255,126,.28);
}

/* DSEG7 Classic run clock shared by every local model and Global Tsunami.
   The deployment script exposes the already-installed server font as a webfont. */
@font-face {
  font-family: "DSEG7 Classic";
  src: url("fonts/DSEG7Classic-Regular.ttf?v=1.19.42") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
.run-stopwatch {
  flex: 0 0 auto;
  min-width: 108px;
  height: 38px;
  min-height: 38px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #171b19;
  border-radius: 5px;
  background: #343a37;
  color: #8cff69;
  box-sizing: border-box;
  box-shadow:
    inset 2px 2px 4px rgba(0,0,0,.74),
    inset -1px -1px 2px rgba(255,255,255,.09),
    0 1px 2px rgba(0,0,0,.22);
  font-family: "DSEG7 Classic", "DSEG7Classic-Regular", monospace;
  font-size: 22px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: .7px;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}
.run-stopwatch.running {
  color: #a1ff75;
  text-shadow: 0 0 4px rgba(120,255,92,.34);
  box-shadow:
    inset 2px 2px 4px rgba(0,0,0,.78),
    inset -1px -1px 2px rgba(255,255,255,.09),
    0 0 7px rgba(97,255,76,.22);
}
.live-run-actions .run-stopwatch { align-self: center; }
.global-start-row .run-stopwatch { height: 38px; min-height: 38px; min-width: 108px; }

/* Prepared earthquake sources use these same four compact fields, but the last
   two fields become read-only Maximum/Minimum values from the source header. */
.global-gaussian-fields input:disabled {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 680px) {
  .run-stopwatch {
    min-width: 102px;
    height: 38px;
    min-height: 38px;
    padding-inline: 6px;
    font-size: 20px;
    letter-spacing: .4px;
  }
  .global-results-command-strip .global-queue-bar {
    box-shadow:
      inset 3px 3px 4px rgba(0,0,0,.40),
      inset -1px -1px 2px rgba(255,255,255,.76) !important;
  }
}


/* v1.19.23 measured Global header and horizontally scrollable tab strip ------------ */
/* JavaScript measures the badge's real max-content width and updates this custom
   property after status/font/viewport changes. The description stays in the exact
   adjacent grid track, so its right edge always ends before the badge's live left edge. */
.global-setup-header {
  --global-worker-badge-width: 148px;
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--global-worker-badge-width) !important;
  column-gap: 12px !important;
  align-items: start !important;
  min-height: 0;
  padding: 10px 16px 7px !important;
}
.global-setup-header > .global-setup-copy {
  display: block !important;
  grid-column: 1;
  grid-row: 1;
  width: 100% !important;
  min-inline-size: 0 !important;
  max-inline-size: none !important;
  min-width: 0 !important;
  max-width: none !important;
}
.global-setup-heading {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
}
.global-setup-heading .section-kicker,
.global-setup-heading h2 { white-space: nowrap !important; }
.global-setup-description {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-bottom: 0 !important;
}
.global-worker-badge {
  position: static !important;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  width: var(--global-worker-badge-width) !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box;
  margin: 0 !important;
}
.global-worker-badge .global-worker-line {
  width: max-content;
  max-width: 100%;
}
.global-setup-heading .section-kicker,
.global-setup-heading h2 {
  width: 100% !important;
  max-width: none !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}
.global-setup-description {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

/* Clicking any configuration field while Global Last Run is locked points the
   user back to its dedicated New Run / Last Run selector. */
.global-run-mode-dock.run-mode-attention {
  position: relative;
  z-index: 12;
  border-radius: 13px;
  animation: run-mode-guide-flash .9s ease-in-out 2;
}
.global-run-mode-dock.run-mode-attention .run-mode-control {
  border-color: #ffe04f !important;
}
.global-tsunami-setup-body.global-last-run-locked :is(
  .global-fixed-grid .field,
  .global-source-radios,
  .global-gaussian-fields .field,
  .global-schedule-grid .field,
  .global-output-summary .field
) {
  cursor: pointer;
}
.global-tsunami-setup-body.global-last-run-locked :is(input, select):disabled,
.global-tsunami-setup-body.global-last-run-locked .global-fixed-grid input[readonly] {
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .global-run-mode-dock.run-mode-attention {
    animation: none;
    outline: 3px solid #ffe04f;
    box-shadow: 0 0 14px rgba(255,210,36,.65);
  }
}

.recent-experiment-stack {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

/* v1.19.15 in-page expanded comparison -------------------------------------- */
.comparison-card > .card-header { position: relative; padding-right: 118px; }
.compare-expand-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  min-width: 94px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.compare-expand-glyph {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 2px;
  box-shadow: inset 0 0 0 3px transparent;
}
.comparison-card.compare-expanded .compare-expand-glyph {
  transform: scale(.72);
  box-shadow: 5px -5px 0 -3px currentColor;
}
.compare-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8800;
  background: rgba(5, 8, 10, .56);
  -webkit-backdrop-filter: blur(6px) saturate(.82);
  backdrop-filter: blur(6px) saturate(.82);
}
.compare-backdrop[hidden] { display: none !important; }
body.compare-overlay-open { overflow: hidden; }
.comparison-card.compare-expanded {
  position: fixed;
  inset: 2.5vh 2.5vw;
  z-index: 8801;
  width: auto;
  height: 95vh;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.68), 0 0 0 1px rgba(255,255,255,.16);
}
.comparison-card.compare-expanded > .card-header {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: flex-start;
}
.comparison-card.compare-expanded > .card-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.comparison-card.compare-expanded .compare-controls { flex: 0 0 auto; }
.comparison-card.compare-expanded .compare-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.comparison-card.compare-expanded .compare-stage img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}
@media (max-width: 680px) {
  .comparison-card.compare-expanded { inset: 8px; height: calc(100dvh - 16px); }
  .comparison-card > .card-header { padding-right: 104px; }
  .compare-expand-btn { right: 9px; min-width: 84px; padding-inline: 8px; }
}

/* Keep the Global setup and Initial Wave cards side by side at about 1152 CSS px,
   which is the effective width of a 1440 px Windows display at 125% scaling.
   Stack the two cards only when the viewport reaches 1080 CSS px or less. */
@media (max-width: 1080px) {
  .global-tsunami-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Keep the tab strip contained and horizontally scrollable independently of the
   narrower Global workspace stacking breakpoint above. */
@media (max-width: 1200px) {
  /* v1.19.4 temporarily changed .tabs to overflow:visible for More Models, which
     disabled the original horizontal tab scrolling and let the strip widen the
     whole page. Restore a contained, touch-scrollable strip. */
  html, body { max-width: 100%; overflow-x: hidden; }
  .page-shell { max-width: 100%; }
  .tabs {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
  }
  .tabs > .tab-btn,
  .tabs > .tab-dropdown { flex: 0 0 auto; }

  /* The menu is fixed to the viewport while the strip itself scrolls, so the
     More Models popover is not clipped by the tab strip's overflow container. */
  .tabs .tab-dropdown-menu {
    position: fixed !important;
    right: auto !important;
    z-index: 5000 !important;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: none !important;
  }
  .tabs .tab-dropdown.mobile-open .tab-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

@media (max-width: 680px) {
  .global-setup-header {
    column-gap: 10px !important;
    padding: 10px 12px 7px !important;
  }
  .global-worker-badge {
    padding-inline: 7px;
    font-size: .72rem;
  }
}

@media (max-width: 420px) {
  .global-setup-header {
    column-gap: 8px !important;
  }
  .global-setup-heading h2 { font-size: .84rem; letter-spacing: -.025em; }
  .global-worker-badge {
    font-size: .67rem;
  }
}

/* v1.19.13 Meteotsunami dual mechanical Compute Engine selector -------------- */
.meteo-compute-engine {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0 0 5px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, #111 22%);
  border-radius: 9px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 91%, #fff 9%), color-mix(in srgb, var(--panel) 88%, #000 12%));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 5px rgba(0,0,0,.20);
}
.meteo-compute-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 3px; }
.meteo-compute-heading h3 { margin: 0; font-size: .92rem; letter-spacing: .035em; }
.meteo-compute-lock { color: var(--muted); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.meteo-compute-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; min-width: 0; }
.meteo-compute-tile {
  position: relative;
  min-width: 0;
  min-height: 46px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #f3f6f5;
  border: 1px solid #252a2c;
  border-radius: 8px;
  background: linear-gradient(180deg, #72797a 0%, #4d5456 48%, #343a3c 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), inset 0 -1px 0 rgba(0,0,0,.55), 0 4px 0 #202527, 0 6px 9px rgba(0,0,0,.32);
  text-align: left;
  transform: translateY(0);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease, border-color .12s ease;
  overflow: hidden;
}
.meteo-compute-tile:not(:disabled):hover { filter: brightness(1.08); }
.meteo-compute-tile:not(:disabled):active,
.meteo-compute-tile.selected {
  transform: translateY(2px);
  border-color: #171c1d;
  box-shadow: inset 3px 4px 7px rgba(0,0,0,.60), inset -1px -1px 2px rgba(255,255,255,.16), 0 1px 0 #202527, 0 2px 5px rgba(0,0,0,.24);
}
.meteo-compute-tile.gpu.selected { background: linear-gradient(180deg, #3e5c58, #29443f 52%, #243532); box-shadow: inset 3px 4px 7px rgba(0,0,0,.62), inset 0 0 0 1px rgba(60,255,176,.20), 0 1px 0 #18211f; }
.meteo-compute-tile.cpu.selected { background: linear-gradient(180deg, #465a68, #324956 52%, #2a3941); box-shadow: inset 3px 4px 7px rgba(0,0,0,.62), inset 0 0 0 1px rgba(130,210,255,.20), 0 1px 0 #182027; }
.meteo-engine-lamp { flex: 0 0 10px; width: 10px; height: 10px; border: 1px solid #111; border-radius: 50%; background: #596062; box-shadow: inset 1px 1px 2px rgba(0,0,0,.75); }
.meteo-compute-tile.gpu.selected .meteo-engine-lamp { background: #54ff91; box-shadow: 0 0 9px rgba(84,255,145,.92), inset 0 0 2px #fff; }
.meteo-compute-tile.cpu.selected .meteo-engine-lamp { background: #b8e9ff; box-shadow: 0 0 9px rgba(113,205,255,.85), inset 0 0 2px #fff; }
.meteo-engine-copy { min-width: 0; display: grid; gap: 2px; line-height: 1.02; }
.meteo-engine-copy strong { font-size: .82rem; letter-spacing: .045em; white-space: nowrap; }
.meteo-engine-copy small { color: rgba(245,248,247,.78); font-size: .69rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meteo-compute-engine.locked .meteo-compute-tile { cursor: default; }
.meteo-compute-engine.locked .meteo-compute-tile:disabled { opacity: 1; pointer-events: none; }
.meteo-compute-engine.locked .meteo-compute-tile:not(.selected) { filter: brightness(.68) saturate(.55); }
.meteo-compute-engine.locked .meteo-compute-tile.selected { opacity: 1; }
/* Keep the locked, unselected Server CPU label readable in Last Run. This
   overrides light-theme disabled-button text without changing New Run or the
   selected historical backend. */
.meteo-compute-engine.locked .meteo-compute-tile.cpu:not(.selected) {
  filter: brightness(.80) saturate(.55);
}
.meteo-compute-engine.locked .meteo-compute-tile.cpu:not(.selected) .meteo-engine-copy strong {
  color: #f1f3f2 !important;
  -webkit-text-fill-color: #f1f3f2 !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.78), 0 0 1px rgba(255,255,255,.24);
}
.meteo-compute-engine.locked .meteo-compute-tile.cpu:not(.selected) .meteo-engine-copy small {
  color: #e0e3e2 !important;
  -webkit-text-fill-color: #e0e3e2 !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.72), 0 0 1px rgba(255,255,255,.18);
}
.meteo-compute-execution-bar {
  grid-column: 1 / -1;
  min-height: 42px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--panel) 84%, var(--accent) 16%);
  font-size: .84rem;
}
.meteo-compute-execution-bar[hidden] { display: none !important; }
.meteo-compute-execution-bar.remote { background: #d9dcda; color: #1d2528; border-color: #8b9290; box-shadow: inset 3px 3px 5px rgba(0,0,0,.38), inset -1px -1px 2px rgba(255,255,255,.76); }
.meteo-compute-execution-bar strong { white-space: nowrap; }

@media (max-width: 680px) {
  .meteo-compute-engine { padding: 5px; }
  .meteo-compute-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .meteo-compute-tile { min-height: 44px; padding: 4px 5px; gap: 5px; }
  .meteo-engine-copy strong { font-size: clamp(.65rem, 3.2vw, .76rem); letter-spacing: .015em; }
  .meteo-engine-copy small { font-size: clamp(.58rem, 2.7vw, .66rem); }
  .meteo-compute-execution-bar { align-items: flex-start; flex-wrap: wrap; }
  .meteo-compute-execution-bar strong { flex: 1 1 calc(100% - 20px); }
  .meteo-compute-execution-bar > span:last-child { flex: 1 1 100%; padding-left: 18px; }
}

/* v1.19.16 tighter Meteotsunami parameter stack and exact two-line tab label. */
.tab-btn[data-experiment="meteotsunami"] { line-height: 1; }
body.meteotsunami-active #setupConfigShell > .section-divider,
body.meteotsunami-active .setup-config-shell + .section-divider {
  margin-top: 6px;
  margin-bottom: 6px;
}
body.meteotsunami-active #modelParameterZone .model-parameter-content {
  padding: 6px 8px 7px;
}
body.meteotsunami-active #modelParameterZone .model-parameter-title-row {
  margin-bottom: 5px;
}
body.meteotsunami-active #parameterForm { gap: 7px 9px; }

/* v1.19.17 universal run-mode alignment (retained in v1.19.18). */

/* Standard tabs, Meteotsunami, and Sediment Particles share this dock. */
body[data-run-mode-style="slider"] .grid-run-mode-mount,
body[data-run-mode-style="slider"] .model-run-mode-mount {
  justify-content: stretch !important;
}
body[data-run-mode-style="slider"] .run-mode-dock {
  display: flex !important;
  align-items: center;
  justify-content: space-between !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}
body[data-run-mode-style="slider"] .run-mode-dock .run-mode-control {
  flex: 0 1 352px;
  width: min(352px, calc(100% - 78px));
  min-width: 0;
  margin: 0 !important;
}
body[data-run-mode-style="slider"] .run-mode-dock > .run-default-btn {
  flex: 0 0 auto;
  margin-left: auto;
}

/* Global Tsunami uses the same left/right rule without disturbing its title row. */
.global-run-mode-dock {
  justify-content: flex-start !important;
  padding-right: 78px;
  box-sizing: border-box;
}
.global-run-mode-dock .run-mode-control {
  flex: 0 1 252px !important;
  width: min(252px, calc(100% - 4px)) !important;
  max-width: 252px !important;
  margin-inline: 0 !important;
}
.global-run-mode-dock > .run-default-btn { right: 0; }

/* Sediment Transport owns a separate control; give it a full row with a spacer. */
.sediment-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
#sedimentRunModeControl {
  width: 100%;
  grid-template-columns: auto 70px auto minmax(0, 1fr) auto !important;
  box-sizing: border-box;
}
#sedimentRunModeControl .sediment-default-btn {
  grid-column: 5;
  margin-left: 0;
}

/* v1.19.32 mobile interaction and compact standard-model geometry. --------- */
@media (max-width: 760px) {
  /* The generic mobile card rule stacks every header vertically. Standard
     experiment badges instead keep a bounded upper-right column. Meteotsunami
     retains its dedicated header geometry. */
  body:not(.meteotsunami-active) .workspace .setup-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(118px, 42%) !important;
    column-gap: 10px;
    align-items: start !important;
  }
  body:not(.meteotsunami-active) .workspace .setup-header > :first-child {
    min-width: 0;
    grid-column: 1;
  }
  body:not(.meteotsunami-active) .workspace .setup-header .setup-header-tools {
    grid-column: 2;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    justify-items: end !important;
    align-self: start;
  }
  body:not(.meteotsunami-active) .workspace .setup-header .model-info-stack {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-items: end !important;
  }
  body:not(.meteotsunami-active) .workspace .setup-header .model-badge {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }
  body:not(.meteotsunami-active) .workspace .setup-header .model-info-trigger {
    max-width: 100%;
    justify-self: end;
  }
}

/* v1.19.34 exact Sediment Transport run-mode structure on every tab. -------- */

/* The run-mode mount always consumes the complete first row. Domain & Grid,
   Model Parameters, and their right-side tools begin on the following row. */
body[data-run-mode-style="slider"] .grid-run-mode-mount,
body[data-run-mode-style="slider"] .model-run-mode-mount {
  order: -1 !important;
  flex: 0 0 100% !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  display: block !important;
  margin: 0 0 7px !important;
}
body[data-run-mode-style="slider"] .grid-run-mode-mount:empty,
body[data-run-mode-style="slider"] .model-run-mode-mount:empty {
  display: none !important;
}

/* Match Sediment Transport's complete outer capsule, including its recessed
   background and full-row separation. */
body[data-run-mode-style="slider"] .run-mode-dock,
.global-run-mode-dock,
#sedimentRunModeControl {
  display: grid !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 33px !important;
  margin: 0 !important;
  padding: 3px 5px !important;
  border: 1px solid color-mix(in srgb, var(--line-strong) 92%, transparent) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--bg-deep) 38%, transparent) !important;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 8%, transparent) !important;
  box-sizing: border-box !important;
}
body[data-run-mode-style="slider"] .run-mode-dock,
.global-run-mode-dock {
  grid-template-columns: max-content minmax(0, 1fr) auto !important;
  gap: 7px !important;
}
.global-run-mode-dock {
  grid-area: run !important;
  grid-column: 1 / -1 !important;
  margin-bottom: 7px !important;
}

/* The visible thumb is exactly centered inside the 70 x 16 px track. Using
   border-box geometry makes the top/bottom and end clearances symmetric. */
.sediment-mode-track,
body[data-run-mode-style="slider"] .sediment-style-run-mode-control .run-mode-slider-shell {
  width: 70px !important;
  height: 16px !important;
  min-width: 70px !important;
  box-sizing: border-box !important;
}
.sediment-mode-thumb,
body[data-run-mode-style="slider"] .sediment-style-run-mode-control .run-mode-slider-thumb {
  top: 50% !important;
  left: 2px !important;
  width: 30px !important;
  height: 10px !important;
  box-sizing: border-box !important;
  transform: translateY(-50%) !important;
}
.sediment-run-mode-control.last-selected .sediment-mode-thumb,
body[data-run-mode-style="slider"] .sediment-style-run-mode-control.last-selected .run-mode-slider-thumb {
  left: 36px !important;
}
body[data-run-mode-style="slider"] .sediment-style-run-mode-control:active .run-mode-slider-thumb {
  transform: translateY(-50%) !important;
}

/* Default uses the same fully rounded capsule silhouette on every tab. */
.run-default-btn,
#sedimentRunModeControl .sediment-default-btn,
body[data-run-mode-style="slider"] .run-mode-dock > .run-default-btn,
.global-run-mode-dock > .run-default-btn {
  border-radius: 999px !important;
}

/* v1.19.35 keeps the Domain & Grid heading and its grid badge together. ----- */
.domain-grid-title-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  grid-template-areas:
    "run run"
    "title tools" !important;
  align-items: center !important;
  column-gap: 10px !important;
  row-gap: 7px !important;
}
.domain-grid-title-row > .grid-run-mode-mount,
.domain-grid-title-row > .global-run-mode-dock {
  grid-area: run !important;
}
.domain-grid-title-row > h3 {
  grid-area: title !important;
  min-width: 0 !important;
  margin: 0 !important;
  white-space: nowrap !important;
}
.domain-grid-title-row > .domain-grid-title-tools {
  grid-area: tools !important;
  width: auto !important;
  min-width: 0 !important;
  justify-self: end !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
}
.domain-grid-title-row > .domain-grid-title-tools .pill {
  white-space: nowrap !important;
}

@media (max-width: 420px) {
  .domain-grid-title-row {
    column-gap: 6px !important;
  }
  .domain-grid-title-row > h3 {
    font-size: clamp(.76rem, 4vw, .86rem) !important;
  }
  .domain-grid-title-row > .domain-grid-title-tools .pill {
    padding-inline: 6px !important;
    font-size: .56rem !important;
  }
}

@media (max-width: 620px) {
  body[data-run-mode-style="slider"] .grid-run-mode-mount,
  body[data-run-mode-style="slider"] .model-run-mode-mount {
    width: 100% !important;
    max-width: none !important;
  }
  body[data-run-mode-style="slider"] .run-mode-dock,
  .global-run-mode-dock,
  #sedimentRunModeControl {
    width: 100% !important;
    max-width: none !important;
  }
}

@media (max-width: 680px) {
  /* Standard tabs keep the original compact mechanical selector on phones.
     Default remains independently pinned to the right. */
  body:not(.meteotsunami-active)[data-run-mode-style="slider"] .run-mode-dock {
    justify-content: flex-start !important;
    gap: 7px;
  }
  body:not(.meteotsunami-active)[data-run-mode-style="slider"] .run-mode-dock .run-mode-control {
    flex: 0 1 252px !important;
    width: min(252px, calc(100% - 78px)) !important;
    max-width: 252px !important;
  }
  body:not(.meteotsunami-active)[data-run-mode-style="slider"] .run-mode-dock > .run-default-btn {
    margin-left: auto !important;
  }
}

/* v1.19.33 universal Sediment-style run controls and badge geometry. -------- */

/* Every model header now uses Global's persistent upper-right badge rule.
   fit-content(40%) keeps the badge intrinsic where possible while enforcing
   the strict two-fifths panel-width ceiling at every viewport size. */
.workspace .setup-header,
.sediment-header {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) fit-content(40%) !important;
  column-gap: 12px !important;
  align-items: start !important;
}
.workspace .setup-header > :first-child,
.sediment-header > :first-child {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  padding-right: 0 !important;
}
body .workspace .setup-header .setup-header-tools,
.sediment-header .sediment-model-info-stack {
  position: static !important;
  inset: auto !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: start !important;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
body .workspace .setup-header .model-info-stack,
.sediment-header .sediment-model-info-stack {
  width: fit-content !important;
  min-width: 0 !important;
  max-width: 100% !important;
  justify-items: end !important;
}
body .workspace .setup-header .model-badge,
.sediment-header .model-badge {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-wrap: anywhere;
}
body .workspace .setup-header .model-info-trigger,
.sediment-header .model-info-trigger {
  max-width: 100%;
  justify-self: end;
}

/* Global retains live intrinsic measurement, but its JavaScript and this
   first-paint grid both cap the complete badge stack at 40% of the header. */
.global-setup-header {
  grid-template-columns: minmax(0, 1fr) min(var(--global-worker-badge-width), 40%) !important;
}
.global-model-info-stack {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  width: var(--global-worker-badge-width);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  justify-items: end;
}
.global-model-info-stack .global-worker-badge {
  position: static !important;
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
.global-model-info-stack .model-info-trigger {
  max-width: 100%;
  justify-self: end;
}

/* Generic, Meteotsunami, Sediment Particles, and Global controls now reproduce
   Sediment Transport's compact labels, 70 px recessed track, 30 px thumb, and
   compact Default button without changing their independent state handlers. */
body[data-run-mode-style="slider"] .sediment-style-run-mode-control {
  display: grid !important;
  grid-template-columns: auto 70px auto !important;
  align-items: center !important;
  gap: 5px !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 25px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  font-size: .67rem !important;
}
body[data-run-mode-style="slider"] .sediment-style-run-mode-control .run-mode-label {
  display: inline-grid;
  place-items: center;
  min-height: 25px;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .67rem !important;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}
body[data-run-mode-style="slider"] .sediment-style-run-mode-control .run-mode-label:hover,
body[data-run-mode-style="slider"] .sediment-style-run-mode-control .run-mode-label:focus-visible {
  border-color: color-mix(in srgb, var(--line-strong) 58%, transparent);
  background: color-mix(in srgb, var(--text) 7%, transparent);
  color: var(--text);
  outline: none;
}
body[data-run-mode-style="slider"] .sediment-style-run-mode-control .run-mode-label.active {
  color: var(--orange) !important;
  text-shadow: 0 0 7px color-mix(in srgb, var(--orange) 45%, transparent) !important;
}
body[data-run-mode-style="slider"] .sediment-style-run-mode-control .run-mode-label.unavailable {
  opacity: .42;
}
body[data-run-mode-style="slider"] .sediment-style-run-mode-control .run-mode-slider-shell {
  position: relative;
  display: block;
  width: 70px !important;
  min-width: 70px !important;
  height: 16px !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 999px !important;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg-deep) 82%, #000 18%) !important;
  box-shadow: inset 0 2px 4px color-mix(in srgb, #000 55%, transparent) !important;
}
body[data-run-mode-style="slider"] .sediment-style-run-mode-control .run-mode-slider-thumb {
  top: 2px !important;
  left: 2px !important;
  width: 30px !important;
  height: 10px !important;
  border: 1px solid color-mix(in srgb, var(--text) 55%, transparent) !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--text) 72%, var(--bg)), color-mix(in srgb, var(--text) 28%, var(--bg))) !important;
  box-shadow: none !important;
  transition: left .5s ease, filter .12s ease !important;
}
body[data-run-mode-style="slider"] .sediment-style-run-mode-control.last-selected .run-mode-slider-thumb {
  left: 36px !important;
}

body[data-run-mode-style="slider"] .run-mode-dock,
.global-run-mode-dock {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 7px !important;
  width: min(100%, 252px) !important;
  min-width: 0 !important;
  max-width: 252px !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}
body[data-run-mode-style="slider"] .run-mode-dock .sediment-style-run-mode-control,
.global-run-mode-dock .sediment-style-run-mode-control {
  grid-column: 1;
  flex: none !important;
  width: max-content !important;
  max-width: none !important;
  margin: 0 !important;
}
body[data-run-mode-style="slider"] .run-mode-dock > .run-default-btn,
.global-run-mode-dock > .run-default-btn {
  position: static !important;
  inset: auto !important;
  grid-column: 3;
  justify-self: end;
  min-height: 25px;
  padding: 3px 8px;
  margin: 0 !important;
  font-size: .64rem;
  transform: none !important;
}
body[data-run-mode-style="slider"] .run-mode-dock > .run-default-btn:hover,
body[data-run-mode-style="slider"] .run-mode-dock > .run-default-btn:focus-visible,
.global-run-mode-dock > .run-default-btn:hover,
.global-run-mode-dock > .run-default-btn:focus-visible,
body[data-run-mode-style="slider"] .run-mode-dock > .run-default-btn:active,
.global-run-mode-dock > .run-default-btn:active {
  transform: none !important;
}
.grid-run-mode-mount,
.model-run-mode-mount {
  width: min(100%, 252px) !important;
  min-width: 0 !important;
  max-width: 252px !important;
}
.global-run-mode-dock {
  grid-column: 1 / -1;
  justify-content: stretch !important;
}

@media (max-width: 760px) {
  .workspace .setup-header,
  .sediment-header {
    grid-template-columns: minmax(0, 1fr) fit-content(40%) !important;
    column-gap: 10px !important;
  }
  body .workspace .setup-header .setup-header-tools,
  .sediment-header .sediment-model-info-stack {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: fit-content !important;
    max-width: 100% !important;
    justify-items: end !important;
    margin: 0 !important;
  }
}

/* v1.19.34 authoritative final run-mode geometry. -------------------------- */
body[data-run-mode-style="slider"] .grid-run-mode-mount,
body[data-run-mode-style="slider"] .model-run-mode-mount {
  order: -1 !important;
  flex: 0 0 100% !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  display: block !important;
  margin: 0 0 7px !important;
}
body[data-run-mode-style="slider"] .grid-run-mode-mount:empty,
body[data-run-mode-style="slider"] .model-run-mode-mount:empty {
  display: none !important;
}
body[data-run-mode-style="slider"] .run-mode-dock,
.global-run-mode-dock,
#sedimentRunModeControl {
  display: grid !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 33px !important;
  margin: 0 !important;
  padding: 3px 5px !important;
  border: 1px solid color-mix(in srgb, var(--line-strong) 92%, transparent) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--bg-deep) 38%, transparent) !important;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 8%, transparent) !important;
  box-sizing: border-box !important;
}
body[data-run-mode-style="slider"] .run-mode-dock,
.global-run-mode-dock {
  grid-template-columns: max-content minmax(0, 1fr) auto !important;
  gap: 7px !important;
}
.global-run-mode-dock {
  grid-area: run !important;
  grid-column: 1 / -1 !important;
  margin-bottom: 7px !important;
}
.sediment-mode-track,
body[data-run-mode-style="slider"] .sediment-style-run-mode-control .run-mode-slider-shell {
  width: 70px !important;
  min-width: 70px !important;
  height: 16px !important;
  box-sizing: border-box !important;
}
.sediment-mode-thumb,
body[data-run-mode-style="slider"] .sediment-style-run-mode-control .run-mode-slider-thumb {
  top: 50% !important;
  left: 2px !important;
  width: 30px !important;
  height: 10px !important;
  box-sizing: border-box !important;
  transform: translateY(-50%) !important;
}
.sediment-run-mode-control.last-selected .sediment-mode-thumb,
body[data-run-mode-style="slider"] .sediment-style-run-mode-control.last-selected .run-mode-slider-thumb {
  left: 36px !important;
}
body[data-run-mode-style="slider"] .sediment-style-run-mode-control:active .run-mode-slider-thumb {
  transform: translateY(-50%) !important;
}
.run-default-btn,
#sedimentRunModeControl .sediment-default-btn,
body[data-run-mode-style="slider"] .run-mode-dock > .run-default-btn,
.global-run-mode-dock > .run-default-btn {
  border-radius: 999px !important;
}


/* v1.19.40 persistent tab DOM + isolated task-background child ------------------
   The task pulse is a real child layer. The Global comet owns ::after exclusively.
   renderTabs() no longer recreates buttons, so the comet keeps its continuous 8 s
   orbit while running/completed state classes change independently. */
.tab-btn.tab-task-running,
.tab-btn.tab-task-completed,
.tab-dropdown-item.tab-task-running,
.tab-dropdown-item.tab-task-completed {
  color: #171a12 !important;
  text-shadow: 0 1px rgba(255,255,255,.30);
}
.tab-task-bg {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
}
.tab-btn > :not(.tab-task-bg),
.tab-dropdown-item > :not(.tab-task-bg) {
  position: relative;
  z-index: 1;
}
.tab-btn.tab-task-running > .tab-task-bg,
.tab-dropdown-item.tab-task-running > .tab-task-bg {
  background: #ffd84f;
  box-shadow: inset 0 0 0 1px rgba(92,67,0,.62), inset 0 1px rgba(255,255,255,.76), 0 0 11px rgba(255,211,58,.38);
  animation: fluidlab-tab-running-yellow 1.25s ease-in-out infinite;
}
.tab-btn.tab-task-completed > .tab-task-bg,
.tab-dropdown-item.tab-task-completed > .tab-task-bg {
  background: #72e58d;
  box-shadow: inset 0 0 0 1px rgba(18,88,38,.62), inset 0 1px rgba(255,255,255,.72), 0 0 11px rgba(75,222,111,.42);
  animation: fluidlab-tab-completed-green 1.25s ease-in-out infinite;
}
@keyframes fluidlab-tab-running-yellow {
  0%,100% { opacity: .94; filter: brightness(.96) saturate(.96); }
  50% { opacity: .58; filter: brightness(1.18) saturate(1.10); }
}
@keyframes fluidlab-tab-completed-green {
  0%,100% { opacity: .94; filter: brightness(.94) saturate(.96); }
  50% { opacity: .56; filter: brightness(1.20) saturate(1.08); }
}
/* Global Tsunami comet remains the only animation on ::after. */
.tab-btn[data-experiment="global_tsunami"]::after { z-index: 6; }
@media (prefers-reduced-motion: reduce) {
  .tab-btn.tab-task-running > .tab-task-bg,
  .tab-btn.tab-task-completed > .tab-task-bg,
  .tab-dropdown-item.tab-task-running > .tab-task-bg,
  .tab-dropdown-item.tab-task-completed > .tab-task-bg { animation: none; opacity: .82; filter: none; }
}


/* v1.19.40 second live backend line in the hero server card. */
.remote-gpu-header-line { margin-top: 1px; margin-bottom: 3px; }
.remote-gpu-header-line strong { white-space: nowrap; }
@media (max-width: 520px) { .remote-gpu-header-line strong { white-space: normal; } }


/* v1.19.40 compact YES/NO regrid selector + explicit task hover guidance. */
.tab-btn.tab-task-running[data-tooltip],
.tab-btn.tab-task-completed[data-tooltip],
.tab-dropdown-item.tab-task-running[data-tooltip],
.tab-dropdown-item.tab-task-completed[data-tooltip] { cursor: help; }


/* v1.19.42 unified Last Run interaction guidance --------------------------- */
.run-mode-guide-bubble {
  z-index: 10140;
  max-width: min(360px, calc(100vw - 24px));
  border-color: rgba(255,224,79,.82);
  background: linear-gradient(180deg, rgba(43,39,14,.98), rgba(20,19,12,.98));
  color: #fff4a8;
  box-shadow: 0 10px 28px rgba(0,0,0,.44), 0 0 0 1px rgba(255,224,79,.16), 0 0 18px rgba(255,210,36,.28);
  font-weight: 850;
}

/* Flash only the New Run / Last Run selector itself; Default is not part of the cue. */
.run-mode-dock.run-mode-attention,
.global-run-mode-dock.run-mode-attention { animation: none !important; box-shadow: none !important; }
.run-mode-dock.run-mode-attention .run-mode-control,
.global-run-mode-dock.run-mode-attention .run-mode-control,
#sedimentRunModeControl.run-mode-attention {
  position: relative;
  z-index: 13;
  border-color: #ffe04f !important;
  animation: run-mode-guide-flash .9s ease-in-out 2;
}

/* Native disabled selects do not dispatch useful click events. Let the locked field
   wrapper receive the pointer so every tab can route the interaction to New Run. */
.sediment-base-field.is-locked .sediment-control-shell > :is(input, select),
.global-tsunami-setup-body.global-last-run-locked :is(
  .global-source-radios input:disabled,
  .global-gaussian-fields input:disabled,
  .global-schedule-grid :is(input, select):disabled,
  .global-output-summary :is(input, select):disabled
) { pointer-events: none !important; }

[data-last-run-guide="true"].last-run-action-disabled {
  opacity: .38;
  filter: grayscale(.28);
  cursor: pointer !important;
}
[data-last-run-guide="true"].last-run-action-disabled:hover {
  opacity: .5;
  box-shadow: 0 0 0 1px rgba(255,224,79,.26);
}

@media (prefers-reduced-motion: reduce) {
  .run-mode-dock.run-mode-attention .run-mode-control,
  .global-run-mode-dock.run-mode-attention .run-mode-control,
  #sedimentRunModeControl.run-mode-attention {
    animation: none !important;
    outline: 3px solid #ffe04f;
    box-shadow: 0 0 14px rgba(255,210,36,.65) !important;
  }
}

/* v1.19.42 bottom-edge run-mode pod, reset placement, and scoped Last Run lock treatment */
.legacy-run-mode-control { display: none !important; }

/* Reset belongs to the setup header, not to the persistent run-mode pod. */
.reset-default-btn {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 112px;
  max-width: none !important;
  padding-inline: 12px !important;
  white-space: nowrap;
  border-radius: 999px !important;
}
.model-parameter-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
#modelRunModeMount {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.global-domain-title-row .domain-grid-title-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.sediment-section-heading > .reset-default-btn { margin-left: auto; }

/* New / Last Run style system — Cheng is the default/current style. */
/* v1.19.57: Cheng uses transient scroll reveal normally. Clicking a locked Last Run
   element latches the dock fully raised with persistent yellow attention until the
   user's next scroll event clears that latch and restores normal idle behavior. */
body[data-new-last-run-style="cheng"] .edge-run-mode-pod {
  --cheng-platform-width: 500px;
  --cheng-platform-height: 46px;
  --cheng-conceal-y: 11px;
  --cheng-metal-top: color-mix(in srgb, var(--metal-1) 57%, var(--bg-deep) 43%);
  --cheng-metal-bottom: color-mix(in srgb, var(--metal-3) 78%, var(--bg-deep) 22%);
  --cheng-line: color-mix(in srgb, var(--text) 31%, transparent);
  position: fixed;
  z-index: 1200;
  left: 0;
  right: 0;
  bottom: env(safe-area-inset-bottom, 0px);
  width: auto;
  height: var(--cheng-platform-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--cheng-platform-width) minmax(0, 1fr);
  align-items: end;
  transform: translateY(var(--cheng-conceal-y));
  transition: transform .34s cubic-bezier(.2,.72,.2,1);
  pointer-events: none;
  overflow: visible;
}
body[data-new-last-run-style="cheng"] .edge-run-mode-pod.is-revealed,
body[data-new-last-run-style="cheng"] .edge-run-mode-pod.is-hover-revealed,
body[data-new-last-run-style="cheng"] .edge-run-mode-pod.is-interaction-revealed,
body[data-new-last-run-style="cheng"] .edge-run-mode-pod.is-locked-attention-latched {
  transform: translateY(0);
}
body[data-new-last-run-style="cheng"] .cheng-run-mode-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
body[data-new-last-run-style="cheng"] .cheng-run-mode-platform {
  grid-column: 2;
  position: relative;
  width: var(--cheng-platform-width);
  height: var(--cheng-platform-height);
  align-self: end;
  filter: drop-shadow(0 -3px 8px rgba(0,0,0,.26));
  /* The raised center itself is the hover-reveal hit area. The SVG remains
     pointer-transparent and the actual controls keep their existing events. */
  pointer-events: auto;
}
body[data-new-last-run-style="cheng"] .cheng-run-mode-platform-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
body[data-new-last-run-style="cheng"] .cheng-run-mode-platform-svg-mobile { display: none; }
body[data-new-last-run-style="cheng"] .cheng-platform-stop-top { stop-color: var(--cheng-metal-top); }
body[data-new-last-run-style="cheng"] .cheng-platform-stop-bottom { stop-color: var(--cheng-metal-bottom); }
body[data-new-last-run-style="cheng"] .cheng-run-mode-platform-fill {
  fill: url(#chengRunModePlatformGradient);
}
body[data-new-last-run-style="cheng"] .cheng-run-mode-platform-line {
  fill: none;
  stroke: var(--cheng-line);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}
body[data-new-last-run-style="cheng"] .cheng-run-mode-surface {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 344px;
  height: 30px;
  transform: translate(-50%, -50%) translateY(2px);
  display: grid;
  grid-template-columns: minmax(108px, 1fr) 82px minmax(108px, 1fr);
  align-items: center;
  justify-items: center;
  column-gap: 7px;
  padding: 0 4px;
  pointer-events: auto;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body[data-new-last-run-style="cheng"] .edge-run-mode-label {
  height: 30px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #a9ada9;
  box-shadow: none !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.24rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .002em;
  white-space: nowrap;
  cursor: pointer;
  transform: none !important;
  transition: filter .16s ease, color .16s ease;
}
body[data-new-last-run-style="cheng"] .edge-run-mode-label > span {
  display: inline-block;
  color: currentColor;
  filter: url(#chengEngravedText);
  text-shadow: none !important;
  transform: none !important;
  opacity: 1 !important;
}
body[data-new-last-run-style="cheng"] .edge-run-mode-label::before,
body[data-new-last-run-style="cheng"] .edge-run-mode-label::after { content: none !important; }
body[data-new-last-run-style="cheng"] .edge-run-mode-label.active { color: #d5b94e; }
body[data-new-last-run-style="cheng"] .edge-run-mode-label.unavailable:not(.active) { color: #7f8581; opacity: .64; }
body[data-new-last-run-style="cheng"] .edge-run-mode-label:not(:disabled):hover {
  transform: none !important;
  filter: brightness(1.14);
}
body[data-new-last-run-style="cheng"] .edge-run-mode-label:not(:disabled):active {
  transform: none !important;
}
body[data-new-last-run-style="cheng"] .edge-run-mode-track {
  --cheng-outer-track-height: 14px;
  --cheng-inner-track-height: 4px;
  --cheng-thumb-height: 12px;
  position: relative;
  width: 82px;
  height: var(--cheng-outer-track-height);
  justify-self: center;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--text) 30%, var(--bg-deep) 70%) !important;
  border-radius: 999px !important;
  --edge-thumb-width: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), transparent 38%),
    linear-gradient(180deg, color-mix(in srgb, var(--metal-2) 68%, var(--bg-deep) 32%), color-mix(in srgb, var(--metal-3) 74%, var(--bg-deep) 26%)) !important;
  box-shadow:
    inset 0 3px 4px rgba(0,0,0,.58),
    inset 0 -1px 0 rgba(255,255,255,.13),
    0 1px 0 rgba(255,255,255,.08) !important;
  cursor: pointer;
  touch-action: none;
  transform: none !important;
  filter: none !important;
}
body[data-new-last-run-style="cheng"] .edge-run-mode-track::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  height: var(--cheng-inner-track-height);
  box-sizing: border-box;
  transform: translateY(-50%);
  border-radius: 9999px;
  background: linear-gradient(180deg, #111312 0%, #303432 100%);
  box-shadow: inset 0 2px 2px rgba(0,0,0,.76), inset 0 -1px 0 rgba(255,255,255,.06);
}
body[data-new-last-run-style="cheng"] .edge-run-mode-thumb {
  position: absolute;
  top: 50%;
  left: var(--edge-thumb-left, 1px);
  width: var(--edge-thumb-width, 30px);
  height: var(--cheng-thumb-height);
  box-sizing: border-box;
  transform: translateY(-50%);
  border: 1px solid rgba(247,248,244,.88);
  border-radius: 999px;
  background: linear-gradient(180deg, #e9eae6 0%, #c7cac5 46%, #929792 100%);
  box-shadow: inset 0 1px rgba(255,255,255,.74), 0 1px 3px rgba(0,0,0,.48);
  transition: left .38s cubic-bezier(.2,.8,.2,1);
}
body[data-new-last-run-style="cheng"] .edge-run-mode-pod.edge-dragging .edge-run-mode-thumb { transition: none !important; }
body[data-new-last-run-style="cheng"] .edge-run-mode-track:not(:disabled):hover,
body[data-new-last-run-style="cheng"] .edge-run-mode-track:not(:disabled):active {
  transform: none !important;
  filter: none !important;
  box-shadow: inset 0 3px 4px rgba(0,0,0,.58), inset 0 -1px 0 rgba(255,255,255,.13), 0 1px 0 rgba(255,255,255,.08) !important;
}
body[data-new-last-run-style="cheng"] .edge-run-mode-pod.run-mode-attention .cheng-run-mode-platform-line {
  animation: chengRunModeAttention 1.8s ease-in-out 1;
}
body[data-new-last-run-style="cheng"] .edge-run-mode-pod.is-locked-attention-latched.run-mode-attention .cheng-run-mode-platform-line {
  animation: chengRunModeAttention 1.8s ease-in-out infinite;
}
@keyframes chengRunModeAttention {
  0%,100% { stroke: var(--cheng-line); filter: none; }
  18%,58% { stroke: #ffd52f; filter: drop-shadow(0 0 4px rgba(255,210,24,.64)); }
  38%,78% { stroke: #fff078; filter: drop-shadow(0 0 7px rgba(255,218,47,.82)); }
}
body { padding-bottom: calc(49px + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 760px) {
  body[data-new-last-run-style="cheng"] .edge-run-mode-pod {
    --cheng-platform-width: min(340px, calc(100vw - 16px));
    --cheng-platform-height: 42px;
    --cheng-conceal-y: 9px;
  }
  body[data-new-last-run-style="cheng"] .cheng-run-mode-platform-svg-desktop { display: none; }
  body[data-new-last-run-style="cheng"] .cheng-run-mode-platform-svg-mobile {
    display: block;
    top: 0;
    right: 0;
    bottom: -1px;
    left: 0;
    height: calc(100% + 1px);
  }
  body[data-new-last-run-style="cheng"] .cheng-run-mode-surface {
    width: min(284px, calc(var(--cheng-platform-width) - 52px));
    height: 28px;
    grid-template-columns: minmax(86px,1fr) 72px minmax(86px,1fr);
    column-gap: 5px;
    transform: translate(-50%, -50%) translateY(2px);
  }
  body[data-new-last-run-style="cheng"] .edge-run-mode-label { font-size: 1.02rem; height: 28px; }
  body[data-new-last-run-style="cheng"] .edge-run-mode-track {
    width: 72px;
    --edge-thumb-width: 27px;
    --cheng-outer-track-height: 12px;
    --cheng-inner-track-height: 4px;
    --cheng-thumb-height: 10px;
  }
}
@media (max-width: 360px) {
  body[data-new-last-run-style="cheng"] .edge-run-mode-pod { --cheng-platform-height: 38px; }
  body[data-new-last-run-style="cheng"] .cheng-run-mode-surface {
    width: calc(var(--cheng-platform-width) - 42px);
    grid-template-columns: minmax(72px,1fr) 62px minmax(72px,1fr);
    column-gap: 3px;
  }
  body[data-new-last-run-style="cheng"] .edge-run-mode-label { font-size: .90rem; }
  body[data-new-last-run-style="cheng"] .edge-run-mode-track {
    width: 62px;
    --edge-thumb-width: 24px;
    --cheng-outer-track-height: 12px;
    --cheng-inner-track-height: 4px;
    --cheng-thumb-height: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body[data-new-last-run-style="cheng"] .edge-run-mode-pod { transition: none; }
  body[data-new-last-run-style="cheng"] .edge-run-mode-thumb { transition: none; }
}

/* Last Run is visually scoped to configuration surfaces only. Results/history/
   Compare/navigation remain at full brightness. */
body.edge-last-run-active:not(.global-last-run-active):not(.sediment-last-run-active) :is(
  #setupConfigShell,
  .initial-preview-card,
  .live-run-actions
) {
  filter: brightness(.80) saturate(.72);
  transition: filter .28s ease, box-shadow .28s ease, opacity .28s ease;
}
body.edge-last-run-active.meteotsunami-active .preview-card {
  filter: brightness(.80) saturate(.72);
  transition: filter .28s ease;
}
body.global-last-run-active :is(
  .global-tsunami-setup-body,
  .global-initial-card,
  .global-start-row
) {
  filter: brightness(.80) saturate(.72);
  transition: filter .28s ease;
}
body.sediment-last-run-active .sediment-setup-region {
  filter: brightness(.80) saturate(.72);
  transition: filter .28s ease;
}
body.edge-last-run-active :is(
  #setupConfigShell,
  .initial-preview-card,
  .live-run-actions,
  .global-tsunami-setup-body,
  .global-initial-card,
  .global-start-row,
  .sediment-setup-region
) {
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.20);
}
/* Reset remains readable/clickable even while its containing setup surface is dimmed. */
body.edge-last-run-active .reset-default-btn { filter: brightness(1.16) saturate(1.05); }

/* v1.19.46 draggable track, centered labels, and
   authoritative reset/legacy-selector handling. -------------------------- */

/* Older high-specificity slider rules could override [hidden] and resurrect the
   obsolete in-panel controls. These IDs/classes are now state hooks only. */
html body #runModeDock.legacy-run-mode-control,
html body .global-run-mode-dock.legacy-run-mode-control,
html body #sedimentRunModeControl.legacy-run-mode-control,
html body #modelRunModeMount.legacy-run-mode-mount,
html body #gridRunModeMount.legacy-run-mode-mount,
body[data-run-mode-style="slider"] #runModeDock.legacy-run-mode-control,
body[data-run-mode-style="slider"] #modelRunModeMount.legacy-run-mode-mount,
body[data-run-mode-style="slider"] #gridRunModeMount.legacy-run-mode-mount {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Reset is a real title-row action, never part of the legacy run-mode mount. */
#modelParameterZone .model-parameter-title-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
}
#modelParameterZone .model-parameter-title-row > .compact-heading {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
}
#modelParameterZone .model-parameter-title-row > #defaultRunBtn {
  flex: 0 0 auto !important;
  margin: 0 0 0 auto !important;
  align-self: center !important;
}
@media (max-width: 460px) {
  #modelParameterZone .model-parameter-title-row { gap: 7px !important; }
  #modelParameterZone .model-parameter-title-row > #defaultRunBtn {
    min-width: 0 !important;
    padding-inline: 8px !important;
    font-size: .64rem !important;
  }
}



/* v1.19.51 model-scoped history, Sediment reset alignment, and restrained
   bottom run-mode hover behavior. ----------------------------------------- */

/* Sediment Transport matches the other setup headers: title and reset stay on
   the same row at every width; the explanatory line occupies row two. */
.sediment-section-heading {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  grid-template-areas:
    "sed-title sed-reset"
    "sed-desc sed-desc" !important;
  align-items: center !important;
  column-gap: 8px !important;
  row-gap: 2px !important;
}
.sediment-section-heading > #sedimentSetupTitle {
  grid-area: sed-title !important;
  min-width: 0 !important;
  margin: 0 !important;
  white-space: nowrap !important;
}
.sediment-section-heading > #sedimentDefaultBtn {
  grid-area: sed-reset !important;
  justify-self: end !important;
  margin: 0 !important;
}
.sediment-section-heading > p {
  grid-area: sed-desc !important;
  margin: 0 !important;
}
.sediment-section-heading > #sedimentRunModeControl {
  display: none !important;
}
@media (max-width: 560px) {
  .sediment-section-heading {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    grid-template-areas:
      "sed-title sed-reset"
      "sed-desc sed-desc" !important;
    align-items: center !important;
  }
  .sediment-section-heading > #sedimentSetupTitle {
    font-size: clamp(.70rem, 3.4vw, .80rem) !important;
  }
}

/* Reset to default uses the same compact capsule footprint as Fixed world4m:
   4px x 8px capsule padding, matching text scale, and no forced minimum width. */
.reset-default-btn {
  min-height: 0 !important;
  min-width: 0 !important;
  width: auto !important;
  padding: 4px 8px !important;
  border-width: 1px !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  font-size: .62rem !important;
  line-height: 1 !important;
}
@media (max-width: 760px) {
  .reset-default-btn {
    min-width: 0 !important;
    padding: 4px 8px !important;
    font-size: .62rem !important;
  }
}

/* The global button hover rule lifts every button by 1px. The bottom run-mode
   control deliberately opts out: labels only brighten; the track does nothing. */
.edge-run-mode-label:not(:disabled):hover {
  transform: none !important;
  filter: brightness(1.12) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.edge-run-mode-label:not(.active):not(.unavailable):hover::before {
  color: #cfd3cf !important;
}
.edge-run-mode-label.active:hover::before {
  color: #d6bf54 !important;
}
.edge-run-mode-track:not(:disabled):hover,
.edge-run-mode-track:not(:disabled):active {
  transform: none !important;
  filter: none !important;
  border-color: rgba(82,84,83,.82) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.66), inset 0 -1px 0 rgba(123,126,122,.55), 0 1px 0 rgba(255,255,255,.32) !important;
}
@media (max-width: 420px) {
  #defaultRunBtn.reset-default-btn,
  #globalDefaultBtn.reset-default-btn,
  #sedimentDefaultBtn.reset-default-btn {
    min-width: 0 !important;
    padding: 4px 6px !important;
    font-size: .56rem !important;
    line-height: 1 !important;
  }
}

/* v1.19.58 Global Last Run lock indicators and concentric Cheng slider. */
.global-tsunami-setup-body.global-last-run-locked .field.locked-field {
  position: relative;
}
.global-tsunami-setup-body.global-last-run-locked .field.locked-field::after {
  color: #b8bab7;
  opacity: .92;
}
.global-tsunami-setup-body.global-last-run-locked .field.locked-field > :is(.input-pair, .global-total-frames-row, .global-inline-output-control) {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}
body[data-new-last-run-style="cheng"] .edge-run-mode-track,
body[data-new-last-run-style="cheng"] .edge-run-mode-track::before,
body[data-new-last-run-style="cheng"] .edge-run-mode-thumb {
  transform-origin: center center;
}


/* v1.19.60 Global Last Run lock placement: schedule/frame locks live inside the numeric boxes. */
.global-inline-lock-marker {
  display: none;
  width: 15px;
  min-width: 15px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: #b8bab7;
  font-size: .76rem;
  line-height: 1;
  filter: grayscale(1);
  pointer-events: none;
  opacity: .94;
}
.global-tsunami-setup-body.global-last-run-locked :is(.global-schedule-grid, .global-output-summary) .field.locked-field::after {
  content: none !important;
  display: none !important;
}
.global-tsunami-setup-body.global-last-run-locked .global-inline-lock-marker {
  display: inline-flex;
}
.global-number-lock-wrap {
  position: relative;
  display: block;
  min-width: 0;
}
.global-number-lock-wrap > input {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}
/* Duration / Interval: the lock is overlaid inside the numeric input's right edge. */
.global-tsunami-setup-body.global-last-run-locked .global-schedule-grid .input-pair.wide-number {
  grid-template-columns: minmax(52px, 68px) minmax(82px, 104px);
  gap: 4px;
  align-items: center;
}
.global-tsunami-setup-body.global-last-run-locked .global-schedule-grid .input-pair.wide-number input {
  padding-left: 7px !important;
  padding-right: 25px !important;
}
.global-tsunami-setup-body.global-last-run-locked .global-schedule-grid .input-pair.wide-number select {
  padding-left: 7px !important;
  padding-right: 20px !important;
}
.global-schedule-lock-marker,
.global-total-frames-lock-marker {
  position: absolute;
  z-index: 3;
  right: 5px;
  top: 50%;
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  line-height: 1;
}
/* Total Output Frames: same inside-right placement within its numeric box. */
.global-total-frames-number-wrap {
  flex: 0 0 88px;
  width: 88px;
  max-width: 88px;
}
.global-tsunami-setup-body.global-last-run-locked .global-total-frames-field .global-total-frames-row input {
  padding-right: 25px !important;
}
/* Output Sampling / Plot Rendering remain outside plotskip / regrid exactly as in v1.19.59. */
.global-output-lock-marker {
  flex: 0 0 15px;
  margin-left: 2px;
}
.global-tsunami-setup-body.global-last-run-locked .global-output-summary .global-inline-output-control input {
  padding-right: 0 !important;
}
.global-tsunami-setup-body.global-last-run-locked .global-output-summary #globalPlotDpi {
  padding: 2px 1px !important;
}
.global-tsunami-setup-body.global-last-run-locked .global-output-summary #globalRegrid {
  padding: 2px 14px 2px 1px !important;
}
@media (max-width: 680px) {
  .global-tsunami-setup-body.global-last-run-locked .global-schedule-grid .input-pair.wide-number {
    grid-template-columns: minmax(60px, 78px) minmax(90px, 112px);
  }
}


/* v1.20.0 MixDNS native FluidLab integration -------------------------------- */
.mixdns-workspace{margin:14px 0;}
.mixdns-card{overflow:visible;}
.mixdns-header{align-items:flex-start;}
.mixdns-body{display:flex;flex-direction:column;gap:14px;}
.mixdns-library-grid{display:grid;grid-template-columns:minmax(180px,1fr) minmax(220px,1.35fr) minmax(120px,.6fr);gap:10px;align-items:end;}
.mixdns-parameter-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
.mixdns-preset-description{margin:8px 0 0;color:var(--muted);font-size:.82rem;line-height:1.45;}
.mixdns-status-readout{min-height:38px;display:flex;align-items:center;padding:0 11px;border:1px solid var(--line);border-radius:7px;background:color-mix(in srgb,var(--bg-deep) 62%,var(--metal-2) 38%);font-weight:800;letter-spacing:.04em;}
.mixdns-status-readout[data-status="validated"]{color:var(--green);}.mixdns-status-readout[data-status="experimental"]{color:#e4bd55;}.mixdns-status-readout[data-status="derived"]{color:#7dc8e8;}
.mixdns-run-row{display:grid;grid-template-columns:auto auto minmax(140px,1fr) minmax(170px,auto);gap:9px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:9px;background:color-mix(in srgb,var(--metal-3) 78%,transparent);}
.mixdns-run-row .progress-shell{margin:0;}.mixdns-run-row .progress-fill{height:100%;background:linear-gradient(90deg,#9d7b24,#e1c45c);border-radius:inherit;transition:width .25s ease;}
.mixdns-diagnostics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
.mixdns-diagnostic{border:1px solid var(--line);border-radius:7px;padding:8px 10px;background:color-mix(in srgb,var(--panel) 82%,var(--bg-deep) 18%);min-width:0;}.mixdns-diagnostic span,.mixdns-diagnostic strong{display:block;overflow:hidden;text-overflow:ellipsis}.mixdns-diagnostic span{font-size:.68rem;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}.mixdns-diagnostic strong{font-size:.9rem;margin-top:3px}.mixdns-diagnostic-failure{grid-column:1/-1;border-color:color-mix(in srgb,var(--red) 60%,var(--line));color:var(--red);}
.mixdns-terminal-toggle{display:flex;align-items:center;gap:4px;padding:2px;border:1px solid var(--line);border-radius:999px;background:var(--bg-deep);}.mixdns-terminal-toggle button{border:0;background:transparent;color:var(--muted);border-radius:999px;padding:5px 10px;font-size:.72rem;}.mixdns-terminal-toggle button.active{background:var(--metal-1);color:var(--text);box-shadow:inset 0 1px rgba(255,255,255,.18);}
.mixdns-terminal{height:245px;margin:8px 0 0;overflow:auto;white-space:pre;tab-size:8;background:#f3f5f7;color:#000;border:1px solid color-mix(in srgb,var(--line) 72%,#b6bec7);border-radius:7px;padding:10px;font:11px/1.45 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;box-shadow:inset 0 1px 4px rgba(0,0,0,.08);}
.mixdns-quicklook-wrap{min-height:160px;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;background:var(--bg-deep);overflow:hidden;color:var(--muted);}.mixdns-quicklook-wrap img{display:block;max-width:100%;max-height:520px;object-fit:contain;}
.mixdns-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px;}.mixdns-gallery-item{display:block;border:1px solid var(--line);border-radius:7px;background:var(--bg-deep);padding:5px;text-decoration:none;color:var(--text);}.mixdns-gallery-item img{display:block;width:100%;max-height:440px;object-fit:contain;background:#050709;border-radius:4px;}.mixdns-gallery-item span{display:block;padding:6px 3px 2px;font-size:.7rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mixdns-web3d-section{border:1px solid var(--line);border-radius:9px;overflow:hidden;background:color-mix(in srgb,var(--panel) 82%,var(--bg-deep) 18%);}.mixdns-web3d-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px;cursor:pointer;background:linear-gradient(180deg,color-mix(in srgb,var(--metal-1) 24%,var(--panel)),color-mix(in srgb,var(--metal-3) 50%,var(--panel)));}.mixdns-web3d-intro>div{min-width:0}.mixdns-web3d-intro strong,.mixdns-web3d-intro span{display:block}.mixdns-web3d-intro span{margin-top:3px;font-size:.75rem;color:var(--muted)}.mixdns-web3d-intro.available{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--green) 30%,transparent);}
.mixdns-web3d-controls{display:grid;grid-template-columns:minmax(160px,1fr) minmax(170px,1fr) auto auto;gap:8px;align-items:end;padding:10px;border-top:1px solid var(--line);}.mixdns-web3d-controls label{font-size:.68rem;color:var(--muted)}.mixdns-web3d-controls select{display:block;width:100%;margin-top:4px;}
.mixdns-vtk-view{height:480px;background:#060a0e;display:grid;place-items:center;color:#8999a3;position:relative}.mixdns-vtk-view>div{width:100%!important;height:100%!important}.mixdns-web3d-traffic{padding:7px 10px;border-top:1px solid var(--line);background:#11191f;color:#adbec8;font:10px/1.5 ui-monospace,monospace;}
.mixdns-recent-jobs{display:grid;gap:6px}.mixdns-job-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;text-align:left;padding:9px 10px;border:1px solid var(--line);border-radius:7px;background:color-mix(in srgb,var(--panel) 85%,var(--metal-2) 15%);color:var(--text);}.mixdns-job-row:hover{filter:brightness(1.06);transform:none}.mixdns-job-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mixdns-job-row span{font-size:.7rem;color:var(--muted);white-space:nowrap;}
#mixdnsWorkerBadge.ready .status-dot{background:var(--green);box-shadow:0 0 8px color-mix(in srgb,var(--green) 70%,transparent)}#mixdnsWorkerBadge.offline .status-dot{background:var(--red)}
.retention-warning-modal .modal-panel{width:min(620px,calc(100vw - 24px));}.retention-warning-row{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line);}.retention-warning-row strong{min-width:0}.retention-warning-row span{font-size:.74rem;color:var(--muted);text-align:right}.retention-warning-modal .subtle-note{font-size:.75rem;color:var(--muted)}
@media(max-width:900px){.mixdns-library-grid,.mixdns-parameter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mixdns-diagnostics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mixdns-run-row{grid-template-columns:auto auto 1fr}.mixdns-run-row #mixdnsRunStatus{grid-column:1/-1}.mixdns-web3d-controls{grid-template-columns:1fr 1fr}.mixdns-gallery{grid-template-columns:1fr}.mixdns-vtk-view{height:400px}}
@media(max-width:520px){.mixdns-library-grid,.mixdns-parameter-grid{grid-template-columns:1fr 1fr}.mixdns-diagnostics-grid{grid-template-columns:1fr 1fr}.mixdns-run-row{grid-template-columns:1fr 1fr}.mixdns-run-row .progress-shell{grid-column:1/-1}.mixdns-web3d-intro{align-items:flex-start;flex-direction:column}.mixdns-web3d-controls{grid-template-columns:1fr}.mixdns-vtk-view{height:340px}.mixdns-job-row{grid-template-columns:1fr}.mixdns-job-row span{white-space:normal}.retention-warning-row{display:block}.retention-warning-row span{display:block;text-align:left;margin-top:3px}}

/* v1.20.3 MixDNS layout restoration + strict tab isolation ------------------ */
/* Standard FluidLab workspaces are descendants of .page-shell, not direct
   children of body. The v1.20.0 direct-child selector therefore never hid
   them. Use the stable section ids while MixDNS owns the active tab. */
body.mixdns-active #standardWorkspace,
body.mixdns-active #standardViewerCard,
body.mixdns-active #standardLowerGrid {
  display: none !important;
}

.mixdns-workspace {
  --mixdns-panel: color-mix(in srgb, var(--metal-3) 76%, var(--bg-deep) 24%);
  --mixdns-panel-soft: color-mix(in srgb, var(--metal-2) 30%, var(--bg-deep) 70%);
  --mixdns-inset: color-mix(in srgb, var(--bg-deep) 84%, var(--metal-2) 16%);
}
.mixdns-setup-workspace {
  display: grid;
  grid-template-columns: minmax(340px, .82fr) minmax(520px, 1.48fr);
  gap: 12px;
  align-items: start;
}
.mixdns-parameters-panel,
.mixdns-initial-condition-panel,
.mixdns-preset-estimate-panel {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--metal-2) 21%, transparent), transparent 48%),
    var(--mixdns-panel);
  box-shadow: inset 0 1px rgba(255,255,255,.045), inset 0 -1px rgba(0,0,0,.38);
}
.mixdns-designer-column { min-width: 0; display: grid; gap: 12px; }
.mixdns-param-group + .mixdns-param-group { margin-top: 11px; }
.mixdns-param-group > h4 {
  margin: 0 0 7px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: .71rem;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.mixdns-parameters-panel .mixdns-parameter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.mixdns-time-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
.mixdns-planned-field { color: var(--muted) !important; cursor: default; }
.mixdns-time-policy-hint,
.mixdns-physics-summary {
  margin-top: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--mixdns-inset);
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.45;
}
.mixdns-physics-summary {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 5px 8px;
}
.mixdns-physics-summary > span {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(255,255,255,.025);
}
.mixdns-physics-summary b { color: var(--text); font-weight: 800; }
.mixdns-domain-note { align-self: flex-start; }

.mixdns-scene-views {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}
.mixdns-view-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--mixdns-inset);
  box-shadow: inset 0 1px rgba(255,255,255,.04);
}
.mixdns-view-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 27px;
  padding: 5px 7px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: linear-gradient(180deg, color-mix(in srgb,var(--metal-2) 48%,var(--bg-deep)), color-mix(in srgb,var(--metal-3) 62%,var(--bg-deep)));
  font-size: .68rem;
  font-weight: 850;
}
.mixdns-view-label span { min-width: 0; color: var(--dim); font-size: .55rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mixdns-view-card canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  touch-action: none;
  cursor: crosshair;
  background: var(--bg-deep);
}
body[data-run-mode="last"] .mixdns-view-card canvas { cursor: not-allowed; }

.mixdns-object-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mixdns-panel-soft);
}
.mixdns-object-toolbar > div:first-child { min-width: 0; }
.mixdns-object-toolbar strong,
.mixdns-object-toolbar span { display: block; }
.mixdns-object-toolbar strong { font-size: .7rem; }
.mixdns-object-toolbar span { margin-top: 2px; color: var(--muted); font-size: .59rem; line-height: 1.35; }
.mixdns-source-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.mixdns-source-actions button,
.mixdns-object-list button,
.mixdns-object-editor button {
  min-height: 29px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  background: linear-gradient(180deg, color-mix(in srgb,var(--metal-1) 28%,var(--bg-deep)), color-mix(in srgb,var(--metal-3) 72%,var(--bg-deep)));
  box-shadow: inset 0 1px rgba(255,255,255,.07), 0 1px 2px rgba(0,0,0,.35);
  font-size: .62rem;
  font-weight: 760;
  cursor: pointer;
}
.mixdns-source-actions button:hover,
.mixdns-object-list button:hover,
.mixdns-object-editor button:hover { filter: brightness(1.09); }
.mixdns-source-actions button:disabled,
.mixdns-object-list button:disabled,
.mixdns-object-editor button:disabled { opacity: .45; cursor: not-allowed; }
.mixdns-object-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 34px;
  margin-top: 7px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--mixdns-inset);
}
.mixdns-object-list button.active {
  border-color: color-mix(in srgb,var(--accent) 70%,var(--line));
  color: var(--text);
  box-shadow: 0 0 0 2px color-mix(in srgb,var(--accent) 12%,transparent), inset 0 1px rgba(255,255,255,.08);
}
.mixdns-object-editor {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 7px;
  align-items: end;
  margin-top: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--mixdns-inset);
}
.mixdns-object-editor .field label { font-size: .6rem; }
.mixdns-object-editor input,
.mixdns-object-editor select { height: 32px; padding: 0 8px; font-size: .66rem; }
.mixdns-object-editor .mixdns-object-editor-actions { display: flex; gap: 5px; align-items: center; }
.mixdns-object-editor .subtle-note { grid-column: 1 / -1; color: var(--muted); font-size: .64rem; }

.mixdns-preset-estimate {
  min-height: 86px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mixdns-inset);
  color: var(--muted);
  font-size: .66rem;
  line-height: 1.45;
}
.mixdns-preset-estimate p { margin: 7px 0 0; }
.mixdns-estimate-metrics {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 6px;
}
.mixdns-estimate-metrics > span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb,var(--metal-2) 22%,var(--bg-deep));
}
.mixdns-estimate-metrics b,
.mixdns-estimate-metrics small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mixdns-estimate-metrics b { color: var(--text); font-size: .75rem; font-variant-numeric: tabular-nums; }
.mixdns-estimate-metrics small { margin-top: 2px; color: var(--dim); font-size: .55rem; text-transform: uppercase; letter-spacing: .035em; }
.mixdns-estimate-metrics .validated b { color: var(--green); }
.mixdns-estimate-metrics .experimental b { color: var(--orange); }
.mixdns-estimate-metrics .derived b { color: var(--accent); }
.mixdns-estimate-good,
.mixdns-estimate-warn,
.mixdns-web3d-estimate { padding: 7px 8px; border-radius: 6px; }
.mixdns-estimate-good { color: var(--green); background: color-mix(in srgb,var(--green) 9%,transparent); border: 1px solid color-mix(in srgb,var(--green) 25%,var(--line)); }
.mixdns-estimate-warn { color: var(--orange); background: color-mix(in srgb,var(--orange) 9%,transparent); border: 1px solid color-mix(in srgb,var(--orange) 25%,var(--line)); }
.mixdns-web3d-estimate { color: var(--text); background: color-mix(in srgb,var(--accent) 7%,transparent); border: 1px solid color-mix(in srgb,var(--accent) 22%,var(--line)); }

/* Repair older MixDNS declarations that referenced an undefined --panel token. */
.mixdns-diagnostic,
.mixdns-web3d-section,
.mixdns-job-row { background-color: var(--mixdns-panel); }
.mixdns-web3d-intro {
  background: linear-gradient(180deg, color-mix(in srgb,var(--metal-1) 20%,var(--mixdns-panel)), color-mix(in srgb,var(--metal-3) 52%,var(--mixdns-panel)));
}

@media (max-width: 1180px) {
  .mixdns-setup-workspace { grid-template-columns: 1fr; }
  .mixdns-parameters-panel .mixdns-parameter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .mixdns-scene-views { grid-template-columns: 1fr; }
  .mixdns-view-card canvas { max-height: 330px; }
  .mixdns-estimate-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mixdns-object-editor { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mixdns-parameters-panel .mixdns-parameter-grid,
  .mixdns-time-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width: 560px) {
  .mixdns-parameters-panel .mixdns-parameter-grid,
  .mixdns-time-grid { grid-template-columns: 1fr 1fr !important; }
  .mixdns-physics-summary,
  .mixdns-estimate-metrics { grid-template-columns: 1fr 1fr; }
  .mixdns-object-toolbar { align-items: flex-start; flex-direction: column; }
  .mixdns-source-actions { justify-content: flex-start; }
  .mixdns-object-editor { grid-template-columns: 1fr 1fr; }
}

/* v1.20.3 scene editor inner structure mirrors MixDNS v0.5.13 semantics. */
.mixdns-object-editor { display: block; }
.mixdns-editor-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.mixdns-editor-title strong { font-size: .69rem; }
.mixdns-editor-title span { color: var(--muted); font-size: .6rem; }
.mixdns-editor-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 6px;
  margin-top: 6px;
}
.mixdns-editor-grid label {
  min-width: 0;
  color: var(--muted);
  font-size: .59rem;
  font-weight: 720;
}
.mixdns-editor-grid input,
.mixdns-editor-grid select {
  width: 100%;
  height: 32px;
  margin-top: 3px;
  padding: 0 7px;
  font-size: .65rem;
}
.mixdns-source-chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px !important; }
.mixdns-source-chip b { font-size: .61rem; font-weight: 760; }
.mixdns-scene-icon {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--dim);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}
.mixdns-scene-icon.bubble { background: #4bb1e2; }
.mixdns-scene-icon.droplet { background: #7970d9; }
.mixdns-scene-icon.dye { background: #c93792; }
.mixdns-scene-icon.injector { background: #e8962c; border-radius: 2px; }
.mixdns-scene-icon.interface { background: #b94e83; border-radius: 1px; }
.mixdns-readonly-scene {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 6px;
}
.mixdns-readonly-scene span {
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,.025);
  color: var(--muted);
  font-size: .59rem;
}
.mixdns-readonly-scene b { display: block; margin-top: 2px; color: var(--text); font-size: .68rem; }
@media (max-width: 900px) {
  .mixdns-editor-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .mixdns-editor-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mixdns-readonly-scene { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* v1.20.4 MixDNS library tabs/cards + 2/3 / 1/3 layout ------------------- */
.mixdns-setup-workspace {
  grid-template-columns: minmax(0, 2fr) minmax(310px, 1fr) !important;
  align-items: start;
}
.mixdns-left-column { min-width:0; display:grid; gap:12px; }
.mixdns-family-tabs {
  display:flex; flex-wrap:wrap; gap:5px; margin-top:9px; padding:4px;
  border:1px solid var(--line); border-radius:8px; background:var(--mixdns-inset);
}
.mixdns-family-tab {
  flex:1 1 130px; min-width:0; display:flex; align-items:center; gap:7px; text-align:left;
  padding:7px 9px; border:1px solid transparent; border-radius:6px;
  color:var(--muted); background:transparent; box-shadow:none; cursor:pointer;
}
.mixdns-family-tab:hover:not(.is-locked) { filter:brightness(1.12); }
.mixdns-family-tab.active { color:var(--text); border-color:var(--line-strong); background:linear-gradient(180deg,color-mix(in srgb,var(--metal-1) 28%,var(--bg-deep)),color-mix(in srgb,var(--metal-3) 70%,var(--bg-deep))); box-shadow:inset 0 1px rgba(255,255,255,.08); }
.mixdns-family-number { flex:0 0 auto; min-width:21px; height:21px; display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:50%; font-size:.56rem; font-weight:900; color:var(--dim); }
.mixdns-family-tab b,.mixdns-family-tab small { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.mixdns-family-tab b { font-size:.67rem; white-space:nowrap; }
.mixdns-family-tab small { margin-top:1px; font-size:.52rem; color:var(--dim); white-space:nowrap; }
.mixdns-preset-header { display:flex; align-items:flex-end; justify-content:space-between; gap:10px; margin-top:10px; }
.mixdns-preset-header strong,.mixdns-preset-header span { display:block; }
.mixdns-preset-header strong { font-size:.72rem; }
.mixdns-preset-header > div > span { margin-top:2px; color:var(--dim); font-size:.57rem; }
.mixdns-preset-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin-top:6px; }
.mixdns-preset-card { min-width:0; display:flex; align-items:flex-start; gap:7px; min-height:68px; padding:8px; text-align:left; border:1px solid var(--line); border-radius:7px; color:var(--text); background:linear-gradient(180deg,color-mix(in srgb,var(--metal-2) 27%,var(--bg-deep)),color-mix(in srgb,var(--metal-3) 58%,var(--bg-deep))); box-shadow:inset 0 1px rgba(255,255,255,.045); cursor:pointer; }
.mixdns-preset-card:hover:not(.is-locked) { filter:brightness(1.10); }
.mixdns-preset-card.active { border-color:color-mix(in srgb,var(--accent) 58%,var(--line)); box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 9%,transparent),inset 0 1px rgba(255,255,255,.08); }
.mixdns-preset-dot { flex:0 0 7px; width:7px; height:7px; margin-top:4px; border-radius:50%; background:var(--dim); }
.mixdns-preset-card.active .mixdns-preset-dot { background:var(--accent); }
.mixdns-preset-copy { min-width:0; flex:1; }
.mixdns-preset-copy b,.mixdns-preset-copy small { display:block; min-width:0; }
.mixdns-preset-copy b { font-size:.65rem; }
.mixdns-preset-copy small { margin-top:3px; color:var(--muted); font-size:.53rem; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.mixdns-status-tag { display:inline-block; margin-top:5px; padding:2px 5px; border:1px solid var(--line); border-radius:999px; color:var(--dim); font-size:.46rem; font-style:normal; font-weight:850; letter-spacing:.035em; }
.mixdns-status-tag.validated{color:var(--green)} .mixdns-status-tag.derived{color:var(--accent)} .mixdns-status-tag.experimental{color:var(--orange)}
.mixdns-family-tab.is-locked,.mixdns-preset-card.is-locked { opacity:.64; cursor:not-allowed; }
.mixdns-parameters-panel .field.locked-field :is(input,select) { pointer-events:none; }
.mixdns-editor-field.locked-field { position:relative; }
.mixdns-editor-field.locked-field::after { content:"🔒"; position:absolute; right:8px; bottom:8px; height:16px; display:flex; align-items:center; font-size:.72rem; filter:grayscale(1); pointer-events:none; }
.mixdns-editor-field.locked-field input { padding-right:30px; pointer-events:none; }
@media(max-width:1180px){.mixdns-setup-workspace{grid-template-columns:1fr !important}.mixdns-preset-cards{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:620px){.mixdns-family-tab{flex-basis:calc(50% - 3px)}.mixdns-preset-cards{grid-template-columns:1fr 1fr}.mixdns-preset-card{min-height:64px;padding:7px}.mixdns-family-tab small{display:none}}

.mixdns-job-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:stretch}.mixdns-job-entry+.mixdns-job-entry{margin-top:5px}.mixdns-job-delete{min-width:58px;border:1px solid var(--line);border-radius:6px;color:var(--muted);background:var(--mixdns-panel-soft);font-size:.58rem;font-weight:800}.mixdns-job-delete:hover:not(:disabled){filter:brightness(1.12);color:var(--text)}.mixdns-job-delete:disabled{opacity:.4;cursor:not-allowed}.mixdns-source-actions button:disabled,.mixdns-object-list button:disabled,.mixdns-object-editor button:disabled{pointer-events:none}

/* v1.20.8 MixDNS compact family tabs, balanced layout, consolidated run panel,
   paired results, dedicated history card, and badge lamp repair. */
#mixdnsWorkerBadge .status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  vertical-align: .02em;
  border-radius: 50%;
}
#mixdnsWorkerBadge.ready .status-dot {
  background: #7cff00 !important;
  border-color: #000 !important;
  box-shadow: 0 0 7px rgba(124,255,0,.88), 0 0 2px rgba(0,0,0,.85) !important;
}
#mixdnsWorkerBadge.offline .status-dot {
  background: #ff6969 !important;
  border-color: #000 !important;
  box-shadow: 0 0 6px rgba(255,105,105,.58) !important;
}

@media (min-width: 981px) {
  .mixdns-setup-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
}
@media (max-width: 980px) {
  .mixdns-setup-workspace {
    grid-template-columns: 1fr !important;
  }
}

.mixdns-family-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
}
.mixdns-family-tab {
  min-height: 48px;
  padding: 5px 7px;
  gap: 6px;
  align-items: center;
}
.mixdns-family-tab > b,
.mixdns-family-title {
  min-width: 0;
  display: block;
  font-size: .66rem;
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: .01em;
  white-space: normal;
}
.mixdns-family-title > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mixdns-family-title > span + span { margin-top: 2px; }
.mixdns-family-tab small { display: none !important; }
.mixdns-family-number {
  min-width: 19px;
  width: 19px;
  height: 19px;
  font-size: .52rem;
}

.mixdns-operations-panel {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--metal-2) 18%, transparent), transparent 46%),
    color-mix(in srgb, var(--metal-3) 76%, var(--bg-deep) 24%);
  box-shadow: inset 0 1px rgba(255,255,255,.055), inset 0 -1px rgba(0,0,0,.42), 0 2px 7px rgba(0,0,0,.14);
}
.mixdns-operations-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.mixdns-operations-heading h3 { margin: 1px 0 0; font-size: .9rem; }
.mixdns-operations-panel .mixdns-run-row {
  margin: 0;
  border-color: var(--line-strong);
}
.mixdns-operations-panel .mixdns-diagnostics-section,
.mixdns-operations-panel .mixdns-live-section {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--bg-deep) 72%, var(--metal-2) 28%);
}

.mixdns-results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.mixdns-result-panel {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--metal-2) 16%, transparent), transparent 42%),
    color-mix(in srgb, var(--metal-3) 76%, var(--bg-deep) 24%);
  box-shadow: inset 0 1px rgba(255,255,255,.045), inset 0 -1px rgba(0,0,0,.36);
}
.mixdns-web3d-section.mixdns-result-panel { overflow: hidden; }
.mixdns-result-panel .mixdns-web3d-intro { margin: -11px -11px 0; border-radius: 9px 9px 0 0; }
.mixdns-result-panel .mixdns-vtk-view { height: 430px; }

.mixdns-recent-card { margin-top: 14px; overflow: hidden; }
.mixdns-recent-card .card-body { padding-top: 10px; }
.mixdns-recent-card .mixdns-recent-jobs { min-height: 54px; }

@media (max-width: 1000px) {
  .mixdns-results-grid { grid-template-columns: 1fr; }
  .mixdns-result-panel .mixdns-vtk-view { height: 400px; }
}
@media (max-width: 620px) {
  .mixdns-family-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mixdns-family-tab { min-height: 46px; }
  .mixdns-operations-panel { padding: 9px; }
}

/* v1.20.8 MixDNS one-line family tabs, fused preset shell, denser desktop inputs,
   shared Physics Summary + Preset Estimate card, and submit-state polish. */
.mixdns-family-tabs {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin-top: 10px;
  padding: 0 6px !important;
  border: 0 !important;
  background: transparent !important;
}
.mixdns-family-number { display: none !important; }
.mixdns-family-tab {
  min-width: 0;
  min-height: 44px !important;
  padding: 7px 8px 8px !important;
  justify-content: center;
  border: 1px solid var(--line) !important;
  border-bottom-color: var(--line) !important;
  border-radius: 8px 8px 0 0 !important;
  background: linear-gradient(180deg, color-mix(in srgb,var(--metal-2) 24%,var(--bg-deep)), color-mix(in srgb,var(--metal-3) 58%,var(--bg-deep))) !important;
  position: relative;
  z-index: 0;
}
.mixdns-family-tab + .mixdns-family-tab { margin-left: -1px; }
.mixdns-family-tab:hover:not(.is-locked) { filter: brightness(1.06) !important; }
.mixdns-family-title {
  display: grid !important;
  place-items: center;
  text-align: center;
  font-size: .62rem !important;
  line-height: 1.02 !important;
}
.mixdns-family-title > span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.mixdns-family-tab.active {
  z-index: 2;
  border-color: var(--line-strong) !important;
  border-bottom-color: transparent !important;
  background: linear-gradient(180deg, color-mix(in srgb,var(--metal-1) 26%,var(--bg-deep)), color-mix(in srgb,var(--metal-3) 44%,var(--bg-deep))) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.08) !important;
}
.mixdns-preset-shell {
  margin-top: -1px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 0 10px 10px 10px;
  background: color-mix(in srgb, var(--mixdns-panel) 82%, var(--bg-deep) 18%);
  box-shadow: inset 0 1px rgba(255,255,255,.04), inset 0 -1px rgba(0,0,0,.28);
}
.mixdns-preset-header { margin-top: 0 !important; }
.mixdns-status-readout {
  min-height: 34px !important;
  padding: 0 9px !important;
  font-size: .66rem !important;
  letter-spacing: .03em !important;
}
.mixdns-status-tag {
  font-size: .41rem !important;
  padding: 2px 4px !important;
}
.mixdns-grid-compute-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.mixdns-domain-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.mixdns-grid-compute-grid .field,
.mixdns-domain-grid .field { min-width: 0; }
.mixdns-grid-compute-grid :is(input, select),
.mixdns-domain-grid :is(input, select) {
  width: 100%;
  min-width: 0;
}
.mixdns-grid-compute-grid label,
.mixdns-domain-grid label { white-space: nowrap; }
.mixdns-preset-estimate-panel {
  min-height: 448px;
}
.mixdns-physics-estimate-group + .mixdns-estimate-group { margin-top: 12px; }
.mixdns-preset-estimate-panel .mixdns-physics-summary,
.mixdns-preset-estimate-panel .mixdns-preset-estimate {
  font-size: .73rem;
}
.mixdns-preset-estimate-panel .mixdns-physics-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 9px;
}
.mixdns-preset-estimate-panel .mixdns-physics-summary > span {
  padding: 6px 8px;
}
.mixdns-preset-estimate {
  min-height: 176px !important;
  padding: 11px 12px !important;
}
.mixdns-estimate-metrics > span {
  padding: 9px 10px !important;
}
.mixdns-estimate-metrics b {
  font-size: .86rem !important;
}
.mixdns-estimate-metrics small {
  font-size: .6rem !important;
}
@media (max-width: 1180px) {
  .mixdns-family-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .mixdns-grid-compute-grid,
  .mixdns-domain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 700px) {
  .mixdns-family-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .mixdns-grid-compute-grid,
  .mixdns-domain-grid { grid-template-columns: 1fr 1fr !important; }
  .mixdns-preset-estimate-panel { min-height: 0; }
}

/* v1.20.9 MixDNS raw-output budget guard + denser time/output layout. */
.mixdns-time-step-row {
  display: grid;
  grid-template-columns: minmax(120px,1.25fr) minmax(92px,.82fr) minmax(88px,.78fr) minmax(100px,.86fr);
  gap: 8px;
  align-items: end;
}
.mixdns-time-step-row .field { min-width: 0; }
.mixdns-time-step-row :is(input,select) { width: 100%; min-width: 0; }
.mixdns-raw-output-limit-box {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: color-mix(in srgb,var(--bg-deep) 72%,var(--metal-2) 28%);
  box-shadow: inset 0 1px rgba(255,255,255,.045), inset 0 -1px rgba(0,0,0,.32);
}
.mixdns-raw-output-limit-title {
  margin: -1px 0 8px;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.mixdns-raw-output-limit-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(145px,.92fr);
  gap: 8px;
  align-items: end;
}
.mixdns-raw-linked-field,
.mixdns-raw-output-live {
  min-width: 0;
  border-radius: 7px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.mixdns-raw-linked-field { padding: 4px; margin: -4px; }
.mixdns-raw-output-live {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  background: color-mix(in srgb,var(--metal-3) 68%,var(--bg-deep));
}
.mixdns-raw-output-live small,
.mixdns-raw-output-live strong { display:block; }
.mixdns-raw-output-live small { color:var(--dim); font-size:.55rem; text-transform:uppercase; letter-spacing:.04em; }
.mixdns-raw-output-live strong { margin-top:3px; color:var(--text); font-size:.85rem; font-variant-numeric:tabular-nums; }
.mixdns-output-plan-row {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
  align-items:end;
}
@keyframes mixdnsRawLinkedYellow {
  0%,100% { box-shadow: 0 0 0 1px transparent; }
  35%,70% { box-shadow: 0 0 0 2px rgba(255,205,65,.78), 0 0 12px rgba(255,205,65,.34); }
}
@keyframes mixdnsRawLimitRed {
  0%,100% { box-shadow: 0 0 0 1px rgba(255,78,78,.48), 0 0 4px rgba(255,78,78,.16); }
  50% { box-shadow: 0 0 0 2px rgba(255,78,78,.96), 0 0 15px rgba(255,78,78,.52); }
}
.mixdns-raw-linked-field.is-linked-update:not(.raw-output-over-limit),
.mixdns-raw-output-live.is-linked-update:not(.raw-output-over-limit) {
  animation: mixdnsRawLinkedYellow .9s ease both;
}
.mixdns-raw-linked-field.raw-output-over-limit,
.mixdns-raw-output-live.raw-output-over-limit {
  background: color-mix(in srgb,var(--red) 8%,var(--bg-deep));
  animation: mixdnsRawLimitRed 1.15s ease-in-out infinite;
}
.mixdns-raw-linked-field.raw-output-over-limit input {
  border-color: color-mix(in srgb,var(--red) 72%,var(--line-strong)) !important;
}
.mixdns-estimate-raw-output {
  display:inline-block;
  padding:2px 5px;
  border-radius:5px;
  transition:background .18s ease, box-shadow .18s ease;
}
.mixdns-estimate-raw-output.raw-output-over-limit {
  color:#ff8d8d;
  background:color-mix(in srgb,var(--red) 10%,transparent);
  animation:mixdnsRawLimitRed 1.15s ease-in-out infinite;
}
#mixdnsRunBtn.raw-output-over-limit {
  color:#fff !important;
  border-color:#ff5757 !important;
  background:linear-gradient(180deg,#b83e3e,#6e2020) !important;
  animation:mixdnsRawLimitRed 1.15s ease-in-out infinite !important;
}
#mixdnsRunBtn.raw-output-over-limit:hover { filter:brightness(1.1); }

/* Keep the empty lazy 3-D panel the same row height as Static Results. */
.mixdns-results-grid { align-items: stretch !important; }
.mixdns-result-panel { height:100%; box-sizing:border-box; }
.mixdns-web3d-section.mixdns-result-panel { display:flex; flex-direction:column; }
.mixdns-web3d-section:not(.web3d-open) .mixdns-web3d-intro {
  flex:1 1 auto;
  min-height:100%;
}

@media (max-width: 900px) {
  .mixdns-time-step-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mixdns-raw-output-limit-grid { grid-template-columns:1fr 1fr; }
  .mixdns-raw-output-live { grid-column:1 / -1; }
}
@media (max-width: 560px) {
  .mixdns-time-step-row,
  .mixdns-output-plan-row { grid-template-columns:1fr 1fr; }
  .mixdns-raw-output-limit-grid { grid-template-columns:1fr; }
  .mixdns-raw-output-live { grid-column:auto; }
}

/* v1.20.10 MixDNS compact raw-output readout, preset-status badge parity,
   input help bubbles, and interactive Web-3D button affordance. */
.mixdns-raw-output-limit-box {
  padding: 7px 8px !important;
}
.mixdns-raw-output-limit-grid {
  align-items: center !important;
}
.mixdns-raw-output-live {
  min-height: 44px !important;
  padding: 5px 8px !important;
  justify-content: center;
}
.mixdns-raw-output-live small {
  font-size: .50rem !important;
  line-height: 1.05;
}
.mixdns-raw-output-live strong {
  margin-top: 2px !important;
  font-size: .75rem !important;
  line-height: 1.08;
  white-space: nowrap;
}

/* Use the same dark inset badge language as the workstation-ready badge. */
.mixdns-status-readout {
  width: auto !important;
  min-width: 118px;
  max-width: 170px;
  min-height: 34px !important;
  box-sizing: border-box;
  justify-content: center;
  padding: 5px 9px !important;
  border: 1px solid rgba(238,238,232,.27) !important;
  border-radius: 8px !important;
  color: #ededeb;
  background: rgba(8,9,10,.42) !important;
  font-size: .61rem !important;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.mixdns-status-readout[data-status="validated"] { color: var(--green) !important; }
.mixdns-status-readout[data-status="derived"] { color: var(--accent) !important; }
.mixdns-status-readout[data-status="experimental"] { color: var(--orange) !important; }

/* Keep the lazy 3-D action on one line and make it feel like a real control. */
#mixdnsWeb3dOpen {
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap !important;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
  background: linear-gradient(180deg, color-mix(in srgb,var(--metal-1) 34%,var(--bg-deep)), color-mix(in srgb,var(--metal-3) 72%,var(--bg-deep)));
  box-shadow: inset 0 1px rgba(255,255,255,.10), 0 2px 3px rgba(0,0,0,.28);
  transition: transform .10s ease, filter .12s ease, box-shadow .10s ease, border-color .12s ease;
}
#mixdnsWeb3dOpen:hover {
  transform: translateY(-1px);
  filter: brightness(1.10);
  border-color: color-mix(in srgb,var(--accent) 40%,var(--line-strong));
  box-shadow: inset 0 1px rgba(255,255,255,.14), 0 3px 6px rgba(0,0,0,.32);
}
#mixdnsWeb3dOpen:active {
  transform: translateY(1px);
  filter: brightness(.96);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.42), 0 1px 1px rgba(0,0,0,.20);
}
#mixdnsWeb3dOpen:focus-visible {
  outline: 2px solid color-mix(in srgb,var(--accent) 72%,#fff);
  outline-offset: 2px;
}

/* Fields themselves are tooltip targets, including disabled Last Run controls. */
.mixdns-parameters-panel .field[data-tooltip],
.mixdns-raw-output-live[data-tooltip] { cursor: help; }
.mixdns-parameters-panel .field.locked-field[data-tooltip] { cursor: not-allowed; }

@media (max-width: 620px) {
  #mixdnsWeb3dOpen { min-width: 0; max-width: 100%; font-size: .66rem; }
  .mixdns-raw-output-live strong { white-space: normal; }
}

/* v1.20.13 MixDNS dense diagnostics, compact terminal columns, and Web-3D controls. */
@media (min-width: 1181px) {
  .mixdns-diagnostics-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  .mixdns-diagnostic {
    padding: 7px 8px !important;
  }
  .mixdns-diagnostic span {
    font-size: .57rem !important;
    white-space: nowrap;
  }
  .mixdns-diagnostic strong {
    margin-top: 2px !important;
    font-size: .72rem !important;
    white-space: nowrap;
  }
  .mixdns-diagnostic-failure {
    grid-column: 1 / -1 !important;
  }
}
@media (min-width: 760px) and (max-width: 1180px) {
  .mixdns-diagnostics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

/* Compact mode keeps stable monospace column widths but removes the large tab gaps. */
.mixdns-terminal {
  tab-size: 1 !important;
  letter-spacing: 0 !important;
}

#mixdnsWeb3dOpen,
#mixdnsWeb3dLoad,
#mixdnsWeb3dReset {
  width: auto !important;
  max-width: none !important;
  min-width: max-content !important;
  min-height: 34px;
  box-sizing: border-box;
  padding: 7px 11px !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 7px !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  line-height: 1.05 !important;
  font-size: .66rem !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  background: linear-gradient(180deg,
    color-mix(in srgb,var(--metal-1) 34%,var(--bg-deep)),
    color-mix(in srgb,var(--metal-3) 72%,var(--bg-deep))) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.11), 0 2px 3px rgba(0,0,0,.30) !important;
  transition: transform .09s ease, filter .11s ease, box-shadow .09s ease, border-color .11s ease !important;
}
#mixdnsWeb3dOpen:hover,
#mixdnsWeb3dLoad:hover,
#mixdnsWeb3dReset:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.11) !important;
  border-color: color-mix(in srgb,var(--accent) 42%,var(--line-strong)) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.15), 0 4px 7px rgba(0,0,0,.30) !important;
}
#mixdnsWeb3dOpen:active,
#mixdnsWeb3dLoad:active,
#mixdnsWeb3dReset:active {
  transform: translateY(1px) !important;
  filter: brightness(.94) !important;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.48), 0 1px 1px rgba(0,0,0,.18) !important;
}
#mixdnsWeb3dOpen:focus-visible,
#mixdnsWeb3dLoad:focus-visible,
#mixdnsWeb3dReset:focus-visible {
  outline: 2px solid color-mix(in srgb,var(--accent) 72%,#fff) !important;
  outline-offset: 2px;
}
#mixdnsWeb3dLoad {
  color: color-mix(in srgb,var(--text) 88%,var(--accent) 12%) !important;
  border-color: color-mix(in srgb,var(--accent) 32%,var(--line-strong)) !important;
}
#mixdnsWeb3dReset {
  color: var(--muted) !important;
  background: linear-gradient(180deg,
    color-mix(in srgb,var(--metal-2) 28%,var(--bg-deep)),
    color-mix(in srgb,var(--metal-3) 78%,var(--bg-deep))) !important;
}
.mixdns-web3d-controls {
  grid-template-columns: minmax(92px, .8fr) minmax(92px, .8fr) auto auto !important;
  gap: 6px !important;
}
.mixdns-web3d-controls label { min-width: 0 !important; }
.mixdns-web3d-controls select { min-width: 0 !important; }
@media (max-width: 620px) {
  .mixdns-web3d-controls { grid-template-columns: 1fr 1fr !important; }
  #mixdnsWeb3dLoad, #mixdnsWeb3dReset { min-width: 0 !important; width: 100% !important; }
}

/* v1.20.13 MixDNS family-tab and preset refinements */
.mixdns-family-tabs {
  gap: 0 !important;
  align-items: end !important;
}
.mixdns-family-tab {
  position: relative;
  overflow: visible;
  transition: filter .16s ease, box-shadow .18s ease, transform .18s ease, border-color .18s ease;
  border-radius: 8px 8px 0 0 !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: inset 0 -10px 12px -12px rgba(0,0,0,.85), inset 0 1px rgba(255,255,255,.05) !important;
}
.mixdns-family-tab.active {
  border-bottom-color: transparent !important;
  margin-bottom: -1px !important;
  z-index: 4 !important;
  box-shadow: 8px 0 12px -10px rgba(0,0,0,.45), inset 0 1px rgba(255,255,255,.08) !important;
}
.mixdns-family-tab.active:hover,
.mixdns-family-tab.active:focus-visible {
  filter: none !important;
  transform: none !important;
}
.mixdns-family-tab:not(.active):hover:not(.is-locked),
.mixdns-family-tab:not(.active):focus-visible {
  box-shadow: 8px 0 12px -10px rgba(0,0,0,.42), inset 0 0 rgba(0,0,0,0) !important;
  border-bottom-color: var(--line-strong) !important;
  filter: brightness(1.04) !important;
}
.mixdns-preset-shell {
  margin-top: -1px !important;
  border-top-left-radius: 0 !important;
}
.mixdns-preset-header {
  align-items: center !important;
}
.mixdns-status-readout {
  justify-content: center !important;
  text-align: center !important;
}
.mixdns-preset-card.active {
  border-width: 2px !important;
  border-color: color-mix(in srgb,var(--accent) 78%,white 8%) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb,var(--accent) 18%,transparent), inset 0 1px rgba(255,255,255,.1) !important;
}

/* v1.20.13 MixDNS result-player, recent-jobs table, diagnostics values, and tab polish */
.mixdns-family-tab.active .mixdns-family-title {
  color: var(--accent) !important;
  text-shadow: 0 0 6px color-mix(in srgb,var(--accent) 22%,transparent);
}
.mixdns-status-readout {
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
  line-height: 1 !important;
}
.mixdns-preset-card.active {
  border-width: 2px !important;
  border-color: color-mix(in srgb,var(--accent) 88%,#fff 10%) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb,var(--accent) 24%,transparent), 0 0 10px color-mix(in srgb,var(--accent) 12%,transparent), inset 0 1px rgba(255,255,255,.11) !important;
}
.mixdns-diagnostic strong {
  color: var(--green) !important;
  text-shadow: 0 0 6px color-mix(in srgb,var(--green) 18%,transparent);
}
.mixdns-diagnostic-failure strong { color: var(--orange) !important; text-shadow: none; }

.mixdns-static-stage {
  min-height: 390px !important;
  position: relative;
  background: color-mix(in srgb,var(--bg-deep) 94%,#000 6%) !important;
}
.mixdns-static-stage > img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  max-height: 520px;
  object-fit: contain;
  background: var(--bg-deep);
}
.mixdns-static-stage > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.mixdns-static-toolbar {
  margin-top: 8px;
  justify-content: center;
}
.mixdns-static-toolbar .preload-status { margin-left: auto; }
.mixdns-static-toolbar .frame-number input { width: 48px; }

.mixdns-jobs-table { width:100%; }
.mixdns-jobs-table th,
.mixdns-jobs-table td { vertical-align: middle; }
.mixdns-jobs-table td:nth-child(2) strong { color: var(--text); text-transform: capitalize; }
.mixdns-jobs-table td:nth-child(2) span { color: var(--muted); }
.mixdns-jobs-table td:nth-child(5),
.mixdns-jobs-table td:nth-child(6) { font-variant-numeric: tabular-nums; }
.mixdns-jobs-table .state-chip { text-transform: uppercase; font-size:.58rem; }
.mixdns-recent-jobs { overflow-x:auto; }

@media (max-width: 1050px) {
  .mixdns-static-toolbar { flex-wrap: wrap; }
  .mixdns-static-toolbar .preload-status { width:100%; max-width:none; margin-left:0; text-align:center; }
}
.mixdns-static-stage > span[hidden] { display:none !important; }

.mixdns-terminal::-webkit-scrollbar-thumb{background:#c7ced6;border-radius:999px;}
.mixdns-terminal::-webkit-scrollbar-track{background:#e8edf1;}
.mixdns-web3d-active{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;}
.mixdns-web3d-controls button:disabled,.mixdns-web3d-controls select:disabled{opacity:.58;cursor:not-allowed;filter:saturate(.6);}
.mixdns-vtk-view--idle{place-items:center;}
.mixdns-vtk-view--idle > span{padding:0 16px;text-align:center;color:#8999a3;}
.mixdns-static-stage > img[hidden],
.mixdns-static-stage > img[hidden="hidden"]{display:none !important;}
@media (min-width: 1051px) {
  .mixdns-static-toolbar{flex-wrap:nowrap;justify-content:center;align-items:center;gap:6px;}
  .mixdns-static-toolbar > .icon-btn{flex:0 0 auto;}
  .mixdns-static-toolbar > .playback-cluster{flex:0 0 auto;}
  .mixdns-static-toolbar > .compact-frame-number{flex:0 0 auto;}
  .mixdns-static-toolbar > .preload-status{flex:1 1 auto;min-width:0;white-space:nowrap;}
}



/* v1.20.15 MixDNS control density, static toolbar row lock, and Web-3D idle layout. */
#mixdnsDtMode { font-size: .82rem !important; }
#mixdnsDtMode option { font-size: .82rem; }

@media (min-width: 1024px) {
  .mixdns-diagnostics-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  .mixdns-diagnostic { padding: 7px 8px !important; }
  .mixdns-diagnostic span { font-size: .56rem !important; white-space: nowrap; }
  .mixdns-diagnostic strong { font-size: .70rem !important; white-space: nowrap; }
}
@media (min-width: 760px) and (max-width: 1023px) {
  .mixdns-diagnostics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

.mixdns-web3d-section:not(.web3d-open) .mixdns-web3d-intro {
  flex: 0 0 auto !important;
  min-height: auto !important;
}
.mixdns-web3d-section.mixdns-result-panel { display:flex; flex-direction:column; }
.mixdns-web3d-active { display:grid !important; grid-template-rows:minmax(430px,1fr) auto auto auto !important; gap:0; }
.mixdns-result-panel .mixdns-vtk-view { height:auto !important; min-height:430px; }
.mixdns-vtk-view--idle { background:#060a0e; }
.mixdns-vtk-view--idle::before {
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0) 28%);
  pointer-events:none;
}
.mixdns-web3d-controls {
  border-top:1px solid var(--line);
  border-bottom:1px solid color-mix(in srgb,var(--line) 80%,transparent);
}
.mixdns-web3d-view-presets {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:8px 10px;
  border-top:1px solid color-mix(in srgb,var(--line) 72%,transparent);
  background:color-mix(in srgb,var(--panel) 78%,var(--bg-deep) 22%);
}
#mixdnsWeb3dXY,
#mixdnsWeb3dYZ,
#mixdnsWeb3dXZ {
  width:auto !important;
  max-width:none !important;
  min-width:78px !important;
  min-height:30px;
  padding:6px 10px !important;
  border:1px solid var(--line-strong) !important;
  border-radius:7px !important;
  white-space:nowrap !important;
  line-height:1 !important;
  font-size:.64rem !important;
  font-weight:800 !important;
  color:var(--text) !important;
  background:linear-gradient(180deg, color-mix(in srgb,var(--metal-1) 30%,var(--bg-deep)), color-mix(in srgb,var(--metal-3) 74%,var(--bg-deep))) !important;
  box-shadow:inset 0 1px rgba(255,255,255,.11), 0 2px 3px rgba(0,0,0,.28) !important;
}
#mixdnsWeb3dXY:hover,
#mixdnsWeb3dYZ:hover,
#mixdnsWeb3dXZ:hover { filter:brightness(1.08); }
#mixdnsWeb3dXY:disabled,
#mixdnsWeb3dYZ:disabled,
#mixdnsWeb3dXZ:disabled { opacity:.58; cursor:not-allowed; filter:saturate(.6); }

.mixdns-static-toolbar {
  position: static !important;
  min-height: 34px !important;
  padding: 0 !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
}
.mixdns-static-toolbar > .preload-status {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: auto !important;
  max-width: 280px !important;
  margin: 0 0 0 8px !important;
  text-align: left !important;
  flex: 0 1 280px;
}
@media (min-width: 1051px) {
  .mixdns-static-toolbar { flex-wrap: nowrap !important; }
}
@media (max-width: 1050px) {
  .mixdns-static-toolbar {
    flex-wrap: wrap !important;
    padding-bottom: 0 !important;
  }
  .mixdns-static-toolbar > .preload-status {
    flex: 1 1 100%;
    max-width: none !important;
    margin: 4px 0 0 !important;
    text-align: center !important;
  }
}
@media (max-width: 620px) {
  .mixdns-web3d-active { grid-template-rows:minmax(340px,1fr) auto auto auto !important; }
  .mixdns-result-panel .mixdns-vtk-view { min-height:340px; }
  .mixdns-web3d-view-presets { justify-content:stretch; }
  #mixdnsWeb3dXY, #mixdnsWeb3dYZ, #mixdnsWeb3dXZ { flex:1 1 0; min-width:0 !important; }
}

/* v1.20.16 MixDNS flicker-free static frames, compact artifact browser,
   top-mounted Web-3D controls/opacity, and terminal simplification. */
.mixdns-terminal {
  background: #020503 !important;
  color: #72ff8c !important;
  border-color: #1d4b28 !important;
  box-shadow: inset 0 1px 6px rgba(0,0,0,.78) !important;
  text-shadow: 0 0 3px rgba(92,255,126,.12);
}
.mixdns-terminal::-webkit-scrollbar-track { background:#071009 !important; }
.mixdns-terminal::-webkit-scrollbar-thumb { background:#2b6337 !important; }

/* Retained decoded front/back image buffers. Never blank the current frame
   while the incoming frame is decoding. */
.mixdns-static-stage { position:relative !important; overflow:hidden !important; }
#mixdnsStaticImage,
#mixdnsStaticImageNext {
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  max-height:none !important;
  object-fit:contain !important;
  background:var(--bg-deep) !important;
}
#mixdnsStaticImage { z-index:1; opacity:1; }
#mixdnsStaticImageNext {
  z-index:2;
  opacity:0;
  pointer-events:none;
  transition:opacity 70ms linear;
  will-change:opacity;
}
#mixdnsStaticImageNext.mixdns-static-frame-fade-in { opacity:1; }
#mixdnsStaticImage[hidden],
#mixdnsStaticImageNext[hidden] { display:none !important; }

/* Final artifacts remain available without making the page several screens tall. */
.mixdns-gallery-details {
  margin-top:10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:color-mix(in srgb,var(--bg-deep) 78%,var(--metal-2) 22%);
  overflow:hidden;
}
.mixdns-gallery-details > summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
  padding:8px 10px;
  list-style:none;
  font-size:.72rem;
  font-weight:800;
  color:var(--text);
  user-select:none;
}
.mixdns-gallery-details > summary::-webkit-details-marker { display:none; }
.mixdns-gallery-details > summary::after {
  content:'›';
  margin-left:4px;
  font-size:1rem;
  transform:rotate(0deg);
  transition:transform .14s ease;
}
.mixdns-gallery-details[open] > summary::after { transform:rotate(90deg); }
.mixdns-gallery-count {
  margin-left:auto;
  min-width:24px;
  padding:2px 7px;
  border:1px solid var(--line);
  border-radius:999px;
  text-align:center;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
}
.mixdns-gallery {
  display:flex !important;
  grid-template-columns:none !important;
  gap:8px !important;
  margin:0 !important;
  padding:8px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  max-height:190px;
  border-top:1px solid var(--line);
  scroll-snap-type:x proximity;
}
.mixdns-gallery-item {
  flex:0 0 185px;
  width:185px;
  min-width:185px;
  padding:5px !important;
  scroll-snap-align:start;
}
.mixdns-gallery-item img,
.mixdns-gallery-item video {
  display:block;
  width:100% !important;
  height:128px !important;
  max-height:128px !important;
  object-fit:contain !important;
  background:#050709;
  border-radius:4px;
}
.mixdns-gallery-item span {
  display:block;
  padding:5px 2px 1px !important;
  font-size:.65rem !important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mixdns-gallery-empty { padding:8px; color:var(--muted); font-size:.7rem; }

/* Every Web-3D interaction control is above the viewport; only the traffic /
   manifest line remains below it. */
.mixdns-web3d-active {
  display:grid !important;
  grid-template-rows:auto minmax(430px,1fr) auto !important;
  min-height:0;
}
.mixdns-web3d-top-controls {
  padding:8px 10px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:color-mix(in srgb,var(--panel) 78%,var(--bg-deep) 22%);
}
.mixdns-web3d-top-controls .mixdns-web3d-controls {
  display:flex !important;
  flex-wrap:wrap;
  align-items:flex-end !important;
  gap:6px !important;
  padding:0 !important;
  border:0 !important;
}
.mixdns-web3d-top-controls .mixdns-web3d-controls > label:not(.mixdns-web3d-opacity) {
  flex:1 1 118px;
  min-width:106px !important;
  max-width:190px;
}
#mixdnsWeb3dXY,
#mixdnsWeb3dYZ,
#mixdnsWeb3dXZ { min-width:68px !important; }
.mixdns-web3d-opacity {
  flex:1 1 170px;
  min-width:150px;
  max-width:230px;
  display:grid !important;
  grid-template-columns:auto auto;
  grid-template-rows:auto 20px;
  column-gap:7px;
  align-items:center;
  color:var(--muted);
  font-size:.65rem !important;
}
.mixdns-web3d-opacity > span {
  justify-self:end;
  color:var(--text);
  font-variant-numeric:tabular-nums;
}
.mixdns-web3d-opacity > input {
  grid-column:1 / -1;
  width:100%;
  min-width:0;
  margin:1px 0 0;
  accent-color:var(--accent);
}
.mixdns-vtk-view--idle { place-items:stretch !important; }
.mixdns-vtk-view--idle::before { background:linear-gradient(180deg,rgba(255,255,255,.015),transparent 24%) !important; }
.mixdns-web3d-traffic { min-height:34px; box-sizing:border-box; }

@media (max-width: 620px) {
  .mixdns-web3d-active { grid-template-rows:auto minmax(340px,1fr) auto !important; }
  .mixdns-web3d-top-controls .mixdns-web3d-controls > label:not(.mixdns-web3d-opacity) { max-width:none; }
  .mixdns-web3d-opacity { max-width:none; flex-basis:100%; }
  .mixdns-gallery-item { flex-basis:160px; width:160px; min-width:160px; }
}


/* v1.20.17 MixDNS compact six-tab desktop library, clean opacity row,
   silver camera controls, and restored Compact divergence telemetry. */
@media (min-width: 1024px) {
  .mixdns-family-tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 0 !important;
    padding-inline: 4px !important;
  }
  .mixdns-family-tab {
    min-height: 39px !important;
    padding: 5px 4px 6px !important;
  }
  .mixdns-family-title {
    font-size: .58rem !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
  }
  .mixdns-family-title > span + span { margin-top: 1px !important; }
}
@media (min-width: 760px) and (max-width: 1023px) {
  .mixdns-family-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

.mixdns-web3d-top-controls { display:grid; gap:7px; }
.mixdns-web3d-primary-row {
  display:flex;
  align-items:flex-end;
  gap:6px;
  min-width:0;
}
.mixdns-web3d-primary-row > label {
  flex:1 1 130px;
  min-width:110px;
  max-width:220px;
  font-size:.68rem;
  color:var(--muted);
}
.mixdns-web3d-primary-row > label select {
  display:block;
  width:100%;
  min-width:0;
  margin-top:4px;
}
.mixdns-web3d-secondary-row {
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
  padding-top:2px;
}
.mixdns-web3d-opacity {
  flex:1 1 260px !important;
  min-width:190px !important;
  max-width:none !important;
  display:grid !important;
  grid-template-columns:auto auto !important;
  grid-template-rows:auto 20px !important;
  column-gap:8px !important;
  align-items:center !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  outline:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
.mixdns-web3d-opacity-label { color:var(--muted); font-size:.65rem; }
.mixdns-web3d-opacity > #mixdnsWeb3dOpacityValue {
  justify-self:end;
  color:var(--text);
  font-size:.65rem;
  font-variant-numeric:tabular-nums;
}
.mixdns-web3d-opacity > input {
  grid-column:1 / -1;
  width:100%;
  min-width:0;
  margin:1px 0 0 !important;
  padding:0 !important;
  border:0 !important;
  outline:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  accent-color:var(--accent);
}
.mixdns-web3d-camera-controls {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:5px;
  min-width:max-content;
}
.mixdns-web3d-camera-label {
  margin-right:2px;
  color:var(--muted);
  font-size:.66rem;
  font-weight:800;
}
#mixdnsWeb3dReset.mixdns-camera-button,
#mixdnsWeb3dXY.mixdns-camera-button,
#mixdnsWeb3dXZ.mixdns-camera-button,
#mixdnsWeb3dYZ.mixdns-camera-button {
  width:auto !important;
  max-width:none !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:5px 9px !important;
  border:1px solid rgba(210,214,211,.52) !important;
  border-radius:999px !important;
  color:#343837 !important;
  background:linear-gradient(180deg,rgba(238,239,235,.92),rgba(175,179,176,.92)) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.84),0 2px 4px rgba(0,0,0,.22) !important;
  font-size:.61rem !important;
  font-weight:850 !important;
  line-height:1 !important;
}
#mixdnsWeb3dReset.mixdns-camera-button:not(:disabled):hover,
#mixdnsWeb3dXY.mixdns-camera-button:not(:disabled):hover,
#mixdnsWeb3dXZ.mixdns-camera-button:not(:disabled):hover,
#mixdnsWeb3dYZ.mixdns-camera-button:not(:disabled):hover {
  transform:none !important;
  filter:brightness(1.06) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.94),0 2px 6px rgba(0,0,0,.28) !important;
}
#mixdnsWeb3dReset.mixdns-camera-button:disabled,
#mixdnsWeb3dXY.mixdns-camera-button:disabled,
#mixdnsWeb3dXZ.mixdns-camera-button:disabled,
#mixdnsWeb3dYZ.mixdns-camera-button:disabled {
  color:#606563 !important;
  opacity:.50 !important;
  cursor:not-allowed;
}
@media (max-width:720px) {
  .mixdns-web3d-primary-row { flex-wrap:wrap; }
  .mixdns-web3d-primary-row > label { max-width:none; }
  .mixdns-web3d-secondary-row { flex-wrap:wrap; gap:8px; }
  .mixdns-web3d-opacity { flex-basis:100% !important; min-width:0 !important; }
  .mixdns-web3d-camera-controls { flex:1 1 100%; min-width:0; flex-wrap:wrap; }
}


/* v1.20.18 MixDNS Web-3D readiness, denser diagnostics, and control hierarchy. */
@media (min-width: 1024px) {
  .mixdns-diagnostic {
    padding: 5px 8px !important;
    min-height: 0 !important;
  }
  .mixdns-diagnostic span {
    font-size: .54rem !important;
    line-height: 1.0 !important;
  }
  .mixdns-diagnostic strong {
    margin-top: 1px !important;
    font-size: .69rem !important;
    line-height: 1.05 !important;
  }
}

/* Camera stays at left; Opacity owns the remaining right-hand space. */
.mixdns-web3d-secondary-row {
  justify-content: space-between !important;
}
.mixdns-web3d-camera-controls { order: 1; }
.mixdns-web3d-opacity {
  order: 2;
  flex: 1 1 260px !important;
  max-width: 360px !important;
  margin-left: auto !important;
}

/* The primary 3-D loader is deliberately more substantial than the per-state loader. */
#mixdnsWeb3dOpen {
  min-height: 51px !important;
  padding: 11px 18px !important;
  border-width: 2px !important;
  border-radius: 10px !important;
  font-size: .82rem !important;
  font-weight: 900 !important;
  letter-spacing: .005em !important;
  background: linear-gradient(180deg,
    color-mix(in srgb,var(--metal-1) 48%,var(--bg-deep)),
    color-mix(in srgb,var(--metal-3) 64%,var(--bg-deep))) !important;
  box-shadow: inset 0 2px rgba(255,255,255,.16), inset 0 -2px rgba(0,0,0,.22), 0 4px 8px rgba(0,0,0,.34) !important;
}
#mixdnsWeb3dOpen:not(:disabled):hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.12) !important;
  box-shadow: inset 0 2px rgba(255,255,255,.20), inset 0 -2px rgba(0,0,0,.20), 0 6px 11px rgba(0,0,0,.38) !important;
}
#mixdnsWeb3dOpen:disabled {
  cursor: not-allowed !important;
  opacity: .46 !important;
  filter: grayscale(.45) !important;
  transform: none !important;
}

.mixdns-web3d-wait-notice {
  margin: 1px 0 0;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb,var(--red) 52%,var(--line));
  border-radius: 6px;
  background: color-mix(in srgb,var(--red) 8%,transparent);
  color: color-mix(in srgb,var(--red) 82%,#fff 18%);
  font-size: .68rem;
  font-weight: 850;
  line-height: 1.25;
}
.mixdns-web3d-wait-notice[hidden] { display:none !important; }

/* During the unfinished state all top controls are visibly unavailable. */
.mixdns-web3d-primary-row select:disabled,
.mixdns-web3d-primary-row button:disabled,
.mixdns-web3d-secondary-row button:disabled,
.mixdns-web3d-secondary-row input:disabled {
  cursor: not-allowed !important;
  opacity: .46 !important;
  filter: grayscale(.55) !important;
}

@media (max-width: 720px) {
  .mixdns-web3d-opacity { max-width: none !important; margin-left: 0 !important; }
}


/* v1.20.19 MixDNS server-only MP4 retention and Download All UI. */
.mixdns-static-title-row { align-items:center !important; gap:12px; }
.mixdns-static-title-row > div { min-width:0; }
.mixdns-download-all-btn { flex:0 0 auto; min-width:108px; margin-left:auto; white-space:nowrap; }
.mixdns-download-all-btn:disabled, .mixdns-job-download:disabled { opacity:.48; cursor:not-allowed; filter:saturate(.45); }
.mixdns-jobs-table .mixdns-job-download { min-width:74px; padding-inline:9px; }
@media(max-width:620px){ .mixdns-static-title-row { align-items:flex-start !important; } .mixdns-download-all-btn { min-width:0; padding-inline:8px; } }


/* v1.20.20 MixDNS retained Web-3D showcase parity: curated one/two-layer
   views, independent opacity gains, and local-viewer VTK density tuning. */
.mixdns-web3d-view-note {
  padding: 3px 2px 1px;
  color: var(--muted);
  font-size: .62rem;
  line-height: 1.2;
}
.mixdns-web3d-view-note[hidden] { display:none !important; }
.mixdns-web3d-opacity-pair {
  order: 2;
  flex: 1 1 300px;
  max-width: 420px;
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 9px;
  align-items: center;
}
.mixdns-web3d-opacity-pair > .mixdns-web3d-opacity {
  order: initial !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-left: 0 !important;
  flex: none !important;
}
.mixdns-web3d-overlay-opacity[hidden] { display:none !important; }
@media(max-width:900px){
  .mixdns-web3d-secondary-row { flex-wrap:wrap; }
  .mixdns-web3d-opacity-pair { flex-basis:100%; max-width:none; width:100%; margin-left:0; }
}
@media(max-width:560px){
  .mixdns-web3d-opacity-pair { grid-template-columns:1fr; }
}

/* v1.20.22 MixDNS New/Last cached-result presentation and monitoring polish. */

/* At the 1440 px / Windows 125% target (~1152 CSS px), keep playback controls
   on the first row and move the preload capsule to a dedicated second row. */
@media (max-width: 1320px) and (min-width: 621px) {
  .mixdns-static-toolbar {
    flex-wrap: wrap !important;
    padding-bottom: 0 !important;
  }
  .mixdns-static-toolbar > .preload-status {
    flex: 1 1 100% !important;
    width: auto !important;
    max-width: 320px !important;
    margin: 5px auto 0 !important;
    text-align: center !important;
  }
}

@keyframes mixdnsPostprocessingTextPulse {
  0%,100% { color:#9a7310; text-shadow:0 0 0 rgba(255,199,49,0); opacity:.78; }
  50% { color:#d39a00; text-shadow:0 0 8px rgba(255,194,34,.62); opacity:1; }
}
#mixdnsRunStatus.mixdns-postprocessing-status {
  font-weight:900 !important;
  animation:mixdnsPostprocessingTextPulse 1.05s ease-in-out infinite !important;
}

@keyframes mixdnsLoadStateReadyPulse {
  0%,100% { border-color:rgba(186,140,18,.62) !important; box-shadow:inset 0 1px rgba(255,255,255,.12),0 0 0 1px rgba(210,157,20,.18),0 0 3px rgba(218,164,24,.16) !important; }
  50% { border-color:#d8a31d !important; box-shadow:inset 0 1px rgba(255,255,255,.16),0 0 0 2px rgba(218,163,25,.68),0 0 13px rgba(230,174,28,.48) !important; }
}
#mixdnsWeb3dLoad.mixdns-load-ready-attention:not(:disabled) {
  animation:mixdnsLoadStateReadyPulse 1.0s ease-in-out infinite !important;
}

#mixdnsRawOutputLiveValue .mixdns-raw-output-current {
  color:var(--green) !important;
  text-shadow:0 0 5px color-mix(in srgb,var(--green) 20%,transparent);
}
#mixdnsRawOutputLiveValue .mixdns-raw-output-limit-copy { color:var(--text); }
.mixdns-raw-output-live.raw-output-over-limit #mixdnsRawOutputLiveValue .mixdns-raw-output-current {
  color:var(--red) !important;
  text-shadow:none;
}

.mixdns-estimate-metrics {
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}
.mixdns-estimate-metrics > span { min-width:0; }
.mixdns-estimate-metrics b { overflow:visible !important; text-overflow:clip !important; white-space:normal !important; }

.mixdns-jobs-table td:nth-child(8) button,
.mixdns-jobs-table td:nth-child(9) button,
.mixdns-jobs-table td:nth-child(10) button {
  height:30px !important;
  min-height:30px !important;
  padding:4px 8px !important;
  font-size:.62rem !important;
  line-height:1 !important;
  border-radius:6px !important;
}

/* New Run looks empty but Last Run browser-side result caches are retained. */
.mixdns-workspace.mixdns-new-run-view #mixdnsStaticImage,
.mixdns-workspace.mixdns-new-run-view #mixdnsStaticImageNext,
.mixdns-workspace.mixdns-new-run-view #mixdnsVtkView > *,
.mixdns-workspace.mixdns-new-run-view #mixdnsWeb3dTraffic {
  visibility:hidden !important;
}
.mixdns-workspace.mixdns-new-run-view #mixdnsStaticEmpty {
  display:grid !important;
  visibility:visible !important;
  z-index:4;
  font-size:0;
}
.mixdns-workspace.mixdns-new-run-view #mixdnsStaticEmpty::after {
  content:'No static results for New Run yet.';
  font-size:.78rem;
  color:var(--muted);
}
.mixdns-workspace.mixdns-new-run-view .mixdns-static-toolbar {
  opacity:.48;
  pointer-events:none;
}
.mixdns-workspace.mixdns-new-run-view #mixdnsWeb3dOpen,
.mixdns-workspace.mixdns-new-run-view .mixdns-web3d-top-controls {
  opacity:.48;
  pointer-events:none;
}
.mixdns-workspace.mixdns-new-run-view #mixdnsVtkView::after {
  content:'No Web-3D result for New Run yet.';
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:var(--muted);
  font-size:.78rem;
  z-index:5;
}

.mixdns-workspace.mixdns-new-run-view #mixdnsGalleryDetails { display:none !important; }


/* v1.20.23 MixDNS completed-Last default and numerical-health attention. */
@keyframes mixdnsHealthWarningFlash {
  0%,100% { color:#b40000; text-shadow:0 0 0 rgba(220,0,0,0); opacity:1; }
  50% { color:#ff1b1b; text-shadow:0 0 8px rgba(255,0,0,.72); opacity:.58; }
}
.mixdns-diagnostic.mixdns-health-alert strong {
  color:#d40000 !important;
  animation:mixdnsHealthWarningFlash .82s ease-in-out infinite !important;
  font-weight:950 !important;
}


/* v1.20.25: terminal failures override stale numerical-health GOOD in the UI. */
.mixdns-health-alert strong { color:#d60000 !important; animation:mixdnsHealthPulse 1s ease-in-out infinite alternate; }
@keyframes mixdnsHealthPulse { from { opacity:.58; text-shadow:0 0 0 rgba(220,0,0,0); } to { opacity:1; text-shadow:0 0 7px rgba(220,0,0,.65); } }

/* v1.20.30 — solver-bound Domain/Grid/Initial Condition Designer contract. */
.mixdns-designer-validation {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb,var(--green) 48%,var(--line));
  border-radius: 7px;
  background: color-mix(in srgb,var(--green) 8%,var(--panel));
  color: var(--muted);
  font-size: .61rem;
  line-height: 1.4;
}
.mixdns-designer-validation b { color: var(--green); margin-right: 7px; text-transform: uppercase; letter-spacing: .04em; }
.mixdns-designer-validation.has-warning { border-color: color-mix(in srgb,#b78719 55%,var(--line)); background: color-mix(in srgb,#b78719 7%,var(--panel)); }
.mixdns-designer-validation.has-warning b { color:#a76f00; }
.mixdns-designer-validation.has-error { border-color: color-mix(in srgb,var(--red) 66%,var(--line)); background: color-mix(in srgb,var(--red) 7%,var(--panel)); }
.mixdns-designer-validation.has-error b { color:var(--red); }
.mixdns-source-chip.fixed { opacity:.78; border-style:dashed; cursor:default; }
.mixdns-source-chip em,
.mixdns-fixed-tag,
.mixdns-linked-tag {
  margin-left:auto;
  font-size:.49rem;
  line-height:1;
  font-style:normal;
  font-weight:900;
  letter-spacing:.045em;
  color:var(--muted);
  white-space:nowrap;
}
.mixdns-linked-tag { color:#9a6b00; }
.mixdns-fixed-tag { color:var(--muted); }
.mixdns-scene-icon.free_surface,
.mixdns-scene-icon.capillary,
.mixdns-scene-icon.lock_exchange,
.mixdns-scene-icon.thermal_layer { border-radius:1px; background:#a65d8c; }
.mixdns-source-actions .subtle-note { align-self:center; max-width:320px; }

/* v1.20.34 MixDNS preload / injector / Web-3D interaction polish. */
.mixdns-injector-help {
  margin: 7px 1px 0;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb,var(--orange) 32%,var(--line));
  border-radius: 6px;
  background: color-mix(in srgb,var(--orange) 6%,transparent);
  color: var(--muted);
  font-size: .58rem;
  line-height: 1.35;
}
#mixdnsWeb3dField.mixdns-web3d-selection-attention:not(:disabled),
#mixdnsWeb3dState.mixdns-web3d-selection-attention:not(:disabled),
#mixdnsWeb3dLoad.mixdns-web3d-selection-attention:not(:disabled) {
  animation: mixdnsLoadStateReadyPulse 1.0s ease-in-out infinite !important;
}
#mixdnsWeb3dField.mixdns-web3d-selection-attention:not(:disabled),
#mixdnsWeb3dState.mixdns-web3d-selection-attention:not(:disabled) {
  background-color: color-mix(in srgb,#d8a31d 9%,var(--panel)) !important;
}
#mixdnsWeb3dLoad[aria-busy="true"] {
  cursor: progress !important;
  opacity: .82;
}


/* v1.20.35 Last Run hydration gate. --------------------------------------- */
.last-run-hydration-overlay {
  position: fixed;
  z-index: 1185;
  inset: 0 0 calc(46px + env(safe-area-inset-bottom, 0px)) 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: color-mix(in srgb, var(--bg-deep) 58%, transparent);
  backdrop-filter: blur(2.5px) saturate(.82);
  -webkit-backdrop-filter: blur(2.5px) saturate(.82);
  cursor: progress;
}
.last-run-hydration-overlay[hidden] { display: none !important; }
.last-run-hydration-card {
  min-width: min(520px, calc(100vw - 44px));
  max-width: 640px;
  display: grid;
  grid-template-columns: 28px minmax(0,1fr);
  grid-template-areas: "spinner title" "spinner detail";
  column-gap: 14px;
  row-gap: 5px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--panel-border));
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 91%, var(--bg-deep) 9%);
  box-shadow: 0 14px 44px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.2);
  color: var(--text);
}
.last-run-hydration-card strong {
  grid-area: title;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: .01em;
}
.last-run-hydration-card > span:last-child {
  grid-area: detail;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.35;
}
.last-run-hydration-spinner {
  grid-area: spinner;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--text) 18%, transparent);
  border-top-color: var(--accent);
  animation: last-run-hydration-spin .72s linear infinite;
}
@keyframes last-run-hydration-spin { to { transform: rotate(360deg); } }
body.mixdns-last-run-hydrating { overflow: hidden; }
body.mixdns-last-run-hydrating[data-new-last-run-style="cheng"] .edge-run-mode-pod {
  transform: translateY(0) !important;
}
body.mixdns-last-run-hydrating .edge-run-mode-pod { z-index: 1200; }
body.mixdns-last-run-hydrating .edge-run-mode-label:disabled,
body.mixdns-last-run-hydrating .edge-run-mode-track:disabled {
  cursor: progress !important;
}
@media (max-width: 700px) {
  .last-run-hydration-overlay {
    inset: 0 0 calc(42px + env(safe-area-inset-bottom, 0px)) 0;
    padding: 14px;
  }
  .last-run-hydration-card {
    min-width: min(420px, calc(100vw - 28px));
    padding: 15px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .last-run-hydration-spinner { animation-duration: 1.4s; }
}


/* v1.20.37 — truthful contiguous Static preload + in-viewport Web-3D navigation. */
.mixdns-web3d-secondary-row { justify-content:flex-end !important; min-height:28px; }
.mixdns-web3d-secondary-row .mixdns-web3d-opacity-pair { margin-left:auto !important; }
.mixdns-vtk-view { position:relative !important; overflow:hidden !important; display:block !important; }
.mixdns-vtk-view > .mixdns-vtk-canvas {
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  z-index:1;
}
.mixdns-vtk-view > .mixdns-vtk-canvas > div { width:100% !important; height:100% !important; }
.mixdns-vtk-nav-overlay {
  position:absolute !important;
  inset:0 !important;
  width:auto !important;
  height:auto !important;
  z-index:8;
  pointer-events:none;
  color:#e7edeb;
  font-size:.58rem;
  font-weight:850;
  text-shadow:0 1px 2px rgba(0,0,0,.8);
}
.mixdns-vtk-zoom-controls,
.mixdns-vtk-pan-controls,
.mixdns-vtk-camera-presets { pointer-events:auto; }
.mixdns-vtk-zoom-controls {
  position:absolute;
  top:10px;
  left:10px;
  display:grid;
  gap:4px;
  padding:6px 7px;
  border:1px solid rgba(210,220,218,.28);
  border-radius:8px;
  background:rgba(14,21,25,.58);
  backdrop-filter:blur(3px);
  box-shadow:0 2px 8px rgba(0,0,0,.28);
}
.mixdns-vtk-zoom-controls > span,
.mixdns-vtk-pan-controls > span { opacity:.82; letter-spacing:.04em; text-transform:uppercase; }
.mixdns-vtk-zoom-controls > div { display:flex; gap:4px; }
.mixdns-vtk-pan-controls {
  position:absolute;
  top:10px;
  right:10px;
  display:grid;
  gap:4px;
  padding:6px 7px;
  border:1px solid rgba(210,220,218,.28);
  border-radius:8px;
  background:rgba(14,21,25,.58);
  backdrop-filter:blur(3px);
  box-shadow:0 2px 8px rgba(0,0,0,.28);
}
.mixdns-vtk-pan-grid { display:flex; align-items:center; gap:5px; }
.mixdns-vtk-pan-horizontal { display:flex; gap:4px; }
.mixdns-vtk-pan-vertical { display:grid; gap:3px; }
.mixdns-vtk-nav-btn,
.mixdns-vtk-camera-presets .mixdns-camera-button {
  min-width:30px !important;
  width:auto !important;
  min-height:28px !important;
  height:28px !important;
  padding:3px 8px !important;
  border:1px solid rgba(220,225,222,.48) !important;
  border-radius:7px !important;
  color:#303533 !important;
  background:linear-gradient(180deg,rgba(244,245,241,.94),rgba(176,181,178,.94)) !important;
  box-shadow:inset 0 1px rgba(255,255,255,.9),0 2px 5px rgba(0,0,0,.34) !important;
  font:850 .64rem/1 system-ui,sans-serif !important;
  text-shadow:none !important;
  cursor:pointer;
}
.mixdns-vtk-nav-btn:not(:disabled):hover,
.mixdns-vtk-camera-presets .mixdns-camera-button:not(:disabled):hover { filter:brightness(1.09) !important; }
.mixdns-vtk-nav-btn:active,
.mixdns-vtk-camera-presets .mixdns-camera-button:active { transform:translateY(1px) !important; }
.mixdns-vtk-nav-btn:disabled,
.mixdns-vtk-camera-presets .mixdns-camera-button:disabled {
  opacity:.38 !important;
  filter:grayscale(.65) !important;
  cursor:not-allowed !important;
}
.mixdns-vtk-camera-presets {
  position:absolute;
  left:50%;
  bottom:10px;
  transform:translateX(-50%);
  display:flex;
  gap:6px;
  padding:6px 8px;
  border:1px solid rgba(210,220,218,.25);
  border-radius:9px;
  background:rgba(14,21,25,.56);
  backdrop-filter:blur(3px);
  box-shadow:0 2px 8px rgba(0,0,0,.30);
  white-space:nowrap;
}
.mixdns-vtk-camera-presets .mixdns-camera-button { min-width:48px !important; }
.mixdns-vtk-view--idle .mixdns-vtk-nav-overlay { opacity:.42; }
.mixdns-vtk-view:not(.mixdns-vtk-view--idle) .mixdns-vtk-nav-overlay { opacity:1; }
@media(max-width:560px){
  .mixdns-vtk-zoom-controls{top:7px;left:7px;padding:4px 5px;}
  .mixdns-vtk-pan-controls{top:7px;right:7px;padding:4px 5px;}
  .mixdns-vtk-camera-presets{bottom:7px;gap:4px;padding:5px 6px;}
  .mixdns-vtk-camera-presets .mixdns-camera-button{min-width:42px !important;padding-inline:6px !important;font-size:.58rem !important;}
  .mixdns-vtk-nav-btn{min-width:27px !important;padding-inline:6px !important;}
}


/* v1.20.38 — repaired Last Run hydration glass, persistent Cheng selection,
   reliable in-viewport 3-D navigation, and full-width dual opacity controls. */
.last-run-hydration-overlay {
  position: fixed !important;
  z-index: 1190 !important;
  inset: 0 0 calc(50px + env(safe-area-inset-bottom, 0px)) 0 !important;
  display: grid !important;
  place-items: center !important;
  padding: 22px !important;
  background: rgba(42, 48, 49, .46) !important;
  backdrop-filter: blur(7px) saturate(.82) !important;
  -webkit-backdrop-filter: blur(7px) saturate(.82) !important;
  cursor: progress !important;
}
.last-run-hydration-overlay[hidden] { display: none !important; }
.last-run-hydration-card {
  background: color-mix(in srgb, var(--panel) 84%, rgba(20,26,28,.62) 16%) !important;
  border-color: color-mix(in srgb, var(--accent) 52%, var(--panel-border)) !important;
  box-shadow: 0 18px 56px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.22) !important;
}
body.mixdns-last-run-hydrating[data-new-last-run-style="cheng"] .edge-run-mode-pod {
  z-index: 1210 !important;
  transform: translateY(0) !important;
}
/* The active Cheng label must remain visibly selected even while the hydration
   transaction temporarily disables the controls. */
body[data-new-last-run-style="cheng"] .edge-run-mode-pod.last-selected #edgeLastRunBtn,
body[data-new-last-run-style="cheng"] #edgeLastRunBtn[aria-pressed="true"] {
  color: #d8bd4f !important;
  opacity: 1 !important;
}
body[data-new-last-run-style="cheng"] .edge-run-mode-pod:not(.last-selected) #edgeNewRunBtn[aria-pressed="true"] {
  color: #d8bd4f !important;
  opacity: 1 !important;
}
body.mixdns-last-run-hydrating[data-new-last-run-style="cheng"] .edge-run-mode-label.active:disabled,
body.mixdns-last-run-hydrating[data-new-last-run-style="cheng"] .edge-run-mode-label[aria-pressed="true"]:disabled {
  color: #d8bd4f !important;
  opacity: 1 !important;
}
body.mixdns-last-run-hydrating[data-new-last-run-style="cheng"] .edge-run-mode-track:disabled {
  opacity: .88 !important;
}

/* Opacity controls consume the whole secondary row. Composite views divide it
   exactly 50/50; single-layer views use the full width. */
.mixdns-web3d-secondary-row {
  width: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
  padding: 2px 0 0 !important;
}
.mixdns-web3d-secondary-row .mixdns-web3d-opacity-pair {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}
.mixdns-web3d-opacity-pair > .mixdns-web3d-opacity {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}
.mixdns-web3d-opacity-pair > .mixdns-web3d-opacity > input[type="range"] {
  width: 100% !important;
  max-width: none !important;
}
.mixdns-web3d-opacity-pair:has(.mixdns-web3d-overlay-opacity[hidden]) {
  grid-template-columns: minmax(0, 1fr) !important;
}

/* Keep all VTK navigation inside the black viewport, above vtk.js' own canvas. */
.mixdns-vtk-view {
  position: relative !important;
  display: block !important;
  overflow: hidden !important;
  isolation: isolate !important;
  min-height: 430px !important;
}
.mixdns-vtk-view > .mixdns-vtk-canvas {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}
.mixdns-vtk-view > .mixdns-vtk-canvas > div,
.mixdns-vtk-view > .mixdns-vtk-canvas canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
}
.mixdns-vtk-view > .mixdns-vtk-nav-overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 30 !important;
  width: auto !important;
  height: auto !important;
  pointer-events: none !important;
  overflow: visible !important;
}
.mixdns-vtk-nav-overlay .mixdns-vtk-zoom-controls {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 31 !important;
  pointer-events: auto !important;
}
.mixdns-vtk-nav-overlay .mixdns-vtk-pan-controls {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 31 !important;
  pointer-events: auto !important;
}
.mixdns-vtk-nav-overlay .mixdns-vtk-camera-presets {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: 12px !important;
  transform: translateX(-50%) !important;
  z-index: 31 !important;
  pointer-events: auto !important;
}
@media (max-width: 700px) {
  .last-run-hydration-overlay {
    inset: 0 0 calc(44px + env(safe-area-inset-bottom, 0px)) 0 !important;
  }
  .mixdns-web3d-secondary-row .mixdns-web3d-opacity-pair {
    gap: 8px !important;
  }
}
@media (max-width: 560px) {
  .mixdns-web3d-secondary-row .mixdns-web3d-opacity-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .mixdns-vtk-view { min-height: 340px !important; }
}


/* v1.20.39 — fast Last Run gate, persistent VTK overlay, semantic opacity labels. */
/* VTK navigation is structural UI, never result content. Keep it visible even
   when an older result/reset path marks the viewport idle. Only the buttons
   themselves are disabled until a volume has actually been rendered. */
#mixdnsVtkView > #mixdnsVtkNavOverlay.mixdns-vtk-nav-overlay {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 80 !important;
  pointer-events: none !important;
}
#mixdnsVtkView > #mixdnsVtkNavOverlay .mixdns-vtk-zoom-controls,
#mixdnsVtkView > #mixdnsVtkNavOverlay .mixdns-vtk-pan-controls,
#mixdnsVtkView > #mixdnsVtkNavOverlay .mixdns-vtk-camera-presets {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 81 !important;
  pointer-events: auto !important;
}
#mixdnsVtkView > #mixdnsVtkNavOverlay .mixdns-vtk-camera-presets {
  display: flex !important;
}
.mixdns-web3d-opacity-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}
/* Once Last Run semantics are attached, the glass exit is deliberately fast;
   long artifact/terminal/Web-3D work continues behind the normal panels. */
.last-run-hydration-card > span:last-child { max-width: 560px; }
.mixdns-web3d-opacity-label { justify-self: start !important; }


/* v1.20.41 — 2-second login hydration glass and projection-correct XYZ triad. */
.last-run-hydration-overlay {
  top: var(--last-run-overlay-top, 0px) !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  inset: var(--last-run-overlay-top, 0px) 0 0 0 !important;
  z-index: 1320 !important;
  background: rgba(38, 44, 46, .48) !important;
  backdrop-filter: blur(9px) saturate(.84) !important;
  -webkit-backdrop-filter: blur(9px) saturate(.84) !important;
  padding: 14px !important;
}
/* v1.20.41 intentionally covers the Cheng platform too. Only the experiment
   tab row and everything above it remain outside the hydration glass. */
body.mixdns-last-run-hydrating[data-new-last-run-style="cheng"] .edge-run-mode-pod {
  z-index: 1200 !important;
}
.last-run-hydration-card {
  gap: 9px !important;
  min-width: min(430px, calc(100vw - 32px)) !important;
  padding: 15px 18px !important;
}
.last-run-hydration-spinner {
  width: 24px !important;
  height: 24px !important;
  border-width: 3px !important;
}

#mixdnsVtkView > #mixdnsVtkNavOverlay.mixdns-vtk-nav-overlay.mixdns-vtk-hud {
  position: absolute !important;
  inset: 0 !important;
  z-index: 220 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-zoom-controls,
#mixdnsVtkNavOverlay .mixdns-vtk-pan-controls,
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets {
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 2px !important;
  pointer-events: auto !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-hud-label {
  color: rgba(245,248,249,.96) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
  text-shadow: 0 1px 3px rgba(0,0,0,.95) !important;
  padding: 0 !important;
  margin: 0 !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-zoom-controls {
  position: absolute !important;
  top: 2px !important;
  left: 2px !important;
  right: auto !important;
  bottom: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-zoom-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  margin-top: 2px !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-controls {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  left: auto !important;
  bottom: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-top {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 2px !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-horizontal {
  display: flex !important;
  gap: 1px !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-vertical {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  align-items: flex-end !important;
  margin-top: 1px !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets {
  position: absolute !important;
  right: 2px !important;
  bottom: 2px !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 2px !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-nav-btn,
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button {
  min-width: 23px !important;
  width: auto !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 1px 5px !important;
  border: 0 !important;
  border-radius: 3px !important;
  outline: 0 !important;
  background: rgba(7,11,14,.48) !important;
  box-shadow: none !important;
  color: rgba(245,248,249,.98) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.95) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button {
  min-width: 36px !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-nav-btn:not(:disabled):hover,
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button:not(:disabled):hover {
  background: rgba(26,34,38,.78) !important;
  filter: brightness(1.16) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-nav-btn:disabled,
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button:disabled {
  opacity: .34 !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-axis-triad {
  position: absolute !important;
  left: 1px !important;
  bottom: 1px !important;
  width: 82px !important;
  height: 82px !important;
  z-index: 222 !important;
  overflow: visible !important;
  pointer-events: none !important;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.9));
}
#mixdnsVtkNavOverlay .mixdns-vtk-axis-triad text {
  font: 900 9px Arial, Helvetica, sans-serif !important;
  paint-order: stroke !important;
  stroke: rgba(0,0,0,.82) !important;
  stroke-width: 2px !important;
}
@media (max-width: 560px) {
  #mixdnsVtkNavOverlay .mixdns-vtk-axis-triad { width: 68px !important; height: 68px !important; }
  #mixdnsVtkNavOverlay .mixdns-vtk-nav-btn,
  #mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button { height: 20px !important; min-height: 20px !important; font-size: 9px !important; padding-inline: 4px !important; }
  #mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button { min-width: 31px !important; }
}

/* v1.20.41 — orthogonal camera presets collapse the screen-normal axis to a point. */
#mixdnsVtkNavOverlay .mixdns-vtk-axis-triad circle[id$="Dot"] {
  stroke: rgba(255,255,255,.75) !important;
  stroke-width: .65px !important;
  paint-order: stroke fill !important;
}


/* v1.20.42 — compact transparent Web-3D navigation HUD. */
#mixdnsVtkNavOverlay .mixdns-vtk-zoom-controls {
  position:absolute !important;
  top:2px !important;
  left:2px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:2px !important;
  pointer-events:auto !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:0 !important;
  margin:0 !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-zoom-btn,
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button {
  background:transparent !important;
  border:1px solid rgba(245,248,249,.42) !important;
  box-shadow:none !important;
  color:rgba(250,252,253,.98) !important;
  text-shadow:0 1px 2px rgba(0,0,0,.95) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-zoom-btn {
  width:22px !important;
  min-width:22px !important;
  height:22px !important;
  min-height:22px !important;
  padding:0 !important;
  border-radius:3px !important;
  font-size:14px !important;
  font-weight:500 !important;
  line-height:18px !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-zoom-btn:not(:disabled):hover,
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button:not(:disabled):hover {
  background:transparent !important;
  border-color:color-mix(in srgb, var(--accent) 72%, rgba(255,255,255,.5)) !important;
  color:var(--accent) !important;
  filter:none !important;
}

#mixdnsVtkNavOverlay .mixdns-vtk-pan-controls {
  position:absolute !important;
  top:2px !important;
  right:2px !important;
  width:64px !important;
  height:64px !important;
  display:block !important;
  pointer-events:auto !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:0 !important;
  margin:0 !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-dial {
  position:relative !important;
  width:64px !important;
  height:64px !important;
  border-radius:50% !important;
  overflow:hidden !important;
  background:transparent !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-rings {
  position:absolute !important;
  inset:0 !important;
  width:64px !important;
  height:64px !important;
  overflow:visible !important;
  pointer-events:none !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-rings circle,
#mixdnsVtkNavOverlay .mixdns-vtk-pan-rings path {
  fill:none !important;
  stroke:rgba(245,248,249,.56) !important;
  stroke-width:.75 !important;
  vector-effect:non-scaling-stroke !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector {
  position:absolute !important;
  inset:0 !important;
  width:64px !important;
  height:64px !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  border-radius:0 !important;
  outline:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:transparent !important;
  cursor:pointer !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector--up { clip-path:polygon(50% 50%,0 0,100% 0); }
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector--right { clip-path:polygon(50% 50%,100% 0,100% 100%); }
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector--down { clip-path:polygon(50% 50%,100% 100%,0 100%); }
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector--left { clip-path:polygon(50% 50%,0 100%,0 0); }
#mixdnsVtkNavOverlay .mixdns-pan-triangle {
  position:absolute !important;
  width:10px !important;
  height:10px !important;
  background:rgba(252,253,254,.98) !important;
  filter:drop-shadow(0 -1px 0 rgba(255,255,255,.26)) drop-shadow(0 2px 2px rgba(0,0,0,.82)) !important;
  transition:background .13s ease, transform .13s ease, filter .13s ease !important;
  pointer-events:none !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector--up .mixdns-pan-triangle {
  left:27px !important; top:7px !important; clip-path:polygon(50% 0,100% 100%,0 100%) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector--right .mixdns-pan-triangle {
  right:7px !important; top:27px !important; clip-path:polygon(100% 50%,0 0,0 100%) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector--down .mixdns-pan-triangle {
  left:27px !important; bottom:7px !important; clip-path:polygon(0 0,100% 0,50% 100%) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector--left .mixdns-pan-triangle {
  left:7px !important; top:27px !important; clip-path:polygon(0 50%,100% 0,100% 100%) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector:not(:disabled):hover .mixdns-pan-triangle {
  background:var(--accent) !important;
  filter:drop-shadow(0 -1px 0 color-mix(in srgb,var(--accent) 42%,white)) drop-shadow(0 3px 3px rgba(0,0,0,.88)) drop-shadow(0 0 4px color-mix(in srgb,var(--accent) 55%,transparent)) !important;
  transform:translateY(-1px) scale(1.12) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector:active .mixdns-pan-triangle {
  transform:translateY(1px) scale(.94) !important;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.72)) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector:disabled {
  cursor:default !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector:disabled .mixdns-pan-triangle {
  opacity:.32 !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-core {
  position:absolute !important;
  left:22px !important;
  top:22px !important;
  width:20px !important;
  height:20px !important;
  border-radius:50% !important;
  pointer-events:none !important;
  background:transparent !important;
}

#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets {
  position:absolute !important;
  right:2px !important;
  bottom:2px !important;
  display:flex !important;
  gap:2px !important;
  pointer-events:auto !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:0 !important;
  margin:0 !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button {
  width:auto !important;
  min-width:34px !important;
  height:22px !important;
  min-height:22px !important;
  padding:1px 5px !important;
  border-radius:3px !important;
  font-size:10px !important;
  font-weight:800 !important;
  line-height:1 !important;
}
#mixdnsVtkNavOverlay #mixdnsWeb3dReset.mixdns-camera-button {
  min-width:78px !important;
}
@media (max-width:560px) {
  #mixdnsVtkNavOverlay .mixdns-vtk-pan-controls,
  #mixdnsVtkNavOverlay .mixdns-vtk-pan-dial,
  #mixdnsVtkNavOverlay .mixdns-vtk-pan-rings,
  #mixdnsVtkNavOverlay .mixdns-vtk-pan-sector { width:58px !important; height:58px !important; }
  #mixdnsVtkNavOverlay .mixdns-vtk-pan-rings { transform:scale(.90625); transform-origin:top left; }
  #mixdnsVtkNavOverlay .mixdns-vtk-pan-sector--up .mixdns-pan-triangle { left:24px !important; top:6px !important; }
  #mixdnsVtkNavOverlay .mixdns-vtk-pan-sector--right .mixdns-pan-triangle { right:6px !important; top:24px !important; }
  #mixdnsVtkNavOverlay .mixdns-vtk-pan-sector--down .mixdns-pan-triangle { left:24px !important; bottom:6px !important; }
  #mixdnsVtkNavOverlay .mixdns-vtk-pan-sector--left .mixdns-pan-triangle { left:6px !important; top:24px !important; }
  #mixdnsVtkNavOverlay .mixdns-vtk-pan-core { left:19px !important; top:19px !important; }
  #mixdnsVtkNavOverlay #mixdnsWeb3dReset.mixdns-camera-button { min-width:68px !important; }
}

/* v1.20.43 — diagonal Pan sector seams + inset white HUD edge relief. */
#mixdnsVtkNavOverlay .mixdns-vtk-zoom-btn,
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button {
  background:transparent !important;
  border-color:rgba(248,250,251,.46) !important;
  box-shadow:
    inset 0 0 1px rgba(255,255,255,.92),
    inset 0 0 4px rgba(255,255,255,.42),
    inset 0 0 8px rgba(255,255,255,.10) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-zoom-btn:not(:disabled):hover,
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button:not(:disabled):hover {
  background:transparent !important;
  box-shadow:
    inset 0 0 1px rgba(255,255,255,.98),
    inset 0 0 5px rgba(255,255,255,.50),
    inset 0 0 9px color-mix(in srgb,var(--accent) 20%,transparent) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-dial {
  background:transparent !important;
  box-shadow:
    inset 0 0 1px rgba(255,255,255,.86),
    inset 0 0 5px rgba(255,255,255,.24),
    inset 0 0 10px rgba(255,255,255,.06) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-rings circle,
#mixdnsVtkNavOverlay .mixdns-vtk-pan-rings path {
  stroke:rgba(249,251,252,.62) !important;
  filter:drop-shadow(0 0 1px rgba(255,255,255,.42)) drop-shadow(0 0 3px rgba(255,255,255,.12)) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector {
  background:transparent !important;
  box-shadow:
    inset 0 0 1px rgba(255,255,255,.74),
    inset 0 0 6px rgba(255,255,255,.10) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-core {
  box-shadow:
    0 0 1px rgba(255,255,255,.78),
    0 0 4px rgba(255,255,255,.18) !important;
}

/* v1.20.44 — stationary Pan hover + 50% white HUD boundaries. */
#mixdnsVtkNavOverlay .mixdns-vtk-zoom-btn,
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button {
  border:1px solid rgba(255,255,255,.50) !important;
  background:transparent !important;
  box-shadow:
    inset 0 0 1px rgba(255,255,255,.50),
    inset 0 0 4px rgba(255,255,255,.18),
    inset 0 0 8px rgba(255,255,255,.05) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-zoom-btn:not(:disabled):hover,
#mixdnsVtkNavOverlay .mixdns-vtk-camera-presets .mixdns-camera-button:not(:disabled):hover {
  border-color:rgba(255,255,255,.50) !important;
  background:transparent !important;
  box-shadow:
    inset 0 0 1px rgba(255,255,255,.50),
    inset 0 0 4px rgba(255,255,255,.18),
    inset 0 0 8px rgba(255,255,255,.05) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-dial {
  box-shadow:none !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-rings circle,
#mixdnsVtkNavOverlay .mixdns-vtk-pan-rings path {
  stroke:rgba(255,255,255,.50) !important;
  stroke-width:1 !important;
  filter:none !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector {
  background:transparent !important;
  box-shadow:none !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector:not(:disabled):hover {
  background:radial-gradient(circle at 50% 50%,
    transparent 0 10px,
    rgba(255,255,255,.50) 10px 30px,
    transparent 30px 100%) !important;
}
#mixdnsVtkNavOverlay .mixdns-pan-triangle {
  transition:background .13s ease !important;
  transform:none !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector:not(:disabled):hover .mixdns-pan-triangle {
  background:var(--accent) !important;
  transform:none !important;
  filter:drop-shadow(0 -1px 0 rgba(255,255,255,.26)) drop-shadow(0 2px 2px rgba(0,0,0,.82)) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-sector:active .mixdns-pan-triangle {
  transform:none !important;
  filter:drop-shadow(0 -1px 0 rgba(255,255,255,.26)) drop-shadow(0 2px 2px rgba(0,0,0,.82)) !important;
}
#mixdnsVtkNavOverlay .mixdns-vtk-pan-core {
  box-shadow:none !important;
}

/* v1.20.45 — compact Designer domain badge and Physics Summary density. */
.mixdns-domain-note {
  align-self:flex-start;
  display:grid;
  grid-auto-flow:row;
  gap:1px;
  min-width:0;
  padding:4px 9px;
  line-height:1.08;
  text-align:right;
  white-space:nowrap;
}
.mixdns-domain-note > span { display:block; }
.mixdns-domain-note .mixdns-domain-size { font-weight:900; }
.mixdns-domain-note .mixdns-domain-grid-size {
  font-size:.54rem;
  font-weight:800;
  opacity:.92;
}

.mixdns-preset-estimate-panel .mixdns-physics-summary {
  margin-top:4px;
  padding:5px 7px;
  gap:1px 9px;
  line-height:1.10;
}
.mixdns-preset-estimate-panel .mixdns-physics-summary > span {
  min-height:0;
  padding:2px 5px;
  align-items:center;
  line-height:1.10;
}
.mixdns-preset-estimate-panel .mixdns-physics-summary :is(small,strong) {
  margin:0;
  line-height:1.10;
}


/* v1.20.46 — keep the two-line Designer domain/grid badge inside its capsule. */
#mixdnsWorkspace .section-title-row:has(#mixdnsDomainNote) > div:first-child {
  flex:1 1 auto;
  min-width:0;
}
#mixdnsDomainNote.mixdns-domain-note {
  flex:0 0 auto;
  width:max-content;
  min-width:max-content;
  max-width:calc(100% - 18px);
  box-sizing:border-box;
  overflow:hidden;
  justify-items:end;
}
#mixdnsDomainNote.mixdns-domain-note > span {
  max-width:100%;
  overflow:hidden;
  text-overflow:clip;
  white-space:nowrap;
}
@media (max-width: 560px) {
  #mixdnsWorkspace .section-title-row:has(#mixdnsDomainNote) {
    flex-wrap:wrap;
  }
  #mixdnsDomainNote.mixdns-domain-note {
    margin-left:auto;
    max-width:100%;
  }
}

/* v1.20.47 — compact main-site / ChengAI navigation in the FluidLab hero. */
.hero-site-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  margin: 4px 0 0;
  white-space: nowrap;
}
.hero-site-links .back-site-link { margin: 0; }
.hero-site-link-separator {
  color: currentColor;
  opacity: .5;
  font-size: .816rem;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

/* v1.20.50 compact TAMUG queue labels + live 3×GPU micro HUD -----------------
   Variant B is adapted from the supplied v0.01.12 horizontal-mobile prototype.
   VRAM remains black/white.  UTIL traffic colors are intentionally fixed and do
   not inherit theme colors: green <30%, yellow <60%, red >=60%. */

/* Split the queue title vertically to reclaim horizontal room for live timing
   metrics without adding a new queue row. */
.global-results-command-strip .global-queue-bar > #globalQueueTitle {
  flex: 0 0 172px;
  min-width: 172px;
  line-height: 1.08;
}
.global-queue-title-line { display: block; white-space: nowrap; }

/* Submit/Cancel/clock keep their 38 px height but give back a little horizontal
   padding.  The submit label is deliberately two lines. */
.global-start-status-row {
  grid-template-columns: auto 118px minmax(0, 1fr);
  gap: 9px;
}
.global-start-status-row .global-start-row { gap: 6px; }
#globalStartBtn.global-submit-btn {
  min-height: 38px;
  height: 38px;
  padding: 3px 10px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.02;
  white-space: nowrap;
}
#globalStartBtn.global-submit-btn > span { display: block; }
#globalCancelBtn { padding-left: 9px; padding-right: 9px; }
.global-start-row .run-stopwatch {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  padding-left: 3px;
  padding-right: 3px;
  font-size: 20px;
  letter-spacing: .5px;
}

/* The apparent extra rectangle around Submit/Cancel/clock during postprocessing
   came from the generic Last Run locked-surface inset shadow targeting
   .global-start-row.  It is a live control cluster, not a locked input surface. */
body.global-last-run-active .global-start-row {
  filter: none !important;
}
body.edge-last-run-active .global-start-row {
  box-shadow: none !important;
}

/* --- Variant B: horizontal/mobile 3×GPU status micro-HUD ------------------- */
.global-gpu-hud {
  --gpu-hud-index: 10px;
  --gpu-hud-vram: 40px;
  --gpu-hud-util: 42px;
  --gpu-hud-gap: 2px;
  --gpu-hud-row-h: 9px;
  --gpu-hud-meter-h: 7px;
  position: relative;
  width: 111px;
  height: 38px;
  padding: 6px 3px 3px 8px;
  align-self: center;
  justify-self: center;
  box-sizing: border-box;
  color: var(--text);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--metal-1) 22%, transparent), transparent),
    color-mix(in srgb, var(--metal-3) 76%, var(--bg-deep) 24%);
  border: 1px solid color-mix(in srgb, var(--line-strong) 86%, var(--text) 14%);
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--text) 13%, transparent),
    inset 0 -1px 2px color-mix(in srgb, var(--bg-deep) 46%, transparent),
    0 1px 2px rgba(0,0,0,.18);
  user-select: none;
  transition: width .16s ease, padding .16s ease, opacity .16s ease;
  z-index: 2;
}
.global-gpu-hud-rows {
  display: grid;
  gap: 1px;
}
.global-gpu-hud-row {
  position: relative;
  min-height: var(--gpu-hud-row-h);
  display: grid;
  grid-template-columns: var(--gpu-hud-index) var(--gpu-hud-vram) var(--gpu-hud-util);
  gap: var(--gpu-hud-gap);
  align-items: center;
  outline: none;
}
.global-gpu-index {
  width: var(--gpu-hud-index);
  height: var(--gpu-hud-index);
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--text) 48%, var(--line) 52%);
  border-radius: 2px;
  color: var(--text);
  background: linear-gradient(180deg, color-mix(in srgb, var(--text) 12%, transparent), color-mix(in srgb, var(--bg-deep) 18%, transparent));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 10%, transparent);
  font-size: 6px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.global-gpu-meter {
  position: relative;
  height: var(--gpu-hud-meter-h);
  overflow: hidden;
  border-radius: 2px;
}
.global-gpu-vram-meter {
  background: rgba(248,248,245,.94);
  border: 1px solid color-mix(in srgb, var(--line-strong) 72%, #fff 28%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.13);
}
.global-gpu-vram-used {
  display: block;
  width: 0;
  height: 100%;
  min-width: 0;
  background: #080909;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.14);
  transition: width .28s ease;
}
.global-gpu-util-meter {
  background: color-mix(in srgb, var(--bg-deep) 32%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}
.global-gpu-util-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 1px;
  transition: width .28s ease, background-color .18s ease;
}
/* Fixed semantic colors from the supplied prototype. */
.global-gpu-util-fill.util-low { background: #3fd07d; }
.global-gpu-util-fill.util-mid { background: #e3c04f; }
.global-gpu-util-fill.util-high { background: #ef6663; }

.global-gpu-hud-tag,
.global-gpu-hud-toggle {
  position: absolute;
  z-index: 4;
  min-height: 0;
  padding: 1px 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--line-strong) 78%, var(--text) 22%);
  border-radius: 2px;
  background: color-mix(in srgb, var(--metal-2) 88%, var(--bg-deep) 12%);
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
  font-size: 5.5px;
  font-weight: 800;
  letter-spacing: .10em;
  line-height: 1;
  white-space: nowrap;
}
.global-gpu-hud-vram-tag {
  top: 0;
  left: calc(8px + var(--gpu-hud-index) + var(--gpu-hud-gap) + (var(--gpu-hud-vram) / 2));
  transform: translate(-50%, -50%);
}
.global-gpu-hud-util-tag {
  top: 0;
  left: calc(8px + var(--gpu-hud-index) + var(--gpu-hud-gap) + var(--gpu-hud-vram) + var(--gpu-hud-gap) + (var(--gpu-hud-util) / 2));
  transform: translate(-50%, -50%);
}
.global-gpu-hud-toggle {
  appearance: none;
  -webkit-appearance: none;
  left: 0;
  top: 50%;
  min-height: 12px;
  padding: 1px 4px;
  border-radius: 999px;
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(-90deg);
  transition: transform .12s ease, box-shadow .12s ease;
}
.global-gpu-hud-toggle:hover {
  transform: translate(-50%, calc(-50% - 1px)) rotate(-90deg);
  box-shadow: 0 3px 6px rgba(0,0,0,.22), inset 0 1px 0 color-mix(in srgb, var(--text) 9%, transparent);
}
.global-gpu-hud-toggle:active {
  transform: translate(-50%, -50%) rotate(-90deg);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.28);
}
/* Override the generic FluidLab button hover translate without losing the
   capsule's required -90deg orientation. */
button.global-gpu-hud-toggle:not(:disabled):hover {
  transform: translate(-50%, calc(-50% - 1px)) rotate(-90deg);
}
button.global-gpu-hud-toggle:not(:disabled):active {
  transform: translate(-50%, -50%) rotate(-90deg);
}
.global-gpu-hud-toggle:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }
.global-gpu-hud-arrow {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-left: 2.5px solid transparent;
  border-right: 2.5px solid transparent;
  border-top: 4px solid var(--muted);
}
.global-gpu-hud.collapsed {
  width: 96px;
  padding-top: 2px;
  padding-right: 2px;
  padding-bottom: 2px;
  padding-left: 8px;
}
.global-gpu-hud.collapsed .global-gpu-hud-tag { display: none; }
.global-gpu-hud.collapsed .global-gpu-hud-row {
  grid-template-columns: var(--gpu-hud-vram) var(--gpu-hud-util);
  gap: 1px;
}
.global-gpu-hud.collapsed .global-gpu-index { display: none; }
.global-gpu-hud.collapsed .global-gpu-hud-arrow {
  border-top: 0;
  border-bottom: 4px solid var(--muted);
}
.global-gpu-hud.offline { opacity: .58; }
.global-gpu-hud-row.telemetry-unavailable .global-gpu-vram-meter,
.global-gpu-hud-row.telemetry-unavailable .global-gpu-util-meter {
  background: color-mix(in srgb, var(--muted) 18%, transparent);
}
.global-gpu-tooltip {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 5px);
  min-width: 176px;
  padding: 5px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: color-mix(in srgb, var(--bg-deep) 94%, transparent);
  color: var(--text);
  box-shadow: 0 6px 16px rgba(0,0,0,.30);
  font-size: 8px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity .12s ease, transform .12s ease;
}
.global-gpu-hud-row:hover .global-gpu-tooltip,
.global-gpu-hud-row.tooltip-open .global-gpu-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Light themes retain their own panel palette; semantic UTIL colors above remain
   exactly the same. */
body[data-theme="silver"] .global-gpu-hud,
body[data-theme="solarized-light"] .global-gpu-hud,
body[data-theme="paper-folder"] .global-gpu-hud {
  background:
    linear-gradient(180deg, rgba(255,255,255,.54), rgba(255,255,255,.08)),
    color-mix(in srgb, var(--metal-2) 80%, var(--bg) 20%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.74), inset 0 -1px 2px rgba(45,50,52,.12), 0 1px 2px rgba(45,50,52,.18);
}
body[data-theme="silver"] :is(.global-gpu-hud-tag,.global-gpu-hud-toggle),
body[data-theme="solarized-light"] :is(.global-gpu-hud-tag,.global-gpu-hud-toggle),
body[data-theme="paper-folder"] :is(.global-gpu-hud-tag,.global-gpu-hud-toggle) {
  background: color-mix(in srgb, var(--metal-1) 84%, var(--metal-2) 16%);
}
body[data-theme="silver"] .global-gpu-tooltip,
body[data-theme="solarized-light"] .global-gpu-tooltip,
body[data-theme="paper-folder"] .global-gpu-tooltip {
  background: color-mix(in srgb, var(--metal-1) 96%, #fff 4%);
}

@media (max-width: 760px) {
  /* Keep the existing controls on one full-width row.  Put the compact GPU HUD
     and progress panel side-by-side below, so Variant B does not consume its own
     additional mobile row. */
  .global-start-status-row {
    grid-template-columns: 111px minmax(0, 1fr);
    gap: 8px;
  }
  .global-start-status-row .global-start-row { grid-column: 1 / -1; }
  .global-gpu-hud { grid-column: 1; grid-row: 2; justify-self: start; margin-left: 5px; }
  .global-inline-job-progress { grid-column: 2; grid-row: 2; align-self: center; }
  .global-inline-status-line { gap: 5px; flex-wrap: nowrap; }
  #globalProgressMessage { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 680px) {
  /* The older phone queue layout already puts metrics on their own row.  Let the
     deliberately split title keep its two lines without adding another level. */
  .global-results-command-strip .global-queue-bar > #globalQueueTitle {
    min-width: 0;
    width: auto;
    line-height: 1.05;
  }
  #globalStartBtn.global-submit-btn { padding-left: 8px; padding-right: 8px; }
  #globalCancelBtn { padding-left: 7px; padding-right: 7px; }
  .global-start-row .run-stopwatch { width: 101px; min-width: 101px; max-width: 101px; padding-left: 2px; padding-right: 2px; font-size: 18px; letter-spacing: .3px; }
}

/* v1.20.56 — verified but not-yet-activated accounts receive five trial submits. */
.activation-trial-warning {
  width: 100%;
  box-sizing: border-box;
  margin: 3px 0 0;
  padding: 3px 8px;
  border: 1px solid rgba(212, 137, 31, 0.48);
  border-radius: 5px;
  background: rgba(188, 118, 20, 0.09);
  color: var(--text, #1e2528);
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
}
.activation-trial-warning[hidden] { display: none !important; }
.activation-trial-warning a {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.activation-trial-warning.is-limit-error {
  border-color: rgba(211, 54, 54, 0.78);
  background: rgba(205, 38, 38, 0.11);
  color: #b51f28;
  font-weight: 700;
}
body[data-theme="graphite"] .activation-trial-warning,
body[data-theme="ocean-steel"] .activation-trial-warning,
body[data-theme="jade"] .activation-trial-warning {
  color: rgba(244, 239, 223, 0.94);
}
body[data-theme="graphite"] .activation-trial-warning.is-limit-error,
body[data-theme="ocean-steel"] .activation-trial-warning.is-limit-error,
body[data-theme="jade"] .activation-trial-warning.is-limit-error {
  color: #ff8585;
}
.global-results-command-strip > .activation-trial-warning { margin: 0 4px 4px; width: calc(100% - 8px); }
.mixdns-operations-panel > .activation-trial-warning { margin-bottom: 5px; }
@media (max-width: 720px) {
  .activation-trial-warning { font-size: 10px; padding: 3px 6px; line-height: 1.2; }
}
