/* ==========================================================================
   Simon Edu Scripture Memorization Platform - Premium Dark Theme Stylesheet
   ========================================================================== */

/* 1. Global Reset & Theme Variables */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&family=Outfit:wght@300;400;600;800&display=swap');

:root {
  /* Color Tokens (Gold Default Theme) */
  --bg-primary: #F7F3E8;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F3EFE0;
  
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-bg-hover: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(200, 146, 17, 0.2);
  --glass-border-focus: rgba(200, 146, 17, 0.6);
  
  --text-primary: #3D341C;
  --text-secondary: #5C4F2A;
  --text-muted: #8E7B45;
  
  /* Neon Accents (Gold Default Theme) */
  --accent-purple: #C89211;
  --accent-purple-glow: rgba(200, 146, 17, 0.2);
  --accent-blue: #A3750D;
  --accent-blue-glow: rgba(163, 117, 13, 0.2);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.2);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.2);

  /* New Theme Variables (Gold Theme Defaults) */
  --header-bg: rgba(247, 243, 232, 0.85);
  --stamp-bg: rgba(200, 146, 17, 0.05);
  --leaderboard-item-bg: rgba(255, 255, 255, 0.85);
  --footer-bg: rgba(247, 243, 232, 0.95);

  /* Font Families */
  --font-kr: 'Noto Sans KR', sans-serif;
  --font-en: 'Outfit', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Shadows & Blur */
  --glass-blur: 16px;
  --neon-shadow-purple: 0 0 15px var(--accent-purple-glow);
  --neon-shadow-blue: 0 0 15px var(--accent-blue-glow);
  --neon-shadow-emerald: 0 0 15px var(--accent-emerald-glow);
  --neon-shadow-amber: 0 0 15px var(--accent-amber-glow);
}

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

body {
  font-family: var(--font-kr);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 10% 20%, rgba(253, 224, 71, 0.22) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(217, 119, 6, 0.12) 0px, transparent 50%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-kr);
  cursor: pointer;
  border: none;
  outline: none;
}

input {
  font-family: var(--font-kr);
  outline: none;
}

/* 2. Glassmorphism Utilities */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-panel:hover {
  background: var(--glass-bg-hover);
}

/* 3. Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 10px rgba(147, 51, 234, 0.2); }
  50% { box-shadow: 0 0 20px rgba(147, 51, 234, 0.5); }
  100% { box-shadow: 0 0 10px rgba(147, 51, 234, 0.2); }
}

@keyframes stamp-pop {
  0% { transform: scale(3); opacity: 0; }
  70% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes float-points {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-50px) scale(1.2); opacity: 0; }
}

@keyframes progress-fill {
  from { stroke-dashoffset: 283; }
  to { stroke-dashoffset: 0; }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* 4. App Structure & Views */
header {
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  background: var(--header-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1rem;
}

body.mobile-app.native-route-active header {
  display: none !important;
}

body.mobile-app.native-route-active main {
  padding-top: 0 !important;
}

body.mobile-app.native-route-active .page-header-bar,
body.mobile-app.native-route-active #gameView .btn-game-give-up {
  display: none !important;
}

body.mobile-app.native-route-active #gameView .game-header-bar .btn-header-back {
  display: none !important;
}

body.mobile-app.native-route-active #gameView .dashboard-card {
  margin-top: 0 !important;
}

body.mobile-app input,
body.mobile-app select,
body.mobile-app textarea {
  font-size: 16px !important;
}

body.mobile-app input::placeholder,
body.mobile-app textarea::placeholder {
  font-size: 16px;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--text-primary);
  -webkit-text-fill-color: initial;
}

.user-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-point-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-amber);
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.nav-user-info:hover {
  opacity: 0.8;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  color: white;
  border: 2px solid rgba(255,255,255,0.1);
}

.btn-nav-admin {
  background: rgba(147, 51, 234, 0.2);
  border: 1px solid var(--accent-purple);
  color: #c084fc;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-nav-admin:hover {
  background: var(--accent-purple);
  color: white;
  box-shadow: var(--neon-shadow-purple);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Theme Selector Bar & Toggle Buttons */
.theme-toggle-container {
  position: relative;
  display: inline-block;
}

.btn-icon-action {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition-fast);
}

.btn-icon-action:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-focus);
  transform: scale(1.05);
}

.btn-icon-action span {
  font-size: 1.25rem;
}

.theme-toggle-container {
  position: relative;
  display: inline-block;
}

.theme-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1.5px solid var(--glass-border);
  border-radius: 50px; /* Capsule shape */
  padding: 8px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

