:root {
  --bg-start: #07111f;
  --bg-end: #0d2741;
  --panel: rgba(9, 23, 39, 0.72);
  --panel-strong: rgba(10, 28, 47, 0.92);
  --line: rgba(162, 224, 255, 0.2);
  --text-main: #f2f7ff;
  --text-soft: rgba(242, 247, 255, 0.72);
  --accent: #4dd7ff;
  --accent-strong: #1b9fc4;
  --warm: #ffd86b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --content-width: min(1180px, calc(100vw - 32px));
  --font-display: "Trebuchet MS", "Avenir Next", "PingFang SC", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background:
    radial-gradient(circle at top, rgba(91, 219, 255, 0.18), transparent 34%),
    linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 18px 16px 26px;
}

.app {
  width: var(--content-width);
  min-height: calc(100vh - 44px);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(175, 230, 255, 0.12);
  border-radius: 38px;
  box-shadow: var(--shadow);
  background:
    linear-gradient(rgba(4, 12, 24, 0.55), rgba(4, 12, 24, 0.76)),
    url("./图片素材/bg_lab.png.png") center / cover no-repeat;
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(77, 215, 255, 0.08), transparent 34%),
    radial-gradient(circle at 80% 20%, rgba(255, 216, 107, 0.08), transparent 24%);
  pointer-events: none;
}

.screen {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 44px);
  padding: 28px;
  display: none;
}

.screen-active {
  display: block;
}

.intro-screen {
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.intro-screen.screen-active {
  display: flex;
}

.intro-screen::before,
.intro-screen::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.intro-screen::before {
  inset: 8% auto auto 50%;
  width: min(64vw, 760px);
  height: min(64vw, 760px);
  border-radius: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle, rgba(77, 215, 255, 0.24) 0%, rgba(77, 215, 255, 0.08) 28%, transparent 64%);
  filter: blur(10px);
  opacity: 0.72;
  animation: introPulse 5.4s ease-in-out infinite;
}

.intro-screen::after {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 12, 24, 0.08), rgba(4, 12, 24, 0.44) 44%, rgba(4, 12, 24, 0.76) 100%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.022) 0,
      rgba(255, 255, 255, 0.022) 1px,
      transparent 1px,
      transparent 8px
    );
  opacity: 0.88;
}

.intro-overlay {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 24px));
  padding: 54px 42px 46px;
  border-radius: 34px;
  border: 1px solid rgba(186, 233, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(8, 20, 34, 0.56), rgba(7, 18, 31, 0.8) 58%, rgba(7, 18, 31, 0.92));
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.intro-overlay::before,
.intro-overlay::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.intro-overlay::before {
  inset: 0;
  background:
    linear-gradient(135deg, rgba(77, 215, 255, 0.14), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(255, 216, 107, 0.12), transparent 18%);
}

.intro-overlay::after {
  inset: 16px;
  border-radius: 24px;
  border: 1px solid rgba(186, 233, 255, 0.08);
}

.intro-screen.is-awake .intro-overlay {
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(77, 215, 255, 0.08),
    0 0 46px rgba(77, 215, 255, 0.16);
}

.intro-overlay .subtitle {
  max-width: 520px;
  margin-inline: auto;
}

.intro-overlay .primary-btn {
  margin-top: 30px;
}

.screen-copy {
  max-width: 780px;
}

.screen-copy.compact {
  max-width: 520px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--warm);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.intro-overlay .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: rgba(128, 225, 255, 0.94);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.26em;
}

.intro-overlay .eyebrow::before,
.intro-overlay .eyebrow::after {
  content: "";
  display: block;
  flex: none;
}

.intro-overlay .eyebrow::before {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #aff1ff 0%, #4dd7ff 68%, rgba(77, 215, 255, 0.2) 100%);
  box-shadow: 0 0 14px rgba(77, 215, 255, 0.45);
}

.intro-overlay .eyebrow::after {
  width: 58px;
  height: 1px;
  background: linear-gradient(90deg, rgba(77, 215, 255, 0.9), transparent);
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.02;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(34px, 5.4vw, 64px);
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.subtitle {
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.7;
}

.intro-overlay h1 {
  max-width: 640px;
  margin-inline: auto;
  font-size: clamp(42px, 6vw, 78px);
  letter-spacing: 0.01em;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.3);
  animation: introRise 680ms ease both;
}

