/* ==========================================================================
   Platenko Art Portfolio - Minimalist Contemporary Styling
   ========================================================================== */

:root {
  /* Minimalist White Cube Light Theme (Default) */
  --bg-primary: #F8F8F6;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F0F0EC;
  --text-main: #18181B;
  --text-muted: #52525B;
  --text-light: #71717A;
  --border-color: #E4E4E0;
  --border-focus: #18181B;
  --accent: #18181B;
  --accent-contrast: #F8F8F6;
  --badge-available-bg: #ECFDF5;
  --badge-available-text: #166534;
  --badge-reserved-bg: #FEFCE8;
  --badge-reserved-text: #854D0E;
  --badge-sold-bg: #F4F4F5;
  --badge-sold-text: #52525B;
  --card-shadow: 0 2px 12px rgba(24, 24, 27, 0.04);
  --card-hover-shadow: 0 10px 28px rgba(24, 24, 27, 0.08);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  /* Gallery Dark Theme */
  --bg-primary: #0d0e11;
  --bg-surface: #15171c;
  --bg-subtle: #1e2027;
  --text-main: #f5f5f7;
  --text-muted: #a1a1aa;
  --text-light: #71717a;
  --border-color: #27272a;
  --border-focus: #fafafa;
  --accent: #f5f5f7;
  --accent-contrast: #0d0e11;
  --badge-available-bg: rgba(46, 125, 50, 0.2);
  --badge-available-text: #81c784;
  --badge-reserved-bg: rgba(234, 179, 8, 0.16);
  --badge-reserved-text: #FDE047;
  --badge-sold-bg: rgba(255, 255, 255, 0.07);
  --badge-sold-text: #a1a1aa;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --card-hover-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  letter-spacing: -0.01em;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Admin Mode Styles */
.card-delete-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  border: 2px solid #ffffff;
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.card-edit-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #6366f1;
  color: #ffffff;
  border: 2px solid #ffffff;
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

body.admin-mode .card-edit-btn {
  display: flex;
}

.card-edit-btn:hover {
  background: #4f46e5;
  transform: scale(1.18);
}

/* Edit modal form styles */
.edit-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.edit-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.edit-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

textarea.edit-input {
  resize: vertical;
  min-height: 90px;
}

.edit-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  box-sizing: border-box;
}

.edit-photo-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-subtle);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
}

.edit-photo-thumb:hover {
  border-color: #6366f1;
}

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

.edit-photo-thumb .remove-photo-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.edit-photo-thumb:hover .remove-photo-btn {
  opacity: 1;
}

.edit-photo-thumb.cover-photo {
  border-color: #22c55e;
}

.edit-photo-thumb.cover-photo::after {
  content: "Cover";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(34, 197, 94, 0.85);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  padding: 3px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Edit Modal Layout & Buttons */
.edit-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 820px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.5);
  padding: 32px 36px;
  box-sizing: border-box;
}

