@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

/* ===================================================================
   FABULERY — App-style theme (warm parchment + storybook frames)
   ================================================================ */
:root {
  --bg-sky-top:    #b9e3fa;
  --bg-sky-bot:    #e4f3fb;
  --bg-parchment:  #fbf0d6;
  --bg-parchment-2:#f3dfae;
  --bg-card:       #fff7e2;
  --frame-wood:    #c08652;
  --frame-wood-dk: #8a5a2d;
  --frame-wood-lt: #e6b97a;
  --ink:           #3a2415;
  --ink-soft:      #6b4a2b;
  --ink-muted:     #997a55;
  --accent-red:    #d94f3d;       /* primary button (matches "Download") */
  --accent-red-dk: #a83323;
  --accent-orange: #ff8c42;       /* fox / highlights */
  --accent-green:  #4caf50;
  --accent-blue:   #5cabed;
  --accent-yellow: #f3c510;
  --accent-purple: #8f45ad;
  --shadow-frame:  0 8px 0 var(--frame-wood-dk), 0 14px 28px rgba(58,36,21,0.18);
  --shadow-soft:   0 6px 18px rgba(58,36,21,0.12);
  --shadow-pop:    0 4px 0 var(--accent-red-dk);
  --radius:        18px;
  --radius-lg:     28px;
  --transition:    0.25s cubic-bezier(0.4,0,0.2,1);
  --max-width:     1180px;
}

*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:16px; }
body {
  font-family:'Nunito', system-ui, sans-serif;
  background: linear-gradient(180deg, var(--bg-sky-top) 0%, var(--bg-sky-bot) 50%, var(--bg-parchment) 100%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Floating clouds background */
body::before, body::after {
  content:'';
  position: fixed;
  pointer-events:none;
  z-index:0;
  opacity:0.45;
  background-repeat: no-repeat;
}
body::before {
  top: 8%; left: -50px; width: 280px; height: 120px;
  background:
    radial-gradient(60px 30px at 30% 60%, #fff 99%, transparent 100%),
    radial-gradient(45px 28px at 60% 50%, #fff 99%, transparent 100%),
    radial-gradient(40px 25px at 80% 65%, #fff 99%, transparent 100%);
  animation: cloudDrift 60s linear infinite;
}
body::after {
  top: 30%; right: -60px; width: 220px; height: 100px;
  background:
    radial-gradient(50px 25px at 30% 55%, #fff 99%, transparent 100%),
    radial-gradient(40px 22px at 65% 50%, #fff 99%, transparent 100%);
  animation: cloudDrift 80s linear infinite reverse;
}
@keyframes cloudDrift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(60px); }
}

a { color: var(--accent-red); text-decoration:none; transition: var(--transition); }
a:hover { color: var(--accent-red-dk); }
img { max-width:100%; display:block; }
ul,ol { list-style:none; }
button { font-family: inherit; }

/* ================= NAVBAR ================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0.85rem 1.5rem;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(251, 240, 214, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 14px rgba(58,36,21,0.12);
}
.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.navbar-logo {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: -0.5px;
}
.navbar-logo img {
  width: 38px; height: 38px;
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--frame-wood-dk);
}
.navbar-logo span.accent { color: var(--accent-red); }
.navbar-logo:hover { color: #2c8a3c; }
.navbar-logo:hover span.accent { color: var(--accent-red); }

.navbar-links { display: flex; gap: 0.4rem; align-items: center; }
.navbar-links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 100px;
  transition: var(--transition);
}
.navbar-links a:hover {
  background: rgba(192, 134, 82, 0.15);
  color: var(--ink);
}
.navbar-links a.active {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 3px 0 var(--accent-red-dk);
}

/* Language toggle button + dropdown menu */
.lang-toggle-wrapper, .target-lang-toggle-wrapper {
  position: relative;
  display: inline-block;
  margin-left: 0.5rem;
}
.lang-toggle, .target-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem 0.4rem 0.85rem;
  background: var(--bg-card);
  border: 2px solid var(--frame-wood-lt);
  border-radius: 100px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--frame-wood);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.lang-toggle:hover, .target-lang-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--frame-wood);
}
.lang-toggle:active, .target-lang-toggle:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--frame-wood);
}
.lang-toggle .lang-toggle-flag, .target-lang-toggle .target-lang-toggle-flag { font-size: 1.05rem; line-height: 1; }
.lang-toggle .lang-toggle-label, .target-lang-toggle .target-lang-toggle-label { letter-spacing: 0.5px; }
.lang-toggle .lang-toggle-chevron, .target-lang-toggle .target-lang-toggle-chevron {
  font-size: 0.75rem;
  color: var(--ink-muted);
  transition: transform 0.2s ease;
}
.lang-toggle-wrapper.open .lang-toggle-chevron, .target-lang-toggle-wrapper.open .target-lang-toggle-chevron { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  padding: 0.4rem;
  background: var(--bg-card);
  border: 3px solid var(--frame-wood);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 2px var(--frame-wood-lt), 0 10px 28px rgba(58,36,21,0.25);
  display: none;
  z-index: 1100;
  animation: langMenuIn 0.18s ease-out;
}
.lang-toggle-wrapper.open .lang-menu, .target-lang-toggle-wrapper.open .lang-menu { display: block; }
@keyframes langMenuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: transparent;
  border: none;
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lang-menu-item:hover {
  background: rgba(192,134,82,0.18);
}
.lang-menu-item.active {
  background: rgba(217,79,61,0.12);
  color: var(--accent-red-dk);
}
.lang-menu-item .lang-menu-flag { font-size: 1.2rem; line-height: 1; }
.lang-menu-item .lang-menu-name { flex: 1; }
.lang-menu-item .lang-menu-check {
  color: var(--accent-red);
  font-weight: 800;
  opacity: 0;
  font-size: 0.95rem;
}
.lang-menu-item.active .lang-menu-check { opacity: 1; }

