:root {
  --bg: #f6f1eb;
  --bg-deep: #efe6dc;
  --panel: rgba(255, 252, 248, 0.88);
  --line: rgba(120, 90, 80, 0.12);
  --text: #3d2f2a;
  --muted: #8a7268;
  --rose: #d4848c;
  --peach: #e8a07a;
  --sand: #c4a574;
  --mint: #7d9e8c;
  --ok: #6f9b7a;
  --font: "Noto Sans SC", "DM Sans", system-ui, sans-serif;
  --display: "Noto Serif SC", "Songti SC", Georgia, serif;
  --latin: "DM Sans", system-ui, sans-serif;
  --shadow: 0 18px 50px rgba(90, 60, 50, 0.1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  user-select: none;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(232, 180, 160, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(200, 180, 220, 0.22), transparent 50%),
    radial-gradient(ellipse 70% 45% at 50% 100%, rgba(180, 200, 180, 0.18), transparent 55%),
    linear-gradient(180deg, #faf6f1 0%, #f3ebe3 50%, #ebe2d8 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.45;
  animation: drift 16s ease-in-out infinite;
}
.o1 { width: 240px; height: 240px; background: #f0c8bc; top: -40px; left: -40px; }
.o2 { width: 200px; height: 200px; background: #d4c8e8; bottom: 10%; right: -30px; animation-delay: -5s; }
.o3 { width: 160px; height: 160px; background: #e8d5a8; top: 45%; left: 50%; animation-delay: -9s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(14px, -16px); }
}

.fx-shake.shake .app { animation: screenShake 0.3s ease; }
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(-2px, 1px); }
  60% { transform: translate(2px, -1px); }
}

.app {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.screen {
  display: none;
  height: 100%;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  flex-direction: column;
}
.screen.active { display: flex; }
.screen.dim {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(60, 45, 40, 0.28);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
}

.home-head { flex: 0 0 auto; }
.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.pill {
  font-family: var(--latin);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--sand);
  border: 1px solid rgba(196, 165, 116, 0.4);
  padding: 5px 10px;
  border-radius: 999px;
  text-transform: lowercase;
}
.chip {
  font-size: 0.75rem;
  color: var(--muted);
}
.soft-line {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--rose);
  letter-spacing: 0.06em;
  font-weight: 500;
}
.home-head h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.4rem, 10vw, 3rem);
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: var(--text);
}
.tagline {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.95rem;
}
.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.home-stats > div {
  text-align: center;
  padding: 12px 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(90, 60, 50, 0.04);
}
.home-stats span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.08em;
}
.home-stats strong {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--peach);
}

.home-actions {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  overflow: auto;
}

.hero-btn {
  appearance: none;
  border: 1px solid rgba(212, 132, 140, 0.25);
  background: linear-gradient(135deg, rgba(255, 230, 220, 0.95), rgba(255, 245, 238, 0.9));
  color: inherit;
  text-align: left;
  border-radius: 20px;
  padding: 16px 15px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.hero-btn:active { transform: scale(0.985); }
.hero-kicker {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--rose);
}
.hero-title {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}
.hero-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.mode-grid.compact { flex: 1; align-content: start; }
.mode-card {
  text-align: left;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  border-radius: 16px;
  padding: 13px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 98px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgba(90, 60, 50, 0.04);
}
.mode-card:hover {
  border-color: rgba(212, 132, 140, 0.35);
  background: #fff;
}
.mode-card:active { transform: scale(0.98); }
.mode-no {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--rose);
}
.mode-name {
  font-size: 0.98rem;
  font-weight: 600;
}
.mode-desc {
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--muted);
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.94rem;
  border-radius: 999px;
  padding: 13px 20px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn.full { width: 100%; }
.btn.primary {
  color: #fff;
  background: linear-gradient(120deg, #d4848c, #e8a07a);
  box-shadow: 0 10px 28px rgba(212, 132, 140, 0.28);
}
.btn.glass {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  padding: 24px 18px 18px;
}
.kicker {
  margin: 0;
  font-family: var(--latin);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--sand);
  font-weight: 600;
  text-transform: lowercase;
}

.sub-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.sub-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
}

