:root {
  --paper: #f7f1e6;
  --paper-warm: #faf6ee;
  --card: #faf6ee;
  --ink: #221c18;
  --ink-soft: rgba(34, 28, 24, 0.68);
  --postal-red: #9D3F36;
  --postal-red-deep: #7E322B;
  --brand-button-bg: #f3ebe0;
  --border: rgba(120, 95, 70, 0.24);
  --accent: #9D3F36;
  --accent-soft: #f3ebe0;
  --destructive: #c94c4c;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
  --font-script: "Great Vibes", "Apple Chancery", cursive;
  --font-typewriter: "Special Elite", monospace, Courier, serif;
  --kraft: #e2c9a5;
  --kraft-deep: #d2b48c;
  --app-background: var(--kraft);
  --shadow-soft: 0 16px 36px rgba(60, 45, 25, 0.1), 0 4px 12px rgba(60, 45, 25, 0.05);
  --shadow-deep: 0 20px 48px rgba(45, 30, 15, 0.22), 0 6px 16px rgba(45, 30, 15, 0.1);
  --shadow-polaroid: 0 12px 28px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Theme Variations */
html[data-theme="sakura"] {
  --kraft: #f7dfdb;
  --kraft-deep: #e8c4be;
  --accent: #b8435d;
  --postal-red: #b8435d;
  --postal-red-deep: #943248;
}

html[data-theme="matcha"] {
  --kraft: #dfe6d5;
  --kraft-deep: #c4d1b5;
  --accent: #48693d;
  --postal-red: #48693d;
  --postal-red-deep: #344f2b;
}

html[data-theme="celestial"] {
  --kraft: #2b3244;
  --kraft-deep: #1c2130;
  --accent: #d4af37;
  --postal-red: #d4af37;
  --postal-red-deep: #b39127;
  --paper: #222736;
  --paper-warm: #262c3d;
  --card: #262c3d;
  --ink: #f6efe2;
  --ink-soft: rgba(246, 239, 226, 0.7);
  --border: rgba(212, 175, 55, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background-color: var(--kraft);
  background-image:
    linear-gradient(180deg, rgba(255, 248, 236, 0.58), rgba(250, 232, 205, 0.42)),
    url("assets/parcel-box.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  transition: background 0.4s ease;
}

html.is-recipient {
  background-color: #EDE1CD;
  background-image:
    linear-gradient(rgba(237, 225, 205, 0.88), rgba(237, 225, 205, 0.88)),
    url("assets/paper-grain.jpg");
  background-size: auto, 260px 260px;
  background-position: center, 0 0;
  background-repeat: repeat;
  background-attachment: fixed;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 400;
  background: transparent;
  cursor: url("assets/cursor-heart-32.png") 16 16, url("assets/cursor-heart.png") 32 32, auto;
  overflow-x: hidden;
}

a,
button,
.type-btn,
.floaty,
.floaty button,
[role="button"] {
  cursor: url("assets/cursor-heart-32.png") 16 16, url("assets/cursor-heart.png") 32 32, pointer;
}

/* —— Vintage Ambient Music Player Bar (Floating Cassette / Vinyl Widget) —— */
.music-player-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  background: #faf4e8;
  background-image: url("assets/paper-grain.jpg");
  border: 1.5px solid #8e6c49;
  border-radius: 40px 18px 36px 20px;
  padding: 8px 16px 8px 10px;
  box-shadow: 0 10px 28px rgba(45, 30, 15, 0.22);
  transform: rotate(-1deg);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.music-player-widget:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 14px 34px rgba(45, 30, 15, 0.28);
}

.music-player-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.music-vinyl-btn {
  background: none;
  border: none;
  padding: 0;
  outline: none;
}

.vinyl-disc {
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, #332d29 28%, #1f1b19 30%, #3a322d 45%, #181513 70%);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.vinyl-grooves {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.18);
}

.vinyl-center {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #9D3F36;
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #f7f1e6;
}

.music-player-widget.is-playing .vinyl-disc {
  animation: spinVinyl 10s linear infinite;
}

@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.music-info {
  display: flex;
  flex-direction: column;
}

.music-status-tag {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--postal-red);
}

.music-track-name {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #221c18;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.music-btn {
  background: #f0e6d6;
  border: 1px solid #baa285;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #382c23;
  transition: all 0.15s;
}

.music-btn:hover {
  background: #9D3F36;
  color: #fff;
  border-color: #9D3F36;
}

/* Music Invite Banner */
.music-invite-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 98;
  background: #faf4e8;
  background-image: url("assets/paper-grain.jpg");
  border: 1px dashed #9D3F36;
  border-radius: 30px;
  padding: 8px 18px;
  box-shadow: 0 8px 24px rgba(45, 30, 15, 0.14);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: #2b221c;
  animation: gentlePulse 2.8s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}

