/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Nunito:wght@400;600;700&family=Orbitron:wght@400;700&family=Squada+One&family=Protest+Strike:wght@300&display=swap');

/* ── RESET ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── ROOT VARS ── */
:root {
  --bg-deep:       #1a0a14;
  --bg-card:       #2a0f20;
  --bg-inner:      #3d1535;
  --accent-gold:   #d4a843;
  --accent-pink:   #e06090;
  --accent-bright: #f080b0;
  --accent-dim:    #8a3060;
  --text-main:     #F2DBA6;
  --text-muted:    #a07090;
  --border:        rgba(212,168,67,0.3);
  --border-bright: rgba(212,168,67,0.7);
  --shadow:        0 4px 24px rgba(0,0,0,0.6);
}

/* ══════════════════════════════════
   BASE STYLES (mobile-first)
   These apply everywhere unless
   overridden by a media query
══════════════════════════════════ */

/* ── BODY ── */
body {
  background-color: #1a0a14;
  color: var(--text-main);
  font-family: "Protest Strike", sans-serif;
  font-weight: 300;
  font-style: normal;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 40px;
}

h1, strong {
  font-family: "Squada One", sans-serif;
  font-weight: 200;
  font-style: normal;
  font-size: 36px;
}
h2 { font-weight: 50; font-style: normal; font-size: 16px; }
h3 { font-size: 13px; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes restFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes waterPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes vibesPulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 8px rgba(240,128,176,0.8); }
  50% { opacity: 0.8; text-shadow: 0 0 16px rgba(240,128,176,1); }
}
@keyframes vibesFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ── CARD ── */
.card {
  width: 100%;
  max-width: 360px;
  position: relative;
  animation: fadeUp 0.5s ease-out both;
  border-radius: 12px;
  overflow: visible;
}
.card-inner {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  overflow: visible;
  box-shadow: var(--shadow), 0 0 40px rgba(180,60,100,0.15);
}

/* ── HERO BANNER ── */
.hero {
  position: relative;
  height: 100px;
  background: linear-gradient(135deg, #3d1535 0%, #1a0814 100%);
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1.5px;
  background: var(--accent-gold);
  z-index: 0;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(212,168,67,0.03) 8px, rgba(212,168,67,0.03) 9px);
}
.hero-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(200,80,120,0.2) 0%, transparent 70%);
}

/* ── AVATAR ── */
.avatar-wrap {
  position: absolute;
  top: 40px;
  left: 14px;
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 3px solid var(--accent-gold);
  background: var(--bg-inner);
  overflow: hidden;
  box-shadow: 0 0 18px rgba(212,168,67,0.6), 0 0 36px rgba(212,168,67,0.2);
  z-index: 30;
}
.avatar-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  background: radial-gradient(circle, #4a1840, #2a0f20);
}

/* ── CONTACT ROW ── */
.contact-row {
  display: flex;
  justify-content: flex-end;
  padding: 16px 14px 0;
  background: var(--bg-card);
}
.contact-btn {
  background: var(--accent-pink);
  color: var(--text-main);
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.contact-btn:hover { background: var(--accent-bright); transform: translateY(-1px); }
.contact-btn svg { width: 12px; height: 12px; }

/* ── CHARACTER STATS ── */
.character-stats-container {
  padding: 10px 14px;
  padding-top: 78px;
  font-size: 12px;
  white-space: nowrap;
}
.name-and-level-container {
  display: inline-block;
  vertical-align: bottom;
  text-align: left;
  width: 55%;
  padding-right: 10px;
  white-space: normal;
}
.character-value-and-gender {
  display: inline-block;
  vertical-align: bottom;
  width: 44%;
  padding-left: 10px;
  white-space: normal;
}
.character-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
}
.character-name strong {
  font-family: "Squada One", sans-serif;
  font-size: 25px;
  font-weight: 200;
  color: var(--text-main);
  white-space: nowrap;
  line-height: 1;
}
.character-name span {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  font-weight: 700;
  background: var(--accent-dim);
  color: var(--accent-gold);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── LEVEL BAR ── */
.level-bar-container {
  vertical-align: bottom;
  width: 100%;
  height: 7px;
  background-color: #8a3060;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 5px;
  cursor: default;
  position: relative;
}
.level-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-pink));
  border-radius: 10px;
  transition: width 0.4s ease;
  position: relative;
}
.level-bar-fill::after {
  content: '';
  position: absolute;
  right: 0;
  height: 100%;
  width: 3px;
  background-color: var(--text-main);
  box-shadow: 1px 0 6px 1px var(--text-main);
  border-radius: 0 10px 10px 0;
}
.level-bar-container .xp-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  color: var(--accent-gold);
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
  letter-spacing: 0.5px;
}
.level-bar-container:hover .xp-tooltip { display: block; }