.edit-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-edit-save {
  background: #6366f1;
  color: #ffffff;
  border: none;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-edit-save:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

body.admin-mode .card-delete-btn {
  display: flex;
}

.card-delete-btn:hover {
  background: #dc2626;
  transform: scale(1.18);
}

.artwork-card.deleting {
  transform: scale(0.7) !important;
  opacity: 0 !important;
  transition: all 0.3s ease;
}

.admin-banner {
  background: #18181b;
  color: #ffffff;
  padding: 12px 24px;
  display: none;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 80px;
  z-index: 45;
  border-bottom: 2px solid #ef4444;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

body.admin-mode .admin-banner {
  display: flex;
}

.admin-banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}

.admin-banner-badge {
  background: #ef4444;
  color: #fff;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-banner-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-admin-action {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-admin-action:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn-admin-save {
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-admin-save:hover {
  background: #16a34a;
}

.theme-toggle-btn.admin-active {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
header {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background-color: rgba(248, 248, 246, 0.88);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] header {
  background-color: rgba(13, 14, 17, 0.85);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  max-height: 42px;
  height: auto;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  transition: filter 0.3s ease;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .brand-logo:not(.brand-logo-custom) {
  filter: invert(1) brightness(1.2);
}

.brand-title {
  font-family: "Dancing Script", "Segoe Script", "Brush Script MT", cursive;
  font-style: italic;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: none;
}

.brand-subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  border-color: var(--border-focus);
}

/* Hero Section */
.hero {
  padding: 64px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 36px 0 48px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

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

/* Gallery Grid — Dynamic Justified Equal-Height White Cube Exhibition */
.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 44px;
  margin-bottom: 88px;
}

.gallery-row {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.gallery-grid.is-mobile-stack {
  gap: 40px;
}

.artwork-card {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-width: 0;
  transition: var(--transition);
}

.gallery-grid.is-mobile-stack .artwork-card {
  width: 100% !important;
}

.card-image-wrap {
  position: relative;
  width: 100%;
  background: transparent;
  display: block;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(24, 24, 27, 0.08),
    0 10px 24px -10px rgba(24, 24, 27, 0.16),
    3px 3px 0 0 rgba(24, 24, 27, 0.045);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gallery-grid.is-mobile-stack .card-image-wrap {
  height: auto !important;
}

.gallery-grid.is-mobile-stack .card-image-wrap img {
  height: auto;
  object-fit: contain;
}

.artwork-card:hover .card-image-wrap img {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(24, 24, 27, 0.1),
    0 16px 32px -12px rgba(24, 24, 27, 0.22),
    3px 3px 0 0 rgba(24, 24, 27, 0.06);
}

[data-theme="dark"] .card-image-wrap img {
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.5),
    0 14px 28px -8px rgba(0, 0, 0, 0.65),
    3px 3px 0 0 rgba(255, 255, 255, 0.06);
}

.filter-divider {
  width: 1px;
  height: 22px;
  background: var(--border-color);
  align-self: center;
  margin: 0 4px;
}

@media (max-width: 640px) {
  .filter-divider {
    display: none;
  }
}

.card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.card-photo-count {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  padding: 4px 9px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  gap: 4px;
}

.load-more-container {
  display: flex;
  justify-content: center;
  margin: 20px 0 60px;
}

.load-more-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 14px 32px;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--card-shadow);
}

.load-more-btn:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
  box-shadow: var(--card-hover-shadow);
}

.modal-main-image-wrap {
  position: relative;
  width: 100%;
}

.modal-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 5;
  backdrop-filter: blur(4px);
}

.modal-nav-arrow:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: translateY(-50%) scale(1.1);
}

.modal-nav-arrow.prev { left: 12px; }
.modal-nav-arrow.next { right: 12px; }

.badge-available {
  background: var(--badge-available-bg);
  color: var(--badge-available-text);
  border: 1px solid rgba(22, 101, 52, 0.18);
}

.badge-reserved {
  background: var(--badge-reserved-bg);
  color: var(--badge-reserved-text);
  border: 1px solid rgba(133, 77, 14, 0.22);
}

.badge-sold {
  background: var(--badge-sold-bg);
  color: var(--badge-sold-text);
  border: 1px solid rgba(82, 82, 91, 0.2);
}

.card-details {
  padding: 16px 2px 4px;
  display: flex;
  flex-direction: column;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: var(--text-main);
}

.status-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-submeta {
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 6px;
}

/* Modal / Lightbox */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 1240px;
  width: 95%;
  height: 85vh;
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

@media (max-width: 860px) {
  .modal-content {
    grid-template-columns: 1fr;
    height: auto;
    max-height: 92vh;
    overflow-y: auto;
  }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--text-main);
  color: var(--bg-primary);
}

.modal-visuals {
  padding: 24px;
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.modal-main-image {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.modal-main-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.modal-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  flex-shrink: 0;
  height: 76px;
}

.modal-thumb {
  width: 68px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: var(--transition);
}

.modal-thumb.active {
  border-color: var(--text-main);
}

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

.modal-info {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
}

.modal-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-right: 44px;
}

.modal-meta-top .card-badge {
  position: static;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
}

.modal-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 24px;
  padding: 16px;
  background: var(--bg-subtle);
  border-radius: 8px;
  font-size: 0.88rem;
}

.spec-item span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.spec-item strong {
  color: var(--text-main);
  font-weight: 600;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: 28px;
}

.modal-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: var(--transition);
}

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