.music-invite-banner button {
  background: #9D3F36;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  transition: background 0.2s;
}

.music-invite-banner button:hover {
  background: #7E322B;
}

.music-invite-banner .dismiss-btn {
  background: none;
  color: #8c7159;
  padding: 2px 6px;
  font-size: 12px;
}

/* —— Layout & Container —— */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 20px 140px;
  position: relative;
  z-index: 1;
}

.site-header {
  text-align: center;
  margin-bottom: 28px;
}

.header-stamp {
  display: inline-block;
  margin-bottom: 8px;
}

.postal-mark {
  display: inline-block;
  border: 2px solid var(--postal-red);
  color: var(--postal-red);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 3px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  transform: rotate(-1.5deg);
  background: rgba(247, 241, 230, 0.7);
}

.site-title {
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-size: 2.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.1;
  text-shadow: 1px 2px 0 rgba(255, 255, 255, 0.6);
}

.site-tagline {
  margin: 0 auto;
  max-width: 540px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.builder-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 920px) {
  .builder-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(380px, 1.05fr);
    gap: 32px 42px;
    align-items: start;
  }

  section.panel.panel--parcel {
    position: sticky;
    top: 24px;
    margin-bottom: 0;
  }
}

/* —— Panels —— */
section.panel {
  position: relative;
  background-color: var(--card);
  background-image:
    linear-gradient(165deg, rgba(255, 252, 245, 0.72), transparent 48%),
    url("assets/paper-grain.jpg");
  background-size: auto, cover;
  background-position: center;
  border: 1px solid var(--border);
  border-radius: 22px 18px 24px 20px;
  padding: 24px 22px 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-soft);
  transform: rotate(-0.3deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

section.panel:hover {
  box-shadow: var(--shadow-deep);
}

section.panel.panel--parcel {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  transform: none;
}

section.panel.panel--parcel:hover {
  box-shadow: none !important;
  transform: none;
}

/* Shipping Label Container */
.parcel-label {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 10px 22px rgba(70, 50, 30, 0.16));
  transform: rotate(-0.8deg);
  user-select: none;
}

/* Sleek Theme & Wax Seal Tray */
.parcel-customizer-tray {
  background: rgba(253, 249, 242, 0.85);
  backdrop-filter: blur(8px);
  border: 1px dashed #c4b099;
  border-radius: 12px;
  padding: 14px 16px;
  max-width: 480px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(45, 30, 15, 0.07);
}

.parcel-label__bg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  pointer-events: none;
}