@keyframes capsuleFadeIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.theme-dropdown.expanded {
  display: flex !important;
  animation: capsuleFadeIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  max-height: 400px;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1.5px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  display: none;
  flex-direction: column;
  z-index: 500;
  overflow: hidden;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notification-dropdown.active {
  display: flex !important;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (max-width: 600px) {
  .notification-dropdown {
    position: fixed !important;
    top: 56px !important;
    right: 12px !important;
    left: auto !important;
    width: calc(100vw - 24px) !important;
    max-width: 320px !important;
  }
}

.theme-buttons-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.theme-label {
  display: none !important;
}

.theme-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
  padding: 0;
  display: block;
  position: relative;
}

.theme-btn:hover {
  transform: scale(1.15);
}

.theme-btn.active {
  border-color: var(--text-primary);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

main {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.view-container {
  display: none;
  width: 100%;
}

.view-container.active {
  display: block;
}

body.mobile-app .view-container.app-page-enter {
  animation: appPageEnter 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes appPageEnter {
  from {
    opacity: 0.72;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 5. Authentication View */
.auth-wrapper {
  max-width: 450px;
  width: 100%;
  margin: 4rem auto;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.auth-tab.active {
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.input-field {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.input-field:focus {
  border-color: var(--accent-purple);
  box-shadow: var(--neon-shadow-purple);
  background: var(--bg-secondary);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
  padding: 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px var(--accent-purple-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-purple-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--accent-purple);
  font-weight: 600;
}

/* 6. Dashboard / Home View */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-card {
  padding: 2rem;
  margin-bottom: 2rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 6.1 Daily Mission Widget */
.mission-progress-container {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .mission-progress-container {
    flex-direction: column;
    text-align: center;
  }
}

.circular-progress {
  position: relative;
  width: 120px;
  height: 120px;
}

.circular-progress svg {
  transform: rotate(-90deg);
  width: 120px;
  height: 120px;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 8px;
}

.circle-progress {
  fill: none;
  stroke: url(#progressGradient);
  stroke-width: 8px;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 1s ease-in-out;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.progress-number {
  font-family: var(--font-en);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.progress-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.mission-details {
  flex: 1;
}

.mission-details h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.mission-details p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.btn-start-mission {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-start-mission:hover {
  transform: translateY(-2px);
  box-shadow: var(--neon-shadow-purple);
}

/* 6.2 Attendance Stamp Widget */
/* Calendar Widget */
.calendar-widget {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--stamp-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.calendar-title {
  font-family: var(--font-en);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.calendar-nav-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.calendar-nav-btn:hover:not(:disabled) {
  background: var(--glass-bg-hover);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 8px;
  position: relative;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.calendar-day.other-month {
  color: var(--text-muted);
  opacity: 0.25;
}

.calendar-day.today {
  border-color: var(--accent-purple);
  box-shadow: 0 0 8px var(--accent-purple-glow);
  font-weight: 800;
  color: var(--accent-purple);
}

.calendar-day.checked {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  font-weight: 800;
  animation: stamp-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.calendar-day.checked::after {
  content: '✓';
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 0.6rem;
  font-weight: 900;
}

/* Streak Status indicator */
.streak-status-container {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.25rem 0 0.25rem;
  font-size: 0.8rem;
  border-top: 1px dashed var(--glass-border);
  margin-top: 0.5rem;
  gap: 0.75rem;
}

.streak-text {
  color: var(--text-secondary);
  font-weight: 500;
  display: block;
}

#cumulativeText {
  font-weight: 600;
  color: var(--accent-amber);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.25);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

#cumulativeText:hover {
  background: rgba(245, 158, 11, 0.18);
  border-style: solid;
  transform: translateY(-1px);
}

@keyframes fade-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.attendance-history-section {
  margin-top: 1rem;
  border-top: 1px dashed var(--glass-border);
  padding-top: 1rem;
  animation: fade-slide-in 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.attendance-history-list {
  max-height: 150px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.5rem;
  padding: 0.25rem 0;
}

.attendance-history-list::-webkit-scrollbar {
  width: 4px;
}

.attendance-history-list::-webkit-scrollbar-track {
  background: transparent;
}

.attendance-history-list::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 99px;
}

.attendance-history-item {
  background: var(--stamp-bg);
  border: 1px solid var(--glass-border);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
  transition: all var(--transition-fast);
}

.attendance-history-item:hover {
  background: var(--glass-bg-hover);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.attendance-history-item span.icon {
  color: var(--accent-emerald);
  font-size: 0.95rem;
}

.streak-progress-wrapper {
  position: relative;
  width: 100%;
  padding: 0 12px;
  box-sizing: border-box;
  margin-bottom: 1.5rem;
}

.streak-progress-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(184, 134, 11, 0.1);
  border-radius: 3px;
}

.streak-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-purple));
  border-radius: 3px;
  transition: width var(--transition-normal);
}

.streak-milestone {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.milestone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--glass-border);
  transition: all var(--transition-fast);
}

.streak-milestone.active .milestone-dot {
  background: var(--accent-amber);
  border-color: var(--accent-purple);
  box-shadow: var(--neon-shadow-amber);
}

.milestone-label {
  margin-top: 4px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  transition: color var(--transition-fast);
  pointer-events: none;
  line-height: 1.2;
  font-weight: 500;
}

.streak-milestone.active .milestone-label {
  color: var(--text-primary);
  font-weight: 700;
}

#milestone-30 .milestone-label {
  transform: translateX(-15%);
}

.btn-attendance {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.btn-attendance:not(:disabled):hover {
  background: var(--accent-emerald);
  color: white;
  box-shadow: var(--neon-shadow-emerald);
  border-color: var(--accent-emerald);
}

.btn-attendance:disabled {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.05);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* 6.3 Ranking Widget */
.ranking-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.user-rank-status {
  padding: 1rem;
  background: var(--accent-purple-glow);
  border: 1px solid var(--accent-purple);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.user-rank-status:hover {
  transform: translateY(-2px);
  box-shadow: var(--neon-shadow-purple);
  border-color: #a78bfa;
}

.user-rank-status:active {
  transform: translateY(0);
}

.user-rank-status h4 {
  font-size: 1.25rem;
  color: var(--accent-purple);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.user-rank-status p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Custom Scrollbar for Leaderboard */
.leaderboard-list::-webkit-scrollbar {
  width: 4px;
}

.leaderboard-list::-webkit-scrollbar-track {
  background: transparent;
}

.leaderboard-list::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 2px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--leaderboard-item-bg);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-fast);
}

.leaderboard-item.me {
  background: var(--accent-purple-glow);
  border-color: var(--accent-purple);
}

.leaderboard-item:hover {
  background: var(--glass-bg-hover);
}

.rank-badge {
  font-family: var(--font-en);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  margin-right: 0.75rem;
  color: var(--text-secondary);
}

.rank-badge.rank-1 {
  background: #f59e0b;
  color: #000;
  box-shadow: var(--neon-shadow-amber);
}

.rank-badge.rank-2 {
  background: #cbd5e1;
  color: #000;
}

.rank-badge.rank-3 {
  background: #b45309;
  color: #fff;
}

.leaderboard-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  margin-right: 0.75rem;
}

.leaderboard-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-points {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-amber);
}

/* 7. Game & Memorization View */
.game-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .game-container {
    grid-template-columns: 1fr;
  }
}

.game-main-panel {
  padding: 2.5rem;
}

.game-side-panel {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.game-header-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}

.game-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: keep-all;
}

.game-stats {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.game-stat-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.game-stat-item .material-icons-round {
  font-size: 1rem;
}

.game-stat-item.timer {
  color: var(--text-secondary);
}

.game-stat-item.timer span.material-icons-round {
  color: var(--accent-amber);
  transition: color var(--transition-fast);
}

.game-stat-item.timer.warning {
  background: var(--accent-rose) !important;
  border-color: var(--accent-rose) !important;
  color: #ffffff !important;
  animation: warning-flash 0.8s infinite alternate ease-in-out !important;
}

.game-stat-item.timer.warning span.material-icons-round {
  color: #ffffff !important;
}

@keyframes warning-flash {
  0% {
    background-color: rgba(244, 63, 94, 0.15) !important;
    border-color: var(--accent-rose) !important;
    color: var(--accent-rose) !important;
    box-shadow: 0 0 4px rgba(244, 63, 94, 0.3);
  }
  100% {
    background-color: var(--accent-rose) !important;
    border-color: var(--accent-rose) !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(244, 63, 94, 0.8);
  }
}

.game-stat-item.hearts {
  color: var(--accent-rose);
}

.game-stat-item.points {
  color: var(--accent-amber);
}

/* Desktop: side-by-side layout */
@media (min-width: 768px) {
  .game-header-bar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }

  .game-title {
    font-size: 1.3rem;
  }

  .game-stat-item {
    font-size: 1rem;
    padding: 0.4rem 0.85rem;
  }
  
  .game-stat-item .material-icons-round {
    font-size: 1.15rem;
  }
}

.verse-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 2rem;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1.8;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  word-break: keep-all;
}

.verse-card.quiz-mode {
  line-height: 2.2;
  text-align: left;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.4rem 0.2rem;
}

/* Blank inputs inside quiz text */
.blank-input {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-bottom: 2.5px solid var(--accent-purple);
  color: var(--accent-purple);
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  padding: 0 0.25rem;
  border-radius: 4px 4px 0 0;
  transition: all var(--transition-fast);
  margin: 0 2px;
  vertical-align: middle;
}

.blank-input:focus {
  background: rgba(147, 51, 234, 0.1);
  border-bottom-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 4px 6px -2px rgba(59, 130, 246, 0.15);
}

.blank-input.correct {
  border-bottom-color: var(--accent-emerald);
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

.blank-input.wrong {
  border-bottom-color: var(--accent-rose);
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.08);
}

.verse-text-hidden {
  filter: blur(8px);
  user-select: none;
  transition: filter var(--transition-normal);
}

.verse-text-hidden.reveal {
  filter: blur(0);
  user-select: auto;
}

.game-controls {
  display: flex;
  gap: 1rem;
}

.btn-game {
  flex: 1;
  padding: 0.8rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.btn-game.secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-game.secondary:hover {
  background: var(--glass-bg-hover);
}

.btn-game.primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
}

.btn-game.primary:hover {
  box-shadow: var(--neon-shadow-purple);
}

.btn-game:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 7.1 Game Info Side Panel */
.game-info-section {
  margin-bottom: 1.5rem;
}

.game-info-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.difficulty-selector {
  display: flex;
  gap: 0.5rem;
}

.btn-diff {
  flex: 1;
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--stamp-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-diff.active.easy {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.btn-diff.active.medium {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.btn-diff.active.hard {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--accent-rose);
  color: var(--accent-rose);
}

.btn-diff.active.master {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

.verse-description {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* 7.2 Point Pop animation item */
.floating-point-container {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
}

.floating-point-item {
  position: absolute;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--accent-amber);
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  animation: float-points 1s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* 8. Admin Page View */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  padding: 1.5rem;
  text-align: center;
}

.admin-stat-val {
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-purple);
  margin-bottom: 0.25rem;
}

.admin-stat-lbl {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.admin-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  margin-bottom: 2rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th, .admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.admin-table th {
  background: var(--accent-purple-glow);
  font-weight: 700;
  color: var(--text-secondary);
}

.admin-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

.admin-table td.actions {
  display: flex;
  gap: 0.5rem;
}

.btn-admin-action {
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-admin-action.edit {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-admin-action.edit:hover {
  background: var(--accent-blue);
  color: white;
}

.btn-admin-action.reset {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-admin-action.reset:hover {
  background: var(--accent-rose);
  color: white;
}

/* 8.1 Demo Simulator / Cheat Panel */
.demo-control-panel {
  padding: 1.5rem;
  border: 1px dashed rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.05);
  border-radius: 12px;
  margin-top: 2rem;
}

.demo-control-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.demo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-demo {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.btn-demo:hover {
  background: var(--accent-amber);
  color: #000;
  box-shadow: var(--neon-shadow-amber);
}

/* 9. Popup / Modal Windows */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 38, 22, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

body.modal-open .bottom-nav,
body.modal-open footer {
  display: none !important;
}

.modal-content {
  max-width: 500px;
  width: 90%;
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  background: #fdfcf7 !important;
  box-shadow: 0 20px 50px rgba(61, 52, 28, 0.15);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.modal-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modal-btn-container {
  display: flex;
  gap: 1rem;
}

.chapter-verses-modal-content {
  border-color: #b8860b !important;
  max-width: 360px;
  padding: 1.75rem 1rem 1.25rem;
  position: relative;
}

.chapter-verses-modal-content .modal-title {
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  padding: 0 2rem;
}

.modal-close-x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(184, 134, 11, 0.18);
  border-radius: 50%;
  background: #fffaf0;
  color: #7a5b13;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(61, 52, 28, 0.08);
}

.modal-close-x .material-icons-round {
  font-size: 1.25rem;
}

.event-popup-card {
  max-width: 430px;
  max-height: min(84vh, 760px);
  overflow-y: auto;
  padding: 1.75rem 1.45rem 1.4rem;
  border: 1px solid rgba(184, 134, 11, 0.18) !important;
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 18%, rgba(245, 158, 11, 0.18), transparent 30%),
    linear-gradient(145deg, #fffdf8 0%, #ffffff 52%, #fff7df 100%) !important;
  box-shadow: 0 28px 70px rgba(61, 52, 28, 0.22);
  font-family: var(--font-kr);
  text-align: left;
  position: relative;
}

body.mobile-app .event-popup-card {
  max-height: calc(100dvh - 130px);
  margin-bottom: env(safe-area-inset-bottom, 0px);
}

.event-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #3d341c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.event-popup-close .material-icons-round {
  font-size: 1.85rem;
}

.event-popup-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 1rem;
  min-height: 170px;
}

.event-popup-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  margin-bottom: 0.85rem;
}

.event-popup-copy h3 {
  color: var(--text-primary);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 0.75rem;
  word-break: keep-all;
}

.event-popup-copy p {
  color: #4f452b;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 0.35rem;
  word-break: keep-all;
  white-space: pre-line;
}

.event-popup-copy strong {
  color: #f59e0b;
  font-size: 1.15rem;
  font-weight: 900;
}

.event-popup-art {
  width: 132px;
  height: 132px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff1c6, #fffaf0);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(184, 134, 11, 0.1);
}

.event-popup-art img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-popup-art.has-image img {
  display: block;
}

.event-popup-art.has-image .material-icons-round {
  display: none;
}

.event-popup-art .material-icons-round {
  color: #f59e0b;
  font-size: 4.8rem;
  filter: drop-shadow(0 10px 16px rgba(245, 158, 11, 0.2));
}

.event-popup-info {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(184, 134, 11, 0.12);
  border-radius: 18px;
  padding: 0.85rem 1rem;
  margin: 0.8rem 0 1rem;
}

.event-popup-info-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(184, 134, 11, 0.14);
}

.event-popup-info-row:last-child {
  border-bottom: none;
}

.event-popup-info-row > .material-icons-round {
  color: #8a6b23;
  font-size: 1.45rem;
}

.event-popup-info-row strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 900;
  margin-bottom: 0.2rem;
}

.event-popup-info-row p {
  color: #5f5130;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
  word-break: keep-all;
}

.event-popup-primary {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #d49a00, #f5a400);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.22);
}

@media (max-width: 480px) {
  .event-popup-card {
    width: min(88vw, 430px);
    padding: 1.55rem 1.2rem 1.25rem;
  }

  .event-popup-hero {
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: 0.75rem;
  }

  .event-popup-art {
    width: 108px;
    height: 108px;
    border-radius: 24px;
  }

  .event-popup-copy h3 {
    font-size: 1.25rem;
  }

  .event-popup-copy p {
    font-size: 0.9rem;
  }
}

/* Custom Styles for Rankings Popup (v1.2.1) */
.btn-all-rankings {
  width: 100%;
  margin-top: 1rem;
  padding: 0.65rem;
  background: var(--leaderboard-item-bg);
  border: 1px dashed var(--glass-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-all-rankings:hover {
  background: var(--accent-purple-glow);
  border-color: var(--accent-purple);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.15);
}

.all-rankings-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  flex: 1;
  padding-right: 0.25rem;
  max-height: 400px;
}

/* Custom Scrollbar for all rankings list */
.all-rankings-list::-webkit-scrollbar {
  width: 6px;
}
.all-rankings-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}
.all-rankings-list::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 3px;
}
.all-rankings-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

.all-ranking-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--leaderboard-item-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: all var(--transition-fast);
}

.all-ranking-item:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-focus);
}

.all-ranking-item.me {
  background: var(--accent-purple-glow);
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(184, 134, 11, 0.15);
}

.all-ranking-item .rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(184, 134, 11, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.all-ranking-item .rank-badge.rank-1 {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.all-ranking-item .rank-badge.rank-2 {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #000;
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.4);
}

.all-ranking-item .rank-badge.rank-3 {
  background: linear-gradient(135deg, #b45309, #78350f);
  color: #fff;
  box-shadow: 0 0 8px rgba(180, 83, 9, 0.4);
}

.all-ranking-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-purple-glow);
  border: 1px solid var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-purple);
  flex-shrink: 0;
}

#rankingSearchInput {
  background: rgba(255, 255, 255, 0.6) !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--text-primary) !important;
}

#rankingSearchInput::placeholder {
  color: var(--text-muted) !important;
}

#rankingSearchInput:focus {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: var(--accent-purple) !important;
  box-shadow: var(--neon-shadow-purple) !important;
}

.all-ranking-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.all-ranking-points {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.all-ranking-item.me .all-ranking-points {
  color: var(--accent-purple);
}

/* 10. Footer Section */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--glass-border);
  background: var(--footer-bg);
  margin-top: auto;
}

body.mobile-app footer {
  display: none !important;
}

/* Validation Messages */
.validation-msg {
  font-size: 0.8rem;
  margin-top: 0.4rem;
  font-weight: 600;
  min-height: 1.2em;
  transition: color var(--transition-fast);
}
.validation-msg.success {
  color: var(--accent-emerald);
}
.validation-msg.error {
  color: var(--accent-rose);
}

/* 11. Responsive Adaptations */
@media (max-width: 768px) {
  main {
    padding: 1rem;
  }
  
  header {
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .dashboard-card, .game-main-panel, .game-side-panel, .auth-wrapper {
    padding: 1.25rem;
  }
}

@media (max-width: 600px) {
  header {
    padding: 0.5rem 0.8rem;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
  }

  .logo {
    font-size: 1.15rem;
    gap: 0.25rem;
  }

  .logo span {
    /* "Edu" 텍스트 모바일에서도 표시 */
  }

  .header-right {
    gap: 0.4rem;
  }

  .user-nav {
    gap: 0.4rem;
  }

  #navUsername {
    display: none !important; /* Hide username text to fit everything on one line */
  }

  .btn-icon-action,
  .btn-notification-bell {
    width: 32px;
    height: 32px;
  }

  .btn-icon-action span,
  .btn-notification-bell span {
    font-size: 1.15rem;
  }

  .nav-point-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.45rem;
    gap: 2px;
  }

  .nav-user-info {
    gap: 0;
  }

  .user-avatar {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  .btn-logout, .btn-nav-admin {
    font-size: 0.7rem;
    padding: 0.25rem 0.45rem;
    border-radius: 6px;
  }



  .theme-btn {
    width: 20px;
    height: 20px;
  }
}

  /* 입력 필드 iOS 자동 줌(Auto-zoom) 방지 (16px/1rem 이상 필수) */
  .input-field {
    font-size: 1.05rem;
  }

  /* 로그인 카드 상하 마진 축소로 화면 쏠림 방지 */
  .auth-wrapper {
    margin: 1.5rem auto;
  }

  /* 게임 조작 버튼 모바일 세로 배치 */
  .game-controls {
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
  }

  .btn-game {
    width: 100%;
    justify-content: center;
  }

  /* 모달 팝업 버튼 모바일 세로 배치 */
  .modal-btn-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Calendar responsive styles */
  .calendar-widget {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .calendar-day {
    font-size: 0.75rem;
    border-radius: 6px;
  }

  .calendar-day.checked::after {
    font-size: 0.5rem;
    bottom: 1px;
    right: 2px;
  }

  .streak-status-container {
    font-size: 0.75rem;
    padding-top: 0.5rem;
  }

  .streak-progress-wrapper {
    padding: 0 10px;
    margin-bottom: 1.25rem;
  }

  .milestone-label {
    font-size: 0.6rem;
    margin-top: 3px;
  }

  .milestone-dot {
    width: 8px;
    height: 8px;
  }

  /* Verse Card */
  .verse-card {
    padding: 1.25rem 1rem;
    font-size: 1rem;
  }
  
  .blank-input {
    font-size: 1rem;
  }

  .card-title {
    font-size: 1.15rem;
  }
}

/* 12. Desktop Navigation & Real-time Notifications */
.desktop-nav {
  display: none !important;
  gap: 0.5rem;
  background: rgba(184, 134, 11, 0.08);
  padding: 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
}

.desktop-nav-item {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  font-family: var(--font-kr);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.desktop-nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.4);
}

