.mini-stage {
  display: grid;
  gap: 18px;
}

.mini-panel {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(246,248,255,.9));
  box-shadow: 0 14px 36px rgba(43, 49, 86, .1);
}

.mini-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  align-items: stretch;
}

.mission-card {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  color: white;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.28), transparent 24%),
    linear-gradient(135deg, var(--mini-a, #6c5ce7), var(--mini-b, #00b4d8));
}

.mission-word {
  display: block;
  margin: 14px 0;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 3px;
  text-shadow: 0 8px 20px rgba(25, 28, 72, .22);
}

.mission-hint {
  color: rgba(255,255,255,.88);
  font-size: clamp(15px, 2vw, 19px);
  line-height: 1.7;
}

.mini-board {
  min-height: 260px;
  display: grid;
  gap: 12px;
  align-content: center;
}

.bubble-grid, .card-grid, .note-track, .maze-grid, .tile-bank {
  display: grid;
  gap: 12px;
}

.bubble-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bubble, .memory-card, .note, .tile, .maze-cell {
  min-height: 70px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 10px 22px rgba(39, 48, 80, .1);
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 900;
}

.bubble {
  color: white;
  background: linear-gradient(135deg, #ff8a5b, #ff5d73);
}

.bubble.target {
  animation: miniPulse 1.1s infinite ease-in-out;
  outline: 5px solid rgba(255, 183, 3, .4);
}

.card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.memory-card {
  min-height: 84px;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}

.memory-card:hover, .tile:hover { transform: translateY(-3px); }
.memory-card.open { color: white; background: linear-gradient(135deg, #6c5ce7, #00b4d8); }
.memory-card.done { color: #226b48; background: #dff8eb; cursor: default; }

.note-track {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.note {
  color: white;
  background: linear-gradient(180deg, #6c5ce7, #4d42ba);
}

.note.current {
  background: linear-gradient(180deg, #ffb703, #ff7a59);
  transform: translateY(-8px) scale(1.04);
}

.maze-grid {
  grid-template-columns: repeat(5, minmax(46px, 1fr));
}

.maze-cell {
  min-height: 58px;
  border-radius: 16px;
  background: #edf0fa;
  font-size: 22px;
}

.maze-cell.hero { color: white; background: linear-gradient(135deg, #23ae75, #00b4d8); }
.maze-cell.treasure { color: white; background: linear-gradient(135deg, #ffb703, #ff8a5b); }
.maze-cell.next { outline: 4px solid rgba(108,92,231,.22); }

.tile-bank {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tile {
  cursor: pointer;
  min-height: 64px;
  color: white;
  background: linear-gradient(135deg, #00a8c6, #6c5ce7);
}

.sentence-line {
  min-height: 78px;
  padding: 16px;
  border: 3px dashed #dfe3f2;
  border-radius: 18px;
  background: white;
  color: var(--primary);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.55;
}

.mini-feedback {
  min-height: 34px;
  color: var(--primary);
  text-align: center;
  font-size: 18px;
  font-weight: 900;
}

.mini-input-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.mini-input-wrap label {
  color: var(--muted);
  font-weight: 900;
}

@keyframes miniPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@media (max-width: 860px) {
  .mini-hero { grid-template-columns: 1fr; }
  .bubble-grid, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note-track { grid-template-columns: repeat(5, minmax(48px, 1fr)); }
  .tile-bank { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) and (max-height: 820px) {
  .mini-stage { gap: 10px; }
  .mini-panel { padding: 14px; border-radius: 18px; }
  .mini-hero {
    grid-template-columns: .9fr 1.1fr;
    gap: 12px;
  }

  .mission-card,
  .mini-board {
    min-height: 178px;
  }

  .mission-word {
    margin: 8px 0;
    font-size: clamp(34px, 4.8vw, 58px);
    letter-spacing: 1px;
  }

  .mission-hint {
    font-size: 14px;
    line-height: 1.45;
  }

  .bubble-grid, .card-grid, .note-track, .maze-grid, .tile-bank {
    gap: 8px;
  }

  .bubble, .memory-card, .note, .tile, .maze-cell {
    min-height: 46px;
    border-radius: 14px;
    font-size: clamp(17px, 2vw, 24px);
  }

  .memory-card { min-height: 52px; }
  .maze-cell { min-height: 38px; font-size: 18px; }
  .tile { min-height: 44px; }

  .sentence-line {
    min-height: 52px;
    padding: 10px 12px;
    border-width: 2px;
    border-radius: 14px;
    font-size: clamp(18px, 2.2vw, 26px);
    line-height: 1.35;
  }

  .mini-input-wrap {
    gap: 5px;
  }

  .mini-input-wrap label,
  .mini-feedback {
    font-size: 14px;
  }

  .mini-feedback { min-height: 22px; }
}

@media (max-width: 520px) {
  .mission-card { min-height: 210px; }
  .bubble, .memory-card, .note, .tile { min-height: 58px; }
  .maze-cell { min-height: 48px; }
}