.parcel-label__fields {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.parcel-label__fields .field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.parcel-label__to {
  position: absolute;
  top: 22%;
  left: 17%;
  right: 28%;
  height: 20%;
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.parcel-label__from {
  position: absolute;
  top: 54%;
  left: 23%;
  right: 8%;
  height: 20%;
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.parcel-label__fields input[type="text"] {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 2px 4px;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #1a1715;
  width: 100%;
  line-height: 1.2;
}

.parcel-label__fields input[type="text"]:focus {
  outline: none;
  border-bottom: none;
  box-shadow: none;
  background: transparent;
}

/* Parcel Customizer (Themes & Wax Seals) */
.parcel-customizer {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(120, 95, 70, 0.18);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customizer-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.customizer-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #5c432d;
  text-transform: uppercase;
}

.theme-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: #f0e7d8;
  border: 1px solid #c9b49b;
  border-radius: 20px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #2b221c;
  transition: all 0.2s;
}

.chip:hover,
.chip.active {
  background: var(--postal-red);
  color: #fff;
  border-color: var(--postal-red);
  transform: translateY(-1px);
}

.seal-chips {
  display: flex;
  gap: 8px;
}

.seal-btn {
  background: #edd8c4;
  border: 1.5px solid #ab8261;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.seal-btn:hover,
.seal-btn.active {
  background: #9D3F36;
  border-color: #6d241d;
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(157, 63, 54, 0.35);
}

/* Mini 3D Box Preview */
.mini-box-preview-container {
  text-align: center;
  margin-top: 10px;
}

.mini-preview-caption {
  font-size: 0.68rem;
  font-weight: 700;
  color: #5c432d;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}

.mini-box-wrap {
  position: relative;
  display: inline-block;
  width: 230px;
  max-width: 100%;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mini-box-wrap:hover {
  transform: scale(1.04) rotate(1deg);
}

.mini-box-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(45, 30, 15, 0.18);
  display: block;
}

.mini-box-seal {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #9D3F36;
  border: 2px solid #5a1914;
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.mini-box-tag {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: #fbf6ec;
  border: 1px dashed #8c6847;
  font-family: var(--font-script);
  font-size: 1.15rem;
  font-weight: 600;
  color: #221c18;
  padding: 2px 10px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sample-fill-btn {
  margin-top: 14px;
  background: #f2e9db;
  border: 1px dashed #9D3F36;
  color: #9D3F36;
  border-radius: 20px;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.2s;
}

.sample-fill-btn:hover {
  background: #9D3F36;
  color: #fff;
}

/* —— Receipts (Things to Tuck & Share) —— */
section.panel.panel--receipt {
  --receipt-paper: #f5f1e8;
  --receipt-ink: #1a1a1a;
  width: 100%;
  font-family: var(--font-mono);
  color: var(--receipt-ink);
  background-color: var(--receipt-paper);
  background-image:
    linear-gradient(180deg, rgba(245, 241, 232, 0.65), rgba(240, 234, 222, 0.5)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.03)),
    url("assets/receipt-paper.webp");
  background-size: auto, auto, cover;
  background-position: center;
  background-repeat: no-repeat;
  border: none;
  border-radius: 0;
  padding: 28px 28px 36px;
  margin-bottom: 28px;
  transform: rotate(0.4deg);
  box-shadow: 1px 8px 20px rgba(40, 30, 20, 0.16);
  position: relative;
}

section.panel.panel--share {
  transform: rotate(-0.45deg);
}

.receipt-head {
  text-align: center;
  margin-bottom: 8px;
}

.receipt-store {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--receipt-ink);
}

.receipt-addr {
  margin: 4px 0 8px;
  font-size: 0.64rem;
  color: rgba(26, 26, 26, 0.65);
}

.section-stamp {
  margin: 8px 0 4px;
}

.section-stamp img {
  max-width: 220px;
  height: auto;
  display: inline-block;
}

.receipt-meta {
  margin: 6px 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--receipt-ink);
}

.receipt-rule {
  height: 0;
  border: none;
  border-top: 1px dashed rgba(26, 26, 26, 0.45);
  margin: 10px 0;
}

.receipt-rule--double {
  border-top: none;
  height: 5px;
  background:
    linear-gradient(to right, rgba(26, 26, 26, 0.55) 0, rgba(26, 26, 26, 0.55) 100%) top / 100% 1px no-repeat,
    linear-gradient(to right, rgba(26, 26, 26, 0.55) 0, rgba(26, 26, 26, 0.55) 100%) bottom / 100% 1px no-repeat;
  margin: 12px 0;
}

.receipt-cols {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(26, 26, 26, 0.7);
  padding: 0 4px;
}

/* Category Filter Tabs */
.goodie-category-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cat-tab {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: #2b221c;
  white-space: nowrap;
  transition: all 0.2s;
}

.cat-tab.active,
.cat-tab:hover {
  background: #1a1a1a;
  color: #fff;
}

/* Type Grid (Goodie Chooser - Big Images, Small Mono Text, Red Marker Circle on Hover) */
.type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 10px;
  margin: 14px 0 16px;
}

.type-btn {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #1a1a1a;
  cursor: pointer;
  position: relative;
  transition: opacity 0.15s;
}

.type-btn:hover {
  background: transparent;
  border: none;
  transform: none;
  box-shadow: none;
}

.type-btn:active {
  transform: scale(0.97);
}

.type-icon {
  position: relative;
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
}

.type-icon img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
}

.marker-circle {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 132%;
  height: 132%;
  pointer-events: none;
  background: url("assets/marker-circle.webp") center / contain no-repeat;
  transform: translate(-50%, -50%) rotate(-6deg) scale(0.88);
  opacity: 0;
  mix-blend-mode: multiply;
  transition:
    opacity 0.18s ease,
    transform 0.38s cubic-bezier(0.22, 0.9, 0.3, 1);
}

.type-btn:hover .marker-circle,
.type-btn:focus-visible .marker-circle {
  opacity: 0.95;
  transform: translate(-50%, -50%) rotate(-6deg) scale(1.04);
}

.type-btn:nth-child(3n+2) .marker-circle {
  transform: translate(-50%, -50%) rotate(10deg) scale(0.88);
}

.type-btn:nth-child(3n+2):hover .marker-circle,
.type-btn:nth-child(3n+2):focus-visible .marker-circle {
  opacity: 0.95;
  transform: translate(-50%, -50%) rotate(10deg) scale(1.04);
}

.type-btn:nth-child(3n) .marker-circle {
  transform: translate(-50%, -50%) rotate(-16deg) scale(0.88) scaleX(1.04);
}

.type-btn:nth-child(3n):hover .marker-circle,
.type-btn:nth-child(3n):focus-visible .marker-circle {
  opacity: 0.95;
  transform: translate(-50%, -50%) rotate(-16deg) scale(1.04) scaleX(1.04);
}

.type-badge-new {
  position: absolute;
  top: -2px;
  right: 6px;
  z-index: 4;
  background: #9D3F36;
  color: #fff;
  font-size: 8px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Added Item List */
.item-list {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.empty-cart-msg {
  font-size: 0.74rem;
  color: rgba(26, 26, 26, 0.5);
  font-style: italic;
  text-align: center;
  padding: 16px 8px;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 6px 10px;
  animation: itemPopIn 0.3s ease;
}

@keyframes itemPopIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.item-row img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 4px;
}

.item-row .meta {
  flex: 1;
  min-width: 0;
}

.item-row .t {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1a1a1a;
}

.item-row .s {
  font-size: 0.66rem;
  color: rgba(26, 26, 26, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.small.danger {
  background: #fde8e8;
  border: 1px solid #f29898;
  color: #b82c2c;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 700;
  transition: all 0.15s;
}

.small.danger:hover {
  background: #b82c2c;
  color: #fff;
}

/* Receipt Foot */
.receipt-foot {
  text-align: center;
  margin-top: 14px;
}

.receipt-barcode {
  width: 170px;
  height: 32px;
  margin: 0 auto 6px;
  background: repeating-linear-gradient(
    90deg,
    #1a1a1a 0px,
    #1a1a1a 2px,
    transparent 2px,
    transparent 4px,
    #1a1a1a 4px,
    #1a1a1a 5px,
    transparent 5px,
    transparent 8px
  );
  opacity: 0.85;
}

.receipt-thanks {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.receipt-bye {
  margin: 3px 0 0;
  font-size: 0.64rem;
  color: rgba(26, 26, 26, 0.65);
}

/* Share & Checkout Receipt */
.share-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.primary-btn {
  background: #9D3F36;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(157, 63, 54, 0.3);
  transition: all 0.2s;
}

.primary-btn:hover {
  background: #7E322B;
  transform: translateY(-1px);
}

.secondary-btn {
  background: #f1e7d8;
  border: 1.5px solid #baa285;
  color: #2b221c;
  border-radius: 8px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.2s;
}

.secondary-btn:hover {
  background: #e2d2be;
}

.link-box {
  display: none;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 1px dashed #baa285;
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0;
}

.link-input-row {
  display: flex;
  gap: 6px;
}

.link-input-row input {
  flex: 1;
  border: 1px solid #d1baa3;
  border-radius: 6px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  background: #faf6ee;
}

.copied-msg {
  display: none;
  font-size: 0.72rem;
  color: #3b7c3d;
  font-weight: 700;
}

.quick-share-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.quick-share-btn {
  flex: 1;
  background: #f7f1e6;
  border: 1px solid #d4c0ab;
  border-radius: 6px;
  padding: 6px 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #2c221a;
  transition: all 0.15s;
}

.quick-share-btn:hover {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.error-msg {
  display: none;
  background: #fae1e1;
  color: #9c2727;
  border: 1px solid #f2a8a8;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.74rem;
  margin: 8px 0;
}

/* Footer Hint */
.hint {
  text-align: center;
  font-size: 0.74rem;
  color: var(--ink-soft);
  margin-top: 24px;
  line-height: 1.5;
}

.hint-credit {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

/* —— RECIPIENT VIEW / UNBOXING STAGE —— */
#recipientView {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 72px;
  position: relative;
  z-index: 10;
}

.recipient-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 960px;
  width: 100%;
  margin: 0 auto 16px;
}

.edit-pkg-btn,
.music-pill-btn {
  background: #f7f1e6;
  border: 1px solid #baa285;
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: #2b221c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s;
}

.edit-pkg-btn:hover,
.music-pill-btn:hover {
  background: #1a1a1a;
  color: #fff;
}

.stage {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.box-screen {
  text-align: center;
  padding: 20px 0 60px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.box-screen.hidden {
  display: none;
  opacity: 0;
}

.vintage-postmark {
  margin-bottom: 12px;
  display: inline-block;
  opacity: 0.75;
}

.postmark-circle {
  border: 2px dashed #9D3F36;
  color: #9D3F36;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 4px 16px;
  border-radius: 20px;
  transform: rotate(-3deg);
}

.postmark-lines {
  color: #9D3F36;
  letter-spacing: 0.2em;
  font-size: 10px;
}

.pkg-title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  margin: 8px 0 24px;
  color: var(--ink);
  letter-spacing: 0.02em;
}

/* 3D Box Scene & Shake Animation */
.box-scene {
  position: relative;
  display: inline-block;
  max-width: 380px;
  width: 90%;
  margin: 0 auto;
}

.box-photo-btn {
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  outline: none;
}

.box-container {
  position: relative;
  width: 100%;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.box-container:hover {
  transform: scale(1.03) translateY(-4px);
}

#boxImg {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 24px 54px rgba(45, 30, 15, 0.25), 0 6px 18px rgba(45, 30, 15, 0.14);
}

.box-wax-seal {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #9D3F36;
  border: 3px solid #6b1f1a;
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  z-index: 4;
}

.box-label {
  position: absolute;
  bottom: 12%;
  left: 14%;
  right: 14%;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18));
}

.box-label__bg {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.box-label__fields {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.box-label__to {
  position: absolute;
  top: 20%;
  left: 17%;
  right: 28%;
  height: 24%;
  display: flex;
  align-items: center;
  font-family: var(--font-script);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: #1a1715;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.box-label__from {
  position: absolute;
  top: 52%;
  left: 23%;
  right: 8%;
  height: 24%;
  display: flex;
  align-items: center;
  font-family: var(--font-script);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: #1a1715;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Shake Animation */
.box-scene.is-shaking {
  animation: boxShake 0.85s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes boxShake {
  10%, 90% { transform: translate3d(-2px, 0, 0) rotate(-1deg); }
  20%, 80% { transform: translate3d(4px, 0, 0) rotate(2deg); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0) rotate(-3deg); }
  40%, 60% { transform: translate3d(6px, 0, 0) rotate(3deg); }
}

.tap-pill {
  display: inline-block;
  background: #f7f1e6;
  border: 1px solid #baa285;
  border-radius: 30px;
  padding: 8px 24px;
  margin-top: 24px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #2b221c;
  box-shadow: 0 4px 14px rgba(45, 30, 15, 0.12);
  animation: pulsePill 2s ease-in-out infinite;
}

@keyframes pulsePill {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.tap-pulse {
  color: #9D3F36;
}

.pkg-from {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--ink-soft);
  margin-top: 14px;
}

/* —— OPEN SCREEN (Unboxed Floating Goodies) —— */
.open-screen {
  display: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.open-screen.visible {
  display: block;
  opacity: 1;
}

.open-header {
  text-align: center;
  margin-bottom: 24px;
}

.pkg-title--stamp img {
  max-width: 320px;
  width: 90%;
  height: auto;
}

.pkg-msg {
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* Floating Goodies Field */
#floatyHost {
  position: relative;
  width: 100%;
  min-height: 480px;
  margin: 20px 0 40px;
}

.floaty {
  position: absolute;
  transform: rotate(var(--float-rot, 0deg));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.floaty:hover {
  transform: rotate(0deg) scale(1.16) !important;
  z-index: 99 !important;
  filter: drop-shadow(0 14px 28px rgba(45, 30, 15, 0.26));
}

.floaty button {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  outline: none;
}

.floaty img {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(45, 30, 15, 0.16));
}

.fl-label {
  background: #faf6ee;
  border: 1px solid #d4c0ab;
  border-radius: 14px;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  color: #2b221c;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Polaroid Photo Floaty */
.floaty--polaroid .polaroid {
  background: #fffdfa;
  padding: 8px 8px 24px 8px;
  border-radius: 3px;
  box-shadow: var(--shadow-polaroid);
  position: relative;
}

.floaty--polaroid .polaroid::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 30%;
  width: 40%;
  height: 14px;
  background: rgba(240, 225, 200, 0.75);
  border: 1px dashed rgba(180, 150, 120, 0.5);
  transform: rotate(-2deg);
}

.floaty--polaroid img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 2px;
}

/* Floaty Animations */
@keyframes fl0 { 0%, 100% { transform: rotate(var(--float-rot, 0deg)) translateY(0); } 50% { transform: rotate(var(--float-rot, 0deg)) translateY(-8px); } }
@keyframes fl1 { 0%, 100% { transform: rotate(var(--float-rot, 0deg)) translateY(0); } 50% { transform: rotate(var(--float-rot, 0deg)) translateY(-12px); } }
@keyframes fl2 { 0%, 100% { transform: rotate(var(--float-rot, 0deg)) translateY(0); } 50% { transform: rotate(var(--float-rot, 0deg)) translateY(-6px); } }
@keyframes fl3 { 0%, 100% { transform: rotate(var(--float-rot, 0deg)) translateY(0); } 50% { transform: rotate(var(--float-rot, 0deg)) translateY(-10px); } }
@keyframes fl4 { 0%, 100% { transform: rotate(var(--float-rot, 0deg)) translateY(0); } 50% { transform: rotate(var(--float-rot, 0deg)) translateY(-7px); } }
@keyframes fl5 { 0%, 100% { transform: rotate(var(--float-rot, 0deg)) translateY(0); } 50% { transform: rotate(var(--float-rot, 0deg)) translateY(-11px); } }

/* Recipient Action Bar */
.recipient-action-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}

.hug-back-btn {
  background: #9D3F36;
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 28px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(157, 63, 54, 0.35);
  transition: all 0.2s;
}

.hug-back-btn:hover {
  background: #7E322B;
  transform: scale(1.05);
}

/* —— MODALS —— */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 22, 16, 0.68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.visible {
  display: flex;
  animation: fadeIn 0.25s ease;
}

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

.modal-card {
  --ink: #221c18 !important;
  --ink-soft: #5c432d !important;
  color: #221c18 !important;
  background: #faf6ee;
  background-image:
    linear-gradient(165deg, rgba(255, 252, 245, 0.8), transparent),
    url("assets/paper-grain.jpg");
  border: 1px solid #baa285;
  border-radius: 18px;
  padding: 38px 24px 28px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: cardPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-card label,
.modal-card span,
.modal-card p,
.modal-card h1,
.modal-card h2,
.modal-card h3,
.modal-card h4,
.modal-card li,
.modal-card input,
.modal-card textarea,
.modal-card select {
  color: #221c18 !important;
}

@keyframes cardPop {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 100;
  background: #f4ece0;
  border: 1.5px solid #a89379;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #382c23;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: #9D3F36;
  color: #fff;
  border-color: #7a221a;
  transform: scale(1.08);
}

.modal-card label.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #382c23 !important;
  text-transform: uppercase;
  margin: 12px 0 6px;
}

/* Vintage Aesthetic File Upload Dropzone */
.vintage-file-dropzone {
  position: relative;
  background: #fdfaf4;
  border: 2px dashed #baa285;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  margin: 8px 0 14px;
}

.vintage-file-dropzone:hover,
.vintage-file-dropzone.dragover {
  border-color: #9D3F36;
  background: #fff6ee;
  transform: translateY(-1px);
}

.vintage-file-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.dropzone-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 2px;
}

.dropzone-btn {
  display: inline-block;
  background: #f0e7d8;
  border: 1px solid #baa285;
  border-radius: 6px;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: #2b221c;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.dropzone-sub {
  font-size: 0.72rem;
  color: #776a5e;
  margin-top: 2px;
}

.polaroid-upload-preview {
  position: relative;
  display: inline-block;
  background: #fff;
  padding: 10px 10px 24px;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  transform: rotate(-1.5deg);
  margin-top: 10px;
}

.polaroid-upload-preview img {
  max-width: 160px;
  max-height: 160px;
  display: block;
  border-radius: 2px;
}

.polaroid-tape-tab {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 16px;
  background: rgba(220, 190, 140, 0.65);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Modal Form Specifics */
.item-form-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #221c18;
  border-bottom: 1px dashed #c4b099;
  padding-bottom: 6px;
}

.item-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.item-form input[type="text"],
.item-form input[type="url"],
.item-form textarea,
.item-form select {
  width: 100%;
  background: #fffdfa;
  border: 1px solid #d4c0ab;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #1a1715;
  outline: none;
}

.item-form textarea {
  min-height: 90px;
  resize: vertical;
}

.item-form input:focus,
.item-form textarea:focus {
  border-color: #9D3F36;
  box-shadow: 0 0 0 2px rgba(157, 63, 54, 0.15);
}

.row-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.row-buttons button {
  flex: 1;
}

/* —— GOODIE VIEWER COMPONENTS —— */

/* 1. Interactive Scratch-off Card */
.scratch-card-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 0;
}

.scratch-header {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #9D3F36;
  margin-bottom: 4px;
}

.scratch-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0 0 14px;
}

.scratch-stage-wrapper {
  position: relative;
  width: 280px;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(45, 30, 15, 0.2);
  margin-bottom: 12px;
}

.scratch-secret-content {
  position: absolute;
  inset: 0;
  background: #faf2dc;
  background-image: radial-gradient(#d4af37 1px, transparent 1px);
  background-size: 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 2px dashed #ab8b2e;
  border-radius: 12px;
}

.scratch-secret-text {
  font-family: var(--font-typewriter);
  font-size: 1.15rem;
  color: #782923;
  font-weight: 700;
  line-height: 1.35;
}

.scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.scratch-hint {
  font-size: 0.74rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* 2. Interactive Fortune Cookie */
.fortune-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 0;
}

.fortune-cookie-container {
  width: 180px;
  height: 140px;
  position: relative;
  cursor: pointer;
  margin-bottom: 16px;
  transition: transform 0.2s;
}

.fortune-cookie-container:hover {
  transform: scale(1.08);
}

.fortune-cookie-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.fortune-cookie-container.is-cracked .fortune-cookie-img {
  transform: scale(0.9) rotate(-15deg);
  opacity: 0.3;
}

.fortune-slip {
  background: #fffdfa;
  border: 1px solid #d4c0ab;
  padding: 14px 22px;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  max-width: 340px;
  font-family: var(--font-typewriter);
  font-size: 1.05rem;
  color: #9D3F36;
  line-height: 1.4;
  margin-top: 10px;
  transform: rotate(-1deg);
  animation: slipSlideOut 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slipSlideOut {
  from { transform: scale(0.6) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0) rotate(-1deg); opacity: 1; }
}

/* 3. Vintage Cassette Mixtape */
.cassette-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cassette-body {
  width: 320px;
  height: 200px;
  background: #2b2520;
  border: 3px solid #171311;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  margin-bottom: 16px;
}

.cassette-sticker {
  background: #fbf6ec;
  border-radius: 8px;
  height: 100%;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cassette-label-title {
  font-family: var(--font-script);
  font-size: 1.45rem;
  color: #9D3F36;
  margin: 0;
}

.cassette-spools-window {
  background: #1f1b18;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 30px;
  position: relative;
}

.cassette-spool {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #faf4e8;
  border: 4px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.cassette-viewer.is-playing .cassette-spool {
  animation: spinSpool 2.4s linear infinite;
}

@keyframes spinSpool {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 4. Flower Bouquet Viewer */
.bouquet-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.bouquet-illustration {
  width: 160px;
  height: auto;
  margin-bottom: 14px;
}

.bouquet-stems-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
}

.flower-tag {
  background: #f0e6d6;
  border: 1px solid #baa285;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 0.76rem;
  color: #2b221c;
}

/* 5. Handwritten / Typewriter Note */
.note-parchment {
  background: #fffcf5;
  border: 1px solid #dcd1be;
  border-radius: 6px;
  padding: 24px 20px;
  font-family: var(--font-typewriter);
  font-size: 1.1rem;
  line-height: 1.55;
  color: #26201b;
  box-shadow: 0 4px 14px rgba(45, 30, 15, 0.08);
  position: relative;
}

.note-parchment::before {
  content: "";
  position: absolute;
  top: 0;
  left: 36px;
  bottom: 0;
  width: 1px;
  background: rgba(180, 70, 70, 0.25);
}

/* 6. Redeemable Coupon Ticket */
.coupon-ticket-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.coupon-ticket-box {
  background: #faf4e6;
  border: 2px dashed #9D3F36;
  border-radius: 10px;
  padding: 20px 24px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.coupon-header {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #9D3F36;
  text-transform: uppercase;
}

.coupon-prize {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 8px 0;
}

.coupon-stamp-btn {
  margin-top: 14px;
  background: #9D3F36;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
}

/* 7. Canvas Doodle Pad */
.draw-pad {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.draw-canvas {
  width: 100%;
  height: 260px;
  background: #fffaf4;
  border: 1px solid #baa285;
  border-radius: 8px;
  touch-action: none;
  cursor: crosshair;
}

.draw-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.draw-colors {
  display: flex;
  gap: 6px;
}

.draw-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  outline: none;
}

.draw-swatch.active {
  transform: scale(1.2);
  border-color: #1a1a1a;
}

/* Confetti Canvas */
#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .site-title {
    font-size: 2.1rem;
  }

  .wrap {
    padding: 24px 14px 80px;
  }

  section.panel.panel--receipt {
    padding: 20px 16px 28px;
  }

  .music-player-widget {
    bottom: 12px;
    right: 12px;
    padding: 6px 12px 6px 8px;
  }

  .music-track-name {
    max-width: 100px;
  }
}

/* —— Payment Checkout Modal —— */
.modal-card--payment {
  max-width: 480px;
}

.payment-modal-head {
  text-align: center;
  margin-bottom: 16px;
}

.payment-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 6px 0 4px;
}

.payment-subtitle {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.4;
}

.order-summary-box {
  background: #fffdfa;
  border: 1px dashed #baa285;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.order-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2b221c;
}

.order-subline {
  font-size: 0.72rem;
  font-weight: 400;
  color: #777;
  margin-top: 2px;
}

.order-total {
  font-size: 0.95rem;
  color: #9D3F36;
}

.payment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.payment-pill-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.pay-tab {
  flex: 1;
  background: #f0e6d6;
  border: 1px solid #baa285;
  border-radius: 6px;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #2b221c;
  transition: all 0.2s;
}

.pay-tab.active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.pay-submit-btn {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
  margin-top: 6px;
}

.payment-security-note {
  font-size: 0.68rem;
  color: #888;
  text-align: center;
  margin: 4px 0 0;
}

/* —— Share Success Modal (Payment Received) —— */
.modal-card--share-success {
  max-width: 460px;
  text-align: center;
}

.share-success-eyebrow {
  display: inline-block;
  background: #e6f3e6;
  color: #276c29;
  border: 1px solid #99cf9b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.share-success-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 4px 0 8px;
}

.share-success-copy {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0 0 16px;
}

.share-success-link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.share-success-link-row input {
  flex: 1;
  background: #fff;
  border: 1.5px solid #9D3F36;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #111;
}

.share-success-copied {
  font-size: 0.76rem;
  color: #276c29;
  font-weight: 700;
  margin: 4px 0 0;
}

/* —— Database Settings Trigger & Modal —— */
.db-config-trigger {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-soft);
  text-decoration: underline;
  margin-top: 8px;
  cursor: pointer;
}

.db-status-badge {
  background: #f0f7ec;
  border: 1px solid #c2e0b6;
  color: #3b6b27;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  margin: 6px 0;
}

/* —— Trust Badges —— */
.receipt-trust-badges {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(244, 238, 226, 0.65);
  border: 1px dashed #cfbcaa;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 12px 0 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #4a3c2f;
  text-align: center;
}

/* —— Footer Legal Links —— */
.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 10px 0 6px;
}

.legal-link-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--postal-red);
  text-decoration: underline;
  cursor: pointer;
  padding: 2px 4px;
  transition: opacity 0.15s ease;
}

.legal-link-btn:hover {
  opacity: 0.75;
}

.footer-subtext {
  font-size: 0.74rem;
  color: #705e4d;
  margin-top: 6px;
}

/* —— Legal & Support Modal Styling —— */
.legal-modal-card {
  max-width: 600px !important;
  max-height: 82vh;
  overflow-y: auto;
  padding: 32px 26px 24px !important;
}

.legal-content {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: #2b221a !important;
  margin-top: 14px;
  text-align: left;
}

.legal-content h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #221c18 !important;
  margin: 16px 0 4px;
  border-bottom: 1px dashed #d5c3af;
  padding-bottom: 2px;
}

.legal-content p {
  margin: 0 0 10px;
  color: #382c23 !important;
}

.legal-content strong {
  color: #1a1410 !important;
}

.legal-content a {
  color: #9D3F36;
  text-decoration: underline;
}