/* About Section */
.about-section {
  padding: 64px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 60px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.about-intro h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.about-intro p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 20px;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.social-link:hover {
  opacity: 0.7;
}

/* Footer */
footer {
  padding: 36px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Settings Button & Modal */
.settings-btn {
  position: relative;
  padding: 8px 12px !important;
  min-width: 38px;
  justify-content: center;
}

.settings-btn.logged-in::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid var(--bg-surface);
}

.settings-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 440px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 28px 30px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.settings-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 18px 0;
}

.settings-details summary {
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  user-select: none;
}

.settings-error {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  font-size: 0.86rem;
}

.settings-success {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #16a34a;
  font-size: 0.86rem;
}

/* ==========================================================================
   Phase 2: Full-Screen 3-Tab Artwork Detail Modal (Deep Zoom, Raking, In-Situ)
   ========================================================================== */
.detail-modal-overlay {
  padding: 14px;
}

.detail-modal-shell {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 1380px;
  width: 100%;
  height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.48);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.detail-header-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  min-width: 0;
}

.detail-header-title .modal-title {
  font-size: 1.25rem;
  margin: 0;
}

.detail-header-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.detail-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.detail-close-btn {
  position: static;
}

.detail-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 22px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  overflow-x: auto;
}

.detail-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 7px 15px;
  border-radius: 9999px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.detail-tab-btn:hover {
  color: var(--text-main);
  background: rgba(24, 24, 27, 0.05);
}

.detail-tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.detail-tab-panel {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.detail-tab-panel.active {
  display: flex;
  flex-direction: column;
}

/* Tab 1: Deep Zoom + Raking Light */
.detail-stage-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.detail-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.detail-stage.is-zoomed {
  cursor: grab;
}

.detail-stage.is-zoomed:active {
  cursor: grabbing;
}

.detail-transform-layer {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92%;
  max-height: 92%;
  transform-origin: center center;
  transition: transform 0.06s ease-out;
}

.detail-canvas-frame {
  position: relative;
  display: inline-block;
  line-height: 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  border-radius: 2px;
}

#modalMainImage {
  display: block;
  max-width: 82vw;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

#rakingCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 2px;
}

.raking-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(24, 24, 27, 0.82);
  color: #fff;
  font-size: 0.76rem;
  padding: 5px 14px;
  border-radius: 9999px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 6;
}

.detail-bottom-bar {
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-zoom-group {
  display: inline-flex;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.detail-tool-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
}

.detail-zoom-group .detail-tool-btn {
  border: none;
  border-radius: 0;
  border-right: 1px solid var(--border-color);
}

.detail-zoom-group .detail-tool-btn:last-child {
  border-right: none;
}

.detail-tool-btn:hover {
  background: var(--bg-subtle);
}

.detail-zoom-readout {
  min-width: 56px;
  font-variant-numeric: tabular-nums;
}

.raking-toggle-btn.active {
  background: #18181B;
  color: #FFFFFF;
  border-color: #18181B;
}

.raking-controls-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--bg-subtle);
  border-radius: 8px;
}

.detail-bottom-bar .modal-thumbs {
  height: 58px;
  padding-bottom: 0;
}

.detail-bottom-bar .modal-thumb {
  width: 54px;
  height: 54px;
}

/* Tab 2: In-Situ True-Scale Simulator */
.insitu-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.insitu-stage {
  position: relative;
  flex: 1;
  min-height: 320px;
  overflow: hidden;
  display: flex;
}

.insitu-wall {
  position: relative;
  width: 100%;
  height: 100%;
  transition: background 0.3s ease;
  background-color: #F4F2EC;
}

.insitu-wall[data-wall="warm-white"] {
  background: linear-gradient(180deg, #F7F5F0 0%, #EFECE4 100%);
}

.insitu-wall[data-wall="concrete"] {
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.22), transparent 55%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.015) 0 2px, transparent 2px 18px),
    linear-gradient(180deg, #D3D3CE 0%, #BFBFB9 100%);
}

.insitu-wall[data-wall="anthracite"] {
  background: linear-gradient(180deg, #2D3036 0%, #1F2126 100%);
}

.insitu-wall[data-wall="sage"] {
  background: linear-gradient(180deg, #CED7CD 0%, #BAC6B9 100%);
}

.insitu-painting-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28), 0 3px 8px rgba(0, 0, 0, 0.18);
  transition: width 0.12s ease, height 0.12s ease, bottom 0.12s ease;
  z-index: 3;
}

