:root {
  color-scheme: light dark;
  --font-sans: "Aptos", "Segoe UI Variable Display", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", sans-serif;
  --bg: #edf3ff;
  --surface: rgba(255, 255, 255, 0.2);
  --surface-strong: rgba(255, 255, 255, 0.28);
  --surface-soft: rgba(255, 255, 255, 0.1);
  --line: rgba(78, 102, 148, 0.22);
  --line-strong: rgba(103, 129, 178, 0.4);
  --text: #0d1420;
  --text-soft: #5b6782;
  --text-faint: #7f8aa6;
  --primary: #145eff;
  --primary-soft: rgba(20, 94, 255, 0.18);
  --success: #0dba83;
  --success-soft: rgba(13, 186, 131, 0.16);
  --danger: #d85366;
  --danger-soft: rgba(216, 83, 102, 0.16);
  --glass-shadow: 0 20px 60px rgba(30, 58, 110, 0.14);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.44);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06111f;
    --surface: rgba(10, 20, 36, 0.24);
    --surface-strong: rgba(14, 24, 42, 0.34);
    --surface-soft: rgba(255, 255, 255, 0.05);
    --line: rgba(144, 175, 226, 0.16);
    --line-strong: rgba(174, 204, 255, 0.3);
    --text: #eff6ff;
    --text-soft: #a7b8d8;
    --text-faint: #7b8fb2;
    --primary: #7ea7ff;
    --primary-soft: rgba(126, 167, 255, 0.18);
    --success: #46d4a3;
    --success-soft: rgba(70, 212, 163, 0.18);
    --danger: #ff8a9b;
    --danger-soft: rgba(255, 138, 155, 0.18);
    --glass-shadow: 0 24px 72px rgba(0, 0, 0, 0.38);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }
}

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

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(53, 130, 255, 0.2), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(68, 208, 195, 0.16), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(233, 94, 183, 0.12), transparent 28%),
    linear-gradient(140deg, #eef4ff 0%, #f9fbff 100%);
  overflow-x: hidden;
}

@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(circle at 18% 10%, rgba(50, 126, 255, 0.18), transparent 24%),
      radial-gradient(circle at 82% 12%, rgba(56, 201, 186, 0.18), transparent 24%),
      radial-gradient(circle at 50% 100%, rgba(239, 86, 166, 0.12), transparent 28%),
      linear-gradient(140deg, #06111f 0%, #0b182b 100%);
  }
}

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

button {
  border: 0;
  background: none;
}

input,
textarea {
  width: 100%;
  color: var(--text);
}

.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.scene::before,
.scene::after {
  content: "";
  position: absolute;
  inset: -22%;
  pointer-events: none;
}

.scene::before {
  background:
    conic-gradient(from 0deg at 30% 35%, rgba(74, 146, 255, 0.16), transparent 22%, rgba(77, 221, 201, 0.14) 44%, transparent 66%, rgba(255, 122, 181, 0.1) 86%, transparent 100%);
  filter: blur(42px);
  opacity: 0.82;
  animation: conicFlow 28s linear infinite;
}

.scene::after {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 12%),
    radial-gradient(circle at 62% 76%, rgba(255, 255, 255, 0.12), transparent 10%),
    radial-gradient(circle at 80% 26%, rgba(255, 255, 255, 0.08), transparent 8%);
  filter: blur(28px);
  opacity: 0.76;
  animation: highlightDrift 16s ease-in-out infinite alternate;
}

.scene__fluid,
.scene__ripple,
.scene__veil,
.scene__specular {
  position: absolute;
  inset: -18%;
  filter: blur(40px);
}

.scene__fluid {
  border-radius: 40%;
  mix-blend-mode: screen;
  opacity: 0.88;
}

.scene__fluid--a {
  background:
    radial-gradient(circle at 20% 28%, rgba(63, 153, 255, 0.58), transparent 18%),
    radial-gradient(circle at 62% 36%, rgba(113, 113, 255, 0.3), transparent 16%),
    radial-gradient(circle at 48% 72%, rgba(76, 219, 206, 0.34), transparent 17%);
  animation: fluidShiftA 16s ease-in-out infinite alternate;
}

