/* ============================================
   Romance Guitar Circle - Main Stylesheet
   Dark & Elegant Theme
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a28;
  --bg-card-hover: #222236;
  --bg-input: #1e1e2e;
  --text-primary: #e8e6f0;
  --text-secondary: #9896a8;
  --text-muted: #6b6980;
  --accent: #ff6600;
  --accent-hover: #ff8533;
  --accent-dark: #cc5200;
  --accent-subtle: rgba(255, 102, 0, 0.1);
  --accent-subtle-2: rgba(255, 102, 0, 0.15);
  --success: #6abe59;
  --info: #4285f4;
  --warning: #ffc107;
  --error: #f06;
  --danger: #e05555;
  --danger-hover: #c94444;
  --border: #2a2a3e;
  --border-light: #35354a;
  --glass-bg: rgba(18, 18, 26, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --string-color: rgba(201, 169, 110, 0.12);
  --string-color-strong: rgba(201, 169, 110, 0.5);
  --shadow: rgba(0, 0, 0, 0.4);
  --piano-white: #787878;
  --piano-white-border: #666;
  --piano-white-active: #8a8a8a;
  --piano-black: #0a0a12;
  --piano-black-border: #000;
  --piano-black-active: #1a1a28;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  --font-display: Georgia, 'Times New Roman', serif;
  --max-width: 1200px;
}

/* --- Light Theme --- */
[data-theme="light"] {
  --bg-primary: #f5f5f7;
  --bg-secondary: #eaeaef;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f5;
  --bg-input: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #555568;
  --text-muted: #8888a0;
  --accent: #e05500;
  --accent-hover: #cc4c00;
  --accent-dark: #b34400;
  --accent-subtle: rgba(224, 85, 0, 0.08);
  --accent-subtle-2: rgba(224, 85, 0, 0.12);
  --border: #d8d8e0;
  --border-light: #c8c8d4;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --string-color: rgba(160, 120, 60, 0.15);
  --string-color-strong: rgba(160, 120, 60, 0.45);
  --shadow: rgba(0, 0, 0, 0.1);
  --piano-white: #f8f8f8;
  --piano-white-border: #ccc;
  --piano-white-active: #e0e0e0;
  --piano-black: #333;
  --piano-black-border: #222;
  --piano-black-active: #555;
}

/* Light theme: Hero gradient */
[data-theme="light"] .hero {
  background:
    linear-gradient(135deg, rgba(245,245,247,0.85) 0%, rgba(234,234,239,0.7) 100%),
    url('/images/hero-bg01.jpg') center/cover no-repeat;
  background-color: var(--bg-primary);
}

/* Light theme: Navbar scrolled */
[data-theme="light"] #main-header.scrolled .navbar {
  background: rgba(245, 245, 247, 0.95);
}

/* Light theme: Modal overlay */
[data-theme="light"] .modal-overlay {
  background: rgba(0, 0, 0, 0.3);
}

/* Light theme: Drop zone */
[data-theme="light"] .drop-zone {
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .drop-zone:hover {
  border-color: rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.03);
}

/* Light theme: Glass/transparent backgrounds */
[data-theme="light"] .auth-form input,
[data-theme="light"] .auth-form select {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .reg-option-btn {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .reg-option-btn:hover {
  background: rgba(224, 85, 0, 0.06);
}

[data-theme="light"] .concert-media-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--border);
}

[data-theme="light"] .link-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--border);
}

[data-theme="light"] .link-type-select,
[data-theme="light"] .link-title-input,
[data-theme="light"] .link-url-input,
[data-theme="light"] .link-add-row select,
[data-theme="light"] .link-add-row input {
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--border);
}

[data-theme="light"] .role-select {
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--border);
}

/* Light theme: Toast UI Editor */
[data-theme="light"] .toastui-editor-defaultUI,
[data-theme="light"] .toastui-editor-defaultUI .toastui-editor-main,
[data-theme="light"] .toastui-editor-defaultUI .toastui-editor-md-container,
[data-theme="light"] .toastui-editor-defaultUI .toastui-editor-ww-container {
  background: #ffffff !important;
}

[data-theme="light"] .toastui-editor-defaultUI .toastui-editor-toolbar {
  background: #f5f5f7 !important;
  border-bottom: 1px solid var(--border) !important;
}

[data-theme="light"] .toastui-editor-contents pre {
  background: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .toastui-editor-contents code {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .toastui-editor-contents th {
  background: rgba(0, 0, 0, 0.04);
}

/* Light theme: History filters border */
[data-theme="light"] .history-filters {
  border-color: var(--border);
}

/* Light theme: Badge event type */
[data-theme="light"] .badge-event-type {
  background: rgba(0, 0, 0, 0.06);
}

/* Light theme: Nav user icon hover */
[data-theme="light"] .nav-user-icon:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Light theme: Nav dropdown hover */
[data-theme="light"] .nav-dropdown-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Light theme: Nav user dropdown shadow */
[data-theme="light"] .nav-user-dropdown {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Light theme: Archive dropdown */
[data-theme="light"] .nav-archive-dropdown {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .nav-archive-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Light theme: Mobile menu overlay */
[data-theme="light"] .nav-menu-overlay {
  background: rgba(0, 0, 0, 0.3);
}

/* --- Theme Toggle Button --- */
.nav-dropdown-link.theme-toggle-btn,
.nav-menu-user-link.theme-toggle-btn {
  cursor: pointer;
}

.nav-dropdown-link.theme-toggle-btn:hover {
  color: var(--accent);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  touch-action: manipulation;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  gap: 8px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 102, 0, 0.3);
}

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

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
@media (hover: hover) {
  .btn-outline:hover {
    background: var(--accent);
    color: #fff;
  }
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition);
  background: transparent;
}

#main-header.scrolled .navbar {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  padding: 10px 0;
  box-shadow: 0 2px 20px var(--shadow);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Guitar 6-string background (full width, centered half height) */
.navbar::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 26%;
  height: 48%;
  pointer-events: none;
  background:
    linear-gradient(transparent 0%,    var(--string-color) 0%,    var(--string-color) 1px,            transparent 1px),
    linear-gradient(transparent 20%,   var(--string-color) 20%,   var(--string-color) calc(20% + 1px), transparent calc(20% + 1px)),
    linear-gradient(transparent 40%,   var(--string-color) 40%,   var(--string-color) calc(40% + 1px), transparent calc(40% + 1px)),
    linear-gradient(transparent 60%,   var(--string-color) 60%,   var(--string-color) calc(60% + 1px), transparent calc(60% + 1px)),
    linear-gradient(transparent 80%,   var(--string-color) 80%,   var(--string-color) calc(80% + 1px), transparent calc(80% + 1px)),
    linear-gradient(transparent calc(100% - 1px), var(--string-color) calc(100% - 1px), var(--string-color) 100%);
}

/* Navbar music notes */

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent) !important;
}

.logo-icon-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

/* Logo circle with emphasized 6 strings */
.logo-icon {
  display: block;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}

.logo-wave {
  position: absolute;
  width: 160px;
  height: 20px;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  margin-top: -4px;
  color: #65491a;
  opacity: 0.5;
}

.logo-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent 10%, var(--string-color-strong) 10%, var(--string-color-strong) calc(10% + 1px), transparent calc(10% + 1px)),
    linear-gradient(transparent 27%, var(--string-color-strong) 27%, var(--string-color-strong) calc(27% + 1px), transparent calc(27% + 1px)),
    linear-gradient(transparent 44%, var(--string-color-strong) 44%, var(--string-color-strong) calc(44% + 1px), transparent calc(44% + 1px)),
    linear-gradient(transparent 61%, var(--string-color-strong) 61%, var(--string-color-strong) calc(61% + 1px), transparent calc(61% + 1px)),
    linear-gradient(transparent 78%, var(--string-color-strong) 78%, var(--string-color-strong) calc(78% + 1px), transparent calc(78% + 1px)),
    linear-gradient(transparent 95%, var(--string-color-strong) 95%, var(--string-color-strong) calc(95% + 1px), transparent calc(95% + 1px));
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1px;
  margin: 6px;
}

.nav-link {
  display: block;
  padding: 10px 16px;
  color: var(--text-secondary) !important;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  clip-path: inset(100% 0 0 0);
  animation: navLinkDrop 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes navLinkDrop {
  from { clip-path: inset(100% 0 0 0); transform: translateY(-20px); opacity: 0; }
  to { clip-path: inset(0 0 0 0); transform: translateY(0); opacity: 1; }
}
.nav-menu > li:nth-child(3) .nav-link { animation-delay: 0s; }
.nav-menu > li:nth-child(4) .nav-link { animation-delay: 0.05s; }
.nav-menu > li:nth-child(5) .nav-link { animation-delay: 0.1s; }
.nav-menu > li:nth-child(6) .nav-link { animation-delay: 0.15s; }
.nav-menu > li:nth-child(7) .nav-link { animation-delay: 0.2s; }
.nav-menu > li:nth-child(8) .nav-link { animation-delay: 0.25s; }
.nav-menu > li:nth-child(9) .nav-link { animation-delay: 0.3s; }
.nav-menu > li:nth-child(10) .nav-link { animation-delay: 0.35s; }

button.nav-link {
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.nav-menu-theme-item {
  display: none;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent) !important;
  background: var(--accent-subtle);
}

/* --- Archive Dropdown (Desktop) --- */
.nav-archive-item {
  position: relative;
}

.nav-archive-toggle {
  cursor: pointer;
}

.nav-archive-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 170px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 10000;
  animation: dropdownFade 0.15s ease;
}

.nav-archive-dropdown.open {
  display: block;
}

.nav-archive-link {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}

.nav-archive-link:hover,
.nav-archive-link.active {
  background: rgba(255,255,255,0.05);
  color: var(--accent);
}

.nav-archive-link-icon {
  font-size: 18px;
  margin-right: 8px;
  opacity: 0.7;
}

.nav-archive-link:hover .nav-archive-link-icon,
.nav-archive-link.active .nav-archive-link-icon {
  opacity: 1;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  transition: all var(--transition);
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(10,10,15,0.85) 0%, rgba(18,18,26,0.7) 100%),
    url('/images/hero-bg01.jpg') center/cover no-repeat;
  background-color: var(--bg-primary);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--bg-primary) 80%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 24px;
  max-width: 800px;
}

.hero-title {
  margin-bottom: 24px;
}

.hero-title-sub {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-title-main {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: 1px;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  line-height: 1.9;
  margin-bottom: 36px;
}

.hero-btn {
  padding: 14px 40px;
  font-size: 1rem;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hero-scroll-indicator span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.hero-scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
  0%, 100% { opacity: 1; top: 6px; }
  50% { opacity: 0.3; top: 20px; }
}

/* --- Scroll Animations --- */
[data-scroll] {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-scroll="fade-up"] {
  transform: translateY(40px);
}
[data-scroll="fade-down"] {
  transform: translateY(-30px);
}
[data-scroll="fade-right"] {
  transform: translateX(-40px);
}
[data-scroll="fade-left"] {
  transform: translateX(40px);
}
[data-scroll].is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* --- Sections --- */
.section {
  padding: 100px 0;
}

.section-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 48px;
}

.section-more {
  display: block;
  width: fit-content;
  margin: 48px auto 0;
}

/* --- History Section (Home) --- */
.section-history {
  background: var(--bg-secondary);
}

.history-timeline-mini {
  max-width: 700px;
  margin: 0 auto;
}

.timeline-item-mini {
  display: flex;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

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

.timeline-year-mini {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 60px;
}

.timeline-content-mini {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Concert Grid --- */
.concert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.concert-grid-full {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.concert-card {
  display: block;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition);
  color: var(--text-primary) !important;
}

.concert-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
  border-color: var(--accent-dark);
}

.concert-card-thumb {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-secondary);
}

