/* ==========================================================================
   독도 골든벨 마스터 - Style System (Vanilla CSS)
   Theme: Deep Ocean Blue & Golden Bell Royal Glow
   ========================================================================== */

:root {
  --bg-dark-1: #071526;
  --bg-dark-2: #0e294b;
  --bg-dark-3: #163d6b;
  --card-bg: rgba(16, 38, 70, 0.75);
  --card-border: rgba(94, 187, 255, 0.22);
  --card-hover-border: rgba(0, 210, 255, 0.55);
  --text-main: #f0f6fc;
  --text-sub: #a5c2e3;
  --text-muted: #6b8fb6;

  --primary: #00d2ff;
  --primary-glow: rgba(0, 210, 255, 0.35);
  --gold: #ffc837;
  --gold-glow: rgba(255, 200, 55, 0.4);
  --coral: #ff5277;
  --emerald: #10b981;
  --purple: #9d4edd;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark-1);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Ambient Ocean Background & Animated Waves */
.ocean-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 10%, #153c69 0%, #08172c 60%, #030a14 100%);
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 220px;
  background: radial-gradient(ellipse at center, rgba(0, 150, 255, 0.08) 0%, rgba(0, 80, 160, 0) 70%);
  border-radius: 45%;
  animation: waveMotion 18s infinite linear;
}

.wave2 {
  bottom: -40px;
  opacity: 0.6;
  animation: waveMotion 26s infinite linear reverse;
}

@keyframes waveMotion {
  0% { transform: translateX(0) rotate(0deg); }
  100% { transform: translateX(-50%) rotate(360deg); }
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 21, 38, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 2rem;
  animation: gentleBounce 2.5s infinite ease-in-out;
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.05); }
}

.sub-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(0, 210, 255, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.1rem;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 900;
  font-family: 'Jua', 'Pretendard', sans-serif;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-sub);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-btn.active {
  color: #fff;
  background: rgba(0, 210, 255, 0.16);
  border-color: rgba(0, 210, 255, 0.45);
  box-shadow: 0 0 16px var(--primary-glow);
}

.nav-btn.gold-highlight {
  color: #fff;
  border-color: rgba(255, 200, 55, 0.35);
  background: rgba(255, 200, 55, 0.12);
}

.nav-btn.gold-highlight.active {
  background: linear-gradient(135deg, rgba(255, 200, 55, 0.25), rgba(255, 120, 0, 0.25));
  border-color: var(--gold);
  box-shadow: 0 0 18px var(--gold-glow);
}

.counter-badge {
  background: var(--primary);
  color: #031224;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.sound-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}

.sound-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.06);
}

