/* Feast Drop — auto-fits phone, tablet, desktop */

:root {
  --ink: #14110f;
  --muted: #6b635b;
  --cream: #f7f3ed;
  --white: #fff;
  --accent: #9b2c2c;
  --accent-hover: #7a2222;
  --border: #e4dcd0;
  --gold: #b8956c;
  --radius: 12px;
  --header-h: 48px;
  --footer-h: auto;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Cormorant Garamond", Georgia, serif;
  --vh: 1vh;
}

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

html {
  margin: 0;
  height: 100%;
  height: -webkit-fill-available;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

.cfg-page {
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}

/* Shell fills device; mobile may scroll inside shell only */
.cfg-shell {
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  height: 100dvh;
  height: 100svh;
  max-height: 100dvh;
  max-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  overflow: hidden;
}

/* Top: MD guide links + Grok 24/7 */
.cfg-top-info {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  max-height: min(38vh, 280px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cfg-md-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  padding: 0.4rem 0.65rem 0.25rem;
  border-bottom: 1px solid #f0ebe3;
}

.cfg-md-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-right: 0.15rem;
}

.cfg-md-links a {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  background: #fdf5f4;
  border: 1px solid #f0d8d4;
  white-space: nowrap;
}

.cfg-md-links a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.cfg-grok-box {
  padding: 0.35rem 0.65rem 0.5rem;
}

.cfg-grok-box summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  font-size: 0.82rem;
  user-select: none;
}

.cfg-grok-box summary::-webkit-details-marker {
  display: none;
}

.cfg-grok-box summary strong {
  color: var(--ink);
}

.cfg-grok-box summary span {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 500;
}

.cfg-grok-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 1rem;
  margin-top: 0.4rem;
}

.cfg-grok-grid ul {
  margin: 0;
  padding-left: 1.05rem;
  font-size: 0.7rem;
  line-height: 1.4;
  color: #2a2420;
}

.cfg-grok-grid li {
  margin-bottom: 0.2rem;
}

.cfg-grok-foot {
  margin: 0.45rem 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.4;
}

.cfg-grok-foot a {
  color: var(--accent);
  font-weight: 700;
  margin-left: 0.35rem;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .cfg-top-info {
    max-height: min(32vh, 220px);
  }
  .cfg-grok-grid {
    grid-template-columns: 1fr;
  }
  .cfg-md-links {
    padding: 0.35rem 0.5rem 0.2rem;
  }
  .cfg-md-links a {
    font-size: 0.6rem;
    padding: 0.18rem 0.38rem;
  }
}

/* Header */
.cfg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: rgba(247, 243, 237, 0.97);
  gap: 0.4rem;
  min-height: var(--header-h);
  flex-shrink: 0;
  z-index: 5;
}

.cfg-header-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.cfg-header-addr {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  display: none;
}

@media (min-width: 900px) {
  .cfg-header-addr {
    display: inline;
  }
}

.cfg-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.cfg-mark {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cfg-brand strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.1;
  white-space: nowrap;
}

.cfg-brand small {
  display: block;
  font-size: 0.58rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}

.cfg-phone {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.cfg-phone:hover {
  color: var(--accent);
}

.cfg-docs-link {
  font-size: 0.72rem;
  font-weight: 750;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.cfg-docs-link:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* Main split */
.cfg-main {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 0;
  overflow: hidden;
}

/* Preview */
.cfg-preview {
  position: relative;
  min-height: 0;
  background: #1a1614;
  overflow: hidden;
}

.cfg-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.cfg-preview-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1rem 0.9rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: #fff;
}

.cfg-preview-cap h1 {
  margin: 0 0 0.2rem;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.8vw, 2.1rem);
  font-weight: 700;
  line-height: 1.15;
}

.cfg-preview-cap p {
  margin: 0;
  font-size: clamp(0.72rem, 1.5vw, 0.88rem);
  opacity: 0.9;
  max-width: 28rem;
  line-height: 1.35;
}

/* Panel */
.cfg-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--white);
  border-left: 1px solid var(--border);
  overflow: hidden;
}

.cfg-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.55rem 0.7rem 0.4rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.cfg-label {
  margin: 0.45rem 0 0.3rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.cfg-label span {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin-left: 0.25rem;
}

.cfg-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cfg-tabs::-webkit-scrollbar {
  display: none;
}

.cfg-tab {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  border: 2px solid var(--border);
  background: var(--cream);
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.25rem 0.3rem 0.35rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  width: 4.1rem;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}

.cfg-tab img {
  width: 100%;
  height: 2.35rem;
  object-fit: cover;
  border-radius: 7px;
  display: block;
}

.cfg-tab span {
  line-height: 1.1;
  text-align: center;
}

.cfg-tab.is-on {
  background: #fff;
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--accent);
}