.intro-overlay .subtitle {
  margin-top: 20px;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.9;
  color: rgba(242, 247, 255, 0.78);
  animation: introRise 680ms ease 120ms both;
}

.agent-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.agent-card {
  position: relative;
  padding: 18px;
  min-height: 340px;
  border: 1px solid rgba(186, 233, 255, 0.16);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(13, 29, 48, 0.88), rgba(8, 20, 33, 0.92));
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.agent-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(77, 215, 255, 0.08), transparent 32%);
  pointer-events: none;
}

.agent-card:hover,
.agent-card.is-selected {
  transform: translateY(-4px);
  border-color: rgba(77, 215, 255, 0.7);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.28);
}

.agent-card.is-selected {
  outline: 2px solid rgba(77, 215, 255, 0.3);
}

.agent-card-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.28));
}

.agent-card-body {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  display: grid;
  grid-template-rows: 22px 48px 28px minmax(72px, auto);
  align-content: start;
  justify-items: center;
  text-align: center;
}

.agent-card-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(77, 215, 255, 0.88);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

.agent-card h3 {
  margin: 8px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-size: 26px;
  line-height: 1.12;
  color: var(--text-main);
  text-align: center;
}

.agent-trait {
  margin: 6px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: rgba(77, 215, 255, 0.92);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

.agent-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 14px;
  text-align: center;
}

.agent-persona {
  margin-top: 8px;
}

.selection-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(6, 17, 29, 0.68);
  border: 1px solid rgba(186, 233, 255, 0.14);
}

.selection-hint,
.panel-label,
.result-color {
  margin: 0;
  color: var(--text-soft);
}

.primary-btn,
.back-btn,
.swatch-btn {
  border: 0;
}

.primary-btn {
  min-width: 220px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  color: #062033;
  font-weight: 700;
  background: linear-gradient(135deg, #fff1a8, #56ddff);
  box-shadow: 0 12px 24px rgba(77, 215, 255, 0.22);
}

.intro-overlay .primary-btn {
  min-width: 240px;
  padding: 16px 30px;
  font-size: 16px;
  letter-spacing: 0.12em;
  box-shadow:
    0 16px 34px rgba(77, 215, 255, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
  animation: introRise 680ms ease 240ms both, introButtonPulse 2.8s ease-in-out 1.4s infinite;
}

.intro-overlay .primary-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow:
    0 18px 40px rgba(77, 215, 255, 0.34),
    0 0 20px rgba(77, 215, 255, 0.18);
}

.primary-btn:disabled {
  cursor: not-allowed;
  color: rgba(6, 32, 51, 0.42);
  background: linear-gradient(135deg, rgba(255, 241, 168, 0.42), rgba(86, 221, 255, 0.42));
  box-shadow: none;
}

.primary-btn.accent {
  width: 100%;
  color: #f4fbff;
  background: linear-gradient(135deg, #188ec0, #54dfff);
}

.secondary-btn {
  min-width: 220px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-weight: 700;
  background: rgba(9, 24, 39, 0.78);
  border: 1px solid rgba(186, 233, 255, 0.18);
}

.customize-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 8px;
}

.back-btn {
  flex: none;
  align-self: flex-start;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  background: rgba(7, 18, 31, 0.76);
  border: 1px solid rgba(186, 233, 255, 0.14);
}

#customizeScreen .screen-copy.compact {
  max-width: none;
}

.customize-layout {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stage-card,
.customize-controls {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(186, 233, 255, 0.12);
  backdrop-filter: blur(10px);
  background: rgba(8, 19, 32, 0.72);
}

.stage-card {
  padding: 14px;
  box-shadow: var(--shadow);
}

.character-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  min-height: auto;
  overflow: hidden;
  isolation: isolate;
  border-radius: calc(var(--radius-xl) - 8px);
  background:
    linear-gradient(rgba(7, 18, 31, 0.06), rgba(7, 18, 31, 0.16)),
    url("./图片素材/bg_lab.png.png") center 54% / cover no-repeat;
}

.character-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(4, 12, 22, 0.1));
  pointer-events: none;
}

.stage-effect,
.stage-character-wrap,
.stage-character,
.stage-base {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  user-select: none;
  -webkit-user-drag: none;
}

.stage-effect.glow {
  bottom: 12%;
  width: min(28%, 230px);
  opacity: 0;
  z-index: 2;
}

