:root {
  --bg-space: #070a13;
  --bg-card: rgba(16, 24, 44, 0.75);
  --border-gold: rgba(212, 175, 55, 0.35);
  --border-gold-glow: rgba(243, 217, 137, 0.8);
  --accent-gold: #e5c07b;
  --accent-starlight: #a5cbf5;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --gold-gradient: linear-gradient(135deg, #d4af37, #f6e58d, #aa8010);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-space);
  color: var(--text-main);
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(26, 44, 82, 0.45) 0%, transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(38, 22, 66, 0.35) 0%, transparent 45%);
  background-attachment: fixed;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

#spaceCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 1;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* Верхняя панель живого администратора */
.admin-live-bar {
  display: none;
  position: sticky;
  top: 0; left: 0; width: 100%;
  background: linear-gradient(90deg, #131b2e, #0c111d);
  border-bottom: 2px solid var(--accent-gold);
  padding: 10px 24px;
  z-index: 10000;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
  gap: 12px;
  flex-wrap: wrap;
}
body.admin-mode-active .admin-live-bar { display: flex; }

.admin-live-info {
  font-size: 0.88rem;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Рамки и сброс прозрачности при редактировании текста */
[data-editable="true"] {
  outline: none;
  -webkit-text-fill-color: initial !important;
}

body.admin-mode-active [data-editable="true"] {
  outline: 1.5px dashed rgba(212, 175, 55, 0.5) !important;
  outline-offset: 4px;
  cursor: text;
  border-radius: 4px;
  transition: all 0.2s;
  -webkit-text-fill-color: initial !important;
}
body.admin-mode-active [data-editable="true"]:hover {
  outline-color: var(--accent-gold) !important;
  background: rgba(212, 175, 55, 0.08);
}
body.admin-mode-active [data-editable="true"]:focus {
  outline: 2px solid var(--accent-gold) !important;
  background: rgba(212, 175, 55, 0.15);
  -webkit-text-fill-color: initial !important;
}

body.admin-mode-active .admin-img-editable {
  position: relative;
  cursor: pointer;
  outline: 2px dashed var(--accent-gold) !important;
  outline-offset: 4px;
}
body.admin-mode-active .admin-img-editable::after {
  content: '📷 Нажмите для смены / кадрирования фото';
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 20, 36, 0.95);
  color: var(--accent-gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--accent-gold);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.7);
  opacity: 0.95;
  z-index: 20;
}

/* Плавающий редактор текста */
.floating-text-toolbar {
  display: none;
  position: absolute;
  background: #0d1424;
  border: 1px solid var(--accent-gold);
  border-radius: 30px;
  padding: 6px 14px;
  z-index: 999999;
  box-shadow: 0 10px 30px rgba(0,0,0,0.85);
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  flex-wrap: nowrap;
}
.floating-text-toolbar.show { display: flex; }
.toolbar-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-main);
  font-size: 0.88rem;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.toolbar-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
.toolbar-select {
  background: #070a13;
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--accent-gold);
  font-size: 0.78rem;
  border-radius: 12px;
  padding: 4px 8px;
  outline: none;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
}
.toolbar-select option { background: #0d1424; color: #fff; }
.toolbar-divider {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.18);
  margin: 0 4px;
}

header {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 19, 0.85);
}
body.admin-mode-active header { top: 50px; }