/* Mobile: dropdown opens above when navbar is open as fullscreen overlay */
@media (max-width: 768px) {
  .lang-toggle-wrapper, .target-lang-toggle-wrapper { margin-left: 0; }
  .lang-menu {
    right: 50%;
    transform: translateX(50%);
    min-width: 220px;
  }
  .lang-toggle-wrapper.open .lang-menu, .target-lang-toggle-wrapper.open .lang-menu {
    transform: translateX(50%);
  }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  z-index: 1001;
}
.hamburger span {
  width: 26px; height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px,6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px,-6px); }

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-text { text-align: left; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff7e2;
  border: 2px solid var(--frame-wood-lt);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  box-shadow: 0 3px 0 var(--frame-wood);
  margin-bottom: 1.5rem;
}
.hero-badge .dot {
  width: 9px; height: 9px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}
.hero h1 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  line-height: 1.05;
  margin-bottom: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.hero h1 .accent {
  color: var(--accent-red);
  display: inline-block;
}
.hero p.lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
  max-width: 520px;
  font-weight: 500;
}
.hero-buttons {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* Hero scene (right side of hero) */
.hero-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}
.crow-stage {
  position: relative;
  width: clamp(220px, 28vw, 320px);
  filter: drop-shadow(0 12px 18px rgba(58,36,21,0.25));
  animation: crowBob 3.6s ease-in-out infinite;
}
.crow-stage img { width: 100%; height: auto; }

/* Ezop stage — two-frame crossfade animation */
.ezop-stage {
  position: relative;
  width: clamp(260px, 32vw, 380px);
  aspect-ratio: 3 / 4;
  filter: drop-shadow(0 14px 22px rgba(58,36,21,0.28));
  animation: ezopBob 3.4s ease-in-out infinite;
}
.ezop-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.ezop-frame.active { opacity: 1; }
@keyframes ezopBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.crow-shadow {
  position: absolute;
  left: 50%;
  bottom: -28px;
  width: 60%;
  height: 28px;
  background: radial-gradient(ellipse, rgba(58,36,21,0.35) 0%, transparent 70%);
  transform: translateX(-50%);
  animation: shadowPulse 3.6s ease-in-out infinite;
}
@keyframes crowBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes shadowPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.55; }
  50%      { transform: translateX(-50%) scale(0.78); opacity: 0.35; }
}

/* Sparkles around crow */
.sparkle {
  position: absolute;
  font-size: 1.5rem;
  pointer-events: none;
  animation: twinkle 2.4s ease-in-out infinite;
}
.sparkle.s1 { top: 10%; left: 12%; animation-delay: 0s; }
.sparkle.s2 { top: 22%; right: 8%; animation-delay: 0.6s; font-size: 1.1rem; }
.sparkle.s3 { bottom: 18%; right: 14%; animation-delay: 1.2s; }
.sparkle.s4 { bottom: 28%; left: 6%; animation-delay: 1.8s; font-size: 1.2rem; }
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.7) rotate(0deg); }
  50%      { opacity: 1; transform: scale(1.1) rotate(20deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: 100px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn-primary {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 5px 0 var(--accent-red-dk), 0 8px 18px rgba(217,79,61,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--accent-red-dk), 0 12px 22px rgba(217,79,61,0.32); color:#fff; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-red-dk), 0 4px 10px rgba(217,79,61,0.2); }

.btn-secondary {
  background: #fff7e2;
  color: var(--ink);
  border: 2px solid var(--frame-wood-lt);
  box-shadow: 0 4px 0 var(--frame-wood);
}
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--frame-wood); color: var(--ink); }
.btn-secondary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--frame-wood); }

.btn-google {
  background: #fff;
  color: #2a2a2a;
  border: 2px solid #d4a572;
  box-shadow: 0 4px 0 var(--frame-wood);
  font-weight: 700;
}
.btn-google:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--frame-wood); color: #2a2a2a; background: #fffbf0; }

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  box-shadow: 0 4px 0 #7f1d1d;
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #7f1d1d; color:#fff; }

/* ================= WOODEN FRAME ================= */
.wood-frame {
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, #fff7e2 0%, #f8e7c0 100%);
  border: 6px solid var(--frame-wood);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  box-shadow:
    inset 0 0 0 3px var(--frame-wood-lt),
    inset 0 0 22px rgba(192, 134, 82, 0.2),
    var(--shadow-frame);
}
.wood-frame::before, .wood-frame::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  background: var(--frame-wood-dk);
  border-radius: 50%;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2);
}
.wood-frame::before { top: 10px; left: 10px; }
.wood-frame::after  { top: 10px; right: 10px; }

/* ================= SECTIONS ================= */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 1.5rem;
}
.section-inner { max-width: var(--max-width); margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.section-header h2 .accent { color: var(--accent-red); }
.section-header p {
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.05rem;
  font-weight: 500;
}

/* ================= FEATURE CARDS ================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 3px solid var(--frame-wood-lt);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  box-shadow: 0 5px 0 var(--frame-wood), 0 10px 24px rgba(58,36,21,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 9px 0 var(--frame-wood), 0 16px 30px rgba(58,36,21,0.15);
}
.feature-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 0.9rem;
  background: rgba(217,79,61,0.12);
  border: 2px solid rgba(217,79,61,0.25);
}
.feature-card h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--ink);
}
.feature-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
  font-weight: 500;
}

/* ================= LANGUAGE CHIPS ================= */
.languages-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.lang-chip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.3rem;
  background: var(--bg-card);
  border: 3px solid var(--frame-wood-lt);
  border-radius: 100px;
  box-shadow: 0 4px 0 var(--frame-wood);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: default;
}
.lang-chip:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--frame-wood); }
.lang-chip .flag { font-size: 1.7rem; line-height: 1; }
.lang-chip .lang-name { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.lang-chip .lang-native { color: var(--ink-muted); font-size: 0.78rem; font-weight: 600; }

/* ================= AUTH SECTION ================= */
.auth-section {
  background: var(--bg-card);
  border: 6px solid var(--frame-wood);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  box-shadow:
    inset 0 0 0 3px var(--frame-wood-lt),
    var(--shadow-frame);
}
.auth-section::before, .auth-section::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  background: var(--frame-wood-dk);
  border-radius: 50%;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.2);
}
.auth-section::before { top: 12px; left: 12px; }
.auth-section::after  { top: 12px; right: 12px; }
.auth-section h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.auth-section > p {
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
  font-weight: 500;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.4rem 0;
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--frame-wood-lt);
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  background: rgba(76,175,80,0.12);
  border: 2px solid rgba(76,175,80,0.35);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.user-profile img {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 3px solid var(--accent-green);
  background: #fff;
}
.user-profile .user-info { text-align: left; }
.user-profile .user-name { font-weight: 800; color: var(--ink); }
.user-profile .user-email { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }

/* ================= SYNC STATS ================= */
.sync-stats {
  margin: 1.2rem 0;
  padding: 1.1rem;
  background: rgba(243,197,16,0.1);
  border: 2px dashed rgba(243,197,16,0.5);
  border-radius: var(--radius);
}
.sync-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}
.sync-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.5rem 0.2rem;
}
.sync-stat-icon { font-size: 1.4rem; }
.sync-stat-value {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--accent-red);
  line-height: 1.1;
}
.sync-stat-label {
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-align: center;
  font-weight: 700;
}
.sync-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--accent-green);
  font-weight: 700;
}
.sync-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 1.8s ease-in-out infinite;
}

/* ================= LEGAL PAGES ================= */
.legal-page {
  padding: 7rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 5px solid var(--frame-wood);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: inset 0 0 0 3px var(--frame-wood-lt), var(--shadow-frame);
}
.legal-content h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--accent-red);
}
.legal-content .last-updated {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px dashed var(--frame-wood-lt);
  font-weight: 600;
}
.legal-content h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2rem 0 0.85rem;
  color: var(--accent-red-dk);
}
.legal-content h3 { font-size: 1.05rem; font-weight: 700; margin: 1.3rem 0 0.55rem; color: var(--ink); }
.legal-content p { color: var(--ink-soft); margin-bottom: 0.9rem; font-size: 0.96rem; font-weight: 500; }
.legal-content ul { margin: 0.5rem 0 1rem 1.5rem; list-style: disc; }
.legal-content ul li { color: var(--ink-soft); margin-bottom: 0.35rem; font-size: 0.95rem; font-weight: 500; }
.legal-content a { color: var(--accent-red); text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }

/* Account deletion steps */
.deletion-steps { counter-reset: step; margin: 1.5rem 0; }
.deletion-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.1rem;
  background: rgba(192,134,82,0.08);
  border: 2px solid var(--frame-wood-lt);
  border-radius: var(--radius);
}
.deletion-step::before {
  counter-increment: step;
  content: counter(step);
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-red);
  border-radius: 50%;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 3px 0 var(--accent-red-dk);
}
.deletion-step p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; font-weight: 500; }
.deletion-warning {
  background: rgba(243,197,16,0.15);
  border: 2px solid rgba(243,197,16,0.5);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin: 1.3rem 0;
}
.deletion-warning p { color: #b8870e; font-size: 0.95rem; margin: 0; font-weight: 700; }

/* ================= FOOTER ================= */
.footer {
  position: relative;
  z-index: 1;
  background: rgba(192,134,82,0.12);
  border-top: 3px dashed var(--frame-wood-lt);
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.footer-logo {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-red);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-logo img { width: 32px; height: 32px; border-radius: 8px; }
.footer-links { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.footer-links a { color: var(--ink-soft); font-size: 0.9rem; font-weight: 700; }
.footer-links a:hover { color: var(--accent-red); }
.footer-copy { color: var(--ink-muted); font-size: 0.82rem; width: 100%; text-align: center; margin-top: 0.5rem; font-weight: 600; }

/* ================= FADE-IN ================= */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ================= STORIES PAGE ================= */
.stories-page { position: relative; z-index: 1; padding: 6rem 1.5rem 3rem; min-height: 100vh; }
.stories-header { text-align: center; margin-bottom: 2.5rem; }
.stories-header h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 0.4rem;
}
.stories-header p { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 1.3rem; font-weight: 500; }
.lang-selector {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1.2rem;
  background: var(--bg-card);
  border: 2px solid var(--frame-wood-lt);
  border-radius: 100px;
  box-shadow: 0 3px 0 var(--frame-wood);
}
.lang-selector label { color: var(--ink-soft); font-size: 0.9rem; font-weight: 700; }
.lang-selector select {
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}
.lang-selector select option { background: var(--bg-card); color: var(--ink); }

/* Overrides for lang-selector inside navbar */
.navbar-links .lang-selector {
  padding: 0.4rem 0.85rem;
  margin-left: 0.5rem;
}
.navbar-links .lang-selector select {
  font-size: 0.85rem;
}
@media (max-width: 1100px) {
  .navbar-links .lang-selector label {
    display: none;
  }
}
@media (max-width: 760px) {
  .navbar-links .lang-selector {
    margin-left: 0;
    margin-bottom: 0.5rem;
  }
  .navbar-links .lang-selector label {
    display: inline;
  }
}


/* Auth required card */
.auth-required { display: flex; justify-content: center; align-items: center; min-height: 50vh; }
.auth-required-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  border: 5px solid var(--frame-wood);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 3px var(--frame-wood-lt), var(--shadow-frame);
  max-width: 450px;
  position: relative;
}
.auth-required-card h2 { font-family: 'Fredoka', sans-serif; font-size: 1.7rem; margin-bottom: 0.6rem; color: var(--ink); }
.auth-required-card p { color: var(--ink-soft); margin-bottom: 1.5rem; font-weight: 500; }

/* Story grid */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.story-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 4px solid var(--frame-wood-lt);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 0 var(--frame-wood), 0 10px 22px rgba(58,36,21,0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.story-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 9px 0 var(--frame-wood), 0 16px 30px rgba(58,36,21,0.18);
  color: var(--ink);
}
.story-card.completed { border-color: rgba(76,175,80,0.55); }
.story-card.completed::after {
  content: '✓ Okundu';
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: var(--accent-green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.22rem 0.7rem;
  border-radius: 100px;
  box-shadow: 0 2px 0 #2e7d32;
}
.story-card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.story-level {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}
.story-check { color: var(--accent-green); font-weight: 800; font-size: 1.15rem; }
.story-card-icon { font-size: 2.8rem; margin-bottom: 0.4rem; }
.story-card-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.story-card-desc {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 0.7rem;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-card-meta { display: flex; gap: 1rem; font-size: 0.82rem; color: var(--ink-muted); margin-bottom: 0.5rem; font-weight: 700; }
.story-card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.story-tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  background: rgba(192,134,82,0.18);
  border: 1px solid rgba(192,134,82,0.35);
  border-radius: 100px;
  font-size: 0.72rem;
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: capitalize;
}
.story-card-moral {
  font-size: 0.85rem;
  color: var(--accent-red-dk);
  font-style: italic;
  font-weight: 600;
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 2px dashed var(--frame-wood-lt);
}

/* ================= READER PAGE ================= */
.reader-page { position: relative; z-index: 1; min-height: 100vh; padding: 5rem 0 2rem; }
.reader-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1.2rem;
}
.reader-loading p { color: var(--ink-soft); font-size: 1.05rem; font-weight: 600; }
.spinner {
  width: 52px; height: 52px;
  border: 4px solid var(--frame-wood-lt);
  border-top-color: var(--accent-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.reader-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.reader-header {
  text-align: center;
  margin-bottom: 1.8rem;
  padding: 1.5rem 1rem;
  background: var(--bg-card);
  border: 4px solid var(--frame-wood);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 3px var(--frame-wood-lt), 0 4px 0 var(--frame-wood-dk);
  position: relative;
}
.reader-header .crow-mini {
  position: absolute;
  top: -38px;
  right: 18px;
  width: 70px;
  animation: crowBob 3s ease-in-out infinite;
  filter: drop-shadow(0 6px 8px rgba(58,36,21,0.3));
}
.reader-header h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 0.6rem;
}
.reader-meta {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 700;
}
.reader-level {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
}

/* Audio controls */
.audio-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.2rem;
  background: var(--bg-card);
  border: 3px solid var(--frame-wood-lt);
  border-radius: var(--radius);
  margin-bottom: 1.8rem;
  box-shadow: 0 4px 0 var(--frame-wood);
}
.audio-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--accent-red);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 0 var(--accent-red-dk);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.audio-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--accent-red-dk); }
.audio-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-red-dk); }
.audio-btn.small {
  width: 38px; height: 38px;
  background: var(--bg-card);
  border: 2px solid var(--frame-wood-lt);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 3px 0 var(--frame-wood);
}
.audio-progress { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.audio-bar {
  width: 100%; height: 8px;
  background: rgba(192,134,82,0.2);
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid var(--frame-wood-lt);
}
.audio-bar-fill { height: 100%; background: var(--accent-red); border-radius: 3px; transition: width 0.1s linear; }
.audio-time { font-size: 0.74rem; color: var(--ink-muted); text-align: right; font-weight: 700; }

/* Reader body — story text */
.reader-body {
  display: flow-root;
  font-size: 1.12rem;
  line-height: 1.95;
  color: var(--ink);
  background: var(--bg-card);
  padding: 2rem 2rem;
  border: 4px solid var(--frame-wood-lt);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--frame-wood);
  font-weight: 500;
}
.story-paragraph {
  margin-bottom: 1.5rem;
  text-indent: 1.5em;
  overflow: hidden;
}
.story-paragraph::first-letter {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--accent-red);
}