.concert-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.concert-card:hover .concert-card-thumb img {
  transform: scale(1.05);
}

.concert-card-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
}

.concert-card-info {
  padding: 16px;
}

.concert-card-year {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-subtle-2);
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.concert-card-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

/* --- Concert Filters --- */
.concert-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  justify-content: center;
}

.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

/* --- Notice Slider --- */
.section-notice {
  background: var(--bg-secondary);
}

.notice-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-container {
  overflow: hidden;
  flex: 1;
}

.slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-slide {
  flex: 0 0 33.333%;
  padding: 8px;
}

.slider-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.slider-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}


.notice-card {
  height: 300px;
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 180px;
  transition: all var(--transition);
  color: var(--text-primary) !important;
}

.notice-card:hover {
  border-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

.notice-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.notice-card-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 10px 0;
  line-height: 1.4;
}

.notice-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Dashboard --- */
.dash-hero {
  padding: 90px 24px 24px;
  background:
    linear-gradient(135deg, rgba(10,10,15,0.85) 0%, rgba(18,18,26,0.7) 100%),
    url('/images/hero-bg01.jpg') center/cover no-repeat;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .dash-hero {
  background:
    linear-gradient(135deg, rgba(245,245,247,0.85) 0%, rgba(234,234,239,0.7) 100%),
    url('/images/hero-bg01.jpg') center/cover no-repeat;
  background-color: var(--bg-primary);
}

.dash-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-hero-btns {
  display: flex;
  gap: 8px;
}

.dash-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.dash-hero-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 4px 0 0;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  padding: 24px 16px 60px;
}

.dash-span-full {
  grid-column: 1 / -1;
}

.dash-top-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dash-top-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-top-left > .dash-card {
  flex: 3;
  display: flex;
  flex-direction: column;
}

.dash-top-left > .dash-card:nth-child(2),
.dash-top-left > .dash-msg-room-row {
  flex: 2;
}

.dash-msg-room-row {
  display: flex;
  gap: 12px;
}

.dash-half-card {
  flex: 1;
  min-width: 0;
}

.dash-top-left > .dash-card > div:last-child {
  flex: 1;
}

@media (max-width: 768px) {
  .dash-top-row {
    grid-template-columns: 1fr;
  }
}

#dashRoom, #dashMessages {
  padding: 8px 12px;
}

.dash-room-help {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  transition: color var(--transition), border-color var(--transition);
  cursor: pointer;
}

.dash-room-help:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.dash-room-members {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-room-member {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 3px;
  background: var(--glass-border);
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}

.dash-room-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.dash-room-avatar-icon {
  width: 20px;
  height: 20px;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-muted);
  flex-shrink: 0;
}

.dash-room-member:hover {
  background: var(--accent);
  color: #fff;
}

.dash-room-dot {
  margin-left: 3px;
  font-size: 14px;
  vertical-align: middle;
  color: var(--accent);
}

.dash-room-tooltip {
  display: none;
  position: fixed;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
  z-index: 99999;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.room-status-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.room-status-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.room-status-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.room-status-avatar-placeholder .material-symbols-outlined {
  font-size: 1.6rem;
}

.room-status-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dash-room-action {
  margin-top: 8px;
  text-align: right;
}

.dash-span-main {
  grid-column: 1;
}

.dash-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.dash-card-accent {
}

.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.dash-card-head h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.dash-card-head h3 .material-symbols-outlined {
  font-size: 1.2rem;
  color: var(--accent);
}

.dash-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
  white-space: nowrap;
}

.dash-link:hover {
  color: var(--accent);
}

/* Dashboard: Concert Featured */
.dash-concert-featured {
  display: flex;
  gap: 24px;
  padding: 20px;
  color: var(--text-primary) !important;
  transition: background var(--transition);
}

.dash-concert-featured:hover {
  background: var(--bg-card-hover);
}

.dash-concert-thumb {
  width: 200px;
  min-height: 200px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.dash-concert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-concert-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.dash-concert-no-img .material-symbols-outlined {
  font-size: 3rem;
}

.dash-concert-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-concert-badge {
  display: inline-block;
  width: fit-content;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: 1px;
  animation: dashBadgePulse 2s ease-in-out infinite;
}

@keyframes dashBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 102, 0, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 102, 0, 0); }
}

.dash-concert-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 4px 0;
}

.dash-concert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.dash-concert-meta > span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dash-concert-meta .material-symbols-outlined {
  font-size: 1rem;
  color: var(--accent);
}

.dash-concert-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 4px 0;
}

.dash-concert-stats {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.dash-concert-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
}

.dash-concert-more {
  display: flex;
  gap: 8px;
  padding: 0 20px 16px;
  overflow-x: auto;
}

.dash-concert-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary) !important;
  white-space: nowrap;
  transition: background var(--transition);
}

.dash-concert-mini:hover {
  background: var(--bg-card-hover);
}

.dash-concert-mini-badge {
  background: var(--accent-subtle-2);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 10px;
}

.dash-concert-mini-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Dashboard: Notice List */
.dash-notice-list {
  display: flex;
  flex-direction: column;
}

.dash-notice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary) !important;
  transition: background var(--transition);
}

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

.dash-notice-item:hover {
  background: var(--bg-card-hover);
}

.dash-notice-title {
  font-size: 0.95rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-notice-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Dashboard: Board Tabs */
.dash-board-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.dash-board-tab {
  padding: 6px 16px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  white-space: nowrap;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-board-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.dash-board-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.dash-board-badge {
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 10px;
}

.dash-board-tab:not(.active) .dash-board-badge {
  background: var(--accent-subtle-2);
  color: var(--accent);
}

/* Dashboard: Post List */
.dash-post-list {
  display: flex;
  flex-direction: column;
}

.dash-post-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary) !important;
  transition: background var(--transition);
}

.dash-post-body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-post-main {
  min-width: 0;
  overflow: hidden;
}

.dash-post-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 66px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.dash-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 480px) {
  .dash-post-item { padding: 10px 12px; gap: 10px; }
  .dash-post-thumb { width: 64px; height: 44px; }
}

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

.dash-post-item:hover {
  background: var(--bg-card-hover);
}

.dash-post-title {
  font-weight: 500;
  font-size: 0.95rem;
}

.dash-post-content {
  font-size: 0.85rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-post-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dash-post-comments {
  color: var(--accent);
  font-weight: 500;
}

.dash-card-head .dash-link .material-symbols-outlined {
  font-size: 1.1rem;
  vertical-align: middle;
}

/* Dashboard: Picture Grid */
.dash-pic-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 16px;
}

.dash-pic-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--bg-secondary);
}

.dash-pic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.dash-pic-item:hover img {
  transform: scale(1.08);
}

.dash-pic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 8px;
  opacity: 0;
  transition: opacity var(--transition);
}

.dash-pic-item:hover .dash-pic-overlay {
  opacity: 1;
}


.dash-pic-overlay span {
  font-size: 0.75rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.dash-pic-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* Dashboard: Messages */
.dash-msg-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  color: var(--text-primary) !important;
  transition: background var(--transition);
}

.dash-msg-summary:hover {
  background: var(--bg-card-hover);
}

.dash-msg-icon-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-msg-icon-wrap .material-symbols-outlined {
  font-size: 1.4rem;
  color: var(--text-muted);
}

.dash-msg-icon-wrap.has-unread .material-symbols-outlined {
  color: var(--accent);
}

.dash-msg-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--error);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.dash-msg-summary strong {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.dash-msg-summary small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Dashboard: Tools List */
.dash-tools-list {
  display: flex;
  flex-direction: column;
}

.dash-tool-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.dash-tool-link:last-child {
  border-bottom: none;
}

.dash-tool-link:hover {
  background: var(--bg-card-hover);
}

.dash-tool-link .material-symbols-outlined {
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
}

.dash-tool-link strong {
  font-size: 0.9rem;
  display: block;
}

.dash-tool-link small {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.dash-tools-horizontal {
  flex-direction: row;
  flex-wrap: wrap;
}

.dash-tools-horizontal .dash-tool-link {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  flex: 1 1 auto;
  min-width: 140px;
  padding: 12px 16px;
}

.dash-pamphlet-link {
  display: block;
  text-align: center;
}

.dash-pamphlet-img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.dash-pamphlet-caption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.dash-pamphlet-year {
  color: var(--accent);
  font-weight: 600;
}

/* Dashboard: Quick Post (inline at bottom of board posts) */
.dash-qp-wrap {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
}

.dash-qp-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-qp-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.dash-qp-input {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  width: 100px;
  flex-shrink: 0;
}

.dash-qp-form > .dash-qp-input {
  width: 100%;
}

.dash-qp-textarea {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  resize: none;
  min-height: 36px;
  max-height: 80px;
}

.dash-qp-input:focus,
.dash-qp-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.dash-qp-anon {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.dash-qp-anon input {
  accent-color: var(--accent);
}

.dash-qp-submit {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .dash-qp-row {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-qp-input {
    width: 100%;
  }
}

/* Dashboard: Responsive */
@media (max-width: 1024px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }

  .dash-span-main {
    grid-column: 1;
  }

  .dash-concert-featured {
    flex-direction: column;
  }

  .dash-concert-thumb {
    width: 100%;
    min-height: 160px;
    max-height: 240px;
  }
}

@media (max-width: 640px) {
  .dash-grid {
    padding-left: 12px;
    padding-right: 12px;
    gap: 16px;
  }

  .dash-top-row {
    gap: 16px;
  }

  .dash-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .dash-pic-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .dash-hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .dash-concert-title {
    font-size: 1.1rem;
  }

  .dash-msg-icon-wrap {
    display: none;
  }
}

/* --- Page Hero (Sub pages) --- */
.page-hero {
  padding: 140px 24px 60px;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1rem;
}

.page-hero-small {
  padding: 80px 24px 16px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}
.page-hero-small h1 {
  font-size: 1.4rem;
  margin-bottom: 0;
}
.page-hero-small p {
  font-size: 0.85rem;
}

.page-content {
  padding: 30px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* --- About Page --- */
.about-section {
  max-width: 900px;
  margin: 0 auto;
}

.about-block {
  margin-bottom: 60px;
}

.about-block h2 {
  font-family: var(--font-sans);
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.about-block p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 12px;
}

.about-activities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.activity-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}

.activity-card:hover {
  border-color: var(--accent-dark);
  transform: translateY(-4px);
}

.activity-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.activity-img {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

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

.activity-card:hover .activity-img img {
  transform: scale(1.05);
}

.about-group-photo {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
}

.about-group-photo img {
  width: 100%;
  display: block;
}

.about-photo-download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted) !important;
  transition: color var(--transition);
}

.about-photo-download:hover {
  color: var(--accent) !important;
}

.activity-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.activity-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- History Page (Timeline) --- */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-group {
  margin-bottom: 40px;
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
  padding-left: 60px;
  margin-bottom: 16px;
  position: relative;
}

.timeline-year::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 12px;
}

.timeline-dot {
  position: absolute;
  left: 26px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--text-muted);
}

.timeline-content {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  background: var(--bg-card);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.timeline-show-all {
  text-align: center;
  padding: 32px 0 16px;
}

/* --- Notice List --- */
.notice-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
  color: var(--text-primary) !important;
  gap: 20px;
}

.notice-list-item:hover {
  background: var(--bg-card);
}

.notice-list-item:first-child {
  border-top: 1px solid var(--border);
}

.notice-list-info h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.notice-list-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

/* --- Detail Article --- */
.detail-article {
  max-width: 800px;
  margin: 0 auto 48px;
}