.desktop-nav-item.active {
  background: linear-gradient(135deg, var(--accent-purple), #926f15);
  color: #fff !important;
  box-shadow: var(--accent-purple-glow) 0 4px 10px;
}

/* Notification Bell Container */
.nav-notification-bell-container {
  position: relative;
  display: inline-block;
}

header .nav-notification-bell-container {
  display: none !important;
}

.btn-notification-bell {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition-fast);
}

.btn-notification-bell:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-focus);
  transform: scale(1.05);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-rose);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--accent-rose-glow) 0 2px 6px;
  border: 1.5px solid var(--bg-primary);
}


.dropdown-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
}

.dropdown-header span {
  font-family: var(--font-kr);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.btn-clear-notifications {
  background: transparent;
  border: none;
  color: var(--accent-purple);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-kr);
}

.btn-clear-notifications:hover {
  text-decoration: underline;
}

.dropdown-body {
  overflow-y: auto;
  flex: 1;
  max-height: 330px;
}

.notification-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-kr);
}

.notification-item {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(184, 134, 11, 0.08);
  transition: background var(--transition-fast);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item.unread {
  background: rgba(184, 134, 11, 0.04);
  border-left: 3px solid var(--accent-purple);
}

.notification-item.read {
  opacity: 0.85;
}

.notification-content {
  font-family: var(--font-kr);
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.notification-item.unread .notification-content {
  font-weight: 600;
}

.notification-time {
  font-family: var(--font-en);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Hide navigation bar and other duplicate headers when running in mobile app container */
.mobile-app .desktop-nav {
  display: none !important;
}

/* Hybrid Grid & Tabbed View Layout */
.dashboard-grid-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  width: 100%;
}

.dashboard-grid-left, .dashboard-grid-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

/* On desktop web, all three view containers are visible simultaneously when logged in */
body.logged-in:not(.mobile-app) #dashboardView,
body.logged-in:not(.mobile-app) #attendanceView,
body.logged-in:not(.mobile-app) #rankingView {
  display: block !important;
}

body.logged-in.single-dashboard-view:not(.mobile-app) .dashboard-grid-container {
  display: block !important;
  max-width: 1200px;
  margin: 0 auto;
}

body.logged-in.single-dashboard-view:not(.mobile-app) .dashboard-grid-left {
  display: none !important;
}

body.logged-in.single-dashboard-view:not(.mobile-app) .dashboard-grid-right {
  display: block !important;
  width: 100%;
}

body.logged-in.single-dashboard-view:not(.mobile-app) #dashboardView,
body.logged-in.single-dashboard-view:not(.mobile-app) #attendanceView,
body.logged-in.single-dashboard-view:not(.mobile-app) #rankingView,
body.logged-in.single-dashboard-view:not(.mobile-app) #crewView {
  display: none !important;
}

body.logged-in.single-dashboard-view:not(.mobile-app) .view-container.active {
  display: block !important;
}

/* On mobile app, disable grid layout and show only active view-container when logged in */
body.mobile-app.logged-in .dashboard-grid-container {
  display: block !important;
}

body.mobile-app .dashboard-grid-left,
body.mobile-app .dashboard-grid-right {
  display: block !important;
  gap: 0 !important;
}

/* Desktop navigation style corrections */
body:not(.mobile-app) .desktop-nav {
  display: none !important;
}

@media (max-width: 900px) {
  .dashboard-grid-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ==========================================================================
   Settings Page Styling
   ========================================================================== */
#settingsView {
  padding-bottom: 2rem;
}

.settings-profile-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 1.5rem !important;
}

.settings-notifications-card {
  padding: 1.5rem !important;
}

.settings-row {
  transition: background-color 0.2s;
}

.settings-row.nested {
  margin-top: 0.25rem;
}

.settings-item-title {
  font-family: var(--font-kr);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-item-desc {
  font-family: var(--font-kr);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Premium toggle switches styling */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  transition: .3s ease;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background-color: var(--accent-purple);
  border-color: var(--accent-purple);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #ffffff;
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Disabled styling */
input:disabled + .slider {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  cursor: not-allowed;
}

input:disabled + .slider:before {
  background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Warning Banner Styling */
.settings-warning-banner {
  animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Hide Logout button in header for mobile-app mode */
body.mobile-app .btn-logout {
  display: none !important;
}

/* Hide settings app card (logout & version) on mobile app */
body.mobile-app .settings-app-card {
  display: none !important;
}

/* Policy card row styling and hover effects */
.settings-policies-card .settings-row {
  transition: all var(--transition-fast);
  padding: 1rem 0.5rem !important;
  margin: 0 -0.5rem;
}
.settings-policies-card .settings-row:hover {
  background: var(--glass-bg-hover);
  border-radius: 8px;
}

/* Withdraw button styling */
.btn-withdraw-settings {
  cursor: pointer;
  outline: none;
}
.btn-withdraw-settings:hover {
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
}

/* Scrollbar styling for terms modal content */
.terms-content::-webkit-scrollbar {
  width: 6px;
}
.terms-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}
.terms-content::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 3px;
}
.terms-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* Single Path Routing View Styles */
.single-path-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
  background: var(--bg-primary);
}

.single-path-card {
  max-width: 600px;
  width: 100%;
  padding: 2.5rem;
  background: #fdfcf7 !important;
  box-shadow: 0 20px 50px rgba(61, 52, 28, 0.15);
  border-radius: 20px;
}

.single-path-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--accent-purple);
  padding-bottom: 0.75rem;
}

.single-path-header .material-icons-round {
  font-size: 2rem;
  color: var(--accent-purple);
}

.single-path-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.single-path-body {
  max-height: 70vh;
  overflow-y: auto;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.6;
  padding-right: 0.5rem;
  color: var(--text-secondary);
}

.single-path-body::-webkit-scrollbar {
  width: 6px;
}
.single-path-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}
.single-path-body::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 3px;
}
.single-path-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

@media (max-width: 600px) {
  .single-path-container {
    padding: 1rem;
  }
  .single-path-card {
    padding: 1.5rem;
  }
}

/* Crew & Battle Arena Styles */
.fab-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #b8860b);
  border: 2px solid rgba(255, 215, 0, 0.6);
  box-shadow: 0 8px 32px rgba(184, 134, 11, 0.5), 0 0 0 4px rgba(255,215,0,0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulse-gold 2s infinite;
}

.fab-btn:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 12px 40px rgba(184, 134, 11, 0.5);
}

.fab-btn span {
  font-size: 2rem;
}

@keyframes pulse-gold {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
  }
}

@media (max-width: 600px) {
  .fab-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 58px;
    height: 58px;
  }
  .fab-btn span {
    font-size: 1.8rem;
  }
}

/* Battle Room List Cards */
.battle-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.battle-card:hover {
  border-color: rgba(147, 51, 234, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(147, 51, 234, 0.1);
}

.battle-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.battle-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.battle-card-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.battle-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
}

.battle-badge.waiting {
  background: rgba(147, 51, 234, 0.15);
  color: #c084fc;
  border: 1px solid rgba(147, 51, 234, 0.3);
}

.battle-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.battle-badge.completed {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.battle-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.battle-participants {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
  border-top: 1px dashed var(--glass-border);
  padding-top: 0.5rem;
}

.participant-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.participant-row .name {
  color: var(--text-primary);
  font-weight: 600;
}

.participant-row .score {
  font-family: var(--font-en);
  font-weight: bold;
}

.participant-row .score.completed {
  color: var(--accent-emerald);
}

.participant-row .score.pending {
  color: var(--text-muted);
  font-style: italic;
}

/* 1대1 대결 미니 수락 버튼 */
.btn-mini {
  background: var(--accent-purple);
  color: white;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-kr);
}

.btn-mini:hover {
  background: #7c3aed;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
}

.btn-mini.secondary {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.btn-mini.secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Crew list card in No Crew View */
.crew-list-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.crew-list-item:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.05);
}

.crew-info-col {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
}

.crew-name-label {
  font-weight: bold;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.crew-meta-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}



/* ==========================================================================
   Simon Edu APP V2 UI/UX Renewal - New Layouts & Components
   ========================================================================== */

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-top: 1px solid var(--glass-border);
  display: none; /* Hidden by default, flex in logged-in state */
  justify-content: space-around;
  align-items: center;
  height: 64px;
  padding: 0 10px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

@media (max-width: 900px) {
  body.logged-in:not(.hide-bottom-nav) .bottom-nav {
    display: flex;
  }
}

body.mobile-app.logged-in:not(.hide-bottom-nav) .bottom-nav {
  display: none;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 2px;
  height: 100%;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.bottom-nav-item .material-icons-round {
  font-size: 1.45rem;
  transition: transform var(--transition-fast);
}

.bottom-nav-item:hover {
  color: var(--text-secondary);
}

.bottom-nav-item.active {
  color: var(--accent-purple);
  font-weight: 700;
}

.bottom-nav-item.active .material-icons-round {
  transform: translateY(-2px);
}

/* Adjust main element padding-bottom so it doesn't get covered by fixed bottom nav */
body.mobile-app.logged-in:not(.hide-bottom-nav) main {
  padding-bottom: 0;
}

/* 1. 오늘의 말씀 (Home View) Renewal Styling */
.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

.home-section-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-primary);
}

.home-section-eyebrow {
  margin: 0 0 0.2rem 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-purple);
  letter-spacing: 0;
}

.btn-home-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-hero-card,
.notice-section,
.home-mission-section,
.home-friend-activity-section {
  background: #ffffff;
  border: 1px solid #f2e7d5;
  border-radius: 18px;
  padding: 1.25rem;
  text-align: left;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(61, 52, 28, 0.04);
}

.home-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.home-hero-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary);
  word-break: keep-all;
}

.home-hero-title .material-icons-round {
  color: var(--accent-purple);
  font-size: 1.35rem;
}

.home-record-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-height: 28px;
  padding: 0 0.65rem;
  border-radius: 20px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  color: #888888;
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-kr);
  flex-shrink: 0;
}

.home-record-btn .material-icons-round {
  display: none; /* chevron rendered as inline > character in HTML */
}

.home-verse-layout {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: center;
}

.home-verse-art {
  width: 108px;
  height: 108px;
  min-height: 108px;
  border-radius: 16px;
  background: #fffdf9;
  border: 1px solid #f2e3d3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.home-verse-copy {
  min-width: 0;
}

.home-verse-book-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: #fdf5ea;
  color: #c09020;
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  border: 1px solid rgba(200, 146, 17, 0.12);
}

.home-verse-copy h2 {
  margin: 0 0 0.35rem 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.home-verse-copy p {
  margin: 0;
  color: #555555;
  font-size: 0.86rem;
  line-height: 1.5;
  word-break: keep-all;
}

.home-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.home-progress-row > span {
  font-size: 0.85rem;
  color: #333333;
  flex-shrink: 0;
}

.home-progress-track {
  flex-grow: 1;
  height: 6px;
  border-radius: 999px;
  background: #eae6de;
  overflow: hidden;
}

.home-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: #d89f07;
  transition: width 0.35s ease;
}

.home-progress-row strong {
  font-size: 0.88rem;
  color: #333333;
  flex-shrink: 0;
  white-space: nowrap;
}

.home-progress-row small {
  color: #888888;
  font-size: 0.78rem;
  font-weight: 500;
}

.home-action-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.home-action-row .btn-start-mission,
.home-action-row .btn-review-mission {
  flex: 1;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.home-action-row .btn-start-mission {
  background: #b8860b;
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 10px rgba(184, 134, 11, 0.15);
}

.home-action-row .btn-start-mission:hover {
  background: #966d09;
}

.home-action-row .btn-review-mission {
  background: #ffffff;
  color: #333333;
  border: 1px solid #e0e0e0;
}

.home-action-row .btn-review-mission:hover {
  background: #fafafa;
}

.home-test-select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
  pointer-events: none;
}

.attendance-mini-card {
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(200, 146, 17, 0.08), rgba(163, 117, 13, 0.04));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.attendance-mini-left {
  text-align: left;
}

.attendance-mini-status {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.attendance-mini-streak {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-weight: 500;
}

.btn-attendance-mini {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
  border: 0;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.btn-attendance-mini:hover {
  transform: translateY(-1px);
  box-shadow: var(--neon-shadow-purple);
}

.btn-attendance-mini.completed {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald);
  cursor: default;
  box-shadow: none;
  transform: none;
}

/* Events Banner */
.event-banners-section {
  margin-bottom: 1.5rem;
  text-align: left;
}

.home-widget-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-primary);
}

.home-widget-title button {
  border: 0;
  background: transparent;
  color: var(--accent-purple);
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-kr);
  cursor: pointer;
}

.event-banner-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.event-banner-card {
  width: 100%;
  min-height: 118px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, rgba(200, 146, 17, 0.18), rgba(16, 185, 129, 0.12));
  background-size: cover;
  background-position: center;
  padding: 0;
  text-align: left;
}

.event-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.event-banner-card:hover .event-banner-img {
  transform: scale(1.02);
}

