/* ===== CSS Variables (Design Tokens) ===== */
:root {
  --color-main: #4FB8E0;
  --color-main-dark: #3A9BC7;
  --color-main-light: #7FCCED;
  --color-bg: #F8FBFD;
  --color-bg-card: #FFFFFF;
  --color-accent: #A8D8EA;
  --color-accent-light: #D4EDF7;
  --color-warm: #F5E6D3;
  --color-warm-dark: #D4A574;
  --color-text: #2C3E50;
  --color-text-light: #6B7C8D;
  --color-text-muted: #9AACBA;
  --color-border: #E3EDF3;
  --color-success: #66BB6A;
  --color-white: #FFFFFF;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;
  --shadow-sm: 0 2px 8px rgba(79, 184, 224, 0.08);
  --shadow-md: 0 4px 16px rgba(79, 184, 224, 0.12);
  --shadow-lg: 0 8px 32px rgba(79, 184, 224, 0.16);
  --shadow-glow: 0 0 20px rgba(79, 184, 224, 0.25);
  --font-family: 'Noto Sans JP', sans-serif;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.35s ease;
  --transition-slow: 0.6s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 20px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== Background Momonga Layer ===== */
.bg-momonga-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-momonga {
  position: absolute;
  width: var(--momo-size, 32px);
  height: auto;
  opacity: 0;
  will-change: transform, opacity;
  animation: momongaFly var(--momo-duration, 12s) var(--momo-delay, 0s) linear infinite;
}

@keyframes momongaFly {
  0% {
    transform: translate(var(--momo-start-x, -50px), var(--momo-start-y, 50vh)) rotate(var(--momo-rot-start, -15deg)) scale(0.6);
    opacity: 0;
  }
  10% { opacity: var(--momo-opacity, 0.06); }
  80% { opacity: var(--momo-opacity, 0.06); }
  100% {
    transform: translate(var(--momo-end-x, 110vw), var(--momo-end-y, 20vh)) rotate(var(--momo-rot-end, 15deg)) scale(1);
    opacity: 0;
  }
}

.screen {
  position: relative;
  z-index: 1;
}

/* ===== Screen Management ===== */
.screen {
  display: none;
  min-height: 100dvh;
  padding: 1rem;
  animation: fadeInUp 0.4s ease forwards;
}

.screen.is-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Buttons ===== */
.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 1.25rem 1.5rem;
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  text-align: center;
  line-height: 1.5;
}

.btn:focus-visible {
  outline: 3px solid var(--color-main);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-main) 0%, var(--color-main-dark) 100%);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--color-white);
  color: var(--color-text);
  border: 2px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--color-main); background: var(--color-accent-light); }

.btn-accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-main-light) 100%);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-light);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover { background: var(--color-accent-light); color: var(--color-text); }

.btn-purchase {
  background: linear-gradient(135deg, var(--color-main) 0%, #3AA5D0 100%);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
  padding: 0.85rem 1.5rem;
}
.btn-purchase:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-purchase.is-disabled {
  background: var(--color-border);
  color: var(--color-text-muted);
  pointer-events: none;
  box-shadow: none;
}

.btn-share {
  background: var(--color-warm);
  color: var(--color-text);
  border: 1px solid var(--color-warm-dark);
}
.btn-share:hover { background: var(--color-warm-dark); color: var(--color-white); }

.btn-large { padding: 1.5rem 2rem; font-size: 1.15rem; }
.btn-small { padding: 0.75rem 1.25rem; font-size: 0.9rem; flex-direction: row; gap: 8px; }

.btn-emoji { font-size: 2rem; line-height: 1; }
.btn-label { font-weight: 700; font-size: 1.2rem; }
.btn-desc { font-size: 0.85rem; color: inherit; opacity: 0.75; }

.btn-back {
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: 0.9rem;
  color: var(--color-text-light);
  cursor: pointer;
  padding: 0.5rem;
  align-self: flex-start;
  transition: color var(--transition-fast);
}
.btn-back:hover { color: var(--color-main); }
.btn-back:focus-visible { outline: 2px solid var(--color-main); outline-offset: 2px; }

/* ===== Master Icon ===== */
.master-icon-btn {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 2px;
}

.master-icon-result {
  width: 80px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(79, 184, 224, 0.3));
}