.insitu-painting-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 1px;
}

.insitu-painting-depth {
  position: absolute;
  top: 1px;
  bottom: 0;
  width: 5px;
  right: -5px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.42));
  transform: skewY(35deg);
  transform-origin: top left;
}

.insitu-dim-tag {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(24, 24, 27, 0.75);
  color: #fff;
  white-space: nowrap;
}

.insitu-series-cluster {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: bottom 0.12s ease, gap 0.12s ease, height 0.12s ease;
}

.insitu-series-frame {
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28), 0 3px 8px rgba(0, 0, 0, 0.18);
  transition: width 0.12s ease, height 0.12s ease;
}

.insitu-series-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 1px;
}

.insitu-action-btns {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.insitu-series-btn.active {
  background: var(--accent, #18181B);
  color: var(--accent-contrast, #FFFFFF);
  border-color: var(--accent, #18181B);
}

.insitu-sofa-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  transition: width 0.12s ease, height 0.12s ease;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
}

.insitu-sofa-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.insitu-sofa-label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: #52525B;
  background: rgba(255, 255, 255, 0.78);
  padding: 1px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

.insitu-baseboard {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  height: 8px;
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 1;
}

.insitu-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  background: linear-gradient(180deg, #C9BEA9 0%, #B3A58E 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  z-index: 1;
}

.insitu-controls {
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  flex-shrink: 0;
}

.insitu-control-group {
  display: flex;
  flex-direction: column;
}

.wall-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wall-swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.wall-swatch.active {
  border-color: var(--text-main);
  background: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--text-main);
}

.swatch-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

.insitu-num-input {
  width: 78px !important;
  padding: 6px 10px !important;
  font-size: 0.86rem !important;
}

.insitu-readout {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Tab 3: Info & Inquiry */
.info-tab-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  padding: 28px;
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
}

.info-preview-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.info-thumb-img {
  width: 110px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.info-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  padding: 18px;
  background: var(--bg-subtle);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.inquiry-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 22px;
  align-self: start;
}

@media (max-width: 768px) {
  .detail-modal-overlay {
    padding: 0;
  }
  .detail-modal-shell {
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
  .detail-header {
    padding: 12px 16px;
  }
  .detail-tabs {
    padding: 8px 16px;
  }
  #modalMainImage {
    max-width: 96vw;
    max-height: 55vh;
  }
  .info-tab-grid {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .info-preview-row {
    flex-direction: column;
  }
  .insitu-controls {
    padding: 12px 16px;
  }
}


/* ==========================================================================
   WOW Features: View Switcher, Deep-Linking Share, WebAR 1:1 & 3D Gallery
   ========================================================================== */

/* Top Nav View Switcher (Katalóg | 3D Galéria) */
.view-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
}

.view-switch-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 15px;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.view-switch-btn:hover {
  color: var(--text-main);
}

.view-switch-btn.active {
  background: var(--accent);
  color: var(--accent-contrast);
}

/* Detail Modal Header Actions (AR + Zdieľať) */
.detail-header-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.detail-header-action-btn:hover {
  border-color: var(--border-focus);
  background: var(--bg-surface);
}

.insitu-ar-btn {
  background: var(--text-main) !important;
  color: var(--bg-primary) !important;
  border-color: var(--text-main) !important;
}

.detail-modal-overlay {
  z-index: 150;
}

/* Global Toast */
.platenko-toast {
  position: fixed;
  bottom: calc(22px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #18181B;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  z-index: 320;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.platenko-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Phase 2: AR Wall Preview Modal & Live Overlay */
.ar-modal-overlay {
  z-index: 180;
}

.ar-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  max-width: 480px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  padding: 26px 28px;
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ar-modal-art-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 36px;
}

.ar-art-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  flex-shrink: 0;
}

.ar-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ar-modal-title {
  font-size: 1.18rem;
  line-height: 1.25;
  margin: 2px 0 6px;
}

.ar-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  text-align: center;
}

.ar-qr-frame {
  background: #ffffff;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  line-height: 0;
}

.ar-qr-frame canvas,
.ar-qr-frame img {
  width: 200px;
  height: 200px;
  display: block;
}

.ar-qr-hint {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.ar-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ar-launch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.ar-status-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  min-height: 1.2em;
}

/* Full-Screen Live AR Overlay */
.ar-live-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: radial-gradient(circle at 50% 35%, #e8e5dc 0%, #cfc9bc 100%);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.ar-live-overlay[hidden] {
  display: none !important;
}

.ar-camera-video,
.ar-webxr-canvas-host {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ar-fallback-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ar-fallback-cluster {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
  cursor: grab;
}

.ar-fallback-row {
  display: flex;
  align-items: center;
}

.ar-fallback-canvas {
  position: relative;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36), 0 4px 12px rgba(0, 0, 0, 0.22);
  border-radius: 1px;
  background: #f2f0ea;
}

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

.ar-fallback-depth {
  position: absolute;
  top: 1px;
  bottom: 0;
  background: linear-gradient(90deg, #e5e2d8, #c9c4b8);
  transform: skewY(35deg);
  transform-origin: top left;
}

.ar-ruler-top {
  position: absolute;
  top: -32px;
  left: 0;
  right: 0;
  height: 20px;
  border-bottom: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.ar-ruler-side {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -36px;
  width: 24px;
  border-left: 2px solid #ffffff;
  border-top: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.ar-ruler-side span {
  writing-mode: vertical-rl;
  white-space: nowrap;
}

.ar-hud-top {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  right: calc(12px + env(safe-area-inset-right));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 15;
  pointer-events: none;
}

.ar-scale-badge {
  background: rgba(24, 24, 27, 0.84);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.ar-hud-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: auto;
}

.ar-hud-btn {
  background: rgba(255, 255, 255, 0.92);
  color: #18181B;
  border: 1px solid rgba(24, 24, 27, 0.14);
  padding: 7px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(8px);
}

.ar-hud-btn.active {
  background: #18181B;
  color: #ffffff;
}

.ar-hud-close {
  background: rgba(24, 24, 27, 0.88);
  color: #ffffff;
}

.ar-guidance-bar {
  position: absolute;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 560px);
  background: rgba(24, 24, 27, 0.82);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 0.8rem;
  text-align: center;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 14;
}

.ar-tilt-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.74rem;
}

.ar-tilt-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ar-tilt-controls input {
  width: 90px;
}

/* ISO Card Calibration Overlay */
.ar-card-calib-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 18, 0.72);
  backdrop-filter: blur(6px);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.ar-card-calib-overlay[hidden] {
  display: none !important;
}

.ar-card-calib-box {
  background: var(--bg-surface);
  color: var(--text-main);
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.ar-calib-title {
  font-weight: 700;
  font-size: 1rem;
}

.ar-calib-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.ar-card-guide-stage {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border-radius: 10px;
  padding: 12px;
}

.ar-card-guide {
  width: 210px;
  height: 132px;
  border: 2.5px dashed #22c55e;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #166534;
}

.ar-calib-slider-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Diptych / Triptych Drawer */
.ar-add-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-surface);
  color: var(--text-main);
  border-top: 1px solid var(--border-color);
  border-radius: 18px 18px 0 0;
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  z-index: 28;
  max-height: 55vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.28);
}