.detail-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.detail-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.detail-date, .detail-year {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.detail-year {
  display: inline-block;
  color: var(--accent);
  background: var(--accent-subtle-2);
  padding: 2px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.detail-body {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.9;
}

.detail-images {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-image-item img {
  width: 100%;
  max-width: 800px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border);
}

.concert-scroll-btns {
  position: fixed;
  right: 12px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 90;
}
.concert-scroll-fab {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.concert-scroll-fab:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.concert-img-hidden {
  display: none;
}

.concert-img-show-all {
  margin-top: 16px;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
}

.detail-attachments {
  margin-top: 32px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.detail-attachments h4 {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.attachment-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--accent) !important;
  font-size: 0.95rem;
}

.attachment-icon {
  font-size: 1.2rem;
}

.detail-nav {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 20px;
}

.detail-nav-top {
  text-align: right;
  padding-top: 0;
  padding-bottom: 12px;
}

/* --- Comments --- */
.comments-section {
  max-width: 800px;
  margin: 0 auto 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.comments-section h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.comment-count {
  color: var(--accent);
  font-size: 0.9rem;
}

.comment-form {
  margin-bottom: 32px;
}

.comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color var(--transition);
}

.comment-form-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: nowrap;
}

.comment-form-row .btn {
  flex-shrink: 0;
}

.comment-anon-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  flex: 1;
}

.comment-login-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 10px 0;
}

.comment-login-hint a {
  color: var(--accent);
  text-decoration: none;
}

.comment-login-hint a:hover { text-decoration: underline; }

.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

/* 관리 모드 삭제 버튼 — 기본 숨김, admin-mode에서 표시 */
.comment-admin-del {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px;
  border-radius: 4px;
  margin-left: auto;
  transition: color 0.15s, background 0.15s;
}
.comment-admin-del .material-symbols-outlined { font-size: 16px; }
.comment-admin-del:hover { color: var(--error); background: rgba(255,80,80,0.1); }
body.admin-mode .comment-admin-del, .comment-own-del { display: inline-flex; }

/* 관리 모드 상태 표시 배지 */
body.admin-mode::after {
  content: '관리 모드';
  position: fixed;
  bottom: 16px;
  left: 16px;
  background: var(--error, #e53935);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 9999;
  pointer-events: none;
  letter-spacing: 0.03em;
}

/* 관리 모드 버튼 활성 상태 */
.admin-mode-btn.active {
  color: var(--error, #e53935) !important;
}
.admin-mode-btn.active .material-symbols-outlined {
  color: var(--error, #e53935);
}

.comment-nickname {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--accent);
}

.comment-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Free Talk --- */
.freetalk-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 12px;
  margin-bottom: 10px;
}

.freetalk-form-row {
  position: relative;
}

.ft-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ft-author-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.ft-submit-fade {
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
}

.ft-submit-fade.visible {
  opacity: 1;
  pointer-events: auto;
}

.ft-author-row input[type="text"] {
  padding: 8px 12px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  background: var(--bg-input);
  max-width: 200px;
}

.freetalk-form input,
.freetalk-form textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color var(--transition);
}

.freetalk-form input:focus,
.freetalk-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.char-count {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.char-count .over {
  color: var(--danger);
}

.freetalk-item {
  padding: 16px 24px;
  margin: 0 -24px;
  border-top: 1px solid var(--border);
  transition: background var(--transition);
}

.freetalk-item.bd-active {
  background: rgba(255, 102, 0, 0.08);
  border-left: 3px solid var(--accent);
  padding-left: 21px;
}

.freetalk-item.bd-pinned {
  border-left: 3px solid var(--accent);
  background: rgba(255, 102, 0, 0.05);
  font-weight: 600;
}

.freetalk-item.bd-highlighted {
  background: rgba(255, 200, 0, 0.09);
  font-weight: 600;
}

.bd-pin-icon {
  font-size: 0.85rem;
  margin-right: 4px;
  opacity: 0.8;
}

.bd-admin-pin-btn, .bd-admin-hl-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 1px 5px;
  opacity: 0.4;
  transition: opacity 0.15s, background 0.15s;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.4;
}

.bd-admin-pin-btn:hover, .bd-admin-hl-btn:hover {
  opacity: 0.9;
  background: var(--bg-hover);
}

.bd-admin-pin-btn.active {
  opacity: 1;
  background: rgba(255, 102, 0, 0.15);
  border-color: var(--accent);
}

.bd-admin-hl-btn.active {
  opacity: 1;
  background: rgba(255, 200, 0, 0.2);
  border-color: #ffc800;
}

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

.freetalk-nickname {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.ft-anonymous {
  font-style: italic;
  color: var(--text-muted);
}

.ft-anon-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.ft-anon-check {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}

.freetalk-date {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.ft-separator {
  color: var(--text-muted);
  opacity: 0.4;
  font-size: 0.75rem;
}

.freetalk-content-wrap {
  position: relative;
}

.freetalk-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

.ft-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-thumb-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.yt-thumb-link {
  position: relative;
  display: inline-block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  line-height: 0;
}

.yt-thumb-img {
  width: 200px;
  height: auto;
  display: block;
  transition: opacity 0.15s;
}

.yt-thumb-link:hover .yt-thumb-img {
  opacity: 0.8;
}

.ft-img-thumb-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.ft-img-thumb-link {
  display: inline-block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  line-height: 0;
  cursor: pointer;
}

.ft-img-thumb {
  width: 180px;
  max-height: 180px;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s;
}

.ft-img-thumb-link:hover .ft-img-thumb {
  opacity: 0.8;
}

.ft-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ft-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 14px 6px;
  z-index: 10000;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: background 0.15s;
  line-height: 1;
}
.ft-lb-arrow:hover { background: rgba(0, 0, 0, 0.75); }
.ft-lb-arrow .material-symbols-outlined { font-size: 2rem; }
.ft-lb-prev { left: 16px; }
.ft-lb-next { right: 16px; }
.ft-lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  pointer-events: none;
}

.ft-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.ft-lb-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 6px 14px;
  color: #fff;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.2s;
}
.ft-lb-link:hover {
  background: rgba(255,255,255,0.3);
}
.ft-lb-link .material-symbols-outlined {
  font-size: 16px;
}

.yt-thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
}

.yt-thumb-play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 7px 0 7px 13px;
  border-color: transparent transparent transparent #fff;
}

/* User Profile Popup */
.freetalk-nickname.clickable,
.ft-comment-nick.clickable,
.comment-nickname.clickable {
  cursor: pointer;
  transition: color 0.2s;
}
.freetalk-nickname.clickable:hover,
.ft-comment-nick.clickable:hover,
.comment-nickname.clickable:hover {
  color: var(--accent);
  text-decoration: underline;
}

.user-popup-modal .modal-container {
  max-width: 340px;
  padding: 0;
}
.user-popup-modal .modal-body {
  padding: 0;
}
.user-popup-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 24px;
  text-align: center;
}
.user-popup-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-popup-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-popup-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-muted);
}
.user-popup-avatar-placeholder .material-symbols-outlined {
  font-size: 40px;
}
.user-popup-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.user-popup-name-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}
.user-popup-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}
.user-popup-gen {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.user-popup-nickname {
  font-size: 0.9rem;
  color: var(--accent);
}
.user-popup-phone {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.user-popup-phone-masked {
  cursor: pointer;
  border-bottom: 1px dashed var(--text-muted);
  transition: color 0.2s;
}
.user-popup-phone-masked:hover {
  color: var(--accent);
}
.user-popup-phone-limit {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.user-popup-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 10px 0 6px;
  width: 100%;
}

.user-popup-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Members Page */
.members-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.members-header .page-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.3rem;
}
.members-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.members-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
}
.members-search-wrap .material-symbols-outlined {
  font-size: 18px;
  color: var(--text-muted);
}
.members-search {
  border: none;
  background: none;
  color: var(--text-primary);
  outline: none;
  font-size: 0.9rem;
  width: 140px;
}
.members-filter {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.members-gen-group {
  margin-bottom: 24px;
}
.members-gen-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.members-gen-count {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.member-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}
.member-card {
  position: relative;
}
.member-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-online-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border: 2px solid var(--bg-card);
  border-radius: 50%;
}
.member-card-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.member-card-avatar-placeholder {
  color: var(--text-muted);
}
.member-card-avatar-placeholder .material-symbols-outlined {
  font-size: 28px;
}
.member-card-info {
  min-width: 0;
  flex: 1;
}
.member-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-card-me {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 0 4px;
  margin-left: 4px;
  vertical-align: middle;
}
.member-card-nick {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.member-card-lv-icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 480px) {
  .members-controls { flex-wrap: wrap; width: 100%; }
  .members-search-wrap { flex: 1; }
  .members-search { width: 100%; }
  .members-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .member-card { padding: 10px; gap: 8px; }
  .member-card-avatar { width: 36px; height: 36px; }
}

.ft-more-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 2px;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.ft-more-btn:hover {
  opacity: 1;
  text-decoration: underline;
}

.ft-load-more {
  text-align: center;
  padding: 20px 0;
}

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

.ft-fade-in {
  animation: ftFadeIn 0.4s ease forwards;
}

.ft-deleted {
  color: var(--text-muted) !important;
  font-style: italic;
}

.ft-edit-textarea {
  width: 100%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 0.95rem;
  line-height: 1.7;
  font-family: var(--font-sans);
  resize: vertical;
}

.ft-edit-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.ft-edit-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.ft-comment-edit-form {
  margin-top: 4px;
}

.ft-comment-edit-input {
  width: 100%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.88rem;
  font-family: var(--font-sans);
}

.ft-comment-edit-input:focus {
  outline: none;
  border-color: var(--accent);
}

.ft-write-comment-btn {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.7;
}

.ft-write-comment-btn:hover {
  opacity: 1;
  color: var(--accent);
}

.ft-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.ft-search-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  transition: all var(--transition);
}

.ft-search-toggle:hover {
  border-color: var(--accent);
}

.ft-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.ft-search-bar input[type="text"] {
  flex: 1;
  max-width: 300px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--bg-input);
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.ft-search-bar input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

.ft-search-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.ft-search-btn:hover {
  opacity: 0.9;
}

.ft-search-clear {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.ft-search-clear:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.ft-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.ft-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}

.ft-paging-toggle {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  margin-left: auto;
}

.ft-paging-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.ft-login-notice {
  text-align: center;
  padding: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.ft-login-notice a {
  color: var(--accent);
  text-decoration: underline;
}

.ft-top-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 6px;
}

.ft-top-row .freetalk-nickname {
  margin-right: auto;
}

.ft-bottom-row {
  margin-top: -10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.ft-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.ft-action-btn:hover {
  color: var(--accent);
  background: var(--accent-subtle);
}

.ft-delete-btn:hover {
  color: var(--danger);
  background: rgba(224, 85, 85, 0.1);
}

.ft-comment-toggle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ft-comment-badge {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.ft-view-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.bl-view {
  width: 50px;
  text-align: center;
}

.ft-comments-area {
  margin: 12px 0px 0px 20px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--bg-secondary);
}

.ft-comments-list {
  margin-bottom: 12px;
}

.ft-comment {
  padding: 8px 0;
}

.ft-comment-reply {
  border-left: 2px solid var(--border);
  padding-left: 12px;
}

.ft-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.ft-comment-nick {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.ft-comment-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ft-comment-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ft-no-comments {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 8px 0;
}

.ft-comment-form-inline {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.ft-reply-inline {
  margin: 8px 0;
}

.ft-comment-form-inline input,
.ft-comment-form-inline textarea {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  transition: border-color var(--transition);
}

.ft-comment-form-inline input:focus,
.ft-comment-form-inline textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.ft-ci-nick {
  width: 100px;
  flex-shrink: 0;
}

.ft-ci-text {
  flex: 1;
  min-width: 0;
  resize: vertical;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.5;
}

textarea.ft-comment-edit-input {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  resize: vertical;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1.5;
}

textarea.ft-comment-edit-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* --- Board Tab Bar & List Mode --- */
.board-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.board-tab {
  padding: 10px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--transition);
}

.board-tab:hover {
  color: var(--text-primary);
}

.board-tab {
  position: relative;
}

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

.board-tab-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
  color: #fff;
  background: #2b2b2b;
  border-radius: 7px;
}

.bd-new-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 0 4px;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 14px;
  color: #fff;
  background: var(--accent);
  border-radius: 3px;
  vertical-align: middle;
}