.master-icon-slot {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(79, 184, 224, 0.2));
}

/* ===== TOP Screen ===== */
.top-container {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0;
}

.top-logo-area {
  text-align: center;
}

.top-logo {
  width: 160px;
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 12px rgba(79, 184, 224, 0.2));
}

.top-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-main-dark);
  letter-spacing: 0.05em;
}

.top-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-top: 0.35rem;
}

.top-momonga-float {
  animation: momongaFloat 3s ease-in-out infinite;
}

.momonga-silhouette {
  width: 72px;
  height: auto;
  opacity: 0.55;
  filter: drop-shadow(0 2px 6px rgba(79, 184, 224, 0.25));
}

.momonga-silhouette-gacha {
  width: 96px;
  height: auto;
  opacity: 0.65;
  filter: drop-shadow(0 3px 8px rgba(79, 184, 224, 0.3));
}

@keyframes momongaFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-12px) rotate(5deg); }
}

.top-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.top-nav-sub {
  display: flex;
  gap: 0.5rem;
}

.top-nav-sub .btn {
  flex: 1;
}

/* ===== Diagnosis Screen ===== */
.diagnosis-container {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-bottom: 6rem;
}

.diagnosis-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--color-accent-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-main-light), var(--color-main));
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
  width: 50%;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  font-weight: 500;
}

.diagnosis-card-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.diagnosis-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-md);
  animation: cardSlideIn 0.35s ease forwards;
}

@keyframes cardSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.diagnosis-question {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ===== Mood Grid ===== */
.mood-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.mood-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 1.5rem 1rem;
  background: var(--color-accent-light);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.mood-btn:hover {
  border-color: var(--color-main);
  background: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.mood-btn:active {
  transform: translateY(0);
}

.mood-btn.is-selected {
  background: var(--color-main);
  color: var(--color-white);
  border-color: var(--color-main-dark);
  box-shadow: var(--shadow-glow);
}

.mood-btn.is-selected .mood-desc {
  color: rgba(255,255,255,0.8);
}

.mood-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.mood-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: inherit;
}

.mood-desc {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

/* ===== Sliders ===== */
.sliders-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-bottom: 1.5rem;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.slider-label-left,
.slider-label-right {
  max-width: 45%;
}

.taste-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--color-accent-light) 0%, var(--color-main-light) 50%, var(--color-warm) 100%);
  border-radius: var(--radius-full);
  outline: none;
  transition: opacity var(--transition-fast);
}

.taste-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-white);
  border: 3px solid var(--color-main);
  box-shadow: 0 2px 8px rgba(79, 184, 224, 0.3);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.taste-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: var(--shadow-glow);
}

.taste-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-white);
  border: 3px solid var(--color-main);
  box-shadow: 0 2px 8px rgba(79, 184, 224, 0.3);
  cursor: pointer;
}

.slider-submit {
  margin-top: 0.5rem;
}

.diagnosis-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(0deg, var(--color-bg) 60%, transparent);
}

/* ===== Result Screen ===== */
.result-container {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1rem 0 2rem;
}

.result-type-card {
  background: linear-gradient(135deg, var(--color-main) 0%, var(--color-main-dark) 100%);
  color: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: resultReveal 0.6s ease forwards;
}

@keyframes resultReveal {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.result-type-emoji { font-size: 3rem; margin-bottom: 0.75rem; }
.result-type-name { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.result-type-desc { font-size: 0.9rem; opacity: 0.9; line-height: 1.6; }
.result-type-personality { font-size: 0.8rem; opacity: 0.7; margin-top: 0.5rem; font-style: italic; }

/* User Radar Section */
.result-user-radar {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.result-section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-main-dark);
  margin-bottom: 0.5rem;
}

/* ===== 3-Slot Cards ===== */
.result-slot-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.4s ease forwards;
}