.cfg-checkout.is-frozen,
.cfg-checkout:disabled {
  background: #9a9088 !important;
  cursor: not-allowed;
  opacity: 0.85;
}

.cfg-preview-co {
  margin: 0 0 0.15rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Theme checkboxes with thumbs */
.cfg-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.cfg-check {
  display: block;
  cursor: pointer;
  margin: 0;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream);
  transition: border-color 0.12s, box-shadow 0.12s;
}

.cfg-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cfg-check.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.cfg-check-body {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem;
}

.cfg-check-body img {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.cfg-check-text {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.cfg-check-text strong {
  font-size: 0.7rem;
  line-height: 1.15;
}

.cfg-check-text small {
  font-size: 0.62rem;
  color: var(--muted);
}

.cfg-check-col {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cfg-check-size .cfg-check-body-size {
  padding: 0.4rem 0.5rem;
}

.cfg-check-size.is-on {
  background: #fdf5f4;
}

.cfg-venue {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.55rem 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.cfg-venue input {
  margin-top: 0.12rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.cfg-venue small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.68rem;
  margin-top: 0.08rem;
}

/* Price + checkout sticky in panel */
.cfg-price {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 0.5rem 0.7rem 0.55rem;
  background: var(--cream);
  z-index: 4;
}

.cfg-price-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
  gap: 0.5rem;
}

.cfg-price-row strong {
  color: var(--ink);
  font-weight: 650;
  text-align: right;
}

.cfg-price-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0.35rem 0 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border);
  font-size: 0.82rem;
  font-weight: 600;
}

.cfg-price-total strong {
  font-family: var(--display);
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 700;
  color: var(--accent);
}

.cfg-checkout {
  width: 100%;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
  cursor: pointer;
  min-height: 44px;
}

.cfg-checkout:hover {
  background: var(--accent-hover);
}

.cfg-dead-note {
  margin: 0.3rem 0 0;
  text-align: center;
  font-size: 0.6rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Footer */
.cfg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  padding: 0.35rem 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, #14110f 0%, #1f1a17 50%, #14110f 100%);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  z-index: 5;
}

.cfg-footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  min-width: 0;
}

.cfg-footer-brand strong {
  color: #fff;
  font-size: 0.75rem;
  font-family: var(--display);
  font-weight: 700;
}

.cfg-footer-brand span {
  opacity: 0.75;
}

.cfg-footer-brand a {
  color: #f0d9a8;
  text-decoration: none;
  font-weight: 650;
}

.cfg-footer-brand a:hover {
  color: #fff;
}

.cfg-social {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.cfg-soc {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff !important;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.6rem;
  transition: background 0.15s, border-color 0.15s;
  min-height: 28px;
}

.cfg-soc:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(240, 217, 168, 0.45);
}

.cfg-soc-icon {
  display: flex;
  opacity: 0.95;
}

/* Password gate */
.cfg-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(184, 149, 108, 0.2), transparent),
    var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, var(--safe-top)) max(1rem, var(--safe-right)) max(1rem, var(--safe-bottom)) max(1rem, var(--safe-left));
  overflow-y: auto;
}

.cfg-gate[hidden] {
  display: none !important;
}

.cfg-gate-card {
  width: min(360px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow: 0 20px 50px rgba(20, 17, 15, 0.1);
  margin: auto;
}

.cfg-mark-lg {
  width: 48px;
  height: 48px;
  font-size: 0.85rem;
  margin: 0 auto 0.75rem;
}

.cfg-gate-card h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.75rem;
}

.cfg-gate-sub {
  margin: 0.35rem 0 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.cfg-gate-hint {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.cfg-gate-input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  margin-bottom: 0.65rem;
  text-align: center;
}

.cfg-gate-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 149, 108, 0.2);
}

.cfg-gate-err {
  margin: 0.65rem 0 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

#app[hidden] {
  display: none !important;
}

/* Services nav (Precious-style shop categories) */
.cfg-services {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  margin-bottom: 0.5rem;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cfg-services::-webkit-scrollbar {
  display: none;
}
.cfg-service {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 4.6rem;
  max-width: 5.4rem;
  padding: 0.4rem 0.35rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--cream);
  font: inherit;
  font-size: 0.58rem;
  font-weight: 750;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.15;
  text-align: center;
}
.cfg-service-icon {
  font-size: 1.1rem;
  line-height: 1;
}
.cfg-service.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.cfg-service-special {
  border-color: #e8b4b8;
  background: #fff8f9;
  color: #6b2d3c;
}
.cfg-service-special.is-on {
  background: #9b2c2c;
  border-color: #9b2c2c;
  color: #fff;
}