.user-rank-badge {
  background: linear-gradient(135deg, #1d4370, #29609c);
  border: 1px solid rgba(0, 210, 255, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: #c9e6ff;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Content Wrapper & Pane Layout
   ========================================================================== */
.content-wrapper {
  max-width: 1340px;
  margin: 1.8rem auto 4rem;
  padding: 0 1.5rem;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.35s ease-out forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Common Pane Header */
.pane-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1.2rem;
}

.section-tag {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.3rem;
}

.section-title {
  font-size: 1.95rem;
  font-weight: 800;
  font-family: 'Jua', 'Pretendard', sans-serif;
  color: #fff;
  letter-spacing: -0.5px;
}

.section-desc {
  color: var(--text-sub);
  font-size: 0.98rem;
  margin-top: 0.25rem;
}

.quick-stats-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  color: var(--text-sub);
}

.stat-pill .num {
  color: #fff;
  font-weight: 800;
}

.stat-pill.highlight {
  border-color: var(--gold);
  background: rgba(255, 200, 55, 0.1);
}

.stat-pill.highlight .num {
  color: var(--gold);
}

/* Buttons */
.btn-primary, .btn-secondary {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-primary {
  background: linear-gradient(135deg, #00b4db, #0083b0);
  border: none;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 180, 219, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #00d2ff, #0099cc);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   TAB 1: 교재 요약 학습 (Study View)
   ========================================================================== */
.unit-section {
  margin-bottom: 3.5rem;
}

.unit-banner {
  padding: 1.8rem 2.2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.unit-banner.unit-1 {
  background: linear-gradient(135deg, rgba(16, 56, 102, 0.9) 0%, rgba(13, 85, 142, 0.8) 100%);
  border: 1px solid rgba(0, 210, 255, 0.4);
}

.unit-banner.unit-2 {
  background: linear-gradient(135deg, rgba(38, 25, 74, 0.9) 0%, rgba(68, 38, 120, 0.8) 100%);
  border: 1px solid rgba(157, 78, 221, 0.4);
}

.unit-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.unit-num {
  background: var(--gold);
  color: #111;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

.page-info {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}

.unit-title {
  font-size: 1.65rem;
  font-family: 'Jua', 'Pretendard', sans-serif;
  color: #fff;
  margin-bottom: 0.4rem;
}

.unit-summary {
  color: #d1e5ff;
  font-size: 0.96rem;
  max-width: 900px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.4rem;
}

.topic-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.topic-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow-md);
}

.topic-head {
  margin-bottom: 1rem;
}

.topic-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(0, 210, 255, 0.12);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.35rem;
}

.topic-head h4 {
  font-size: 1.15rem;
  color: #fff;
  font-weight: 700;
}

.key-points {
  list-style: none;
  margin-bottom: 1.2rem;
}

.key-points li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  color: #d8e6f7;
  line-height: 1.5;
}

.key-points li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 1.2rem;
  line-height: 1;
}

.key-points strong {
  color: #fff;
}

.topic-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.8rem;
  display: flex;
  justify-content: flex-end;
}

.jump-quiz-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.jump-quiz-btn:hover {
  color: #fff;
  transform: translateX(4px);
}

/* ==========================================================================
   TAB 2: 200제 문제 은행 (Quiz Bank)
   ========================================================================== */
.bank-controls-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.filter-count-label {
  font-size: 0.9rem;
  color: var(--text-sub);
}

.bank-toolbar {
  background: rgba(14, 35, 62, 0.7);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.search-box {
  position: relative;
  margin-bottom: 1.2rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.search-box input {
  width: 100%;
  background: rgba(5, 16, 31, 0.8);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  padding: 0.75rem 2.8rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.clear-search-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  display: none;
}

.filter-group-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.filter-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 50px;
}

.pill-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pill-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-sub);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.pill-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #031224;
  font-weight: 800;
}

/* Question Card in Stream */
.quiz-stream-container {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.stream-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.stream-card:hover {
  border-color: var(--card-hover-border);
}

.card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.meta-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qid-tag {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--gold);
}

