:root {
  --bg: #000000;
  --bg-elev: #121212;
  --surface: #1a1a1a;
  --fg: #fafafa;
  --muted: #a8a8a8;
  --accent: #30d158;
  --accent-soft: rgba(48, 209, 88, 0.12);
  --accent-glow: rgba(48, 209, 88, 0.12);
  --glass: rgba(18, 18, 18, 0.88);
  --glass-border: #262626;
  --danger: #ed4956;
  --danger-soft: rgba(237, 73, 86, 0.12);
  --radius: 4px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.text-muted {
  color: var(--muted) !important;
}

.bg-orb {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 40% at 50% -10%, rgba(48, 209, 88, 0.06), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.site-header,
.site-main,
.site-footer {
  position: relative;
  z-index: auto;
}

.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.glass,
.glass-nav,
.glass-modal,
.glass-card {
  background: var(--bg-elev);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.glass-nav {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.navbar-brand.brand {
  font-weight: 650;
  letter-spacing: -0.03em;
  font-size: 1.35rem;
  color: var(--accent) !important;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.navbar-brand.brand .brand-title {
  color: var(--accent);
}

.navbar-brand.brand .brand-sub {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 0.15rem;
  line-height: 1.2;
}

.navbar-brand.brand:hover {
  color: var(--accent) !important;
  opacity: 0.9;
}

.navbar-brand.brand:hover .brand-sub {
  color: #c0c0c0;
}

.nav-link,
.nav-link.btn {
  color: var(--muted) !important;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem !important;
  border-radius: var(--radius);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.btn:hover {
  color: var(--fg) !important;
  background: var(--surface);
}

.lang-link {
  color: var(--fg) !important;
  font-weight: 600;
  border: 1px solid var(--glass-border);
}

.text-accent {
  color: var(--accent) !important;
}

.btn-accent {
  --bs-btn-color: #000;
  --bs-btn-bg: #30d158;
  --bs-btn-border-color: #30d158;
  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: #3dff7a;
  --bs-btn-hover-border-color: #3dff7a;
  --bs-btn-focus-shadow-rgb: 48, 209, 88;
  --bs-btn-active-color: #000;
  --bs-btn-active-bg: #28c04e;
  --bs-btn-active-border-color: #28c04e;
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: none;
}

.btn-accent-warm {
  --bs-btn-color: #111;
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #111;
  --bs-btn-hover-bg: #3dff7a;
  --bs-btn-hover-border-color: #3dff7a;
  --bs-btn-active-color: #111;
  --bs-btn-active-bg: #28c04e;
  --bs-btn-active-border-color: #28c04e;
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: none;
}

.btn {
  border-radius: var(--radius);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--fg);
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--fg);
  border-color: #363636;
}

.btn-danger-soft {
  background: var(--danger-soft);
  border: 1px solid rgba(237, 73, 86, 0.28);
  color: #ed4956;
}

.btn-danger-soft:hover {
  background: rgba(237, 73, 86, 0.2);
  color: #ff6b78;
  border-color: rgba(237, 73, 86, 0.45);
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem 3rem;
  animation: fadeUp 0.65s ease both;
}

.hero-card {
  width: min(480px, 100%);
  padding: 2.5rem 1.75rem;
  text-align: center;
  background: var(--bg-elev);
}

.hero-card .label {
  display: block;
  font-size: clamp(1.45rem, 5.5vw, 2.15rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--fg);
  line-height: 1.2;
}

.hero-hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 1.25rem;
  margin-bottom: 0;
  line-height: 1.5;
}

.id-input {
  background: #000;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.id-input:focus {
  background: #000;
  border-color: #555;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
  color: var(--fg);
  outline: none;
}

.id-input::placeholder {
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 400;
  color: #555;
  font-size: 0.95rem;
}

.page-wrap {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  animation: fadeUp 0.5s ease both;
}

.page-title {
  font-weight: 650;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
  font-size: 1.5rem;
}

.page-sub {
  color: var(--muted);
  margin-bottom: 1.35rem;
}

.page-sub.id-line,
.page-sub.id-line .id-prefix {
  color: var(--fg);
}

.alert-banner {
  background: var(--accent-soft);
  border: 1px solid rgba(48, 209, 88, 0.22);
  color: #86efac;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin-bottom: 1.15rem;
  font-weight: 560;
  text-align: center;
}

.alert-gone {
  background: var(--danger-soft);
  border-color: rgba(237, 73, 86, 0.28);
  color: #ed4956;
}

/* Media — fotokurve grid + options menu */
.media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

@media (min-width: 700px) {
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

.media-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #000;
  border-color: var(--glass-border);
}

.media-preview {
  background: #0a0a0a;
  aspect-ratio: 1;
  display: block;
  overflow: hidden;
  position: relative;
}

.media-preview.is-video {
  aspect-ratio: 16 / 10;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.media-card.is-paid .media-preview img,
.media-card.is-paid .media-preview video {
  filter: brightness(0.68);
}

.media-preview img.fk-fade,
.gallery-item img.fk-fade,
.fk-lightbox img {
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.35s ease;
}

.media-preview img.fk-fade.is-loaded,
.gallery-item img.fk-fade.is-loaded,
.fk-lightbox img.is-loaded {
  opacity: 1;
}

.media-preview.is-loading,
.gallery-item.is-loading,
.fk-lightbox.is-loading {
  isolation: isolate;
}

.fk-loader {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(110deg, #111 8%, #1c1c1c 18%, #111 33%);
  background-size: 200% 100%;
  animation: fkShimmer 1.35s ease-in-out infinite;
}

.fk-loader::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.1rem;
  height: 2.1rem;
  margin: -1.05rem 0 0 -1.05rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(48, 209, 88, 0.85);
  animation: fkSpin 0.75s linear infinite;
}

.media-preview:not(.is-loading) > .fk-loader,
.gallery-item:not(.is-loading) > .fk-loader,
.fk-lightbox:not(.is-loading)::before {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.fk-lightbox.is-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.4rem;
  height: 2.4rem;
  margin: -1.2rem 0 0 -1.2rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(48, 209, 88, 0.85);
  animation: fkSpin 0.75s linear infinite;
  z-index: 1;
}

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

@keyframes fkSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .fk-loader,
  .fk-loader::after,
  .fk-lightbox.is-loading::before {
    animation: none;
  }
  .media-preview img.fk-fade,
  .gallery-item img.fk-fade,
  .fk-lightbox img {
    opacity: 1;
    transition: none;
  }
}

.media-preview img {
  cursor: zoom-in;
}

.media-card:hover .media-preview img.is-loaded {
  transform: scale(1.02);
}

.media-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 45%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.media-card:hover .media-overlay,
.media-card:focus-within .media-overlay,
.media-card.is-menu-open .media-overlay {
  opacity: 1;
}

@media (hover: none) {
  .media-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 40%);
  }
}

.media-menu {
  position: relative;
  pointer-events: auto;
}

.media-dl,
.media-menu-btn {
  pointer-events: auto;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  text-decoration: none;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
  cursor: pointer;
  margin-left: auto;
}

.media-dl:hover,
.media-menu-btn:hover,
.media-card.is-menu-open .media-menu-btn {
  background: #fff;
  color: #111;
  transform: scale(1.05);
}

.media-menu-btn i {
  font-size: 1.15rem;
  line-height: 1;
}

.media-menu-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.45rem);
  min-width: 9.5rem;
  padding: 0.35rem;
  border-radius: 10px;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  z-index: 5;
}

