/* ===================================
   pen pen English — Screens (Game Style)
   Splash / Home / Account / Rewards / Parent
   =================================== */

/* ========== SPLASH ========== */
#screen-splash {
  justify-content: center;
  background: transparent; /* inherits Air Rider sky from #app */
}

.splash-inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
  position: relative; z-index: 1;
}

.splash-eyebrow {
  font-family: var(--font-ja); font-size: 13px; font-weight: 800;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: #5C3A21;
  margin-bottom: 16px;
  border: 2px solid #D4B59D;
  padding: 6px 20px; border-radius: 8px;
  background: #FFF9F0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.splash-mascot {
  width: 220px; height: 220px; object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(229,0,18,0.4)) brightness(1.05);
  margin-bottom: 12px;
  animation: pulse 3s ease infinite;
}

.splash-title {
  font-family: var(--font-game);
  font-size: 52px; font-weight: 900;
  letter-spacing: -0.03em; line-height: 0.95;
  text-align: center; color: var(--text-primary);
  text-shadow: 0 0 40px rgba(255,255,255,0.1);
}

.splash-title .accent-red  { color: var(--red); }
.splash-title .accent-blue { color: var(--sky-blue); }

.splash-subtitle {
  font-family: var(--font-ja); font-size: 14px; font-weight: 700;
  color: var(--text-secondary); margin-top: 10px; margin-bottom: 40px;
  letter-spacing: 0.04em;
}
.splash-subtitle span { color: var(--yellow); }

.splash-start-btn {
  animation: pulse 2s ease infinite 0.5s;
  font-size: 20px; padding: 18px 52px;
  letter-spacing: 0.08em;
}

/* Press button blink */
.press-hint {
  margin-top: 20px;
  font-family: var(--font-game); font-size: 12px;
  color: rgba(255,255,255,0.5); letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ========== ACCOUNT SELECT ========== */
.account-select-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
  width: 100%; max-width: 560px;
}