.ar-add-drawer[hidden] {
  display: none !important;
}

.ar-add-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.ar-spacing-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.ar-spacing-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.ar-spacing-chip.active {
  background: var(--text-main);
  color: var(--bg-primary);
  border-color: var(--text-main);
}

.ar-drawer-close {
  background: var(--bg-subtle);
  border: none;
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
}

.ar-active-stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ar-stack-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
}

.ar-stack-chip img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
}

.ar-stack-chip button {
  background: transparent;
  border: none;
  color: #ef4444;
  font-weight: 700;
  cursor: pointer;
}

.ar-add-art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 10px;
  overflow-y: auto;
}

.ar-drawer-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  text-align: left;
  color: var(--text-main);
}

.ar-drawer-item img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  border-radius: 4px;
}

.ar-drawer-name {
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ar-drawer-size {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Phases 3 & 4: Minimalist 3D Virtual Gallery, Guided Tour & 2D Crossfade
   ========================================================================== */
.g3d-root {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #F5F5F2;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.g3d-root[hidden] {
  display: none !important;
}

.g3d-canvas-host,
.g3d-canvas-host canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Phase 4: Pixel-aligned 2D Real-Photo Crossfade Overlay */
.g3d-crossfade-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}

#gallery3dCrossfadeImg {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  object-fit: fill;
  border-radius: 1px;
  transition: opacity 0.28s ease;
}