.board-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.bd-cat-filter {
  display: flex;
  align-items: center;
}

.bd-cat-select {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.85rem;
}

.bd-cat-label {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  margin-left: auto;
}

.bd-post-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.bd-title-input {
  width: 100%;
  padding: 10px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 8px;
  transition: border-color var(--transition);
}

.bd-title-input:focus {
  outline: none;
  border-color: var(--accent);
}

.bd-post-cat-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.85rem;
}

.bd-list-write-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.bd-search-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
}

.bd-search-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  display: flex;
  align-items: center;
}
.bd-search-icon-btn:hover {
  color: var(--accent);
}
.bd-search-icon-btn .material-symbols-outlined {
  font-size: 22px;
}

.bd-search-inline-input {
  width: 150px;
  padding: 5px 10px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.bd-search-inline-input:focus {
  outline: none;
  border-color: var(--accent);
}

.board-list-table {
  width: 100%;
  border-collapse: collapse;
}

.board-list-table th {
  padding: 8px 12px;
  border-bottom: 2px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: left;
  white-space: nowrap;
}

.board-list-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.board-list-row {
  cursor: pointer;
  transition: background var(--transition);
}

.board-list-row:hover {
  background: var(--bg-hover);
}

.board-list-row.bd-active {
  background: rgba(255, 102, 0, 0.1) !important;
  border-left: 3px solid var(--accent);
}

.board-list-row.bd-pinned {
  border-left: 3px solid var(--accent);
  background: rgba(255, 102, 0, 0.05);
  font-weight: 600;
}

.board-list-row.bd-highlighted {
  background: rgba(255, 200, 0, 0.09);
  font-weight: 600;
}

.bl-pin-icon {
  font-size: 0.8rem;
  margin-right: 4px;
  opacity: 0.8;
}

.bl-title .bd-admin-pin-btn,
.bl-title .bd-admin-hl-btn {
  float: right;
  margin-left: 4px;
}

.bl-no { width: 40px; text-align: center; color: var(--text-muted); }
.bl-cat { width: 50px; font-size: 0.85rem; text-align: center; }
.bd-cat-icon { font-size: 20px; color: var(--accent); vertical-align: middle; }
.bd-mypost-board { font-size: 0.78rem; color: var(--text-muted); }
.bl-author { width: 80px; font-size: 0.85rem; }
.bl-date { width: 100px; font-size: 0.82rem; color: var(--text-muted); }
.bl-comment { width: 50px; text-align: center; font-size: 0.85rem; color: var(--text-muted); }

.bd-detail-modal .modal-container {
  max-width: 800px;
}

/* 상세보기 페이지 (list mode) */
.bd-detail-spacer {
  padding-top: 64px;
}
.bd-detail-page {
  max-width: var(--max-width);
}

.bd-detail-back {
  margin-bottom: 20px;
}
.bd-detail-back-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  margin-bottom: 0;
}

.bd-detail-back .material-symbols-outlined {
  font-size: 16px;
  vertical-align: middle;
}

/* Board post link inline popup icon */
.bd-inline-link-btn {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 3px;
  color: var(--accent);
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s;
  text-decoration: none;
}
.bd-inline-link-btn:hover {
  opacity: 1;
}
.bd-inline-link-btn .material-symbols-outlined {
  font-size: 15px;
}

/* Post popup modal */
.bd-post-popup-modal .modal-container {
  max-width: 680px;
}
.bd-popup-detail {
  padding: 4px 0;
}
.bd-popup-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.bd-popup-goto {
  margin-top: 16px;
  text-align: right;
}

.bd-modal-detail {
  padding: 8px 0;
}

.bd-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.bd-modal-body {
  min-height: 200px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.bd-modal-comments {
  margin-top: 8px;
}

.bd-modal-edit {
  padding: 4px 0;
}

.bd-modal-edit h3 {
  margin-bottom: 12px;
}

.bd-config-modal .modal-container {
  max-width: 560px;
}

.bd-config-form .form-group {
  margin-bottom: 10px;
}

.bd-config-form .form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.bd-config-form .form-group input,
.bd-config-form .form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* Board - Upload Area */
.bd-upload-area {
  margin: 8px 0;
  padding: 8px;
  border: 2px dashed transparent;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}
.bd-upload-area.drag-over {
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.bd-upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.bd-upload-label {
  cursor: pointer;
  white-space: nowrap;
}
.bd-upload-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.bd-img-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bd-img-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.bd-img-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bd-remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bd-remove-btn:hover {
  background: var(--error);
}
.bd-img-idx {
  position: absolute;
  bottom: 2px;
  left: 2px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bd-insert-btn {
  position: absolute;
  top: 2px;
  left: 2px;
  height: 20px;
  border-radius: 10px;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  padding: 0 6px;
  display: flex;
  align-items: center;
}
.bd-insert-btn:hover {
  background: var(--accent);
}
.bd-file-preview-item .bd-insert-btn {
  position: static;
  margin-left: 8px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 4px;
}
.bd-file-preview-item .bd-insert-btn:hover {
  background: var(--accent);
  color: #fff;
}
.bd-inline-img-wrap {
  margin: 12px 0;
  text-align: center;
}
.bd-inline-img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.bd-file-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bd-file-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.bd-file-preview-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bd-file-preview-item .bd-remove-btn {
  position: static;
  flex-shrink: 0;
}
.bd-existing-files {
  margin: 8px 0;
}

/* Board - Post Images */
.bd-post-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
}
.bd-post-img-thumb {
  width: var(--bd-thumb-w, 200px);
  height: auto;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: opacity 0.2s;
  object-fit: cover;
}
.bd-post-img-thumb:hover {
  opacity: 0.85;
}

/* Board - Post Attachments */
.bd-post-attachments {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 4px;
}
.bd-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  width: fit-content;
}
.bd-attachment-link:hover {
  background: var(--bg-hover);
}
.bd-file-size {
  color: var(--text-secondary);
  font-size: 0.8rem;
}
.bd-attachment-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bd-pdf-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: var(--bg-primary);
}

.bd-score-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: rgba(255, 102, 0, 0.12);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.bd-score-btn:hover {
  background: var(--accent);
  color: #fff;
}
.bd-score-btn .material-symbols-outlined {
  font-size: 16px;
}