.event-banner-overlay {
  min-height: 118px;
  width: 100%;
  background: linear-gradient(90deg, rgba(38, 28, 8, 0.72), rgba(38, 28, 8, 0.2));
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 1rem;
  color: white;
  text-align: left;
}

.event-banner-overlay .material-icons-round {
  align-self: flex-start;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.event-banner-title {
  font-size: 0.95rem;
  font-weight: 800;
}

.event-banner-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.25rem;
}

/* Notice List widget */
.notice-section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.notice-list-compact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.notice-item-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
  transition: opacity 0.2s;
  background: transparent;
  color: inherit;
  text-align: left;
  width: 100%;
}

.notice-item-compact:hover {
  opacity: 0.75;
}

.notice-item-title-col {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.notice-item-compact-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notice-item-compact-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.event-banners-section {
  margin-bottom: 1.2rem;
  position: relative;
}

.event-banner-list {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 0;
  border-radius: 14px;
}

.event-banner-list::-webkit-scrollbar {
  display: none;
}

.event-banner-card {
  min-width: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
  background: linear-gradient(135deg, #fef1dd, #fdf4e4);
  border: 1px solid #f7e4c8;
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.event-banner-overlay {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 0.5rem;
  padding: 1.2rem;
  align-items: center;
}

.event-banner-overlay > div {
  display: flex;
  flex-direction: column;
}

.event-banner-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #3d341c;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.event-banner-meta {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.event-banner-date {
  font-size: 0.74rem;
  color: #888888;
  font-weight: 500;
  margin-bottom: 0.75rem;
  font-family: var(--font-en);
}

.event-banner-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 4px 10px;
  border-radius: 12px;
  background: #8e6f1a;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
}

.event-banner-cta .material-icons-round {
  font-size: 0.85rem;
}

.event-banner-art {
  width: 110px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.event-banner-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(142, 111, 26, 0.2);
  transition: all 0.2s ease;
}

.event-banner-dots span.active {
  background: #8e6f1a;
  width: 12px;
  border-radius: 3px;
}

.notice-list-compact {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.6rem;
}

.notice-item-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.74rem 0;
  border-bottom: 1px solid rgba(61, 52, 28, 0.08);
  cursor: pointer;
  transition: opacity 0.2s;
  background: transparent;
  color: inherit;
  text-align: left;
  width: 100%;
}

.notice-item-compact:last-child {
  border-bottom: none;
}

.notice-item-compact:hover {
  opacity: 0.75;
}

.notice-item-title-col {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow: hidden;
}

.notice-bell-container {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #f2e3d3;
  background: #fffdf8;
  color: #d89f07;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notice-bell-container .material-icons-round {
  font-size: 0.95rem;
}

.notice-new-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 0.35rem;
  border-radius: 4px;
  background: #ff7a00;
  color: white;
  font-size: 0.62rem;
  font-weight: 900;
  flex-shrink: 0;
}

.notice-item-compact-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notice-item-compact-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.home-mission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.home-mission-tile {
  min-width: 0;
  min-height: 92px;
  border: 1px solid rgba(200, 146, 17, 0.2);
  border-radius: 12px;
  background: #fffdf8;
  color: var(--text-primary);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem;
  text-align: left;
}

.home-mission-tile.completed {
  opacity: 0.72;
}

.home-mission-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(200, 146, 17, 0.1);
  color: #8a640e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-mission-icon .material-icons-round {
  font-size: 1.7rem;
}

.home-mission-tile span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.home-mission-tile strong {
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.home-mission-tile small {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.home-mission-tile b {
  font-size: 0.86rem;
  color: #b8860b;
}

.home-mission-tile > .material-icons-round {
  color: var(--text-secondary);
}

.home-friend-card-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.home-friend-card {
  min-width: 0;
  border: 1px solid rgba(200, 146, 17, 0.16);
  border-radius: 12px;
  background: #fffdf8;
  padding: 0.75rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
}

.home-friend-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f6d893, #e8b85a);
  color: #3d341c;
  font-weight: 900;
  position: relative;
}

.home-friend-avatar.online::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
}

.home-friend-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.home-friend-body strong,
.home-friend-body span,
.home-friend-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-friend-body strong {
  font-size: 0.86rem;
  color: var(--text-primary);
}

.home-friend-body span,
.home-friend-body small {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.home-friend-card em {
  font-style: normal;
  padding: 0.22rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(200, 146, 17, 0.2);
  color: #8a640e;
  font-size: 0.74rem;
  font-weight: 900;
}

@media (max-width: 640px) {
  .home-hero-card,
  .notice-section,
  .home-mission-section,
  .home-friend-activity-section {
    border-radius: 16px;
    padding: 1rem;
  }

  .home-hero-title {
    font-size: 1rem;
  }

  .home-record-btn {
    min-height: 34px;
    padding: 0 0.7rem;
    font-size: 0.78rem;
  }

  .home-verse-layout {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.8rem;
  }

  .home-verse-art {
    width: 88px !important;
    height: 88px !important;
    min-height: 88px !important;
    border-radius: 12px;
  }

  .home-verse-copy h2 {
    font-size: 1.05rem !important;
    margin-bottom: 0.2rem !important;
  }

  .home-verse-copy p {
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
    color: #444444 !important;
  }

  .home-progress-row {
    margin-top: 0.75rem !important;
  }

  .home-action-row {
    margin-top: 0.75rem !important;
    gap: 0.5rem;
  }

  .home-action-row .btn-start-mission,
  .home-action-row .btn-review-mission {
    min-height: 38px;
    font-size: 0.78rem;
    border-radius: 8px;
  }

  .event-banner-overlay {
    grid-template-columns: 1fr 90px;
    padding: 0.9rem;
  }

  .event-banner-title {
    font-size: 0.92rem;
  }

  .event-banner-meta,
  .event-banner-date {
    font-size: 0.72rem;
  }

  .event-banner-overlay .event-banner-art {
    width: 90px;
    height: 70px;
  }

  .home-mission-grid,
  .home-friend-card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .home-mission-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem 0.25rem;
    gap: 0.35rem;
    min-height: 105px;
    position: relative;
  }

  .home-mission-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .home-mission-icon .material-icons-round {
    font-size: 1.2rem;
  }

  .home-mission-tile span:nth-child(2) {
    align-items: center;
  }

  .home-mission-tile strong {
    font-size: 0.72rem;
    font-weight: 800;
  }

  .home-mission-tile small {
    font-size: 0.62rem;
    margin-top: 1px;
  }

  .home-mission-tile b {
    font-size: 0.68rem;
    font-weight: 800;
    margin-top: 2px;
  }

  .home-mission-tile > .material-icons-round {
    font-size: 0.75rem;
    position: absolute;
    bottom: 4px;
    right: 4px;
  }

  .home-friend-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem 0.25rem;
    gap: 0.35rem;
    position: relative;
    min-height: 105px;
  }

  .home-friend-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
  }

  .home-friend-avatar.online::after {
    width: 7px;
    height: 7px;
    border-width: 1.5px;
    top: 1px;
    right: 1px;
  }

  .home-friend-body {
    align-items: center;
  }

  .home-friend-body strong {
    font-size: 0.72rem;
    font-weight: 800;
  }

  .home-friend-body span {
    font-size: 0.65rem;
  }

  .home-friend-body small {
    display: none;
  }

  .home-friend-card em {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 0.6rem;
    padding: 1px 3px;
    border-radius: 4px;
    background: #f3efe0;
    border: 1px solid #e6e2da;
  }
}

@media (max-width: 380px) {
  .home-verse-layout {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 0.6rem;
  }

  .home-verse-art {
    width: 78px !important;
    height: 78px !important;
    min-height: 78px !important;
    border-radius: 10px;
  }

  .home-verse-copy h2 {
    font-size: 0.95rem !important;
  }

  .home-verse-copy p {
    font-size: 0.74rem !important;
    line-height: 1.35 !important;
  }

  .home-action-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }
}

/* App WebView home: keep the first screen dense enough to scan at once. */
body.mobile-app.logged-in #dashboardView .dashboard-single-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  padding: 10px 12px 88px;
}

body.mobile-app.logged-in #dashboardView .home-hero-card {
  order: 1;
}

body.mobile-app.logged-in #dashboardView .event-banners-section {
  order: 2;
}

body.mobile-app.logged-in #dashboardView .notice-section {
  order: 3;
}

body.mobile-app.logged-in #dashboardView .home-mission-section {
  order: 4;
}

body.mobile-app.logged-in #dashboardView .home-hero-card,
body.mobile-app.logged-in #dashboardView .event-banners-section,
body.mobile-app.logged-in #dashboardView .notice-section,
body.mobile-app.logged-in #dashboardView .home-mission-section {
  margin-bottom: 10px;
}

body.mobile-app.logged-in #dashboardView .home-hero-card,
body.mobile-app.logged-in #dashboardView .notice-section,
body.mobile-app.logged-in #dashboardView .home-mission-section {
  border-radius: 14px;
  padding: 12px;
}

body.mobile-app.logged-in #dashboardView .home-hero-head {
  margin-bottom: 8px;
}

body.mobile-app.logged-in #dashboardView .home-hero-title {
  gap: 6px;
  font-size: 0.98rem;
  line-height: 1.2;
}

body.mobile-app.logged-in #dashboardView .home-hero-title .material-icons-round {
  font-size: 1.15rem;
}

body.mobile-app.logged-in #dashboardView .home-record-btn {
  min-height: 28px;
  padding: 0 9px;
  font-size: 0.7rem;
}

body.mobile-app.logged-in #dashboardView .home-verse-layout {
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

body.mobile-app.logged-in #dashboardView .home-verse-art {
  width: 70px !important;
  height: 70px !important;
  min-height: 70px !important;
  border-radius: 12px;
}

body.mobile-app.logged-in #dashboardView .home-verse-book-chip {
  padding: 2px 8px;
  font-size: 0.62rem;
}

body.mobile-app.logged-in #dashboardView .home-verse-copy h2 {
  margin: 4px 0 3px !important;
  font-size: 1.02rem !important;
  line-height: 1.18;
}

body.mobile-app.logged-in #dashboardView .home-verse-copy p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.72rem !important;
  line-height: 1.34 !important;
}

body.mobile-app.logged-in #dashboardView .home-progress-row {
  margin-top: 9px !important;
  gap: 7px;
}

body.mobile-app.logged-in #dashboardView .home-progress-row > span {
  font-size: 0.7rem;
}

body.mobile-app.logged-in #dashboardView .home-progress-track {
  height: 5px;
}

body.mobile-app.logged-in #dashboardView .home-progress-row strong {
  font-size: 0.72rem;
}

body.mobile-app.logged-in #dashboardView .home-progress-row small {
  display: none;
}

body.mobile-app.logged-in #dashboardView .home-action-row {
  margin-top: 9px !important;
  gap: 8px;
}

body.mobile-app.logged-in #dashboardView .home-action-row .btn-start-mission,
body.mobile-app.logged-in #dashboardView .home-action-row .btn-review-mission {
  min-height: 38px;
  border-radius: 9px;
  font-size: 0.78rem;
}

body.mobile-app.logged-in #dashboardView .event-banner-list {
  gap: 8px;
}

body.mobile-app.logged-in #dashboardView .event-banner-card,
body.mobile-app.logged-in #dashboardView .event-banner-overlay {
  min-height: 74px;
}

body.mobile-app.logged-in #dashboardView .event-banner-overlay {
  padding: 10px 12px;
}

body.mobile-app.logged-in #dashboardView .event-banner-overlay .material-icons-round {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 1.1rem;
}

body.mobile-app.logged-in #dashboardView .event-banner-title {
  font-size: 0.82rem;
}

body.mobile-app.logged-in #dashboardView .event-banner-meta {
  font-size: 0.66rem;
  margin-top: 2px;
}

body.mobile-app.logged-in #dashboardView .home-widget-title {
  margin-bottom: 8px;
  font-size: 0.88rem;
}

body.mobile-app.logged-in #dashboardView .home-widget-title button {
  font-size: 0.68rem;
}

body.mobile-app.logged-in #dashboardView .notice-list-compact {
  gap: 6px;
  margin-top: 0;
}

body.mobile-app.logged-in #dashboardView .notice-item-compact {
  min-height: 28px;
  padding-bottom: 5px;
  gap: 8px;
}

body.mobile-app.logged-in #dashboardView .notice-item-compact:nth-child(n+4) {
  display: none;
}

body.mobile-app.logged-in #dashboardView .notice-item-compact-title {
  font-size: 0.73rem;
}

body.mobile-app.logged-in #dashboardView .notice-item-compact-date {
  font-size: 0.64rem;
}

body.mobile-app.logged-in #dashboardView .home-mission-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.mobile-app.logged-in #dashboardView .home-mission-tile {
  min-height: 72px;
  padding: 8px 6px;
  gap: 4px;
}

body.mobile-app.logged-in #dashboardView .home-mission-icon {
  width: 30px;
  height: 30px;
}

body.mobile-app.logged-in #dashboardView .home-mission-icon .material-icons-round {
  font-size: 1.05rem;
}