.g3d-loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #F7F7F5;
  color: #18181B;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-weight: 600;
}

.g3d-loading[hidden] {
  display: none !important;
}

.g3d-loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #E4E4E0;
  border-top-color: #18181B;
  border-radius: 50%;
  animation: g3dSpin 0.8s linear infinite;
}

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

.g3d-top-bar {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: calc(16px + env(safe-area-inset-left));
  right: calc(16px + env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 12;
  pointer-events: none;
}

.g3d-top-left,
.g3d-top-right,
.g3d-top-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.g3d-pill-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #18181B;
  border: 1px solid rgba(24, 24, 27, 0.14);
  padding: 8px 15px;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(24, 24, 27, 0.08);
  transition: transform 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.g3d-pill-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.g3d-tour-btn {
  background: #18181B;
  color: #FFFFFF;
  border-color: #18181B;
}

.g3d-tour-btn:hover {
  background: #27272A;
}

.g3d-room-badge {
  background: rgba(255, 255, 255, 0.82);
  color: #52525B;
  border: 1px solid rgba(24, 24, 27, 0.1);
  padding: 7px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.g3d-mobile-menu-btn {
  display: none;
}

.g3d-nav-arrows {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.g3d-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(24, 24, 27, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: #18181B;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(24, 24, 27, 0.1);
  transition: transform 0.15s ease, background 0.15s ease;
}

.g3d-arrow-btn:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.06);
}

.g3d-arrow-btn:disabled {
  opacity: 0.32;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

.g3d-overview-hint {
  position: absolute;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.88);
  color: #52525B;
  border: 1px solid rgba(24, 24, 27, 0.1);
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  max-width: calc(100vw - 32px);
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(24, 24, 27, 0.08);
  z-index: 10;
  pointer-events: none;
}

.g3d-overview-hint[hidden] {
  display: none !important;
}

.g3d-arrow-btn.prev { left: calc(14px + env(safe-area-inset-left)); }
.g3d-arrow-btn.next { right: calc(14px + env(safe-area-inset-right)); }

/* Minimal Floating Gallery Card on Focused Painting */
.g3d-plaque {
  position: absolute;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
  color: #18181B;
  border: 1px solid rgba(24, 24, 27, 0.14);
  border-radius: 16px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(760px, calc(100vw - 28px));
  box-shadow: 0 12px 32px rgba(24, 24, 27, 0.14);
  backdrop-filter: blur(12px);
  z-index: 11;
}

.g3d-plaque[hidden] {
  display: none !important;
}

.g3d-plaque-info {
  min-width: 0;
  flex: 1;
}

.g3d-plaque-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.g3d-plaque-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
}

.g3d-plaque-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0;
  color: #18181B;
  line-height: 1.25;
}

.g3d-plaque-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #18181B;
  white-space: nowrap;
}

.g3d-plaque-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--plaque-dot, #15803D);
  flex-shrink: 0;
}

.g3d-plaque-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  border: 1px solid rgba(24, 24, 27, 0.14);
  background: #F4F4F1;
  color: #18181B;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.15s ease;
}

.g3d-plaque.is-collapsed .g3d-plaque-toggle {
  transform: rotate(180deg);
}

.g3d-plaque-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 3px;
}

.g3d-plaque-meta {
  font-size: 0.78rem;
  font-weight: 500;
  color: #52525B;
  display: block;
}

.g3d-plaque-series {
  font-size: 0.76rem;
  font-weight: 500;
  color: #71717A;
  display: block;
}

.g3d-plaque-series[hidden],
.g3d-plaque-desc[hidden] {
  display: none !important;
}

