: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);
}

.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-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: 34px;
  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; }
}