.form-panel { display: grid; gap: 14px; overflow: auto; }
.letter-tip {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
}
.form-panel label { display: grid; gap: 6px; text-align: left; }
.form-panel label > span {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.form-panel input,
.form-panel textarea,
.form-panel select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  outline: none;
  line-height: 1.55;
}
.form-panel input:focus,
.form-panel textarea:focus,
.form-panel select:focus {
  border-color: rgba(212, 132, 140, 0.45);
}
.form-panel select option { background: #fff; }
.duo-out {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.duo-link {
  margin: 0;
  font-size: 0.75rem;
  color: var(--sand);
  word-break: break-all;
  line-height: 1.5;
}
.row-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.story-panel {
  width: min(380px, 100%);
  text-align: center;
  margin: auto;
  animation: panelIn 0.4s ease;
}
.story-panel h2,
.result-panel h2,
.oracle-panel h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.85rem;
  margin: 8px 0 12px;
  letter-spacing: 0.06em;
}
.story-body {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.95rem;
  text-align: left;
  white-space: pre-line;
}
.story-from {
  margin: -4px 0 16px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(232, 160, 122, 0.1);
  border: 1px solid rgba(232, 160, 122, 0.2);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: left;
  white-space: pre-line;
}
.story-panel .btn { margin-top: 8px; }

#screenPlay {
  gap: 8px;
  padding-top: max(12px, env(safe-area-inset-top));
}
.play-bar {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
}
.play-title .kicker { display: block; margin-bottom: 2px; }
.play-title strong {
  font-size: 1rem;
  font-weight: 600;
}
.play-stats { text-align: right; }
.play-stats span {
  display: block;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--peach);
}
.play-stats em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
}

.journey-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 2px 0;
}
.journey-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(120, 90, 80, 0.15);
}
.journey-dots i.done { background: var(--mint); }
.journey-dots i.now {
  background: var(--rose);
  box-shadow: 0 0 0 3px rgba(212, 132, 140, 0.2);
}

.combo-banner {
  align-self: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(120deg, #d4848c, #e8a07a);
  padding: 6px 14px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-6px) scale(0.92);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.combo-banner.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.quote-toast {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.25s ease;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text);
  background: rgba(255, 252, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  box-shadow: var(--shadow);
}
.quote-toast.show {
  max-height: 90px;
  opacity: 1;
  padding: 11px 14px;
}

.duo-banner {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--peach);
  background: rgba(232, 160, 122, 0.1);
  border: 1px solid rgba(232, 160, 122, 0.2);
  border-radius: 12px;
  padding: 9px 12px;
}

.stage-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.mode-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mode-stage[hidden] { display: none !important; }
.hint-line {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
}

.meter.thin {
  height: 5px;
  border-radius: 999px;
  background: rgba(120, 90, 80, 0.08);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d4848c, #e8a07a, #c4a574);
  transition: width 0.2s ease;
}

.arena {
  position: relative;
  flex: 1;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 100%, rgba(232, 160, 122, 0.12), transparent 55%),
    rgba(255, 255, 255, 0.45);
  touch-action: manipulation;
}
.arena-soft {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.5), transparent 55%);
}
.arena-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(232, 160, 122, 0.28), transparent 55%);
  transition: opacity 0.15s ease;
}
.arena-flash.on { opacity: 1; }

.core {
  position: absolute;
  left: 50%;
  bottom: 15%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  pointer-events: none;
  z-index: 2;
}
.core-dot {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #f0b0a8 50%, #d4848c);
  box-shadow: 0 0 20px rgba(212, 132, 140, 0.4);
  transition: transform 0.15s ease;
}
.core-ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(212, 132, 140, 0.25);
  animation: pulseRing 2.8s ease-out infinite;
}
.core.pulse .core-dot { transform: scale(1.15); }
@keyframes pulseRing {
  from { transform: scale(0.9); opacity: 0.5; }
  to { transform: scale(1.5); opacity: 0; }
}

.drop {
  position: absolute;
  top: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
  padding: 0;
  background: linear-gradient(145deg, #f0b8b0, #d4848c 55%, #e8a07a);
  box-shadow: 0 8px 18px rgba(212, 132, 140, 0.28);
}
.drop::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}
.drop.noise {
  background: linear-gradient(145deg, #c8b8b0, #9a8c86);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  opacity: 0.9;
}
.drop.noise::after {
  width: 12px;
  height: 2px;
  border-radius: 2px;
  box-shadow: 0 -4px 0 rgba(255, 255, 255, 0.45), 0 4px 0 rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.55);
}
.drop.bonus {
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, #f0d8a8, #d4b0e0);
  animation: bonusPulse 1s ease-in-out infinite;
}
@keyframes bonusPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(212, 176, 140, 0.35); }
  50% { box-shadow: 0 0 22px rgba(212, 176, 200, 0.5); }
}
.drop.caught { animation: catchPop 0.28s ease forwards; pointer-events: none; }
.drop.miss { animation: fadeMiss 0.2s ease forwards; pointer-events: none; }
@keyframes catchPop {
  50% { transform: scale(1.28); }
  100% { transform: scale(0); opacity: 0; }
}
@keyframes fadeMiss { to { opacity: 0; transform: scale(0.5); } }

