/* assets/css/main.css - Global styles and design tokens for LDRclub */
:root {
  color-scheme: light;

  --bg: #f6efef;
  --surface: #ffffff;
  --surface-2: #efebe3;

  --border: rgba(17, 22, 33, 0.12);
  --border-hover: rgba(17, 22, 33, 0.22);

  --gold: #ac2a13;
  --gold-light: #cc4831;
  --gold-dim: rgb(183 50 26 / 7%);
  --gold-glow: rgba(184, 143, 74, 0.2);

  --text: #161b25;
  --text-soft: rgba(22, 27, 37, 0.76);
  --text-muted: rgba(22, 27, 37, 0.5);

  --error: #e87070;
  --success: #70c48a;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 8px 28px rgba(18, 22, 30, 0.1);
  --shadow-elevated: 0 18px 52px rgba(18, 22, 30, 0.14);
  --shadow-gold: 0 10px 32px rgba(184, 143, 74, 0.2);

  --header-bg: rgba(255, 255, 255, 0.84);
  --header-bg-strong: rgb(255 255 255 / 92%);
  --footer-bg: rgba(234, 229, 219, 0.7);
  --overlay-bg: rgba(8, 10, 14, 0.45);
  --surface-overlay: rgba(255, 255, 255, 0.76);
  --grain-opacity: 0.12;
  --orb-1: rgba(184, 143, 74, 0.08);
  --orb-2: rgba(89, 112, 165, 0.06);
  --panel-soft: rgba(17, 22, 33, 0.03);
  --panel-softer: rgba(17, 22, 33, 0.02);
  --panel-strong: rgba(17, 22, 33, 0.06);
  --input-bg: rgba(255, 255, 255, 0.9);
  --input-focus-bg: rgba(184, 143, 74, 0.07);
  --surface-grad-top: rgba(17, 22, 33, 0.03);
  --surface-grad-bottom: rgba(17, 22, 33, 0.01);

  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;
}

html[data-theme='dark'] {
  color-scheme: dark;

  --bg: #0d0d14;
  --surface: #16161f;
  --surface-2: #1e1e2a;

  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);

  --gold: #ac2a13;
  --gold-light: #cc4831;
  --gold-dim: rgba(201, 169, 110, 0.12);
  --gold-glow: rgba(201, 169, 110, 0.2);

  --text: #e8e4dc;
  --text-soft: rgba(255, 255, 255, 0.65);
  --text-muted: rgba(255, 255, 255, 0.35);

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 8px 32px rgba(201, 169, 110, 0.2);

  --header-bg: rgba(13, 13, 20, 0.84);
  --header-bg-strong: rgba(13, 13, 20, 0.97);
  --footer-bg: rgba(15, 15, 22, 0.6);
  --overlay-bg: rgba(0, 0, 0, 0.5);
  --surface-overlay: rgba(22, 22, 31, 0.8);
  --grain-opacity: 0.35;
  --orb-1: rgba(201, 169, 110, 0.05);
  --orb-2: rgba(80, 60, 160, 0.04);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --panel-softer: rgba(255, 255, 255, 0.02);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --input-bg: rgba(255, 255, 255, 0.04);
  --input-focus-bg: rgba(201, 169, 110, 0.04);
  --surface-grad-top: rgba(255, 255, 255, 0.03);
  --surface-grad-bottom: rgba(255, 255, 255, 0.01);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  position: relative;
  line-height: 1.45;
}

body::before {
  content: '';
  position: fixed;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--orb-1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--orb-2) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: var(--grain-opacity);
  z-index: 0;
}

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

main,
header,
footer,
section,
div {
  position: relative;
  z-index: 1;
}

.container {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--gold-light);
}

.main-nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.main-nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: var(--transition);
}

.main-nav a:hover {
  color: var(--gold-light);
  border-color: rgba(201, 169, 110, 0.4);
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  z-index: 0 !important;
}