/* --- AlphaTab Score Viewer --- */
.at-overlay-wrap {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10000;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}
/* CSS fullscreen fallback (iOS Safari etc.) */
.at-overlay-wrap.at-fs-fallback {
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 2147483647;
}
.at-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 4px;
  overflow-x: auto;
}
.at-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}
.at-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.at-ctrl-btn {
  padding: 6px 11px !important;
  min-width: 42px;
  font-size: 1.12rem;
  font-weight: 600;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.at-ctrl-btn .material-symbols-outlined {
  font-size: 22px;
}
.at-close-btn {
  margin-left: 4px;
}
.at-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 2px;
  flex-shrink: 0;
}
/* Play button with speed sub-label */
.at-play-btn {
  flex-direction: column;
  gap: 0;
  padding: 4px 11px !important;
}
.at-speed-sub {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
/* Loop buttons */
.at-loop-btn {
  flex-direction: column;
  gap: 0;
  padding: 4px 10px !important;
}
.at-ctrl-btn.at-loop-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.at-loop-bar {
  display: block;
  font-size: 0.55rem;
  line-height: 1;
  opacity: 0.85;
}
.at-loop-clear {
  padding: 2px 4px !important;
}
/* Page nav */
.at-page-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.at-page-info {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: center;
}
/* Notation mode toggle */
.at-notation-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.at-notation-wrap .at-ctrl-btn {
  font-size: 0.72rem;
  padding: 3px 6px !important;
}
.at-ctrl-btn.at-notation-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
/* Track popup */
.at-track-badge {
  font-size: 0.72rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.at-track-popup {
  position: fixed;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  z-index: 10050;
  min-width: 260px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.at-track-popup-actions {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.at-track-popup-actions .at-ctrl-btn {
  font-size: 0.72rem !important;
  padding: 3px 8px !important;
  gap: 4px;
  display: inline-flex;
  align-items: center;
}
.at-track-list {
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 300px;
}
.at-track-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.at-track-row:hover {
  background: var(--bg-card);
}
.at-track-icon {
  font-size: 18px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.at-track-name {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.at-track-solo-btn {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.at-track-solo-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.at-track-solo-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.at-track-vis-btn,
.at-track-mute-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.at-track-vis-btn:hover,
.at-track-mute-btn:hover {
  background: var(--bg-hover, rgba(255,255,255,0.08));
  color: var(--text-primary);
}
.at-track-vis-btn.active {
  color: var(--accent);
}
.at-track-mute-btn.muted {
  color: var(--error);
}
.at-track-vis-btn .material-symbols-outlined,
.at-track-mute-btn .material-symbols-outlined {
  font-size: 18px;
}

.at-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 12px;
  flex-shrink: 0;
}
.at-loading-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.at-loading-bar {
  width: 200px;
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  overflow: hidden;
}
.at-loading-progress {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s ease;
}
.at-player-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.at-viewport {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  position: relative;
}

/* AlphaTab cursor: current bar highlight */
.at-cursor-bar {
  background: rgba(255, 102, 0, 0.12) !important;
  border-left: 3px solid var(--accent) !important;
}
/* AlphaTab cursor: current beat/note indicator */
.at-cursor-beat {
  background: var(--accent) !important;
  opacity: 0.8;
  width: 4px !important;
  border-radius: 2px;
}
/* AlphaTab active beat highlighting */
.at-highlight * {
  fill: var(--accent) !important;
}

@media (max-width: 640px) {
  .at-header {
    padding: 6px 8px;
    flex-wrap: wrap;
  }
  .at-player-bar {
    padding: 5px 8px;
    gap: 3px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .at-player-bar .at-ctrl-btn {
    min-width: 36px;
    height: 36px;
    padding: 4px 8px !important;
    font-size: 0.95rem;
  }
  .at-player-bar .at-ctrl-btn .material-symbols-outlined {
    font-size: 18px;
  }
  .at-title {
    font-size: 0.8rem;
    width: 100%;
    flex-shrink: 0;
  }
  .at-time {
    min-width: 70px;
    font-size: 0.75rem;
  }
  .at-speed-label {
    font-size: 0.72rem;
    min-width: 28px;
  }
  .at-page-info {
    font-size: 0.72rem;
  }
  .at-notation-wrap .at-ctrl-btn {
    font-size: 0.68rem;
    padding: 2px 4px !important;
  }
  .at-track-popup {
    min-width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    left: 8px !important;
    right: auto !important;
  }
  .at-track-list {
    max-height: 50vh;
  }
}

@media (max-width: 640px) {
  .board-list-table th,
  .board-list-table td {
    padding: 8px 6px;
    font-size: 0.82rem;
  }
  .bl-no, .bl-view, .bl-date { display: none; }
  .bl-author {
    width: auto;
    max-width: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .bl-cat { width: 32px; }
  .board-tab {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  .bd-post-img-thumb {
    width: calc(var(--bd-thumb-w, 200px) * 0.7);
  }
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
}

.page-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.page-btn:hover,
.page-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

/* --- Admin --- */
.admin-login-form {
  max-width: 400px;
  margin: 40px auto;
  text-align: center;
}

.admin-login-form h2 {
  font-family: var(--font-sans);
  margin-bottom: 24px;
}

.admin-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  margin-bottom: 16px;
  text-align: center;
}

.admin-input:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-error {
  color: var(--danger);
  margin-top: 12px;
  font-size: 0.9rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
}

.tab-btn {
  padding: 10px 24px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.tab-btn:hover,
.tab-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.admin-section-header h3 {
  font-size: 1.2rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.admin-table th {
  color: var(--text-muted);
  font-weight: 500;
  background: var(--bg-card);
}

.admin-table td {
  color: var(--text-secondary);
}

.admin-actions {
  white-space: nowrap;
}

.admin-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  margin: 28px 0 12px;
}
.admin-section-title:first-child {
  margin-top: 0;
}
.admin-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.admin-badge {
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 500;
  margin-left: 8px;
}
.badge-warning {
  background: rgba(255, 152, 0, 0.15);
  color: var(--warning);
}
.badge-ok {
  background: rgba(76, 175, 80, 0.15);
  color: var(--success);
}
.admin-file-stats .table-wrap {
  overflow-x: auto;
}
.admin-file-stats .total-row {
  font-weight: 700;
  border-top: 2px solid var(--accent);
  background: rgba(255, 102, 0, 0.08);
}
.admin-file-stats .total-row td {
  color: var(--accent);
}

.admin-form .form-group {
  margin-bottom: 20px;
}

.admin-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-form input[type="file"] {
  padding: 10px;
}

.existing-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin-bottom: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  transition: opacity var(--transition);
}

.file-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

/* Pamphlet gallery */
.pamphlet-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  min-height: 40px;
}

.pamphlet-item {
  position: relative;
  width: 140px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: opacity 0.2s, transform 0.2s;
  cursor: grab;
}

.pamphlet-item.dragging {
  opacity: 0.4;
  transform: scale(0.95);
}

.pamphlet-item.deleted {
  pointer-events: none;
}

.pamphlet-preview {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.pamphlet-overlay-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.pamphlet-item:hover .pamphlet-overlay-actions {
  opacity: 1;
}

.pamphlet-thumb-btn,
.pamphlet-delete-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.pamphlet-thumb-btn {
  background: rgba(0,0,0,0.6);
  color: #888;
}

.pamphlet-thumb-btn:hover,
.pamphlet-thumb-btn.active {
  background: rgba(0,0,0,0.8);
  color: var(--accent);
}

.pamphlet-delete-btn {
  background: rgba(180,40,40,0.8);
  color: #fff;
}

.pamphlet-delete-btn:hover {
  background: rgba(220,50,50,0.95);
}

.pamphlet-name {
  display: block;
  padding: 4px 8px 6px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Drop zone */
.drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  margin-top: 10px;
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.03);
}

.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(192,160,96,0.08);
}

.drop-zone-icon {
  font-size: 32px;
  color: var(--text-secondary);
}

.drop-zone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  display: none;
}

/* Thumbnail preview */
.current-thumb-preview {
  margin-top: 12px;
}

.current-thumb-preview label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.thumb-preview-img {
  max-width: 200px;
  max-height: 200px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--accent);
}

.btn-xs {
  font-size: 0.65rem;
  padding: 2px 6px;
}

.text-muted {
  color: var(--text-secondary);
  font-weight: 400;
}

/* --- Modal --- */
#modal-root {
  display: none;
  z-index: 2000;
  position: relative;
}

#modal-dialog-root {
  display: none;
  z-index: 11000;
  position: relative;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
}

.modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

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

.modal-header h3 {
  font-size: 1.2rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-close-float {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.modal-body {
  padding: 24px;
}

/* ========== DIALOG (Alert / Confirm) ========== */

.modal-dialog-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-dialog {
  max-width: 380px;
  width: 90%;
  border-radius: 16px;
  overflow: hidden;
  animation: dialogPop 0.25s ease;
}

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

.modal-dialog-body {
  padding: 36px 28px 28px;
  text-align: center;
}

.modal-dialog-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-icon-info {
  background: rgba(66, 133, 244, 0.15);
  color: var(--info);
}

.modal-icon-success {
  background: rgba(106, 190, 89, 0.15);
  color: var(--success);
}

.modal-icon-warning {
  background: rgba(255, 193, 7, 0.15);
  color: var(--warning);
}

.modal-icon-error {
  background: rgba(220, 53, 69, 0.15);
  color: var(--error);
}

.modal-dialog-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.modal-dialog-message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  word-break: keep-all;
}

.modal-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-dialog-btn {
  min-width: 90px;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
}

.modal-dialog-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal-image-view .modal-container {
  max-width: 90vw;
  background: transparent;
  border: none;
}

.modal-image {
  width: 100%;
  border-radius: var(--radius);
}

/* --- Footer --- */
#main-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 20px 0 24px;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  gap: 40px;
}

.footer-info h3 {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.footer-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links h4 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  margin-right: 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  color: #fff !important;
}

.naver-cafe {
  background: #1a5c2e;
}

.naver-cafe:hover {
  background: #22753a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 92, 46, 0.4);
}

.naver-band {
  background: #1a5c2e;
}

.naver-band:hover {
  background: #22753a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 92, 46, 0.4);
}

.instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.instagram:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(225, 48, 108, 0.4);
}

.youtube {
  background: #ff0000;
}

.youtube:hover {
  background: #e60000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

.banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-divider {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
}

.footer-copy {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 24px;
}

.footer-copy p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* --- Utilities --- */
.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 0.95rem;
}

.empty-text {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 0.95rem;
}

.login-required-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
}
.login-required-box .material-symbols-outlined {
  font-size: 3rem;
  opacity: 0.5;
}
.login-required-box p {
  font-size: 1rem;
  margin: 0;
}

.bd-login-more-notice {
  text-align: center;
  padding: 20px 0 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.bd-login-more-notice a {
  color: var(--accent);
}

/* --- Mobile Menu Overlay --- */
.nav-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
.nav-menu-overlay.active {
  display: block;
}

/* --- Mobile Menu Elements (hidden on desktop) --- */
.nav-menu-header,
.nav-menu-divider,
.nav-menu-user {
  display: none;
}

.nav-link-icon {
  display: none;
}

.nav-link-arrow {
  font-size: 18px;
  margin-left: 2px;
  vertical-align: middle;
  transition: transform 0.2s;
}

.nav-archive-item:has(.nav-archive-dropdown.open) .nav-link-arrow {
  transform: rotate(180deg);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px 0 24px;
    gap: 0;
    transition: right var(--transition);
    box-shadow: -10px 0 40px var(--shadow);
    border-left: 1px solid var(--border);
    z-index: 1000;
    overflow-y: auto;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 16px;
  }

  .nav-menu-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
  }

  .nav-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
  }

  .nav-menu-close:hover {
    background: var(--accent-subtle);
    color: var(--accent);
  }

  .nav-menu-close .material-symbols-outlined {
    font-size: 20px;
  }

  .nav-menu-divider {
    display: block;
    height: 1px;
    background: var(--border);
    margin: 0 20px 8px;
  }

  .nav-link-icon {
    display: inline;
    font-size: 20px;
    vertical-align: middle;
    margin-right: 10px;
    color: var(--accent);
    opacity: 0.7;
  }

  .nav-link {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    font-size: 1rem;
    border-radius: 0;
  }

  .nav-link-arrow {
    margin-left: auto;
  }

  .nav-link:hover .nav-link-icon,
  .nav-link.active .nav-link-icon {
    opacity: 1;
  }

  /* Archive dropdown - mobile: always expanded */
  .nav-archive-dropdown {
    display: block !important;
    position: static;
    min-width: 0;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    animation: none;
  }
  .nav-archive-toggle .nav-link-arrow {
    display: none;
  }
  .nav-menu-theme-item {
    display: list-item;
  }

  .nav-archive-link {
    padding: 12px 24px 12px 58px;
    font-size: 0.92rem;
  }

  .nav-archive-link-icon {
    font-size: 18px;
    margin-right: 8px;
    color: var(--accent);
    opacity: 0.7;
  }

  /* Hide desktop user icon in mobile menu */
  .nav-user-icon-item {
    display: none;
  }

  /* Mobile user section */
  .nav-menu-user {
    display: block !important;
    margin-top: 0 !important;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
  }

  .nav-menu-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
  }

  .nav-menu-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 22px;
    flex-shrink: 0;
  }

  .nav-menu-user-edit {
    margin-left: auto;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
  }
  .nav-menu-user-edit:hover {
    color: var(--accent);
    background: var(--bg-card-hover);
  }
  .nav-menu-user-edit .material-symbols-outlined {
    font-size: 18px;
  }

  .nav-menu-user-detail {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .nav-menu-user-detail strong {
    color: var(--text-primary);
    font-size: 0.95rem;
  }

  .nav-menu-user-detail span {
    color: var(--text-muted);
    font-size: 0.8rem;
  }

  .nav-menu-user-actions {
    display: flex;
    gap: 8px;
  }

  .nav-menu-user-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
  }

  .nav-menu-user-link .material-symbols-outlined {
    font-size: 16px;
  }

  .nav-menu-user-link:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .nav-menu-user-logout:hover {
    border-color: var(--error);
    color: var(--error);
  }

  .slider-slide {
    flex: 0 0 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-links-title {
    display: none;
  }

  .footer-links {
    display: flex;
    justify-content: center;
    gap: 12px;
  }

  .footer-banner {
    padding: 10px;
    margin: 0;
    border-radius: 50%;
  }

  .banner-label {
    display: none;
  }

  .detail-images {
    grid-template-columns: 1fr;
  }

  .admin-table {
    font-size: 0.8rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 8px;
  }

  .notice-list-item {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .hero {
    min-height: 90vh;
  }

  .section {
    padding: 60px 0;
  }

  .page-hero-small {
    padding: 80px 16px 16px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
  }

  .page-hero-small h1 {
    font-size: 1.4rem;
    margin-bottom: 0;
  }

  .page-hero-small p {
    font-size: 0.85rem;
  }

  .page-content {
    padding: 40px 16px;
  }

  .concert-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }

  .admin-tabs {
    flex-wrap: wrap;
  }

  .slider-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .slider-slide {
    flex: 0 0 50%;
  }
}

/* ========== AUTH / LOGIN / REGISTER ========== */

.auth-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 40px 36px;
  backdrop-filter: blur(12px);
}

.auth-success-card {
  text-align: center;
}

.auth-success-card h2 {
  color: var(--accent);
  margin: 16px 0 12px;
}

.auth-success-icon {
  font-size: 3rem;
}

.auth-success {
  background: rgba(106, 190, 89, 0.15);
  border: 1px solid rgba(106, 190, 89, 0.3);
  color: var(--success);
  padding: 14px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.auth-section-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-align: center;
}

.google-btn-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  width: 100%;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 28px 0;
  gap: 16px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--glass-border);
}

.auth-divider span {
  color: var(--text-secondary);
  font-size: 0.85rem;
  white-space: nowrap;
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.auth-form label .req {
  color: var(--accent);
}

.auth-form input,
.auth-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
  box-sizing: border-box;
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: var(--accent);
}

.auth-form input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.auth-error {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: var(--error);
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-link a {
  color: var(--accent);
  text-decoration: none;
}

.auth-link a:hover {
  text-decoration: underline;
}

.auth-note {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
  margin: 12px 0 20px;
  line-height: 1.6;
}

.auth-google-section #googleProfileForm {
  margin-top: 20px;
}

.btn-full {
  width: 100%;
}

