@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/vendor/manrope-400.ttf') format('truetype');
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/vendor/manrope-500.ttf') format('truetype');
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/vendor/manrope-600.ttf') format('truetype');
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/vendor/manrope-700.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/vendor/inter-400.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/vendor/inter-500.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/vendor/inter-600.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/vendor/inter-700.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/vendor/inter-800.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/vendor/inter-900.ttf') format('truetype');
}

@font-face {
  font-family: 'Noto Sans TC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/vendor/noto-sans-tc-400.ttf') format('truetype');
}

@font-face {
  font-family: 'Noto Sans TC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/vendor/noto-sans-tc-500.ttf') format('truetype');
}

@font-face {
  font-family: 'Noto Sans TC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/vendor/noto-sans-tc-700.ttf') format('truetype');
}

@font-face {
  font-family: 'Noto Sans TC';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/vendor/noto-sans-tc-900.ttf') format('truetype');
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #f0f3fa;
  --primary: #2f6bff;
  --primary-dark: #1d4fff;
  --accent: #ff8a5c;
  --text: #121826;
  --muted: #5b6474;
  --border: rgba(18, 24, 38, 0.16);
  --shadow: 0 20px 60px rgba(18, 24, 38, 0.12);
  --shadow-soft: 0 12px 30px rgba(18, 24, 38, 0.08);
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Manrope', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(160deg, #e9eefc 0%, #f8f1f0 55%, #f5f7fb 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.u-hidden {
  display: none;
}

.u-m-0 {
  margin: 0;
}

.u-mt-6 {
  margin-top: 6px;
}

.u-mt-10 {
  margin: 10px 0 0;
}

.offline-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: #1f2937;
  color: #f9fafb;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  font-weight: 700;
}

.offline-banner.is-visible {
  display: flex;
}

html {
  scroll-behavior: smooth;
}

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

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(47, 107, 255, 0.06), transparent 30%),
              radial-gradient(circle at 80% 10%, rgba(255, 138, 92, 0.08), transparent 32%),
              var(--bg);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(transparent 95%, rgba(30, 41, 59, 0.05) 95%),
    linear-gradient(90deg, transparent 95%, rgba(30, 41, 59, 0.05) 95%);
  background-size: 42px 42px;
  opacity: 0.4;
  pointer-events: none;
}

.bg-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  filter: blur(120px);
  opacity: 0.45;
  pointer-events: none;
}

.bg-glow--left {
  top: -120px;
  left: -60px;
  background: #9ad0ff;
}

.bg-glow--right {
  top: 0;
  right: -140px;
  background: #ffd4bd;
}

.page-content {
  position: relative;
  padding: 0 5vw 5vw;
  max-width: 100%;
  margin: 0 auto;
}


.site-header {
  position: relative;
  padding: 18px 5vw 12px;
  z-index: 2;
}

.site-header__inner {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(229, 232, 239, 0.9);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}


.site-header__inner:empty {
  display: none;
}

.site-header--hidden {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.header-actions,
.admin-header-buttons {
  margin-left: auto;
}

.brand__mark {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2f6bff, #7ab8ff);
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 10px 25px rgba(47, 107, 255, 0.25);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.eyebrow {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.eyebrow .brand__text {
  text-transform: none;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(16, 24, 40, 0.04), rgba(255, 255, 255, 0.95));
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid rgba(229, 232, 239, 0.9);
  box-shadow: var(--shadow-soft);
  width: 100%;
}

.hero-brand .brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1rem;
}

.hero-brand .brand__text {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hero-brand .brand__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1f2937;
}

.hero-brand .brand__title {
  color: #0f172a;
  font-weight: 700;
}

.hero-brand__action {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(47, 107, 255, 0.24);
  background: rgba(47, 107, 255, 0.1);
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.hero-brand__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-brand__home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.12);
  border: 1px solid rgba(47, 107, 255, 0.24);
  font-size: 0.9rem;
  font-weight: 700;
  color: #1d4ed8;
}


.muted {
  color: var(--muted);
}

.header-actions,
.admin-header-buttons,
.admin-header-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
}


.pill-link {
  padding: 10px 14px;
  background: rgba(47, 107, 255, 0.12);
  color: var(--primary);
  border-radius: 999px;
  border: 1px solid rgba(47, 107, 255, 0.25);
  font-weight: 600;
}

/* Buttons */
.btn {
  border: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: var(--radius);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.98rem;
  padding: 12px 16px;
}

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

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 12px 30px rgba(47, 107, 255, 0.25);
  border: 1px solid rgba(47, 107, 255, 0.1);
}

.btn--secondary {
  background: var(--surface-muted);
  border: 2px solid var(--border);
  color: var(--text);
}