/* ── PRONOUNS / GENDER ── */
.character-value-and-gender span {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1;
}

/* ── RARITY STARS ── */
.rarity-star-container { display: flex; gap: 8px; padding-top: 8px; }
.star { position: relative; width: 14px; height: 18px; }
.star-glow {
  position: absolute; inset: 0px;
  background: radial-gradient(rgba(212,168,67,1) 10%, rgba(212,168,67,.3) 50%, transparent 100%);
  filter: blur(3px); z-index: 0;
}
.star-outline {
  position: absolute; inset: -2px;
  background: #3d1535;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  z-index: 1;
}
.star-glow + .star-outline { background: #d4a843; }
.star-fill {
  position: absolute; inset: 0;
  background: var(--text-main);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  z-index: 2;
}
.star-empty {
  position: absolute; inset: 0;
  background: var(--bg-card);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  z-index: 2;
}

/* ── TABS (mobile: visible) ── */
.separator { display: none; }
.tabs {
  display: flex;
  margin: 8px 14px 0;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.tab-btn {
  flex: 1;
  border: none;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn.active   { background-color: var(--accent-pink); color: var(--text-main); }
.tab-btn.inactive { background-color: transparent; color: var(--text-muted); }
.tab-btn.inactive:hover { background: rgba(204,62,142,0.15); color: var(--text-main); }

/* ── TAB PANELS ── */
.tab-panel { display: none; padding: 14px; }
.tab-panel.active { display: block; animation: panelIn 0.2s ease-out both; }

/* ── BIO ── */
.bio-text { font-size: 13px; line-height: 1.65; font-family: 'Nunito', sans-serif; }
.bio-text p { margin-bottom: 10px; }
.bio-text strong { color: var(--accent-bright); font-family: "Squada One", sans-serif; font-weight: 400; font-style: normal; font-size: 15px; }
.bio-text p:last-child { margin-bottom: 0; }
.bio-text a { color: var(--accent-pink); text-decoration: none; font-weight: 700; }
.bio-link { color: var(--accent-pink); text-decoration: none; font-weight: 700; }
.bio-link:hover { color: var(--accent-bright); text-decoration: underline; }

/* ── STATS SECTION ── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 10px 0;
}
.stat-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px; letter-spacing: 1px;
  color: var(--text-muted); font-weight: 700; margin-bottom: 8px;
}
.stat-label-bar {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px; letter-spacing: 2px;
  color: var(--text-muted); font-weight: 700;
  margin-bottom: 10px;
  padding: 4px 8px;
  background: rgba(224,96,144,0.08);
  border-left: 2px solid rgba(224,96,144,0.4);
  border-radius: 0 4px 4px 0;
}

/* ── RADAR CHART ── */
.radar-wrap { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 12px; }
.radar-svg-wrap { flex-shrink: 0; width: 175px; height: 175px; }
.weakness-col { flex: 1; display: flex; flex-direction: column; gap: 3px; isolation: isolate;}
.weakness-label { font-family: 'Rajdhani', sans-serif; font-size: 10px; letter-spacing: 1px; color: var(--text-muted); font-weight: 700; }
.weakness-slots { display: flex; gap: 4px; }
.weakness-slot {
  width: 40px; height: 40px;
  border: none; border-radius: 0; background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
}
.weakness-slot > img { width: 36px; height: 36px; object-fit: contain; display: block; }
.weakness-slot:hover { border-color: var(--accent-pink); }

/* ── POWER GRID ── */
.power-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 4px;
}
.power-slot {
  aspect-ratio: 1;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-inner);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: default; position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.power-slot:hover { border-color: var(--accent-gold); box-shadow: 0 0 10px rgba(212,168,67,0.2); }

/* ── TOOLTIPS ── */
.tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 8px;
  font-size: 10px; font-family: 'Rajdhani', sans-serif;
  font-weight: 600; color: var(--text-main);
  white-space: nowrap; letter-spacing: 0.5px;
  z-index: 100; pointer-events: none;
}
.weakness-slot:hover .tooltip,
.power-slot:hover .tooltip { display: block; }

/* ── RICH TOOLTIPS ── */
.weakness-slot, .power-slot { position: relative; }
.rich-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-deep);
  border: 1.5px solid var(--border);
  border-radius: 8px; padding: 10px;
  width: 130px; z-index: 200;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
  text-align: center;
  z-index: 500;
}
.rich-tooltip-icon {
  width: 72px; height: 72px;
  margin: 0 auto 8px;
  border: none;
  border-radius: 6px;
  background: var(--bg-inner);
  overflow: hidden;
}
.rich-tooltip-icon img { width: 100%; height: 100%; object-fit: contain; }
.rich-tooltip-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; color: var(--accent-gold);
  margin-bottom: 4px;
}
.rich-tooltip-desc {
  font-family: 'Nunito', sans-serif;
  font-size: 10px; line-height: 1.4;
  color: var(--text-muted);
}
.weakness-slot:hover .rich-tooltip,
.power-slot:hover .rich-tooltip { display: block; }