.float-score {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--rose);
  animation: rise 0.6s ease forwards;
}
.float-score.bad { color: var(--muted); }
.float-score.big { font-size: 1.15rem; color: var(--peach); }
@keyframes rise { to { opacity: 0; transform: translateY(-36px); } }

.spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 6;
  animation: spark 0.5s ease-out forwards;
}
@keyframes spark {
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}

.swipe-status, .match-status, .pulse-status {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}
.muted { color: var(--muted); font-size: 0.78rem; }
.swipe-deck {
  position: relative;
  flex: 1;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.swipe-card {
  position: absolute;
  width: min(300px, 88%);
  min-height: 230px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #fffdfb, #faf4ef);
  box-shadow: 0 18px 40px rgba(90, 60, 50, 0.12);
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  touch-action: none;
  cursor: grab;
}
.swipe-card .kind {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--sand);
  text-transform: uppercase;
}
.swipe-card .body {
  font-size: 1.1rem;
  line-height: 1.65;
  font-weight: 500;
}
.swipe-card .stamp {
  position: absolute;
  top: 26px;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border: 2px solid;
  border-radius: 8px;
  opacity: 0;
}
.swipe-card .stamp.keep {
  left: 16px;
  color: var(--ok);
  border-color: var(--ok);
  transform: rotate(-12deg);
}
.swipe-card .stamp.drop {
  right: 16px;
  color: #b08a84;
  border-color: #b08a84;
  transform: rotate(12deg);
}
.swipe-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.round-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.75);
}
.round-btn.reject:active { color: #b08a84; }
.round-btn.accept:active { color: var(--ok); }

.match-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-content: center;
  min-height: 0;
}
.match-tile {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  padding: 0;
}
.match-tile .inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 13px;
  transition: transform 0.32s ease;
  backface-visibility: hidden;
  padding: 4px;
  text-align: center;
  line-height: 1.2;
}
.match-tile .back {
  background: linear-gradient(145deg, rgba(232, 160, 122, 0.2), rgba(212, 132, 140, 0.12));
  font-size: 0.9rem;
  color: var(--muted);
}
.match-tile .front {
  background: #fff;
  border: 1px solid rgba(212, 132, 140, 0.2);
  transform: rotateY(180deg);
}
.match-tile.flipped .back,
.match-tile.matched .back { transform: rotateY(180deg); }
.match-tile.flipped .front,
.match-tile.matched .front { transform: rotateY(0deg); }
.match-tile.matched {
  opacity: 0.55;
  pointer-events: none;
}
.match-tile.matched .front {
  border-color: rgba(111, 155, 122, 0.4);
  color: var(--ok);
}

.pulse-board {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-content: center;
  max-height: 360px;
}
.pulse-cell {
  aspect-ratio: 1;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.08s ease, box-shadow 0.08s ease, transform 0.08s ease;
}
.pulse-cell.lit {
  background: linear-gradient(145deg, rgba(240, 184, 176, 0.9), rgba(232, 160, 122, 0.75));
  box-shadow: 0 0 24px rgba(232, 160, 122, 0.35);
  transform: scale(1.03);
}
.pulse-cell.miss-flash { background: rgba(180, 140, 130, 0.25); }
.pulse-cell:active { transform: scale(0.96); }

.result-panel {
  width: min(380px, 100%);
  text-align: center;
  margin: auto;
  animation: panelIn 0.4s ease;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.end-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.end-stats > div {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}
.end-stats span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.end-stats strong {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--peach);
}
.end-stats strong.sm { font-size: 0.95rem; }
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
  min-height: 8px;
}
.badge-row span {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(232, 160, 122, 0.12);
  border: 1px solid rgba(232, 160, 122, 0.25);
  color: var(--peach);
}
.end-quote {
  margin: 0 0 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(212, 132, 140, 0.18);
  background: rgba(255, 240, 236, 0.7);
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.75;
  font-style: normal;
  white-space: pre-line;
}
.share-preview {
  margin: 0 0 16px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
  text-align: left;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed var(--line);
}
.end-actions { display: grid; gap: 8px; }

.oracle-panel { width: min(360px, 100%); text-align: center; }
.oracle-text {
  margin: 8px 0 20px;
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: left;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}
.oracle-panel .btn { margin-bottom: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  z-index: 60;
  background: rgba(61, 47, 42, 0.92);
  color: #faf6f1;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-height: 700px) {
  .mode-card { min-height: 86px; }
  .home-head h1 { font-size: 2.2rem; }
  .soft-line { display: none; }
}