.screen-title {
  font-family: var(--font-game); font-size: 22px; font-weight: 900;
  color: var(--text-primary); text-align: center;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.screen-title-sub {
  font-family: var(--font-ja); font-size: 14px;
  color: var(--text-dim); text-align: center; margin-bottom: 20px;
}/* ========== AIR RIDER NAV BUTTONS ========== */
.air-nav-btn {
  width: 100%;
  background:
    repeating-linear-gradient(
      -45deg,
      #050508, #050508 10px,
      #161622 10px, #161622 20px
    );
  border-radius: 12px;
  border: 4px solid #FFFFFF;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.1s ease;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 6px 0 rgba(0,0,0,0.5), inset 0 0 10px rgba(0,0,0,0.8);
  position: relative; overflow: hidden;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.air-nav-btn:active {
  transform: translateY(4px) scale(0.98);
  box-shadow: 0 2px 0 rgba(0,0,0,0.5), inset 0 0 10px rgba(0,0,0,0.8);
}

.air-nav-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.air-nav-content {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
}

.air-nav-title {
  font-family: var(--font-game);
  font-size: 24px; font-weight: 900;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 2px;
  text-shadow: 2px 2px 0 #000;
}

.air-nav-sub {
  font-family: var(--font-ja); font-size: 13px; font-weight: 700;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
}

/* Corner playback triangle */
.air-nav-corner {
  position: absolute;
  bottom: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 0 32px 32px;
}
.air-nav-corner::after {
  content: '▶';
  position: absolute;
  bottom: -28px; left: -14px;
  color: #000;
  font-size: 10px; font-weight: 900;
}

/* Themes */
.theme-red .air-nav-corner { border-color: transparent transparent var(--red) transparent; }
.theme-red .air-nav-icon svg { color: var(--red); filter: drop-shadow(2px 2px 0 #000); }
.theme-red:hover { border-color: #FFB3C6; }

.theme-blue .air-nav-corner { border-color: transparent transparent var(--sky-blue) transparent; }
.theme-blue .air-nav-icon svg { color: var(--sky-blue); filter: drop-shadow(2px 2px 0 #000); }
.theme-blue:hover { border-color: #B3E5FF; }

.theme-yellow .air-nav-corner { border-color: transparent transparent var(--yellow) transparent; }
.theme-yellow .air-nav-icon svg { color: var(--yellow); filter: drop-shadow(2px 2px 0 #000); }
.theme-yellow:hover { border-color: #FFF2B3; }

.theme-green .air-nav-corner { border-color: transparent transparent #00CC44 transparent; }
.theme-green .air-nav-icon svg { color: #00CC44; filter: drop-shadow(2px 2px 0 #000); }
.theme-green:hover { border-color: #B3FFCC; }

.theme-purple .air-nav-corner { border-color: transparent transparent #9933FF transparent; }
.theme-purple .air-nav-icon svg { color: #9933FF; filter: drop-shadow(2px 2px 0 #000); }
.theme-purple:hover { border-color: #E6B3FF; }

/* Small variant for Level Cards Grid */
.level-grid {
  width: 100%; max-width: 720px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.level-card {
  padding: 14px 16px;
  min-height: 110px;
}
.level-card .air-nav-icon {
  position: absolute; right: 10px; top: 10px;
  opacity: 0.15; width: 60px; height: 60px;
}
.level-card .air-nav-icon svg { width: 100%; height: 100%; }
.level-card .air-nav-title { font-size: 18px; margin-bottom: 4px; }
.level-card .air-nav-sub { font-size: 12px; }
.level-card.locked { opacity: 0.5; filter: grayscale(0.8); cursor: not-allowed; }

/* ========== CHILD LIST ========== */
.child-list { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 560px; }

.child-item {
  background: #FFF9F0;
  border-radius: 12px;
  padding: 16px 20px;
  border: 4px solid #D4B59D;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all 0.14s;
}
.child-item:hover { border-color: rgba(229,57,53,0.8); transform: translateY(-2px); }
.child-item:active { transform: scale(0.97); }

.child-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(232,0,60,0.15);
  border: 2px solid rgba(232,0,60,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}

.child-item-name {
  font-family: var(--font-ja); font-size: 18px; font-weight: 900;
  color: #5C3A21;
}

.child-item-points {
  margin-left: auto; font-family: var(--font-game);
  font-size: 18px; font-weight: 800;
  color: #5C3A21;
  padding: 4px 12px; border-radius: 6px;
}

/* ========== CHILD CREATE ========== */
.child-profile-form {
  display: flex; flex-direction: column; gap: 14px;
  width: 100%; max-width: 440px;
}

.form-label {
  font-family: var(--font-game); font-size: 12px; font-weight: 700;
  color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 4px; display: block;
}

.form-input {
  width: 100%;
  background: #1A1A28;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 14px 18px;
  font-family: var(--font-ja); font-size: 20px; font-weight: 700;
  color: white; outline: none;
  transition: border-color 0.2s;
}
.form-input::placeholder { color: rgba(255,255,255,0.3); font-size: 16px; }
.form-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px rgba(255,215,0,0.15);
}

/* ========== HOME ========== */
.home-topbar {
  width: 100%; max-width: 720px;
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px;
}

.home-player-info {
  display: flex; align-items: center; gap: 12px;
}

.home-player-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(229,0,18,0.15);
  border: 2px solid rgba(229,0,18,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.home-player-name { font-family: var(--font-ja); font-size: 16px; font-weight: 700; color: white; }
.home-player-name span { color: var(--yellow); font-size: 18px; }

.home-action-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-family: var(--font-game); font-size: 13px; font-weight: 700;
  color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.home-action-btn:hover { background: rgba(255,255,255,0.1); color: white; }

/* stats bar */
.stats-bar {
  width: 100%; max-width: 720px;
  background:
    repeating-linear-gradient(
      -45deg, #12121C, #12121C 10px, #1A1A28 10px, #1A1A28 20px
    );
  border-radius: 16px;
  border: 4px solid rgba(255,255,255,0.4);
  padding: 14px 20px;
  margin-bottom: 12px;
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 8px; align-items: center;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 0 rgba(0,0,0,0.4);
}

.stats-bar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--sky-blue));
}

.stat-item { display: flex; flex-direction: column; align-items: center; }

.stat-label {
  font-family: var(--font-game); font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.85); margin-bottom: 3px;
}

.stat-value { font-family: var(--font-game); font-size: 26px; font-weight: 900;
  color: var(--yellow); line-height: 1; }

.stat-value.blue { color: var(--sky-blue); }
.stat-value.red  { color: var(--red); }
.stat-value small { font-size: 14px; opacity: 0.8; }

.stat-sep {
  width: 1px; height: 40px;
  background: rgba(255,255,255,0.08);
}

/* stamp mini row */
.stamp-bar-wrap {
  width: 100%; max-width: 720px;
  background: rgba(0,0,0,0.5);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 14px;
}

.stamp-bar-label {
  font-family: var(--font-game); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.85); white-space: nowrap; flex-shrink: 0;
}

.stamp-mini-dots {
  display: flex; gap: 6px; flex: 1; justify-content: center;
}

.stamp-mini-dot {
  width: 16px; height: 16px; border-radius: 3px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.3);
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.stamp-mini-dot.stamped {
  background: var(--yellow);
  border-color: rgba(255,215,0,0.5);
  box-shadow: 0 0 8px rgba(255,215,0,0.5);
  transform: scale(1.1);
}

/* Level grid */
.level-section-label {
  width: 100%; max-width: 720px;
  font-family: var(--font-game); font-size: 11px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.level-section-label::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,0.06);
}

.level-grid {
  width: 100%; max-width: 720px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.level-badge {
  font-family: var(--font-game); font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--yellow); background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.3);
  padding: 3px 10px; border-radius: 4px; align-self: flex-start;
}

.level-emoji {
  font-size: 30px; position: absolute; bottom: 14px; right: 16px;
  opacity: 0.75;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.level-lock-icon {
  position: absolute; top: 14px; right: 14px; font-size: 16px;
}

.level-title {
  font-family: var(--font-ja); font-size: 15px; font-weight: 900;
  color: var(--text-primary); line-height: 1.4; margin-top: 6px;
}

.level-desc {
  font-family: var(--font-game); font-size: 11px; font-weight: 600;
  color: var(--text-dim); margin-top: 4px;
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* home bottom row */
.home-bottom-row {
  width: 100%; max-width: 720px;
  display: flex; gap: 10px;
}

/* ========== PIN ========== */
.pin-display {
  display: flex; gap: 14px; justify-content: center; margin: 20px 0;
}

.pin-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.15);
  transition: all 0.2s;
}
.pin-dot.filled {
  background: var(--red);
  border-color: rgba(232,0,60,0.6);
  box-shadow: 0 0 12px rgba(232,0,60,0.5);
}

.pin-keypad {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 10px; max-width: 280px; width: 100%;
}

.pin-key {
  background: #1A1A28;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 18px 8px;
  font-family: var(--font-game); font-size: 22px; font-weight: 700;
  color: white; cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,0.5);
  transition: all 0.1s; text-align: center;
}
.pin-key:active { transform: translateY(4px); box-shadow: none; }

.pin-key.key-del { color: var(--red); border-color: rgba(232,0,60,0.3); }
.pin-key.key-ok  {
  background: linear-gradient(135deg, #00CC44, #009030);
  color: white; border-color: rgba(0,200,0,0.4);
}

/* ========== REWARDS ========== */
.rewards-stats-grid {
  width: 100%; max-width: 720px;
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 10px;
}

.rewards-stat-card {
  background: var(--bg-card); border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 16px 12px; text-align: center;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.rewards-stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.rewards-stat-card:nth-child(1)::before { background: var(--yellow); }
.rewards-stat-card:nth-child(2)::before { background: var(--red); }
.rewards-stat-card:nth-child(3)::before { background: #9933FF; }

.rewards-icon { font-size: 32px; display: block; margin-bottom: 6px; }
.rewards-count {
  font-family: var(--font-game); font-size: 28px; font-weight: 900;
  color: var(--text-primary); line-height: 1;
}
.rewards-count.yellow { color: var(--yellow); }
.rewards-count.red    { color: var(--red); }
.rewards-count.purple { color: #9933FF; }

.rewards-label {
  font-family: var(--font-game); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); margin-top: 3px;
}

/* Stamp card */
.stamp-card {
  width: 100%; max-width: 720px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid rgba(255,230,0,0.15);
  padding: 20px;
  box-shadow: 0 0 30px rgba(255,230,0,0.05), var(--shadow-card);
  position: relative; overflow: hidden;
}

.stamp-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}

.stamp-card-title { font-family: var(--font-game); font-size: 14px; font-weight: 800;
  color: var(--yellow); letter-spacing: 0.08em; text-transform: uppercase;
}

.stamp-card-progress {
  font-family: var(--font-game); font-size: 13px; font-weight: 700;
  color: var(--text-dim);
}

.stamp-grid {
  display: grid; grid-template-columns: repeat(10,1fr); gap: 6px;
}

.stamp-slot {
  aspect-ratio: 1; border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.3s;
}

.stamp-slot.filled {
  background: rgba(255,215,0,0.15);
  border-color: rgba(255,215,0,0.4);
  box-shadow: 0 0 10px rgba(255,215,0,0.3);
  animation: stampGame 0.5s ease;
}

.stamp-card-hint {
  font-family: var(--font-ja); font-size: 12px;
  color: var(--text-dim); margin-top: 10px; text-align: right;
}

/* ========== PREMIUM PARENT DASHBOARD ========== */
.parent-header-card {
  width: 100%; max-width: 720px;
  background: linear-gradient(135deg, rgba(82,10,230,0.15) 0%, rgba(10,185,230,0.1) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(10,185,230,0.3);
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: relative; overflow: hidden;
  margin-bottom: 8px;
}
.parent-header-title {
  font-family: var(--font-game); font-size: 22px; font-weight: 800;
  color: white; text-transform: uppercase; letter-spacing: 0.1em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5); margin-bottom: 6px;
}
.parent-header-sub {
  font-family: var(--font-ja); font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.6);
}

.parent-section {
  width: 100%; max-width: 720px; margin-top: 24px;
}
.parent-section-label {
  font-family: var(--font-ja); font-size: 13px; font-weight: 700;
  color: var(--text-secondary); margin-bottom: 8px; display: block;
}
.parent-section-header {
  margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px;
}
.parent-section-title {
  font-family: var(--font-game); font-size: 13px; font-weight: 700;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em;
}

/* Custom Select */
.select-wrapper {
  position: relative; width: 100%;
}
.select-wrapper::after {
  content: '▼'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); pointer-events: none; font-size: 12px;
}
.parent-select {
  appearance: none; -webkit-appearance: none; width: 100%; background: #181824;
  border: 2px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 16px 40px 16px 16px; font-family: var(--font-ja); font-size: 16px; font-weight: 700;
  color: white; cursor: pointer; transition: all 0.2s;
}
.parent-select:focus {
  border-color: var(--sky-blue); outline: none; box-shadow: 0 0 0 4px rgba(10,185,230,0.15);
}

/* Stats 2x2 Grid */
.parent-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.parent-stat-box {
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px; padding: 16px; display: flex; flex-direction: column;
  position: relative; transition: transform 0.2s, border-color 0.2s;
}
.parent-stat-box:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.15); }
.parent-stat-icon {
  position: absolute; top: 12px; right: 14px; font-size: 22px; opacity: 0.9;
}
.parent-stat-value {
  font-family: var(--font-game); font-size: 28px; font-weight: 800;
  color: white; margin-bottom: 4px; line-height: 1; margin-top: 4px;
}
.parent-stat-label {
  font-family: var(--font-ja); font-size: 12px; font-weight: 700;
  color: var(--text-dim);
}

/* History Styles (App JS generated) */
.history-card {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 16px; transition: background 0.2s;
}
.history-card:hover { background: rgba(0,0,0,0.5); }
.parent-history-date { font-family: var(--font-game); font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-weight: 700; letter-spacing: 0.05em; }
.parent-history-title { font-family: var(--font-ja); font-size: 15px; font-weight: 700; color: white; margin-bottom: 8px; }
.history-mistake-pill {
  font-size:12px; color:var(--text-secondary); margin-top:4px; padding:6px 10px; 
  background:rgba(255,100,100,0.08); border: 1px solid rgba(255,100,100,0.2); border-radius:8px;
  display: inline-block; margin-right: 4px; margin-bottom: 4px;
}

/* Admin Panel */
.parent-admin-panel {
  width: 100%; max-width: 720px; margin-top: 32px;
  background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px; padding: 24px;
}
.parent-admin-label {
  font-family: var(--font-game); font-size: 13px; font-weight: 700;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}

/* ========== GLOBAL LOADING ========== */
#global-loading {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: var(--sky-blue);
  z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.3s ease;
}
#global-loading.hidden {
  opacity: 0; pointer-events: none;
}
.spinner {
  width: 60px; height: 60px;
  border: 8px solid rgba(255,255,255,0.2);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 20px rgba(255,215,0,0.2);
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.report-card {
  width: 100%; max-width: 720px;
  background: rgba(0, 0, 0, 0.4); border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 12px 24px rgba(0,0,0,0.3);
  position: relative; overflow: hidden;
}
.report-card h3 {
  font-family: var(--font-game); font-size: 13px; font-weight: 700;
  color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.06);
}

.report-stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-family: var(--font-ja);
}
.report-stat-label { font-size: 14px; color: var(--text-secondary); }
.report-stat-value {
  font-family: var(--font-game); font-size: 18px; font-weight: 800;
  color: var(--yellow);
}

.share-text-area {
  width: 100%; background: rgba(0,0,0,0.5); border-radius: var(--radius-md);
  padding: 16px; font-family: monospace; font-size: 13px; color: var(--text-dim);
  white-space: pre-wrap; line-height: 1.6; margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.2);
}

.share-buttons { display: flex; gap: 10px; margin-top: 10px; }

.share-btn {
  flex: 1; padding: 13px 14px; border-radius: var(--radius-md);
  font-family: var(--font-game); font-size: 13px; font-weight: 700;
  cursor: pointer; border: none;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; transition: all 0.15s;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.share-btn:active { transform: scale(0.96); }
.share-btn.line-btn { background: linear-gradient(135deg, #06C755, #04A344); color: white; }
.share-btn.mail-btn { background: linear-gradient(135deg, var(--sky-mid), #0070AA); color: white; }

/* ========== OVERLAY: Coming Soon ========== */
.coming-soon-inner {
  background: var(--bg-panel); border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 40px 32px; max-width: 440px; width: 92%;
  text-align: center; animation: bounceIn 0.4s ease;
  box-shadow: var(--shadow-deep);
  position: relative; overflow: hidden;
}
.coming-soon-inner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--neon-purple), var(--sw-blue));
}

/* ========== Responsive ========== */
@media (min-width: 768px) {
  .level-card { min-height: 165px; padding: 24px 20px; }
  .level-title { font-size: 17px; }
  .splash-title { font-size: 68px; }
  .splash-mascot { width: 160px; height: 160px; }
}
/* ============================================================
   WORLD MAP
============================================================ */
#screen-world-map {
  /* Inherit default striped background from .screen */
  background: none;
  overflow: hidden;
  /* Override .screen defaults that break absolute positioning */
  padding: 0 !important;
  display: block;
  overflow-y: hidden !important;
}

.world-map-container {
  width: 100%; max-width: 500px;
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column-reverse; /* Bottom to top */
  align-items: center; padding: 40px 0 100px;
  position: relative;
  background: transparent;
}



.map-node-wrapper {
  width: 100%; display: flex; justify-content: center;
  margin-bottom: 24px; position: relative; z-index: 1;
}

.map-node {
  width: 76px; height: 76px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-game); font-size: 28px; font-weight: 900;
  color: white; border: 5px solid white;
  background: var(--sky-dark);
  box-shadow: 0 6px 0 rgba(0,0,0,0.5), 0 0 0 4px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.7);
  cursor: pointer; transition: transform 0.15s; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.8));
}
.map-node:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,0.2); }