/* Story images */
.story-image {
  clear: both;
  margin: 1rem 0 0.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 180px;
  border: 3px solid var(--frame-wood-lt);
  box-shadow: 0 4px 0 var(--frame-wood);
}
.story-image img { width: 100%; border-radius: 12px; cursor: zoom-in; transition: transform 0.2s ease; }
.story-image img:hover { transform: scale(1.02); }
.story-image-right { float: right; margin-left: 1.5rem; }
.story-image-left  { float: left;  margin-right: 1.5rem; }
.story-image-placeholder {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(192,134,82,0.1);
  font-size: 2rem;
  color: var(--ink-muted);
  animation: pulse 2s infinite;
}

/* Karaoke + clickable words */
.karaoke-word {
  cursor: pointer;
  transition: all 0.15s ease-out;
  border-radius: 3px;
  padding: 0 2px;
}
.karaoke-word:hover { background: rgba(217,79,61,0.12); }
.karaoke-active {
  color: var(--accent-red) !important;
}
.clickable-word { cursor: pointer; transition: all 0.15s ease-out; border-radius: 2px; }
.clickable-word:hover { background: rgba(192,134,82,0.18); color: var(--accent-red-dk); }

/* Tooltip */
.tooltip {
  position: absolute;
  z-index: 2000;
  min-width: 220px;
  max-width: 320px;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 3px solid var(--frame-wood);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 2px var(--frame-wood-lt), 0 8px 22px rgba(58,36,21,0.25);
  animation: tooltipIn 0.2s ease-out;
}
@keyframes tooltipIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.tooltip-word {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 0.3rem;
}
.tooltip-translation {
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  line-height: 1.4;
  font-weight: 600;
}
.tooltip-actions { display: flex; gap: 0.5rem; }
.tooltip-btn {
  flex: 1;
  padding: 0.45rem 0.6rem;
  border-radius: 100px;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Fredoka', sans-serif;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tooltip-btn.learned {
  background: var(--accent-green);
  color: #fff;
  box-shadow: 0 3px 0 #2e7d32;
}
.tooltip-btn.learned:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #2e7d32; }
.tooltip-btn.tolearn {
  background: var(--accent-yellow);
  color: #6a4f00;
  box-shadow: 0 3px 0 #b8870e;
}
.tooltip-btn.tolearn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #b8870e; }
.tooltip-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--frame-wood-lt);
  background: var(--bg-card);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tooltip-close:hover { background: var(--accent-red); color: #fff; border-color: var(--accent-red-dk); }

/* Word highlights from mobile sync */
.word-learned {
  color: var(--accent-green) !important;
  text-decoration: underline wavy;
  text-decoration-color: rgba(76,175,80,0.55);
  text-underline-offset: 3px;
}
.word-tolearn {
  color: #b8870e !important;
  text-decoration: underline wavy;
  text-decoration-color: rgba(243,197,16,0.6);
  text-underline-offset: 3px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(58,36,21,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.lightbox.active { display: flex; animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: var(--radius);
  border: 4px solid var(--frame-wood-lt);
  box-shadow: 0 18px 48px rgba(0,0,0,0.55);
  animation: scaleIn 0.25s ease-out;
}
@keyframes scaleIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Completion toast */
.completion-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.4rem;
  background: var(--bg-card);
  border: 3px solid var(--accent-green);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(58,36,21,0.3), 0 4px 0 #2e7d32;
  z-index: 3000;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
}
.completion-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-icon { font-size: 2.1rem; animation: bounce 0.6s ease-out 0.3s; }
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}
.toast-content { display: flex; flex-direction: column; gap: 0.1rem; }
.toast-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-green);
}
.toast-msg { font-size: 0.88rem; color: var(--ink-soft); font-weight: 600; }