.btn--danger {
  background: linear-gradient(135deg, #ff6b6b, #ff4f4f);
  color: #fff;
  border: 1px solid rgba(255, 107, 107, 0.3);
  box-shadow: 0 10px 20px rgba(255, 107, 107, 0.25);
}

.btn--danger-outline {
  background: rgba(255, 107, 107, 0.08);
  border: 2px solid rgba(255, 107, 107, 0.5);
  color: #c23d3d;
}

.btn--outline {
  background: transparent;
  border: 2px dashed var(--border);
  color: var(--text);
}

.btn--ghost,
.ghost {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  border: 2px solid rgba(18, 24, 38, 0.16);
}

.btn--sm,
.btn-group .btn--sm,
.edit-btn,
.mini-btn {
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.logout-btn,
.login-btn {
  text-decoration: none;
}

.logout-form,
.footer-logout-form {
  margin: 0;
}

.logout-form {
  width: 100%;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  padding: 10px 0 10px;
  align-items: center;
}

.hero--single {
  grid-template-columns: 1fr;
}

.hero__search-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}

.info-card--compact {
  align-self: stretch;
}

.info-card--compact:not(.discount-ticket) {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__text h1 {
  margin: 10px 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
}

.hero__text {
  max-width: none;
  width: 100%;
}

.hero__text > p:not(.hero-brand),
.hero__text > h1 {
  max-width: 720px;
}

.hero__text p {
  margin: 0 0 16px;
}

.customer-search {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(47, 107, 255, 0.18);
  box-shadow: 0 10px 20px rgba(47, 107, 255, 0.14);
  padding: 10px;
  gap: 8px;
  width: 100%;
}

.search-box.search-box--intro {
  animation: search-intro 0.5s ease-out both;
  box-shadow: 0 12px 24px rgba(47, 107, 255, 0.22);
}

@keyframes search-intro {
  0% {
    transform: scale(0.97);
    box-shadow: 0 6px 14px rgba(47, 107, 255, 0.12);
  }
  60% {
    transform: scale(1.01);
    box-shadow: 0 14px 26px rgba(47, 107, 255, 0.24);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 12px 24px rgba(47, 107, 255, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-box.search-box--intro {
    animation: none;
  }
}

.search-box__input,
.customer-search input[type="text"],
.admin-search-form input[type="text"],
.admin-search-form select,
.field input,
.field select,
.field textarea,
input[type="number"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
}

.search-box__input {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.search-box__input::placeholder {
  color: rgba(18, 24, 38, 0.45);
  font-weight: 500;
}

.search-box__input:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(47, 107, 255, 0.18);
  outline-offset: 1px;
}

.search-box button.btn {
  height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.hint-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero__card {
  background: linear-gradient(145deg, #ffffff 0%, #f4f7ff 100%);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  width: 100%
}

.hero__card--event {
  background: linear-gradient(135deg, rgba(255, 190, 120, 0.25), rgba(255, 255, 255, 0.95));
  border-color: rgba(255, 170, 90, 0.35);
}

.event-banner {
  --event-cover-height: clamp(200px, 24vw, 300px);
  --event-cover-width: calc(var(--event-cover-height) * 0.66);
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.18), rgba(255, 210, 150, 0.3));
  border: 1px solid rgba(47, 107, 255, 0.24);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 320px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.event-banner[data-state="loading"] {
  opacity: 0;
  transform: translateY(6px);
}

.event-banner::before {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(47, 107, 255, 0.2), transparent 70%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

.event-banner::after {
  content: '';
  position: absolute;
  left: -60px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 188, 125, 0.22), transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.event-banner__content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.event-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.12);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  width: fit-content;
}

.event-title {
  margin: 0;
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
  font-weight: 800;
}

.event-time {
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

.event-date {
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

.event-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  max-width: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-hint {
  margin: 0;
  color: rgba(18, 24, 38, 0.65);
  font-size: 0.9rem;
}

.event-books-toggle {
  display: none;
  align-self: flex-start;
}

.event-meta {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  color: var(--muted);
}

.event-meta li {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(47, 107, 255, 0.14);
  border-radius: 12px;
  padding: 8px 12px;
}

.event-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #1f2937;
  margin-right: 6px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.event-time,
.event-date,
.event-desc,
.event-meta li {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(47, 107, 255, 0.14);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-banner--active {
  box-shadow: 0 24px 52px rgba(250, 204, 21, 0.55), 0 0 0 2px rgba(250, 204, 21, 0.85);
  border-color: rgba(250, 204, 21, 0.95);
  position: relative;
  overflow: hidden;
  background-size: 200% 200%;
  animation: eventWaves 5s ease-in-out infinite, eventGlow 2.8s ease-in-out infinite, eventGradient 6s ease-in-out infinite;
}

.event-banner--active::after {
  background: radial-gradient(circle at 20% 20%, rgba(255, 235, 120, 0.85), transparent 60%);
  opacity: 1;
}

.event-banner--active::before {
  content: '';
  position: absolute;
  inset: -30%;
  background: linear-gradient(120deg, rgba(255, 235, 140, 0.12), rgba(255, 220, 80, 0.95), rgba(255, 235, 140, 0.12));
  background-size: 200% 200%;
  animation: eventShine 2.4s linear infinite;
  z-index: 1;
  mix-blend-mode: screen;
  pointer-events: none;
}

.event-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 226, 92, 0.5);
  color: #5a3a00;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  box-shadow: 0 10px 20px rgba(255, 215, 64, 0.45);
  animation: eventTagPulse 1.6s ease-in-out infinite;
}

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

@keyframes eventGlow {
  0%, 100% { box-shadow: 0 18px 36px rgba(250, 204, 21, 0.22), 0 0 0 1px rgba(250, 204, 21, 0.35); }
  50% { box-shadow: 0 22px 42px rgba(250, 204, 21, 0.35), 0 0 0 1px rgba(250, 204, 21, 0.6); }
}

@keyframes eventTagPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes eventGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes eventShine {
  0% { transform: translateX(-35%) rotate(6deg); opacity: 0; background-position: 0% 50%; }
  30% { opacity: 0.75; }
  60% { opacity: 0.35; }
  100% { transform: translateX(35%) rotate(6deg); opacity: 0; background-position: 100% 50%; }
}

.event-banner__visuals {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.event-banner .btn--primary,
.event-banner .showcase-more {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.book-showcase-grid {
  display: flex;
  align-items: center;
  gap: 16px;
}

.showcase-book {
  appearance: none;
  width: var(--event-cover-width);
  height: var(--event-cover-height);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.showcase-book:focus-visible {
  outline: 2px solid rgba(47, 107, 255, 0.5);
  outline-offset: 3px;
}

.showcase-book {
  transform: none;
}

.showcase-book:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
}

.showcase-book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.showcase-more {
  width: var(--event-cover-width);
  height: var(--event-cover-height);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(47, 107, 255, 0.35);
  color: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  gap: 4px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.showcase-more:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-4px);
}

.showcase-more small {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.event-banner--no-books {
  grid-template-columns: 1fr;
}

.event-banner--no-books .event-banner__visuals {
  display: none;
}

.event-books-modal {
  gap: 16px;
}

.event-books-modal .modal-header {
  align-items: flex-start;
}

.event-books-list {
  display: block;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.event-books-content {
  gap: 12px;
}

.event-books-panel {
  display: grid;
  gap: 12px;
}

.event-books-modal .modal-row {
  background: rgba(47, 107, 255, 0.08);
  border: 1px solid rgba(47, 107, 255, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-bottom: none;
}

.event-books-modal .modal-row:last-child {
  margin-bottom: 0;
}

.event-books-modal .reserve-hint {
  border-radius: 12px;
}

.event-books-empty {
  padding: 18px;
  border-radius: 12px;
  background: rgba(47, 107, 255, 0.06);
  text-align: center;
}

.event-book-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-book-thumb {
  appearance: none;
  width: 54px;
  height: 78px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: rgba(47, 107, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.event-book-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-book-thumb.is-active {
  border-color: rgba(47, 107, 255, 0.5);
  transform: translateY(-2px);
}

.event-carousel {
  overflow: hidden;
  position: relative;
  cursor: grab;
  touch-action: pan-y;
}

.event-track {
  display: flex;
  transition: transform 0.6s ease;
  will-change: transform;
}

.event-carousel.is-dragging .event-track {
  transition: none;
}

.event-carousel.is-dragging {
  cursor: grabbing;
}

.event-slide {
  min-width: 100%;
}

.event-slide__row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.event-slide__info {
  display: grid;
  gap: 4px;
}

.event-slide__books {
  min-width: 0;
  width: 100%;
  justify-self: end;
  align-self: normal;
}

.event-books-scroll {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  align-items: center;
  height: 100%;
}

.event-book-cover {
  height: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  scroll-snap-align: start;
}

.event-book-cover img {
  width: 100%;
  height: 100%;
  min-width: 0;
  max-height: 300px;
  object-fit: cover;
}

.event-books-scroll::-webkit-scrollbar {
  height: 6px;
}

.event-books-scroll::-webkit-scrollbar-thumb {
  background: rgba(18, 24, 38, 0.2);
  border-radius: 999px;
}


.event-dots {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  margin-top: 10px;
  overflow-x: auto;
  padding: 4px;
  scroll-snap-type: x mandatory;
}

.event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(148, 163, 184, 0.7);
  cursor: pointer;
  padding: 0;
  scroll-snap-align: center;
  flex: 0 0 auto;
}

.event-dot.is-active {
  background: rgba(30, 64, 175, 0.8);
  transform: scale(1.15);
}

.hero__badge {
  display: inline-flex;
  padding: 8px 12px;
  background: rgba(47, 107, 255, 0.08);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 700;
}

.hero__list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Top sellers */
.top-sell {
  margin: 14px 0 28px;
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.06), rgba(255, 138, 92, 0.06));
  border: 1px solid rgba(47, 107, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 16px;
}

body:not(.is-admin) .top-sell,
body:not(.is-admin) .info-hub {
  content-visibility: auto;
  contain-intrinsic-size: 800px 600px;
}

.book-scroll {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1024px) {
  .book-scroll {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .book-scroll {
    grid-template-columns: 1fr;
  }
}

.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.book-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(47, 107, 255, 0.07), transparent 38%),
              radial-gradient(circle at 80% 0%, rgba(255, 138, 92, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.book-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.book-card:hover::after {
  opacity: 1;
}

.book-cover {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #2f6bff 0%, #7ab8ff 100%);
  margin-bottom: 10px;
  box-shadow: 0 10px 25px rgba(47, 107, 255, 0.28);
  overflow: hidden;
}

.book-rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(18, 24, 38, 0.72);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  z-index: 1;
}

.hot-dot {
  color: #ff9a3d;
  font-size: 1rem;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Content */
.content-section {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 232, 239, 0.9);
  box-shadow: var(--shadow);
  border-radius: calc(var(--radius-lg) + 2px);
  padding: 12px;
}

.section-head h2,
.section-head h3 {
  margin: 6px 0 6px;
}

.section-head__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head__row h2 {
  margin: 0;
}

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

.card {
  background: linear-gradient(180deg, rgba(247, 249, 255, 0.85), #ffffff);
  border: 1px solid rgba(18, 24, 38, 0.12);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 12px 30px rgba(18, 24, 38, 0.14);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card__header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  width: 100%;
}

.results-grid .card {
  border: 1px solid rgba(47, 107, 255, 0.12);
  position: relative;
  overflow: visible;
}

.results-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  justify-content: start;
}

.suggest-head {
  margin-top: 12px;
}

.suggestion-grid {
  margin-top: 12px;
  align-items: stretch;
}

.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.topic-chips .chip {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
}

.result-card.has-cover {
  min-height: 220px;
  cursor: pointer;
}

.status-list {
  display: grid;
  gap: 10px;
}

.actions {
  margin-top: 12px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-muted);
  border-radius: var(--radius);
  padding: 10px 12px;
  border: 1px solid var(--border);
  gap: 8px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.cover-pop {
  position: relative;
  inset: auto;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 6px;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  margin-bottom: 0;
}

.cover-pop img {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius) - 4px);
  display: block;
  object-fit: contain;
}

.result-card.has-cover .cover-pop {
  display: none;
}

.result-card.has-cover.show-cover .cover-pop {
  display: block;
}

.result-card.has-cover.show-cover .card__header,
.result-card.has-cover.show-cover .status-list,
.result-card.has-cover.show-cover .topic-chips,
.result-card.has-cover.show-cover .reserve-hint {
  display: none;
}

body:not(.is-admin) .result-card.has-cover .cover-pop {
  display: block;
  width: 100%;
}

body:not(.is-admin) .result-card.has-cover:not(.show-info) .card__header,
body:not(.is-admin) .result-card.has-cover:not(.show-info) .status-list,
body:not(.is-admin) .result-card.has-cover:not(.show-info) .topic-chips,
body:not(.is-admin) .result-card.has-cover:not(.show-info) .reserve-hint {
  display: none;
}

body:not(.is-admin) .result-card.has-cover.show-info .cover-pop {
  display: none;
}

body:not(.is-admin) .result-card.has-cover.show-info .card__header {
  display: flex;
}

body:not(.is-admin) .result-card.has-cover.show-info .status-list {
  display: grid;
}

body:not(.is-admin) .result-card.has-cover.show-info .topic-chips {
  display: flex;
}

body:not(.is-admin) .result-card.has-cover.show-info .reserve-hint {
  display: block;
}

@media (hover: none) {
  .cover-pop {
    aspect-ratio: 2 / 3;
  }
}

.modal-overlay .cover-modal-box {
  max-width: 1400px;
  width: min(60vw, 1400px);
  max-height: 92vh;
  position: relative;
  display: grid;
}

.cover-modal-img {
  width: 100%;
  height: auto;
  max-height: 58vh;
  border-radius: var(--radius);
  object-fit: contain;
  display: block;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

.cover-modal-content {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 10px 12px;
  align-items: start;
}

@media (max-width: 720px) {
  .cover-modal-content {
    grid-template-columns: 1fr;
  }
}

.cover-modal-meta {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.4;
}

.cover-meta-row {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.cover-title {
  font-size: 1.4rem;
  line-height: 1.3;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cover-author {
  color: var(--muted);
  font-weight: 600;
  font-size: 1.15rem;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cover-modal-cabinets {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.cover-cab-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  gap: 12px;
  flex-wrap: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cover-cab-row .cabinet {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}

.cover-cab-row .status {
  white-space: nowrap;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.cover-cab-row.in-stock {
  background: rgba(63, 185, 80, 0.08);
  border-color: rgba(63, 185, 80, 0.32);
}

.cover-cab-row.out-stock {
  background: rgba(255, 107, 107, 0.08);
  border-color: rgba(255, 107, 107, 0.32);
}

.cover-cab-row .status.in-stock,
.cover-cab-row .status.status--in {
  background: rgba(63, 185, 80, 0.14);
  color: #1f8c34;
  border-color: rgba(63, 185, 80, 0.32);
}

.cover-cab-row .status.out-stock,
.cover-cab-row .status.status--out {
  background: rgba(255, 107, 107, 0.14);
  color: #c23d3d;
  border-color: rgba(255, 107, 107, 0.32);
}

.cover-cab-row .status {
  white-space: nowrap;
}

.cab {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}

.stat {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: none;
  flex: 0 0 auto;
}

/* Emphasize status badges inside the book modal */
.modal-content .stat {
  max-width: none;
  min-width: 200px;
  font-size: 1.08rem;
  padding: 10px 14px;
  justify-content: center;
  border-width: 2px;
}

.modal-content .stat.in-stock,
.modal-content .status--in {
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.18);
}

.modal-content .stat.out-stock,
.modal-content .status--out {
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.22);
}

.stat.in-stock,
.status--in {
  background: rgba(63, 185, 80, 0.12);
  color: #1f8c34;
  border: 1px solid rgba(63, 185, 80, 0.24);
}

.stat.out-stock,
.status--out {
  background: rgba(255, 107, 107, 0.12);
  color: #c23d3d;
  border: 1px solid rgba(255, 107, 107, 0.24);
}

.reserve-hint {
  background: rgba(255, 138, 92, 0.08);
  color: #b45a30;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 138, 92, 0.45);
  font-size: 0.95rem;
}

.reserve-hint.replenish-hint {
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.reserve-hint.replenish-hint:hover {
  background: rgba(255, 138, 92, 0.15);
  border-color: rgba(255, 138, 92, 0.65);
  border-style: solid;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 138, 92, 0.2);
}

.reserve-hint.replenish-hint:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(255, 138, 92, 0.15);
}

.edit-btn-container {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.mini-btn.secondary {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}


/* Notification modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 28, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-box:not(.large) {
  overflow: auto;
}

.modal-box.small { max-width: 420px; }
.modal-box.medium { max-width: 840px; }
.modal-box.large {
  max-width: 1260px;
  max-height: 82vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}

.booth-map-box {
  gap: 16px;
}

.booth-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.booth-map-body {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr);
  gap: 16px;
}

.booth-map-canvas {
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.08), rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(47, 107, 255, 0.15);
  border-radius: 16px;
  padding: 12px;
  min-height: 240px;
}

.booth-map-svg {
  width: 100%;
  height: auto;
}

.booth-map-boundary {
  filter: drop-shadow(0 18px 40px rgba(35, 65, 130, 0.12));
}

.booth-map-seat {
  cursor: pointer;
  transition: transform 0.12s ease, fill 0.12s ease;
}

.booth-map-seat:hover {
  transform: translateY(-2px);
}

.booth-map-seat--active {
  filter: drop-shadow(0 4px 8px rgba(47, 107, 255, 0.25));
}

.booth-map-fixture {
  fill: rgba(255, 255, 255, 0.85);
  stroke: rgba(128, 140, 180, 0.4);
  stroke-width: 2;
}

.booth-map-panel {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(229, 232, 239, 0.8);
  border-radius: 16px;
  padding: 12px;
  min-height: 240px;
}

.booth-map-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.booth-map-list li {
  background: rgba(47, 107, 255, 0.08);
  border: 1px solid rgba(47, 107, 255, 0.12);
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 600;
}

.venue-map-box {
  gap: 16px;
}

.venue-map-body {
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) minmax(240px, 0.7fr);
  gap: 18px;
  align-items: stretch;
}

.venue-map-canvas {
  position: relative;
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(30, 40, 70, 0.12), rgba(255, 255, 255, 0.6));
  border: 1px solid rgba(47, 107, 255, 0.2);
  backdrop-filter: blur(12px);
  min-height: 320px;
  overflow: hidden;
}

.venue-map-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 16px 40px rgba(31, 52, 100, 0.18);
}

.venue-map-pins {
  position: absolute;
  inset: 14px;
  pointer-events: none;
}

.venue-map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(17, 24, 39, 0.75);
  color: #f8fafc;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.venue-map-pin.highlight-zone {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(37, 99, 235, 0.9);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.35);
}

.venue-map-panel {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(215, 222, 240, 0.8);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.venue-map-zones {
  display: grid;
  gap: 10px;
}

.venue-zone-card {
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(47, 107, 255, 0.18);
  background: rgba(47, 107, 255, 0.08);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border 0.18s ease;
}

.venue-zone-card strong {
  color: #1f2a44;
  font-weight: 700;
}

.venue-zone-card span {
  color: rgba(30, 41, 59, 0.7);
  font-size: 12px;
  line-height: 1.4;
}

.venue-zone-card.is-active,
.venue-zone-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.pixel-card .card__header {
  align-items: flex-start;
}

.pixel-scene {
  position: relative;
  width: 100%;
  height: 140px;
  background: linear-gradient(180deg, #1f2533 0%, #2b3143 85%, #181d29 85%, #181d29 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  image-rendering: pixelated;
}

.pixel-scene::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 6px;
  background: #121722;
}

.shelf {
  position: absolute;
  bottom: 12px;
  width: 120px;
  height: 48px;
  background: #39425a;
  border-radius: 10px;
  border: 2px solid #4a5572;
  color: #e5edff;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

.shelf--reserve {
  left: 6%;
}

.shelf--display {
  right: 6%;
}

.pixel-worker {
  position: absolute;
  bottom: 28px;
  left: 12%;
  width: calc(16 * var(--pixel-size, 4px));
  height: calc(16 * var(--pixel-size, 4px));
}

.pixel-worker .sprite {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(#ffccaa, #ffccaa) 40% 0 / 40% 30% no-repeat,
    linear-gradient(#3366cc, #3366cc) 20% 30% / 80% 50% no-repeat,
    linear-gradient(#222, #222) 20% 80% / 30% 20% no-repeat,
    linear-gradient(#222, #222) 70% 80% / 30% 20% no-repeat;
}

.pixel-worker.working .sprite::after {
  content: '';
  position: absolute;
  top: 30%;
  right: -10%;
  width: 40%;
  height: 30%;
  background: #8b4513;
}

.pixel-worker.working {
  animation: run-route 6s linear infinite;
}

.pixel-worker.sleeping .bubble {
  position: absolute;
  top: -20px;
  right: 0;
  font-family: monospace;
  color: #f1f5ff;
  animation: float-z 2s infinite;
}

@keyframes run-route {
  0% { left: 12%; transform: scaleX(1); }
  45% { left: 78%; transform: scaleX(1); }
  50% { left: 78%; transform: scaleX(1); opacity: 0; }
  51% { left: 78%; transform: scaleX(-1); opacity: 1; }
  95% { left: 12%; transform: scaleX(-1); }
  100% { left: 12%; transform: scaleX(1); }
}

@keyframes float-z {
  0% { opacity: 0; transform: translateY(0); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px); }
}

.realtime-stock {
  display: grid;
  gap: 16px;
}

.realtime-list-card {
  display: grid;
  gap: 10px;
}

.realtime-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.realtime-list li {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 122, 0, 0.18);
  background: rgba(255, 145, 77, 0.12);
  font-weight: 600;
}

.info-hub {
  background: linear-gradient(135deg, rgba(20, 29, 46, 0.04), rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(20, 29, 46, 0.1);
  border-radius: var(--radius-lg);
  padding: 18px;
}

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

.info-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.info-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(229, 232, 239, 0.8);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}

.info-card h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

.info-card--payment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}

.info-card__text {
  display: grid;
  gap: 4px;
}

/* --- ENHANCED INFO CARDS --- */
.discount-stack {
  display: grid;
  gap: 12px;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.discount-ticket {
  background: linear-gradient(135deg, #ff6b6b, #ee5253);
  color: #fff;
  display: flex;
  position: relative;
  overflow: hidden;
  border: none;
  padding: 0;
  text-decoration: none;
}

.discount-ticket--secondary {
  background: linear-gradient(135deg, #2fbdff, #1da8ff);
}

.discount-ticket--line {
  background: linear-gradient(135deg, #34d399, #16a34a);
}

.ticket-left {
  flex: 1.5;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.ticket-icon {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.22);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-align: center;
}

.promo-label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.9;
  letter-spacing: 1px;
}

.promo-value {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.promo-value small {
  font-size: 1.2rem;
}

.promo-sub {
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.95;
}

.promo-note {
  display: none;
  font-size: 0.8rem;
  opacity: 0.9;
}

.ticket-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ticket-divider {
  width: 2px;
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 33%, transparent 0%);
  background-position: right;
  background-size: 2px 10px;
  background-repeat: repeat-y;
  position: relative;
  margin: 12px 0;
}

.ticket-divider::before,
.ticket-divider::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--bg);
  border-radius: 50%;
  left: -9px;
}

.ticket-divider::before { top: -22px; }
.ticket-divider::after { bottom: -22px; }

.ticket-right {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
}

.ticket-right .tiny-text {
  margin: 0 0 4px 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
}

.discount-ticket .muted {
  color: rgba(255, 255, 255, 0.8);
}

.btn-xs {
  border: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 4px 12px;
  width: fit-content;
}

.btn-xs.btn--outline {
  border: 1px dashed rgba(255, 255, 255, 0.5);
  color: #fff;
  background: transparent;
}

.event-timeline-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.card-header-row h3 {
  margin: 0;
  font-size: 1.2rem;
}

.live-badge {
  background: #ff4757;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.mini-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 20px;
  bottom: -16px;
  width: 2px;
  background: #e0e0e0;
}

.tl-time {
  width: 50px;
  font-weight: 700;
  color: var(--primary);
  font-family: "Noto Sans TC", "Manrope", sans-serif;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

.tl-content {
  display: flex;
  flex-direction: column;
}

.tl-content strong {
  color: var(--text);
  font-size: 1rem;
}

.tl-loc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

.timeline-item.active .tl-time {
  color: #ff4757;
}

.timeline-item.active .tl-time::after {
  content: '●';
  position: absolute;
  right: -10px;
  color: #ff4757;
  font-size: 0.8rem;
}

.payment-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  flex-wrap: wrap;
}

.payment-icon-wrap {
  width: 86px;
  height: 86px;
  background: #fff;
  border: 1px solid rgba(18, 24, 38, 0.12);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(18, 24, 38, 0.08);
}

.payment-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(1.05);
}

.payment-icon--tight {
  transform: scale(1.08);
}

.qa-section {
  margin-top: 16px;
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.qa-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(229, 232, 239, 0.8);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 8px;
}

.qa-card h3 {
  margin: 0;
  font-size: 1rem;
}

.qa-card p {
  margin: 0;
  color: var(--muted);
}

/* --- DASHBOARD ENHANCEMENTS --- */
.dashboard-search-container {
  background: #fff;
  padding: 16px 24px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  margin-bottom: 24px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.search-form-modern {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input-wrapper {
  flex-grow: 1;
  position: relative;
  min-width: 280px;
}

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

.search-input-wrapper input {
  width: 100%;
  padding-left: 42px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  transition: all 0.2s;
}

.search-input-wrapper input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.1);
  outline: none;
}

.search-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.search-form-modern .advanced-panel {
  width: 100%;
  flex-basis: 100%;
}

.advanced-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.dashboard-widgets {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.widget-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 200px;
}

.widget-body {
  display: grid;
  gap: 12px;
  flex: 1;
}

.scrollable-list {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.widget-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #1e293b;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 8px;
}

.badge--red {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.alert-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.alert-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: #fff5f5;
  border-radius: 8px;
  color: #c0392b;
  font-size: 0.95rem;
  align-items: center;
}

.empty-state-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  gap: 8px;
  font-weight: 500;
}

.more-link {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.action-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: var(--surface-muted);
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
}

.action-tile:hover {
  background: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.1);
}

.tile-icon {
  font-size: 1.5rem;
}

.tile-label {
  font-weight: 600;
  font-size: 0.9rem;
}

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

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

@media (max-width: 768px) {
  .book-showcase-grid {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .showcase-book {
    transform: none !important;
  }

  .showcase-book:hover {
    transform: none;
  }

  .showcase-more {
    display: none;
  }
}

@media (max-width: 720px) {
  .info-grid { grid-template-columns: 1fr; }
  .qa-grid { grid-template-columns: 1fr; }
  .hero__list { grid-template-columns: 1fr; }

  .hero-brand {
    padding: 6px 10px;
    gap: 8px;
  }

  .hero-brand .brand__text {
    align-items: center;
    gap: 6px;
  }

  .hero-brand .brand__eyebrow {
    font-size: 0.7rem;
  }

  .hero-brand .brand__title {
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .hero-brand__action {
    font-size: 0.78rem;
    padding: 4px 8px;
    white-space: nowrap;
  }

  .info-hub {
    padding: 12px;
  }

  .info-hub .section-head h1 {
    font-size: 1.4rem;
    margin: 4px 0;
  }

  .event-banner {
    padding: 16px;
    gap: 16px;
    --event-cover-height: clamp(140px, 38vw, 200px);
  }

  .event-banner__content {
    gap: 6px;
  }

  .event-title {
    font-size: 1.4rem;
  }

  .event-desc {
    -webkit-line-clamp: 2;
  }

  .event-hint {
    font-size: 0.85rem;
  }

  .event-meta {
    gap: 4px;
    font-size: 0.9rem;
  }

  .event-banner__visuals {
    display: none;
  }

  .event-banner--books-open .event-banner__visuals {
    display: flex;
  }

  .event-books-toggle {
    display: inline-flex;
  }

  .ticket-right {
    display: none;
  }

  .promo-note {
    display: block;
    margin-top: 4px;
  }

  .book-showcase-grid {
    gap: 10px;
  }

  .showcase-book {
    border-radius: 12px;
  }

  .showcase-more {
    width: var(--event-cover-width);
    height: var(--event-cover-height);
  }

  .results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .event-slide__row {
    grid-template-columns: 1fr;
  }

  .event-banner {
    grid-template-columns: 1fr;
  }

  .event-banner__visuals {
    justify-content: center;
  }

  .book-showcase-grid {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .book-showcase-grid::-webkit-scrollbar {
    height: 0;
  }

  .showcase-book,
  .showcase-more {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .discount-ticket {
    flex-direction: row;
  }

  .discount-stack {
    grid-template-columns: 1fr;
  }

  .ticket-right {
    min-width: 120px;
  }

  .ticket-right .tiny-text {
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .ticket-divider {
    width: 2px;
    height: auto;
    margin: 12px 0;
    background-size: 2px 10px;
  }

  .ticket-divider::before,
  .ticket-divider::after {
    display: block;
  }
}

@media (max-width: 640px) {
  .event-banner {
    --event-cover-height: clamp(140px, 40vw, 200px);
    padding: 14px;
  }

  .event-meta {
    grid-template-columns: 1fr;
  }

  .ticket-left,
  .ticket-right {
    padding: 12px 14px;
  }

  .ticket-icon {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
  }

  .promo-value {
    font-size: 2.1rem;
  }
}

/* Marquee animation */
.marquee-container {
  overflow: hidden;
  position: relative;
  padding: 30px 0;
  background: var(--surface);
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.marquee-row {
  display: flex;
  margin-top: 8px;
  margin-bottom: 8px;
  width: 100%;
  cursor: default;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
}

.book-card-mini {
  position: relative;
  width: 200px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  cursor: pointer;
  scroll-snap-align: start;
  overflow: visible;
}

.book-card-mini img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: block;
}

.book-card-mini .rank {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #ff4f4f;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.book-card-mini .view-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(18, 24, 38, 0.75);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 999px;
  z-index: 2;
}

.marquee-row:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-row.is-interacting .marquee-track {
  animation-play-state: paused;
}

.book-card-mini:hover {
  transform: scale(1.08);
  z-index: 10;
}

.scroll-left .marquee-track {
  animation: scroll-left 60s linear infinite;
}

.scroll-right .marquee-track {
  animation: scroll-right 60s linear infinite;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scroll-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* --- VISUAL ENHANCEMENTS --- */
.site-header__inner,
.modal-box,
.toast,
.info-hub {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.site-header__inner {
  border-color: rgba(229, 232, 239, 0.6);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.08);
}

.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
  transform: scale(0.96);
}

.btn--primary {
  box-shadow: 0 4px 14px 0 rgba(47, 107, 255, 0.39);
}

.btn--primary:hover {
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.23);
  transform: translateY(-2px);
}

.book-card, .card, .cabinet-row, .hero__card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.book-card:hover, .card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 15px 35px rgba(18, 24, 38, 0.1);
  border-color: rgba(47, 107, 255, 0.3);
}

@media (max-width: 768px) {
  .audit-table {
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .audit-table__head {
    display: none;
  }

  .audit-table__row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    padding: 16px;
    box-shadow: var(--shadow-soft);
    align-items: flex-start;
  }

  .audit-table__row:nth-child(odd) {
    background: #fff;
  }

  .audit-table__row > span:nth-child(1)::before { content: "時間: "; color: var(--muted); font-size: 0.85em; }
  .audit-table__row > span:nth-child(2)::before { content: "操作: "; color: var(--muted); font-size: 0.85em; }
  .audit-table__row > span:nth-child(3)::before { content: "對象: "; color: var(--muted); font-size: 0.85em; }
}

.realtime-modal-body {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(220px, 1.1fr) minmax(200px, 0.9fr);
}

@media (max-width: 720px) {
  .realtime-modal-body { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .booth-map-body { grid-template-columns: 1fr; }
  .venue-map-body { grid-template-columns: 1fr; }
  .venue-map-canvas { min-height: 240px; }
  .venue-map-pin { font-size: 11px; padding: 5px 8px; }
  .event-banner--active {
    animation-duration: 6.5s;
  }
  .event-banner--active::before {
    opacity: 0.45;
    animation-duration: 3.6s;
  }
  .event-banner--active::after {
    opacity: 0.8;
  }
  .event-live {
    font-size: 0.7rem;
  }
}

@media (max-width: 720px) {
  .status-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .status-row .cab {
    flex: 1 1 100%;
  }
}

.modal-box.large > *:nth-child(2) {
  overflow: auto;
}

.cover-modal-box {
  max-width: 1400px;
  width: min(60vw, 1400px);
  max-height: 92vh;
  display: grid;
}

.cover-modal-body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-height: none;
}

.cover-modal-content {
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.cover-modal-content > div:last-child {
  display: grid;
  gap: 12px;
  max-width: none;
  max-height: none;
  overflow: visible;
  align-content: start;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Override medium modal sizing for cover modal */
.modal-box.medium.cover-modal-box {
  max-width: 1400px;
  width: min(60vw, 1400px);
  min-height: 68vh;
  max-height: 92vh;
}

@media (max-width: 720px) {
  .modal-overlay .cover-modal-box,
  .cover-modal-box,
  .modal-box.medium.cover-modal-box {
    width: min(95vw, 720px);
    max-width: 95vw;
    min-height: auto;
  }
}

.btn.btn--danger,
.close-btn,
.btn.btn--danger.btn--sm {
  background: linear-gradient(135deg, #ff6b6b, #ff4f4f);
  color: #fff;
  border: 1px solid rgba(255, 79, 79, 0.7);
}


/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(18, 24, 38, 0.05);
  font-weight: 700;
  font-size: 0.9rem;
}

.chip--soft {
  background: rgba(47, 107, 255, 0.1);
  color: var(--primary);
}

.chip--action {
  cursor: pointer;
  background: rgba(47, 107, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(47, 107, 255, 0.28);
  text-decoration: none;
  font-size: 1rem;
  padding: 10px 16px;
  border-radius: 999px;
}

/* Modal content from backend */
.modal-content h2 { margin-top: 0; }
.modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.modal-content {
  display: grid;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.toggle-btn {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-width: 120px;
  text-align: center;
  font-weight: 700;
}

.modal-content .toggle-btn.stat {
  max-width: 100%;
  white-space: normal;
  text-overflow: initial;
  overflow: visible;
}

.close-btn {
  margin-top: 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(231, 76, 60, 0.4);
  background: linear-gradient(135deg, #ff6b6b, #ff4f4f);
  color: #fff;
  cursor: pointer;
  justify-self: end;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
}

.toast__body {
  font-weight: 600;
}

.toast__actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.toast__undo {
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success { border-left: 4px solid #1f8c34; }
.toast.error { border-left: 4px solid #c23d3d; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 30px 20px;
}

.empty-state.compact {
  position: relative;
  padding: 20px 18px;
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.12), rgba(255, 138, 92, 0.12));
  border: 1px solid rgba(47, 107, 255, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 32px rgba(18, 24, 38, 0.12);
  overflow: hidden;
}

.empty-state.compact::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at 20% 30%, rgba(47, 107, 255, 0.18), transparent 40%),
              radial-gradient(circle at 80% 30%, rgba(255, 138, 92, 0.16), transparent 45%);
  opacity: 0.9;
  animation: emptyPulse 7s ease-in-out infinite;
  pointer-events: none;
}

.empty-state__icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

@keyframes emptyPulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 0.75; }
  100% { transform: scale(1); opacity: 0.9; }
}

/* Footer */
.site-footer {
  background-color: #1a1a1a;
  color: #a0a0a0;
  padding: 64px 20px 20px;
  margin-top: auto;
  font-size: 0.95rem;
  border-top: 1px solid #333;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto 60px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 2rem;
  margin-bottom: 16px;
}

.brand-mark {
  color: #ffd700;
}

.footer-desc {
  line-height: 1.6;
  max-width: 340px;
  margin-bottom: 24px;
}

.footer-mascot {
  height: 86px;
  position: relative;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-mascot::before {
  content: "SYSTEM CREW";
  font-size: 0.65rem;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.45);
}

.footer-mascot .pixel-worker {
  transform: scale(0.9);
}

.footer-mascot .bubble {
  left: 42px;
  top: -2px;
}

.footer-links h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-links a {
  display: block;
  color: #a0a0a0;
  text-decoration: none;
  margin-bottom: 12px;
  transition: color 0.2s, transform 0.2s;
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-link-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: #a0a0a0;
  text-align: left;
  font: inherit;
  margin-bottom: 12px;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}

.footer-link-button:hover {
  color: #fff;
  transform: translateX(4px);
}

.highlight-link {
  color: #4f8aff !important;
  font-weight: 600;
}

.dev-tag {
  margin-top: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
}

.dev-tag strong {
  display: block;
  color: #fff;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-status-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.footer-status-btn:hover {
  color: #fff;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #2ecc71;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.4);
  animation: statusPulse 1.8s ease-in-out infinite;
}

.status-dot--warning {
  background-color: #f4b400;
  box-shadow: 0 0 8px rgba(244, 180, 0, 0.45);
  animation: statusPulseWarning 1.8s ease-in-out infinite;
}

.divider { color: #444; }

@keyframes statusPulse {
  0% { transform: scale(1); opacity: 0.9; box-shadow: 0 0 8px rgba(46, 204, 113, 0.4); }
  50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 14px rgba(46, 204, 113, 0.6); }
  100% { transform: scale(1); opacity: 0.9; box-shadow: 0 0 8px rgba(46, 204, 113, 0.4); }
}

@keyframes statusPulseWarning {
  0% { transform: scale(1); opacity: 0.9; box-shadow: 0 0 8px rgba(244, 180, 0, 0.45); }
  50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 14px rgba(244, 180, 0, 0.7); }
  100% { transform: scale(1); opacity: 0.9; box-shadow: 0 0 8px rgba(244, 180, 0, 0.45); }
}

.footer-status-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-status-list li {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
}

.footer-modal {
  background: rgba(26, 26, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  color: #e5e7eb;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.footer-modal .modal-header h3 {
  margin: 0;
  color: #fff;
}

.footer-modal .modal-body {
  display: grid;
  gap: 12px;
}

.footer-modal .field span {
  color: #cbd5f5;
  font-size: 0.85rem;
}

.footer-modal input,
.footer-modal select,
.footer-modal textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc;
}

.footer-modal textarea {
  resize: vertical;
}

.footer-modal .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.dev-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}


.is-hidden {
  display: none !important;
}

.announcement-modal {
  position: relative;
  max-width: 680px;
  padding-bottom: 52px;
}

.announcement-list {
  margin: 16px 0 24px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.announcement-list li {
  line-height: 1.5;
}

.announcement-sign {
  position: absolute;
  right: 24px;
  bottom: 18px;
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.85;
}

.announcement-em {
  display: inline-block;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 1.05em;
  background: #fff3a6;
  padding: 0 6px;
  border-radius: 6px;
}

.about-modal {
  position: relative;
  max-width: 520px;
}

.about-body {
  display: grid;
  gap: 8px;
}


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

@media (max-width: 720px) {
  .site-header__inner { flex-direction: row; flex-wrap: nowrap; gap: 10px; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand__text { min-width: 0; }
  .brand__text .eyebrow { display: none; }
  .brand__title { font-size: 1rem; }
  .header-actions { margin-left: auto; }
  .header-actions, .admin-header-buttons { justify-content: flex-end; flex-wrap: nowrap; }
  .header-actions .pill-link { white-space: nowrap; }
  .search-box { flex-direction: column; align-items: stretch; }
  .search-box button { width: 100%; }
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