.media-menu-panel[hidden] {
  display: none !important;
}

.media-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: #fafafa;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.5rem 0.6rem;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
}

.media-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.media-menu-item i {
  font-size: 1rem;
  width: 1.1rem;
  text-align: center;
}

.media-menu-item.media-vote.is-on {
  color: var(--accent);
}

.media-menu-item.media-vote.is-on.down {
  color: var(--danger);
}

.media-meta {
  display: none;
}

.media-lock,
.media-paid-note {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem;
  color: #fff;
  text-align: center;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.28);
}

.media-lock i,
.media-paid-note i {
  font-size: 1.55rem;
  color: var(--accent);
}

.media-lock-title,
.media-lock span:first-of-type {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.media-lock-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
}

.media-bar,
.media-toolbar {
  display: none !important;
}

.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.75rem 0 1.35rem;
}

.viewer-actions.bottom {
  margin-top: 2rem;
  justify-content: center;
}

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

@media (min-width: 768px) {
  .gallery-grid {
    gap: 3px;
  }
}

.gallery-item {
  overflow: hidden;
  aspect-ratio: 1;
  padding: 0;
  cursor: zoom-in;
  border: 0;
  border-radius: 0;
  background: #111;
  transition: opacity 0.2s ease;
  position: relative;
}

.gallery-item:hover {
  opacity: 0.92;
  transform: none;
  box-shadow: none;
}

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