body.mobile-app.logged-in #dashboardView .home-mission-tile strong {
  font-size: 0.66rem;
}

body.mobile-app.logged-in #dashboardView .home-mission-tile small,
body.mobile-app.logged-in #dashboardView .home-mission-tile b {
  font-size: 0.6rem;
}

body.mobile-app.logged-in #dashboardView .home-mission-tile > .material-icons-round {
  display: none;
}

body.mobile-app.logged-in #dashboardView .home-journey-section,
body.mobile-app.logged-in #dashboardView .home-friend-activity-section {
  display: none;
}

.home-empty-state {
  width: 100%;
  padding: 1rem;
  border: 1px dashed var(--glass-border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.app-list-page-card {
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: left;
}

.app-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.app-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--glass-bg);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.app-list-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  flex-shrink: 0;
}

.app-list-icon.notice {
  background: linear-gradient(135deg, var(--accent-amber), #d97706);
}

.app-list-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.app-list-body strong {
  font-size: 0.92rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-list-body span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.app-list-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* 2. 성경여정 (Bible Journey) Styling */
.page-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.5rem;
  margin-bottom: 1rem;
}

.page-header-bar h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.5px;
}

.btn-header-back, .btn-header-close, .btn-header-share, .btn-header-action {
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.btn-header-back:hover, .btn-header-close:hover, .btn-header-share:hover, .btn-header-action:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.btn-header-back .material-icons-round,
.btn-header-close .material-icons-round,
.btn-header-share .material-icons-round,
.btn-header-action .material-icons-round {
  font-size: 1.4rem;
}

/* Modern Circle Progress Header Card */
.journey-header-card-modern {
  background: #ffffff;
  border: 1px solid #f2e7d5;
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 20px rgba(61, 52, 28, 0.03);
}

.journey-circle-progress-wrapper {
  position: relative;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.journey-circle-progress-wrapper svg {
  transform: rotate(-90deg);
  width: 84px;
  height: 84px;
}

.journey-circle-progress-wrapper circle {
  fill: none;
  stroke-width: 6;
}

.journey-circle-progress-wrapper .circle-bg {
  stroke: #f3ebd8;
}

.journey-circle-progress-wrapper .circle-fill {
  stroke: var(--accent-amber);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease-in-out;
}

.journey-circle-text {
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
}

.journey-circle-text .current {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.journey-circle-text .divider {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 1px;
}

.journey-circle-text .total {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.journey-header-info-modern {
  flex: 1;
  text-align: left;
}

.journey-badge {
  display: inline-block;
  background: #fdf6e2;
  color: var(--accent-amber);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  margin-bottom: 0.35rem;
}

.journey-header-info-modern h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.journey-header-info-modern h2 span {
  color: var(--accent-amber);
}

.journey-header-info-modern p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

/* 완독 보상 리스트 (가로 스크롤) */
.journey-rewards-section-modern {
  margin-bottom: 1.75rem;
  text-align: left;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.section-title-row h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.btn-info-dialog {
  background: transparent;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
}

.btn-info-dialog:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.journey-rewards-scroll {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 0.75rem;
  padding-bottom: 0.6rem;
  scrollbar-width: none; /* Firefox */
}

.journey-rewards-scroll::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

.journey-reward-card-item {
  flex: 0 0 160px;
  background: #ffffff;
  border: 1px solid #f2e7d5;
  border-radius: 16px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(61, 52, 28, 0.02);
  transition: all 0.2s ease;
}

.journey-reward-card-item.unlocked {
  border-color: #fce3b8;
  background: #fffdf9;
}

.journey-reward-card-item.claimed {
  border-color: #d1fae5;
  background: #fafdfb;
  opacity: 0.85;
}

.reward-medal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f4ebd8;
  color: #a18a59;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.journey-reward-card-item.unlocked .reward-medal {
  background: #fef3c7;
  color: #d97706;
}

.journey-reward-card-item.claimed .reward-medal {
  background: #d1fae5;
  color: #10b981;
}

.reward-medal .material-icons-round {
  font-size: 1.2rem;
}

.reward-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 0.6rem;
  flex: 1;
}

.reward-details strong {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
}

.reward-details span {
  font-size: 0.75rem;
  color: var(--accent-amber);
  font-weight: 700;
}

.journey-reward-card-item.claimed .reward-details span {
  color: #10b981;
}

.btn-claim {
  width: 100%;
  padding: 0.35rem 0;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-claim.locked {
  background: #f3ede2;
  color: var(--text-muted);
  cursor: not-allowed;
}

.btn-claim.unlocked {
  background: var(--accent-amber);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.2);
}

.btn-claim.unlocked:hover {
  transform: translateY(-1px);
}

.btn-claim.claimed {
  background: #e6f9f0;
  color: #10b981;
  border: 1px solid #a7f3d0;
  cursor: default;
}

/* 장 목록 탭 및 그리드 */
.journey-chapters-section {
  margin-top: 0.5rem;
  text-align: left;
}

.journey-tabs {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border-bottom: none;
  margin-bottom: 1.5rem;
  gap: 0.6rem;
}

.journey-tab {
  background: #f3ece0;
  border: none;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: #6b5c37;
  cursor: pointer;
  border-radius: 20px;
  position: relative;
  transition: all 0.2s;
}

.journey-tab:hover {
  background: #eae1d3;
  color: #3d341c;
}

.journey-tab.active {
  background: #b8860b;
  color: #ffffff;
}

.journey-tab.active::after {
  display: none;
}

.journey-chapters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 4rem; /* Safe space for sticky bottom button */
}

@media (max-width: 360px) {
  .journey-chapters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.chapter-card-grid-item {
  background: #ffffff;
  border: 1px solid #f2e7d5;
  border-radius: 18px;
  padding: 0.9rem;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(61, 52, 28, 0.02);
  text-align: left;
}

.chapter-card-grid-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(61, 52, 28, 0.05);
}

.chapter-card-grid-item.completed {
  background: #f6fdf9;
  border-color: #c6ebd8;
}

.chapter-card-grid-item.ongoing {
  background: #fffdf5;
  border-color: #f7e0b5;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.06);
}

.chapter-card-grid-item.locked {
  background: #fafaf8;
  border-color: #ebebe9;
  opacity: 0.65;
  cursor: not-allowed;
}

.chapter-card-grid-item.locked:hover {
  transform: none;
  box-shadow: none;
}

.chapter-card-grid-item.waiting {
  background: #fffdfc;
  border-color: #ecd9bc;
  opacity: 0.95;
  cursor: pointer;
}

.chapter-card-grid-item.waiting:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.08);
}

.chapter-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.chapter-label {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.chapter-card-grid-item.locked .chapter-label {
  color: var(--text-muted);
}

.status-icon {
  display: inline-flex;
  align-items: center;
}

.chapter-card-grid-item.completed .status-icon {
  color: #10b981;
}

.chapter-card-grid-item.locked .status-icon {
  color: var(--text-muted);
}

.status-pct {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-amber);
  background: #fff3db;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
}

.chapter-card-footer {
  width: 100%;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.chapter-card-grid-item.completed .chapter-card-footer {
  color: #10b981;
}

.chapter-card-grid-item.ongoing .chapter-card-footer {
  color: var(--accent-amber);
}

.chapter-card-grid-item.locked .chapter-card-footer {
  color: var(--text-muted);
}

/* Sticky Bottom Start Button */
.journey-sticky-bottom {
  position: fixed;
  bottom: 5rem; /* Floating above the bottom navigation bar */
  left: 0;
  right: 0;
  padding: 0 1rem;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none; /* allow pass-through */
}

.btn-journey-start-floating {
  pointer-events: auto; /* re-enable clicks */
  background: linear-gradient(135deg, var(--accent-amber), #d97706);
  color: #ffffff;
  border: none;
  padding: 0.85rem 2.25rem;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.3);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-journey-start-floating:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(217, 119, 6, 0.4);
}

.btn-journey-start-floating .material-icons-round {
  font-size: 1.2rem;
}

/* 2.2. 성경여정 장 상세 (Chapter Detail View) */
.journey-detail-page, .journey-verse-page, .journey-result-page {
  text-align: left;
}

.chapter-progress-card {
  background: #ffffff;
  border: 1px solid #f2e7d5;
  border-radius: 18px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 12px rgba(61, 52, 28, 0.02);
}

.chapter-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.chapter-status-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
}

.chapter-status-pill.completed {
  background: #e6f9f0;
  color: #10b981;
}

.chapter-status-pill.ongoing {
  background: #fff3db;
  color: var(--accent-amber);
}

.chapter-status-pill.locked {
  background: #f3efe2;
  color: var(--text-muted);
}

.chapter-status-pill.waiting {
  background: #f5f4f0;
  color: var(--text-muted);
}

.chapter-progress-percent {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.chapter-progress-percent small {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.chapter-progress-track {
  height: 6px;
  background: #f3ebd8;
  border-radius: 3px;
  overflow: hidden;
}

.chapter-progress-bar {
  height: 100%;
  background: var(--accent-amber);
  border-radius: 3px;
  width: 0;
  transition: width 0.4s ease-out;
}

.chapter-detail-tabs {
  display: flex;
  border-bottom: 1px solid #f2e7d5;
  margin-bottom: 1rem;
}

.detail-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.75rem 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  text-align: center;
  transition: color 0.2s;
}

.detail-tab.active {
  color: var(--text-primary);
  font-weight: 800;
}

.detail-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--text-primary);
}

.verse-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.verse-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid #f2e7d5;
  border-radius: 14px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(61, 52, 28, 0.01);
  text-align: left;
}

.verse-list-row:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #ecd9bc;
  box-shadow: 0 4px 12px rgba(61, 52, 28, 0.04);
}

.verse-list-row:disabled {
  background: #fafaf8;
  border-color: #ebebe9;
  cursor: not-allowed;
}

.verse-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.verse-num {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  flex-shrink: 0;
}

.verse-list-row.locked .verse-num {
  color: var(--text-muted);
}

.verse-snippet {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.verse-list-row.locked .verse-snippet {
  color: var(--text-muted);
}

.verse-row-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.verse-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
}

.verse-badge.completed {
  background: #e6f9f0;
  color: #10b981;
}

.verse-badge.ongoing {
  background: #fff3db;
  color: var(--accent-amber);
  animation: pulse-active 1.5s infinite;
}

.verse-badge.locked {
  background: transparent;
  color: var(--text-muted);
  padding: 0;
}

.verse-badge.practice {
  background: #e0f2fe;
  color: #0369a1;
}

@keyframes pulse-active {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

.verse-row-arrow {
  font-size: 1.15rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.verse-list-row:hover:not(:disabled) .verse-row-arrow {
  transform: translateX(2px);
  color: var(--text-primary);
}

.chapter-summary-card {
  padding: 1.25rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #f2e7d5;
  line-height: 1.6;
}

.chapter-summary-card h4 {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.chapter-summary-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
}

/* 2.3. 절 학습 화면 (Verse Study View) */
.verse-study-container {
  margin: 1rem 0 1.5rem 0;
}

.verse-study-card {
  background: #ffffff;
  border: 1px solid #f2e7d5;
  border-radius: 24px;
  padding: 2.25rem 1.5rem;
  position: relative;
  box-shadow: 0 6px 20px rgba(61, 52, 28, 0.02);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.quote-icon-top, .quote-icon-bottom {
  font-family: Georgia, serif;
  font-size: 3rem;
  color: #ecd9bc;
  line-height: 0;
  position: absolute;
}

.quote-icon-top {
  top: 1.5rem;
  left: 1.5rem;
}

.quote-icon-bottom {
  bottom: 0.5rem;
  right: 1.5rem;
}

.verse-study-text {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.75;
  color: var(--text-primary);
  word-break: keep-all;
  padding: 0.5rem 1rem;
}

.verse-study-card.text-size-large .verse-study-text {
  font-size: 1.35rem;
  line-height: 1.8;
}

.verse-study-card.text-size-largest .verse-study-text {
  font-size: 1.55rem;
  line-height: 1.85;
}

/* Keyword highlight style */
.highlight-keyword {
  color: var(--accent-amber);
  background: #fff3db;
  border-radius: 4px;
  padding: 1px 4px;
  font-weight: 850;
  text-shadow: 0 0 1px rgba(217, 119, 6, 0.1);
}

.verse-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn-verse-quiz-start {
  background: linear-gradient(135deg, var(--accent-amber), #d97706);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 1rem 0;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
  transition: all 0.2s ease;
}

.btn-verse-quiz-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.3);
}

.btn-verse-review-study {
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid #f2e7d5;
  border-radius: 16px;
  padding: 0.95rem 0;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-verse-review-study:hover {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-primary);
}

.verse-pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f2e7d5;
  padding-top: 1rem;
  margin-top: 1.5rem;
  gap: 1rem;
}

.btn-pagination-nav {
  background: transparent;
  border: none;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  transition: background-color 0.2s, color 0.2s;
}

.btn-pagination-nav:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.btn-pagination-nav:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.pagination-divider {
  width: 1px;
  height: 16px;
  background: #f2e7d5;
}

/* 2.4. 암송 완료 결과 화면 (Result View) */
.result-celebration-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 0;
}