.auth-id-toggle {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-id-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.toggle-arrow {
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.auth-id-form-wrap {
  margin-top: 20px;
}

/* Register step selection */
.reg-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.reg-option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.reg-option-btn:hover {
  border-color: var(--accent);
  background: rgba(255, 102, 0, 0.06);
}

.reg-option-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  background: rgba(255, 102, 0, 0.12);
  color: var(--accent);
}

.reg-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reg-option-text strong {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.reg-option-text small {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.reg-step {
  animation: fadeSlideUp 0.25s ease;
}

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

.reg-back-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.reg-back-btn:hover {
  color: var(--accent);
}

.google-profile-form {
  padding-top: 4px;
}

.form-group-lg label {
  font-size: 1rem;
  margin-bottom: 8px;
}

.form-group-lg input,
.form-group-lg select {
  padding: 14px 16px;
  font-size: 1.05rem;
  border-radius: 12px;
}

.form-group-lg {
  margin-bottom: 24px;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 1rem;
  border-radius: 12px;
  margin-top: 8px;
}

/* Password rules */
.pw-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-top: 10px;
}

.pw-rule {
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.pw-rule .pw-icon {
  display: inline-block;
  width: 14px;
  font-size: 0.7rem;
}

.pw-rule.valid {
  color: var(--success);
}

.pw-rule.invalid {
  color: var(--text-secondary);
}

.field-hint {
  font-size: 0.82rem;
  margin-top: 6px;
  min-height: 1.2em;
}

.field-hint.valid {
  color: var(--success);
}

.field-hint.invalid {
  color: var(--error);
}

/* Nav user icon & dropdown */
.nav-user-icon-item {
  position: relative;
  margin-left: auto;
}

.nav-user-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent);
  color: #fff;
  margin: 4px -15px 4px 20px;
  position: relative;
}

.nav-user-unread-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e53935;
  border: 2px solid var(--bg-primary);
}

.nav-user-icon .material-symbols-outlined {
  font-size: 26px;
}

.nav-user-icon:hover {
  background: rgba(255,255,255,0.08);
  color: var(--accent);
}

.nav-user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 8px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 1000;
  animation: dropdownFade 0.15s ease;
}

.nav-user-dropdown.open {
  display: block;
}

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

.nav-dropdown-info {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px;
}
.nav-dropdown-edit {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}
.nav-dropdown-edit:hover {
  color: var(--accent);
  background: var(--bg-card-hover);
}
.nav-dropdown-edit .material-symbols-outlined {
  font-size: 20px;
}

.nav-dropdown-info strong {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.nav-dropdown-info span {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 4px 0;
}

.nav-dropdown-icon {
  font-size: 18px;
  vertical-align: middle;
  margin-right: 6px;
  opacity: 0.7;
}

.nav-dropdown-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.nav-dropdown-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--accent);
}

.nav-dropdown-logout {
  color: var(--text-secondary);
}

.nav-dropdown-logout:hover {
  color: var(--error);
}

.nav-auth-link {
  color: var(--accent) !important;
  font-weight: 500;
}

/* ========== MEMBER TABLE ========== */

.member-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.member-filter .filter-btn {
  padding: 6px 16px;
  font-size: 0.82rem;
}

.member-filter .filter-btn.active,
.member-filter .filter-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.member-table {
  font-size: 0.85rem;
}

.member-table th,
.member-table td {
  padding: 10px 8px;
  white-space: nowrap;
}

.member-count {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.role-super {
  background: rgba(220, 53, 69, 0.2);
  color: var(--error);
}

.role-admin {
  background: rgba(255, 102, 0, 0.2);
  color: var(--accent);
}

.role-user {
  background: rgba(106, 190, 89, 0.2);
  color: var(--success);
}

.role-wait {
  background: rgba(255, 193, 7, 0.2);
  color: var(--warning);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 500;
}

.badge-google {
  background: rgba(66, 133, 244, 0.2);
  color: var(--info);
}

.badge-id {
  background: rgba(255, 102, 0, 0.2);
  color: var(--accent);
}

.badge-verified {
  background: rgba(106, 190, 89, 0.2);
  color: var(--success);
}

.badge-unverified {
  background: rgba(220, 53, 69, 0.2);
  color: var(--error);
}

.toggle-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
}
.toggle-y {
  background: var(--success);
  color: #fff;
}
.toggle-n {
  background: var(--text-muted);
  color: #fff;
  opacity: 0.6;
}
.toggle-badge.clickable {
  cursor: pointer;
}
.toggle-badge.clickable:hover {
  opacity: 0.8;
}
.toggle-cell {
  text-align: center;
}

.exp-input {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.85rem;
  text-align: right;
}

/* Level icons */
.lv-icon-sm {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 2px;
}
.lv-icon-popup {
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 4px;
}
.lv-icon-profile {
  width: 40px;
  height: 40px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 6px;
}
.lv-icon-click {
  cursor: pointer;
  transition: transform 0.2s;
}
.lv-icon-click:hover {
  transform: scale(1.2);
}

.user-popup-level {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.user-popup-level-name {
  font-weight: 600;
  color: var(--accent);
}
.user-popup-level-exp {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.user-popup-quiz, .profile-quiz-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-weight: 500;
  margin-left: 4px;
}
.profile-level-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0;
  font-size: 0.9rem;
}
.profile-level-name {
  font-weight: 600;
  color: var(--accent);
}
.profile-level-exp {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.role-select {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 0.8rem;
  cursor: pointer;
}

.role-select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* History filters */
.history-filters {
  margin-bottom: 28px;
  border: 1px solid #4c2b14;
  padding: 15px 30px 5px 30px;
  border-radius: 10px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
  min-width: 70px;
}

.filter-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Admin badges for event/concert type */
.badge-event-type {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
}

.badge-concert-type {
  display: inline-block;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--accent-subtle-2);
  color: var(--accent);
  margin-top: 2px;
}

/* Admin form row (side by side) */
.form-row {
  display: flex;
  gap: 16px;
}

.form-group-half {
  flex: 1;
}

/* Timeline date & venue */
.timeline-date {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-right: 8px;
}

.timeline-venue {
  display: inline-block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  opacity: 0.7;
  margin-left: auto;
}

.timeline-venue::before {
  content: '·';
  margin-right: 6px;
}

.timeline-detail-link {
  width: 100%;
  display: block;
  font-size: 0.82rem;
  color: var(--accent) !important;
  opacity: 0.7;
  transition: opacity var(--transition);
  text-align: right;
}

.timeline-detail-link:hover {
  opacity: 1;
}

/* Concert venue */
.detail-venue {
  display: inline-block;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.concert-card-venue {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 4px;
  opacity: 0.7;
}

.concert-card-comments {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Concert sections */
.concert-section {
  margin: 32px 0;
}

.concert-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.concert-media-list,
.concert-media-files {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- PDF File List --- */
.pdf-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pdf-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-primary) !important;
  transition: all var(--transition);
}

.pdf-file-item:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--accent-dark);
}

.pdf-file-icon {
  font-size: 22px;
  color: var(--error);
  flex-shrink: 0;
}

.pdf-file-name {
  flex: 1;
  font-weight: 500;
  font-size: 0.95rem;
}

.pdf-file-download {
  font-size: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition);
}

.pdf-file-item:hover .pdf-file-download {
  color: var(--accent);
}

.concert-media-item {
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--glass-border);
}

.media-title {
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 8px;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.media-video {
  width: 100%;
  max-height: 500px;
  border-radius: 8px;
}

.media-audio {
  width: 100%;
  margin-top: 8px;
}

.media-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.media-link:hover {
  text-decoration: underline;
}

/* Admin concert form - links */
.link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

.link-item span {
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-type-badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.link-type-select,
.link-title-input,
.link-url-input {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 0.85rem;
}

.link-type-select { width: 70px; flex-shrink: 0; }
.link-title-input { width: 120px; }
.link-url-input { flex: 1; }

.link-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.link-add-row select,
.link-add-row input {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 0.85rem;
}

.link-add-row select { width: 70px; }
.link-add-row input:first-of-type { width: 120px; }
.link-add-row input:last-of-type { flex: 1; }

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
}

.btn-accent:hover {
  opacity: 0.85;
}

/* Toast notifications */
#toast-container {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast-success { background: #1e6e3a; border-color: #2a8f4e; }
.toast-error   { background: #7a1e1e; border-color: #a02929; }
.toast-info    { background: #1a3a5e; border-color: #2255a0; }

/* Toast UI Editor overrides */
.admin-editor-page {
  padding: 0;
}

.admin-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.admin-editor-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.admin-editor-page .form-group {
  margin-bottom: 20px;
}

.admin-editor-page .toastui-editor-defaultUI {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.toastui-editor-defaultUI,
.toastui-editor-defaultUI .toastui-editor-main,
.toastui-editor-defaultUI .toastui-editor-md-container,
.toastui-editor-defaultUI .toastui-editor-ww-container {
  background: rgba(255,255,255,0.03) !important;
}

.toastui-editor-defaultUI .toastui-editor-toolbar {
  background: rgba(255,255,255,0.06) !important;
  border-bottom: 1px solid var(--glass-border) !important;
}

.toastui-editor-contents p,
.toastui-editor-contents li,
.toastui-editor-contents h1,
.toastui-editor-contents h2,
.toastui-editor-contents h3,
.toastui-editor-contents h4,
.toastui-editor-contents h5,
.toastui-editor-contents h6 {
  color: var(--text-primary) !important;
}

.toastui-editor-contents a {
  color: var(--accent) !important;
}

.toastui-editor-contents blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  color: var(--text-secondary) !important;
}

.toastui-editor-contents img {
  max-width: 100%;
  border-radius: 8px;
}

.toastui-editor-contents pre {
  background: rgba(0,0,0,0.3) !important;
  border-radius: 8px;
  padding: 16px;
}

.toastui-editor-contents code {
  background: rgba(255,255,255,0.1) !important;
  color: var(--text-primary) !important;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.toastui-editor-contents table {
  border-collapse: collapse;
  width: 100%;
}

.toastui-editor-contents th,
.toastui-editor-contents td {
  border: 1px solid var(--glass-border);
  padding: 8px 12px;
  color: var(--text-primary) !important;
}

.toastui-editor-contents th {
  background: rgba(255,255,255,0.06);
}

/* Viewer in detail page */
.detail-body .toastui-editor-contents {
  padding: 0;
  font-size: 1rem;
  line-height: 1.9;
}

.detail-body .toastui-editor-contents p {
  margin: 0.9em 0;
}

.detail-body .toastui-editor-contents ul,
.detail-body .toastui-editor-contents ol {
  margin: 0.4em 0;
}

.detail-body .toastui-editor-contents li {
  margin: 0.15em 0;
  line-height: 1.6;
}

.detail-body .toastui-editor-contents li p {
  margin: 0.15em 0;
}

.detail-body .toastui-editor-contents img {
  max-width: 100%;
  margin: 12px 0;
}

@media (max-width: 768px) {
  .auth-card {
    padding: 28px 20px;
    margin: 0 -8px;
  }

  .member-table {
    display: block;
    overflow-x: auto;
  }
}

/* ========== PROFILE PAGE ========== */

.profile-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 40px 36px;
  backdrop-filter: blur(12px);
  position: relative;
}

.profile-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
}

.profile-close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.profile-btn-row {
  display: flex;
  gap: 12px;
}

.profile-avatar-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-placeholder {
  font-size: 56px;
  color: var(--text-muted);
}

.profile-avatar-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-remove:hover {
  background: var(--error);
}

.profile-avatar-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-form .form-group {
  margin-bottom: 20px;
}

.profile-form label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.profile-form label .req {
  color: var(--accent);
}

.profile-char-count {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.profile-form input,
.profile-form select,
.profile-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: border-color 0.2s;
  outline: none;
  box-sizing: border-box;
  resize: vertical;
}

.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
  border-color: var(--accent);
}

.profile-readonly {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  margin-bottom: 20px;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.input-readonly {
  opacity: 0.6;
  cursor: default;
  background: var(--surface) !important;
}

.profile-readonly-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-readonly-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-readonly-value {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Light theme profile */
[data-theme="light"] .profile-form input,
[data-theme="light"] .profile-form select,
[data-theme="light"] .profile-form textarea {
  background: rgba(0, 0, 0, 0.03);
}

/* ========== GENERATION PICKER ========== */

.gen-picker-wrap {
  position: relative;
}

.gen-picker-btn {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s;
}

.gen-picker-btn:hover,
.gen-picker-btn:focus {
  border-color: var(--accent);
  outline: none;
}

[data-theme="light"] .gen-picker-btn {
  background: rgba(0, 0, 0, 0.03);
}

.gen-picker-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100;
  display: flex;
  gap: 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: dropdownFade 0.15s ease;
}

.gen-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gen-cell {
  padding: 7px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.gen-cell:hover {
  background: var(--accent-subtle);
  color: var(--accent);
}

.gen-cell-active {
  background: var(--accent);
  color: #fff;
}

.gen-cell-active:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* ========== PHOTO CROP ========== */

.photo-crop-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-crop-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 200px;
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  padding: 32px;
}

.photo-crop-dropzone:hover {
  border-color: var(--accent);
  background: rgba(255, 102, 0, 0.04);
}

.photo-crop-dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(255, 102, 0, 0.08);
}

.photo-crop-dropzone p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.photo-crop-canvas-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.photo-crop-container {
  position: relative;
  display: inline-block;
  line-height: 0;
  user-select: none;
  -webkit-user-select: none;
}

.photo-crop-container canvas {
  display: block;
  border-radius: 8px;
}

.crop-selection {
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
  cursor: move;
  touch-action: none;
}

.crop-resize-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: nwse-resize;
  border: 2px solid var(--bg-primary);
  touch-action: none;
}