.scene__fluid--b {
  background:
    radial-gradient(circle at 74% 20%, rgba(80, 203, 192, 0.42), transparent 15%),
    radial-gradient(circle at 18% 72%, rgba(255, 121, 176, 0.3), transparent 15%),
    radial-gradient(circle at 56% 54%, rgba(88, 137, 255, 0.34), transparent 18%);
  animation: fluidShiftB 20s ease-in-out infinite alternate;
}

.scene__fluid--c {
  background:
    radial-gradient(circle at 38% 22%, rgba(255, 255, 255, 0.24), transparent 8%),
    radial-gradient(circle at 76% 58%, rgba(255, 255, 255, 0.18), transparent 8%),
    radial-gradient(circle at 18% 46%, rgba(255, 255, 255, 0.14), transparent 6%);
  animation: fluidShiftC 12s ease-in-out infinite alternate;
}

.scene__veil {
  background:
    linear-gradient(100deg, transparent 0, rgba(255, 255, 255, 0.08) 18%, transparent 28%),
    linear-gradient(280deg, transparent 0, rgba(255, 255, 255, 0.08) 14%, transparent 24%);
  opacity: 0.84;
  animation: veilSweep 14s ease-in-out infinite alternate;
}

.scene__specular {
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.22), transparent 10%),
    radial-gradient(circle at 54% 44%, rgba(255, 255, 255, 0.12), transparent 7%),
    radial-gradient(circle at 78% 66%, rgba(255, 255, 255, 0.16), transparent 9%);
  opacity: 0.75;
  animation: specularPulse 9s ease-in-out infinite alternate;
}

.scene__ripple {
  background:
    linear-gradient(110deg, transparent 0, rgba(255, 255, 255, 0.1) 26%, transparent 40%),
    linear-gradient(290deg, transparent 0, rgba(255, 255, 255, 0.08) 20%, transparent 34%);
  opacity: 0.7;
  animation: rippleShift 20s linear infinite;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: 16px 18px 34px;
}

.glass {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 22%),
    linear-gradient(150deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--line);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.24), transparent 16%),
    radial-gradient(circle at 86% 24%, rgba(255, 255, 255, 0.14), transparent 14%),
    radial-gradient(circle at 62% 82%, rgba(255, 255, 255, 0.1), transparent 12%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 22%, transparent 70%, rgba(255, 255, 255, 0.1));
  mix-blend-mode: screen;
  opacity: 0.82;
  pointer-events: none;
}

.glass::after {
  content: "";
  position: absolute;
  inset: auto auto 10% 8%;
  width: 82px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.glass > * {
  position: relative;
  z-index: 1;
}

.glass__droplets {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glass__droplet {
  position: absolute;
  border-radius: 52% 48% 46% 54%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.82) 0, rgba(255, 255, 255, 0.42) 20%, rgba(255, 255, 255, 0.14) 48%, rgba(255, 255, 255, 0.03) 68%, transparent 76%),
    radial-gradient(circle at 68% 72%, rgba(0, 0, 0, 0.08), transparent 54%);
  box-shadow:
    inset 2px 2px 6px rgba(255, 255, 255, 0.46),
    inset -3px -4px 8px rgba(255, 255, 255, 0.12),
    0 8px 16px rgba(11, 20, 36, 0.08);
  opacity: 0.68;
}

.glass__droplet::before,
.glass__droplet::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.glass__droplet::before {
  inset: 14% 54% auto 18%;
  height: 28%;
  background: rgba(255, 255, 255, 0.54);
  filter: blur(1px);
}

.glass__droplet::after {
  inset: auto 18% 16% 40%;
  height: 20%;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(2px);
}

.glass__trail {
  position: absolute;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.04));
  opacity: 0.26;
  filter: blur(0.6px);
}

.topbar,
.control-card,
.records-card,
.challenge-card,
.floating-panel,
.modal__dialog {
  border-radius: var(--radius-lg);
}

.topbar,
.control-card,
.records-card,
.challenge-card {
  padding: 16px 18px;
}

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

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand__mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.brand__mark svg,
.action-button svg,
.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand__mark svg {
  width: 30px;
  height: 30px;
}