.celebration-trophy {
  margin-bottom: 1rem;
}

.trophy-wrapper {
  display: inline-block;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(-10px);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

.result-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 0.35rem 0;
}

.result-subtitle {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 2rem;
}

.result-reward-card {
  width: 100%;
  max-width: 320px;
  background: #ffffff;
  border: 1px solid #f2e7d5;
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.25rem;
  box-shadow: 0 4px 16px rgba(61, 52, 28, 0.02);
}

.reward-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.reward-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.reward-value {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
}

.reward-row.total .reward-label {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 800;
}

.reward-value-total {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--accent-amber);
}

.reward-divider {
  height: 1px;
  background: #f2e7d5;
  margin: 0.5rem 0;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
}

.btn-result-primary {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 1rem 0;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
  transition: all 0.2s ease;
}

.btn-result-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.btn-result-secondary {
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid #f2e7d5;
  border-radius: 16px;
  padding: 0.95rem 0;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-result-secondary:hover {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-primary);
}

.journey-rewards-section {
  text-align: left;
  margin-top: 2rem;
}

.journey-hall-section {
  text-align: left;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.journey-reward-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.journey-reward-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.journey-reward-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.journey-reward-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.journey-reward-points {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-amber);
}

.btn-reward-claim {
  padding: 0.4rem 0.8rem;
  background: var(--accent-purple);
  color: white;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.btn-reward-claim:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--neon-shadow-purple);
}

.btn-reward-claim:disabled {
  background: rgba(0,0,0,0.06);
  color: var(--text-muted);
  cursor: not-allowed;
}

.btn-reward-claim.claimed {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald);
  cursor: default;
}

/* 3. 명예의 전당 (Hall of Fame) Styling */
.ranking-tabs {
  display: flex;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 1rem;
}

.ranking-tab {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.ranking-tab.active {
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
  font-weight: 700;
}

.rank-item-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  background: rgba(200, 146, 17, 0.12);
  color: var(--accent-purple);
  border-radius: 4px;
  font-weight: bold;
  margin-left: 0.25rem;
}

/* Hall of Fame v2 */
.ranking-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  text-align: left;
}

.ranking-help-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(184, 134, 11, 0.25);
  border-radius: 50%;
  background: #fffdf6;
  color: #7a5b13;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ranking-help-btn .material-icons-round {
  font-size: 1.15rem;
}

.ranking-guide-modal {
  max-width: 420px;
  padding: 1.4rem;
  border-color: rgba(212, 154, 0, 0.32);
}

.ranking-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ranking-guide-head .modal-title {
  margin: 0;
  color: #3d341c;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.15rem;
}

.ranking-guide-head .modal-title .material-icons-round {
  color: #d49a00;
}

.ranking-guide-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.ranking-guide-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.9rem;
  border: 1px solid rgba(184, 134, 11, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.ranking-guide-item > .material-icons-round {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(212, 154, 0, 0.12);
  color: #d49a00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ranking-guide-item strong {
  display: block;
  color: #2f2818;
  font-size: 0.95rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
}

.ranking-guide-item p {
  margin: 0;
  color: #6f5f38;
  font-size: 0.82rem;
  line-height: 1.45;
}

#rankingView .ranking-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0.2rem;
  border: 1px solid #e5d3ad;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  margin: 0 0 1rem;
}

#rankingView .ranking-tabs.has-mission-tab {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#rankingView .ranking-tab {
  border: none;
  border-radius: 999px;
  padding: 0.78rem 0.8rem;
  color: #7a6a3f;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 900;
  font-family: var(--font-kr);
  cursor: pointer;
}

#rankingView .ranking-tabs.has-mission-tab .ranking-tab {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  font-size: 0.78rem;
}

#rankingView .ranking-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, #d49a00, #b98200);
  box-shadow: 0 8px 18px rgba(180, 130, 0, 0.24);
}

#rankingView .user-rank-status {
  display: grid;
  grid-template-columns: 1fr 112px;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8df, #ffffff 52%, #fff1c6);
  border: 1px solid rgba(184, 134, 11, 0.3);
  box-shadow: 0 10px 28px rgba(184, 134, 11, 0.12);
  text-align: left;
}

#rankingView .user-rank-status p:first-child {
  color: #3d341c;
  font-size: 0.92rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 0 0.35rem;
}

#rankingView .user-rank-status p:first-child .material-icons-round {
  color: #c89211;
  font-size: 0.95rem;
}

#rankingView .user-rank-status h4 {
  color: #141414;
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
  margin: 0 0 0.4rem;
}

#rankingView .user-rank-status #userRankingPct {
  color: #3d341c;
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0;
}

#rankingView .rank-details-link {
  margin-top: 0.9rem;
  color: #b98200;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.82rem;
  font-weight: 900;
}

#rankingView .rank-details-link .material-icons-round {
  font-size: 1rem;
}

.ranking-summary-trophy {
  width: 104px;
  height: 104px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffbf2f, #d79a00);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff8df;
  box-shadow: inset 0 -8px 18px rgba(80, 45, 0, 0.18), 0 12px 22px rgba(184, 134, 11, 0.22);
}

.ranking-summary-trophy .material-icons-round {
  font-size: 4.4rem;
}

.ranking-board-card {
  padding: 0;
}

.ranking-weekly-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 34px;
  margin: 0.35rem 0 0.9rem;
  border-radius: 999px;
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  font-size: 0.8rem;
  font-weight: 900;
}

.ranking-weekly-note .material-icons-round {
  font-size: 1rem;
}

.ranking-weekly-empty {
  margin-top: 1rem;
  padding: 2rem 1.2rem;
  border: 1px dashed rgba(76, 175, 80, 0.35);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.08), rgba(255, 255, 255, 0.88));
  text-align: center;
  color: #3d341c;
}

.ranking-weekly-empty > .material-icons-round {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(76, 175, 80, 0.14);
  color: #4caf50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 0.9rem;
}

.ranking-weekly-empty strong {
  display: block;
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 0.4rem;
}

.ranking-weekly-empty p {
  margin: 0;
  color: #5f5130;
  font-size: 0.86rem;
  line-height: 1.5;
}

.ranking-weekly-empty small {
  display: block;
  margin-top: 0.7rem;
  color: #4caf50;
  font-size: 0.74rem;
  font-weight: 800;
}

.ranking-mission-empty {
  border-color: rgba(212, 154, 0, 0.35);
  background: linear-gradient(135deg, rgba(255, 191, 47, 0.12), rgba(255, 255, 255, 0.9));
}

.ranking-mission-empty > .material-icons-round {
  background: rgba(212, 154, 0, 0.16);
  color: #d49a00;
}

.ranking-mission-banner {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 0.75rem;
  min-height: 78px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(212, 154, 0, 0.24);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8df, #ffffff);
  box-shadow: 0 8px 20px rgba(184, 134, 11, 0.1);
}

.ranking-mission-banner > .material-icons-round {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1a3a54, #0e273c);
  color: #ffbf2f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.ranking-mission-banner strong {
  display: block;
  color: #222;
  font-size: 0.98rem;
  font-weight: 900;
  margin-bottom: 0.18rem;
}

.ranking-mission-banner p {
  margin: 0;
  color: #7a6a3f;
  font-size: 0.82rem;
  font-weight: 800;
}

#rankingView .leaderboard-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
  gap: 0;
}

.ranking-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 0.55rem;
  margin: 1.2rem 0 1rem;
}

.ranking-podium-card {
  position: relative;
  min-height: 126px;
  border: 1px solid #ead9b3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(61, 52, 28, 0.08);
  padding: 1.15rem 0.55rem 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.ranking-podium-card.rank-1 {
  min-height: 148px;
  border-color: #d49a00;
  background: linear-gradient(180deg, #fff8e1, #ffffff);
  box-shadow: 0 12px 26px rgba(184, 134, 11, 0.18);
}

.ranking-podium-card.me,
.ranking-row.me {
  background: linear-gradient(90deg, rgba(76, 175, 80, 0.12), rgba(255, 255, 255, 0.92));
  border-color: rgba(76, 175, 80, 0.26);
}

.ranking-podium-medal {
  position: absolute;
  top: -0.55rem;
  right: 0.6rem;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #c89211;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(184, 134, 11, 0.22);
}

.ranking-podium-medal .material-icons-round {
  font-size: 1rem;
}

.ranking-podium-avatar,
.ranking-row-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #eee7d7;
  color: #3d341c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.ranking-podium-card strong {
  color: #222;
  font-size: 0.86rem;
  font-weight: 900;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-podium-card b {
  color: #d49a00;
  font-size: 1rem;
  font-weight: 900;
}

.ranking-list-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ranking-row {
  display: grid;
  grid-template-columns: 32px 36px minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 52px;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(184, 134, 11, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(61, 52, 28, 0.04);
}

.ranking-row-rank {
  color: #222;
  font-weight: 900;
  text-align: center;
}

.ranking-row-avatar {
  width: 30px;
  height: 30px;
  font-size: 0.78rem;
}

.ranking-row strong {
  color: #222;
  font-size: 0.9rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row strong small {
  display: block;
  margin-top: 0.08rem;
  color: #9b8757;
  font-size: 0.68rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row b {
  color: #d49a00;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.ranking-my-fixed {
  margin-top: 0.75rem;
}

body.mobile-app #rankingView .dashboard-single-container {
  padding: 1rem;
}

@media (max-width: 420px) {
  #rankingView .user-rank-status {
    grid-template-columns: 1fr 86px;
    padding: 1rem;
  }

  .ranking-summary-trophy {
    width: 82px;
    height: 82px;
    border-radius: 20px;
  }

  .ranking-summary-trophy .material-icons-round {
    font-size: 3.4rem;
  }

  .ranking-podium {
    gap: 0.45rem;
  }

  .ranking-podium-card {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }

  .ranking-row {
    grid-template-columns: 26px 30px minmax(0, 1fr) auto;
  }
}

/* 4. 친구 및 소통 (Friend System) Styling */
.friends-card {
  padding: 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  text-align: left;
  margin-top: 1rem;
}

.friends-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  max-height: 200px;
  overflow-y: auto;
}

.friend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(200,146,17,0.08);
}

.friend-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.8rem;
  position: relative;
}

.friend-avatar.online::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background: #10b981;
  border: 2px solid white;
  border-radius: 50%;
}

.friend-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.friend-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.friend-progress {
  font-size: 0.725rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

/* Activity Feed */
.activity-feed-card {
  padding: 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  text-align: left;
  margin-top: 1.5rem;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  max-height: 250px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  gap: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed var(--glass-border);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.activity-content-col {
  flex: 1;
}

.activity-text {
  font-size: 0.825rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.activity-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Event Detail Page styling */
.event-detail-wrapper {
  max-width: 600px;
  width: 100%;
  margin: 1rem auto 2rem auto;
}

.event-detail-banner {
  width: 100%;
  height: 180px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-bottom: none;
}

.event-detail-banner.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(200, 146, 17, 0.14), rgba(16, 185, 129, 0.1));
}

.event-detail-banner.no-image .material-icons-round {
  font-size: 4rem;
  color: var(--accent-purple);
}

.event-detail-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-detail-card {
  border-radius: 0 0 16px 16px !important;
  border-top: none !important;
  padding: 1.5rem;
  text-align: left;
}

.event-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.event-detail-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
}

.event-status-badge {
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 900;
  background: rgba(200, 146, 17, 0.12);
  color: var(--accent-purple);
  white-space: nowrap;
}

.event-status-badge.in_progress {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
}

.event-status-badge.completed {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
}

.event-detail-section h3,
.examinee-info-section h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-primary);
}

.event-guide-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.7;
}

.event-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.event-detail-start-btn {
  width: 100%;
  margin-top: 1rem;
  height: 48px;
}

.choice-question-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.choice-question-text {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.55;
}

.choice-options {
  display: grid;
  gap: 0.7rem;
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 48px;
  padding: 0.85rem;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--glass-bg);
  cursor: pointer;
}

.choice-option input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-text-muted {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-kr);
  font-size: 0.8rem;
  cursor: pointer;
}

.exam-result-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.exam-result-detail-grid div {
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0.8rem;
  background: var(--glass-bg);
}

.exam-result-detail-grid span {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.exam-result-detail-grid strong {
  font-size: 0.92rem;
  color: var(--text-primary);
  word-break: keep-all;
}

.exam-result-detail-grid strong.pass {
  color: var(--accent-emerald);
}

.exam-result-detail-grid strong.fail {
  color: var(--accent-rose);
}

.exam-related-alerts {
  text-align: left;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: rgba(200, 146, 17, 0.05);
}

.exam-related-alerts h3 {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--text-primary);
}

.exam-alert-row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.exam-alert-row:last-child {
  border-bottom: 0;
}