.footer-wrap {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-wrap p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.hero {
  padding: 64px 0 40px;
}

.hero h1 {
  margin: 0 0 12px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 5.5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 300;
}

.hero p {
  margin: 0;
  max-width: 640px;
  color: var(--text-soft);
  font-size: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0 44px;
}

.tool-card {
  background: linear-gradient(180deg, var(--surface-grad-top), var(--surface-grad-bottom));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.tool-card h3 {
  margin: 0 0 8px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 400;
}

.tool-card p {
  margin: 0 0 16px;
  color: var(--text-soft);
  min-height: 56px;
}

.notice {
  background: rgba(232, 112, 112, 0.11);
  border: 1px solid rgba(232, 112, 112, 0.45);
  color: #f0b1b1;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text-muted);
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #0d0d14;
  border: 0;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 22px;
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn.secondary {
  background: transparent;
  color: var(--gold-light);
  border: 1px solid rgba(201, 169, 110, 0.35);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transition: left 0.45s ease;
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201, 169, 110, 0.35);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-soft);
}

.input-field {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 12px 14px;
  width: 100%;
  transition: var(--transition);
  outline: none;
}

.input,
select,
textarea {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 12px 14px;
  width: 100%;
  transition: var(--transition);
  outline: none;
}

.input:focus,
select:focus,
textarea:focus {
  border-color: rgba(201, 169, 110, 0.45);
  background: var(--input-focus-bg);
}

.input-field::placeholder {
  color: var(--text-muted);
}

.input-field:focus {
  border-color: rgba(201, 169, 110, 0.45);
  background: var(--input-focus-bg);
}

.input-field.error {
  border-color: var(--error);
}

.field-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

@media (max-width: 900px) {
  .main-nav {
    gap: 12px;
    overflow-x: auto;
    max-width: 64vw;
  }

  .main-nav a {
    font-size: 11px;
    white-space: nowrap;
  }

  .brand {
    font-size: 25px;
  }

  .footer-wrap {
    padding: 14px 0;
  }
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
}

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

.site-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.site-logo em {
  font-style: italic;
  color: var(--gold);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 84px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

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

.theme-toggle-icon {
  font-size: 13px;
  line-height: 1;
}

.theme-toggle-mobile {
  margin-bottom: 12px;
  min-width: 100%;
}

.nav-link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  padding: 4px 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.hamburger:hover {
  background: var(--panel-soft);
}

.ham-line {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-soft);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

.ham-line.open:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.ham-line.open:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.ham-line.open:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-menu {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 0 24px;
  z-index: 99;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-soft);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  border-bottom: 1px solid var(--border);
}

.mobile-nav-link:last-child {
  border-bottom: none;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: var(--gold-dim);
  color: var(--gold-light);
}

.mobile-nav-icon {
  color: var(--gold);
  font-size: 14px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.mobile-nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(201, 169, 110, 0.3);
  padding: 2px 8px;
  border-radius: 20px;
}

.mobile-nav-badge.soon {
  background: var(--panel-soft);
  color: var(--text-muted);
  border-color: var(--border);
}

.mobile-menu-footer {
  padding: 16px 24px 0;
}

.mobile-menu-tagline {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  z-index: 98;
  backdrop-filter: blur(2px);
}

.menu-enter {
  transition: all 0.25s ease;
}

.menu-enter-start {
  opacity: 0;
  transform: translateY(-8px);
}

.menu-enter-end {
  opacity: 1;
  transform: translateY(0);
}

.menu-leave {
  transition: all 0.2s ease;
}

.menu-leave-start {
  opacity: 1;
  transform: translateY(0);
}

.menu-leave-end {
  opacity: 0;
  transform: translateY(-8px);
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .theme-toggle {
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-sm);
    letter-spacing: 0;
  }

  .theme-toggle-text {
    display: none;
  }

  .theme-toggle-mobile {
    min-width: 100%;
    height: 40px;
    border-radius: var(--radius);
    justify-content: center;
    gap: 8px;
  }

  .theme-toggle-mobile .theme-toggle-text {
    display: inline;
  }
}

/* MOBILE GLOBAL RESETS */

html,
body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

input,
select,
textarea {
  font-size: 16px !important;
}

* {
  -webkit-tap-highlight-color: rgba(201, 169, 110, 0.15);
}

button,
a,
[role="button"] {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* POSTER TOOL MOBILE */

.builder {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
  align-items: start;
}

@media (max-width: 960px) {
  .builder {
    grid-template-columns: 1fr;
    padding: 0 16px 60px;
  }

  .preview-panel {
    order: -1;
  }

  .form-panel {
    order: 1;
  }
}

@media (max-width: 600px) {
  .builder {
    gap: 20px;
    padding: 0 16px 100px;
  }

  .poster-wrap {
    max-width: 320px;
    margin: 0 auto;
  }

  .stats-bar {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .stat-val {
    font-size: 18px;
  }

  .stat-key {
    font-size: 8px;
  }

  .form-section {
    margin-bottom: 20px;
  }

  .field-row.two-col {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .theme-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }

  .theme-btn {
    padding: 8px 4px;
  }

  .theme-name {
    display: none;
  }

  .style-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .style-opt {
    padding: 12px 6px;
  }

  .provider-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .provider-btn {
    padding: 12px 10px;
    font-size: 12px;
  }
}

/* FLOATING MOBILE CTA */

@media (max-width: 768px) {
  .mobile-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: var(--header-bg-strong);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    z-index: 50;
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .mobile-cta-bar .btn-primary {
    flex: 1;
    font-size: 16px;
    padding: 14px;
  }

  .mobile-cta-bar .btn-ghost {
    flex-shrink: 0;
    padding: 14px 16px;
    font-size: 12px;
  }

  .cta-area {
    display: none;
  }
}

@media (min-width: 769px) {
  .mobile-cta-bar {
    display: none;
  }

  .cta-area {
    display: block;
  }
}

/* HERO SECTION MOBILE */

@media (max-width: 600px) {
  .poster-hero {
    padding: 44px 24px 18px;
  }

  .hero-title {
    font-size: clamp(32px, 9vw, 52px);
  }

  .hero-sub {
    font-size: 15px;
  }
}

/* HOMEPAGE TOOLS GRID MOBILE */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

@media (max-width: 600px) {
  .tools-grid {
    grid-template-columns: 1fr;
    padding: 0 16px 60px;
    gap: 12px;
  }
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition), transform var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-card:hover {
  border-color: rgba(201, 169, 110, 0.3);
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .tool-card {
    padding: 20px;
  }

  .tool-card:hover {
    transform: none;
  }
}

/* SUCCESS PAGE MOBILE */

@media (max-width: 600px) {
  .success-state {
    padding: 32px 20px;
  }

  .success-poster-wrap {
    max-width: 300px;
    margin: 0 auto;
  }

  .btn-download {
    width: 100%;
    font-size: 15px;
  }
}

/* ADMIN MOBILE */

.admin-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
}

@media (max-width: 600px) {
  .admin-container {
    padding: 20px 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 500px;
  }

  .fields-grid {
    grid-template-columns: 1fr !important;
  }

  .settings-card-header {
    padding: 16px;
  }

  .settings-card-body {
    padding: 0 16px 20px;
  }
}

/* GENERAL CONTAINER */

.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 600px) {
  .page-container {
    padding: 0 16px;
  }
}