/* Christening product feature */
.cfg-christening-feature {
  display: none;
  grid-template-columns: 72px 1fr;
  gap: 0.55rem;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  border: 2px solid #e8b4b8;
  background: linear-gradient(135deg, #fff8f9, #faf6ef);
}
.cfg-christening-feature.is-visible {
  display: grid;
}
.cfg-christening-feature img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}
.cfg-christening-tag {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9b2c2c;
}
.cfg-christening-feature strong {
  display: block;
  font-size: 0.82rem;
  margin: 0.1rem 0;
}
.cfg-christening-feature p {
  margin: 0;
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.3;
}

.cfg-preview-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 3;
  background: #fff;
  color: #9b2c2c;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.cfg-space-float {
  top: 2.6rem;
}

.cfg-tab-christening {
  width: 5.2rem !important;
  border-color: #e8b4b8 !important;
  background: #fff8f9 !important;
}
.cfg-tab-christening.is-on {
  border-color: #9b2c2c !important;
  box-shadow: 0 0 0 1px #9b2c2c;
  background: #fff !important;
}
.cfg-tab-tag {
  font-style: normal;
  font-size: 0.5rem;
  font-weight: 800;
  color: #9b2c2c;
  background: #fce8ea;
  padding: 0.1rem 0.3rem;
  border-radius: 999px;
  line-height: 1.2;
}
.cfg-check-christening {
  grid-column: 1 / -1;
  border-color: #e8b4b8 !important;
  background: #fff8f9;
}
.cfg-check-christening.is-on {
  border-color: #9b2c2c !important;
  box-shadow: 0 0 0 1px #9b2c2c;
}

/* Halls partner */
.cfg-tab-halls {
  border-color: #c9a227 !important;
}

.cfg-tab-halls.is-on {
  border-color: var(--accent) !important;
}

.cfg-check-halls {
  grid-column: 1 / -1;
  border-style: dashed;
}

.cfg-halls-box {
  margin-top: 0.5rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #faf6ef, #f3ebe0);
  border: 1px solid #e0d2b8;
}

.cfg-halls-title {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6a2a;
}

.cfg-halls-list {
  margin: 0 0 0.4rem;
  padding-left: 1rem;
  font-size: 0.7rem;
  color: var(--ink);
  line-height: 1.35;
}

.cfg-halls-list li {
  margin-bottom: 0.15rem;
}

/* How it works steps */
.cfg-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.cfg-steps span {
  font-size: 0.65rem;
  font-weight: 650;
  color: var(--muted);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
}
.cfg-steps b {
  color: var(--accent);
  margin-right: 0.15rem;
}

/* Fabric chips (Precious-style) */
.cfg-fabrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}
.cfg-fabric {
  border: 1.5px solid var(--border);
  background: var(--cream);
  font: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
}
.cfg-fabric.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Guests */
.cfg-guests-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.cfg-guest-input {
  width: 5.5rem;
  padding: 0.5rem 0.55rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}
.cfg-guest-hint {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Extras */
.cfg-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
}
.cfg-extras label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}
.cfg-extras input {
  accent-color: var(--accent);
}

.cfg-space-btn {
  width: 100%;
  margin-top: 0.35rem;
  margin-bottom: 0.15rem;
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, #9b2c2c, #c45c5c);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(155, 44, 44, 0.3);
  min-height: 48px;
}
.cfg-space-btn:hover {
  background: linear-gradient(135deg, #7a2222, #9b2c2c);
}
.cfg-space-btn-hero {
  margin-top: 0.15rem;
}
.cfg-space-hint {
  margin: 0 0 0.55rem;
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.3;
  text-align: center;
}
.cfg-space-float {
  position: absolute;
  top: 0.65rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  border: none;
  background: rgba(155, 44, 44, 0.95);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  max-width: 92%;
}
.cfg-space-float:hover {
  background: #7a2222;
}

/* Price + QR */
.cfg-price-with-qr {
  display: flex;
  gap: 0.65rem;
  align-items: flex-end;
}
.cfg-price-main {
  flex: 1;
  min-width: 0;
}
.cfg-qr-block {
  flex-shrink: 0;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem;
}
.cfg-qr-block img {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 4px;
}
.cfg-qr-label {
  margin: 0.2rem 0 0;
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.cfg-qr-url {
  margin: 0;
  font-size: 0.5rem;
  color: var(--ink);
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cfg-space-card {
  max-width: 520px;
  text-align: left;
}
.cfg-space-note {
  font-size: 0.78rem !important;
  margin-bottom: 0.75rem !important;
}
.cfg-space-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}
.cfg-space-upload {
  display: block;
  position: relative;
  min-height: 120px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  background: var(--cream);
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  padding: 0.5rem;
}
.cfg-space-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.cfg-space-upload img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}
.cfg-space-look {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.cfg-space-meta {
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0.3rem 0 0;
}
.cfg-space-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.65rem;
}
.cfg-checkout-ghost {
  background: transparent !important;
  color: var(--ink) !important;
  border: 1.5px solid var(--border) !important;
}

.cfg-space-ai-wrap {
  position: relative;
  min-height: 180px;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1614;
  margin-bottom: 0.4rem;
}
.cfg-space-ai-empty {
  margin: 0;
  padding: 2.5rem 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  font-weight: 600;
}
.cfg-space-ai-img {
  width: 100%;
  display: block;
  max-height: 320px;
  object-fit: contain;
  background: #111;
}

@media (max-width: 860px) {
  .cfg-price-with-qr {
    flex-direction: row;
  }
  .cfg-qr-block img {
    width: 64px;
    height: 64px;
  }
  .cfg-space-grid {
    grid-template-columns: 1fr;
  }
}

/* Dead-end modal */
.cfg-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 17, 15, 0.55);
  align-items: center;
  justify-content: center;
  padding: max(1rem, var(--safe-top)) max(1rem, var(--safe-right)) max(1rem, var(--safe-bottom)) max(1rem, var(--safe-left));
}