[hidden] { display: none !important; }
.preorder-trigger { padding: 10px 18px; font-size: 0.85rem; max-width: 290px; }
.mobile-preorder-label, .gallery-more, #symbolCounter { display: none; }
.mobile-carousel-controls { display: none; }
#preorderTrigger .mobile-preorder-label { display: none; }
.mobile-menu-toggle { display: none; }
.nav-wrap { gap: 18px; }
.contact-social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.contact-link { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 24px; border: 1px solid var(--border-gold); border-radius: 8px; color: var(--text-main, #fff); background: rgba(16,24,44,.65); text-decoration: none; }
.contact-link:hover, .contact-link:focus-visible { border-color: var(--accent-gold); background: #202536; }
.contact-link img { object-fit: contain; flex: 0 0 28px; }
#preorderDialog { padding: 20px; border: 0; background: transparent; color: #fff; width: 560px; max-width: 100%; max-height: 100dvh; margin: auto; }
#preorderDialog::backdrop { background: rgba(0,0,0,.75); }
.preorder-panel { position: relative; padding: 64px 28px 28px; background: #101522; border: 1px solid var(--border-gold); border-radius: 8px; }
.preorder-panel h2 { font-size: 1.6rem; margin-bottom: 16px; }
.preorder-panel p { color: var(--text-muted); line-height: 1.6; margin-bottom: 22px; }
#preorderLinks { display: grid; gap: 12px; }
body:has(#preorderDialog[open]) { overflow: hidden; }
.gallery-step { position: absolute; top: 50%; width: 44px; height: 44px; font-size: 32px; border: 1px solid #aaa; border-radius: 6px; background: #171717; color: white; cursor: pointer; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
#galleryPhotoCounter { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); padding: 6px 14px; background: #171717; color: #fff; border-radius: 6px; }
.gallery-photo-dialog { padding-bottom: 56px; }
.btn.gallery-load-more { display: flex; width: fit-content; margin: 26px auto 0; }
.structure-toggle { display: block; width: 100%; border: 0; padding: 0; color: inherit; background: none; text-align: left; font: inherit; cursor: pointer; }
.structure-toggle::after { content: '+'; float: right; color: var(--accent-gold); margin-left: 10px; }
.structure-toggle[aria-expanded=true]::after { content: '\2212'; }
@media (min-width: 701px) and (max-width: 1150px) {
  .nav-wrap { flex-wrap: wrap; }
  .nav-wrap .nav-links { display: flex; order: 3; width: 100%; justify-content: center; flex-wrap: wrap; }
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  letter-spacing: 2px;
  color: var(--accent-gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent-gold); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 30px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: 'Montserrat', sans-serif;
}

.btn-gold {
  background: var(--gold-gradient);
  color: #0b0f19;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

.btn-save-disk {
  background: #10b981;
  color: #041f14;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}
.btn-save-disk:hover {
  background: #059669;
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
}
.btn-outline:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--accent-gold);
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 20px; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.site-section {
  position: relative;
  padding: 48px 0;
}

.hero {
  padding: 90px 0 40px;
  text-align: center;
}

.hero-tagline {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 16px;
}

/* Главный заголовок без прозрачных градиентов, буквы не пропадают при клике */
.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  line-height: 1.25;
  margin-bottom: 22px;
  font-weight: 600;
  color: #ffffff;
}

.hero p {
  max-width: 680px;
  margin: 0 auto 34px;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  color: #fff;
  margin-bottom: 12px;
}

.section-title p {
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  padding: 28px 22px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s, border-color 0.3s;
}
.feature-card:hover { transform: translateY(-5px); border-color: var(--accent-gold); }
.feature-icon { font-size: 2rem; color: var(--accent-gold); margin-bottom: 16px; }
.feature-symbol-image {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
  margin: 0 0 16px;
}
.feature-card h3 { font-family: 'Cinzel', serif; font-size: 1.15rem; margin-bottom: 10px; color: #fff; }
.feature-card p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; }

.structure-section {
  background: transparent;
}

.structure-circles-list {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.structure-circle {
  background: rgba(16, 24, 44, 0.62);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.structure-circle h3 {
  font-family: 'Cinzel', serif;
  color: #fff;
  font-size: 1.08rem;
  margin-bottom: 14px;
}

.structure-title-number {
  color: var(--accent-gold);
}

.structure-circle p {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.94rem;
}

.services-section {
  background: transparent;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  min-height: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s, border-color 0.3s;
}

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

.service-card h3 {
  font-family: 'Cinzel', serif;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 14px;
}

.service-card p, .service-description {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.service-price {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(212, 175, 55, 0.22);
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

@media (min-width: 701px) {
  #deckGalleryGrid:not(.gallery-grid-empty) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gallery-grid-empty {
  display: flex;
  justify-content: center;
}

.gallery-item {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  border: 1px solid var(--border-gold);
  overflow: hidden;
  background: rgba(16, 24, 44, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.gallery-item img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item[role="button"] { cursor: zoom-in; }
.gallery-item[role="button"]:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 4px; }
.gallery-photo-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 64px 20px 24px;
  border: 0;
  box-sizing: border-box;
  background: transparent;
}
.gallery-photo-dialog[open] { display: flex; align-items: center; justify-content: center; }
.gallery-photo-dialog::backdrop { background: rgba(0, 0, 0, 0.9); }
.gallery-photo-dialog img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-photo-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #aaa;
  border-radius: 6px;
  background: #171717;
  color: white;
  font-size: 32px;
  cursor: pointer;
}
body:has(.gallery-photo-dialog[open]) { overflow: hidden; }

.gallery-placeholder {
  max-width: 420px;
  min-height: 180px;
  aspect-ratio: auto;
  padding: 28px;
  text-align: center;
}

.gallery-placeholder p {
  margin: 0;
  line-height: 1.5;
}

.gallery-add-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  border: 2px dashed var(--accent-gold);
  background: rgba(212, 175, 55, 0.05);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--accent-gold);
  cursor: pointer;
  transition: all 0.3s;
  display: none;
}
body.admin-mode-active .gallery-add-card { display: flex; }
.gallery-add-card:hover { background: rgba(212, 175, 55, 0.15); transform: scale(1.02); }

.card-day-section {
  background: radial-gradient(circle at center, rgba(19, 31, 58, 0.22) 0%, transparent 72%);
}

.interactive-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.card-scene {
  width: min(270px, 78vw);
  height: min(410px, 118vw);
  perspective: 1200px;
}

.card-object {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}
.card-object.is-flipped { transform: rotateY(180deg); }

.card-face {
  position: absolute;
  width: 100%; height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 35px rgba(0,0,0,0.6), 0 0 20px rgba(212, 175, 55, 0.2);
  border: 2px solid var(--border-gold);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.card-back {
  background: #05070c url("uploads/РУБАШКА КАРТ.jpg?v=20260830-card-back-jpg") center / cover no-repeat;
}

.card-back-pattern {
  width: 90%; height: 90%;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.card-back .card-back-pattern {
  display: none;
}
.card-back-pattern span { font-size: 2.2rem; color: var(--accent-gold); }
.card-back-text { font-family: 'Cinzel', serif; letter-spacing: 2px; font-size: 0.85rem; color: var(--accent-gold); }

.card-front {
  background: linear-gradient(160deg, #131b2e 0%, #0a0e1a 100%);
  transform: rotateY(180deg);
  border-color: var(--accent-gold);
  justify-content: space-between;
  position: relative;
}

.card-front-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.45;
  z-index: 1;
}

.card-front-content {
  position: relative;
  z-index: 2;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.card-symbol-art {
  font-size: 3.2rem;
  color: var(--accent-gold);
  margin-top: 10px;
  filter: drop-shadow(0 0 12px rgba(229, 192, 123, 0.6));
}

.card-title-front { font-family: 'Cinzel', serif; font-size: 1.15rem; color: #fff; }
.card-archetype { font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-gold); }

.card-reading {
  max-width: 620px;
  width: 100%;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 24px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.reading-hint { color: var(--text-muted); font-style: italic; font-size: 0.95rem; }
.reading-content h4 { font-family: 'Cinzel', serif; font-size: 1.25rem; color: var(--accent-gold); margin-bottom: 10px; }
.reading-content .quote { font-size: 0.98rem; color: var(--text-main); margin-bottom: 14px; line-height: 1.6; }
.reading-content .question-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(212, 175, 55, 0.3);
  font-size: 0.9rem;
  color: var(--accent-starlight);
  line-height: 1.5;
}

.daily-limit-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 16px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent-gold);
}

.author-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 40px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 24px;
  padding: 40px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.author-img-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  background: linear-gradient(135deg, #172033, #0b0e17);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 3.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.author-img-box img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.author-content h3 { font-family: 'Cinzel', serif; font-size: clamp(1.4rem, 3vw, 1.8rem); color: #fff; margin-bottom: 6px; }
.author-role { color: var(--accent-gold); font-size: 0.88rem; letter-spacing: 1px; margin-bottom: 18px; text-transform: uppercase; }

.author-text {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.98rem;
}
.author-text p, .author-text div { margin-bottom: 14px; }

.custom-block-section { border-top: 0; }

.social-connect-block {
  background: transparent;
  padding: 48px 0;
  border-top: 0;
  text-align: center;
}
.social-connect-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  color: #fff;
  margin-bottom: 10px;
}
.social-connect-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 540px;
  margin: 0 auto 26px;
  padding: 0 10px;
}
.social-links-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 24, 44, 0.85);
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
}
.social-btn svg { width: 22px; height: 22px; fill: currentColor; }
.social-btn-telegram {
  background: linear-gradient(135deg, rgba(36, 161, 222, 0.25), rgba(16, 24, 44, 0.9));
  border-color: rgba(36, 161, 222, 0.6);
}
.social-btn-telegram:hover {
  border-color: #24a1de;
  color: #70c7f4;
  transform: translateY(-3px);
  box-shadow: 0 6px 22px rgba(36, 161, 222, 0.4);
}

footer {
  border-top: 0;
  padding: 25px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: transparent;
}

.crop-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(4, 6, 12, 0.9);
  z-index: 9999999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  backdrop-filter: blur(10px);
}
.crop-modal.active { display: flex; }

.crop-box {
  background: #0d1424;
  border: 1px solid var(--accent-gold);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  padding: 24px;
  color: var(--text-main);
  box-shadow: 0 25px 60px rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.crop-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 10px;
}
.crop-header h3 { font-family: 'Cinzel', serif; color: var(--accent-gold); font-size: 1.15rem; }

.crop-workspace-wrap {
  width: min(300px, 75vw);
  height: min(375px, 93.75vw);
  position: relative;
  border: 2px solid var(--accent-gold);
  border-radius: 12px;
  overflow: hidden;
  background: #04060b;
  cursor: grab;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
  touch-action: none;
}
.crop-workspace-wrap:active { cursor: grabbing; }

#cropCanvas { width: 100%; height: 100%; display: block; }
.crop-controls { width: 100%; margin-top: 16px; }
.crop-controls label { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--accent-gold); margin-bottom: 6px; }
.crop-range { width: 100%; accent-color: var(--accent-gold); cursor: pointer; }
.crop-hint { font-size: 0.78rem; color: var(--text-muted); text-align: center; margin-top: 8px; }
.crop-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 14px;
}

@media (max-width: 860px) {
  .author-wrap { grid-template-columns: 1fr; padding: 24px; gap: 28px; }
  .nav-links { display: none; }
  .site-section { padding: 36px 0; }
  .hero { padding: 70px 0 32px; }
  .services-grid { grid-template-columns: 1fr; }
  .admin-live-bar { padding: 8px 16px; font-size: 0.8rem; }
  .floating-text-toolbar { max-width: 95vw; overflow-x: auto; padding: 6px 10px; }
}

@media (min-width: 701px) and (max-width: 860px) {
  .nav-wrap .nav-links { display: flex; }
}
@media (max-width: 700px) {
  header { padding: 0; }
  .nav-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; min-height: 64px; padding-top: 7px; padding-bottom: 7px; }
  .nav-wrap .logo { min-width: 0; overflow: hidden; white-space: nowrap; font-size: .82rem; letter-spacing: .5px; gap: 4px; }
  .nav-wrap .nav-links { display: none; position: absolute; z-index: 5; top: 100%; left: 0; right: 0; margin: 0; padding: 12px 18px 16px; grid-template-columns: 1fr; gap: 0; background: rgba(7, 10, 19, .98); border: 1px solid rgba(212,175,55,.25); border-top: 0; box-shadow: 0 14px 30px rgba(0,0,0,.35); }
  .nav-wrap .nav-links.mobile-menu-open { display: grid; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 11px 4px; font-size: .9rem; }
  .preorder-trigger { max-width: 100%; min-height: 38px; padding: 8px 12px; white-space: nowrap; font-size: .75rem; }
  .preorder-trigger #headerCtaBtn { display: none; }
  #preorderTrigger .mobile-preorder-label { display: inline; }
  .mobile-menu-toggle { display: grid; place-content: center; gap: 4px; width: 40px; height: 40px; padding: 0; border: 1px solid var(--border-gold); border-radius: 6px; background: rgba(16,24,44,.7); cursor: pointer; }
  .mobile-menu-toggle span { display: block; width: 18px; height: 2px; background: var(--accent-gold); transition: transform .2s ease, opacity .2s ease; }
  .mobile-menu-toggle[aria-expanded=true] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .mobile-menu-toggle[aria-expanded=true] span:nth-child(2) { opacity: 0; }
  .mobile-menu-toggle[aria-expanded=true] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  #featuresGrid, #servicesGrid { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: 12px; }
  .mobile-carousel-frame { position: relative; min-width: 0; padding-inline: 22px; }
  #servicesGrid .service-price { text-align: center; }
  #featuresGrid .feature-card, #servicesGrid .service-card { flex: 0 0 100%; min-width: 0; padding-inline: 26px; scroll-snap-align: start; box-sizing: border-box; overflow-wrap: anywhere; }
  .mobile-carousel-controls { display: block; margin-top: 8px; }
  .mobile-carousel-controls[hidden] { display: none; }
  #symbolCounter, #serviceCounter { display: block; height: 20px; line-height: 20px; text-align: center; color: var(--text-muted); font-size: .85rem; margin: 0; }
  .mobile-carousel-arrow { position: absolute; top: calc((100% - 28px) / 2); transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--accent-gold); font-family: Arial, sans-serif; font-size: 2.8rem; font-weight: 400; line-height: 1; cursor: pointer; z-index: 1; }
  .mobile-carousel-arrow[data-direction=previous] { left: 0; }
  .mobile-carousel-arrow[data-direction=next] { right: 0; }
  .mobile-carousel-arrow:disabled { opacity: .35; cursor: default; }
  .mobile-carousel-arrow:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 3px; }
  .structure-circle { padding: 18px; }
  .structure-circle h3 { margin-bottom: 0; }
  .structure-circle [data-structure-field=text]:not([hidden]) { margin-top: 18px; }
  #deckGalleryGrid:not(.gallery-grid-empty) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body:not(.admin-mode-active) #deckGalleryGrid .gallery-item:nth-child(n+5) { display: none; }
  .gallery-load-more { display: none !important; }
  .gallery-more { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; color: white; background: rgba(0,0,0,.6); font-size: 1rem; }
  .social-connect-block { padding: 36px 0; }
  .social-connect-title { font-size: 1.4rem; }
  .social-connect-subtitle { font-size: .9rem; line-height: 1.5; margin-bottom: 20px; }
  .contact-social-links { gap: 18px; }
  .contact-social-links .contact-link { flex-direction: column; border: 0; background: none; padding: 0; gap: 8px; font-size: .8rem; }
  .contact-social-links .contact-link img { width: 48px; height: 48px; flex-basis: 48px; padding: 10px; border: 1px solid var(--border-gold); border-radius: 50%; background: #101522; }
  #preorderDialog { width: 100%; max-width: 100%; max-height: 100dvh; margin: 0; inset: 0; height: 100dvh; padding: 0; }
  #preorderDialog[open] { display: flex; align-items: flex-end; }
  .preorder-panel { width: 100%; max-height: 90dvh; overflow-y: auto; box-sizing: border-box; padding: 60px 22px max(24px, env(safe-area-inset-bottom)); border-radius: 8px 8px 0 0; animation: sheet-in .2s ease-out; }
  .preorder-panel h2 { font-size: 1.4rem; }
  .gallery-photo-dialog { padding-left: 8px; padding-right: 8px; }
  .gallery-step { top: auto; bottom: 8px; }
}
@keyframes sheet-in { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .preorder-panel { animation: none; } }