/* Winding path offsets */
.map-node-wrapper:nth-child(4n+1) { transform: translateX(-60px); }
.map-node-wrapper:nth-child(4n+2) { transform: translateX(0px); }
.map-node-wrapper:nth-child(4n+3) { transform: translateX(60px); }
.map-node-wrapper:nth-child(4n+4) { transform: translateX(0px); }

/* States */
.map-node.cleared {
  background: #00CC00; border-color: #88FFB0; text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.map-node.current {
  background: var(--yellow); border-color: #FFF; color: var(--red);
  box-shadow: 0 6px 0 var(--yellow-dark), 0 0 24px rgba(255,215,0,0.7);
  animation: pulse 2s infinite;
}
.map-node.locked {
  background: #777; border-color: #999; color: transparent;
  pointer-events: none; box-shadow: inset 0 4px 6px rgba(0,0,0,0.3);
}
.map-node.locked::after {
  content: '🔒'; font-size: 32px; color: #ccc;
  position: absolute; text-shadow: none;
}

/* ============================================================
   ITEM PAGE (merged rewards + item list)
============================================================ */
.rewards-mini-bar {
  display: flex; align-items: center; gap: 0;
  background: rgba(0,0,0,0.35); border-radius: 14px;
  padding: 10px 20px; margin-bottom: 16px;
  width: 100%; max-width: 480px;
  border: 1px solid rgba(255,255,255,0.08);
}
.rewards-mini-item {
  display: flex; align-items: center; gap: 6px; flex: 1; justify-content: center;
}
.rewards-mini-val {
  font-family: var(--font-game); font-size: 18px; font-weight: 900;
}
.rewards-mini-val.yellow { color: var(--yellow); }
.rewards-mini-val.purple { color: #b06dff; }
.rewards-mini-label {
  font-family: var(--font-game); font-size: 9px; font-weight: 700;
  color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.1em;
}
.rewards-mini-sep {
  width: 1px; height: 32px; background: rgba(255,255,255,0.12); flex-shrink: 0;
}

.item-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 14px; width: 100%; max-width: 600px;
}
.item-tab {
  background: rgba(255,255,255,0.4);
  border: 2px solid #D0BA90;
  border-radius: 30px; padding: 10px 20px;
  color: #8C5A20;
  font-family: var(--font-game); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; white-space: nowrap;
  box-shadow: 0 4px 0 rgba(208,186,144,0.6);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.item-tab.active {
  background: #a78bda;
  border-color: #0088CC;
  color: white;
  box-shadow: 0 4px 0 #0050ff;
}
.item-tab:active {
  transform: translateY(4px);
  box-shadow: 0 0px 0 transparent;
}
.item-tab:hover:not(.active) { background: rgba(255,255,255,0.8); }

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px; width: 100%; max-width: 600px;
  padding-bottom: 24px;
}
.item-card {
  background: linear-gradient(160deg, rgba(30,20,60,0.85), rgba(20,12,40,0.9));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 8px 6px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: transform 0.12s, box-shadow 0.12s;
  position: relative; overflow: hidden;
}
@media (max-width: 480px) {
  .item-card { padding: 4px; gap: 2px; }
  .item-card img { width: 48px !important; height: 48px !important; }
}
.item-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
.item-card img {
  width: 68px; height: 68px; object-fit: contain;
}
.item-card-name {
  font-family: var(--font-ja); font-size: 10px; color: white;
  text-align: center; line-height: 1.3;
}
.item-card-en {
  font-family: var(--font-game); font-size: 8px; color: rgba(255,255,255,0.4);
  text-align: center; line-height: 1.2;
}
.item-rarity-badge {
  position: absolute; top: 5px; right: 5px;
  font-family: var(--font-game); font-size: 8px; font-weight: 900;
  background: rgba(0,0,0,0.5); border-radius: 4px;
  padding: 1px 4px; color: var(--yellow);
}