.exam-alert-row .material-icons-round {
  color: var(--accent-purple);
  font-size: 1.2rem;
  margin-top: 0.05rem;
}

.exam-alert-row strong {
  display: block;
  font-size: 0.84rem;
  color: var(--text-primary);
}

.exam-alert-row p {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.exam-result-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.6rem;
}

.exam-result-actions button {
  margin: 0;
  min-height: 44px;
  border-radius: 10px;
  font-family: var(--font-kr);
  font-weight: 800;
}

@media (max-width: 640px) {
  .event-form-grid {
    grid-template-columns: 1fr;
  }

  .exam-result-detail-grid {
    grid-template-columns: 1fr;
  }

  .exam-result-actions {
    grid-template-columns: 1fr;
  }

  .event-detail-head,
  .journey-progress-stats {
    flex-direction: column;
    align-items: flex-start;
  }
}
}

.event-detail-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-size: 0.825rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.75rem;
}

.event-detail-content {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
  text-align: left;
  margin-bottom: 1.5rem;
  white-space: pre-line;
}

.examinee-info-section {
  background: rgba(200, 146, 17, 0.05);
  border: 1px dashed var(--accent-purple);
  padding: 1.25rem;
  border-radius: 12px;
  text-align: left;
  margin-bottom: 1.5rem;
}

/* Admin panel Tab styles */
.admin-tab-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.btn-admin-tab {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-admin-tab.active {
  background: var(--accent-purple);
  color: white;
  border-color: var(--accent-purple);
}

/* Custom scrollbars */
.custom-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(200,146,17,0.25);
  border-radius: 3px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(200,146,17,0.4);
}

/* ============================================================
   Home Screen UI/UX Renewal Overrides
   ============================================================ */

/* Hide Username in Header */
.nav-user-info span {
  display: none !important;
}

/* Redesigned Points Badge */
.nav-point-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #fdf5ea !important;
  border: 1px solid #f2e3d3 !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: 9999px !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: #b8860b !important;
}

/* Redesigned User Avatar */
.user-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #d89f07 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.9rem !important;
  border: 1.5px solid #fff !important;
  box-shadow: 0 2px 6px rgba(216, 159, 7, 0.2) !important;
}

/* Event Banner Styling for Dark Blue / Indigo Theme */
.event-banner-card {
  background: linear-gradient(135deg, #0b223c, #16365a);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 16px rgba(15, 43, 72, 0.15) !important;
  color: #ffffff !important;
}
.event-banner-title {
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 1.15rem !important;
}
.event-banner-meta {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500 !important;
}
.event-banner-date {
  color: rgba(255, 255, 255, 0.65) !important;
  font-weight: 500 !important;
}

/* Event Banner Badge ("진행중") */
.event-banner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: #10b981;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
  width: fit-content;
  text-transform: uppercase;
}

/* Event Banner CTA Button ("참여하기 >") */
.event-banner-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 20px;
  background: #ffffff;
  color: #16365a;
  font-size: 0.74rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.4rem;
  width: fit-content;
}
.event-banner-cta-btn:hover {
  background: #f1f5f9;
}

/* Custom styles for dots on dark blue layout */
.event-banner-dots span.active {
  background: #b8860b !important;
}

body.mobile-app.logged-in #dashboardView #homeEventBanners {
  display: block !important;
  overflow: visible !important;
  border-radius: 0 !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-track {
  display: flex !important;
  flex-direction: row !important;
  gap: 0 !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory !important;
  scrollbar-width: none !important;
  border-radius: 16px !important;
  -webkit-overflow-scrolling: touch;
}

body.mobile-app.logged-in #dashboardView .event-banner-track::-webkit-scrollbar {
  display: none !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-track .event-banner-card {
  min-width: 100% !important;
  width: 100% !important;
  min-height: 134px !important;
  flex: 0 0 100% !important;
  scroll-snap-align: start !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #10283f 0%, #163a5f 100%);
  border: 1px solid rgba(184, 134, 11, 0.35) !important;
  box-shadow: 0 10px 24px rgba(16, 40, 63, 0.12) !important;
  overflow: hidden !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-track .event-banner-card.has-image {
  background-size: cover !important;
  background-position: center !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-track .event-banner-overlay {
  min-height: 134px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 118px !important;
  align-items: center !important;
  gap: 0.8rem !important;
  padding: 1rem 1.05rem !important;
  background: linear-gradient(90deg, rgba(10, 23, 32, 0.86), rgba(13, 42, 70, 0.72)) !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-track .event-banner-overlay > div:first-child {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  min-width: 0 !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-track .event-banner-badge {
  padding: 0.28rem 0.55rem !important;
  border-radius: 8px !important;
  background: #10b981 !important;
  color: #fff !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  margin-bottom: 0.5rem !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-track .event-banner-title {
  color: #fff !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  margin: 0 0 0.42rem !important;
  word-break: keep-all !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-track .event-banner-meta {
  color: rgba(255, 255, 255, 0.86) !important;
  font-size: 0.75rem !important;
  line-height: 1.42 !important;
  margin: 0 0 0.48rem !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-track .event-banner-date {
  color: rgba(255, 255, 255, 0.68) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  margin: 0 0 0.7rem !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-track .event-banner-cta-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  padding: 0.35rem 0.8rem !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #153454 !important;
  font-size: 0.74rem !important;
  font-weight: 900 !important;
  margin: 0 !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-track .event-banner-art {
  width: 118px !important;
  height: 96px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-track .event-banner-art svg {
  width: 118px !important;
  height: 96px !important;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.18));
}

body.mobile-app.logged-in #dashboardView .event-banner-track .event-banner-art > .material-icons-round {
  width: 54px !important;
  height: 54px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
  font-size: 1.8rem !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-dots {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 8px !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-dots span {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: rgba(184, 134, 11, 0.2) !important;
  transition: all 0.2s ease !important;
}

body.mobile-app.logged-in #dashboardView .event-banner-dots span.active {
  width: 14px !important;
  border-radius: 999px !important;
  background: #b8860b !important;
}

/* Bible Journey widget on Dashboard */
.home-journey-section {
  background: #ffffff;
  border: 1px solid #f2e7d5;
  border-radius: 18px;
  padding: 1.25rem;
  text-align: left;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(61, 52, 28, 0.04);
}
.home-journey-container {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  margin-top: 0.8rem;
}
.home-journey-left {
  display: flex;
  flex-direction: column;
}
.home-journey-title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.home-journey-title-row strong {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-primary);
}
.btn-help-bubble {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #eae6de;
  border: none;
  color: #666;
  font-size: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
}
.home-journey-progress-label {
  font-size: 0.72rem;
  color: #888;
  margin-bottom: 0.2rem;
}
.home-journey-progress-stats {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.home-journey-progress-stats .pct {
  font-size: 1.35rem;
  font-weight: 900;
  color: #b8860b;
}
.home-journey-progress-stats .count {
  font-size: 0.76rem;
  color: #666;
  font-weight: 700;
}
.home-journey-progress-track {
  height: 4px;
  background: #eae6de;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  width: 100%;
}
.home-journey-progress-fill {
  height: 100%;
  background: #b8860b;
  border-radius: inherit;
  width: 0%;
  transition: width 0.35s ease;
}
.btn-continue-journey {
  width: 100%;
  min-height: 28px;
  padding: 0 0.5rem;
  background: #fdf5ea;
  border: 1px solid rgba(184, 134, 11, 0.24);
  color: #b8860b;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-continue-journey:hover {
  background: #fcebd2;
}

.home-journey-right {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.25rem 0;
  scrollbar-width: none;
}
.home-journey-right::-webkit-scrollbar {
  display: none;
}
.home-journey-chapter-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s;
}
.home-journey-chapter-item:hover {
  transform: translateY(-2px);
}
.home-journey-chapter-item .chapter-num {
  font-size: 0.74rem;
  font-weight: 800;
  color: #333;
}
.home-journey-chapter-item .chapter-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f4efe0;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
}
.home-journey-chapter-item .chapter-circle span {
  font-size: 1.15rem;
}
.home-journey-chapter-item .chapter-status {
  font-size: 0.68rem;
  color: #666;
  font-weight: 500;
}

/* Completed State */
.home-journey-chapter-item.completed .chapter-circle {
  background: #fdf8e6;
  border-color: rgba(184, 134, 11, 0.2);
}
.home-journey-chapter-item.completed .chapter-circle span {
  color: #b8860b;
  font-weight: 900;
}
.home-journey-chapter-item.completed .chapter-status {
  color: #b8860b;
  font-weight: 700;
}

/* Ongoing State */
.home-journey-chapter-item.ongoing .chapter-circle {
  background: #ffffff;
  border-color: #b8860b;
  box-shadow: 0 0 8px rgba(184, 134, 11, 0.15);
}
.home-journey-chapter-item.ongoing .chapter-circle span {
  color: #b8860b;
}
.home-journey-chapter-item.ongoing .chapter-status {
  color: #b8860b;
  font-weight: 800;
}

/* Waiting State */
.home-journey-chapter-item.waiting .chapter-circle {
  background: #f2efe4;
  border-color: transparent;
}
.home-journey-chapter-item.waiting .chapter-circle span {
  color: #a8a29e;
}
.home-journey-chapter-item.waiting .chapter-status {
  color: #a8a29e;
}

@media (max-width: 640px) {
  .home-journey-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Logo Styling Override for Gold/Brown Mockup Theme */
.logo {
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  color: #855b17 !important; /* Dark Gold/Brown */
  font-family: 'Outfit', 'Inter', sans-serif !important;
  font-weight: 800 !important;
}
.logo span {
  color: #855b17 !important; /* Matches main logo color */
  font-weight: 800 !important;
  -webkit-text-fill-color: initial !important;
  margin-left: 2px;
}

/* Chapter Detail Menu Item Row Hover Interactions */
.menu-item-row {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-item-row:hover {
  transform: translateY(-1px);
  border-color: #b8860b !important;
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.05) !important;
  background-color: #fffdf9 !important;
}
.menu-item-row:active {
  transform: scale(0.98);
}

/* Exam Mode Chapter Card highlight and sparkle badge */
.chapter-card-grid-item.exam-highlight {
  border: 1.5px solid #b8860b !important;
  background: #fffdf5 !important;
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.04) !important;
}

.chapter-card-grid-item.exam-highlight:hover {
  box-shadow: 0 6px 16px rgba(184, 134, 11, 0.08) !important;
}

.chapter-card-grid-item.exam-selected {
  border: 2px solid #ff9800 !important;
  box-shadow: 0 4px 14px rgba(255, 152, 0, 0.15) !important;
}

.chapter-badge-diamond {
  display: inline-block;
  color: #b8860b;
  font-size: 0.8rem;
  margin-left: 2px;
}

/* Exam Mode 5-Column Grid */
.journey-chapters-grid.exam-mode {
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 0.5rem !important;
  margin-bottom: 2rem !important;
}

.journey-chapters-grid.exam-mode .chapter-card-grid-item {
  aspect-ratio: 1 / 1.15 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem 0.25rem !important;
  position: relative !important;
  border-radius: 12px !important;
  background: white;
  border: 1px solid #f2e7d5;
  cursor: pointer;
  transition: all 0.2s ease;
}

.journey-chapters-grid.exam-mode .chapter-card-grid-item .exam-card-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #f59e0b;
  color: white;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.journey-chapters-grid.exam-mode .chapter-card-grid-item .exam-card-icon {
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.journey-chapters-grid.exam-mode .chapter-card-grid-item .exam-card-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
}

.journey-chapters-grid.exam-mode .chapter-card-grid-item.exam-highlight {
  border: 1px solid #b8860b !important;
  background: #fffdf5 !important;
  box-shadow: 0 2px 6px rgba(184, 134, 11, 0.04) !important;
}

.journey-chapters-grid.exam-mode .chapter-card-grid-item.exam-selected {
  border: 2px solid #ff9800 !important;
  background: #fff9eb !important;
  box-shadow: 0 4px 10px rgba(255, 152, 0, 0.15) !important;
}

.journey-chapters-grid.exam-mode .chapter-card-grid-item.exam-selected .exam-card-label {
  color: #d97706 !important;
  font-weight: 900 !important;
}

/* Bible Journey Redesign UI/UX */
.journey-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.journey-title-row h1 {
  font-size: 1.45rem;
  font-weight: 900;
  color: #1e293b;
  margin: 0;
  letter-spacing: -0.5px;
}

.journey-title-row .btn-info-dialog {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.journey-title-row .btn-info-dialog:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

/* Header Card */
.journey-header-card-new {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 1.2rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.03);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #faf9f6);
}

.journey-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  flex: 1;
  z-index: 2;
  padding-right: 0.5rem;
}

.journey-header-badge {
  display: inline-block;
  background: #e6f4ea;
  color: #137333;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  letter-spacing: -0.2px;
}

.journey-header-left h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.5px;
}

.journey-header-left p {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  font-weight: 600;
}

.journey-header-left p span {
  color: #10b981;
  font-weight: 800;
}

.journey-header-right {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  margin-left: 0.5rem;
}

.book-illustration-container {
  position: relative;
  width: 110px;
  height: 90px;
}

.book-illustration {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Segmented Notch Progress Bar */
.segmented-progress-container {
  display: flex;
  gap: 3px;
  width: 100%;
  max-width: 240px;
  margin-bottom: 0.5rem;
}

.segmented-progress-pill {
  height: 6px;
  flex-grow: 1;
  background: #e2e8f0;
  border-radius: 4px;
  transition: background-color 0.25s ease;
}

.segmented-progress-pill.filled {
  background: #10b981;
}

/* Metric Cards Grid */
.journey-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.journey-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 0.9rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01);
}

.journey-metric-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.journey-metric-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
}