.result-slot-card:nth-child(4) { animation-delay: 0.1s; }
.result-slot-card:nth-child(5) { animation-delay: 0.2s; }
.result-slot-card:nth-child(6) { animation-delay: 0.3s; }

.slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.slot-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-main-dark);
}

.slot-subtext {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.slot-bean-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.15rem;
}

.slot-bean-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.slot-bean-desc {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.slot-flavors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.slot-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-warm-dark);
  margin-bottom: 0.75rem;
}

.flavor-tag {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--color-accent-light);
  color: var(--color-main-dark);
  font-size: 0.75rem;
  font-weight: 500;
}

.radar-chart-wrapper {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ===== Gacha Screen ===== */
.gacha-container {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.gacha-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 0;
}

.gacha-momonga {
  font-size: 4rem;
  animation: momongaGlide 2s ease-in-out infinite;
}

@keyframes momongaGlide {
  0% { transform: translate(-20px, 10px) rotate(-10deg); }
  50% { transform: translate(20px, -10px) rotate(10deg); }
  100% { transform: translate(-20px, 10px) rotate(-10deg); }
}

.gacha-cup {
  font-size: 5rem;
  animation: cupFloat 2.5s ease-in-out infinite;
}

@keyframes cupFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.gacha-instruction {
  font-size: 0.95rem;
  color: var(--color-text-light);
  text-align: center;
}

.gacha-result {
  padding: 1rem 0 2rem;
  animation: fadeInUp 0.5s ease forwards;
}

.gacha-result-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
  margin-bottom: 1rem;
}

.gacha-result-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.gacha-result-roast {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.gacha-result-comment {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--color-accent-light);
  border-radius: var(--radius-md);
}

.gacha-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Gacha Spin Animation */
.gacha-spinning .gacha-cup {
  animation: gachaSpin 0.8s ease-out;
}

@keyframes gachaSpin {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(90deg) scale(1.2); }
  50% { transform: rotate(180deg) scale(1.3); }
  75% { transform: rotate(270deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

.gacha-spinning .gacha-momonga {
  animation: momongaDive 0.8s ease-out forwards;
}

@keyframes momongaDive {
  0% { transform: translate(-60px, -40px) rotate(-20deg); opacity: 1; }
  50% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(60px, 40px) rotate(20deg); opacity: 0; }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transition: bottom var(--transition-normal);
  z-index: 10000;
  white-space: nowrap;
}

.toast.is-visible {
  bottom: 2rem;
}

/* ===== Blend Diagnosis ===== */
.question-emoji-large {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.blend-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blend-option-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--color-accent-light);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.blend-option-btn:hover {
  border-color: var(--color-main);
  background: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.blend-option-btn.is-selected {
  background: var(--color-main);
  color: var(--color-white);
  border-color: var(--color-main-dark);
  box-shadow: var(--shadow-glow);
}

.blend-option-btn.is-dimmed {
  opacity: 0.4;
  transform: scale(0.97);
}

/* Blend Result Header */
.blend-result-header {
  background: linear-gradient(135deg, #7B68EE 0%, #4FB8E0 100%);
}

/* Recipe Cards */
.recipe-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recipe-card {
  background: var(--color-accent-light);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.recipe-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.recipe-role-emoji { font-size: 1.3rem; }
.recipe-bean-name { font-size: 1rem; font-weight: 700; flex: 1; }
.recipe-ratio { font-size: 1.1rem; font-weight: 900; color: var(--color-main-dark); }

.recipe-role-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.recipe-ratio-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  margin-top: 0.5rem;
  overflow: hidden;
}

.recipe-ratio-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-main-light), var(--color-main));
  border-radius: var(--radius-full);
  transition: width 0.8s ease;
}

/* Blend Timeline */
.blend-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  position: relative;
}

.timeline-dot {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--color-accent-light);
  border-radius: 50%;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-line {
  position: absolute;
  left: 17px;
  top: 36px;
  width: 2px;
  height: 100%;
  background: var(--color-accent);
}

.timeline-content {
  padding: 0.25rem 0 1.5rem;
}

.timeline-phase {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-main-dark);
}