/* TYPOGRAPHY MOBILE */

@media (max-width: 600px) {
  .page-title {
    font-size: 28px !important;
  }
}

/* MAP POSTER */

.map-canvas-wrap {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  aspect-ratio: 1 / 1;
}

.map-canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 0 !important;
}

.poster-gloss {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.10) 14%,
      rgba(255, 255, 255, 0.03) 32%,
      rgba(255, 255, 255, 0) 60%
    ),
    radial-gradient(
      130% 52% at 50% -8%,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0) 65%
    );
  opacity: 0.36;
  mix-blend-mode: soft-light;
}

.map-canvas-wrap.frame-none .poster-gloss {
  opacity: 0.28;
}

.canvas-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 32px;
}

.placeholder-icon {
  font-size: 48px;
  opacity: 0.3;
}

.canvas-placeholder p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.canvas-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--surface-overlay);
  backdrop-filter: blur(4px);
}

.canvas-loading p {
  color: var(--text-muted);
  font-size: 13px;
}

.lookup-status,
.lookup-success,
.lookup-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
}

.lookup-status {
  background: var(--panel-soft);
  color: var(--text-muted);
}

.lookup-success {
  background: rgba(112, 196, 138, 0.08);
  border: 1px solid rgba(112, 196, 138, 0.2);
  color: var(--success);
}

.lookup-error {
  background: rgba(232, 112, 112, 0.08);
  border: 1px solid rgba(232, 112, 112, 0.2);
  color: var(--error);
}

.check-green {
  color: var(--success);
  font-weight: 700;
}

.distance-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.dist-val {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 900;
    color: #000000;
}

.dist-sep {
  opacity: 0.4;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (max-width: 400px) {
  .theme-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .preview-panel {
    position: sticky;
    top: 64px;
    z-index: 10;
    background: var(--bg);
    padding-bottom: 12px;
  }

  .map-canvas-wrap {
    max-width: 340px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .map-canvas-wrap {
    max-width: 300px;
  }
}

/* MAP POSTER V2: FONT PICKER */

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

.font-btn {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  min-height: 70px;
}

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

.font-btn.active {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.font-preview {
  font-size: 22px;
  color: var(--text);
  line-height: 1.2;
}

.font-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* MAP POSTER V2: SIZE PICKER */

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

@media (max-width: 400px) {
  .size-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.size-btn {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  position: relative;
}

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

.size-btn.active {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.size-visual-wrap {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.size-visual {
  background: var(--panel-strong);
  border: 1px solid var(--border-hover);
  border-radius: 2px;
  min-width: 14px;
  min-height: 14px;
}

.size-btn.active .size-visual {
  background: var(--gold-dim);
  border-color: var(--gold);
}

.size-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
}

.size-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.size-info {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 6px;
  background: var(--panel-softer);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* MAP POSTER V2: FRAME PICKER */

.frame-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (max-width: 400px) {
  .frame-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.frame-btn {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

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

.frame-btn.active {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.frame-swatch-wrap {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame-swatch-inner {
  width: 24px;
  height: 24px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.frame-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
}

.frame-hint {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

.map-canvas-wrap {
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

/* MAP POSTER ORIENTATION TOGGLE */

.orientation-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.orient-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

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

.orient-btn.active {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.orient-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-rect {
  width: 22px;
  height: 32px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  opacity: 0.6;
}

.orient-btn.active .portrait-rect {
  opacity: 1;
}

.landscape-rect {
  width: 34px;
  height: 22px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  opacity: 0.6;
}

.orient-btn.active .landscape-rect {
  opacity: 1;
}

.orient-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  font-family: 'DM Sans', sans-serif;
}

/* MAP POSTER LAYOUT TOGGLE */

.layout-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.layout-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  transition: var(--transition);
  font-family: 'DM Sans', sans-serif;
}

.layout-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-soft);
}

.layout-btn.active {
  border-color: var(--gold);
  background: var(--gold-dim);
  color: var(--gold);
}

.layout-label {
  font-size: 12px;
  font-weight: 500;
  color: inherit;
}

.layout-desc {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.order-recap-grid div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px !important;
}