.journey-metric-card.goal .journey-metric-icon-badge {
  background: #e6f4ea;
  color: #137333;
}

.journey-metric-card.streak .journey-metric-icon-badge {
  background: #fff3e0;
  color: #e65100;
}

.journey-metric-card.reward .journey-metric-icon-badge {
  background: #e3f2fd;
  color: #0d47a1;
}

.journey-metric-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.journey-metric-value {
  font-size: 1.05rem;
  font-weight: 900;
  color: #1e293b;
  margin-bottom: 0.2rem;
  letter-spacing: -0.2px;
}

.journey-metric-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 700;
}

.journey-metric-card.streak .journey-metric-sub {
  color: #f97316;
}

.journey-metric-progress-wrapper {
  width: 100%;
  max-width: 65px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 0.25rem;
  overflow: hidden;
}

.journey-metric-progress-fill {
  height: 100%;
  background: #10b981;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Pill Tabs Bar */
.journey-tabs-pillbar {
  display: flex;
  background: #f1f5f9;
  border-radius: 24px;
  padding: 4px;
  margin-bottom: 1.25rem;
  gap: 4px;
  border: 1px solid #e2e8f0;
}

.journey-tab-pill {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.5rem 0.25rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  border-radius: 20px;
  text-align: center;
  transition: all 0.2s ease-in-out;
}

.journey-tab-pill:hover {
  color: #1e293b;
}

.journey-tab-pill.active {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}

/* Timeline Layout */
.journey-timeline-container {
  position: relative;
  padding: 0.5rem 0.1rem;
  margin-bottom: 4.5rem; /* Space for footer/sticky button */
}

.journey-timeline-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.timeline-item {
  display: flex;
  position: relative;
  gap: 0.8rem;
  align-items: stretch;
}

/* Vertical dotted line */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 19px; /* center of 38px circle */
  top: 38px; /* start below the circle */
  bottom: -20px; /* overlap with next circle */
  width: 2px;
  border-left: 2px dotted #cbd5e1;
  z-index: 1;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-left {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.timeline-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  border: 2px solid transparent;
  transition: all 0.25s;
}

.timeline-circle.completed {
  background: #10b981;
  border-color: #10b981;
}

.timeline-circle.ongoing {
  background: #f59e0b;
  border-color: #fbbf24;
}

.timeline-circle.waiting {
  background: #e2e8f0;
  color: #64748b;
  border-color: #e2e8f0;
}

.timeline-circle.waiting-highlight {
  background: #f59e0b;
  border-color: #fbbf24;
}

.timeline-right {
  flex-grow: 1;
  z-index: 2;
  display: flex;
}

.timeline-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.01);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  flex-grow: 1;
  min-height: 72px;
}

.timeline-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.timeline-card.completed {
  background: #ffffff;
  border-color: #e2e8f0;
}

.timeline-card.ongoing {
  background: #ffffff;
  border-color: #cbd5e1;
}

.timeline-card.waiting {
  background: #ffffff;
  border-color: #f1f5f9;
  opacity: 0.95;
}

.timeline-card.waiting-highlight {
  background: #fffbeb;
  border-color: #fcd34d;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.03);
}

.timeline-card-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.25rem;
  flex: 1;
  padding-right: 0.5rem;
}

.timeline-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e293b;
}

.timeline-card-subtitle {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  max-width: 95%;
}

.timeline-card-progress-bar-wrapper {
  width: 100%;
  max-width: 140px;
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.timeline-card-progress-bar-fill {
  height: 100%;
  background: #f59e0b;
  border-radius: 3px;
}

.timeline-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.3rem;
  flex-shrink: 0;
  min-width: 70px;
}

.timeline-status-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  letter-spacing: -0.2px;
}

.timeline-status-badge.completed {
  background: #e6f4ea;
  color: #137333;
}

.timeline-status-badge.ongoing {
  background: #fff7df;
  color: #b8860b;
}

.timeline-status-badge.waiting {
  background: #f1f5f9;
  color: #64748b;
}

.timeline-status-date {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 600;
}

.btn-timeline-continue {
  background: #ffffff;
  border: 1px solid #10b981;
  color: #10b981;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-timeline-continue:hover {
  background: #e6f4ea;
}

/* Milestone reward button inside timeline item */
.btn-timeline-reward-claim {
  background: #f59e0b;
  color: white;
  border: none;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
}

.btn-timeline-reward-claim:hover {
  background: #d97706;
}

.timeline-reward-claimed-badge {
  font-size: 0.65rem;
  font-weight: bold;
  color: #10b981;
  background: #ecfdf5;
  padding: 0.15rem 0.45rem;
  border-radius: 12px;
  border: 1px solid #a7f3d0;
}

/* Bottom Banner Card */
.journey-banner-card {
  background: linear-gradient(135deg, #fffcf0, #fef3c7);
  border: 1px solid #fde68a;
  border-radius: 20px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  text-align: left;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.04);
}

.journey-banner-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.journey-banner-text {
  flex-grow: 1;
}

.journey-banner-text p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #78350f;
  line-height: 1.5;
}

.journey-banner-action {
  flex-shrink: 0;
}

.btn-journey-banner-link {
  background: #10b981;
  color: #ffffff;
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
}

.btn-journey-banner-link:hover {
  background: #059669;
}

/* ==========================================================================
   Chapter Study Modes & Renewed Chapter Detail Cards
   ========================================================================== */
.mode-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.1rem;
  background: white;
  border: 1px solid #f2e7d5;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(61, 52, 28, 0.01);
  text-align: left;
}

.mode-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(61, 52, 28, 0.03);
}

.mode-card-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.mode-card-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mode-card-title {
  font-size: 0.92rem;
  font-weight: bold;
  color: var(--text-primary);
  margin: 0 0 0.15rem 0;
}

.mode-card-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 0;
}

.btn-mode-start {
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: bold;
  border: none;
  cursor: pointer;
}

/* Mode-specific Badge & Button styles */
.mode-card.easy .mode-card-icon-badge {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
}
.mode-card.easy .btn-mode-start {
  background: #10b981;
  color: white;
}
.mode-card.easy:hover {
  border-color: #10b981;
}

.mode-card.hard .mode-card-icon-badge {
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
}
.mode-card.hard .btn-mode-start {
  background: #f59e0b;
  color: white;
}
.mode-card.hard:hover {
  border-color: #f59e0b;
}

.mode-card.expert .mode-card-icon-badge {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}
.mode-card.expert .btn-mode-start {
  background: #ef4444;
  color: white;
}
.mode-card.expert:hover {
  border-color: #ef4444;
}

.mode-card.exam .mode-card-icon-badge {
  background: rgba(139, 92, 246, 0.08);
  color: #8b5cf6;
}
.mode-card.exam .btn-mode-start {
  background: #8b5cf6;
  color: white;
}
.mode-card.exam:hover {
  border-color: #8b5cf6;
}

.mode-card.history .mode-card-icon-badge {
  background: rgba(100, 116, 139, 0.08);
  color: #64748b;
}
.mode-card.history:hover {
  border-color: #cbd5e1;
}

/* Mode Info Banner */
.mode-info-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 1rem;
  text-align: left;
}
.mode-info-banner.easy {
  background: #ecfdf5;
  color: #065f46;
  border-left: 4px solid #10b981;
}
.mode-info-banner.hard {
  background: #fffbeb;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}
.mode-info-banner.expert {
  background: #fef2f2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}
.mode-info-banner.exam {
  background: #f5f3ff;
  color: #5b21b6;
  border-left: 4px solid #8b5cf6;
}

/* Option Rows for Quizzes */
.study-options-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.study-option-row {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid #f2e7d5;
  border-radius: 12px;
  background: white;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.study-option-row:hover {
  background: #fffdf9;
  border-color: #d4c5a9;
}

.study-option-row.selected {
  border-color: #f59e0b;
  background: #fffbeb;
  font-weight: 600;
}

.study-option-row.correct {
  border-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
  font-weight: bold;
}

.study-option-row.incorrect {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
  font-weight: bold;
}

/* Expert Mode Dictation Diffs */
.dictation-diff-box {
  padding: 1.15rem;
  border-radius: 14px;
  background: white;
  border: 1px solid #cbd5e1;
  font-size: 0.98rem;
  line-height: 1.7;
  word-break: keep-all;
  text-align: left;
  margin-top: 0.5rem;
  min-height: 80px;
}

.dictation-result-score {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ef4444;
  margin: 0.5rem 0;
}

/* Study Bottom Progress Bar */
.study-progress-bar-wrapper {
  width: 100%;
  height: 6px;
  background: #f1ebd9;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.study-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.3s ease;
  width: 0%;
}
.study-progress-bar-fill.hard {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}
.study-progress-bar-fill.expert {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}
.study-progress-bar-fill.exam {
  background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

/* Verse Grid Selection Button Styles */
.verse-select-btn {
  background: white;
  border: 1px solid #e2e8f0;
  color: #64748b;
  border-radius: 12px;
  height: 48px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.verse-select-btn:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
}
.verse-select-btn.active.easy {
  background-color: #16a34a !important;
  color: white !important;
  border-color: #16a34a !important;
}
.verse-select-btn.active.hard {
  background-color: #d97706 !important;
  color: white !important;
  border-color: #d97706 !important;
}
.verse-select-btn.active.expert {
  background-color: #dc2626 !important;
  color: white !important;
  border-color: #dc2626 !important;
}

/* Mission Exam Guides & Review Grid styles */
.exam-word-guides-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.1);
  border: 1px dashed var(--glass-border);
  border-radius: 12px;
  padding: 1.25rem;
}
.word-box-group {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}
.char-box-guide {
  width: 18px;
  height: 22px;
  border: 1.5px solid var(--accent-amber);
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.05);
  display: inline-block;
}
.exam-review-dot:hover {
  transform: scale(1.08);
}
.exam-review-dot:active {
  transform: scale(0.95);
}

.exam-char-counter {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.exam-char-counter strong {
  color: var(--accent-amber);
  font-size: 1.05rem;
  font-weight: 900;
}

.exam-review-card {
  padding: 1.35rem !important;
}

.exam-review-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(184, 134, 11, 0.16);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8df, #ffffff);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 900;
}

.exam-review-summary strong {
  color: #3d341c;
  white-space: nowrap;
}

.exam-review-summary em {
  color: var(--accent-amber);
  font-style: normal;
  font-size: 1.35rem;
}

.exam-review-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: min(48vh, 430px);
  overflow-y: auto;
  padding-right: 0.2rem;
  margin-bottom: 0.9rem;
}

.exam-review-answer {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1.5px solid rgba(184, 134, 11, 0.16);
  background: rgba(255, 255, 255, 0.86);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.exam-review-answer:hover,
.exam-review-answer:active {
  transform: translateY(-1px);
  border-color: rgba(212, 154, 0, 0.45);
  box-shadow: 0 8px 18px rgba(61, 52, 28, 0.08);
}

.exam-review-answer-num {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3ead3;
  color: #8a6b23;
  font-size: 1rem;
  font-weight: 900;
}

.exam-review-answer.done .exam-review-answer-num {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
}

.exam-review-answer.empty .exam-review-answer-num {
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
}

.exam-review-answer-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.exam-review-answer-body strong {
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 900;
}

.exam-review-answer-body span {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-review-answer.empty .exam-review-answer-body span {
  color: #94a3b8;
}

.exam-review-answer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  white-space: nowrap;
}

.exam-review-answer-meta em {
  color: #10b981;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 900;
}

.exam-review-answer.empty .exam-review-answer-meta em {
  color: #64748b;
}

.exam-review-answer-meta small {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.exam-review-edit-icon {
  color: #b8860b;
  font-size: 1.1rem;
}

.exam-review-help {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.exam-review-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .exam-review-card {
    padding: 1rem !important;
  }

  .exam-review-list {
    max-height: 46vh;
  }

  .exam-review-answer {
    grid-template-columns: 36px minmax(0, 1fr) 24px;
    gap: 0.55rem;
    padding: 0.78rem;
  }

  .exam-review-answer-num {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .exam-review-answer-meta {
    grid-column: 2 / 3;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .exam-review-actions {
    grid-template-columns: 1fr;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