.timeline-bean {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.timeline-detail {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* Roundness Badge */
.roundness-badge {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--color-accent-light);
  border-radius: var(--radius-lg);
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--transition-normal);
}

.roundness-badge.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.roundness-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.roundness-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-main-dark);
}

.roundness-max {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.chart-meta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.chart-meta-before { opacity: 0.7; }
.chart-meta-after { color: var(--color-main-dark); }

/* ===== Font Size Toggle ===== */
.font-size-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 9999;
  font-family: var(--font-family);
}

.font-size-bar-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-right: 4px;
}

.font-size-btn {
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-text-light);
}

.font-size-btn:hover {
  border-color: var(--color-main);
  color: var(--color-main);
}

.font-size-btn.is-active {
  background: var(--color-main);
  color: var(--color-white);
  border-color: var(--color-main-dark);
}

.font-size-btn[data-size="normal"] { font-size: 0.7rem; }
.font-size-btn[data-size="large"] { font-size: 0.85rem; }
.font-size-btn[data-size="xlarge"] { font-size: 1rem; }

/* Size Normal (default: 16px base) */
body { padding-top: 36px; }

/* Size Large (20px base) */
body.font-size-l {
  font-size: 20px;
}
body.font-size-l .btn-label { font-size: 1.2rem; }
body.font-size-l .btn-desc { font-size: 0.85rem; }
body.font-size-l .btn-emoji { font-size: 2rem; }
body.font-size-l .diagnosis-question { font-size: 1.35rem; }
body.font-size-l .mood-label { font-size: 1.1rem; }
body.font-size-l .mood-emoji { font-size: 2.4rem; }
body.font-size-l .slot-bean-name { font-size: 1.4rem; }
body.font-size-l .slot-bean-desc { font-size: 1.05rem; }
body.font-size-l .slot-heading { font-size: 1.15rem; }
body.font-size-l .gacha-result-name { font-size: 1.6rem; }
body.font-size-l .gacha-result-comment { font-size: 1.1rem; }
body.font-size-l .result-type-name { font-size: 1.7rem; }
body.font-size-l .result-type-desc { font-size: 1.05rem; }
body.font-size-l .flavor-tag { font-size: 0.85rem; }
body.font-size-l .top-title { font-size: 1.9rem; }

/* Size XL (24px base) */
body.font-size-xl {
  font-size: 24px;
}
body.font-size-xl .btn-label { font-size: 1.4rem; }
body.font-size-xl .btn-desc { font-size: 1rem; }
body.font-size-xl .btn-emoji { font-size: 2.4rem; }
body.font-size-xl .diagnosis-question { font-size: 1.6rem; }
body.font-size-xl .mood-label { font-size: 1.3rem; }
body.font-size-xl .mood-emoji { font-size: 2.8rem; }
body.font-size-xl .mood-btn { padding: 1.5rem 1rem; }
body.font-size-xl .slot-bean-name { font-size: 1.6rem; }
body.font-size-xl .slot-bean-desc { font-size: 1.2rem; }
body.font-size-xl .slot-heading { font-size: 1.3rem; }
body.font-size-xl .gacha-result-name { font-size: 1.8rem; }
body.font-size-xl .gacha-result-comment { font-size: 1.25rem; }
body.font-size-xl .result-type-name { font-size: 2rem; }
body.font-size-xl .result-type-desc { font-size: 1.2rem; }
body.font-size-xl .flavor-tag { font-size: 0.95rem; padding: 0.35rem 0.8rem; }
body.font-size-xl .top-title { font-size: 2.2rem; }
body.font-size-xl .btn { padding: 1.25rem 1.5rem; }
body.font-size-xl .btn-large { padding: 1.5rem 2rem; }
body.font-size-xl .slider-labels { font-size: 0.95rem; }
body.font-size-xl .taste-slider::-webkit-slider-thumb { width: 36px; height: 36px; }

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .top-container,
  .diagnosis-container,
  .result-container,
  .gacha-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .diagnosis-footer {
    max-width: 440px;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (min-width: 1024px) {
  .screen {
    padding: 2rem;
  }
}