.cfg-modal.is-open {
  display: flex;
}

.cfg-modal-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.35rem 1.2rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  max-height: 90dvh;
  overflow-y: auto;
}

.cfg-modal-emoji {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.cfg-modal-card h2 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: 1.4rem;
}

.cfg-modal-card p {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.cfg-modal-cta {
  color: var(--ink) !important;
  font-weight: 600;
}

.cfg-modal-card .cfg-checkout {
  margin-top: 0.5rem;
}

/* ========== MOBILE / NARROW (phones) ========== */
@media (max-width: 860px) {
  .cfg-shell {
    /* Allow vertical use of full phone; internal areas scroll */
    height: 100dvh;
    height: 100svh;
    max-height: none;
  }

  .cfg-main {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(140px, 32svh) minmax(0, 1fr);
  }

  .cfg-panel {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .cfg-preview-cap {
    padding: 1rem 0.75rem 0.65rem;
  }

  .cfg-preview-cap h1 {
    font-size: 1.15rem;
  }

  .cfg-preview-cap p#preview-blurb {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.7rem;
  }

  .cfg-header {
    padding: 0.4rem 0.55rem;
  }

  .cfg-brand small {
    max-width: 28vw;
  }

  .cfg-phone {
    font-size: 0.7rem;
  }

  /* Compact footer on phone */
  .cfg-footer {
    font-size: 0.55rem;
    padding: 0.3rem 0.5rem calc(0.3rem + env(safe-area-inset-bottom, 0px));
    gap: 0.3rem;
  }

  .cfg-footer-brand span:nth-of-type(2),
  .cfg-footer-brand a[href^="mailto"] {
    display: none;
  }

  .cfg-soc span:not(.cfg-soc-icon) {
    display: none;
  }

  .cfg-soc {
    padding: 0.3rem;
    min-width: 32px;
    justify-content: center;
  }

  .cfg-check-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cfg-check-body img {
    width: 36px;
    height: 36px;
  }

  .cfg-check-text strong {
    font-size: 0.65rem;
  }

  .cfg-price {
    padding: 0.4rem 0.6rem 0.45rem;
  }

  .cfg-price-row {
    font-size: 0.68rem;
  }

  .cfg-price-total strong {
    font-size: 1.3rem;
  }

  .cfg-checkout {
    padding: 0.65rem;
    font-size: 0.88rem;
  }

  .cfg-tab {
    width: 3.75rem;
  }

  .cfg-tab img {
    height: 2.1rem;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .cfg-main {
    grid-template-rows: minmax(120px, 28svh) minmax(0, 1fr);
  }

  .cfg-header-right .cfg-phone {
    display: none;
  }

  .cfg-check-grid {
    grid-template-columns: 1fr;
  }

  .cfg-brand small {
    display: none;
  }
}

/* Short landscape / small height */
@media (max-height: 560px) and (max-width: 900px) {
  .cfg-main {
    grid-template-rows: minmax(100px, 26svh) minmax(0, 1fr);
  }

  .cfg-preview-cap p#preview-blurb {
    display: none;
  }

  .cfg-price-row {
    display: none;
  }

  .cfg-price-row:first-child,
  .cfg-price-total {
    display: flex;
  }

  .cfg-dead-note {
    display: none;
  }
}

/* Desktop fine-tune */
@media (min-width: 861px) {
  .cfg-shell {
    height: 100dvh;
    max-height: 100dvh;
  }
}