.stage-effect.glow.is-flashing {
  animation: glowFlash 420ms ease;
}

.stage-character-wrap {
  bottom: 12%;
  width: min(34%, 250px);
  height: min(62%, 300px);
  z-index: 3;
}

.character-stage.has-composite {
  background:
    linear-gradient(rgba(8, 18, 31, 0.06), rgba(8, 18, 31, 0.1)),
    var(--stage-composite-image) center bottom / contain no-repeat,
    rgba(8, 18, 31, 0.65);
}

.character-stage.has-composite::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(4, 12, 22, 0.04));
}

.character-stage.has-composite .stage-character-wrap {
  display: none;
}

.character-stage.has-composite .stage-base,
.character-stage.has-composite .stage-effect.glow {
  display: none;
}

.stage-character {
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.34));
  animation: revealUp 480ms ease both;
}

.stage-base {
  bottom: -28%;
  width: min(58%, 520px);
  z-index: 4;
}

.customize-controls {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--panel-strong);
}

.swatch-section,
.naming-section,
.selection-result {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.swatch-section-floating {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  z-index: 6;
  width: min(660px, calc(100% - 44px));
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  border: 0;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
}

.name-input {
  width: 100%;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(186, 233, 255, 0.18);
  color: var(--text-main);
  background: rgba(7, 19, 31, 0.92);
  outline: none;
}

.name-input::placeholder {
  color: rgba(242, 247, 255, 0.4);
}

.name-input:focus {
  border-color: rgba(77, 215, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(77, 215, 255, 0.12);
}

.field-tip {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.swatch-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.swatch-grid {
  margin-top: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
  justify-content: center;
}

.swatch-btn {
  position: relative;
  flex: 1 1 0;
  min-height: 68px;
  padding: 10px 10px 9px;
  border-radius: 16px;
  color: var(--text-main);
  text-align: center;
  background: rgba(12, 29, 46, 0.9);
  border: 1px solid rgba(186, 233, 255, 0.18);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.swatch-btn:hover,
.swatch-btn.is-active {
  transform: translateY(-2px);
  border-color: rgba(77, 215, 255, 0.78);
  background: rgba(16, 44, 69, 0.96);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.swatch-btn.is-active::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 12px;
  border: 1px solid rgba(77, 215, 255, 0.32);
  pointer-events: none;
}

.swatch-chip {
  display: block;
  width: 26px;
  height: 26px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.18),
    0 6px 16px rgba(0, 0, 0, 0.18);
  flex: none;
}

.swatch-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.swatch-desc {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.2;
  color: var(--text-soft);
}

.result-name {
  margin: 10px 0 6px;
  font-size: 22px;
  font-weight: 700;
}

.selection-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 14px;
  align-items: center;
}

.selection-result-copy {
  min-width: 0;
}

.selection-result-thumb {
  width: 124px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  justify-self: end;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.22));
}

.result-partner-name {
  margin: 0 0 8px;
  color: rgba(77, 215, 255, 0.9);
  font-size: 15px;
  font-weight: 700;
}

.lock-btn {
  align-self: flex-end;
}

.result-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.result-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 680px;
}

.result-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  padding: 18px;
  border-radius: 36px;
  border: 1px solid rgba(186, 233, 255, 0.16);
  background: linear-gradient(180deg, rgba(11, 28, 46, 0.82), rgba(7, 18, 30, 0.9));
  box-shadow: var(--shadow);
}

.result-visual,
.result-content {
  border-radius: 28px;
  border: 1px solid rgba(186, 233, 255, 0.12);
}

.result-visual {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background:
    linear-gradient(rgba(7, 18, 31, 0.08), rgba(7, 18, 31, 0.14)),
    url("./图片素材/bg_lab.png.png") center 56% / cover no-repeat;
}

.result-character-wrap,
.result-character,
.result-base {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  user-select: none;
  -webkit-user-drag: none;
}

.result-character-wrap {
  bottom: 12%;
  width: min(54%, 380px);
  height: min(74%, 500px);
  z-index: 3;
}

.result-visual.has-composite {
  background:
    linear-gradient(rgba(8, 18, 31, 0.08), rgba(8, 18, 31, 0.12)),
    var(--result-composite-image) center center / contain no-repeat,
    rgba(8, 18, 31, 0.72);
}