/* Crow flying overlay (decorative) */
.crow-fly-overlay {
  position: fixed;
  top: 18%;
  left: -120px;
  width: 90px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  animation: crowFlyBy 18s linear infinite;
}
.crow-fly-overlay img { width: 100%; }
@keyframes crowFlyBy {
  0%   { left: -120px;  opacity: 0; transform: translateY(0); }
  10%  { opacity: 1; }
  50%  { transform: translateY(-30px); }
  90%  { opacity: 1; }
  100% { left: calc(100% + 120px); opacity: 0; transform: translateY(0); }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-text { text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-scene { min-height: 260px; }
}
@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(251,240,214,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
  }
  .navbar-links.open { display: flex; }
  .navbar-links a { font-size: 1.2rem; padding: 0.7rem 1.4rem; }
  .hamburger { display: flex; }
  .hero { padding: 5rem 1.2rem 3rem; }
  .section { padding: 3.5rem 1.2rem; }
  .legal-content { padding: 1.8rem 1.3rem; }
  .auth-section { padding: 2rem 1.4rem; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; }
  .story-grid { grid-template-columns: 1fr; gap: 1rem; }
  .reader-content { padding: 0 1rem; }
  .reader-body { padding: 1.5rem 1.2rem; }
  .story-image { max-width: 45%; }
  .story-image-right { margin-left: 1rem; }
  .story-image-left  { margin-right: 1rem; }
  .audio-controls { padding: 0.55rem 0.8rem; gap: 0.5rem; }
  .audio-btn { width: 40px; height: 40px; }
  .tooltip { max-width: calc(100vw - 2rem); }
  .reader-header .crow-mini { width: 56px; top: -32px; right: 12px; }
}
@media (max-width: 480px) {
  .sync-stat-row { grid-template-columns: repeat(2, 1fr); }
  .sync-stat-value { font-size: 1.3rem; }
  .story-image { max-width: 100%; float: none !important; margin: 1rem 0 !important; }
  .reader-body { font-size: 1rem; }
  .completion-toast {
    left: 1rem; right: 1rem;
    transform: translateX(0) translateY(120px);
    bottom: 1rem;
  }
  .completion-toast.show { transform: translateX(0) translateY(0); }
}

/* ================= QUICK START & ACCOUNT LINKING ================= */
.auth-form-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}
.auth-input-group {
  display: flex;
  flex-direction: column;
}
.auth-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: #fffdf5;
  border: 3px solid var(--frame-wood-lt);
  border-radius: 15px;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-input::placeholder {
  color: var(--ink-muted);
  opacity: 0.75;
}
.auth-input:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 4px rgba(255, 140, 66, 0.15);
}
.auth-error-message {
  padding: 0.75rem 1rem;
  background: rgba(217, 79, 61, 0.08);
  border: 2px solid rgba(217, 79, 61, 0.25);
  border-radius: 12px;
  font-size: 0.88rem;
  color: var(--accent-red-dk);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.2rem 0;
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--frame-wood-lt), transparent);
}

/* ===== Link Account Banner (Anonim kullanıcı uyarısı) ===== */
.link-account-banner {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
  border: 2px solid var(--accent-orange);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.15);
  animation: bannerPulse 3s ease-in-out infinite;
}
.link-account-banner .banner-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.link-account-banner .banner-content {
  flex: 1;
}
.link-account-banner .banner-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.link-account-banner .banner-desc {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 600;
  line-height: 1.35;
}
.link-account-banner .btn-link-banner {
  flex-shrink: 0;
  border: none;
  background: var(--accent-orange);
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 100px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 3px 0 #cc6a20;
  transition: var(--transition);
}
.link-account-banner .btn-link-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #cc6a20;
}
@keyframes bannerPulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(255, 140, 66, 0.15); }
  50% { box-shadow: 0 4px 20px rgba(255, 140, 66, 0.3); }
}

/* ===== Link Account Modal ===== */
.link-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(58, 36, 21, 0.55);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.link-modal-overlay.active {
  opacity: 1;
}
.link-modal {
  background: linear-gradient(180deg, #fffdf5 0%, var(--bg-card) 100%);
  border: 4px solid var(--frame-wood);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-frame);
  padding: 2rem 1.8rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.link-modal-overlay.active .link-modal {
  transform: translateY(0) scale(1);
}
.link-modal h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.link-modal .link-modal-sub {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}
.link-modal .link-section-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.6rem;
  text-align: left;
}
.link-modal .btn-cancel-link {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.6rem 1.5rem;
  margin-top: 0.8rem;
  transition: var(--transition);
}
.link-modal .btn-cancel-link:hover {
  color: var(--ink);
}

/* ===== Link Success Toast ===== */
.link-success-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
  color: #fff;
  padding: 1rem 1.8rem;
  border-radius: 100px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(46, 125, 50, 0.3);
  z-index: 3000;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