.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.legal-content {
  max-width: 720px;
}

.legal-content h1 {
  font-weight: 650;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.legal-content h2 {
  font-size: 1.05rem;
  margin-top: 1.75rem;
  margin-bottom: 0.55rem;
  color: var(--fg);
}

.legal-content p,
.legal-content li {
  color: var(--muted);
  line-height: 1.65;
}

.site-footer {
  padding: 0 1rem 1.5rem;
  opacity: 0.55;
}

.footer-inner {
  padding: 0.85rem 1rem;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.footer-brand {
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.15rem;
  font-size: 0.85rem;
  color: #666;
}

.footer-tag {
  color: #555;
  font-size: 0.78rem;
}

.footer-links a {
  color: #555;
  text-decoration: none;
  font-size: 0.78rem;
}

.footer-links a:hover {
  color: #888;
}

.footer-links .sep {
  color: #333;
  margin: 0 0.35rem;
}

.message-area {
  min-height: 180px;
  resize: vertical;
}

.album-note-text {
  color: var(--fg);
  line-height: 1.65;
  white-space: pre-wrap;
}

.text-success {
  color: #7dcea0 !important;
}

.glass-modal {
  background: #121212;
  color: var(--fg);
  border: 1px solid var(--glass-border);
}

.glass-modal .modal-body p {
  color: var(--muted);
  line-height: 1.65;
}

.license-note {
  color: #86efac !important;
  font-size: 0.88rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

/* Lightbox */
.fk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 1rem;
  cursor: zoom-out;
}

.fk-lightbox.is-open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.fk-lightbox img {
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.fk-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.fk-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.fk-lightbox-dl {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
}

/* Admin */
.admin-body {
  background: #000;
  color: var(--fg);
}

.admin-body .brand {
  color: var(--fg);
}

.admin-wrap {
  width: min(1000px, 100%);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  position: relative;
  z-index: 1;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.admin-nav .btn-accent {
  background: #fafafa;
  color: #111;
  border-color: #fafafa;
}

.admin-card-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-card-value {
  color: var(--fg);
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.admin-help {
  color: var(--muted);
  line-height: 1.6;
  padding-left: 1.2rem;
  margin: 0;
}

.admin-help li {
  margin-bottom: 0.55rem;
  color: var(--muted);
}

.admin-help strong {
  color: var(--fg);
  font-weight: 600;
}

.pin-card {
  width: min(380px, 100%);
  margin: 12vh auto;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.pin-input {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 650;
}

.table-dark-custom {
  --bs-table-bg: transparent;
  --bs-table-color: var(--fg);
  --bs-table-border-color: var(--glass-border);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
}

.form-control,
.form-select {
  background: #000;
  border: 1px solid var(--glass-border);
  color: var(--fg);
  border-radius: var(--radius);
}

.form-control:focus,
.form-select:focus {
  background: #000;
  border-color: #555;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
  color: var(--fg);
}

.form-control::placeholder {
  color: #555;
}

.form-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.form-text {
  color: var(--muted) !important;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* —— plens extensions —— */
.navbar-brand.brand-logo {
  display: flex;
  align-items: center;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}
.navbar-brand.brand-logo img {
  height: 32px;
  width: auto;
  display: block;
}
@media (min-width: 768px) {
  .navbar-brand.brand-logo img { height: 36px; }
}

.glass-modal .modal-header {
  padding-bottom: 0.35rem;
}
.glass-modal .modal-body {
  padding-top: 0.65rem;
}
.glass-modal .modal-body > p:first-child {
  margin-top: 0;
}
.about-text {
  color: var(--fg) !important;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}
.about-links .btn { font-size: 0.9rem; }

.note-card {
  background: var(--bg-elev);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  color: var(--fg);
  line-height: 1.55;
  font-size: 0.95rem;
}

.viewer-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

/* Admin shell */
.ap-body { background: #000; color: var(--fg); }
.ap-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}
.ap-backdrop {
  display: none;
}
.ap-sidebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 1.25rem;
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--glass-border);
  min-height: 100vh;
  position: sticky;
  top: 0;
  background: #0a0a0a;
  z-index: 40;
}
.ap-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.ap-side-close {
  display: none;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  background: #141414;
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ap-brand img { height: 28px; width: auto; display: block; }
.ap-nav {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: .25rem;
}
.ap-nav a {
  color: var(--muted);
  padding: .55rem .75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  width: 100%;
}
.ap-nav a.active,
.ap-nav a:hover {
  color: #fff;
  background: var(--surface);
  border-color: var(--glass-border);
}
.ap-sidebar-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .75rem;
  margin-top: auto;
}
.ap-user { color: var(--muted); font-size: .85rem; }
.ap-side-links { display: flex; gap: .25rem; }
.ap-side-links a {
  color: var(--muted);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}
.ap-side-links a:hover { color: #fff; background: var(--surface); }
.ap-wrap {
  max-width: none;
  margin: 0;
  padding: 1.75rem 2rem 2.5rem;
  width: 100%;
  min-width: 0;
}
.ap-topbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.ap-topbar h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.ap-menu-btn {
  display: none;
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  background: #141414;
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
}
.ap-menu-btn:hover { background: #1c1c1c; }
.ap-card {
  background: var(--bg-elev); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 1.15rem 1.25rem; margin-bottom: 1rem;
}
.ap-card .row, .ap-wrap .row { --bs-gutter-x: 1rem; }
.ap-table { width: 100%; border-collapse: collapse; font-size: .92rem; table-layout: auto; }
.ap-table th, .ap-table td { padding: .7rem .55rem; border-bottom: 1px solid var(--glass-border); text-align: left; vertical-align: middle; }
.ap-table th { color: var(--muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.ap-table a:not(.pl-icon-btn) {
  color: inherit;
  text-decoration: none;
}
.ap-table a:not(.pl-icon-btn):hover {
  color: var(--fg);
  text-decoration: none;
  opacity: 0.85;
}
.ap-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 720px) { .ap-stats { grid-template-columns: repeat(4, 1fr); } }
.ap-stat {
  background: #0a0a0a; border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 1rem; text-align: left;
}
.ap-stat b { display: block; font-size: 1.5rem; color: var(--accent); font-weight: 650; }
.ap-stat span { font-size: .78rem; color: var(--muted); }

@media (max-width: 899px) {
  .ap-shell {
    display: block;
    grid-template-columns: none;
  }
  .ap-menu-btn,
  .ap-side-close {
    display: inline-flex;
  }
  .ap-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.72);
    cursor: pointer;
  }
  .ap-backdrop[hidden] {
    display: none !important;
  }
  .ap-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    min-height: 100vh;
    height: 100%;
    border-right: 1px solid var(--glass-border);
    border-bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    z-index: 60;
    overflow-y: auto;
  }
  .ap-shell.is-nav-open .ap-sidebar {
    transform: translateX(0);
  }
  .ap-wrap {
    padding: 1rem 1rem 2rem;
  }
  .ap-topbar h1 {
    font-size: 1.2rem;
  }
}
.pl-btn, .pl-icon-btn {
  /* compat aliases map to btn styles if leftover */
}
.pl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border-radius: var(--radius); padding: .55rem 1rem; font-weight: 600; font-size: .92rem;
  text-decoration: none !important; cursor: pointer; border: 1px solid var(--glass-border);
  background: #141414; color: var(--fg) !important;
}
.pl-btn:hover { background: #1c1c1c; border-color: #333; color: #fff !important; }
.pl-btn-blue, .pl-btn-green, .pl-btn-pink {
  background: #1a1a1a; color: #fafafa !important; border-color: #2a2a2a;
}
.pl-btn-blue:hover, .pl-btn-green:hover, .pl-btn-pink:hover {
  background: #242424; border-color: #3a3a3a; color: #fff !important;
}
.pl-btn-red { background: var(--danger-soft); color: var(--danger) !important; border-color: rgba(237,73,86,.28); }
.pl-btn-ghost { background: transparent; color: var(--fg) !important; border-color: var(--glass-border); }
.pl-btn-ghost:hover { background: #141414; color: #fff !important; }
.pl-btn-block { width: 100%; }
.pl-icon-btn {
  width: 2.1rem; height: 2.1rem; border: 1px solid #2a2a2a; border-radius: 999px;
  background: #1a1a1a; color: #ddd;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.pl-icon-btn:hover { background: #242424; color: #fff; border-color: #3a3a3a; }
.pl-icon-btn.is-red { color: var(--danger); border-color: rgba(237,73,86,.28); background: var(--danger-soft); }
.pl-icon-btn.is-pink { color: #ff7ab8; border-color: rgba(255,122,184,.28); background: rgba(255,122,184,.1); }
.pl-note { /* legacy */ }

/* Print slip */
.print-page { background: #0a0a0a; min-height: 100vh; padding: 1rem; }
.print-area { display: flex; justify-content: center; width: 100%; margin-bottom: 1.25rem; }
.print-sheet {
  width: 48mm; max-width: 48mm; box-sizing: border-box; overflow: hidden;
  background: #fff; color: #000; box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
.print-slip {
  width: 100%; max-width: 48mm; margin: 0; background: #fff; color: #000;
  display: flex; flex-direction: column; font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box; overflow: hidden;
}
.print-slip-head { background: #000; padding: 2.5mm; display: flex; align-items: center; justify-content: center; }
.print-slip-head img { height: 6.5mm; width: auto; max-width: 90%; display: block; }
.print-slip-body {
  padding: 2.5mm 2.5mm 2mm; font-size: 2.2mm; line-height: 1.3; font-weight: 700;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
}
.print-slip-qr { display: flex; justify-content: center; padding: 0 2mm 2mm; background: #fff; }
.print-slip-qr img { width: 18mm; height: 18mm; display: block; }
.print-slip-foot { background: #000; color: #fff; text-align: center; padding: 2.2mm 2mm 2.5mm; }
.print-slip-foot .url { font-size: 3.6mm; font-weight: 900; letter-spacing: .03em; line-height: 1.05; }
.print-slip-foot .idline {
  margin-top: 1.2mm; font-size: 3.2mm; font-weight: 700; line-height: 1;
  display: flex; align-items: baseline; justify-content: center; gap: .8mm;
}
.print-slip-foot .id-label, .print-slip-foot .id-value { font-size: 3.2mm; line-height: 1; }
.print-slip-foot .id-value { font-weight: 900; }
.print-actions { max-width: 320px; margin: 0 auto; display: flex; flex-direction: column; gap: .5rem; }
@media print {
  @page { size: 48mm 100mm; margin: 0; }
  body * { visibility: hidden !important; }
  .print-area, .print-area * { visibility: visible !important; }
  .print-area { position: absolute; left: 0; top: 0; margin: 0; }
  .print-sheet, .print-slip { box-shadow: none; width: 48mm; max-width: 48mm; }
  .print-actions, .print-edit { display: none !important; }
}

/* Custom lightbox (plens) */
.pl-lb {
  position: fixed; inset: 0; z-index: 1060; background: rgba(0,0,0,.94);
  display: none; flex-direction: column;
  pointer-events: none;
}
.pl-lb.open { display: flex; pointer-events: auto; }
.pl-lb-top, .pl-lb-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem .85rem; gap: .5rem;
}
.pl-lb-bottom { justify-content: center; }
.pl-lb-stage {
  flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
  overflow: hidden; min-height: 0;
}
.pl-lb-stage img, .pl-lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.pl-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.5rem; height: 2.5rem; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff; z-index: 5;
}
.pl-lb-prev { left: .5rem; }
.pl-lb-next { right: .5rem; }
.pl-loader {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #0a0a0a; z-index: 2;
}
.pl-loader.hide { opacity: 0; pointer-events: none; transition: opacity .25s; }
.pl-ring {
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.12); border-top-color: rgba(48,209,88,.85);
  animation: fkSpin .75s linear infinite;
}

/* —— Home (previous plens feel) —— */
.pl-home {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  animation: fadeUp .55s ease both;
}
.pl-home-title {
  margin: 0;
  font-size: clamp(1.55rem, 5.5vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.pl-home-sub {
  margin: .65rem 0 1.5rem;
  color: var(--muted);
  font-size: .95rem;
}
.pl-home-form { width: min(420px, 100%); }
.pl-home-row { display: flex; gap: .5rem; align-items: stretch; }
.pl-home-input {
  flex: 1;
  min-width: 0;
  background: #0a0a0a;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .08em;
  padding: .85rem 1rem;
  outline: none;
}
.pl-home-input::placeholder { color: #3a3a3c; font-weight: 400; letter-spacing: .02em; }
.pl-home-input:focus {
  border-color: rgba(48,209,88,.55);
  box-shadow: 0 0 0 3px rgba(48,209,88,.16);
}
.pl-home-go {
  width: 52px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #000;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.pl-home-go:hover { filter: brightness(1.08); }

/* Lightbox cooler */
.pl-lb {
  position: fixed; inset: 0; z-index: 1060;
  background: #000;
  display: none;
  pointer-events: none;
}
.pl-lb.open { display: block; pointer-events: auto; }
.pl-lb-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.pl-lb-stage img, .pl-lb-stage video {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  z-index: 1;
}
.pl-lb-hit {
  position: absolute; top: 0; bottom: 0; width: 28%;
  border: 0; background: transparent; z-index: 3; cursor: pointer;
}
.pl-lb-hit-prev { left: 0; }
.pl-lb-hit-next { right: 0; }
.pl-lb-fab {
  position: absolute; z-index: 5;
  width: 2.6rem; height: 2.6rem;
  border: 0; border-radius: 50%;
  background: rgba(28,28,30,.72);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
  backdrop-filter: blur(8px);
}
.pl-lb-close { top: 1rem; right: 1rem; }
.pl-lb-dl { top: 1rem; right: 4.1rem; }
.pl-lb-count {
  position: absolute; top: 1.25rem; left: 50%; transform: translateX(-50%);
  z-index: 5; color: #888; font-size: .82rem;
}
.pl-lb-paid {
  position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  z-index: 5;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem .7rem;
  border-radius: 999px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}
.pl-lb-paid i { color: var(--accent); font-size: .85rem; }
.pl-lb-paid[hidden] { display: none !important; }
.pl-loader { background: transparent; }
.pl-ring { border-top-color: var(--accent); }

.modal { z-index: 1080 !important; }
.modal-backdrop {
  z-index: 1070 !important;
  background-color: #000 !important;
  --bs-backdrop-opacity: 0.82;
}
.modal-backdrop.show {
  opacity: 0.82 !important;
}