.qcat-tag {
  background: rgba(0, 210, 255, 0.12);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.qtype-tag {
  background: rgba(255, 255, 255, 0.08);
  color: #e1ecf7;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.qdiff-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.qdiff-tag.diff-하 { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.qdiff-tag.diff-중 { background: rgba(255, 200, 55, 0.15); color: #ffc837; }
.qdiff-tag.diff-상 { background: rgba(255, 82, 119, 0.15); color: #ff5277; }

.bookmark-star-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.bookmark-star-btn:hover, .bookmark-star-btn.bookmarked {
  color: var(--gold);
  transform: scale(1.15);
}

.card-question-text {
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

/* Stream Answer Options */
.options-interactive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.opt-btn {
  background: rgba(7, 22, 42, 0.85);
  border: 1px solid var(--card-border);
  color: #d0e4f7;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.opt-btn:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--primary);
}

.opt-btn.correct {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: var(--emerald) !important;
  color: #5efc82 !important;
  font-weight: 800;
}

.opt-btn.wrong {
  background: rgba(255, 82, 119, 0.25) !important;
  border-color: var(--coral) !important;
  color: #ffa3b5 !important;
}

/* OX big buttons */
.ox-buttons-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ox-btn {
  flex: 1;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  font-size: 1.4rem;
  font-weight: 900;
  font-family: 'Jua', sans-serif;
  cursor: pointer;
  border: 2px solid var(--card-border);
  background: rgba(5, 18, 36, 0.8);
  color: #fff;
  transition: var(--transition);
}

.ox-btn.o-btn:hover { border-color: #00d2ff; background: rgba(0, 210, 255, 0.15); }
.ox-btn.x-btn:hover { border-color: #ff5277; background: rgba(255, 82, 119, 0.15); }

/* Initial / Short Input Box */
.input-answer-box {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.input-answer-box input {
  flex: 1;
  background: rgba(5, 18, 36, 0.9);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.98rem;
  outline: none;
}

.input-answer-box input:focus {
  border-color: var(--primary);
}

.btn-check-answer {
  background: var(--primary);
  border: none;
  color: #031224;
  font-weight: 800;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-check-answer:hover {
  background: #5efcff;
}

/* Card Explanation Box */
.card-explanation-box {
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid var(--primary);
  padding: 0.9rem 1.1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: #c9e1fc;
  display: none;
}

.card-explanation-box.show {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

.card-explanation-box .answer-text {
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.card-explanation-box .ref-text {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.4rem;
}

.pagination-wrapper {
  margin-top: 2rem;
  text-align: center;
}

.btn-load-more {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 2.2rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.btn-load-more:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--primary);
}

/* ==========================================================================
   TAB 3: 실전 모의 골든벨 (Mock Golden Bell Mode)
   ========================================================================== */
.goldenbell-wrapper {
  max-width: 780px;
  margin: 1rem auto;
}

.gb-intro-card {
  background: linear-gradient(135deg, rgba(13, 36, 68, 0.9) 0%, rgba(9, 21, 41, 0.95) 100%);
  border: 2px solid rgba(255, 200, 55, 0.35);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 200, 55, 0.15);
}

.gb-crown {
  font-size: 3.2rem;
  margin-bottom: 0.5rem;
  animation: crownFloat 2s infinite ease-in-out;
}

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

.gb-title {
  font-size: 2.3rem;
  font-weight: 900;
  font-family: 'Jua', 'Pretendard', sans-serif;
  color: var(--gold);
  letter-spacing: -0.5px;
  margin-bottom: 0.3rem;
}

.gb-subtitle {
  color: #d1e5ff;
  font-size: 1.05rem;
  margin-bottom: 1.8rem;
}

.gb-rules-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.6rem;
  text-align: left;
  margin-bottom: 2rem;
}

.gb-rules-box h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.gb-rules-box ul {
  list-style: none;
}

.gb-rules-box li {
  font-size: 0.9rem;
  color: #d1e5ff;
  margin-bottom: 0.45rem;
}

.gb-setup-controls {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  text-align: left;
}

.setup-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #a5c2e3;
  margin-bottom: 0.5rem;
}

.option-chips {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: #d1e5ff;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.chip-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #111;
  font-weight: 800;
}

.player-name-input {
  width: 100%;
  background: rgba(5, 18, 36, 0.9);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: #fff;
  font-size: 1rem;
  outline: none;
}

.player-name-input:focus {
  border-color: var(--gold);
}

.btn-start-goldenbell {
  margin-top: 1rem;
  background: linear-gradient(135deg, #ffc837 0%, #ff8008 100%);
  border: none;
  color: #111;
  font-size: 1.25rem;
  font-weight: 900;
  font-family: 'Jua', sans-serif;
  padding: 1.1rem 2rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 128, 8, 0.45);
  transition: var(--transition);
}

.btn-start-goldenbell:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 28px rgba(255, 128, 8, 0.6);
}

/* ==========================================================================
   Active Golden Bell Game Arena
   ========================================================================== */
.goldenbell-arena {
  max-width: 920px;
  margin: 0 auto;
}

.arena-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 35, 62, 0.85);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 0.9rem 1.4rem;
}

.round-badge {
  background: var(--gold);
  color: #111;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-right: 0.6rem;
}

.step-counter {
  font-size: 0.95rem;
  color: #fff;
}

.hearts-block {
  display: flex;
  gap: 0.3rem;
  font-size: 1.4rem;
}

.timer-block {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

.timer-seconds {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  min-width: 25px;
}

.timer-block.urgent .timer-seconds {
  color: var(--coral);
  animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.2); }
}

.btn-quit-gb {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ff99aa;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
}

.timer-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.timer-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10b981, #00d2ff);
  transition: width 1s linear;
}

.timer-bar-fill.urgent {
  background: linear-gradient(90deg, #ffc837, #ff5277);
}

/* Blackboard */
.blackboard-card {
  background: radial-gradient(circle at center, #1b3d36 0%, #0d211d 100%);
  border: 8px solid #5a3825;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 2.5rem 2rem;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), var(--shadow-lg);
  position: relative;
  margin-bottom: 1.5rem;
}

.board-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}

.category-tag, .type-tag, .diff-tag {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

.category-tag { background: rgba(0, 210, 255, 0.2); color: #8ce9ff; }
.type-tag { background: rgba(255, 255, 255, 0.15); color: #fff; }
.diff-tag { background: rgba(255, 200, 55, 0.2); color: #ffd978; }

.board-question {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.6;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  font-family: 'Pretendard', sans-serif;
  min-height: 80px;
}

.initial-hint-display {
  margin-top: 1.2rem;
  background: rgba(0, 0, 0, 0.35);
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: #a8ffd6;
  font-weight: 700;
  font-size: 1.1rem;
}

.consonant-boxes {
  letter-spacing: 4px;
  color: var(--gold);
  font-size: 1.3rem;
  font-weight: 900;
}

/* Interaction Zone in GB Arena */
.answer-interaction-zone {
  background: rgba(14, 35, 62, 0.8);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

/* Feedback Overlay */
.gb-feedback-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 10, 20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.feedback-card {
  background: linear-gradient(135deg, #102d52, #0d2039);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  max-width: 550px;
  width: 100%;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 30px var(--primary-glow);
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.feedback-card.correct { border-color: var(--emerald); }
.feedback-card.wrong { border-color: var(--coral); }

.feedback-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

.feedback-result {
  font-size: 1.8rem;
  font-weight: 900;
  font-family: 'Jua', sans-serif;
  color: #fff;
  margin-bottom: 0.6rem;
}

.feedback-correct-answer {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.feedback-desc {
  font-size: 0.94rem;
  color: #d1e5ff;
  line-height: 1.55;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  text-align: left;
}

.btn-next-question {
  background: var(--primary);
  border: none;
  color: #031224;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.btn-next-question:hover {
  background: #68fdff;
  transform: translateY(-2px);
}

/* ==========================================================================
   Award Certificate View
   ========================================================================== */
.goldenbell-result-view {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.result-certificate-wrapper {
  background: #fdfaf3;
  color: #222;
  border-radius: var(--radius-md);
  padding: 2.2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  margin-bottom: 2rem;
}

.certificate-border {
  border: 4px double #8a6d3b;
  padding: 2.5rem 2rem;
  position: relative;
  background: radial-gradient(circle at center, #ffffff 60%, #fbf6ec 100%);
}

.cert-stamp {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 75px;
  height: 75px;
  border: 2px dashed #b92b27;
  border-radius: 50%;
  color: #b92b27;
  font-weight: 900;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-15deg);
}

.cert-sub {
  font-size: 0.95rem;
  color: #8a6d3b;
  font-weight: 700;
  letter-spacing: 2px;
}

.cert-title {
  font-size: 2.2rem;
  font-weight: 900;
  font-family: 'Jua', serif;
  color: #2d261e;
  margin: 0.6rem 0 1.6rem;
}

.cert-name-line {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #8a6d3b;
  display: inline-block;
  padding-bottom: 0.3rem;
}

.cert-desc {
  font-size: 1rem;
  line-height: 1.8;
  color: #443c33;
  margin: 0 auto 2rem;
  max-width: 600px;
  text-align: justify;
  text-justify: inter-word;
}

.cert-score-details {
  display: flex;
  justify-content: center;
  gap: 2rem;
  border-top: 1px solid #dcd1bf;
  border-bottom: 1px solid #dcd1bf;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.score-item .label {
  display: block;
  font-size: 0.8rem;
  color: #776e62;
}

.score-item .val {
  font-size: 1.3rem;
  font-weight: 800;
  color: #2d261e;
}

.score-item .val.highlight {
  color: #c44500;
}

.cert-issuer {
  font-size: 1.15rem;
  font-weight: 800;
  color: #3b3228;
  letter-spacing: 1px;
}

.result-action-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   TAB 4: 독도 생생 비주얼 도감 (Dokdo Encyclopedia)
   ========================================================================== */
.island-compare-banner {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 3rem;
}

.island-card-half {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.island-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(0, 210, 255, 0.15);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.island-card-half h3 {
  font-size: 1.6rem;
  color: #fff;
  font-family: 'Jua', sans-serif;
  margin-bottom: 1.2rem;
}

.island-specs .spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.island-specs .spec-row span {
  color: var(--text-sub);
}

.island-specs .spec-row strong {
  color: #fff;
}

.island-vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold);
  font-family: 'Jua', sans-serif;
}

.encyclo-subheading {
  margin: 2.5rem 0 1.2rem;
}

.encyclo-subheading h3 {
  font-size: 1.35rem;
  color: #fff;
  font-family: 'Jua', sans-serif;
}

.rocks-grid, .nature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.3rem;
}

.rock-card, .nature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  transition: var(--transition);
}

.rock-card:hover, .nature-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-border);
}

.rock-emoji, .nature-icon {
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
}

.rock-card h4, .nature-card h4 {
  font-size: 1.15rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.rock-loc {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.rock-desc, .nature-card p {
  font-size: 0.88rem;
  color: #d1e5ff;
  line-height: 1.5;
}

.nature-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .island-compare-banner {
    flex-direction: column;
  }
  .island-vs-divider {
    padding: 0.5rem 0;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }
  .nav-menu {
    justify-content: flex-start;
  }
  .pane-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }

}

/* ==========================================================================
   Photo Additions & Image Styling
   ========================================================================== */
.topic-card.has-img {
  padding-top: 0;
  overflow: hidden;
}

.topic-img-wrapper {
  position: relative;
  width: calc(100% + 2.8rem);
  margin-left: -1.4rem;
  margin-right: -1.4rem;
  height: 140px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.topic-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.topic-card:hover .topic-thumb-img {
  transform: scale(1.06);
}

.topic-img-wrapper .topic-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 2;
  background: rgba(7, 21, 38, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
}

.island-photo-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.island-main-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.island-card-half:hover .island-main-photo {
  transform: scale(1.05);
}

.island-photo-wrap .island-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 2;
  background: rgba(7, 21, 38, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
}

.subheading-desc {
  color: #a8caea;
  font-size: 0.92rem;
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* Topic Card without Image */
.topic-card:not(.has-img) {
  border-top: 3px solid rgba(0, 210, 255, 0.55);
}

.topic-card:not(.has-img) .topic-head {
  margin-top: 0.2rem;
}

/* ==========================================================================
   Curated Authentic Photo Gallery Grid
   ========================================================================== */
.gallery-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.gallery-photo-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  backdrop-filter: blur(10px);
}

.gallery-photo-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(0, 210, 255, 0.25);
}

.gallery-img-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  background: #020814;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-photo-card:hover .gallery-img-wrap img {
  transform: scale(1.06);
}

.gallery-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(7, 21, 38, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.gallery-info {
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.gallery-info h4 {
  font-size: 1.18rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.gallery-info p {
  font-size: 0.88rem;
  color: #c5dcf7;
  line-height: 1.55;
  margin-bottom: 0.9rem;
  flex-grow: 1;
}

.gallery-zoom-hint {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Rock and Nature Cards (Clean, dignified icons) */
.rock-card, .nature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.rock-card:hover, .nature-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow-md);
}

.rock-emoji, .nature-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 0.85rem;
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Photo Lightbox Modal & Card Zoom Indicator Styles
   ========================================================================== */
.photo-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 12, 24, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox-content-card {
  position: relative;
  z-index: 10;
  background: linear-gradient(145deg, #0e2440 0%, #081628 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px var(--primary-glow);
  overflow: hidden;
  animation: lightboxPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--card-border);
  color: #fff;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: var(--transition);
}

.lightbox-close-btn:hover {
  background: var(--coral);
  border-color: var(--coral);
  transform: rotate(90deg);
}

.lightbox-img-wrap {
  width: 100%;
  height: 520px;
  background: #020710;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-caption-box {
  padding: 1.4rem 2rem;
  background: rgba(8, 22, 40, 0.95);
  border-top: 1px solid var(--card-border);
}

.lightbox-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
}

.lightbox-caption-box h3 {
  font-size: 1.45rem;
  font-weight: 800;
  font-family: 'Jua', 'Pretendard', sans-serif;
  color: #fff;
  margin-bottom: 0.4rem;
}

.lightbox-caption-box p {
  font-size: 0.94rem;
  color: #c9e1fc;
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.lightbox-ref {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--gold);
  background: rgba(255, 200, 55, 0.1);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

/* Card hover cursor & zoom badge */
.topic-card.has-img,
.island-card-half,
.gallery-photo-card {
  cursor: pointer;
  position: relative;
}

.topic-img-wrapper::after,
.island-photo-wrap::after,
.gallery-img-wrap::after {
  content: '🔍 사진 크게 보기';
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(7, 21, 38, 0.85);
  backdrop-filter: blur(6px);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--card-border);
  opacity: 0;
  transform: translateY(4px);
  transition: var(--transition);
  pointer-events: none;
}

.topic-card:hover .topic-img-wrapper::after,
.island-card-half:hover .island-photo-wrap::after,
.gallery-photo-card:hover .gallery-img-wrap::after {
  opacity: 1;
  transform: translateY(0);
}

/* Release improvements: focus, compact layouts, learning state and print targets. */
[hidden] { display: none !important; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.skip-link { position:fixed; top:-100px; left:12px; z-index:10000; background:#fff; color:#071526; padding:12px; }
.skip-link:focus { top:12px; }
:focus-visible { outline:3px solid #ffc837; outline-offset:4px; }
button,input,select { font:inherit; }
button:disabled { opacity:.65; cursor:default; }
a { color:#86ddff; text-underline-offset:3px; }
button[aria-pressed="true"] { border-color:var(--gold); }
.storage-notice,.pause-notice { padding:16px; background:#263c50; border:2px solid var(--gold); border-radius:12px; margin-bottom:16px; }
.learning-dashboard { background:#152b44; border:1px solid #52789c; border-radius:16px; padding:24px; margin:0 0 28px; }
.learning-dashboard p { margin:12px 0; }
.learning-dashboard progress { width:100%; accent-color:#ffc837; height:14px; }
.learning-dashboard label,.learning-dashboard small { display:block; color:#c5dcf7; margin:10px 0; }
.learning-actions,.filter-summary { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.filter-summary { justify-content:space-between; margin:20px 0; }
.photo-open-btn { border:1px solid #52789c; background:#142c46; color:#d9edff; padding:10px; margin:12px 0 0; border-radius:8px; cursor:pointer; }
.complete-topic { margin-top:12px; }
.topic-card,.island-card-half,.gallery-photo-card { cursor:default; }
.topic-card { scroll-margin-top:120px; }
.topic-card.has-img .topic-img-wrapper::after { content:none; }
.card-question-text { font-size:1.05rem; }
.card-explanation-box .answer-result { font-weight:800; }
.answer-result.correct { color:#5ae7b4; }
.answer-result.wrong { color:#ff9eb2; }
.retry-question { margin-top:14px; }
.input-answer-box input,
.input-answer-box input { flex:1; width:100%; }
.initial-prompt { color:var(--gold); margin-bottom:10px; }
.empty-state { padding:36px; text-align:center; }
.app-footer { max-width:1280px; margin:32px auto; padding:24px; color:#bed0e5; }
.app-footer p { margin:12px 0; }
.app-footer summary { cursor:pointer; }





.gallery-photo-card img[src*="sejong"],.gallery-photo-card img[src*="decree"],.gallery-photo-card img[src*="dokdo_guards"],.topic-thumb-img[src*="sejong"],.topic-thumb-img[src*="decree"],.topic-thumb-img[src*="dokdo_guards"] { object-fit:contain; background:#f4f0e7; }
.gb-feedback-overlay { overflow-y:auto; padding:20px; }
.feedback-card { max-height:90vh; overflow:auto; }
.result-action-buttons { flex-wrap:wrap; }
:root { --text-muted:#aac5df; }
@media (max-width:768px) {
  .main-header { position:relative; }
  .header-container { display:grid; grid-template-columns:1fr auto; gap:12px; padding:12px 16px; }
  .logo-icon { font-size:1.6rem; }
  .brand-title { font-size:1.1rem; }
  .header-actions { grid-column:2; grid-row:1; }
  .user-rank-badge { display:none; }
  .nav-menu { grid-column:1/-1; display:flex; flex-wrap:wrap; overflow:visible; gap:6px; }
  .nav-btn { flex:1 1 30%; justify-content:center; padding:10px 6px; font-size:.76rem; white-space:normal; }
  .nav-btn .counter-badge,.nav-btn .icon { display:none; }
  .content-wrapper { padding:16px; }
  .pane-header .header-actions { flex-wrap:wrap; }
  .learning-dashboard { padding:16px; }
  .gb-setup-card { padding:20px 16px; }
  .gb-rules-box { padding:16px; }
  .arena-top-bar { flex-wrap:wrap; gap:10px; }
  .input-answer-box { flex-direction:column; }
  .options-interactive-grid { grid-template-columns:1fr; }
  .island-card-half { padding:18px; }
  .island-specs .spec-row { gap:14px; flex-wrap:wrap; }
  .island-specs .spec-row strong { overflow-wrap:anywhere; }
  .gallery-photo-grid,.rocks-grid,.nature-grid { grid-template-columns:1fr; }
  .certificate-border { padding:20px 12px; }
  .cert-score-details { flex-wrap:wrap; }
  .lightbox-content-card { max-height:92vh; overflow:auto; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }


.island-photo-wrap::after,.gallery-photo-card::after,.topic-card.has-img::after { content:none !important; }
@media (max-width:768px) { .header-container { gap:6px; padding:10px 16px; } .nav-btn { min-height:40px; padding:8px 5px; } .gb-setup-controls { padding:0; } }

/* Textbook-only learning surfaces */
.topic-card { padding:24px; }
.topic-card h4 { margin:14px 0 8px; font-size:1.18rem; }
.topic-card ul { padding-left:20px; line-height:1.85; }
.topic-card li { margin:10px 0; }
.topic-source,.mode-help { color:#aac5df; font-size:.9rem; line-height:1.6; margin:8px 0 16px; }
.topic-img-wrap { height:180px; margin:-24px -24px 18px; overflow:hidden; border-radius:16px 16px 0 0; }
.topic-img-wrap img { width:100%; height:100%; object-fit:contain; background:#152b44; }
.study-comparison { margin:32px 0; padding:24px; border-radius:16px; background:#10243d; }
.study-comparison table { border-collapse:collapse; width:100%; margin-top:16px; line-height:1.7; }
.study-comparison th,.study-comparison td { text-align:left; padding:12px; border-bottom:1px solid #365573; overflow-wrap:anywhere; }
.study-comparison th { color:#d5e7fc; }
.study-comparison th[scope="row"] { width:38%; }
@media (max-width:768px) { .nav-btn { flex-basis:45%; } .study-comparison { padding:14px; } .study-comparison th,.study-comparison td { padding:8px; } }