/* ── BANNERS ── */
.banners {
  margin: 4px 14px 14px; display: flex; flex-direction: column; gap: 8px;
  max-height: 140px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--accent-dim) transparent;
}
.banners::-webkit-scrollbar { width: 4px; }
.banners::-webkit-scrollbar-track { background: transparent; }
.banners::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 2px; }
.banner-btn {
  position: relative; height: 52px;
  border-radius: 8px; overflow: hidden;
  text-decoration: none;
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 14px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.15s;
}
.banner-btn:hover { border-color: var(--border-bright); transform: translateY(-1px); }
.banner-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.35) saturate(0.6);
}
.banner-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 20%, rgba(42,15,32,0.9) 100%);
}
.banner-label {
  position: relative;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700; font-size: 14px;
  letter-spacing: 2px; color: var(--text-main);
  z-index: 1;
}

/* ── BOTTOM NAV (base) ── */
.bottom-nav {
  display: flex; align-items: center; justify-content: space-around;
  background: var(--bg-deep);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 6px 16px 8px;
  overflow: visible;
  position: relative;
  z-index: 5;
  box-shadow: var(--shadow), 0 0 40px rgba(180,60,100,0.15);
}
.nav-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.nav-icon:hover { color: var(--accent-pink); background: rgba(204,62,142,0.1); }
.nav-icon svg { width: 20px; height: 20px; }
.nav-center {
  width: 110px; height: 110px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative; z-index: 20;
  margin-top: -30px; margin-bottom: -30px;
  filter:
    drop-shadow(0 0 0 2px #d4a843)
    drop-shadow(0 0 0 2px #d4a843)
    drop-shadow(0 0 0 2px #d4a843)
    drop-shadow(0 0 10px rgba(212,168,67,0.5));
}
.nav-center img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nav-center svg { color: transparent; }
.nav-text-btn {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700; font-size: 11px;
  letter-spacing: 1.5px; color: var(--text-muted);
  text-decoration: none; padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  display: none; /* hidden by default, shown on desktop */
}
.nav-text-btn:hover { color: var(--accent-pink); background: rgba(224,96,144,0.1); }
.home-btn {
  background: var(--accent-pink); color: var(--text-main);
  border: none; border-radius: 20px; padding: 7px 18px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700; font-size: 12px;
  letter-spacing: 1.5px; cursor: pointer; transition: background 0.2s;
}
.home-btn:hover { background: var(--accent-bright); }

/* ── VITALS / HEALTH BARS ── */
.vital-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.vital-row { display: flex; flex-direction: column; gap: 2px; }
.vital-row-header { display: flex; justify-content: space-between; align-items: baseline; }
.vital-row-label { font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.5px; }
.vital-row-value { font-family: 'Orbitron', sans-serif; font-size: 8px; color: var(--text-muted); letter-spacing: 0.5px; }
.vital-bar-bg { width: 100%; height: 6px; background: var(--bg-inner); border-radius: 3px; overflow: hidden; border: 1px solid rgba(212,168,67,0.1); }
.vital-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; position: relative; }
.vital-bar-fill::after {
  content: ''; position: absolute; right: 0; top: 0;
  height: 100%; width: 3px;
  background: rgba(255,255,255,0.6); border-radius: 0 3px 3px 0;
  box-shadow: 0 0 4px rgba(255,255,255,0.4);
}
.vital-bar-fill.rest    { background: linear-gradient(90deg, #8b1a1a, #cc3030); }
.vital-bar-fill.vibes   { background: linear-gradient(90deg, var(--accent-gold), var(--accent-pink)); }
.vital-bar-fill.health  { background: linear-gradient(90deg, var(--accent-gold), var(--accent-pink)); }
.vital-bar-fill.inspire { background: linear-gradient(90deg, var(--accent-gold), var(--accent-pink)); }
.vital-row.water .vital-row-label { color: #9b7ec8; }
.vital-bar-fill.water { background: linear-gradient(90deg, #4a2080, #7a50b0); animation: waterPulse 2s ease-in-out infinite; }
#water-timer { font-family: 'Orbitron', sans-serif; font-size: 8px; color: #9b7ec8; letter-spacing: 0.5px; }
#water-timer-d { font-family: 'Orbitron', sans-serif; font-size: 8px }
.vital-bar-fill.rest-critical { background: linear-gradient(90deg, #8b1a1a, #cc3030); animation: restFlash 0.8s ease-in-out infinite; }
.vital-row-label.rest-critical { color: #cc3030 !important; }
.vital-row.vibes-overflow .vital-row-label { color: var(--accent-bright) !important; animation: vibesPulse 1.2s ease-in-out infinite; letter-spacing: 1.5px; }
.vital-bar-fill.vibes-overflow { background: linear-gradient(90deg, var(--accent-gold), var(--accent-pink), var(--accent-bright)); background-size: 200% 100%; animation: vibesFlow 1s linear infinite; box-shadow: 0 0 8px rgba(240,128,176,0.6); }
.vital-bar-bg.vibes-overflow { overflow: visible; box-shadow: 0 0 6px rgba(240,128,176,0.3); }

/* ── MAILING LIST ── */
.mailing-list-section { padding: 14px; }
.mailing-list-desc { font-family: 'Nunito', sans-serif; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.mailing-list-row { display: flex; gap: 6px; }
.mailing-list-input {
  flex: 1; background: var(--bg-inner); border: 1.5px solid var(--border);
  border-radius: 6px; padding: 7px 10px; color: var(--text-main);
  font-family: 'Nunito', sans-serif; font-size: 12px; outline: none;
  transition: border-color 0.2s; box-sizing: border-box;
}
.mailing-list-input:focus { border-color: var(--accent-pink); }
.mailing-list-input::placeholder { color: var(--text-muted); }
.mailing-list-btn {
  background: var(--accent-pink); border: none; border-radius: 6px;
  color: var(--text-main); font-size: 16px; padding: 7px 14px;
  cursor: pointer; transition: background 0.2s;
}
.mailing-list-btn:hover { background: var(--accent-bright); }
.desktop-mailing-list { display: none; } /* shown only on desktop */

/* ── PROFILE BANNERS ── */
.profile-banners { border-top: none; }
.tab-panel + .profile-banners,
#tab-profile + .profile-banners { margin-top: 0; }

/* ── DESKTOP STATS PANEL (hidden on mobile) ── */
.desktop-stats-panel { display: none; }

/* ── DEVLOG PAGE (base) ── */
.devlog-page { width: 100%; max-width: 780px; animation: fadeUp 0.5s ease-out both; }
.devlog-header { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 12px 12px 0 0; padding: 16px 14px 12px; border-bottom: none; }
.devlog-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.back-btn { font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: 4px; transition: color 0.2s; }
.back-btn:hover { color: var(--accent-pink); }
.devlog-title-row { display: flex; align-items: baseline; gap: 10px; }
.devlog-page-title { font-family: 'Squada One', sans-serif; font-size: 24px; color: var(--text-main); line-height: 1; }
.devlog-subtitle { font-family: 'Rajdhani', sans-serif; font-size: 11px; letter-spacing: 1.5px; color: var(--text-muted); }
.devlog-gold-bar { height: 2px; background: linear-gradient(90deg, var(--accent-gold), transparent); margin-top: 8px; }
.quest-log { background: var(--bg-card); border: 1.5px solid var(--border); border-top: none; border-radius: 0; padding: 0 14px; }
.quest-entry { padding: 18px 0; border-bottom: 1px solid rgba(212,168,67,0.12); position: relative; }
.quest-entry:last-child { border-bottom: none; }
.quest-entry-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.quest-marker { width: 8px; height: 8px; background: var(--accent-gold); border-radius: 2px; transform: rotate(45deg); flex-shrink: 0; box-shadow: 0 0 6px rgba(212,168,67,0.6); }
.quest-date { font-family: 'Orbitron', sans-serif; font-size: 9px; color: var(--accent-gold); letter-spacing: 1px; }
.quest-type-badge { font-family: 'Rajdhani', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: 1px; color: var(--text-muted); background: var(--bg-inner); padding: 1px 6px; border-radius: 3px; border: 1px solid var(--border); margin-left: auto; }
.quest-entry-title { font-family: 'Squada One', sans-serif; font-size: 18px; color: var(--text-main); line-height: 1.2; margin-bottom: 8px; }
.quest-entry-image { width: 100%; border-radius: 6px; border: 1px solid var(--border); margin-bottom: 10px; display: block; object-fit: contain; }
.quest-entry-body { font-family: 'Nunito', sans-serif; font-size: 15px; line-height: 1.75; weight: 600; color: var(--text-main); }
.quest-entry-body p { margin-bottom: 8px; }
.quest-entry-body strong { font-size: 16px; color:var(--accent-pink);}
.quest-entry-body p:last-child { margin-bottom: 0; }
.quest-entry-body a { color: var(--accent-pink); text-decoration: none; }
.quest-entry-body a:hover { color: var(--accent-bright); }
.quest-entry-body i { color: var(--accent-pink); font-style: italic; }
.signature { font-family: 'Squada One', sans-serif; font-size: 20px; color:var(--accent-gold); }
/* ── UNORDERED LISTS ── */
.quest-entry-body ul {
  list-style: none;
  padding-left: 20px;
  margin: 8px 0;
}
.quest-entry-body ul li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 4px;
}
.quest-entry-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  background: var(--accent-pink);
  transform: rotate(45deg);
  border-radius: 1px;
}
.quest-entry-body ul ul {
  padding-left: 22px;
  margin-top: 4px;
}
.quest-entry-body ul ul li::before {
  background: var(--accent-dim);
}

/* ── ORDERED LISTS ── */
.quest-entry-body ol {
  list-style: none;
  counter-reset: quest-counter;
  padding-left: 36px;
  margin: 8px 0;
}
.quest-entry-body ol > li {
  position: relative;
  padding-left: 2px;
  margin-bottom: 4px;
  counter-increment: quest-counter;
}
.quest-entry-body ol > li::before {
  content: counter(quest-counter) ".";
  position: absolute;
  left: -20px;
  top: 0;
  color: var(--accent-pink);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 14px;
  background: none;
  transform: none;
  width: auto;
  height: auto;
  border-radius: 0;
}
.quest-read-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--accent-pink); text-decoration: none; transition: color 0.2s; }
.quest-read-more:hover { color: var(--accent-bright); }
.quest-loading, .quest-empty, .quest-error { padding: 40px 14px; text-align: center; font-family: 'Rajdhani', sans-serif; font-size: 13px; letter-spacing: 1px; color: var(--text-muted); }
.quest-loading-spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent-gold); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 12px; }
.quest-divider { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.quest-divider-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
.quest-divider-diamond { width: 6px; height: 6px; background: var(--accent-dim); transform: rotate(45deg); border-radius: 1px; }
.devlog-nav { background: var(--bg-deep); border: 1.5px solid var(--border); border-top: none; border-radius: 0 0 12px 12px; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; overflow: visible; position: relative; }
.devlog-nav-logo { width: 90px; height: 90px; position: absolute; left: 50%; transform: translateX(-50%); top: -20px; z-index: 20; filter: drop-shadow(0 0 0 2px #d4a843) drop-shadow(0 0 0 2px #d4a843) drop-shadow(0 0 8px rgba(212,168,67,0.5)); }
.devlog-nav-logo img { width: 100%; height: 100%; object-fit: contain; }
.load-more-btn { display: block; width: calc(100% - 28px); margin: 0 14px 14px; padding: 10px; background: transparent; border: 1.5px solid var(--border); border-radius: 6px; color: var(--text-muted); font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 1.5px; cursor: pointer; transition: all 0.2s; text-align: center; }
.load-more-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.devlog-filters { display: flex; gap: 6px; padding: 10px 14px; background: var(--bg-card); border: 1.5px solid var(--border); border-top: none; flex-wrap: wrap; }
.filter-btn { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 10px; letter-spacing: 1.5px; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; transition: all 0.2s; }
.filter-btn:hover { color: var(--text-main); border-color: var(--accent-pink); }
.filter-btn.active { background: var(--accent-pink); color: var(--text-main); border-color: var(--accent-pink); }

.img-preview-link {
  color: var(--accent-pink);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-pink);
  position: relative;
  cursor: pointer;
}
.img-preview-link:hover { color: var(--accent-bright); }
.img-preview-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
  z-index: 300;
  pointer-events: none;
}
.img-preview-link:hover .img-preview-popup { display: block; }

/* ── COMMUNITY PAGE (base) ── */
.community-page { width: 100%; max-width: 780px; animation: fadeUp 0.5s ease-out both; }
.community-header { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 12px 12px 0 0; border-bottom: none; padding: 16px 14px 12px; }
.community-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.community-title-row { display: flex; align-items: baseline; gap: 10px; }
.community-page-title { font-family: 'Squada One', sans-serif; font-size: 24px; color: var(--text-main); line-height: 1; }
.community-subtitle { font-family: 'Rajdhani', sans-serif; font-size: 11px; letter-spacing: 1.5px; color: var(--text-muted); }
.community-gold-bar { height: 2px; background: linear-gradient(90deg, var(--accent-gold), transparent); margin-top: 8px; }
.community-tabs { display: flex; background: var(--bg-card); border: 1.5px solid var(--border); border-top: none; border-bottom: none; }
.community-tab { flex: 1; padding: 10px; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 1.5px; cursor: pointer; border: none; transition: all 0.2s; background: transparent; color: var(--text-muted); }
.community-tab.active { background: var(--accent-pink); color: var(--text-main); }
.community-tab:hover:not(.active) { background: rgba(224,96,144,0.12); color: var(--text-main); }
.community-body { background: var(--bg-card); border: 1.5px solid var(--border); border-top: none; padding: 14px; border-radius: 0 0 12px 12px; }
.section-label-bar { font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 10px; margin-top: 16px; padding: 4px 8px; background: rgba(224,96,144,0.08); border-left: 2px solid rgba(224,96,144,0.4); border-radius: 0 4px 4px 0; }
.section-label-bar:first-child { margin-top: 0; }

/* Stamps */
.stamp-panel { display: none; padding-bottom: 50px; }
.stamp-panel.active { display: block; }
.my-stamp-box { background: var(--bg-inner); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 16px; }
.my-stamp-label { font-family: 'Rajdhani', sans-serif; font-size: 10px; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; }
.my-stamp-img { width: 88px; height: 31px; border: 1px solid var(--border-bright); border-radius: 3px; display: block; image-rendering: pixelated; background: var(--bg-deep); margin-bottom: 6px; }
.my-stamp-desc { font-family: 'Nunito', sans-serif; font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.stamp-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.stamp-link { display: block; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s; line-height: 0; }
.stamp-link:hover { border-color: var(--accent-gold); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(212,168,67,0.2); }
.stamp-link img { width: 88px; height: 31px; display: block; object-fit: cover; image-rendering: pixelated; }
.stamp-placeholder { width: 88px; height: 31px; border: 1px dashed var(--border); border-radius: 3px; display: flex; align-items: center; justify-content: center; font-family: 'Rajdhani', sans-serif; font-size: 8px; letter-spacing: 0.5px; color: var(--text-muted); background: var(--bg-inner); }
.code-box { display: flex; align-items: stretch; gap: 0; margin-top: 8px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.code-box code { flex: 1; display: block; padding: 8px 10px; font-family: monospace; font-size: 10px; color: var(--accent-gold); background: var(--bg-card); overflow: hidden; white-space: nowrap; line-height: 1.6; border-radius: 6px 0 0 6px; }
.code-copy-btn { background: var(--accent-dim); border: none; padding: 0 12px; color: var(--text-main); font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: 1px; cursor: pointer; flex-shrink: 0; transition: background 0.2s; }
.code-copy-btn:hover { background: var(--accent-pink); }

/* Guestbook */
.guestbook-panel { display: none; padding-bottom: 50px; }
.guestbook-panel.active { display: block; }
.gb-hint { font-family: 'Nunito', sans-serif; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }
.gb-form-row { display: flex; gap: 8px; margin-bottom: 8px; }
.gb-form-group { flex: 1; }
.gb-label { font-family: 'Rajdhani', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.gb-input, .gb-textarea { width: 100%; background: var(--bg-inner); border: 1.5px solid var(--border); border-radius: 6px; padding: 7px 10px; color: var(--text-main); font-family: 'Nunito', sans-serif; font-size: 12px; outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.gb-input:focus, .gb-textarea:focus { border-color: var(--accent-pink); }
.gb-textarea { resize: vertical; min-height: 70px; margin-bottom: 8px; }
.gb-submit { display: block; width: 100%; padding: 9px; background: var(--accent-pink); border: none; border-radius: 6px; color: var(--text-main); font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 1.5px; cursor: pointer; transition: background 0.2s, transform 0.1s; margin-bottom: 16px; }
.gb-submit:hover { background: var(--accent-bright); transform: translateY(-1px); }
.gb-confirm { font-family: 'Rajdhani', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--accent-gold); margin-top: 12px; text-align: center; }
.gb-divider { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.gb-divider-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
.gb-divider-diamond { width: 6px; height: 6px; background: var(--accent-dim); transform: rotate(45deg); border-radius: 1px; }
.gb-entry { padding: 14px 0; border-bottom: 1px solid rgba(212,168,67,0.12); }
.gb-entry:last-child { border-bottom: none; }
.gb-entry-header { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; flex-wrap: wrap; }
.gb-diamond { width: 6px; height: 6px; background: var(--accent-gold); border-radius: 1px; transform: rotate(45deg); flex-shrink: 0; box-shadow: 0 0 4px rgba(212,168,67,0.5); }
.gb-name { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 13px; color: var(--text-main); }
.gb-site { font-family: 'Rajdhani', sans-serif; font-size: 11px; color: var(--accent-pink); text-decoration: none; }
.gb-site:hover { color: var(--accent-bright); }
.gb-date { font-family: 'Orbitron', sans-serif; font-size: 8px; color: var(--text-muted); margin-left: auto; letter-spacing: 0.5px; }
.gb-message { font-family: 'Nunito', sans-serif; font-size: 13px; line-height: 1.6; color: var(--text-main); }
.gb-empty { padding: 30px 0; text-align: center; font-family: 'Rajdhani', sans-serif; font-size: 12px; letter-spacing: 1px; color: var(--text-muted); }


/* ══════════════════════════════════
   MOBILE OVERRIDES
   max-width: 767px
══════════════════════════════════ */
@media (max-width: 767px) {
  body { padding: 0; }

  /* Index card — edge to edge */
  .card { max-width: 100%; width: 100%; border: none; border-radius: 0; box-shadow: none; overflow: visible; }

  /* Nav — flat, octopus centered above */
  .bottom-nav { border-radius: 0; border: none; border-top: 1.5px solid var(--border); }
  .bottom-nav .nav-icon:nth-child(3) { position: absolute; left: 50%; top: -35px; transform: translateX(-50%); margin-top: 0; margin-bottom: 0; z-index: 30; }
  .nav-text-btn { display: none; }

  /* Radar chart — fluid */
  .radar-wrap { gap: 10px; align-items: center; }
  .radar-svg-wrap { width: 45vw; height: 45vw; flex-shrink: 0; }
  .weakness-col { flex: 1; min-width: 0; }
  .weakness-slots { justify-content: flex-start; gap: 8px; }
  .weakness-slot { flex: 0 0 44px; width: 44px; height: 44px; }
  .weakness-slot > img { width: 36px; height: 36px; object-fit: contain; display: block; }

  /* Rich tooltips — tap to show on mobile */
  .rich-tooltip { display: none; }
  .rich-tooltip.visible {
    display: block;
    width: 160px;
    padding: 12px;
    z-index: 500;
  }
  .rich-tooltip.visible .rich-tooltip-icon {
    width: 110px;
    height: 110px;
    margin: 0 auto 10px;
    border: none;
    display: block;
  }
  .rich-tooltip.visible .rich-tooltip-icon img {
    width: 100%;
    height: 100%;
  }
  .rich-tooltip.visible .rich-tooltip-name { display: block; text-align: center; }
  .rich-tooltip.visible .rich-tooltip-desc { display: block; text-align: center; }
  .tooltip { display: none; }
  .tooltip.visible { display: block; }
  .power-slot { font-size: 28px; }

  /* Devlog — edge to edge */
  .devlog-page { max-width: 100%; }
  .devlog-header { border-radius: 0; border-left: none; border-right: none; border-top: none; }
  .quest-log { border-left: none; border-right: none; }
  .devlog-nav { border-radius: 0; border-left: none; border-right: none; border-bottom: none; }
  .img-preview-popup { display: none !important; }

  /* Community — edge to edge */
  .community-page { max-width: 100%; }
  .community-header { border-radius: 0; border-left: none; border-right: none; border-top: none; }
  .community-tabs { border-left: none; border-right: none; }
  .community-body { border-left: none; border-right: none; border-radius: 0; }

  /* Community/devlog nav — static on mobile */
  .community-page .bottom-nav,
  .devlog-page .bottom-nav { position: relative; border-radius: 0; border: none; border-top: 1.5px solid var(--border); box-shadow: none; }
}


/* ══════════════════════════════════
   DESKTOP LAYOUT
   min-width: 768px
══════════════════════════════════ */
@media (min-width: 768px) {
  body { align-items: center; justify-content: center; padding: 40px 24px; }

  /* ── INDEX CARD — two column ── */
  .card {
    max-width: 780px; width: 780px;
    display: flex; flex-direction: row; align-items: stretch;
    border: 1.5px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow), 0 0 40px rgba(180,60,100,0.15);
    overflow: visible; background: transparent; padding-bottom: 0;
    position: relative;
  }
  .card-inner {
    width: 340px; flex-shrink: 0;
    border-radius: 12px 0 0 12px;
    background: var(--bg-card); border: none;
    border-right: 1px solid var(--border);
    box-shadow: none; display: flex; flex-direction: column;
    overflow: hidden; padding-bottom: 0;
  }
  .desktop-stats-panel {
    display: flex !important; flex: 1; flex-direction: column;
    background: var(--bg-card); padding: 20px 24px 100px;
    overflow-y: visible; border-radius: 0 12px 12px 0;
    border: none; box-shadow: none;
  }

  /* Hide tabs on desktop — panels are always visible */
  .tabs { display: none; }
  #tab-profile { display: block !important; animation: none; flex: 1; }
  #tab-stats { display: none !important; }

  /* Hide banners on desktop — nav handles links */
  .banners { display: none; }

  /* Mailing list — hide inline, show desktop bar */
  .mailing-list-section { display: none; }
  .desktop-mailing-list {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center; gap: 4px 16px;
    width: 780px; box-sizing: border-box; margin-top: 12px;
    background: var(--bg-card); border: 1.5px solid var(--border);
    border-radius: 12px; padding: 12px 20px;
  }
  .desktop-mailing-list .stat-label-bar { margin: 0; grid-column: 1; grid-row: 1; white-space: nowrap; }
  .desktop-mailing-list .mailing-list-desc { margin: 0; font-size: 11px; grid-column: 1; grid-row: 2; white-space: nowrap; }
  .desktop-mailing-list .mailing-list-form { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .desktop-mailing-list .mailing-list-row { margin: 0; }

  /* Avatar position */
  .avatar-wrap { top: 54px; left: 14px; }

  /* Desktop stats panel */
  .desktop-stats-panel .contact-row { display: none; }
  .desktop-stats-panel .stat-label-bar { margin-bottom: 12px; }
  .desktop-radar-row { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
  .desktop-radar-row .radar-svg-wrap { width: 220px; height: 220px; flex-shrink: 0; }
  .desktop-vitals-col { flex: 1; display: flex; flex-direction: column; }

  /* Bottom nav — absolute, spans full card width */
  .bottom-nav {
    position: absolute; bottom: 0; left: 0; right: 0; width: 100%;
    border-radius: 0 0 12px 12px; border: none;
    border-top: 1px solid var(--border);
    z-index: 10; padding: 4px 24px;
    display: flex; align-items: center; justify-content: space-around;
    overflow: visible;
  }
  .nav-center { position: relative; transform: none; left: auto; top: auto; }
  .nav-text-btn { display: inline-flex; align-items: center; }

  /* ── COMMUNITY & DEVLOG PAGES — card style ── */
  .community-page,
  .devlog-page {
    border: 1.5px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow), 0 0 40px rgba(180,60,100,0.15);
    position: relative; overflow: visible;
  }
  .community-page { width: 780px; max-width: 100%; }
  .devlog-page { width: 780px; max-width: 100%; padding-bottom: 20px; }

  /* Nav for community/devlog — absolute within their page container */
  .community-page .bottom-nav,
  .devlog-page .bottom-nav {
    position: absolute; bottom: 0; left: 0; right: 0;
    border-radius: 0 0 12px 12px; border: none;
    border-top: 1px solid var(--border);
  }

  /* Padding so content doesn't hide behind nav */
  .community-body { padding-bottom: 70px; }
  .quest-log { padding-bottom: 70px; }
}