.brand__eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.brand__copy h1,
.control-card__head h2,
.challenge-card__head h2,
.records-card__head h2,
.floating-panel h3,
.modal__head h3 {
  margin: 6px 0 4px;
  font-size: clamp(1.25rem, 1.55vw, 1.72rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.brand__copy p,
.challenge-card p,
.records-card__hint small,
.modal__copy {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.topbar__chips,
.control-card__meta,
.summary-strip,
.modal__summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.top-chip,
.meta-pill,
.summary-chip {
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--line);
}

.top-chip,
.summary-chip {
  display: grid;
  gap: 4px;
  min-width: 104px;
}

.top-chip span,
.summary-chip span {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.top-chip strong,
.summary-chip strong,
.meta-pill {
  font-size: 0.95rem;
}

.meta-pill {
  color: var(--text);
}

.layout {
  display: grid;
  gap: 12px;
}

.control-card__head,
.challenge-card__head,
.records-card__head,
.records-card__toolbar,
.floating-panel__head,
.modal__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.control-card__bar {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 14px;
  align-items: end;
  margin-top: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field__label {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.field input,
.modal__textarea {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.field input:focus,
.modal__textarea:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px var(--primary-soft), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.action-bar,
.challenge-card__actions,
.modal__actions,
.filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-button,
.icon-button,
.filter-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.action-button::before,
.icon-button::before,
.filter-button::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent 24%, transparent 74%, rgba(255, 255, 255, 0.1)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 54%);
  opacity: 0.8;
  pointer-events: none;
}

.action-button:hover,
.icon-button:hover,
.filter-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 26px rgba(31, 56, 102, 0.14);
}

.action-button.is-locked,
.mini-button.is-locked {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.12);
}

.action-button span,
.filter-button {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.action-button--primary {
  background: linear-gradient(135deg, #3d88ff, #145eff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(20, 94, 255, 0.24);
}

.action-button--buy {
  background: linear-gradient(135deg, rgba(17, 94, 89, 0.16), rgba(13, 186, 131, 0.08));
  color: var(--success);
}

.action-button--success {
  color: var(--success);
  background: linear-gradient(150deg, rgba(13, 186, 131, 0.14), rgba(13, 186, 131, 0.05));
}

.action-button--danger {
  color: var(--danger);
  background: linear-gradient(150deg, rgba(216, 83, 102, 0.14), rgba(216, 83, 102, 0.05));
}

.icon-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.records-card__toolbar {
  margin: 10px 0 12px;
}

.records-card__hint {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.records-card__hint span {
  color: var(--text);
  font-size: 0.94rem;
}

.filter-button {
  min-height: 40px;
  padding-inline: 14px;
  color: var(--text-soft);
}

.filter-button.is-active {
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: inset 0 0 0 1px rgba(20, 94, 255, 0.16), 0 10px 24px rgba(31, 56, 102, 0.12);
}

.table-shell {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(7, 15, 24, 0.08);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  color: var(--text-faint);
  font-weight: 600;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.table-empty {
  padding: 34px 12px;
  text-align: center;
  color: var(--text-faint);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.83rem;
  line-height: 1;
  border: 1px solid transparent;
}

.status-pill--pending,
.status-pill--running {
  color: var(--primary);
  background: rgba(20, 94, 255, 0.12);
  border-color: rgba(20, 94, 255, 0.18);
}

.status-pill--success {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(13, 186, 131, 0.24);
}

.status-pill--failed {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(216, 83, 102, 0.24);
}

.status-pill--cancelled,
.status-pill--unknown {
  color: var(--text-soft);
  background: rgba(126, 139, 162, 0.12);
  border-color: rgba(126, 139, 162, 0.16);
}

.record-message {
  max-width: 360px;
  color: var(--text-soft);
  line-height: 1.6;
  word-break: break-word;
}

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

.mini-button {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  color: var(--text);
  cursor: pointer;
}

.mini-button:hover {
  border-color: var(--line-strong);
}

.challenge-card {
  display: grid;
  gap: 12px;
}

.challenge-card__frame {
  min-height: 360px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(6, 12, 20, 0.42);
}

.challenge-card__frame iframe {
  width: 100%;
  height: 360px;
  border: 0;
  background: transparent;
}

.floating-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  width: min(440px, calc(100vw - 24px));
  padding: 18px;
  z-index: 35;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 24px 68px rgba(16, 31, 58, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -22px 36px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translate3d(0, -12px, 0) scale(0.96);
  transform-origin: top right;
}

.floating-panel::after {
  inset: 8px;
  width: auto;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent);
  filter: none;
  opacity: 1;
}

.floating-panel__head,
.modal__head {
  margin-bottom: 10px;
}

.floating-panel.is-active {
  animation: panelPopIn 320ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-panel.is-closing {
  animation: panelPopOut 220ms cubic-bezier(0.4, 0, 1, 1) forwards;
}

.floating-panel__list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-soft);
  line-height: 1.8;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 40;
}

.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 20, 0.46);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal__dialog {
  position: relative;
  width: min(720px, calc(100vw - 24px));
  padding: 18px;
}

.modal__textarea {
  min-height: 230px;
  resize: vertical;
  margin: 12px 0;
}

.modal__result {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
}

.modal__result ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.7;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 50;
}

.toast {
  min-width: 260px;
  max-width: 400px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--surface-strong), var(--surface));
  box-shadow: var(--glass-shadow);
  color: var(--text);
  animation: toastIn 220ms ease;
}