/* ========== HEADER AVATAR ========== */

.nav-user-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nav-user-icon:has(.nav-user-avatar-img) {
  padding: 2px;
  background-color: transparent;
  border: 2px solid var(--accent);
}

.nav-user-icon:has(.nav-user-avatar-img):hover {
  border-color: var(--accent-hover);
  background: transparent;
}

.nav-menu-user-avatar-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--accent);
}

/* ========== PROFILE RESPONSIVE ========== */

@media (max-width: 768px) {
  .profile-card {
    padding: 28px 20px;
    margin: 0 -8px;
  }

  .profile-readonly {
    flex-direction: column;
    gap: 12px;
  }

  .profile-avatar-section {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .profile-avatar-btns {
    flex-direction: row;
    gap: 6px;
  }

  .profile-avatar-btns .btn-sm {
    font-size: 0.78rem;
    padding: 6px 10px;
  }
}

[data-theme="light"] .photo-crop-dropzone {
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .photo-crop-dropzone:hover {
  border-color: rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.03);
}

/* ========== ADMIN AVATAR GALLERY ========== */

.avatar-admin-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.avatar-admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.avatar-admin-card:hover {
  border-color: var(--accent);
}

.avatar-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.avatar-admin-card:hover .avatar-delete-btn {
  opacity: 1;
}

.avatar-delete-btn:hover {
  background: var(--error);
}

.avatar-admin-preview {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(45deg, var(--bg-secondary) 25%, transparent 25%),
    linear-gradient(-45deg, var(--bg-secondary) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--bg-secondary) 75%),
    linear-gradient(-45deg, transparent 75%, var(--bg-secondary) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.avatar-admin-preview img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  border-radius: 50%;
}

.avatar-admin-info {
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.avatar-desc-text {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.avatar-edit-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.avatar-edit-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
}

.avatar-edit-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-category-badge {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
}

.avatar-category-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.avatar-category-filter .filter-btn {
  padding: 4px 14px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.avatar-category-filter .filter-btn.active,
.avatar-category-filter .filter-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ========== AVATAR SELECT MODAL ========== */

.avatar-select-modal {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.avatar-select-preview-wrap {
  display: flex;
  justify-content: center;
}

.avatar-select-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 3px solid var(--accent);
  transition: background-color 0.2s;
}

.avatar-select-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-select-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}

.avatar-select-item {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    linear-gradient(45deg, var(--bg-secondary) 25%, transparent 25%),
    linear-gradient(-45deg, var(--bg-secondary) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--bg-secondary) 75%),
    linear-gradient(-45deg, transparent 75%, var(--bg-secondary) 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}

.avatar-select-item:hover {
  border-color: var(--accent);
}

.avatar-select-item.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle-2);
}

.avatar-select-item img {
  width: 85%;
  aspect-ratio: 1;
  object-fit: contain;
}

.avatar-select-desc {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 2px 3px;
  line-height: 1.3;
  text-align: center;
  min-height: 14px;
}

@media (max-width: 768px) {
  .avatar-admin-gallery {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
  }

  .avatar-select-gallery {
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 8px;
  }
}

/* ========== PICTURE GALLERY ========== */

/* 연대 카드 그리드 */
.picture-decade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.picture-decade-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition);
  cursor: pointer;
}

.picture-decade-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--shadow);
}

.picture-decade-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.picture-decade-stats {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.picture-decade-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.picture-decade-stats .material-symbols-outlined {
  font-size: 16px;
}

.stat-zero {
  opacity: 0.3;
}

.stat-active {
  color: var(--accent);
}

/* Picture: Recent posts in decade view */
.picture-recent-section {
  margin-top: 32px;
}

.picture-recent-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.picture-recent-title .material-symbols-outlined {
  font-size: 1.1rem;
  color: var(--accent);
}

.picture-recent-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.picture-recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary) !important;
  transition: background var(--transition);
}

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

.picture-recent-item:hover {
  background: var(--bg-card-hover);
}

.picture-recent-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.picture-recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picture-recent-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.picture-recent-item-title {
  font-size: 0.95rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picture-recent-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.picture-popular-section {
  margin-top: 36px;
}

.picture-popular-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.picture-popular-title .material-symbols-outlined {
  font-size: 18px;
  color: var(--accent);
}

.picture-popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
}

.picture-top-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: border-color 0.15s;
}

.picture-top-thumb:hover {
  border-color: var(--accent);
}

.picture-top-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.picture-more-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--glass-bg);
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.picture-more-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 102, 0, 0.06);
}

.picture-more-btn .material-symbols-outlined {
  font-size: 32px;
}

.picture-more-label {
  font-size: 0.8rem;
  font-weight: 500;
}

.picture-fade-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.picture-fade-in.visible {
  opacity: 1;
  transform: scale(1);
}

.picture-top-likes {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(0,0,0,0.65);
  color: var(--accent);
  font-size: 9px;
  padding: 1px 3px;
  border-radius: 4px 0 0 0;
  display: flex;
  align-items: center;
  gap: 1px;
  line-height: 1;
}

.picture-top-likes .material-symbols-outlined {
  font-size: 9px;
}

.picture-top-likes.liked {
  color: #ff4466;
}

.picture-top-likes.liked .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
}

/* 연도 목록 */
.picture-year-tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.picture-year-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  min-width: 70px;
}

.picture-year-tile:hover {
  border-color: var(--accent-dark);
  background: rgba(255, 102, 0, 0.06);
}

.picture-year-tile.has-post {
}

.picture-year-tile.has-post .picture-year-tile-label {
}

.picture-year-tile-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.picture-year-tile-stats {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
}

.badge-stat {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.badge-stat .material-symbols-outlined {
  font-size: 15px;
}

/* 게시글 목록 그리드 */
.picture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.picture-card {
  display: block;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition);
}

.picture-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
  border-color: var(--accent-dark);
}

.picture-card-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-secondary);
}

.picture-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.picture-card:hover .picture-card-thumb img {
  transform: scale(1.05);
}

.picture-card-thumb-grid {
  display: grid;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-secondary);
  gap: 2px;
}

.picture-card-thumb-grid.quad {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.picture-card-thumb-grid.tri {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.picture-card-thumb-grid.tri img:first-child {
  grid-column: 1 / -1;
}

.picture-card-thumb-grid.dual {
  grid-template-columns: 1fr 1fr;
}

.picture-card-thumb-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.picture-card:hover .picture-card-thumb-grid img {
  transform: scale(1.05);
}

.picture-card {
  position: relative;
}

.picture-card-extra {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  pointer-events: none;
}

.picture-card-info {
  padding: 14px;
}

.picture-card-title {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picture-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.picture-card-stats {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.picture-card-stats span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.picture-card-stats .material-symbols-outlined {
  font-size: 14px;
}

/* 상세 뷰 이미지 그리드 */
.picture-detail-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.picture-image-item {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.picture-image-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}

.picture-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.picture-image-wrap:hover img {
  transform: scale(1.05);
}

.picture-like-btn {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.55);
  border: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.picture-like-btn:hover {
  background: rgba(0, 0, 0, 0.75);
  color: var(--accent);
}

.picture-like-btn.liked {
  color: var(--accent);
}

.picture-like-btn.liked .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
}

.picture-like-btn .material-symbols-outlined {
  font-size: 16px;
}

.picture-like-btn .like-count {
  font-size: 0.8rem;
}

/* Picture nav */
.picture-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.picture-breadcrumb.has-actions {
  justify-content: space-between;
}
.picture-bc-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.picture-bc-link:hover {
  color: var(--accent);
}
.picture-bc-sep {
  color: var(--text-muted);
  margin: 0 2px;
  user-select: none;
}
.picture-bc-current {
  color: var(--text-primary);
  font-weight: 500;
}
.picture-bc-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* 등록/수정 폼 */
.picture-form {
  max-width: 720px;
}

.picture-form .form-group {
  margin-bottom: 20px;
}

.picture-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.picture-form input,
.picture-form textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  resize: vertical;
  box-sizing: border-box;
}

.picture-form input:focus,
.picture-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.picture-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.picture-upload-zone:hover {
  border-color: var(--accent);
  background: rgba(255, 102, 0, 0.04);
}

.picture-upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(255, 102, 0, 0.08);
}

.picture-upload-zone p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.picture-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.picture-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.picture-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picture-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.picture-preview-item:hover .picture-preview-remove {
  opacity: 1;
}

.picture-preview-remove:hover {
  background: var(--error);
}

.picture-drag-handle {
  position: absolute;
  bottom: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.15s;
}

.picture-drag-handle .material-symbols-outlined {
  font-size: 16px;
}

.picture-preview-item:hover .picture-drag-handle {
  opacity: 1;
}

.picture-preview-item.dragging {
  opacity: 0.3;
}

.picture-drag-ghost {
  position: fixed;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  opacity: 0.8;
  pointer-events: none;
  z-index: 9999;
}

.picture-drag-ghost img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picture-preview-grid.sortable {
  min-height: 60px;
}

/* Picture image overlay */
.picture-image-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.picture-overlay-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
}
.picture-overlay-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.picture-overlay-link {
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.picture-overlay-link:hover {
  background: var(--accent);
  color: #fff;
}
.pic-ov-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 14px 6px;
  z-index: 10001;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: background 0.15s;
  line-height: 1;
}
.pic-ov-arrow:hover { background: rgba(0, 0, 0, 0.75); }
.pic-ov-arrow .material-symbols-outlined { font-size: 2rem; }
.pic-ov-prev { left: 16px; }
.pic-ov-next { right: 16px; }
.picture-overlay-counter {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin-left: 4px;
}

/* Notes (글모음노트) */
.notes-cover-upload,
.notes-pdf-upload {
  cursor: pointer;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}