/* ============================================================
   AUTH SCREENS (Login / Sign Up)
============================================================ */
#screen-login, #screen-signup {
  background: transparent;
}

.auth-card {
  width: 100%; max-width: 440px;
  background: linear-gradient(135deg, #FFFAF0 0%, #F5E8D8 100%);
  border: 4px solid #9D754B;
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: inset 0 0 0 2px #FFF, inset 0 0 20px rgba(139, 69, 19, 0.06), 0 12px 30px rgba(0,0,0,0.4);
  display: flex; flex-direction: column; align-items: center;
  position: relative; overflow: hidden;
  flex-shrink: 0; margin: auto 0;
}

.auth-card .screen-title {
  color: #5C3A21 !important;
  font-family: var(--font-ja);
  text-shadow: 0 1px 0 rgba(255,255,255,0.8) !important;
}
.auth-card .screen-title-sub {
  color: #8B4513 !important;
}

.auth-logo {
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 4px rgba(139,69,19,0.2));
}
.auth-form-group {
  width: 100%; margin-bottom: 14px;
}
.auth-input {
  width: 100%;
  background: #FFF;
  border: 2px solid #C49A5A;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-ja); font-size: 16px; font-weight: 600;
  color: #3b2a1a; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.auth-input:focus {
  border-color: #D32F2F;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05), 0 0 0 3px rgba(211,47,47,0.15);
}
.auth-input::placeholder {
  color: rgba(139,69,19,0.3);
}
.auth-form-group .form-label {
  color: #8B4513;
  font-family: var(--font-game);
  font-size: 12px;
  letter-spacing: 0.05em;
  margin-bottom: 6px; display: block;
}

