/* ==========================================================================
   Lollyland - Choose Your Own Adventure (CSS Styles)
   Whimsical, colorful, kid-friendly pastel rainbow aesthetic
   ========================================================================== */

:root {
  --ll-primary: #ff5e97;
  --ll-primary-hover: #e04880;
  --ll-secondary: #54a0ff;
  --ll-secondary-hover: #2e86de;
  --ll-gold: #feca57;
  --ll-gold-hover: #ff9f43;
  --ll-mint: #1dd1a1;
  --ll-purple: #9b59b6;
  --ll-pink-soft: #ffeef6;
  --ll-card-bg: rgba(255, 255, 255, 0.94);
  --ll-card-border: #ffd1e3;
  --ll-text-dark: #2d3436;
  --ll-text-muted: #636e72;
  --ll-radius-lg: 24px;
  --ll-radius-md: 16px;
  --ll-radius-sm: 10px;
  --ll-shadow: 0 12px 36px rgba(255, 107, 129, 0.22);
}

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

body {
  font-family: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ll-text-dark);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-color: #ffeaa7;
  background-image: radial-gradient(#ffbe76 15%, transparent 16%), radial-gradient(#ff7979 15%, transparent 16%);
  background-size: 60px 60px;
  background-position: 0 0, 30px 30px;
}

/* Background video & backdrop scrim */
#llBackgroundVideo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
}

.ll-scrim {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(255, 240, 246, 0.72) 0%, rgba(255, 220, 240, 0.88) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: -1;
  pointer-events: none;
}

/* Header & Navigation Bar */
.ll-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 3px solid #ffccd5;
  box-shadow: 0 4px 18px rgba(255, 159, 243, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ll-header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ll-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ll-primary);
}

.ll-logo-icon {
  font-size: 2rem;
  line-height: 1;
  animation: floatBounce 3s ease-in-out infinite;
}

.ll-brand h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(45deg, #ff477e, #ff85a1, #70d6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ll-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.label-short {
  display: none;
}

.label-long {
  display: inline;
}