.link-success-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Compact banner for stories page */
.link-account-banner-compact {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
  border: 2px solid var(--accent-orange);
  border-radius: 14px;
  padding: 0.75rem 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  box-shadow: 0 3px 8px rgba(255, 140, 66, 0.12);
}
.link-account-banner-compact .btn-link-banner {
  flex-shrink: 0;
  border: none;
  background: var(--accent-orange);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 100px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow: 0 2px 0 #cc6a20;
  transition: var(--transition);
}
.link-account-banner-compact .btn-link-banner:hover {
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .link-account-banner {
    flex-direction: column;
    text-align: center;
    gap: 0.7rem;
  }
  .link-account-banner-compact {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  .link-success-toast {
    left: 1rem; right: 1rem;
    transform: translateX(0) translateY(120px);
    text-align: center;
    white-space: normal;
  }
  .link-success-toast.show {
    transform: translateX(0) translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════════════
   STORY SCENE — Unity'deki hikaye seçim ekranı tarzı sahne
   ═══════════════════════════════════════════════════════════════ */

:root {
  --wood-dark:   #4a2e15;
  --wood-mid:    #7a4a22;
  --wood-light:  #b07a3a;
  --wood-shine:  #d9a55b;
  --parchment:   #f6e3b8;
  --parchment-2: #ead49a;
  --sky-top:     #4a9fd6;
  --sky-mid:     #87c4e6;
  --sky-bot:     #c5e3f4;
}

.story-scene {
  position: relative;
  width: 100%;
  min-height: 80vh;
  padding: 2rem 1rem 4rem;
  background: linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-mid) 45%, var(--sky-bot) 100%);
  border-radius: 24px;
  overflow: hidden;
  margin-top: 1rem;
}

/* Dekoratif bulutlar */
.sky-decor-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}
.sky-decor-cloud-1 { width: 140px; height: 50px; top: 8%;  left: 6%;  animation: cloud-drift 60s linear infinite; }
.sky-decor-cloud-2 { width: 200px; height: 70px; top: 18%; right: 8%; animation: cloud-drift 90s linear infinite reverse; }
.sky-decor-cloud-3 { width: 110px; height: 40px; top: 50%; left: 60%; animation: cloud-drift 75s linear infinite; opacity: 0.5; }

@keyframes cloud-drift {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(40px); }
  100% { transform: translateX(0); }
}

/* Karga maskotu (sahne üstünde uçar gibi) */
.sky-crow-mascot {
  position: absolute;
  top: 1rem;
  right: 2rem;
  width: 90px;
  height: auto;
  filter: drop-shadow(0 6px 8px rgba(58, 36, 21, 0.3));
  animation: crow-fly 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes crow-fly {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}

/* Adacık (story island) grid */
.story-islands {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem 1.5rem;
  max-width: 1100px;
  margin: 4rem auto 0;
}

.islands-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: rgba(58, 36, 21, 0.6);
}
.islands-loading .spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(58, 36, 21, 0.2);
  border-top-color: var(--wood-mid);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Tek bir adacık (siluet kaya tarzı, üstünde 1.png) */
.story-island {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.story-island:hover {
  transform: translateY(-6px);
  filter: brightness(1.05);
}
.story-island:active { transform: translateY(-2px); }
.story-island:focus-visible {
  outline: 3px solid var(--wood-shine);
  outline-offset: 4px;
  border-radius: 16px;
}

/* Resim alanı — beyaz dikdörtgen pano, alt ucu kaya gibi koyu siluet */
.story-island-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 4px 0 rgba(58, 36, 21, 0.25),
    0 14px 22px rgba(58, 36, 21, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-island-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.story-island-placeholder {
  font-size: 2.4rem;
  opacity: 0.4;
}

/* Adacık altında küçük "kaya" siluet — Unity'deki gibi */
.story-island::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  width: 80%;
  height: 28px;
  background: rgba(40, 22, 8, 0.85);
  border-radius: 50% 50% 35% 35% / 100% 100% 60% 60%;
  filter: blur(0.5px);
  z-index: -1;
}

/* Alt bilgi şeridi */
.story-island-info {
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.story-island-level {
  display: inline-block;
  padding: 0.18rem 0.7rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.story-island-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  line-height: 1.2;
  max-width: 200px;
}

/* Tamamlandı tik işareti */
.story-island-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px; height: 28px;
  background: #3aa54b;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 2;
}
.story-island.completed .story-island-image { box-shadow: 0 4px 0 #3aa54b, 0 14px 22px rgba(58, 36, 21, 0.25); }

/* Kilitli ada (Unity sıralı kilit) */
.story-island.locked { cursor: not-allowed; }
.story-island.locked .story-island-image { filter: grayscale(0.85) brightness(0.78); }
.story-island.locked .story-island-info { opacity: 0.6; }
.story-island.locked:hover { transform: none; }
.story-island-lock {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  z-index: 3;
  pointer-events: none;
}

/* Kısa uyarı balonu (kilitli hikaye vb.) */
.mini-toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: #fff7e2;
  padding: 0.75rem 1.2rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 8px 22px rgba(58, 36, 21, 0.35);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s;
  z-index: 4000;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.mini-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   WOOD MODAL — Ahşap çerçeveli hikaye detay kartı
   ═══════════════════════════════════════════════════════════════ */
.wood-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 4, 0.45);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  overflow-y: auto;
}
.wood-modal-overlay.active {
  display: flex;
  animation: wood-fade-in 0.2s ease;
}
@keyframes wood-fade-in { from { opacity: 0; } to { opacity: 1; } }

.wood-modal {
  position: relative;
  width: 100%;
  max-width: 450px;
  background: var(--bg-card);
  border: 4px solid var(--frame-wood);
  border-image: none;
  border-radius: var(--radius-lg);
  box-shadow:
    0 10px 0 var(--frame-wood-dk),
    0 20px 40px rgba(58, 36, 21, 0.18);
  padding: 2.4rem 1.8rem 1.6rem;
  animation: wood-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
@keyframes wood-pop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* Üst başlık alanı */
.wood-modal-titlebar {
  position: static;
  transform: none;
  background: none;
  box-shadow: none;
  color: var(--ink);
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  padding: 0;
  max-width: 100%;
  white-space: normal;
  overflow: visible;
  text-align: center;
}

/* Kapat butonu */
.wood-modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 32px; height: 32px;
  background: rgba(192, 134, 82, 0.1);
  color: var(--ink-soft);
  border: none;
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  z-index: 2;
  transition: background var(--transition), transform 0.15s;
}
.wood-modal-close:hover {
  background: rgba(192, 134, 82, 0.2);
  transform: scale(1.1);
  color: var(--ink);
}