.g3d-plaque-desc {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.38;
  color: #3F3F46;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.g3d-plaque-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.g3d-plaque-btn {
  background: #F0F0EC;
  color: #18181B;
  border: 1px solid #E4E4E0;
  padding: 8px 13px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.g3d-plaque-btn:hover {
  background: #E4E4E0;
}

.g3d-plaque-btn.primary {
  background: #18181B;
  color: #FFFFFF;
  border-color: #18181B;
}

/* Tour Mode: collapse all HUD except minimal bottom-left Stop Tour + #1/N pill */
.g3d-root.tour-active .g3d-top-bar,
.g3d-root.tour-active .g3d-nav-arrows,
.g3d-root.tour-active .g3d-plaque,
.g3d-root.tour-active .g3d-overview-hint {
  display: none !important;
}

.g3d-tour-pill {
  position: absolute;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: calc(16px + env(safe-area-inset-left));
  background: rgba(24, 24, 27, 0.88);
  color: #FFFFFF;
  border-radius: 9999px;
  padding: 6px 14px 6px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 15;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.g3d-tour-pill[hidden] {
  display: none !important;
}

.g3d-stop-tour-btn {
  background: #FFFFFF;
  color: #18181B;
  border: none;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.g3d-tour-counter {
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Mobile Responsive Adjustments for Navigation, Detail Actions, AR & 3D Gallery */
@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }
  .nav-inner {
    height: auto;
    min-height: 60px;
    padding: 10px 0 12px;
    flex-wrap: wrap;
    row-gap: 10px;
    column-gap: 8px;
  }
  .brand {
    gap: 8px;
    order: 1;
  }
  .brand-logo {
    height: 34px;
  }
  .brand-title {
    font-size: 1.55rem;
  }
  .brand-subtitle {
    display: none;
  }
  .nav-actions {
    order: 2;
    gap: 8px;
    margin-left: auto;
  }
  .theme-toggle-btn {
    padding: 6px 10px;
  }
  .theme-toggle-btn span {
    display: none;
  }
  .view-switcher {
    order: 3;
    flex: 1 0 100%;
    justify-content: center;
  }
  .view-switch-btn {
    flex: 1;
    text-align: center;
    padding: 6px 12px;
    font-size: 0.82rem;
  }
  .detail-header {
    padding: 10px 14px;
    gap: 8px;
  }
  .detail-header-action-btn .action-btn-label {
    display: none;
  }
  .detail-header-action-btn {
    padding: 6px 10px;
  }
  .g3d-mobile-menu-btn {
    display: inline-flex;
  }
  .g3d-top-controls {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(24, 24, 27, 0.12);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
  }
  .g3d-top-controls.mobile-open {
    display: flex;
  }
  .g3d-plaque {
    flex-direction: column;
    align-items: stretch;
    width: calc(100vw - 20px);
    bottom: calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
  }
  .g3d-plaque-toggle {
    display: inline-flex;
  }
  .g3d-plaque-title {
    font-size: 0.92rem;
  }
  .g3d-plaque-status {
    font-size: 0.76rem;
  }
  .g3d-plaque-desc {
    -webkit-line-clamp: 2;
  }
  .g3d-plaque.is-collapsed .g3d-plaque-body {
    display: none;
  }
  .g3d-plaque.is-collapsed .g3d-plaque-actions .g3d-plaque-btn:not(.primary) {
    display: none;
  }
  .g3d-plaque-actions {
    justify-content: space-between;
  }
  .g3d-plaque-btn {
    flex: 1;
    text-align: center;
    padding: 7px 8px;
    font-size: 0.75rem;
  }
  .g3d-arrow-btn {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }
}


/* Dynamic Lookup Badge Colors + Lookups Manager Modal */
.badge-color-green {
  background: var(--badge-available-bg);
  color: var(--badge-available-text);
  border: 1px solid rgba(22, 101, 52, 0.18);
}

.badge-color-yellow {
  background: var(--badge-reserved-bg);
  color: var(--badge-reserved-text);
  border: 1px solid rgba(133, 77, 14, 0.22);
}

.badge-color-gray {
  background: var(--badge-sold-bg);
  color: var(--badge-sold-text);
  border: 1px solid rgba(82, 82, 91, 0.2);
}

.badge-color-blue {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid rgba(29, 78, 216, 0.2);
}

.badge-color-purple {
  background: #F5F3FF;
  color: #6D28D9;
  border: 1px solid rgba(109, 40, 217, 0.2);
}

.badge-color-red {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid rgba(185, 28, 28, 0.2);
}

[data-theme="dark"] .badge-color-blue {
  background: rgba(59, 130, 246, 0.18);
  color: #93C5FD;
}

[data-theme="dark"] .badge-color-purple {
  background: rgba(139, 92, 246, 0.18);
  color: #C4B5FD;
}

[data-theme="dark"] .badge-color-red {
  background: rgba(239, 68, 68, 0.18);
  color: #FCA5A5;
}

/* ==========================================================================
   Gallery Combined Filter + Search Bar & Direct D1 Inquiry Feedback
   ========================================================================== */
.gallery-loading-spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 14px;
  border: 2px solid var(--border-color);
  border-top-color: var(--text-main);
  border-radius: 50%;
  animation: g3dSpin 0.8s linear infinite;
}

.mobile-filter-toggle-wrap {
  display: none;
}

.mobile-filter-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.mobile-filter-toggle-btn:hover,
.mobile-filter-toggle-btn.has-active {
  border-color: var(--border-focus);
}

.mobile-filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.gallery-filter-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.gallery-search-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 560px;
}