.result-visual.has-composite .result-character-wrap {
  display: none;
}

.result-visual.has-composite .result-base {
  display: none;
}

.result-character {
  left: 50%;
  bottom: 0;
  width: min(100%, 380px);
  max-width: 100%;
  height: auto;
  z-index: 3;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.35));
}

.result-base {
  bottom: -18%;
  width: min(108%, 720px);
  z-index: 4;
}

.result-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 28px;
  background: rgba(255, 255, 255, 0.04);
}

.result-tag {
  margin: 0;
  color: var(--warm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
}

.result-partner-title {
  margin: 14px 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  color: var(--text-main);
  font-family: var(--font-display);
}

.result-greeting {
  margin: 0 0 26px;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.8;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@keyframes floatRing {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

@keyframes introPulse {
  0%,
  100% {
    opacity: 0.58;
    transform: translateX(-50%) scale(0.98);
  }
  50% {
    opacity: 0.9;
    transform: translateX(-50%) scale(1.03);
  }
}

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

@keyframes introButtonPulse {
  0%,
  100% {
    box-shadow:
      0 16px 34px rgba(77, 215, 255, 0.26),
      0 0 0 1px rgba(255, 255, 255, 0.12);
  }
  50% {
    box-shadow:
      0 18px 38px rgba(77, 215, 255, 0.34),
      0 0 18px rgba(77, 215, 255, 0.16);
  }
}

@keyframes glowFlash {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.92);
  }
  45% {
    opacity: 0.9;
    transform: translateX(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(1.08);
  }
}

@keyframes revealUp {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 1080px) {
  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .result-stage {
    min-height: 0;
  }
}

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

  .app,
  .screen {
    min-height: 100vh;
    border-radius: 0;
  }

  .screen {
    padding: 22px 16px 20px;
  }

  .intro-screen::before {
    top: 12%;
    width: min(92vw, 520px);
    height: min(92vw, 520px);
  }

  .intro-overlay {
    width: min(100%, calc(100% - 8px));
    padding: 42px 22px 34px;
    border-radius: 28px;
  }

  .intro-overlay::after {
    inset: 12px;
    border-radius: 20px;
  }

  .intro-overlay .eyebrow {
    gap: 8px;
    margin-bottom: 14px;
    font-size: 12px;
    letter-spacing: 0.18em;
  }

  .intro-overlay .eyebrow::after {
    width: 34px;
  }

  .intro-overlay .subtitle {
    max-width: 100%;
    line-height: 1.8;
  }

  .intro-overlay .primary-btn {
    min-width: 100%;
    padding: 15px 22px;
    letter-spacing: 0.08em;
  }

  .customize-header,
  .selection-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .control-grid {
    grid-template-columns: 1fr;
  }

  .agent-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .agent-card {
    min-height: 0;
  }

  .agent-card-thumb {
    max-height: 180px;
  }

  .stage-card {
    padding: 10px;
  }

  .character-stage {
    aspect-ratio: 3 / 2;
  }

  .swatch-section-floating {
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    width: min(100%, calc(100% - 20px));
    padding: 0;
  }

  .stage-character-wrap {
    width: 42%;
    height: 56%;
    bottom: 12%;
  }

  .stage-character {
    width: 100%;
    bottom: 0;
  }

  .stage-base {
    width: 72%;
    bottom: -22%;
  }

  .customize-controls {
    padding: 16px;
  }

  .swatch-header {
    align-items: center;
    justify-content: center;
  }

  .selection-result-row {
    grid-template-columns: 1fr 96px;
    gap: 12px;
  }

  .selection-result-thumb {
    width: 96px;
  }

  .swatch-btn {
    min-height: 62px;
    padding-inline: 8px;
  }

  .swatch-grid {
    flex-wrap: wrap;
    gap: 8px;
  }

  .swatch-name {
    font-size: 12px;
  }

  .swatch-desc {
    font-size: 10px;
  }

  .result-visual {
    min-height: 420px;
  }

  .result-character-wrap {
    width: 56%;
    height: 60%;
    bottom: 12%;
  }

  .result-character {
    width: 100%;
    bottom: 0;
  }

  .result-base {
    width: 134%;
    bottom: -14%;
  }

  .result-content {
    padding: 24px 18px;
  }

  .result-actions {
    flex-direction: column;
  }
}