/* Seviye rozet — modern hap tasarım */
.wood-modal-level {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.2rem auto 1rem;
  padding: 0.35rem 1.1rem;
  background: var(--wood-mid);
  color: #fff;
  border-radius: 100px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}
.wood-level-stars {
  margin-left: 0.4rem;
  letter-spacing: 1px;
}

/* Ana görsel */
.wood-modal-image {
  position: relative;
  width: 62%;
  margin: 0 auto 1.1rem;
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 4px solid var(--frame-wood-lt);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.wood-modal-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.wood-modal-image-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  opacity: 0.4;
}

/* Etiketler (chip'ler) */
.wood-modal-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.4rem 0 1rem;
}
.wood-tag {
  background: rgba(192, 134, 82, 0.08);
  color: var(--ink-soft);
  border: 1.5px solid var(--frame-wood-lt);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: none;
  text-transform: capitalize;
}

/* İstatistikler paneli */
.wood-modal-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 0.8rem;
  margin: 0.8rem 0 1rem;
  padding: 1rem 0.8rem;
  background: rgba(192, 134, 82, 0.05);
  border: 2px solid var(--frame-wood-lt);
  border-radius: var(--radius);
  width: 100%;
}
.wood-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  padding: 0.55rem;
  border-radius: 12px;
  border: 1.5px solid rgba(192, 134, 82, 0.1);
}
.wood-stat-wide {
  grid-column: 1 / -1;
  background: rgba(251, 240, 214, 0.7);
}
.wood-stat-num {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}
.wood-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

/* Okunma durumu */
.wood-modal-status {
  margin: 0.4rem 0 0.8rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.wood-modal-status.wood-status-done {
  color: var(--accent-green);
  font-weight: 700;
}

/* "Oku" butonu — Web uyumlu 3D buton */
.wood-modal-read-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.6rem auto 0;
  padding: 0.85rem 3rem;
  background: var(--accent-red);
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 100px;
  border: none;
  box-shadow:
    0 5px 0 var(--accent-red-dk),
    0 8px 18px rgba(217, 79, 61, 0.25);
  letter-spacing: 0.5px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  width: auto;
  min-width: 170px;
}
.wood-modal-read-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 7px 0 var(--accent-red-dk),
    0 12px 22px rgba(217, 79, 61, 0.32);
  color: #fff;
}
.wood-modal-read-btn:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 var(--accent-red-dk),
    0 4px 10px rgba(217, 79, 61, 0.2);
}

/* Mobil ayar */
@media (max-width: 600px) {
  .story-islands {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.6rem 1rem;
    margin-top: 3rem;
  }
  .sky-crow-mascot { width: 60px; top: 0.5rem; right: 0.8rem; }
  .story-island-title { font-size: 0.85rem; }
  .wood-modal {
    padding: 2.2rem 1.2rem 1.4rem;
    border-width: 4px;
    max-width: 92%;
  }
  .wood-modal-titlebar {
    font-size: 1.35rem;
  }
  .wood-modal-image { width: 60%; }
  .wood-modal-stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 0.8rem;
  }
}

/* ======================================================================
   SOL MENÜ (SIDE NAV) — Kelimelik / Egzersizler / Hikayeler
   Unity alt panel ikonlarıyla. Masaüstü: sol ray. Mobil: alt bar.
   ====================================================================== */
:root { --side-nav-w: 212px; }

.side-nav {
  position: fixed;
  top: 0; left: 0; bottom: 0;               /* sayfa kenarından flush */
  width: var(--side-nav-w);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.2rem 0.7rem 1rem;
  background: linear-gradient(180deg, var(--bg-parchment) 0%, var(--bg-parchment-2) 100%);
  border: none;
  border-right: 3px solid var(--frame-wood); /* sadece sağ kenar çerçevesi */
  border-radius: 0 22px 22px 0;              /* sadece sağ köşeler yuvarlak */
  box-shadow: 4px 0 20px rgba(58,36,21,0.12);
}

/* Marka — sidebar üstü: logo + "Fabulery" (eski navbar-logo gibi, hover'da yeşil) */
.side-nav-brand {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.5rem 1rem;
  font-size: 1.45rem; font-weight: 900; color: var(--ink);
  letter-spacing: -0.5px; transition: var(--transition);
}
.side-nav-brand img { width: 40px; height: 40px; filter: drop-shadow(0 3px 5px rgba(58,36,21,0.25)); }
.side-nav-brand .accent { color: var(--accent-red); }
.side-nav-brand:hover { color: #2c8a3c; }              /* hover → yeşil */
.side-nav-brand:hover .accent { color: var(--accent-red); }

.side-nav-items { display: flex; flex-direction: column; gap: 0.35rem; width: 100%; }

.side-nav-item {
  position: relative;
  display: flex; flex-direction: row; align-items: center; gap: 0.7rem;
  width: 100%; padding: 0.6rem 0.7rem;
  border: none; background: transparent; cursor: pointer;
  border-radius: 14px;
  color: var(--ink-soft);
  font-weight: 800; font-size: 0.98rem; font-family: inherit; text-align: left;
  transition: var(--transition);
}
.side-nav-item:hover { background: rgba(192,134,82,0.16); color: var(--ink); }
.side-nav-item.active { background: var(--bg-card); box-shadow: var(--shadow-soft); color: var(--ink); }
.side-nav-item.active::before {
  content: ''; position: absolute; left: -0.7rem; top: 50%; transform: translateY(-50%);
  width: 4px; height: 60%; border-radius: 4px; background: var(--accent-red);
}
.side-nav-icon { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.side-nav-icon img { width: 40px; height: 40px; filter: drop-shadow(0 3px 4px rgba(58,36,21,0.25)); }
.side-nav-item[data-soon] .side-nav-icon img { opacity: 0.82; filter: grayscale(0.35) drop-shadow(0 3px 4px rgba(58,36,21,0.18)); }
.side-nav-label { flex: 1; }
.side-nav-badge {
  position: absolute; top: 4px; right: 8px;
  background: var(--accent-orange); color: #fff;
  font-size: 0.55rem; font-weight: 900; padding: 1px 6px; border-radius: 7px;
  letter-spacing: 0.3px; box-shadow: 0 2px 4px rgba(58,36,21,0.25);
}

/* İçerik kaymaları — fixed sidebar/navbar viewport'a göre konumlanır, body padding'inden etkilenmez */
body.has-side-nav { padding-left: calc(var(--side-nav-w) + 16px); }
/* Navbar'lı sayfalarda: navbar sidebar'dan sonra başlar; markası sidebar'da olduğu için kendi logosu gizlenir */
body.has-side-nav .navbar { left: calc(var(--side-nav-w) + 16px); }
@media (min-width: 769px) {
  body.has-side-nav .navbar-logo { display: none; }
}

/* Anasayfa (üst navbar yok) — hero üst boşluğu azalt */
body.no-topbar .hero { padding-top: 2.5rem; }

/* "Yakında" bildirimi (coming-soon toast) */
.coming-soon-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 120%);
  background: var(--bg-card); color: var(--ink);
  border: 2px solid var(--frame-wood); border-radius: 16px;
  padding: 0.85rem 1.3rem; font-weight: 800; font-size: 0.95rem;
  box-shadow: var(--shadow-soft); z-index: 3000;
  display: flex; align-items: center; gap: 0.6rem; max-width: 90vw;
  opacity: 0; transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s;
}
.coming-soon-toast.show { transform: translate(-50%, 0); opacity: 1; }
.coming-soon-toast .cs-icon { width: 32px; height: 32px; flex-shrink: 0; }