.auth-error {
  width: 100%;
  background: rgba(232,0,60,0.08);
  border: 1px dashed rgba(232,0,60,0.4);
  border-radius: 8px; padding: 10px 14px;
  font-family: var(--font-ja); font-size: 13px; font-weight: 700;
  color: #D32F2F; margin-bottom: 10px; text-align: center;
}
.auth-success {
  width: 100%;
  background: rgba(0,200,100,0.08);
  border: 1px dashed rgba(0,200,100,0.4);
  border-radius: 8px; padding: 10px 14px;
  font-family: var(--font-ja); font-size: 13px; font-weight: 700;
  color: #2E7D32; margin-bottom: 10px; text-align: center;
}

/* Google Sign-In Button */
.auth-google-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #FFF;
  border: 2px solid #C49A5A; border-radius: 8px;
  padding: 14px 20px;
  font-family: var(--font-ja); font-size: 15px; font-weight: 700;
  color: #3b2a1a; cursor: pointer;
  box-shadow: 0 4px 0 #D0BA90, inset 0 -2px 0 rgba(0,0,0,0.05);
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
  margin-bottom: 4px; letter-spacing: 0.01em;
}
.auth-google-btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 #D0BA90, inset 0 -2px 0 rgba(0,0,0,0.05); }
.auth-google-btn:active { transform: translateY(4px); box-shadow: 0 0 0 #D0BA90; }
.auth-google-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Auth Divider */
.auth-divider {
  width: 100%; display: flex; align-items: center; gap: 12px;
  margin: 14px 0 10px;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(139,69,19,0.2);
}
.auth-divider span {
  font-family: var(--font-ja); font-size: 11px; font-weight: 700;
  color: rgba(139,69,19,0.5); white-space: nowrap; letter-spacing: 0.05em;
}

/* Section label for magic link */
.auth-section-label {
  align-self: flex-start;
  font-family: var(--font-ja); font-size: 13px; font-weight: 700;
  color: #8B4513; margin-bottom: 8px;
}

/* Outline button (magic link send) */
.auth-outline-btn {
  width: 100%;
  background: rgba(139,69,19,0.04);
  border: 2px dashed rgba(139,69,19,0.3);
  border-radius: 8px; padding: 13px 20px;
  font-family: var(--font-ja); font-size: 14px; font-weight: 700;
  color: #5C3A21; cursor: pointer;
  transition: all 0.15s; letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.auth-outline-btn:hover { background: rgba(139,69,19,0.1); }
.auth-outline-btn:active { transform: scale(0.97); }
.auth-outline-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Auth screen button overrides */
.auth-card .btn-primary {
  background: linear-gradient(180deg, #E53935 0%, #D32F2F 100%);
  border: 2px solid #B71C1C;
  color: #FFF;
  box-shadow: 0 4px 0 #900, inset 0 1px 0 rgba(255,255,255,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  border-radius: 8px;
}
.auth-card .btn-primary:active {
  box-shadow: 0 0 0 #900;
  transform: translateY(4px);
}
.auth-card .btn-ghost {
  color: #8B4513;
  background: rgba(139,69,19,0.05);
  border: 1px solid rgba(139,69,19,0.2);
  border-radius: 8px;
}
.auth-card .btn-ghost:hover {
  background: rgba(139,69,19,0.1);
  color: #5C3A21;
}
#btn-skip-login {
  background: transparent !important;
  border: 1px solid rgba(139,69,19,0.2) !important;
  color: rgba(139,69,19,0.6) !important;
  font-size: 11px !important;
  border-radius: 8px !important;
}
#btn-skip-login:hover {
  background: rgba(139,69,19,0.05) !important;
  color: rgba(139,69,19,0.9) !important;
}

/* Collapsible password form */
.auth-section-toggle {
  width: 100%; background: transparent;
  border: 1px dotted rgba(139,69,19,0.4); border-radius: 8px;
  padding: 13px 16px; cursor: pointer;
  font-family: var(--font-ja); font-size: 14px; font-weight: 700;
  color: #5C3A21;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.15s, color 0.15s; text-align: left;
}
.auth-section-toggle:hover { background: rgba(139,69,19,0.05); }
.pw-login-collapse {
  width: 100%; overflow: hidden;
  max-height: 0; transition: max-height 0.3s ease;
}
.pw-login-collapse.open { max-height: 320px; }

/* Footer row */
.auth-footer-row {
  width: 100%; display: flex; gap: 8px; margin-top: 16px;
}

/* ============================================================
   MY PAGE (Kirby Hunters Style)
============================================================ */
/* Top Jewels Bar */
.mp-kh-topbar {
  width: 100%; max-width: 500px;
  display: flex; justify-content: center; gap: 12px;
  background: rgba(255,255,255,0.85);
  border: 2px solid #D0BA90;
  border-radius: 20px;
  padding: 8px 16px; margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.mp-kh-top-item {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-game); font-size: 16px; font-weight: 900;
  color: #8C5A20;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.8);
}
.mp-kh-top-item img { width: 24px; height: 24px; object-fit: contain; }

/* Main Paper Card */
.mp-kh-card {
  width: 100%; max-width: 500px;
  background: #E8D3A5; /* Tan paper edge */
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  position: relative;
}
.mp-kh-card-inner {
  background: #F4E4BC; /* Lighter inner paper */
  border: 2px solid #C8AE7D;
  border-radius: 8px;
  padding: 32px 16px 24px; /* Space for ribbons */
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}

/* Level Ribbon Badge (Top Left overhang) */
.mp-kh-level-ribbon {
  position: absolute; top: -12px; left: -12px;
  background: linear-gradient(135deg, #E82030, #B8002E);
  border: 2px solid #FFE4A0;
  border-radius: 4px; padding: 6px 12px;
  box-shadow: 2px 4px 8px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; align-items: center;
  z-index: 10;
}
.mp-kh-level-ribbon::after {
  content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  border-width: 5px 12px 0; border-style: solid;
  border-color: #B8002E transparent transparent transparent;
}
.mp-kh-level-ribbon .lv-label {
  font-family: var(--font-ja); font-size: 10px; font-weight: 700; color: #FFE4A0;
  line-height: 1; margin-bottom: 2px;
}
.mp-kh-level-ribbon .lv-val {
  font-family: var(--font-game); font-size: 24px; font-weight: 900; color: white;
  line-height: 1; text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Player Name */
.mp-kh-name {
  font-family: var(--font-ja); font-size: 24px; font-weight: 900;
  color: #332211; margin-bottom: 12px;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.6);
}

/* Hero Rank Ribbon */
.mp-kh-rank-section {
  width: 100%; display: flex; flex-direction: column; align-items: center; margin-bottom: 20px;
}
.rank-label {
  font-family: var(--font-ja); font-size: 12px; font-weight: 700; color: #554433; margin-bottom: 4px;
}
.mp-kh-rank-ribbon {
  background: linear-gradient(180deg, #FFB800, #F08000);
  border: 2px solid #FFED4A; border-radius: 8px;
  padding: 8px 32px;
  position: relative; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 0 #A85A00, 0 8px 12px rgba(0,0,0,0.2);
}
.mp-kh-rank-ribbon::before, .mp-kh-rank-ribbon::after {
  content: ''; position: absolute; top: 5px; height: 100%; width: 24px;
  background: #D06A00; z-index: -1;
  border-radius: 4px;
}
.mp-kh-rank-ribbon::before { left: -16px; transform: skewY(15deg); }
.mp-kh-rank-ribbon::after { right: -16px; transform: skewY(-15deg); }

.crown-icon { width: 20px; height: 20px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.4)); }
.mp-kh-rank-ribbon span {
  font-family: var(--font-game); font-size: 28px; font-weight: 900; color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5), -1px -1px 0 #A85A00, 1px -1px 0 #A85A00, -1px 1px 0 #A85A00, 1px 1px 0 #A85A00;
}
.mp-kh-rank-ribbon .rank-max { font-size: 16px; color: #FFED4A; margin-left: -4px; }

/* Avatar & Icons Row */
.mp-kh-icons-row {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-bottom: 24px; width: 100%;
}
.mp-kh-avatar-wrap {
  position: relative; cursor: pointer;
  width: 64px; height: 64px;
  background: white; border: 3px solid #D0BA90; border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transition: transform 0.1s;
}
.mp-kh-avatar-wrap:active { transform: scale(0.95); }
.mp-kh-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.edit-badge {
  position: absolute; bottom: 0; right: -4px;
  background: var(--sky-blue); color: white;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid white; display: flex; align-items: center; justify-content: center;
  font-size: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.mp-kh-sub-info {
  display: flex; flex-direction: column; gap: 6px;
}
.info-pill {
  background: rgba(255,255,255,0.6); border: 1px solid #D0BA90; border-radius: 12px;
  padding: 4px 10px; font-family: var(--font-ja); font-size: 11px; font-weight: 700; color: #554433;
}

/* Stats Box */
.mp-kh-stats {
  width: 100%; display: flex; flex-direction: column; gap: 8px;
}
.stat-row {
  background: rgba(255,255,255,0.65);
  border: 1px solid #D0BA90; border-radius: 16px;
  padding: 10px 16px; display: flex; justify-content: space-between; align-items: center;
  box-shadow: inset 0 2px 4px rgba(255,255,255,1), 0 2px 4px rgba(0,0,0,0.05);
}
.s-label { font-family: var(--font-ja); font-size: 13px; font-weight: 700; color: #665544; }
.s-val { font-family: var(--font-game); font-size: 18px; font-weight: 900; color: #332211; }

/* Action Buttons (Brown & Red pills) */
.mp-kh-actions {
  width: 100%; max-width: 500px;
  display: flex; gap: 12px; margin-top: 16px;
}
.kh-brown-btn {
  flex: 1; background: linear-gradient(180deg, #A85A00, #8A4A00);
  border: 2px solid #553000; border-radius: 20px;
  padding: 14px 0; font-family: var(--font-ja); font-size: 14px; font-weight: 700; color: white;
  cursor: pointer; box-shadow: 0 4px 0 #4A2600, 0 6px 12px rgba(0,0,0,0.3);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  transition: all 0.1s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.kh-brown-btn:active { transform: translateY(4px); box-shadow: 0 0px 0 #4A2600, 0 2px 6px rgba(0,0,0,0.4); }

.kh-red-btn {
  width: 100%; max-width: 500px;
  background: linear-gradient(180deg, #E82030, #C81020);
  border: 2px solid #FFE4A0; border-radius: 20px;
  padding: 14px 0; font-family: var(--font-ja); font-size: 15px; font-weight: 700; color: white;
  cursor: pointer; box-shadow: 0 4px 0 #900A1A, 0 6px 12px rgba(0,0,0,0.3);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  transition: all 0.1s; display: flex; align-items: center; justify-content: center;
}
.kh-red-btn:active { transform: translateY(4px); box-shadow: 0 0px 0 #900A1A, 0 2px 6px rgba(0,0,0,0.4); }


/* ---- Legacy Migration Panel ---- */
.mp-legacy-panel {
  width: 100%; max-width: 540px;
  background: rgba(255,200,0,0.05);
  border: 1px solid rgba(255,200,0,0.2);
  border-radius: 16px; padding: 16px 20px;
  margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px;
}
.mp-legacy-title {
  font-family: var(--font-game); font-size: 13px; font-weight: 700;
  color: var(--yellow); text-transform: uppercase; letter-spacing: 0.05em;
}
.mp-legacy-sub {
  font-family: var(--font-ja); font-size: 12px; color: rgba(255,255,255,0.5);
  line-height: 1.5;
}

/* ---- Avatar Picker / Modal Overlay ---- */
.mp-avatar-picker {
  position: fixed; inset: 0;
  background: rgba(0,5,20,0.85); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  z-index: 5000; padding: 20px;
}
.mp-avatar-picker-inner {
  background: linear-gradient(160deg, #0A1E4A, #05102E);
  border: 2px solid rgba(10,185,230,0.3);
  border-radius: 24px; padding: 28px 24px;
  width: 100%; max-width: 420px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
  display: flex; flex-direction: column; align-items: center;
}
.mp-avatar-picker-title {
  font-family: var(--font-game); font-size: 16px; font-weight: 900;
  color: white; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.mp-avatar-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; width: 100%; margin-bottom: 4px;
}
.mp-avatar-option {
  aspect-ratio: 1; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.12);
  overflow: hidden; cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.mp-avatar-option img {
  width: 100%; height: 100%; object-fit: cover; pointer-events: none;
}
.mp-avatar-option:hover {
  border-color: var(--sky-blue);
  transform: scale(1.08);
  box-shadow: 0 0 14px rgba(10,185,230,0.5);
}
.mp-avatar-option.selected {
  border-color: var(--yellow);
  box-shadow: 0 0 16px rgba(255,215,0,0.6);
}

/* ============================================================
   DRAGON QUEST STYLE PROFILE & EQUIPMENT
============================================================ */


.dq-window {
  background: linear-gradient(135deg, #FFFAF0 0%, #F5E8D8 100%);
  border: 4px solid #9D754B;
  border-radius: 12px;
  box-shadow: 
    inset 0 0 0 2px #FFF, 
    inset 0 0 0 6px rgba(255, 250, 240, 0.9), 
    inset 0 0 0 7px #BFA281, 
    inset 0 0 30px rgba(139, 69, 19, 0.06),
    0 4px 8px rgba(0,0,0,0.3);
  color: #3b2a1a;
  position: relative;
  flex-shrink: 0;
  overflow: visible;
}

/* Top-Left Curl */
.dq-window::before {
  content: '';
  position: absolute;
  top: 5px; left: 5px;
  width: 14px; height: 14px;
  background: #FFFAF0;
  border-right: 1px solid #BFA281;
  border-bottom: 1px solid #BFA281;
  border-radius: 0 0 6px 0;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.05);
  pointer-events: none;
  z-index: 10;
}
/* Bottom-Right Curl */
.dq-window::after {
  content: '';
  position: absolute;
  bottom: 5px; right: 5px;
  width: 14px; height: 14px;
  background: #F5E8D8;
  border-left: 1px solid #BFA281;
  border-top: 1px solid #BFA281;
  border-radius: 6px 0 0 0;
  box-shadow: -1px -1px 2px rgba(0,0,0,0.05);
  pointer-events: none;
  z-index: 10;
}

.dq-window-title {
  background: transparent;
  color: #5C3A21;
  font-family: var(--font-ja);
  font-weight: 900;
  text-align: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(172,134,98,0.3);
  font-size: 19px;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
  margin: 0 20px;
  position: relative;
  z-index: 11;
}

.dq-panel {
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed #D4C4A8;
  border-radius: 6px;
  padding: 12px;
  margin: 0 8px;
}

.dq-btn {
  background: linear-gradient(180deg, #324ed4 0%, #152785 100%);
  border: 2px solid #5c3a21;
  box-shadow: inset 0 0 0 2px #7a94ff, 0 4px 6px rgba(0,0,0,0.4);
  border-radius: 8px;
  color: white;
  font-family: var(--font-ja);
  font-weight: bold;
  font-size: 14px;
  padding: 10px 20px;
  cursor: pointer;
  text-shadow: 0 2px 2px rgba(0,0,0,0.8);
  transition: all 0.1s;
}
.dq-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 0 0 2px #7a94ff, 0 1px 2px rgba(0,0,0,0.4);
}

.dq-avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dq-avatar-img {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  border: 3px solid #5c3a21;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  object-fit: cover;
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s;
}
.dq-avatar-img:hover {
  transform: scale(1.05);
}

.dq-equip-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dq-equip-slot {
  background: linear-gradient(135deg, #1c2b4d 0%, #0d162b 100%);
  border: 3px solid #FFD700;
  border-radius: 12px;
  width: 72px;
  height: 72px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4), inset 0 0 10px rgba(0,0,0,0.8);
  cursor: pointer;
}
.dq-equip-slot:hover {
  border-color: #FFF;
  transform: translateY(-2px);
}
.dq-equip-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.dq-equip-label {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: #5c3a21;
  color: #fceebd;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #2a1608;
  white-space: nowrap;
}

.dq-stat-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted #a88d5e;
  padding: 4px 0;
  font-family: var(--font-ja);
  font-size: 14px;
  font-weight: 700;
}
.dq-stat-label { color: #6b4d31; }
.dq-stat-value { color: #af1f1f; font-size: 16px; font-weight: 900; }

.dq-item-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.dq-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dotted #b59b6b;
}

.dq-stat-label {
  font-size: 11px;
  font-weight: bold;
  color: #8c6a46;
}

.dq-stat-value {
  font-size: 14px;
  font-weight: 900;
  font-family: var(--font-game);
  letter-spacing: 0.05em;
}



.dq-btn.action {
  background: linear-gradient(180deg, #d43232 0%, #851515 100%);
  box-shadow: inset 0 0 0 2px #ff7a7a, 0 4px 6px rgba(0,0,0,0.4);
}


.dq-btn.brown {
  background: linear-gradient(180deg, #B5651D 0%, #804000 100%);
  box-shadow: inset 0 0 0 2px #E8A870, 0 4px 6px rgba(0,0,0,0.4);
}

.dq-btn.green {
  background: linear-gradient(180deg, #4caf50 0%, #2e7d32 100%);
  box-shadow: inset 0 0 0 2px #81c784, 0 4px 6px rgba(0,0,0,0.4);
}

.dq-btn.gray {
  background: linear-gradient(180deg, #606F80 0%, #404B5A 100%);
  box-shadow: inset 0 0 0 2px #A1AEBE, 0 4px 6px rgba(0,0,0,0.4);
}

.dq-btn.story-rich {
  background: linear-gradient(180deg, #183321 0%, #0a170e 100%);
  border-color: #5c3a21;
  box-shadow: inset 0 0 0 2px #b8994d, 0 4px 6px rgba(0,0,0,0.4);
}

/* ============================================================
   SPELL BATTLE
============================================================ */
.sb-key {
  flex: 1;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 900;
  max-width: 40px;
  border-radius: 6px;
  font-family: var(--font-en);
  text-align: center;
}

.sb-slot {
  width: 32px;
  height: 40px;
  border-bottom: 4px solid #5c3a21;
  font-size: 24px;
  font-weight: 900;
  font-family: var(--font-en);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 4px;
  color: #152785;
  text-transform: uppercase;
  margin: 0 2px;
}
.sb-slot.filled {
  border-bottom-color: #d43232;
  color: #d43232;
}
.sb-slot.success {
  color: #e63946;
  border-bottom-color: #e63946;
  animation: popin 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popin {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes flashRed {
  0%, 100% { background-color: transparent; }
  50% { background-color: rgba(255, 0, 0, 0.5); }
}

/* ============================================================
   STORY MODE
============================================================ */
.theme-story-dark {
  background: #1a2b1f; /* Deep forest green */
  color: #e8ecd7;
}

.story-image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border: 4px solid #8c6a46;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6), inset 0 0 0 2px rgba(255,255,255,0.2);
  object-fit: cover;
  background: #000;
  margin-bottom: 20px;
}

.story-text-container {
  background: rgba(16, 24, 18, 0.7);
  border: 2px solid #5c442c;
  border-radius: 8px;
  padding: 16px;
  min-height: 140px;
  margin-bottom: 24px;
  box-shadow: inset 0 0 16px rgba(0,0,0,0.5);
  position: relative;
}

.story-text-en {
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: #fdf6eb;
  margin-bottom: 12px;
  text-shadow: 1px 1px 2px #000;
}

.story-text-ja {
  font-family: var(--font-ja);
  font-size: 15px;
  color: #a3b8a8;
  line-height: 1.5;
  font-weight: 700;
}

.story-action-bar {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
}

.btn-story-nav {
  background: linear-gradient(180deg, #4caf50 0%, #2e7d32 100%);
  border: 3px solid #81c784;
  border-radius: 8px;
  padding: 12px 20px;
  color: white;
  font-family: var(--font-ja);
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0,0,0,0.5);
  cursor: pointer;
}
.btn-story-nav:active {
  transform: translateY(2px);
  box-shadow: 0 2px 3px rgba(0,0,0,0.5);
}

.btn-story-tool {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-story-tool:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}
.btn-story-tool.active {
  background: var(--red);
  border-color: #ff7a7a;
  color: white;
  text-shadow: 0 0 8px rgba(255,255,255,0.8);
}

@media (max-width: 480px) {
  .story-text-en {
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
  }
}