.notes-cover-upload:hover,
.notes-pdf-upload:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.03);
}
.notes-cover-upload.drag-over,
.notes-pdf-upload.drag-over {
  border-color: var(--accent);
  background: rgba(255, 102, 0, 0.05);
}
.notes-cover-placeholder,
.notes-pdf-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  min-height: 120px;
}
.notes-cover-placeholder p,
.notes-pdf-placeholder p {
  margin: 8px 0 0;
  font-size: 0.85rem;
}
.notes-cover-preview-img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
}
.notes-pdf-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.notes-pdf-remove {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: auto;
  padding: 0 4px;
}
.notes-cover-wrap {
  margin-bottom: 20px;
  text-align: center;
}
.notes-cover-img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.notes-pdf-section {
  margin-bottom: 20px;
}
.notes-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.notes-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
}
.notes-more-wrap .material-symbols-outlined {
  font-size: 2rem;
}
.notes-more-label {
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.3;
}
.notes-more-tile {
  cursor: pointer;
  border-style: dashed;
}
.notes-more-tile:hover .notes-more-wrap {
  color: var(--accent);
}
.notes-page-fade {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.notes-page-fade.visible {
  opacity: 1;
}
.notes-images-section {
  margin-top: 24px;
  margin-bottom: 24px;
}
.notes-images-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  margin-bottom: 16px;
}

/* Light theme adjustments */
[data-theme="light"] .notes-cover-upload,
[data-theme="light"] .notes-pdf-upload {
  border-color: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .notes-cover-upload:hover,
[data-theme="light"] .notes-pdf-upload:hover {
  border-color: rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .picture-upload-zone {
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .picture-upload-zone:hover {
  border-color: rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.03);
}

/* Responsive */
@media (max-width: 768px) {
  .picture-decade-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .picture-decade-card {
    padding: 20px 14px;
  }

  .picture-decade-stats {
    gap: 10px;
    font-size: 0.78rem;
  }

  .picture-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .picture-detail-images {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }

  .picture-year-tile {
    padding: 8px 12px;
    min-width: 60px;
  }

  .picture-year-tile-label {
    font-size: 0.85rem;
  }

  .picture-year-tile-stats {
    gap: 6px;
    font-size: 0.7rem;
  }

  .picture-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
  }
}

/* ============================================
   Admin Standalone Page
   ============================================ */

.admin-standalone-header .navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.admin-standalone-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-standalone-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-standalone-user {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.admin-standalone-theme,
.admin-standalone-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color var(--transition), background var(--transition);
}

.admin-standalone-theme:hover,
.admin-standalone-close:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.admin-standalone-main {
  padding-top: 16px;
}

.admin-standalone-main .page-hero {
  display: none;
}

.admin-standalone-main .page-content {
  padding-top: 8px;
}

/* ============================================
   Stats Dashboard
   ============================================ */

.stats-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.stats-card-clickable {
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.stats-card-clickable:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.stats-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stats-card-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Bar chart (vertical) */
.stats-chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.stats-chart-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.stats-bar-container {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 160px;
  padding-top: 8px;
}

.stats-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
}

.stats-bar {
  width: 100%;
  max-width: 24px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height 0.3s ease;
  cursor: default;
  position: relative;
}

.stats-bar:hover {
  opacity: 0.85;
}

.stats-bar-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

/* Hourly distribution chart */
.stats-hourly .stats-bar {
  background: var(--info);
}

/* Inline bar (for tables) */
.stats-bar-inline {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.stats-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Stats table */
.stats-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.stats-table th,
.stats-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.stats-table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-table td {
  color: var(--text-primary);
}

.stats-table tr:last-child td {
  border-bottom: none;
}

.stats-table tr:hover td {
  background: var(--bg-card-hover);
}

.stats-detail-btn {
  background: var(--accent-subtle);
  color: var(--accent);
  border: none;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  transition: background var(--transition);
}

.stats-detail-btn:hover {
  background: var(--accent-subtle-2);
}

/* Drilldown back button */
.stats-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 8px 0;
  margin-bottom: 16px;
}

.stats-back-btn:hover {
  text-decoration: underline;
}

.stats-item-link {
  color: var(--accent);
  text-decoration: none;
}

.stats-item-link:hover {
  text-decoration: underline;
}

.stats-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  color: var(--text-primary);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}

.stats-bar:hover .stats-tooltip {
  opacity: 1;
}

.stats-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stats-card {
    padding: 16px;
  }

  .stats-card-value {
    font-size: 1.5rem;
  }

  .stats-bar-container {
    height: 120px;
  }

  .stats-table th,
  .stats-table td {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .stats-chart {
    padding: 14px;
  }
}

/* ============================================================
   Messages (쪽지)
   ============================================================ */
.msg-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e53935;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 6px;
  line-height: 1;
}

.msg-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.msg-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}
.msg-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.msg-tab:hover { color: var(--text-primary); }

.msg-list { display: flex; flex-direction: column; gap: 0; }
.msg-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background 0.15s;
}
.msg-item:hover { background: var(--bg-secondary); }
.msg-item.msg-unread { background: rgba(255, 102, 0, 0.05); }

.msg-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.msg-item-name {
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
.msg-item-name-link {
  color: var(--text-primary);
  text-decoration: none;
}
.msg-item-name-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.msg-item-gen { font-weight: 400; font-size: 0.8rem; color: var(--text-muted); }
.msg-item-date { font-size: 0.8rem; color: var(--text-muted); }
.msg-item-preview {
  font-size: 0.88rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

/* Message detail modal */
.msg-detail-modal .modal-container { max-width: 560px; }
.msg-detail-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.msg-detail-label { font-size: 0.85rem; color: var(--text-muted); }
.msg-detail-name { font-weight: 600; font-size: 0.95rem; }
.msg-detail-date { font-size: 0.8rem; color: var(--text-muted); margin-left: auto; }
.msg-detail-content {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
  min-height: 60px;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg-detail-read {
  font-size: 0.82rem;
  color: var(--success, #4caf50);
  margin-top: 16px;
  text-align: right;
}
.msg-detail-read.unread { color: var(--text-muted); }

.msg-dir {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 6px;
  font-weight: 500;
  vertical-align: middle;
}
.msg-dir-recv {
  background: rgba(33, 150, 243, 0.15);
  color: #64b5f6;
}
.msg-dir-sent {
  background: rgba(255, 102, 0, 0.15);
  color: #ff8c33;
}

.msg-read-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 8px;
}
.msg-read-status.read { color: var(--success, #4caf50); }

.msg-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  justify-content: flex-end;
}

/* Send message form */
.msg-send-form { display: flex; flex-direction: column; gap: 12px; }
.msg-send-to { font-size: 0.95rem; color: var(--text-secondary); }
.msg-send-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  resize: vertical;
  font-size: 0.95rem;
  font-family: inherit;
}
.msg-send-textarea:focus { outline: none; border-color: var(--accent); }
.msg-send-actions { display: flex; justify-content: flex-end; }

/* User popup buttons */
.user-popup-btns { display: flex; gap: 8px; margin-top: 12px; justify-content: center; }
.user-popup-msg-btn { margin: 0; }

/* ── Chat ────────────────────────────────────────── */
.chat-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e53935;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 6px;
  line-height: 1;
}
.chat-container {
  display: flex;
  height: calc(100vh - 60px);
  margin-top: 60px;
  overflow: hidden;
  background: var(--bg-primary);
}
.chat-sidebar {
  width: 320px;
  min-width: 320px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
}
.chat-sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-sidebar-header h3 {
  margin: 0;
  font-size: 1.1rem;
}
.chat-sidebar-actions {
  display: flex;
  gap: 4px;
}
.chat-btn-icon {
  position: relative;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background var(--transition);
}
.chat-btn-icon:hover { background: var(--bg-secondary); color: var(--text-primary); }
.chat-req-badge {
  position: absolute;
  top: 0; right: 0;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e53935;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chat-room-list {
  flex: 1;
  overflow-y: auto;
}
.chat-no-rooms {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.chat-room-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
  transition: background var(--transition);
}
.chat-room-item:hover { background: var(--bg-secondary); }
.chat-room-item.active { background: rgba(255, 102, 0, 0.08); }
.chat-room-item.unread { font-weight: 500; }
.chat-room-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.chat-room-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chat-room-info {
  flex: 1;
  min-width: 0;
}
.chat-room-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.chat-room-name {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-room-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.chat-room-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.chat-room-preview {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-room-unread {
  flex-shrink: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Chat Main */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 8px;
}
.chat-empty-state .material-symbols-outlined { font-size: 48px; }
.chat-main-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  background: var(--bg-card);
}
.chat-header-status { width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.chat-header-status.online { background: var(--success); }
.chat-back-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-msg-wrap {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}
.chat-msg-wrap.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg-wrap.other { align-self: flex-start; align-items: flex-start; }
.chat-msg-sender {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  padding-left: 4px;
}
.chat-msg {
  padding: 10px 14px;
  border-radius: 16px;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.5;
}
.chat-msg-mine {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg-other {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.chat-msg-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
  padding: 0 4px;
}
.chat-typing {
  padding: 4px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}
.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: var(--bg-card);
}
.chat-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 16px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-family: inherit;
  max-height: 120px;
  outline: none;
}
.chat-input:focus { border-color: var(--accent); }
.chat-send-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.chat-send-btn:hover { opacity: 0.85; }
.chat-input:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-send-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Chat Request Modal */
.chat-req-panel h4 { margin: 0 0 10px; font-size: 1rem; }
.chat-req-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.chat-req-actions { display: flex; gap: 6px; }
.chat-req-result {
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition);
}
.chat-req-result:hover { background: var(--bg-secondary); }
.chat-req-result.offline { cursor: default; opacity: 0.5; }
.chat-req-result.offline:hover { background: transparent; }
.chat-req-result small { color: var(--text-muted); }
.chat-req-online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.chat-req-online-dot.online { background: var(--success); }
.chat-req-offline-label { color: var(--text-muted); margin-left: auto; font-size: 0.75rem; }

/* Chat Group Form */
.chat-group-member-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
}
.chat-group-member-item:hover { background: var(--bg-secondary); }
.chat-group-member-item small { color: var(--text-muted); margin-left: auto; }

/* Chat Mobile */
@media (max-width: 768px) {
  .chat-sidebar { width: 100%; min-width: 100%; }
  .chat-container.room-open .chat-sidebar { display: none; }
  .chat-container:not(.room-open) .chat-main { display: none; }
  .chat-back-btn { display: block; }
  .chat-msg-wrap { max-width: 85%; }
}

/* ========== Form Controls ========== */
.form-control {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input, var(--bg-tertiary));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
}
textarea.form-control {
  resize: vertical;
}

/* ========== Quiz Admin ========== */
.admin-quiz-level-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  margin-bottom: 8px;
}
.admin-quiz-level-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.admin-quiz-level-head strong {
  color: var(--accent);
  min-width: 42px;
}

/* Quiz question row */
.admin-quiz-q-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  transition: background 0.15s;
}
.admin-quiz-q-row:last-child {
  border-bottom: none;
}
.admin-quiz-q-row:hover {
  background: var(--bg-tertiary);
}
.admin-quiz-q-num {
  color: var(--text-muted);
  min-width: 32px;
  font-weight: 500;
}
.admin-quiz-q-type {
  background: var(--bg-tertiary);
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.admin-quiz-q-body {
  flex: 1;
  min-width: 0;
}
.admin-quiz-q-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-quiz-q-answer {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 2px;
}
.admin-quiz-q-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.admin-quiz-q-actions .btn {
  padding: 3px 6px;
  font-size: 0.75rem;
}
.admin-quiz-q-actions .material-symbols-outlined {
  font-size: 15px;
}

/* Quiz question editor dialog */
.quiz-dialog-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.quiz-dialog-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.quiz-dialog-box h3 {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.quiz-dialog-field {
  margin-bottom: 14px;
}
.quiz-dialog-field > label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.88rem;
}
.quiz-dialog-type-group {
  display: flex;
  gap: 16px;
}
.quiz-dialog-type-group label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
}
.quiz-dialog-opt-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.quiz-dialog-opt-row input[type="radio"] {
  accent-color: var(--accent);
}
.quiz-dialog-opt-row .opt-label {
  font-weight: 600;
  min-width: 16px;
  color: var(--text-muted);
}
.quiz-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}