@media (max-width: 768px) {
  .side-nav {
    top: auto; bottom: 0; left: 0; right: 0;
    width: auto; height: 66px;
    flex-direction: row; justify-content: space-around; align-items: center;
    gap: 0.2rem; padding: 0.3rem 0.4rem;
    border-right: none; border-top: 3px solid var(--frame-wood);
    box-shadow: 0 -4px 18px rgba(58,36,21,0.14);
  }
  .side-nav-brand { display: none; }
  .side-nav-items { flex-direction: row; justify-content: space-around; gap: 0.2rem; }
  .side-nav-item { flex-direction: column; width: auto; flex: 1; max-width: 96px; padding: 0.25rem; font-size: 0.6rem; gap: 0.1rem; text-align: center; }
  .side-nav-item.active::before { display: none; }
  .side-nav-icon, .side-nav-icon img { width: 32px; height: 32px; }
  .side-nav-label { flex: none; }
  .side-nav-badge { top: -2px; right: 50%; transform: translateX(60%); }

  body.has-side-nav { padding-left: 0; padding-bottom: 70px; }
  body.has-side-nav .navbar { left: 0; }
}

/* =====================================================================
   v9 — Unity-ayna bileşenleri (StoryMetadata rozetleri, zengin tooltip)
   ===================================================================== */

/* Hikaye kartı: zorluk yıldızları (HikayeSecimPaneli ★★☆☆☆) */
.story-island-stars {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: #e8a13d;
  text-shadow: 0 1px 0 rgba(58, 36, 21, 0.25);
  margin-left: 0.35rem;
  vertical-align: middle;
}
.story-island-level {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Ahşap modal: seviye satırındaki yıldızlar */
.wood-level-stars {
  margin-left: 0.5rem;
  font-size: 0.85em;
  letter-spacing: 1.5px;
  opacity: 0.95;
}

/* Okuma başlığı meta satırı */
.reader-meta .reader-stars {
  color: #e8a13d;
  letter-spacing: 1.5px;
  font-size: 0.95rem;
}

/* Zengin tooltip: kök + seviye + telaffuz çipleri */
.tooltip-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.45rem 0 0.2rem;
  align-items: center;
}
.tt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  border: none;
  background: rgba(58, 36, 21, 0.08);
  color: inherit;
}
.tt-level {
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.tt-kok {
  background: rgba(106, 168, 79, 0.16);
}
.tt-sound {
  cursor: pointer;
  background: rgba(92, 171, 237, 0.18);
  font-size: 0.95rem;
  transition: transform 0.12s ease, background 0.12s ease;
}
.tt-sound:hover {
  background: rgba(92, 171, 237, 0.35);
  transform: scale(1.12);
}

/* Hikaye görseli: <gorsel=...|sag|350> genişlik desteği */
.story-image[style*="max-width"] img {
  width: 100%;
}

/* ======================================================================
   COLLAPSIBLE SIDE MENÜ (COLLAPSIBLE SIDE NAV)
   ====================================================================== */

/* Transitions for page layouts */
body.has-side-nav {
  transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.has-side-nav .navbar {
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.side-nav {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed layout states */
body.collapsed-side-nav {
  padding-left: 24px;
}
body.collapsed-side-nav .navbar {
  left: 24px;
}
body.collapsed-side-nav .side-nav {
  transform: translateX(calc(-1 * var(--side-nav-w) - 20px));
}

@media (min-width: 769px) {
  body.collapsed-side-nav .navbar-logo {
    display: flex !important;
    animation: sideNavLogoFadeIn 0.3s ease;
  }
}

@keyframes sideNavLogoFadeIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Side nav tab-toggle button */
.side-nav-toggle {
  position: absolute;
  top: 50%;
  right: -24px;
  transform: translateY(-50%);
  width: 24px;
  height: 56px;
  background: linear-gradient(180deg, var(--bg-parchment) 0%, var(--bg-parchment-2) 100%);
  border: 3px solid var(--frame-wood);
  border-left: none;
  border-radius: 0 12px 12px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 8px rgba(58,36,21,0.18);
  transition: background 0.2s ease, width 0.15s ease, right 0.15s ease;
  z-index: 1099;
  padding: 0;
}
.side-nav-toggle:hover {
  background: var(--bg-card);
  width: 26px;
  right: -26px;
}
.side-nav-toggle .toggle-icon {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  user-select: none;
}

@media (max-width: 768px) {
  .side-nav-toggle {
    display: none !important;
  }
}