.gallery-search-wrap {
  position: relative;
  flex: 1;
  min-width: 210px;
  display: flex;
  align-items: center;
}

.gallery-search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.gallery-search-input {
  width: 100%;
  padding: 8px 16px 8px 38px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.gallery-search-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.filter-reset-btn {
  border-style: dashed;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 768px) {
  .hero {
    padding: 28px 0 20px;
  }
  .mobile-filter-toggle-wrap {
    display: flex;
    justify-content: center;
    margin-top: 16px;
  }
  .gallery-filter-controls {
    display: none;
    margin-top: 14px;
  }
  .gallery-filter-controls.mobile-open {
    display: flex;
  }
  .filter-bar {
    margin: 0 0 8px;
    gap: 8px;
  }
  .filter-btn {
    padding: 6px 13px;
    font-size: 0.82rem;
  }
}

.gallery-result-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.inquiry-feedback {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
}

.inquiry-feedback.success {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid rgba(22, 101, 52, 0.22);
}

.inquiry-feedback.error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid rgba(153, 27, 27, 0.22);
}

[data-theme="dark"] .inquiry-feedback.success {
  background: rgba(22, 101, 52, 0.3);
  color: #86EFAC;
}

[data-theme="dark"] .inquiry-feedback.error {
  background: rgba(153, 27, 27, 0.3);
  color: #FCA5A5;
}

/* ==========================================================================
   Performance & Accessibility: Touch/Mobile WebGL HUD & Reduced Motion
   ========================================================================== */
@media (hover: none), (pointer: coarse), (max-width: 768px) {
  .g3d-pill-btn,
  .g3d-room-badge,
  .g3d-arrow-btn,
  .g3d-overview-hint,
  .g3d-plaque,
  .g3d-tour-pill,
  .ar-scale-badge,
  .ar-hud-btn,
  .ar-guidance-bar,
  .ar-card-calib-overlay {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .g3d-pill-btn,
  .g3d-room-badge,
  .g3d-arrow-btn,
  .g3d-overview-hint,
  .g3d-plaque {
    background: rgba(255, 255, 255, 0.94);
  }

  .g3d-tour-btn {
    background: #18181B;
  }

  .g3d-tour-pill,
  .ar-scale-badge,
  .ar-hud-close,
  .ar-guidance-bar {
    background: rgba(24, 24, 27, 0.92);
  }
}

/* Series Filter & Card Micro-Tag (Phase 1) */
.series-filter-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  font-family: inherit;
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.series-filter-select option {
  background: var(--bg-surface);
  color: var(--text-main);
}

.card-series-tag {
  margin-top: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artwork-card:hover .card-series-tag {
  color: var(--text-main);
  opacity: 1;
}

/* Detail Modal Series Strip & Inquiry Checkbox (Phase 1) */
.modal-series-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-subtle, rgba(128, 128, 128, 0.04));
  overflow-x: auto;
  flex-shrink: 0;
}

.modal-series-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.modal-series-label strong {
  color: var(--text-main);
  font-weight: 600;
}

.modal-series-items {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-series-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px 3px 3px;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.modal-series-item img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.modal-series-item-title {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-series-item:hover:not(.active) {
  border-color: var(--border-focus);
  color: var(--text-main);
}

.modal-series-item.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: default;
  font-weight: 600;
}

.inquiry-series-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-subtle, rgba(128, 128, 128, 0.04));
}

.inquiry-series-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .modal-series-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 14px;
    gap: 6px;
  }
  .modal-series-items {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}