.toast--success {
  border-color: rgba(13, 186, 131, 0.26);
}

.toast--error {
  border-color: rgba(216, 83, 102, 0.26);
}

.is-hidden {
  display: none !important;
}

@keyframes fluidShiftA {
  0% { transform: translate3d(-3vw, -1vh, 0) scale(0.96) rotate(0deg); }
  50% { transform: translate3d(5vw, 4vh, 0) scale(1.08) rotate(8deg); }
  100% { transform: translate3d(2vw, 10vh, 0) scale(0.94) rotate(16deg); }
}

@keyframes fluidShiftB {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-8vw, 6vh, 0) scale(1.12); }
  100% { transform: translate3d(-4vw, -2vh, 0) scale(0.98); }
}

@keyframes fluidShiftC {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vw, -6vh, 0) scale(1.08); }
  100% { transform: translate3d(-5vw, 4vh, 0) scale(0.92); }
}

@keyframes rippleShift {
  0% { transform: translate3d(-2%, 0, 0) rotate(0deg); }
  100% { transform: translate3d(2%, -2%, 0) rotate(4deg); }
}

@keyframes conicFlow {
  0% { transform: translate3d(-2vw, -2vh, 0) rotate(0deg) scale(1); }
  100% { transform: translate3d(2vw, 3vh, 0) rotate(360deg) scale(1.08); }
}

@keyframes highlightDrift {
  0% { transform: translate3d(-3vw, 0, 0) scale(0.96); }
  100% { transform: translate3d(4vw, -2vh, 0) scale(1.06); }
}

@keyframes veilSweep {
  0% { transform: translate3d(-6vw, -1vh, 0) rotate(-4deg) scale(1); }
  100% { transform: translate3d(6vw, 3vh, 0) rotate(5deg) scale(1.1); }
}

@keyframes specularPulse {
  0% { transform: scale(0.96); opacity: 0.48; }
  100% { transform: scale(1.08); opacity: 0.82; }
}

@keyframes panelPopIn {
  from {
    opacity: 0;
    transform: translate3d(0, -14px, 0) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes panelPopOut {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate3d(0, -10px, 0) scale(0.96);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .topbar,
  .control-card__head,
  .control-card__bar,
  .records-card__head,
  .records-card__toolbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .control-card__bar {
    display: grid;
  }

  .records-card__hint {
    justify-items: start;
  }
}

@media (max-width: 860px) {
  .shell {
    padding-inline: 12px;
    padding-top: 12px;
  }

  .topbar,
  .control-card,
  .records-card,
  .challenge-card,
  .floating-panel,
  .modal__dialog {
    padding: 14px;
  }

  .brand {
    align-items: flex-start;
  }

  .topbar__chips,
  .summary-strip,
  .modal__summary,
  .control-card__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floating-panel {
    right: 12px;
    left: 12px;
    width: auto;
    top: auto;
    bottom: 12px;
  }

  .toast-stack {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .topbar__chips,
  .summary-strip,
  .modal__summary,
  .control-card__meta {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