.ll-ctrl-btn {
  background: #fff;
  border: 2px solid #ffccd5;
  color: var(--ll-text-dark);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.ll-ctrl-btn:hover {
  transform: translateY(-2px);
  border-color: var(--ll-primary);
  background: var(--ll-pink-soft);
}

.ll-wardrobe-btn {
  background: linear-gradient(135deg, #ffd166, #ff9f43);
  color: #fff;
  border: 2px solid #ffa502;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.ll-wardrobe-btn:hover {
  background: linear-gradient(135deg, #ff9f43, #ee5253);
  color: #fff;
}

.ll-home-link {
  text-decoration: none;
}

.ll-ctrl-btn.ll-tts-active {
  background: linear-gradient(135deg, #a8ff78, #78ffd6);
  border-color: #2ed573;
  color: #1b4332;
  box-shadow: 0 0 10px rgba(46, 213, 115, 0.4);
}

/* HUD Badges */
.ll-hud-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ll-badge {
  font-size: 0.88rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ll-player-badge {
  background: #ffffff;
  border: 2px solid #ffd166;
  color: #2d3436;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(254, 202, 87, 0.3);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ll-player-badge:hover {
  transform: translateY(-2px);
  background: #fffdf2;
  border-color: #ff9f43;
  box-shadow: 0 5px 14px rgba(255, 159, 67, 0.4);
}

.player-badge-name {
  font-weight: 850;
  color: #d35400;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-badge-edit {
  font-size: 0.72rem;
  opacity: 0.65;
  transition: transform 0.2s, opacity 0.2s;
}

.ll-player-badge:hover .player-badge-edit {
  opacity: 1;
  transform: scale(1.2);
}

.ll-level-badge {
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
  color: #fff;
  box-shadow: 0 3px 10px rgba(255, 117, 140, 0.35);
}

.ll-companion-badge {
  background: #fff;
  border: 2px solid #ff77aa;
  color: #d63031;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Player Name Modal */
.ll-name-modal-card {
  max-width: 460px;
}

.ll-name-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ll-name-intro {
  font-size: 1.05rem;
  font-weight: 650;
  color: #4b5563;
  line-height: 1.5;
  margin: 0;
}

.ll-name-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ll-name-input {
  flex: 1;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 12px 16px;
  border-radius: 14px;
  border: 2px solid #ffd1e3;
  background: #fff;
  color: #2d3436;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ll-name-input:focus {
  border-color: #ff477e;
  box-shadow: 0 0 0 4px rgba(255, 71, 126, 0.15);
}

.ll-name-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

/* Quest Active Bar */
.ll-quest-bar {
  background: linear-gradient(90deg, #ffeef8, #f0f7ff, #f9f0ff);
  border-bottom: 2px dashed #ffb3c6;
  padding: 8px 16px;
}

.ll-quest-bar-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quest-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.quest-label {
  font-weight: 800;
  color: #e84393;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.quest-target-candy {
  font-weight: 800;
  color: var(--ll-text-dark);
  background: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #ffd1e3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quest-hints-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quest-hints-pill {
  background: linear-gradient(135deg, #fff3b0, #ffd166);
  border: 1.5px solid #ffa502;
  color: #7a4100;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(255, 165, 2, 0.22);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: 0.3px;
  user-select: none;
}

.quest-hints-pill:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 10px rgba(255, 165, 2, 0.35);
  background: linear-gradient(135deg, #ffe066, #ff9f43);
}

.quest-hints-pill:active {
  transform: translateY(0) scale(0.98);
}

.quest-hints-pill.is-open {
  background: #ffffff;
  border-color: #ff7675;
  color: #d63031;
}

.hints-pill-arrow {
  display: inline-block;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.quest-steps-tracker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.quest-steps-tracker[hidden],
.quest-steps-tracker.is-hidden {
  display: none !important;
}

.quest-steps-tracker.is-visible {
  display: flex !important;
}

.quest-step-dot {
  font-size: 0.8rem;
  font-weight: 750;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dcdde1;
  color: var(--ll-text-muted);
}

.quest-step-dot.step-current {
  background: #ffeaa7;
  border-color: #fdcb6e;
  color: #d35400;
  animation: pulseLight 1.8s infinite;
}

.quest-step-dot.step-done {
  background: #dff9fb;
  border-color: #7ed6df;
  color: #22a6b3;
}

/* Main Container */
.ll-main-wrapper {
  max-width: 860px;
  margin: 28px auto 60px;
  padding: 0 16px;
}

.ll-card {
  background: var(--ll-card-bg);
  border: 4px solid var(--ll-card-border);
  border-radius: var(--ll-radius-lg);
  box-shadow: var(--ll-shadow);
  padding: 32px 28px;
  position: relative;
  transition: all 0.3s ease;
}

@media (max-width: 600px) {
  .ll-card {
    padding: 22px 16px;
    border-width: 3px;
  }
}

/* Fairy Avatar Hub */
.fairy-avatar-wrap {
  text-align: center;
  margin-bottom: 20px;
}

.fairy-avatar {
  font-size: 4.5rem;
  line-height: 1;
  display: inline-block;
  animation: floatFairy 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(255, 107, 129, 0.3));
}

.fairy-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #e84393;
  margin-top: 8px;
}

/* Speech Bubble */
.speech-bubble {
  background: #ffffff;
  border: 3px solid #ffb3c6;
  border-radius: 20px;
  padding: 20px 22px;
  position: relative;
  margin: 16px 0 24px;
  box-shadow: 0 4px 14px rgba(255, 159, 243, 0.15);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.speech-bubble.is-speaking,
.dify-caption-box.is-speaking,
.prize-card-awarded.is-speaking,
.companion-goodbye-card.is-speaking,
.target-candy-card.is-speaking,
.route-order-card.is-speaking,
.wardrobe-summary-box.is-speaking,
.outfit-quick-glance.is-speaking,
.loc-description-box.is-speaking,
.is-speaking {
  border-color: #ff6b8b !important;
  box-shadow: 0 0 20px rgba(255, 107, 139, 0.5) !important;
  animation: pulseSpeech 1.5s ease-in-out infinite alternate !important;
}

.speech-bubble,
.dify-caption-box,
.prize-card-awarded,
.companion-goodbye-card,
.target-candy-card,
.route-order-card,
.companion-tip-box,
.outfit-quick-glance,
.wardrobe-summary-box,
.prize-story-card,
.empty-wardrobe-msg,
.wardrobe-instruction,
.loc-description-box,
.ceremony-next-steps,
.companion-bubble-inline,
.companion-bubble,
.arrival-header,
.choice-feedback,
.subcandies-prompt,
.ll-restore-banner {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.prize-card-awarded:hover,
.companion-goodbye-card:hover,
.target-candy-card:hover,
.route-order-card:hover,
.companion-tip-box:hover,
.outfit-quick-glance:hover,
.wardrobe-summary-box:hover,
.prize-story-card:hover,
.loc-description-box:hover,
.companion-bubble-inline:hover,
.companion-bubble:hover,
.arrival-header:hover,
.choice-feedback:hover,
.subcandies-prompt:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 139, 0.22);
}

.ll-queue-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #7d446b;
  cursor: pointer;
  user-select: none;
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(255, 240, 246, 0.7);
  border: 1px solid rgba(255, 107, 139, 0.25);
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.ll-queue-row:hover {
  background: rgba(255, 230, 240, 0.9);
}

.ll-queue-row input[type="checkbox"] {
  accent-color: #ff6b8b;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

@keyframes pulseSpeech {
  0% { transform: scale(1); }
  100% { transform: scale(1.012); }
}

.speech-bubble-top-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.speech-listen-btn {
  background: #fff0f5;
  border: 1px solid #ffccd5;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #d63384;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.speech-listen-btn:hover {
  background: #ffe3ec;
  transform: scale(1.05);
}

.speech-bubble p {
  font-size: 1.15rem;
  line-height: 1.65;
  color: #2f3640;
  font-weight: 600;
}

.ll-narration-placeholder {
  color: #6c5ce7;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: placeholderBreathe 2s infinite ease-in-out;
}

.ll-typing-sparkle {
  display: inline-block;
  animation: sparkleTwinkle 1.2s infinite ease-in-out;
}

@keyframes sparkleTwinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.7; }
  50% { transform: scale(1.3) rotate(15deg); opacity: 1; }
}

@keyframes placeholderBreathe {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

.speech-bubble::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 14px 14px 14px;
  border-style: solid;
  border-color: transparent transparent #ffb3c6 transparent;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 12px 12px 12px;
  border-style: solid;
  border-color: transparent transparent #ffffff transparent;
}

/* Outfit Quick Glance */
.outfit-quick-glance {
  background: linear-gradient(135deg, #fff7d6, #ffeef8);
  border: 2px dashed #feca57;
  border-radius: var(--ll-radius-md);
  padding: 16px 18px;
  margin-bottom: 24px;
}

.outfit-quick-title {
  font-weight: 800;
  color: #d35400;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.outfit-quick-desc {
  font-size: 1rem;
  line-height: 1.5;
  color: #2c3e50;
  font-weight: 600;
}

/* Action Buttons */
.ll-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

#llLocationGameActions,
#llLocationContinueActions,
#llFinaleGameActions,
#llFinaleContinueActions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#llLocationGameActions[hidden],
#llLocationContinueActions[hidden],
#llFinaleGameActions[hidden],
#llFinaleContinueActions[hidden] {
  display: none !important;
}

.ll-btn {
  font-family: inherit;
  font-size: 1.18rem;
  font-weight: 800;
  padding: 16px 26px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  width: 100%;
}

.ll-btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.ll-btn:active {
  transform: translateY(1px) scale(0.99);
}

.ll-btn:disabled,
.ll-btn[disabled],
.ll-btn.is-painting-disabled {
  opacity: 0.62 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
  box-shadow: none !important;
  filter: grayscale(0.25);
}

.ll-btn-primary {
  background: linear-gradient(135deg, #ff6b8b, #ff8e53);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(255, 107, 139, 0.35);
  border-bottom: 4px solid #d94565;
}

.ll-btn-secondary {
  background: linear-gradient(135deg, #48dbfb, #0abde3);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(10, 189, 227, 0.35);
  border-bottom: 4px solid #079bb9;
}

.ll-btn-gold {
  background: linear-gradient(135deg, #feca57, #ff9f43);
  color: #5c3000;
  box-shadow: 0 8px 24px rgba(255, 159, 67, 0.4);
  border-bottom: 4px solid #d97818;
}

.ll-btn-outline {
  background: #ffffff;
  color: var(--ll-text-muted);
  border: 2px solid #dcdde1;
  font-size: 1rem;
  padding: 10px 18px;
}

.ll-btn-outline:hover {
  background: #f5f6fa;
  color: #2d3436;
}

.ll-btn-sm {
  font-size: 0.95rem;
  padding: 8px 16px;
  width: auto;
}

/* Companion Screen */
.companion-prompt-container {
  text-align: center;
}

/* Companion Animated GIF Showcase (Resized to canvas / card) */
.companion-gif-wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto 16px;
  border-radius: var(--ll-radius-md);
  border: 4px solid var(--ll-primary);
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.companion-gif-wrap:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.companion-gif-wrap-arrival {
  max-width: 460px;
  margin: 12px auto 14px;
}

.companion-gif-wrap-goodbye {
  max-width: 460px;
  margin: 0 auto 16px;
}

.companion-gif-wrap-victory {
  max-width: 460px;
  margin: 14px auto 16px;
}

.companion-gif-canvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.companion-celebrate-card,
.companion-victory-card {
  margin: 14px 0 18px;
  text-align: center;
}


.companion-avatar-big {
  width: 110px;
  height: 110px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 4px solid;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.companion-icon-huge {
  font-size: 3.8rem;
  line-height: 1;
}

.companion-name {
  font-size: 1.8rem;
  font-weight: 900;
}

.companion-species {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ll-text-muted);
  margin-bottom: 12px;
}

.companion-bubble {
  border-color: #ffd1e3;
  margin: 14px 0;
}

.companion-tip-box {
  background: #f0f7ff;
  border-radius: 12px;
  padding: 12px 16px;
  color: #2e86de;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* Inline Companion Speech Bubble */
.companion-bubble-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 2px solid #ff77aa;
  border-radius: 18px;
  padding: 14px 18px;
  margin: 16px 0;
  box-shadow: 0 4px 12px rgba(255, 119, 170, 0.15);
  font-size: 1.05rem;
}

.companion-bubble-inline .comp-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.companion-celebrate {
  border-color: #1dd1a1;
  background: #eafff8;
  color: #10ac84;
}

/* Target Candy Card */
.target-candy-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #fff2f7, #fef9e7);
  border: 3px solid #ffccd5;
  border-radius: var(--ll-radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.candy-icon-large {
  font-size: 3.8rem;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.candy-details {
  flex: 1;
}

.candy-badge {
  display: inline-block;
  background: #ff5e97;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.candy-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #2d3436;
  margin-bottom: 4px;
}

.candy-note {
  font-size: 0.98rem;
  color: var(--ll-text-muted);
  line-height: 1.4;
}

/* Route Order Card */
.route-order-card {
  background: #ffffff;
  border: 2px solid #e0e7ff;
  border-radius: var(--ll-radius-md);
  padding: 16px 20px;
  margin: 16px 0;
}

.route-order-card h3 {
  font-size: 1.05rem;
  color: #4b6584;
  margin-bottom: 10px;
}

.route-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 1.02rem;
}

/* Exploration Choices */
.exploration-header {
  text-align: center;
  margin-bottom: 22px;
}

.exploration-step-tag {
  background: #ffeaa7;
  color: #d35400;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 14px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 8px;
}

.exploration-header h2 {
  font-size: 1.7rem;
  font-weight: 900;
  color: #2d3436;
  margin-bottom: 6px;
}

.exploration-reminder {
  font-size: 1.05rem;
  color: #57606f;
}

.loc-choices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.ll-loc-choice-btn {
  background: #ffffff;
  border: 3px solid #ffccd5;
  border-radius: 20px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.ll-loc-choice-btn:hover {
  transform: translateY(-5px) scale(1.03);
  border-color: #ff477e;
  box-shadow: 0 12px 28px rgba(255, 71, 126, 0.25);
  background: #fff5f8;
}

.loc-choice-icon {
  font-size: 3.2rem;
  line-height: 1;
}

.loc-choice-name {
  font-size: 1.25rem;
  font-weight: 850;
  color: #2f3542;
  text-align: center;
}

/* Feedback Box */
.choice-feedback {
  border-radius: 16px;
  padding: 16px 20px;
  margin: 16px 0;
}

.feedback-wrong {
  background: #fff9f0;
  border: 2px solid #fed330;
  color: #574b90;
}

.feedback-right {
  background: #f0fff4;
  border: 2px solid #55efc4;
  color: #00b894;
}

.feedback-text {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

/* Trail History */
.trail-history {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 2px dashed #f1f2f6;
  font-size: 0.95rem;
  color: var(--ll-text-muted);
}

.trail-title {
  font-weight: 800;
  margin-right: 8px;
  color: #747d8c;
}

.trail-item {
  font-weight: 750;
  color: #2f3542;
  background: #f1f2f6;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  margin: 2px 4px;
}

/* Location Arrival View */
.arrival-header {
  text-align: center;
  margin-bottom: 18px;
}

.arrival-icon-huge {
  font-size: 4.8rem;
  line-height: 1;
  display: inline-block;
  margin-bottom: 6px;
  animation: floatBounce 3s ease-in-out infinite;
}

.arrival-title {
  font-size: 2rem;
  font-weight: 900;
  color: #2d3436;
}

.arrival-badge {
  display: inline-block;
  background: #1dd1a1;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
  margin-top: 6px;
}

.arrival-badge-scenic {
  background: linear-gradient(135deg, #a29bfe, #fd79a8);
  color: #fff;
  box-shadow: 0 3px 10px rgba(162, 155, 254, 0.35);
}

.loc-description-box {
  border-color: #a29bfe;
  background: #fdfbff;
}

.loc-description-box p {
  font-size: 1.2rem;
  line-height: 1.7;
}

/* Mini-Game View */
.minigame-header {
  text-align: center;
  margin-bottom: 20px;
}

.minigame-badge {
  display: inline-block;
  background: #feca57;
  color: #5c3000;
  font-weight: 850;
  font-size: 0.85rem;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.minigame-header h2 {
  font-size: 1.8rem;
  font-weight: 900;
  color: #2d3436;
  margin-bottom: 8px;
}

.minigame-chances {
  margin-top: 10px;
  display: inline-block;
  background: #e8f7ff;
  border: 2px solid #70d6ff;
  color: #0088cc;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 800;
}

.subcandies-prompt {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 750;
  color: #2f3640;
  margin-bottom: 16px;
}

.subcandies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}

.ll-candy-card-btn {
  background: #ffffff;
  border: 3px solid #ffeaa7;
  border-radius: 22px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.ll-candy-card-btn:hover {
  transform: translateY(-6px) scale(1.04);
  border-color: #ff9f43;
  background: #fffcf4;
  box-shadow: 0 14px 28px rgba(255, 159, 67, 0.3);
}

.candy-card-icon {
  font-size: 3.5rem;
  line-height: 1;
}

.candy-card-name {
  font-size: 1.15rem;
  font-weight: 850;
  color: #2d3436;
  text-align: center;
}

.candy-card-hint {
  font-size: 0.85rem;
  font-weight: 800;
  color: #e67e22;
  background: #ffeaa7;
  padding: 2px 10px;
  border-radius: 999px;
}

/* Munching Animation State */
.munch-container {
  text-align: center;
  padding: 40px 20px;
}

.munch-animation {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 16px;
  animation: munchPulse 0.4s ease-in-out infinite alternate;
}

/* Victory Screen */
.victory-container {
  text-align: center;
  padding: 20px 0;
}

.candy-reveal-glow {
  width: 140px;
  height: 140px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 40%, #ff9ff3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 35px #ff9ff3, 0 0 65px #feca57;
  animation: floatBounce 2.5s ease-in-out infinite;
}

.candy-reveal-icon {
  font-size: 5rem;
  line-height: 1;
}

.victory-tag {
  background: linear-gradient(135deg, #1dd1a1, #10ac84);
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  padding: 6px 20px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 10px;
}

.victory-container h2 {
  font-size: 2.2rem;
  font-weight: 900;
  color: #2d3436;
  margin-bottom: 12px;
}

.victory-desc {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #57606f;
  max-width: 600px;
  margin: 0 auto 24px;
}

/* Prize Ceremony */
.ceremony-container {
  text-align: center;
}

.prize-card-awarded {
  background: linear-gradient(135deg, #fff6f9, #f7f3ff);
  border: 4px solid #f368e0;
  border-radius: var(--ll-radius-lg);
  padding: 26px 24px;
  margin: 20px 0;
  box-shadow: 0 10px 30px rgba(243, 104, 224, 0.25);
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
}

@media (max-width: 600px) {
  .prize-card-awarded {
    flex-direction: column;
    text-align: center;
  }
}

.prize-icon-huge {
  font-size: 4.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.prize-category-badge {
  display: inline-block;
  background: #9b59b6;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.prize-name {
  font-size: 1.6rem;
  font-weight: 900;
  color: #2c3e50;
  margin-bottom: 6px;
}

.prize-description {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #636e72;
}

/* Companion Goodbye Card */
.companion-goodbye-card {
  background: #ffffff;
  border: 3px solid;
  border-radius: 20px;
  padding: 20px 22px;
  margin: 20px 0;
  text-align: left;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.goodbye-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.goodbye-header h3 {
  font-size: 1.2rem;
  color: #2d3436;
}

.goodbye-speech {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #2f3640;
  margin-bottom: 12px;
}

.goodbye-response {
  font-size: 0.98rem;
  color: #747d8c;
}

.ceremony-next-steps {
  font-size: 1.25rem;
  font-weight: 800;
  color: #10ac84;
  margin: 16px 0;
}

/* Dressing Room Modal */
.ll-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(45, 52, 54, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ll-modal-overlay[hidden] {
  display: none !important;
}

.ll-modal-card {
  background: #ffffff;
  border: 4px solid #ffd1e3;
  border-radius: var(--ll-radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ll-modal-header {
  padding: 18px 24px;
  border-bottom: 2px solid #ffeef6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #fff5f8, #f5f6ff);
}

.ll-modal-header h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #2d3436;
}

.ll-modal-close-btn {
  background: #f1f2f6;
  border: none;
  font-size: 1.3rem;
  font-weight: 800;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ll-modal-close-btn:hover {
  background: #ff7675;
  color: #fff;
}

.ll-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.wardrobe-summary-box {
  background: linear-gradient(135deg, #fff7d6, #ffeef8);
  border: 3px solid #feca57;
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 22px;
}

.wardrobe-summary-box h3 {
  font-size: 1.15rem;
  font-weight: 850;
  color: #d35400;
  margin-bottom: 8px;
}

.wardrobe-summary-box p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #2d3436;
}

.prize-detail-area {
  margin-bottom: 22px;
}

.prize-story-card {
  background: #f8f1ff;
  border: 3px solid #9b59b6;
  border-radius: 18px;
  padding: 18px 20px;
  animation: modalPop 0.3s ease;
}

.story-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.story-icon {
  font-size: 2.8rem;
  line-height: 1;
}

.story-header h4 {
  font-size: 1.35rem;
  font-weight: 900;
  color: #4a148c;
}

.story-level {
  font-size: 0.85rem;
  font-weight: 800;
  background: #9b59b6;
  color: #fff;
  padding: 2px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-top: 4px;
}

.story-text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #2d3436;
  margin-bottom: 14px;
}

.wardrobe-instruction {
  font-size: 0.98rem;
  font-weight: 750;
  color: var(--ll-text-muted);
  margin-bottom: 14px;
}

.wardrobe-section-title {
  font-size: 1.05rem;
  font-weight: 850;
  color: #d35400;
  margin: 18px 0 10px;
}

.wardrobe-empty-slot {
  font-size: 0.95rem;
  color: var(--ll-text-muted);
  font-style: italic;
  margin: 0 0 8px;
}

.wardrobe-prize-card.is-worn {
  border-color: #54a0ff;
  background: #f0f7ff;
}

.wardrobe-prize-card.is-swap-target {
  border-color: #feca57;
  box-shadow: 0 0 0 3px rgba(254, 202, 87, 0.45);
}

.wp-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.wp-wear-btn,
.wp-ask-btn {
  font-size: 0.72rem;
  font-weight: 750;
  padding: 3px 9px;
  border-radius: 6px;
  border: 0;
  cursor: pointer;
  width: auto;
  min-width: auto;
  height: 24px;
  min-height: 24px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.wp-wear-btn:hover,
.wp-ask-btn:hover {
  transform: scale(1.03);
}

.wp-ask-btn {
  background: #f1f2f6;
  color: #57606f;
}

.wp-ask-btn:hover {
  background: #e4e7eb;
}

.wp-wear-btn {
  background: #54a0ff;
  color: #fff;
}

.wp-wear-btn:hover {
  background: #2e86de;
}

.wp-wear-btn.is-on {
  background: #ff6b81;
}

.wp-wear-btn.is-on:hover {
  background: #ee5253;
}

.equip-swap-banner,
.ceremony-equip-panel {
  background: linear-gradient(135deg, #fff7d6, #ffeef8);
  border: 3px solid #feca57;
  border-radius: 16px;
  padding: 14px 16px;
  margin: 12px 0 16px;
}

.equip-swap-banner.is-notice {
  border-color: #54a0ff;
  background: linear-gradient(135deg, #eef7ff, #fff0f5);
}

.ceremony-equip-panel h3 {
  font-size: 1.15rem;
  color: #d35400;
  margin-bottom: 6px;
}

.ceremony-equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.ceremony-swap-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border: 2px solid #ffd1e3;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.ceremony-swap-btn:hover:not(:disabled) {
  border-color: #54a0ff;
  background: #f0f7ff;
}

.ceremony-swap-btn:disabled,
.ceremony-equip-panel button:disabled {
  opacity: 0.55;
  cursor: default;
}

.swap-icon {
  font-size: 1.8rem;
}

.swap-name {
  font-size: 0.85rem;
  text-align: center;
}

.ceremony-equip-status {
  margin-top: 10px;
  font-weight: 800;
  color: #2d3436;
}

.prizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.wardrobe-prize-card {
  background: #ffffff;
  border: 2px solid #ffd1e3;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.wardrobe-prize-card:hover, .wardrobe-prize-card:focus {
  transform: translateY(-2px) scale(1.01);
  border-color: #ff5e97;
  background: #fff5f8;
  outline: none;
}

.wp-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Prize Icon Badges with Awarded Color Background */
.prize-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  line-height: 1;
}

.prize-icon-badge:hover {
  transform: scale(1.06);
}

.prize-icon-huge.prize-icon-badge {
  padding: 14px 22px;
  font-size: 4.2rem;
  border-radius: 26px;
  border-width: 3.5px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22), inset 0 3px 6px rgba(255, 255, 255, 0.7);
}

.wp-icon.prize-icon-badge {
  padding: 6px 10px;
  font-size: 2.2rem;
  border-radius: 14px;
  border-width: 2px;
}

.swap-icon.prize-icon-badge {
  padding: 4px 8px;
  font-size: 1.5rem;
  border-radius: 10px;
  border-width: 1.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.story-icon.prize-icon-badge {
  padding: 8px 14px;
  font-size: 2.6rem;
  border-radius: 18px;
  border-width: 2.5px;
}

.wp-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  line-height: 1.2;
}

.wp-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #e84393;
}

.wp-category {
  font-size: 0.68rem;
  font-weight: 700;
  color: #747d8c;
}

.wp-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #2d3436;
  margin: 1px 0 3px;
  line-height: 1.25;
  word-break: break-word;
}

.empty-wardrobe-msg {
  text-align: center;
  padding: 40px 20px;
  color: var(--ll-text-muted);
}

.empty-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 12px;
}

/* Confetti particles */
.ll-confetti {
  position: fixed;
  top: -20px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  z-index: 10000;
  pointer-events: none;
  animation: confettiFall linear forwards;
}

/* Keyframes Animations */
@keyframes floatFairy {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

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

@keyframes pulseLight {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

@keyframes munchPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.15) rotate(5deg); }
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* Dify AI Wardrobe Image Styles */
.wardrobe-image-action-row,
.prize-image-action-row,
.location-image-action-row {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.dify-image-display-area {
  margin: 16px 0;
}

.dify-frame-loading {
  background: linear-gradient(135deg, #fff9e6, #fff0f5);
  border: 3px dashed #feca57;
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  animation: pulseLight 1.8s infinite;
}

.dify-magic-spinner {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 10px;
  animation: floatBounce 1.5s ease-in-out infinite;
}

.dify-frame-loading h4 {
  font-size: 1.25rem;
  font-weight: 850;
  color: #d35400;
  margin-bottom: 4px;
}

.dify-loading-subtext {
  font-size: 0.95rem;
  color: #747d8c;
}

.dify-result-card {
  background: #ffffff;
  border: 3px solid #feca57;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(254, 202, 87, 0.3);
  animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 14px;
}

.dify-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.dify-result-header h4 {
  font-size: 1.15rem;
  font-weight: 850;
  color: #2d3436;
}

.dify-badge {
  background: linear-gradient(135deg, #feca57, #ff9f43);
  color: #5c3000;
  font-size: 0.78rem;
  font-weight: 850;
  padding: 3px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}

.dify-portrait-wrapper {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}

.dify-gold-frame {
  background: linear-gradient(135deg, #ffeaa7, #fdcb6e, #feca57, #e17055);
  padding: 10px;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  max-width: 100%;
}

.ll-dify-image {
  display: block;
  max-width: 100%;
  max-height: 400px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dify-no-direct-img-notice {
  text-align: center;
  padding: 14px;
  color: #747d8c;
}

.dify-palette-icon {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 6px;
}

.dify-worn-list {
  margin: 10px 8px 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #6c3483;
  line-height: 1.45;
}

.dify-caption-box {
  background: #fdfbf7;
  border: 2px solid #ffeaa7;
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #2d3436;
  margin-top: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 234, 167, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.dify-caption-box:hover {
  border-color: #ffd32a;
  box-shadow: 0 6px 16px rgba(255, 211, 42, 0.3);
}

.dify-caption-box.is-speaking {
  border-color: #ff6b8b;
  box-shadow: 0 0 18px rgba(255, 107, 139, 0.45);
  animation: pulseSpeech 1.5s ease-in-out infinite alternate;
}

.dify-result-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.dify-frame-error {
  background: #fff5f5;
  border: 2px solid #ff7675;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  margin-top: 14px;
}

.dify-frame-error .error-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}

.dify-frame-error h4 {
  color: #d63031;
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.dify-frame-error .error-msg {
  color: #636e72;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.dify-frame-error .error-hint {
  font-size: 0.85rem;
  color: #747d8c;
  margin-bottom: 12px;
}

/* Live Dify Narration Sparkle */
.ll-typing-sparkle {
  display: inline-block;
  font-size: 1.15rem;
  animation: sparkleBounce 0.8s ease-in-out infinite alternate;
  vertical-align: middle;
  margin-left: 4px;
}

@keyframes sparkleBounce {
  0% { transform: scale(0.9) rotate(0deg); opacity: 0.6; }
  100% { transform: scale(1.3) rotate(20deg); opacity: 1; }
}

.ll-streaming-active {
  position: relative;
}

.ll-narration-placeholder {
  color: #6c5ce7;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  opacity: 0.85;
}

/* Sound & Volume Config Modal */
.ll-sound-modal-card {
  max-width: 480px;
  width: 92%;
}

.ll-sound-config-wrap {
  padding: 6px 4px;
}

.ll-sound-intro {
  font-size: 1.02rem;
  color: #636e72;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.5;
}

.ll-vol-control-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #fff5f8;
  padding: 20px;
  border-radius: 20px;
  border: 2px solid #ffccd5;
}

.ll-vol-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
}

.ll-vol-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  color: #2d3436;
}

.ll-vol-label {
  font-size: 1.05rem;
}

.ll-vol-pct {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ff477e;
  background: #ffffff;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1.5px solid #ffccd5;
  min-width: 52px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.ll-vol-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #ffd6e0;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ll-vol-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b8b, #ff8e53);
  border: 3px solid #ffffff;
  box-shadow: 0 3px 10px rgba(255, 107, 139, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.ll-vol-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.ll-voice-control-group {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff5f8;
  padding: 18px 20px;
  border-radius: 20px;
  border: 2px solid #ffccd5;
}

.ll-voice-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ll-voice-picker-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ll-voice-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 2px solid #ffccd5;
  background: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2d3436;
  outline: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.ll-voice-select:focus {
  border-color: #ff477e;
  box-shadow: 0 0 0 3px rgba(255, 71, 126, 0.2);
}

.ll-voice-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.ll-voice-actions-row .ll-btn {
  flex: 1;
  white-space: nowrap;
  padding: 10px 14px;
  font-size: 0.88rem;
  justify-content: center;
}

.ll-voice-reset-btn {
  color: #636e72;
  border-color: #ffd1e3;
  background: #ffffff;
}

.ll-voice-reset-btn:hover {
  background: #fff0f5;
  color: #d63031;
  border-color: #ff7675;
}

@media (max-width: 480px) {
  .ll-voice-actions-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.ll-sound-modal-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

/* Save / Load Progress Accordion */
.ll-save-accordion {
  width: 100%;
  max-width: 900px;
  margin: 18px auto 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid #ffd1e3;
  border-radius: var(--ll-radius-lg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
}

.ll-save-accordion > summary {
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #2d3436;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #fff5f8, #f5f6ff);
  user-select: none;
  transition: background 0.2s ease;
}

.ll-save-accordion > summary::-webkit-details-marker {
  display: none;
}

.ll-save-accordion > summary:hover {
  background: linear-gradient(135deg, #ffeef6, #eceeff);
  color: #ff477e;
}

.ll-save-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 1.1rem;
}

.ll-save-accordion[open] .ll-save-arrow {
  transform: rotate(180deg);
}

.ll-save-body {
  padding: 16px 20px 20px;
  border-top: 1.5px solid #ffeef6;
}

.ll-save-note {
  margin: 0 0 12px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #636e72;
}

#llSaveCode {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.4;
  word-break: break-all;
  color: #2d3436;
  background: #fffbfa;
  border: 2px solid #ffd1e3;
  border-radius: 12px;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#llSaveCode:focus {
  outline: none;
  border-color: #ff7675;
  box-shadow: 0 0 0 4px rgba(255, 118, 117, 0.15);
  background: #ffffff;
}

.ll-save-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.ll-save-msg {
  font-size: 0.9rem;
  font-weight: 700;
  color: #636e72;
  margin-left: 6px;
}

.ll-save-msg.is-bad {
  color: #d63031;
}

.ll-save-msg.is-good {
  color: #00b894;
}

.ll-save-msg a {
  color: #0984e3;
  text-decoration: underline;
  font-weight: 700;
}

.ll-save-msg a:hover {
  color: #d63031;
}

/* Restore / Load Confirmation Banner */
.ll-restore-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #e8f8f5, #d1f2eb);
  border: 2.5px solid #1dd1a1;
  border-radius: 18px;
  padding: 14px 20px;
  margin-bottom: 22px;
  color: #10ac84;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(29, 209, 161, 0.2);
  animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.restore-banner-icon {
  font-size: 1.6rem;
}

.restore-banner-text {
  line-height: 1.4;
  color: #2d3436;
}

.restore-banner-text strong {
  color: #10ac84;
}

/* ==========================================================================
   Mobile Portrait Compact Settings & Responsive Tweaks
   ========================================================================== */
@media (max-width: 768px) {
  .label-long {
    display: none;
  }
  .label-short {
    display: inline;
  }

  .ll-header-inner {
    padding: 8px 12px;
    gap: 8px;
  }

  .ll-brand {
    gap: 6px;
  }

  .ll-brand h1 {
    font-size: 1.35rem;
  }

  .ll-logo-icon {
    font-size: 1.6rem;
  }

  .ll-header-controls {
    gap: 5px;
  }

  .ll-ctrl-btn {
    font-size: 0.78rem;
    padding: 6px 10px;
    gap: 4px;
    border-width: 1.5px;
  }

  .ll-badge {
    font-size: 0.78rem;
    padding: 4px 10px;
  }

  .ll-quest-bar {
    padding: 6px 12px;
  }

  .ll-quest-bar-inner {
    gap: 8px;
  }

  .quest-info-left {
    font-size: 0.85rem;
    gap: 6px;
  }

  .quest-target-candy {
    font-size: 0.85rem;
    padding: 3px 8px;
  }

  .quest-hints-pill {
    font-size: 0.76rem;
    padding: 3px 10px;
  }
}

@media (max-width: 480px), (max-width: 600px) and (orientation: portrait) {
  .ll-header-inner {
    padding: 6px 8px;
    gap: 6px;
  }

  .ll-brand h1 {
    font-size: 1.2rem;
  }

  .ll-logo-icon {
    font-size: 1.4rem;
  }

  .ll-hud-row {
    gap: 4px;
  }

  .ll-header-controls {
    gap: 4px;
    width: 100%;
    justify-content: space-between;
  }

  .ll-ctrl-btn {
    font-size: 0.72rem;
    padding: 5px 7px;
    gap: 3px;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
  }

  .ll-ctrl-btn .ctrl-icon {
    font-size: 0.85rem;
  }

  .ll-ctrl-btn .ctrl-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Compact Sound Config Modal for Mobile Portrait */
  .ll-sound-modal-card {
    padding: 16px 14px;
  }

  .ll-sound-intro {
    font-size: 0.88rem;
    margin-bottom: 12px;
  }

  .ll-vol-control-group {
    padding: 12px;
    gap: 12px;
    border-radius: 14px;
  }

  .ll-vol-label {
    font-size: 0.9rem;
  }

  .ll-vol-pct {
    font-size: 0.82rem;
    padding: 2px 8px;
    min-width: 44px;
  }

  .ll-vol-row input[type="range"] {
    height: 10px;
  }

  .ll-vol-row input[type="range"]::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }

  .ll-sound-modal-actions {
    margin-top: 16px;
  }

  .ll-sound-modal-actions .ll-btn {
    padding: 10px 18px;
    font-size: 1rem;
  }

  /* Compact Quest Bar in Mobile Portrait */
  .ll-quest-bar-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .quest-hints-wrapper {
    gap: 6px;
  }

  .quest-step-dot {
    font-size: 0.72rem;
    padding: 3px 8px;
  }
}

/* ==========================================================================
   Emoji Mini-Games Overlay
   ========================================================================== */
.ll-emojigame-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  background: rgba(45, 20, 40, 0.55);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.ll-emojigame-overlay[hidden] {
  display: none !important;
}

body.ll-emojigame-open #custom-chat-widget {
  display: none !important;
}

.ll-emojigame-card {
  position: relative;
  width: min(640px, 100%);
  max-width: 100%;
  min-width: 0;
  max-height: min(96vh, 96dvh);
  overflow: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  background: linear-gradient(180deg, #fffdfb 0%, #fff0f6 100%);
  border: 4px solid #ffd1e3;
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(255, 94, 151, 0.35);
  padding: 16px 16px 20px;
  animation: modalPop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ll-emojigame-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
}

.ll-emojigame-close:hover {
  background: #ffd1e3;
  color: #c0392b;
}

.ll-emojigame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  padding-right: 42px;
}

.ll-emojigame-kind {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e84393;
  background: #ffeef6;
  border-radius: 999px;
  padding: 3px 10px;
}

.ll-emojigame-heading h2 {
  margin: 4px 0 0;
  font-size: 1.28rem;
  font-weight: 900;
  color: #2d3436;
}

.ll-emojigame-target {
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 4px 0 rgba(255, 182, 193, 0.7));
}

.ll-emojigame-hud {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 800;
  color: #6c3483;
  background: #f5eeff;
  border-radius: 12px;
  padding: 6px 12px;
}

.ll-emojigame-instructions {
  margin: 10px 0 14px;
  font-size: 1rem;
  font-weight: 650;
  color: #57606f;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ll-emojigame-stage {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  min-width: 0;
  max-width: 100%;
}

.ll-emojigame-win {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
  font-size: 1.6rem;
  font-weight: 900;
  color: #d35400;
  z-index: 30;
  pointer-events: none;
  animation: modalPop 0.3s ease;
}

.ll-btn.is-waiting-challenge {
  opacity: 0.55;
}

/* Bubble Burst */
.ll-burst-grid {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.ll-burst-cell {
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  min-width: 0;
  min-height: 0;
  touch-action: manipulation;
  font-size: clamp(1rem, 4.6vw, 1.85rem);
  line-height: 1;
  background: radial-gradient(circle at 30% 28%, #ffffff 0%, #ffe1f0 42%, #ff9ec8 100%);
  box-shadow: inset -3px -5px 8px rgba(255, 255, 255, 0.55), 0 4px 8px rgba(255, 94, 151, 0.22);
  transition: transform 0.12s ease;
}

.ll-burst-cell:hover {
  transform: scale(1.06);
}

.ll-burst-cell.is-popping {
  transform: scale(0);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.ll-burst-cell.is-miss {
  animation: llMissShake 0.28s ease;
}

@keyframes llMissShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px) rotate(-6deg); }
  75% { transform: translateX(5px) rotate(6deg); }
}

/* Jigsaw */
.ll-jig-playfield {
  position: relative;
  width: 100%;
  height: min(64vh, 540px);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.7), transparent 40%),
    linear-gradient(135deg, #e8f8ff, #fff0f8);
  border: 3px dashed #ffb6d5;
  border-radius: 18px;
  overflow: hidden;
  touch-action: none;
}

.ll-jig-board {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(52%, 270px);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.72);
  border: 3px solid #f8a5c2;
  border-radius: 14px;
  z-index: 1;
  box-shadow: 0 8px 24px rgba(232, 67, 147, 0.18);
}

.ll-jig-cell {
  border-radius: 8px;
  background: repeating-linear-gradient(45deg, #ffeef6, #ffeef6 6px, #fff 6px, #fff 12px);
  border: 1.5px dashed #f8a5c2;
}

.ll-jig-cell.is-filled {
  border-style: solid;
  background: #fff7fb;
}

.ll-jig-piece {
  position: absolute;
  width: 84px;
  height: 84px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  z-index: 4;
  cursor: grab;
  touch-action: none;
}

.ll-jig-piece.is-dragging {
  cursor: grabbing;
  transform: scale(1.05);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.25);
}

.ll-jig-piece.is-locked {
  pointer-events: none;
  border-color: #feca57;
  box-shadow: 0 0 0 3px #feca57, 0 0 18px 6px rgba(254, 202, 87, 0.75);
  animation: llPieceGlow 0.9s ease;
}

.ll-jig-piece.is-bounce {
  animation: llMissShake 0.28s ease;
}

@keyframes llPieceGlow {
  0% { filter: brightness(1.4); transform: scale(1.08); }
  100% { filter: brightness(1); transform: scale(1); }
}

/* Whack-a-mole */
.ll-whack-board {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ll-whack-hole {
  position: relative;
  appearance: none;
  border: 4px solid #6d4c41;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 70%, #3e2723 0%, #5d4037 55%, #8d6e63 100%);
  overflow: hidden;
  cursor: pointer;
  min-width: 0;
  min-height: 0;
  touch-action: manipulation;
}

.ll-whack-dirt {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 6%;
  height: 28%;
  background: #4e342e;
  border-radius: 50%;
  z-index: 2;
}

.ll-whack-mole {
  position: absolute;
  left: 50%;
  bottom: -70%;
  transform: translateX(-50%);
  font-size: clamp(2rem, 9vw, 3.4rem);
  line-height: 1;
  z-index: 1;
  transition: bottom 0.18s ease-out;
  pointer-events: none;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.2));
}

.ll-whack-hole.is-up .ll-whack-mole {
  bottom: 18%;
}

.ll-whack-hole.is-hit {
  transform: scale(0.94);
}

/* Memory */
.ll-mem-grid {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ll-mem-card {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  perspective: 700px;
  touch-action: manipulation;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.ll-mem-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.38s ease;
}

.ll-mem-card.is-flipped .ll-mem-inner,
.ll-mem-card.is-matched .ll-mem-inner {
  transform: rotateY(180deg);
}

.ll-mem-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  font-size: clamp(1.3rem, 5vw, 2.1rem);
  box-shadow: 0 4px 10px rgba(255, 94, 151, 0.18);
}

.ll-mem-back {
  background: linear-gradient(135deg, #ff9ff3, #54a0ff);
  color: #fff;
  border: 3px solid #fff;
}

.ll-mem-front {
  background: #fff;
  border: 3px solid #ffd1e3;
  transform: rotateY(180deg);
}

.ll-mem-card.is-matched .ll-mem-front {
  box-shadow: 0 0 0 3px #feca57, 0 0 16px 4px rgba(254, 202, 87, 0.7);
}

/* Candy Catch */
.ll-catch-field {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(#81d4fa 0%, #e1f5fe 42%, #fff8e7 100%);
  border: 3px solid #81d4fa;
  touch-action: none;
  cursor: none;
}

.ll-catch-basket {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.12));
}

.ll-catch-item {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, 0);
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

@media (max-width: 600px) {
  .ll-emojigame-overlay {
    padding: 6px;
    align-items: flex-start;
  }

  .ll-emojigame-card {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    padding: 12px 8px 12px;
    border-radius: 16px;
    max-height: calc(100dvh - 12px);
  }

  .ll-emojigame-close {
    top: 8px;
    right: 8px;
  }

  .ll-burst-grid,
  .ll-whack-board,
  .ll-mem-grid,
  .ll-catch-field,
  .ll-jig-playfield {
    width: 100%;
    max-width: 100%;
  }

  .ll-emojigame-header {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .ll-emojigame-heading {
    width: 100%;
  }

  .ll-emojigame-heading h2 {
    font-size: 1.05rem;
  }

  .ll-emojigame-target {
    font-size: 1.8rem;
  }

  .ll-emojigame-hud {
    align-self: flex-start;
    padding: 4px 10px;
    font-size: 0.9rem;
  }

  .ll-emojigame-instructions {
    font-size: 0.86rem;
    margin: 6px 0 10px;
  }

  .ll-jig-playfield {
    height: min(46dvh, 360px);
  }

  .ll-jig-board {
    width: min(54%, 180px);
  }

  .ll-burst-grid {
    gap: 4px;
  }

  .ll-burst-cell {
    font-size: clamp(0.85rem, 5.5vw, 1.35rem);
  }

  .ll-whack-board {
    gap: 8px;
  }

  .ll-mem-grid {
    gap: 6px;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  .ll-emojigame-overlay {
    padding: 4px;
  }

  .ll-emojigame-card {
    max-height: calc(100dvh - 8px);
  }

  .ll-jig-playfield {
    height: min(42dvh, 320px);
  }
}


