/* ==========================================================================
   COMEDIC CODY — "PAPER" WIDGETS
   Floating / overlay widgets: merch early-access "Vault" ticket (.ea-*),
   birthday banner + popup (.bd-*), cart sidebar (.cart-*), product modal
   (.pdp-*), sticky ticket bar (.sticky-ticket-bar / .stb-*), chatbot
   (.chatbot-*, .chat-*, .quick-repl*, .rodney-*), confetti + easter eggs.

   Markup, ids, classes and JS-toggled states are the legacy ones (ported
   unchanged into assets/paper/app.js). Layout, z-index and open/close
   transitions are kept from the old site; only the look moved to the paper
   system. Colors and fonts come from the --pp-* tokens in base.css.
   ========================================================================== */

/* ---------- shared: red brush buttons (same look as .pp-btn) ---------- */
.cart-checkout-btn, .pdp-add-cart, .ea-submit, .bd-submit {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  width: 100%; min-height: 54px; padding: 1em 1.4em 1.04em; border: 0; border-radius: 0; background: none;
  font-family: var(--pp-f-body); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .03em;
  font-size: 16px; line-height: 1; color: #fff; white-space: nowrap; cursor: pointer;
  filter: var(--pp-drop-1); transition: transform .35s var(--pp-ease), filter .35s var(--pp-ease);
}
.cart-checkout-btn::before, .pdp-add-cart::before, .ea-submit::before, .bd-submit::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--pp-red); clip-path: var(--pp-brush-a); transition: background .25s;
}
.cart-checkout-btn:hover, .pdp-add-cart:hover, .ea-submit:hover, .bd-submit:hover:not(:disabled) { transform: translateY(-2px) rotate(-.6deg); filter: var(--pp-drop-2); }
.cart-checkout-btn:hover::before, .pdp-add-cart:hover::before, .ea-submit:hover::before, .bd-submit:hover::before { background: var(--pp-red-deep); }
.cart-checkout-btn:active, .pdp-add-cart:active, .ea-submit:active, .bd-submit:active { transform: translateY(1px) scale(.985); }

/* ==========================================================================
   CART SIDEBAR
   ========================================================================== */
.cart-overlay { position: fixed; inset: 0; background: rgba(20,20,20,.5); z-index: 9995; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 92vw; z-index: 9996;
  background: var(--pp-paper-hi) url(../../images/paper/paper.webp); background-size: 420px;
  border-left: 2px solid var(--pp-ink); color: var(--pp-ink-soft); font-family: var(--pp-f-body); font-size: 15px; line-height: 1.5;
  transform: translateX(100%); visibility: hidden; transition: transform .5s cubic-bezier(.16,1,.3,1), visibility .5s;
  display: flex; flex-direction: column;
}
.cart-sidebar.open { transform: translateX(0); visibility: visible; box-shadow: -14px 0 0 rgba(20,20,20,.12); }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 16px; border-bottom: 2px solid var(--pp-ink); }
.cart-header h3 { font-family: var(--pp-f-display); font-size: 34px; font-weight: 400; line-height: 1; text-transform: uppercase; color: var(--pp-ink); display: flex; align-items: center; gap: 12px; }
.cart-header-count { font-family: var(--pp-f-body); font-size: 12px; line-height: 1; color: #fff; background: var(--pp-red); padding: 5px 10px; border-radius: 50px; font-weight: 800; }
.cart-close { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--pp-ink); background: var(--pp-paper-hi); display: flex; align-items: center; justify-content: center; color: var(--pp-ink); font-size: 24px; line-height: 1; transition: background .2s, color .2s, transform .35s var(--pp-ease); }
.cart-close:hover { background: var(--pp-ink); color: #fff; transform: rotate(90deg); }
/* Free shipping progress */
.cart-shipping-bar { padding: 12px 24px 14px; background: var(--pp-kraft) url(../../images/paper/kraft.webp); background-size: 200px; border-bottom: 1px solid var(--pp-line); }
.cart-shipping-text { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pp-ink-soft); margin-bottom: 8px; text-align: center; }
.cart-shipping-text b { color: var(--pp-red); font-weight: 900; }
.cart-shipping-track { width: 100%; height: 6px; background: rgba(20,20,20,.14); border-radius: 6px; overflow: hidden; }
.cart-shipping-fill { height: 100%; background: var(--pp-red); border-radius: 6px; transition: width .6s cubic-bezier(.16,1,.3,1); width: 0%; }
.cart-shipping-bar.complete .cart-shipping-text { color: var(--pp-red); }
.cart-shipping-bar.complete .cart-shipping-fill { background: var(--pp-red); }
/* Cody reaction note */
.cart-cody-reaction { padding: 14px 24px 0; display: none; }
.cart-cody-reaction.show { display: block; animation: cartReactionIn .5s cubic-bezier(.16,1,.3,1); }
.cart-cody-bubble { background: var(--pp-kraft); border-radius: 14px 14px 14px 3px; padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--pp-ink); line-height: 1.45; rotate: -.6deg; box-shadow: var(--pp-shadow-1); }
.cart-cody-bubble::before { content: 'Cody says: '; font-family: var(--pp-f-marker); font-weight: 400; color: var(--pp-red); }
@keyframes cartReactionIn { from { opacity: 0; transform: translateY(8px) scale(.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
/* Cart items */
.cart-items { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 24px 16px; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--pp-ink-soft); }
.cart-empty-icon { font-size: 48px; line-height: 1; margin-bottom: 14px; opacity: .55; filter: grayscale(1); }
.cart-empty p { font-family: var(--pp-f-marker); font-size: 19px; line-height: 1.35; color: var(--pp-ink); rotate: -2deg; }
.cart-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--pp-line); animation: cartItemIn .4s cubic-bezier(.16,1,.3,1); }
@keyframes cartItemIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
.cart-item-image { width: 76px; height: 76px; max-width: none; flex-shrink: 0; object-fit: cover; background: var(--pp-kraft); border: 4px solid var(--pp-paper-hi); border-radius: 0; box-shadow: var(--pp-shadow-1); rotate: -2deg; }
.cart-item:nth-child(even) .cart-item-image { rotate: 1.5deg; }
.cart-item-details { flex: 1; min-width: 0; }
.cart-item-name { font-size: 15px; font-weight: 800; line-height: 1.25; color: var(--pp-ink); margin-bottom: 2px; }
.cart-item-meta { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--pp-ink-faint); margin-bottom: 8px; }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; }
.cart-item-price { font-family: var(--pp-f-display); font-size: 22px; line-height: 1; color: var(--pp-ink); }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-item-qty button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--pp-ink); color: var(--pp-ink); font-size: 16px; font-weight: 800; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s; background: var(--pp-paper-hi); cursor: pointer; }
.cart-item-qty button:hover { background: var(--pp-ink); color: #fff; }
.cart-item-qty span { font-size: 15px; font-weight: 800; color: var(--pp-ink); min-width: 18px; text-align: center; }
.cart-item-remove { display: inline-block; margin-top: 6px; padding: 4px 0; font-size: 12px; font-weight: 700; color: var(--pp-ink-faint); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; transition: color .2s; }
.cart-item-remove:hover { color: var(--pp-red); }
/* Cart footer */
.cart-footer { padding: 18px 24px calc(22px + env(safe-area-inset-bottom, 0px)); border-top: 2px solid var(--pp-ink); background: var(--pp-paper-hi); }
.cart-summary-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 14px; }
.cart-summary-row .label { color: var(--pp-ink-soft); font-weight: 600; }
.cart-summary-row .value { font-weight: 800; color: var(--pp-ink); }
.cart-summary-row.shipping .value { color: var(--pp-ink-soft); font-size: 13px; }
.cart-summary-row.shipping .value.free { color: var(--pp-red); font-weight: 900; text-transform: uppercase; }
.cart-summary-divider { height: 1px; background: var(--pp-line); margin: 10px 0; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.cart-total-label { font-size: 12px; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; color: var(--pp-ink); }
.cart-total-price { font-family: var(--pp-f-display); font-size: 40px; line-height: 1; color: var(--pp-red); }
.cart-savings { text-align: center; font-size: 10px; font-weight: 800; letter-spacing: .2em; color: var(--pp-ink-faint); margin-top: 12px; text-transform: uppercase; }
.cart-savings:empty { display: none; }
/* Add to cart pop animation (badge itself is styled with the nav) */
@keyframes cartPop { 0% { transform: scale(1); } 30% { transform: scale(1.25); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
.cart-badge-pop { animation: cartPop .5s cubic-bezier(.16,1,.3,1); }
/* Flying item animation */
.cart-fly-item { position: fixed; z-index: 99999; pointer-events: none; width: 50px; height: 50px; max-width: none; object-fit: cover; border: 3px solid var(--pp-paper-hi); border-radius: 0; box-shadow: var(--pp-shadow-2); transition: all .7s cubic-bezier(.2,1,.3,1); opacity: 1; }
.cart-fly-item.fly { opacity: 0; transform: scale(.3) rotate(18deg); }
.cart-total-price, .pdp-product-price, .cart-item-price { font-feature-settings: "tnum" 1; }

/* ==========================================================================
   CHATBOT — a paper notepad / text thread
   ========================================================================== */
.chatbot-trigger {
  position: fixed; bottom: 28px; right: 28px; z-index: 9990; width: 64px; height: 64px; padding: 0; border-radius: 50%;
  background: var(--pp-paper-hi); border: 3px solid var(--pp-paper-hi); color: var(--pp-ink);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--pp-shadow-2), 0 0 0 1.5px var(--pp-ink);
  rotate: -4deg; transition: transform .3s var(--pp-ease-back), box-shadow .3s;
}
.chatbot-trigger::before { /* strip of tape holding the photo down */
  content: ''; position: absolute; z-index: 3; left: 50%; top: -9px; width: 44px; height: 17px; translate: -50% 0; rotate: 5deg;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 40%), var(--pp-tape); clip-path: var(--pp-tape-a); pointer-events: none;
}
.chatbot-trigger:hover { transform: scale(1.08) rotate(4deg); box-shadow: var(--pp-shadow-3), 0 0 0 1.5px var(--pp-ink); }
.chatbot-trigger img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: top; border-radius: 50%; background: var(--pp-kraft); }
.chatbot-trigger svg { width: 32px; height: 32px; }
.chatbot-trigger.hidden { display: none; }
.chat-online-dot { position: absolute; bottom: -1px; right: -1px; width: 16px; height: 16px; border-radius: 50%; background: var(--pp-red); border: 3px solid var(--pp-paper-hi); z-index: 2; }
.chat-online-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--pp-red); opacity: 0; animation: chatDotPing 2.6s ease-out infinite; }
@keyframes chatDotPing { 0% { transform: scale(.7); opacity: .7; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
.chatbot-tooltip {
  position: fixed; bottom: 104px; right: 20px; z-index: 9989; background: var(--pp-paper-hi); border: 2px solid var(--pp-ink); border-radius: 3px;
  padding: 9px 14px 8px; font-family: var(--pp-f-marker); font-size: 15px; font-weight: 400; line-height: 1.2; color: var(--pp-ink);
  width: max-content; max-width: min(320px, calc(100vw - 28px)); text-wrap: balance;
  box-shadow: 3px 3px 0 rgba(20,20,20,.14); rotate: -2deg; pointer-events: none;
  /* shows 22s after landing, hangs around for a few seconds, then leaves by itself */
  opacity: 0; visibility: hidden; animation: tooltipShow 9s ease 22s both;
}
/* app.js (chatNudge) adds .is-nudge to replay it once with the nudge copy */
.chatbot-tooltip.is-nudge { animation: tooltipNudge 9s ease both; }
.chatbot-tooltip::after { content: ''; position: absolute; bottom: -8px; right: 26px; width: 13px; height: 13px; background: var(--pp-paper-hi); border-right: 2px solid var(--pp-ink); border-bottom: 2px solid var(--pp-ink); transform: rotate(45deg); }
.chatbot-trigger.hidden ~ .chatbot-tooltip { display: none; }
@keyframes tooltipShow {
  0% { opacity: 0; visibility: visible; transform: translateY(8px); }
  6% { opacity: 1; transform: translateY(0); }
  28%, 72% { transform: translateY(-4px); }
  50% { transform: translateY(0); }
  93% { opacity: 1; visibility: visible; transform: translateY(0); }
  100% { opacity: 0; visibility: hidden; transform: translateY(8px); }
}
@keyframes tooltipNudge {
  0% { opacity: 0; visibility: visible; transform: translateY(8px); }
  6% { opacity: 1; transform: translateY(0); }
  28%, 72% { transform: translateY(-4px); }
  50% { transform: translateY(0); }
  93% { opacity: 1; visibility: visible; transform: translateY(0); }
  100% { opacity: 0; visibility: hidden; transform: translateY(8px); }
}
@keyframes chatBounce { 0%,20%,50%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-8px); } 60% { transform: translateY(-4px); } }

.chatbot-panel {
  position: fixed; bottom: 100px; right: 28px; width: 380px; max-width: calc(100vw - 56px); height: 520px; max-height: calc(100vh - 140px); z-index: 9991;
  background: var(--pp-paper-hi) url(../../images/paper/paper.webp); background-size: 420px;
  border: 2px solid var(--pp-ink); border-radius: 4px; color: var(--pp-ink-soft); font-family: var(--pp-f-body); font-size: 15px; line-height: 1.5;
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(20px) scale(.95); opacity: 0; visibility: hidden; transition: transform .4s cubic-bezier(.16,1,.3,1), opacity .3s, visibility .3s;
  box-shadow: 7px 7px 0 rgba(20,20,20,.16), var(--pp-shadow-3);
}
.chatbot-panel.open { transform: translateY(0) scale(1); opacity: 1; visibility: visible; }
.chatbot-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 16px; background: var(--pp-red); color: #fff; border-bottom: 2px solid var(--pp-ink); transition: background .3s; }
.chatbot-header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chatbot-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--pp-kraft); overflow: hidden; position: relative; border: 3px solid var(--pp-paper-hi); box-shadow: 0 2px 5px rgba(20,20,20,.3); rotate: -4deg; flex-shrink: 0; }
.chatbot-avatar img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: top; transition: opacity .4s ease; }
.chatbot-avatar .avatar-rodney { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.chatbot-panel.rodney-active .chatbot-avatar img:first-child { opacity: 0; }
.chatbot-panel.rodney-active .chatbot-avatar .avatar-rodney { opacity: 1; }
.chatbot-header-info { min-width: 0; }
.chatbot-header-info h4 { font-family: var(--pp-f-display); font-size: 26px; font-weight: 400; line-height: 1; letter-spacing: .01em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.chatbot-header-info p { margin-top: 3px; font-size: 11px; font-weight: 700; line-height: 1.2; color: rgba(255,255,255,.88); }
.chatbot-header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.chatbot-close-btn, .chatbot-expand-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(255,255,255,.14); transition: background .2s, transform .3s cubic-bezier(.175,.885,.32,1.275); }
.chatbot-close-btn:hover { background: rgba(255,255,255,.28); transform: rotate(90deg) scale(1.08); }
.chatbot-expand-btn:hover { background: rgba(255,255,255,.28); transform: scale(1.08); }
.chatbot-close-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; fill: none; }
.chatbot-expand-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.chatbot-panel.open .chatbot-close-btn svg line { stroke-dasharray: 20; stroke-dashoffset: 20; }
.chatbot-panel.open .chatbot-close-btn svg line:first-child { animation: closeXDraw .4s cubic-bezier(.4,0,.2,1) .3s forwards; }
.chatbot-panel.open .chatbot-close-btn svg line:last-child { animation: closeXDraw .4s cubic-bezier(.4,0,.2,1) .45s forwards; }
@keyframes closeXDraw { to { stroke-dashoffset: 0; } }
.chatbot-panel.expanded .chatbot-expand-btn svg { transform: rotate(180deg); }
.chatbot-panel.expanded { transition: all .4s cubic-bezier(.16,1,.3,1); }

.chatbot-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 85%; padding: 11px 15px; border-radius: 16px; font-size: 14.5px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; animation: msgIn .3s cubic-bezier(.16,1,.3,1); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg.bot { align-self: flex-start; background: var(--pp-kraft); border-bottom-left-radius: 4px; color: var(--pp-ink); }
.chat-msg.user { align-self: flex-end; background: var(--pp-red); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg a { color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.typing-indicator { align-self: flex-start; background: var(--pp-kraft); border-radius: 16px; border-bottom-left-radius: 4px; padding: 14px 18px; display: flex; gap: 5px; }
.typing-indicator span { width: 7px; height: 7px; border-radius: 50%; background: var(--pp-ink); animation: typingDot 1.4s ease-in-out infinite; }
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes typingDot { 0%,60%,100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-6px); opacity: 1; } }
/* Message reactions */
.chat-reactions { display: flex; gap: 4px; margin-top: 8px; }
.chat-reaction-btn { min-height: 28px; padding: 2px 9px; border-radius: 50px; border: 1.5px solid var(--pp-line); background: var(--pp-paper-hi); font-size: 13px; line-height: 1; cursor: pointer; transition: border-color .2s, transform .2s; display: flex; align-items: center; gap: 4px; }
.chat-reaction-btn:hover { border-color: var(--pp-ink); transform: scale(1.1); }
.chat-reaction-btn.reacted { border-color: var(--pp-red); background: var(--pp-paper-hi); }
.chat-reaction-btn .count { font-size: 11px; font-weight: 800; color: var(--pp-ink-faint); }
.chat-reaction-btn .count:empty { display: none; }
.chat-reaction-btn.reacted .count { color: var(--pp-red); }
@keyframes reactionPop { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }

.quick-replies { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 18px 12px; }
.quick-reply { min-height: 34px; padding: 6px 11px; border-radius: 50px; border: 1.5px solid var(--pp-ink); background: var(--pp-paper-hi); color: var(--pp-ink); font-size: 11.5px; font-weight: 800; letter-spacing: .02em; cursor: pointer; transition: background .2s, color .2s, transform .3s var(--pp-ease); white-space: nowrap; }
.quick-reply:hover { background: var(--pp-ink); color: #fff; transform: translateY(-1px) rotate(-1deg); }

/* Chat XP bar & stats */
.chat-xp-bar { display: flex; align-items: center; gap: 8px; padding: 4px 18px 10px; font-size: 10px; font-weight: 800; color: var(--pp-ink-faint); letter-spacing: .12em; text-transform: uppercase; }
.chat-xp-bar .xp-label { white-space: nowrap; color: var(--pp-ink); }
.chat-xp-bar .xp-track { flex: 1; height: 5px; background: rgba(20,20,20,.12); border-radius: 5px; overflow: hidden; }
.chat-xp-bar .xp-fill { height: 100%; width: 0%; background: var(--pp-red); border-radius: 5px; transition: width .6s cubic-bezier(.16,1,.3,1); }
.chat-xp-bar .xp-level { color: var(--pp-red); white-space: nowrap; }
.chat-xp-levelup { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: var(--pp-f-display); font-size: 64px; line-height: 1; font-weight: 400; text-transform: uppercase; white-space: nowrap; color: var(--pp-red); -webkit-text-stroke: 8px var(--pp-paper-hi); paint-order: stroke fill; rotate: -6deg; pointer-events: none; opacity: 0; z-index: 10; }
.chat-xp-levelup.show { animation: levelUpPop 1.5s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes levelUpPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); } 40% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1); } }

/* Rodney mode banner + toggle */
.rodney-face { display: inline-block; width: 1em; height: 1em; vertical-align: middle; }
.rodney-banner { padding: 8px 14px; border-top: 1px solid var(--pp-line); }
.rodney-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 7px 14px; border-radius: 3px; border: 2px dashed var(--pp-ink); background: transparent; color: var(--pp-ink); cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.rodney-toggle:hover { background: var(--pp-kraft); }
.rodney-toggle.active { border-style: solid; background: var(--pp-ink); color: #fff; }
.rodney-icon { font-size: 21px; line-height: 1; }
.rodney-icon .rodney-face { width: 1.4rem; height: 1.4rem; }
.rodney-label { font-family: var(--pp-f-marker); font-size: 14px; font-weight: 400; letter-spacing: .03em; text-transform: uppercase; text-align: left; flex: 1; }
.rodney-switch { width: 40px; height: 22px; border-radius: 50px; background: var(--pp-paper-hi); border: 2px solid var(--pp-ink); position: relative; transition: background .25s, border-color .25s; flex-shrink: 0; }
.rodney-toggle.active .rodney-switch { background: var(--pp-red); border-color: #fff; }
.rodney-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pp-ink); position: absolute; top: 3px; left: 3px; transition: left .25s var(--pp-ease), background .25s; }
.rodney-toggle.active .rodney-dot { background: #fff; left: 21px; }
/* Rodney mode: the header flips to ink with a marker label */
.chatbot-panel.rodney-active .chatbot-header { background: var(--pp-ink); }
.chatbot-panel.rodney-active .chatbot-header-info h4::after { content: " (Rodney)"; font-family: var(--pp-f-marker); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--pp-kraft); display: inline-block; rotate: -4deg; margin-left: 5px; vertical-align: 3px; }
.chatbot-panel.rodney-active .chat-msg.bot, .chatbot-panel.rodney-active .typing-indicator { background: var(--pp-kraft-deep); }

.chatbot-input { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 2px solid var(--pp-ink); background: var(--pp-paper); }
.chatbot-input input { flex: 1; min-width: 0; min-height: 46px; padding: 10px 14px; border-radius: 3px; border: 2px solid var(--pp-ink); background: var(--pp-paper-hi); color: var(--pp-ink); font-family: var(--pp-f-body); font-size: 16px; font-weight: 600; outline: none; appearance: none; box-shadow: 3px 3px 0 rgba(20,20,20,.12); transition: border-color .2s, box-shadow .2s; }
.chatbot-input input::placeholder { color: var(--pp-ink-faint); font-weight: 500; }
.chatbot-input input:focus { border-color: var(--pp-red); box-shadow: 3px 3px 0 var(--pp-red); }
.chatbot-input button { width: 46px; height: 46px; border-radius: 50%; background: var(--pp-red); color: #fff; display: flex; align-items: center; justify-content: center; transition: background .2s, transform .3s var(--pp-ease-back); flex-shrink: 0; }
.chatbot-input button:hover { background: var(--pp-red-deep); transform: rotate(-12deg) scale(1.06); }
.chatbot-input button svg { width: 19px; height: 19px; fill: #fff; }

/* ==========================================================================
   PRODUCT DETAIL MODAL (PDP) — #pdpInner content is generated by JS
   ========================================================================== */
.pdp-overlay { position: fixed; inset: 0; background: rgba(20,20,20,.5); z-index: 9997; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.pdp-overlay.open { opacity: 1; visibility: visible; }
.pdp-modal { position: fixed; inset: 0; z-index: 9998; overflow-y: auto; overscroll-behavior: contain; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; font-family: var(--pp-f-body); color: var(--pp-ink-soft); }
.pdp-modal.open { opacity: 1; visibility: visible; }
.pdp-close { position: fixed; top: 24px; right: 32px; z-index: 9999; width: 48px; height: 48px; border-radius: 50%; background: var(--pp-paper-hi); border: 2px solid var(--pp-ink); color: var(--pp-ink); font-family: var(--pp-f-body); font-size: 26px; font-weight: 600; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 3px 3px 0 rgba(20,20,20,.2); transition: background .2s, color .2s, transform .35s var(--pp-ease); }
.pdp-close:hover { background: var(--pp-ink); color: #fff; transform: rotate(90deg); }
.pdp-inner { width: 100%; max-width: 1000px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; background: var(--pp-paper-hi) url(../../images/paper/paper.webp); background-size: 420px; border: 2px solid var(--pp-ink); border-radius: 4px; box-shadow: 10px 10px 0 rgba(20,20,20,.22), var(--pp-shadow-3); overflow: hidden; animation: pdpSlideUp .5s cubic-bezier(.16,1,.3,1) forwards; }
.pdp-inner:empty { display: none; }
@keyframes pdpSlideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* PDP Gallery (left column) */
.pdp-gallery { padding: 36px 0 32px 36px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.pdp-main-image { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--pp-kraft); border: 10px solid var(--pp-paper-hi); box-shadow: var(--pp-shadow-2); rotate: -1.2deg; }
.pdp-main-image img { width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .6s cubic-bezier(.16,1,.3,1), filter .6s; }
.pdp-main-image img.view-closeup { transform: scale(1.8); }
.pdp-main-image img.view-lifestyle { filter: sepia(.2) saturate(1.3) brightness(1.05) contrast(1.05); }
.pdp-thumbs { display: flex; gap: 12px; }
.pdp-thumb { position: relative; width: 76px; height: 76px; flex: none; overflow: hidden; background: var(--pp-kraft); border: 2px solid var(--pp-line); cursor: pointer; opacity: .65; transition: opacity .2s, transform .3s var(--pp-ease), border-color .2s, box-shadow .2s; }
.pdp-thumb.active { border-color: var(--pp-ink); opacity: 1; box-shadow: 3px 3px 0 var(--pp-red); }
.pdp-thumb:hover { opacity: 1; transform: translateY(-2px); }
.pdp-thumb img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.pdp-thumb.thumb-closeup img { transform: scale(1.8); }
.pdp-thumb.thumb-lifestyle img { filter: sepia(.2) saturate(1.3) brightness(1.05); }
/* label is a little paper strip across the bottom of the thumb */
.pdp-thumb-label { position: absolute; left: 0; right: 0; bottom: 0; display: block; text-align: center; padding: 3px 0 2px; background: var(--pp-paper-hi); font-size: 9px; font-weight: 800; line-height: 1.2; letter-spacing: .12em; text-transform: uppercase; color: var(--pp-ink-soft); }
.pdp-thumb.active .pdp-thumb-label { color: var(--pp-ink); }

/* PDP Details (right column) */
.pdp-details { padding: 40px 36px 40px 0; display: flex; flex-direction: column; min-width: 0; }
.pdp-badge { display: inline-block; padding: 6px 12px 5px; border-radius: 0; font-size: 11px; font-weight: 900; font-style: italic; line-height: 1; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; width: fit-content; rotate: -2deg; }
.pdp-badge.hot { background: var(--pp-red); color: #fff; }
.pdp-badge.new { background: var(--pp-ink); color: #fff; }
.pdp-badge.limited { background: var(--pp-kraft); border: 0; color: var(--pp-ink); }
.pdp-product-name { font-family: var(--pp-f-display); font-size: clamp(34px, 4vw, 48px); font-weight: 400; line-height: .96; text-transform: uppercase; color: var(--pp-ink); margin-bottom: 8px; }
.pdp-product-color { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--pp-ink-faint); margin-bottom: 12px; }
.pdp-product-price { font-family: var(--pp-f-display); font-size: 46px; font-weight: 400; line-height: 1; color: var(--pp-red); margin-bottom: 18px; }
.pdp-description { font-size: 15px; font-weight: 500; color: var(--pp-ink-soft); line-height: 1.65; margin-bottom: 18px; }
.pdp-details-list { list-style: none; padding: 0; margin: 0 0 24px; }
.pdp-details-list li { font-size: 13.5px; font-weight: 600; color: var(--pp-ink-soft); padding: 8px 0; border-bottom: 1px solid var(--pp-line); display: flex; align-items: center; gap: 10px; }
.pdp-details-list li::before { content: ''; width: 9px; height: 3px; border-radius: 2px; background: var(--pp-red); flex-shrink: 0; rotate: -20deg; }
.pdp-size-label { font-size: 11px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--pp-ink); margin-bottom: 10px; }
.pdp-sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pdp-size-btn { width: 46px; height: 46px; border-radius: 3px; border: 2px solid var(--pp-ink); background: var(--pp-paper-hi); color: var(--pp-ink); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 2px 2px 0 rgba(20,20,20,.12); transition: background .2s, color .2s, transform .2s, box-shadow .2s; }
.pdp-size-btn:hover { background: var(--pp-kraft); }
.pdp-size-btn.selected { background: var(--pp-ink); color: #fff; box-shadow: 3px 3px 0 var(--pp-red); transform: translate(-1px,-1px); }
.pdp-add-cart { margin-bottom: 20px; }
.pdp-add-cart.added::before { background: var(--pp-ink); }

/* PDP Share buttons */
.pdp-share { display: flex; gap: 8px; margin-bottom: 8px; }
.pdp-share-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 8px 14px; border-radius: 50px; border: 1.5px solid var(--pp-ink); background: var(--pp-paper-hi); color: var(--pp-ink); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s; }
.pdp-share-btn:hover { background: var(--pp-ink); color: #fff; }
.pdp-share-btn svg { width: 14px; height: 14px; fill: currentColor; }
#pdpCopyLink svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* PDP Copy toast */
.pdp-toast { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(20px); isolation: isolate; color: #fff; font-family: var(--pp-f-body); font-size: 14px; font-weight: 900; font-style: italic; line-height: 1; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; padding: 13px 24px; z-index: 99999; opacity: 0; filter: var(--pp-drop-2); transition: opacity .3s, transform .3s; pointer-events: none; }
.pdp-toast::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--pp-ink); clip-path: var(--pp-brush-b); }
.pdp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* PDP Related products */
.pdp-related { border-top: 2px solid var(--pp-ink); grid-column: 1 / -1; min-width: 0; padding: 24px 36px 32px; }
.pdp-related-title { font-family: var(--pp-f-marker); font-size: 20px; font-weight: 400; line-height: 1.1; color: var(--pp-ink); margin-bottom: 16px; rotate: -1deg; transform-origin: left; }
.pdp-related-grid { display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 12px; margin: -4px; }
.pdp-related-card { flex: 0 0 140px; cursor: pointer; background: var(--pp-paper-hi); padding: 6px 6px 0; box-shadow: var(--pp-shadow-1); transition: transform .35s var(--pp-ease), box-shadow .35s; }
.pdp-related-card:hover { transform: translateY(-4px) rotate(-1.5deg); box-shadow: var(--pp-shadow-2); }
.pdp-related-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--pp-kraft); }
.pdp-related-card-info { padding: 8px 4px 10px; }
.pdp-related-card-name { font-size: 12px; font-weight: 800; color: var(--pp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdp-related-card-price { font-family: var(--pp-f-display); font-size: 17px; line-height: 1.1; color: var(--pp-red); margin-top: 2px; }

@media (max-width: 768px) {
  .pdp-modal { padding: 20px 12px; align-items: flex-start; }
  .pdp-inner { grid-template-columns: minmax(0, 1fr); gap: 0; box-shadow: 5px 5px 0 rgba(20,20,20,.22), var(--pp-shadow-2); }
  .pdp-gallery { padding: 22px 22px 0; }
  .pdp-details { padding: 24px 20px 28px; }
  .pdp-close { top: 12px; right: 12px; width: 44px; height: 44px; font-size: 22px; }
  .pdp-related { padding: 20px 20px 22px; }
}
@media (max-width: 480px) {
  .pdp-product-name { font-size: 34px; }
  .pdp-product-price { font-size: 38px; }
  .pdp-share { flex-wrap: wrap; }
}

/* ==========================================================================
   STICKY MOBILE TICKET BAR — a red brush strip pinned to the bottom
   ========================================================================== */
.sticky-ticket-bar { display: none; }
@media (max-width: 768px) {
  /* Bottom row on phones: [ ticket bar ............ ] [chat photo]. Insets come from the dock vars (see THE DOCK). */
  .sticky-ticket-bar { position: fixed; left: var(--dock-l); right: calc(var(--dock-r) + 56px + 10px); bottom: calc(var(--dock-b) + 2px); z-index: 9989; isolation: isolate; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 9px 16px; color: #fff; font-family: var(--pp-f-body); font-weight: 900; font-style: italic; line-height: 1; text-transform: uppercase; text-decoration: none; filter: var(--pp-drop-2); transform: translateY(120px); opacity: 0; pointer-events: none; transition: transform .4s cubic-bezier(.16,1,.3,1), opacity .4s; -webkit-touch-callout: none; }
  .sticky-ticket-bar::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--pp-red); clip-path: var(--pp-brush-b); }
  .sticky-ticket-bar.visible { transform: translateY(0) rotate(-1deg); opacity: 1; pointer-events: auto; }
  .sticky-ticket-bar:active::before { background: var(--pp-red-deep); }
  .stb-icon { flex: none; font-style: normal; font-size: 17px; }
  /* two short lines: small label over the city + date (app.js fills .stb-k / .stb-v and steps .stb-v down if a long city needs it) */
  .stb-text { flex: 0 1 auto; min-width: 0; display: grid; gap: 4px; justify-items: start; text-align: left; overflow: hidden; padding-right: .12em; }
  .stb-k { font-size: 11px; letter-spacing: .14em; white-space: nowrap; opacity: .92; }
  .stb-v { font-size: 15px; letter-spacing: .02em; white-space: nowrap; max-width: 100%; }
  .stb-arrow { flex: none; color: #fff; font-style: normal; font-size: 18px; }
}
@media (max-width: 374px) { .stb-icon { display: none; } }

/* ==========================================================================
   CONFETTI & EASTER EGGS
   ========================================================================== */
.confetti-container { position: fixed; inset: 0; pointer-events: none; z-index: 99997; overflow: hidden; }
.confetti-piece { position: absolute; top: -20px; width: 10px; height: 10px; opacity: 0; animation: confettiFall 3s ease-out forwards; }
/* The script sets a legacy gold/burgundy inline background on every piece;
   these win over it so the confetti is red / ink / kraft paper scraps. */
.confetti-piece:nth-child(4n+1) { background: var(--pp-red) !important; }
.confetti-piece:nth-child(4n+2) { background: var(--pp-ink) !important; }
.confetti-piece:nth-child(4n+3) { background: var(--pp-kraft-deep) !important; }
.confetti-piece:nth-child(4n)   { background: var(--pp-red-deep) !important; }
.confetti-piece:nth-child(7n)   { background: var(--pp-paper-hi) !important; box-shadow: 0 0 0 1px var(--pp-line); }
@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg) scale(.5); }
}
/* The class lands on <body>, but the CONTENT shakes, not <body>: a transform on
   <body> would make it the containing block of every position:fixed element
   (nav, popups, the dock), which all jump to the top of the document for .6s. */
html.pp-shake { overflow-x: hidden; overflow-x: clip; }
.screen-shake > main, .screen-shake > footer { animation: shakeIt .6s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shakeIt {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}
/* "I SWEAH FO' GAWD!" — giant red words on a flash of paper */
.sweah-flash { position: fixed; inset: 0; z-index: 99996; pointer-events: none; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 4vw; background: rgba(251,250,247,.9) url(../../images/paper/paper.webp); background-size: 420px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.sweah-flash.active { opacity: 1; visibility: visible; }
.sweah-text { font-family: var(--pp-f-display); font-weight: 400; font-size: clamp(88px, 12.4vw, 250px); line-height: .88; text-transform: uppercase; text-align: center; color: var(--pp-red); white-space: nowrap; rotate: -4deg; animation: sweahPop .8s cubic-bezier(.34,1.56,.64,1); }
@keyframes sweahPop { 0% { transform: scale(0) rotate(-10deg); opacity: 0; } 50% { transform: scale(1.2) rotate(3deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@media (max-width: 700px) {
  /* phones: let it stack so the words stay giant */
  .sweah-text { white-space: normal; font-size: 27vw; max-width: 7.2em; }
}
@media (max-height: 500px) {
  /* landscape phone: one line, sized to the short side so it can't run off the screen */
  .sweah-text { white-space: nowrap; font-size: min(10.6vw, 44vh); max-width: none; }
}
/* Mama slap hand: parked just off the right edge and moved with a transform
   (not `right`), so it never adds scroll width and never animates layout. */
.mama-slap { position: fixed; z-index: 99997; pointer-events: none; font-size: 4rem; line-height: 1; right: 0; top: 50%; transform: translate(130%, -50%); visibility: hidden; transition: transform .15s cubic-bezier(.16,1,.3,1), visibility 0s .15s; }
.mama-slap.slap { transform: translate(calc(-50vw + 50%), -50%); visibility: visible; transition: transform .15s cubic-bezier(.16,1,.3,1), visibility 0s; }

/* ==========================================================================
   MERCH EARLY-ACCESS — re-open pill
   ========================================================================== */
.ea-reopen {
  position: fixed; left: 20px; top: auto; bottom: 22px; z-index: 9992;   /* bottom-left on every screen (Kyle, 2026-11-14) */
  display: inline-flex; align-items: center; gap: 0;
  height: 48px; padding: 0 13px; border: 2px solid var(--pp-ink); border-radius: 999px;
  background: var(--pp-red); color: #fff; cursor: pointer; overflow: hidden;
  box-shadow: 3px 3px 0 rgba(20,20,20,.22);
  transform: translateY(90px); opacity: 0; rotate: -3deg;
  transition: transform .5s var(--pp-ease-back), opacity .4s, gap .35s var(--pp-ease), padding .35s var(--pp-ease), background .2s;
}
.ea-reopen.show { transform: translateY(0); opacity: 1; }
.ea-reopen-ico { display: flex; flex: none; }
.ea-reopen-ico svg { width: 20px; height: 20px; }
/* Collapsed to a round tag by default; the label unfurls on hover */
.ea-reopen-txt {
  max-width: 0; opacity: 0; white-space: nowrap;
  font-family: var(--pp-f-body); font-size: 12px; font-weight: 900; font-style: italic;
  letter-spacing: .06em; text-transform: uppercase;
  transition: max-width .35s var(--pp-ease), opacity .3s;
}
@media (hover: hover) {
  /* (on touch a tap leaves :hover stuck, so the label would stay unfurled) */
  .ea-reopen:hover { gap: 8px; padding: 0 17px 0 14px; background: var(--pp-red-deep); }
  .ea-reopen:hover .ea-reopen-txt { max-width: 150px; opacity: 1; }
}
.ea-reopen:focus-visible { outline: 3px solid var(--pp-ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .ea-reopen, .ea-reopen.show { transition: opacity .3s; transform: none; }
}

/* ==========================================================================
   BIRTHDAY — site banner + popup (a paper party invite)
   ========================================================================== */
:root { --bd-banner-h: 42px; }
.bd-banner { position: fixed; top: 0; left: 0; right: 0; height: var(--bd-banner-h); z-index: 9995; display: flex; align-items: center; justify-content: center; gap: 10px; border: none; cursor: pointer; color: #fff; font-family: var(--pp-f-body); font-size: 13px; font-weight: 900; font-style: italic; line-height: 1; letter-spacing: .08em; text-transform: uppercase; background: var(--pp-red); border-bottom: 2px solid var(--pp-ink); overflow: hidden; }
.bd-banner:hover { background: var(--pp-red-deep); }
.bd-banner:hover .bd-banner-txt { text-decoration: underline; text-underline-offset: 3px; }
.bd-banner-cake { font-size: 17px; font-style: normal; animation: bdCakeBop 2.4s ease-in-out infinite; }
@keyframes bdCakeBop { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateY(-2px); } }
.bd-banner-arrow { color: #fff; font-size: 16px; font-style: normal; transition: transform .25s; }
.bd-banner:hover .bd-banner-arrow { transform: translateX(4px); }
.bd-banner[hidden] { display: none; }
.bd-banner-txt-s { display: none; }
/* When the banner is up, everything pinned to the top shifts down with it */
html.bd-banner-on #navbar { top: var(--bd-banner-h); }
@media (min-width: 900px) and (min-height: 501px) {

}
@media (max-width: 600px) {
  .bd-banner { font-size: 11.5px; letter-spacing: .05em; gap: 7px; padding: 0 8px; }
  .bd-banner-txt { display: none; }
  .bd-banner-txt-s { display: inline; }
}

.bd-overlay { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(20,20,20,.5); opacity: 0; visibility: hidden; transition: opacity .5s var(--pp-ease), visibility .5s; font-family: var(--pp-f-body); }
.bd-overlay.open { opacity: 1; visibility: visible; }
.bd-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bd-panel {
  position: relative; width: min(560px, 100%); max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: var(--pp-paper-hi) url(../../images/paper/paper.webp); background-size: 420px;
  border: 2px solid var(--pp-ink); border-radius: 4px; color: var(--pp-ink-soft);
  padding: clamp(40px, 6vw, 52px) clamp(20px, 5vw, 44px) clamp(26px, 4vw, 38px); text-align: center;
  box-shadow: 9px 9px 0 rgba(20,20,20,.3), var(--pp-shadow-3);
  transform: translateY(28px) scale(.96) rotate(-1.5deg); opacity: 0; transition: transform .6s var(--pp-ease-back), opacity .5s ease;
}
.bd-overlay.open .bd-panel { transform: none; opacity: 1; }
/* Pennant garland strung across the top */
.bd-garland { position: absolute; top: 6px; left: 20px; right: 20px; width: calc(100% - 40px); max-width: none; height: 40px; pointer-events: none; transform-origin: 50% 0; animation: bdSway 5.5s ease-in-out infinite; }
@keyframes bdSway { 0%,100% { transform: rotate(-.9deg); } 50% { transform: rotate(.9deg); } }
.bd-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--pp-ink); background: var(--pp-paper-hi); color: var(--pp-ink); cursor: pointer; border-radius: 50%; transition: background .2s, color .2s, transform .35s var(--pp-ease); }
.bd-close:hover { color: #fff; background: var(--pp-ink); transform: rotate(90deg); }

/* --- Animated cake --- */
.bd-cake-wrap { display: flex; justify-content: center; margin-bottom: 10px; }
.bd-cake-svg { width: clamp(118px, 28vw, 156px); height: auto; overflow: visible; animation: bdFloat 4.2s ease-in-out infinite; }
@keyframes bdFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
/* Each flame flickers on its own offset so they never move in lockstep */
.bd-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: bdFlicker .62s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes bdFlicker {
  from { transform: scale(.9, .88) rotate(-3.5deg); opacity: .9; }
  to   { transform: scale(1.06, 1.12) rotate(3.5deg); opacity: 1; }
}
.bd-glow { animation: bdGlowPulse 2.4s ease-in-out infinite; transform-origin: 60px 34px; }
@keyframes bdGlowPulse { 0%,100% { opacity: .75; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.06); } }
/* Blow-out: flames snuff, smoke rises once */
.bd-cake-svg.out .bd-flame { animation: bdSnuff .5s var(--pp-ease) forwards; animation-delay: var(--d); }
@keyframes bdSnuff {
  0% { transform: scale(1); opacity: 1; }
  45% { transform: scale(1.5, .5) translateX(6px); opacity: .85; }
  100% { transform: scale(.1, .05) translateX(14px); opacity: 0; }
}
.bd-cake-svg.out .bd-glow { animation: bdGlowOut .7s ease forwards; }
@keyframes bdGlowOut { to { opacity: 0; transform: scale(.6); } }
.bd-smoke path { fill: none; stroke: var(--pp-ink-faint); stroke-width: 1.6; stroke-linecap: round; opacity: 0; }
.bd-cake-svg.out .bd-smoke path { animation: bdSmoke 1.9s ease-out forwards; animation-delay: calc(var(--d) + .32s); }
@keyframes bdSmoke {
  0% { opacity: 0; transform: translateY(2px) scale(.7); }
  25% { opacity: .65; }
  100% { opacity: 0; transform: translateY(-26px) scale(1.25); }
}

.bd-eyebrow { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 9px; font-family: var(--pp-f-body); font-size: 12px; font-weight: 900; font-style: italic; line-height: 1; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 16px; padding: 9px 18px; rotate: -2deg; filter: var(--pp-drop-1); }
.bd-eyebrow::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--pp-red); clip-path: var(--pp-brush-a); }
.bd-headline { font-family: var(--pp-f-display); font-weight: 400; font-size: clamp(46px, 11.5vw, 76px); line-height: .9; text-transform: uppercase; color: var(--pp-ink); margin-bottom: 16px; }
.bd-headline em { font-style: normal; color: var(--pp-red); }
/* Word-by-word reveal on open */
.bd-reveal .bd-w { display: inline-block; opacity: 0; transform: translateY(18px) rotate(2deg); animation: bdWordIn .62s var(--pp-ease) forwards; animation-delay: calc(var(--i) * .07s + .15s); }
@keyframes bdWordIn { to { opacity: 1; transform: none; } }
.bd-copy { color: var(--pp-ink-soft); font-size: 15.5px; font-weight: 500; line-height: 1.6; margin-bottom: 22px; max-width: 42ch; margin-inline: auto; }

.bd-field { width: 100%; min-height: 50px; background: var(--pp-paper-hi); border: 2px solid var(--pp-ink); border-radius: 3px; padding: 12px 14px; color: var(--pp-ink); font-family: var(--pp-f-body); font-size: 16px; font-weight: 600; appearance: none; box-shadow: 3px 3px 0 rgba(20,20,20,.12); transition: border-color .2s, box-shadow .2s; }
.bd-field:focus { outline: none; border-color: var(--pp-red); box-shadow: 3px 3px 0 var(--pp-red); }
.bd-field::placeholder { color: var(--pp-ink-faint); font-weight: 500; }
textarea.bd-field { min-height: 104px; resize: vertical; line-height: 1.55; }
.bd-row { display: flex; gap: 10px; margin-top: 14px; }
.bd-row .bd-field { flex: 1; min-width: 0; }
.bd-count { font-size: 12px; font-weight: 700; color: var(--pp-ink-faint); text-align: right; margin-top: 6px; }
.bd-count.over { color: var(--pp-red); }
.bd-submit { margin-top: 16px; }
.bd-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.bd-tally { margin-top: 18px; font-family: var(--pp-f-marker); font-size: 15px; line-height: 1.3; color: var(--pp-ink); }
.bd-tally:empty { display: none; }
.bd-tally b { color: var(--pp-red); font-weight: 400; }
.bd-error { margin-top: 12px; color: var(--pp-red); font-size: 14px; font-weight: 700; min-height: 1.2em; }

/* Stages */
.bd-stage { display: none; }
.bd-stage.active { display: block; animation: bdIn .5s var(--pp-ease) both; }
@keyframes bdIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.bd-sent-mark { font-size: 54px; line-height: 1; margin-bottom: 10px; animation: bdPop .6s var(--pp-ease-back) both; }
@keyframes bdPop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.bd-secondary { margin-top: 6px; min-height: 48px; background: var(--pp-paper-hi); border: 2px solid var(--pp-ink); color: var(--pp-ink); padding: 12px 24px; border-radius: 50px; font-family: var(--pp-f-body); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: background .25s, color .25s; width: 100%; }
.bd-secondary:hover { background: var(--pp-ink); color: #fff; }

@media (max-width: 600px) {
  .bd-overlay { padding: 12px; }
  .bd-panel { box-shadow: 5px 5px 0 rgba(20,20,20,.3), var(--pp-shadow-2); }
  .bd-row { flex-direction: column; }
}
/* --- Card picker: three prints laid on the table --- */
.bd-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 4px; }
.bd-theme { position: relative; border: 0; border-radius: 0; background: var(--pp-paper-hi); padding: 7px 7px 9px; cursor: pointer; box-shadow: var(--pp-shadow-2); transition: transform .35s var(--pp-ease), box-shadow .35s; text-align: center; }
.bd-theme:nth-child(1) { rotate: -2.5deg; } .bd-theme:nth-child(2) { rotate: 1deg; } .bd-theme:nth-child(3) { rotate: 2.5deg; }
.bd-theme:hover, .bd-theme:focus-visible { transform: translateY(-6px) scale(1.03); box-shadow: var(--pp-shadow-3); z-index: 1; }
.bd-theme canvas { width: 100%; height: auto; border-radius: 0; display: block; }
.bd-theme-label { display: block; margin-top: 8px; font-family: var(--pp-f-body); font-size: 10px; font-weight: 800; line-height: 1.25; letter-spacing: .12em; text-transform: uppercase; color: var(--pp-ink); }
.bd-theme:hover .bd-theme-label { color: var(--pp-red); }
/* Cards cascade in */
.bd-stage.active .bd-theme { opacity: 0; animation: bdCardIn .6s var(--pp-ease-back) forwards; }
.bd-stage.active .bd-theme:nth-child(1) { animation-delay: .25s; }
.bd-stage.active .bd-theme:nth-child(2) { animation-delay: .37s; }
.bd-stage.active .bd-theme:nth-child(3) { animation-delay: .49s; }
@keyframes bdCardIn { from { opacity: 0; transform: translateY(26px) rotate(3deg) scale(.92); } to { opacity: 1; transform: none; } }

/* --- Compose --- */
.bd-panel.composing .bd-cake-wrap { display: none; } /* card needs the room */
.bd-compose-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.bd-back { background: none; border: none; min-height: 40px; color: var(--pp-ink); font-family: var(--pp-f-body); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--pp-red); cursor: pointer; padding: 8px 0; transition: color .2s; }
.bd-back:hover { color: var(--pp-red); }
.bd-modes { display: inline-flex; background: var(--pp-paper-hi); border: 2px solid var(--pp-ink); border-radius: 50px; padding: 3px; }
.bd-mode { border: none; background: transparent; color: var(--pp-ink-soft); font-family: var(--pp-f-body); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; min-height: 34px; padding: 7px 14px; border-radius: 50px; cursor: pointer; transition: background .2s, color .2s; }
.bd-mode.active { background: var(--pp-ink); color: #fff; }

.bd-card { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 3px; overflow: hidden; box-shadow: var(--pp-shadow-2), 0 0 0 1px var(--pp-line); transform-style: preserve-3d; }
.bd-stage.active .bd-card { animation: bdCardOpen .7s var(--pp-ease) both; }
@keyframes bdCardOpen { from { opacity: 0; transform: perspective(900px) rotateX(14deg) translateY(20px); } to { opacity: 1; transform: none; } }
.bd-card-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bd-card-area { position: absolute; left: 8%; right: 8%; top: 30%; bottom: 9%; }
/* font-size / color / caret-color are set inline by the script to match the chosen card */
.bd-ink { position: absolute; inset: 0; width: 100%; height: 100%; background: transparent; border: none; resize: none; font-family: 'Caveat', var(--pp-f-marker); font-weight: 700; line-height: 1.3; padding: 0; overflow: hidden; }
.bd-ink:focus { outline: none; }
.bd-draw { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; pointer-events: none; }
.bd-card.draw-mode .bd-ink { pointer-events: none; }
.bd-card.draw-mode .bd-draw { pointer-events: auto; cursor: crosshair; }

.bd-tools { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.bd-tools-hint { flex: 1; text-align: left; font-family: var(--pp-f-marker); font-size: 14px; line-height: 1.2; color: var(--pp-ink); }
.bd-tool { min-height: 36px; background: var(--pp-paper-hi); border: 1.5px solid var(--pp-ink); color: var(--pp-ink); font-family: var(--pp-f-body); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 7px 14px; border-radius: 50px; cursor: pointer; transition: background .2s, color .2s; }
.bd-tool:hover { background: var(--pp-ink); color: #fff; }
.bd-card-final { width: min(100%, 380px); border: 8px solid var(--pp-paper-hi); border-radius: 0; margin: 6px auto 18px; display: block; box-shadow: var(--pp-shadow-2); rotate: -2deg; animation: bdCardIn .7s var(--pp-ease-back) both; }
.bd-card-final:not([src]) { display: none; }

@media (max-width: 600px) {
  .bd-themes { gap: 9px; }
  .bd-theme { padding: 5px 5px 7px; }
  .bd-theme-label { font-size: 9px; letter-spacing: .06em; }
}
@media (prefers-reduced-motion: reduce) {
  .bd-cake-svg, .bd-flame, .bd-glow { animation: none !important; }
  .bd-panel { transition: opacity .2s; transform: none; }
  .bd-stage.active, .bd-sent-mark { animation: none; }
  .bd-reveal .bd-w { opacity: 1; transform: none; animation: none; }
  .bd-cake-svg.out .bd-flame { animation: none; opacity: 0; }
  .bd-cake-svg.out .bd-smoke path { animation: none; }
  .bd-stage.active .bd-theme, .bd-stage.active .bd-card, .bd-card-final { animation: none; opacity: 1; transform: none; }
  .bd-garland { animation: none; }
  .bd-banner-cake { animation: none; }
}

/* ==========================================================================
   MERCH EARLY-ACCESS POPUP ("The Vault") — a printed scratch ticket.
   Left stub: kraft, taped photo, FIRST DIBS. Right: the ticket + the gate.
   Type scale is deliberate: nothing below 12px on phones for body copy, and
   inputs stay at 16px (anything smaller makes iOS Safari zoom on focus).
   ========================================================================== */
.ea-overlay { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(20,20,20,.5); opacity: 0; visibility: hidden; transition: opacity .5s var(--pp-ease), visibility .5s; font-family: var(--pp-f-body); }
.ea-overlay.open { opacity: 1; visibility: visible; }
.ea-panel {
  position: relative; width: min(1080px, 100%); max-height: min(94vh, 860px); display: grid; grid-template-columns: .56fr 1fr; grid-template-rows: minmax(0, 1fr);
  background: var(--pp-paper-hi) url(../../images/paper/paper.webp); background-size: 420px;
  border: 2px solid var(--pp-ink); border-radius: 4px; overflow: hidden; color: var(--pp-ink-soft);
  box-shadow: 12px 12px 0 rgba(20,20,20,.32), var(--pp-shadow-3);
  transform: translateY(30px) scale(.955) rotate(-1deg); opacity: 0; transition: transform .65s var(--pp-ease), opacity .45s ease;
}
.ea-overlay.open .ea-panel { transform: none; opacity: 1; }

/* --- Left stub --- */
.ea-visual { position: relative; overflow: hidden; container-type: inline-size; background: var(--pp-kraft) url(../../images/paper/kraft.webp); background-size: 200px; border-right: 2px dashed var(--pp-ink); }
/* the photo is a print taped to the stub */
.ea-visual img { position: absolute; left: 13%; top: 84px; width: 74%; height: calc(100% - 84px - 70cqw - 76px); min-height: 150px; max-width: none; object-fit: cover; object-position: center 16%; border: 9px solid var(--pp-paper-hi); border-bottom-width: 12px; background: var(--pp-paper-hi); box-shadow: var(--pp-shadow-2); transform: rotate(-9deg) scale(1.05); transition: transform 1.1s var(--pp-ease-back); }
.ea-overlay.open .ea-visual img { transform: rotate(-3deg); }
.ea-visual::before { content: ''; position: absolute; z-index: 3; left: 50%; top: 68px; width: 116px; height: 30px; translate: -50% 0; rotate: 3deg; background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 40%), var(--pp-tape); clip-path: var(--pp-tape-a); pointer-events: none; }
.ea-visual-tag { position: absolute; top: 20px; left: 20px; z-index: 4; isolation: isolate; display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; font-family: var(--pp-f-body); font-size: 12px; font-weight: 900; font-style: italic; line-height: 1; letter-spacing: .08em; text-transform: uppercase; color: #fff; rotate: -3deg; filter: var(--pp-drop-1); }
.ea-visual-tag::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--pp-ink); clip-path: var(--pp-brush-c); }
.ea-visual-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: eaPulse 2.2s infinite; }
@keyframes eaPulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.ea-visual-vert { position: absolute; bottom: 22px; left: 20px; right: 14px; z-index: 2; font-family: var(--pp-f-display); font-weight: 400; font-size: 39cqw; line-height: .9; letter-spacing: -.005em; text-transform: uppercase; color: var(--pp-red); }
.ea-visual-vert span { display: block; color: var(--pp-red); }
.ea-visual-sub { margin-top: 14px; font-family: var(--pp-f-marker); font-size: 17px; font-weight: 400; line-height: 1.15; letter-spacing: 0; text-transform: none; color: var(--pp-ink); rotate: -2deg; transform-origin: left; }

/* --- Right content panel --- */
.ea-body { position: relative; padding: 36px 44px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; text-align: left; min-width: 0; }
/* centred when there is room, but never clipped at the top when the content is taller than the panel */
.ea-body > .ea-stage.active { margin-block: auto; }
.ea-close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--pp-ink); background: var(--pp-paper-hi); color: var(--pp-ink); cursor: pointer; transition: background .2s, color .2s, transform .35s var(--pp-ease); }
.ea-close:hover { color: #fff; background: var(--pp-ink); transform: rotate(90deg); }
.ea-close svg { width: 18px; height: 18px; }
/* Reads as a live status badge — a red brush label */
.ea-eyebrow { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; font-family: var(--pp-f-body); font-size: 12.5px; font-weight: 900; font-style: italic; line-height: 1; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 12px; rotate: -2deg; filter: var(--pp-drop-1); }
.ea-eyebrow::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--pp-red); clip-path: var(--pp-brush-a); }
.ea-headline { font-family: var(--pp-f-display); font-weight: 400; font-size: clamp(2.6rem, 4.4vw, 3.6rem); line-height: .92; letter-spacing: 0; text-transform: uppercase; color: var(--pp-ink); margin-bottom: 12px; }
.ea-headline em { font-style: normal; color: var(--pp-red); }
.ea-copy { font-size: .95rem; font-weight: 500; line-height: 1.55; color: var(--pp-ink-soft); margin: 0 0 14px; max-width: 52ch; }
.ea-copy b { color: var(--pp-ink); font-weight: 800; }

/* --- Form --- */
.ea-form { display: grid; gap: 12px; }
.ea-hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.ea-row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ea-form input { width: 100%; padding: 14px 16px; background: var(--pp-paper-hi); border: 2px solid var(--pp-ink); border-radius: 3px; color: var(--pp-ink); font-family: var(--pp-f-body); font-size: 1rem; font-weight: 600; appearance: none; box-shadow: 3px 3px 0 rgba(20,20,20,.12); transition: border-color .2s, box-shadow .2s, transform .2s; }
.ea-form input::placeholder { color: var(--pp-ink-faint); font-weight: 500; }
.ea-form input:focus { outline: none; border-color: var(--pp-red); box-shadow: 4px 4px 0 var(--pp-red); transform: translate(-1px,-1px); }
.ea-form input:user-invalid { border-color: var(--pp-red); border-style: dashed; }
.ea-submit { margin-top: 6px; padding: 1.1em 1.4em; font-size: 1rem; }
.ea-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.ea-submit svg { width: 18px; height: 18px; flex: none; transition: transform .3s; }
.ea-submit:hover svg { transform: translateX(4px); }
.ea-note { margin-top: 12px; font-family: var(--pp-f-body); font-size: .78rem; font-weight: 500; line-height: 1.55; color: var(--pp-ink-faint); text-align: center; }
.ea-error { margin-top: 10px; font-size: .88rem; font-weight: 800; color: var(--pp-red); text-align: center; }
.ea-dismiss { display: block; margin: 14px auto 0; min-height: 32px; background: none; border: none; font-family: var(--pp-f-body); font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: var(--pp-ink-soft); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; transition: color .3s; }
.ea-dismiss:hover { color: var(--pp-red); }

/* --- Stages --- */
.ea-stage { display: none; }
.ea-stage.active { display: block; animation: eaStageIn .6s var(--pp-ease); }
@keyframes eaStageIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
#eaStageSeal, #eaStagePrize { text-align: center; }
.ea-seal-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.ea-seal-title { font-family: var(--pp-f-display); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3rem); line-height: .95; text-transform: uppercase; color: var(--pp-ink); }
.ea-seal-title em { font-style: normal; color: var(--pp-red); }
.ea-seal-copy { font-size: 1rem; line-height: 1.6; color: var(--pp-ink-soft); max-width: 36ch; margin: 0 auto; }

/* --- The scratch ticket: kraft card stock printed in red + ink, with a
       silver latex play panel (a different material from the card, which is
       what makes it read as something you scratch). --- */
.ea-ticket-wrap { padding: 8px 6px 4px; }
.ea-ticket { position: relative; width: 100%; border-radius: 6px; overflow: hidden; color: var(--pp-ink); -webkit-user-select: none; user-select: none;
  background:
    repeating-linear-gradient(58deg, rgba(20,20,20,.035) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(-58deg, rgba(20,20,20,.035) 0 1px, transparent 1px 6px),
    var(--pp-kraft) url(../../images/paper/kraft.webp);
  background-size: auto, auto, 200px;
  box-shadow: 0 0 0 2px var(--pp-ink) inset, var(--pp-shadow-2);
  transform: rotate(-3.2deg);
  transition: transform .75s var(--pp-ease-back), box-shadow .6s ease;
}
.ea-ticket.unlocked { transform: rotate(0deg) scale(1.03); box-shadow: 0 0 0 2px var(--pp-ink) inset, var(--pp-shadow-3); }
/* Torn-stub notches — punched through to the sheet behind */
.ea-ticket::before, .ea-ticket::after { content: ''; position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--pp-paper-hi); box-shadow: 0 0 0 2px var(--pp-ink) inset; transform: translateY(-50%); z-index: 3; }
.ea-ticket::before { left: -12px; }
.ea-ticket::after { right: -12px; }

.ea-ticket-band { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px 7px; background: var(--pp-red); color: #fff; border-bottom: 2px solid var(--pp-ink); }
.ea-ticket-burst { font-family: var(--pp-f-display); font-size: 1.15rem; line-height: 1; letter-spacing: .03em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.ea-ticket-issue { font-family: var(--pp-f-body); font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; text-align: right; }
.ea-ticket-body { padding: 12px 16px 10px; }

/* Printed promise — the big number */
.ea-ticket-hero { text-align: center; margin-bottom: 10px; }
.ea-hero-up { display: block; font-family: var(--pp-f-body); font-size: .68rem; font-weight: 800; letter-spacing: .26em; text-transform: uppercase; color: var(--pp-ink); }
.ea-hero-amt { display: block; font-family: var(--pp-f-display); font-size: clamp(3rem, 6.4vw, 4.1rem); line-height: .92; text-transform: uppercase; color: var(--pp-red); margin: 4px 0 4px; }
.ea-hero-sub { display: block; font-family: var(--pp-f-body); font-size: .76rem; font-weight: 700; color: var(--pp-ink-soft); }

.ea-scratch-area { position: relative; height: 108px; border-radius: 4px; overflow: hidden; background: var(--pp-paper-hi); box-shadow: 0 0 0 2px var(--pp-ink); }
.ea-scratch-under { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: var(--pp-paper-hi) url(../../images/paper/paper.webp); background-size: 300px; }
.ea-under-amt { font-family: var(--pp-f-display); font-size: clamp(2.6rem, 6.5vw, 3.3rem); line-height: .95; text-transform: uppercase; color: var(--pp-red); }
.ea-under-label { font-family: var(--pp-f-marker); font-size: .95rem; font-weight: 400; line-height: 1.1; color: var(--pp-ink); }
/* touch-action:none on the canvas ONLY (a finger scratches instead of scrolling). While the ticket is
   locked the canvas has pointer-events:none, so a drag that starts on the foil still scrolls the popup. */
.ea-scratch-canvas { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ea-scratch-canvas:active { cursor: grabbing; }
.ea-foil-sheen { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(105deg, transparent 36%, rgba(255,255,255,.5) 48%, rgba(255,255,255,.08) 56%, transparent 68%); background-size: 260% 100%; animation: eaSheen 3.6s ease-in-out infinite; }
@keyframes eaSheen { 0% { background-position: 130% 0; } 55%, 100% { background-position: -60% 0; } }
.ea-scratch-area.done .ea-foil-sheen { opacity: 0; transition: opacity .3s; }
.ea-scratch-area.done .ea-scratch-canvas { opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.ea-scratch-area.done .ea-under-amt { animation: eaPop .5s var(--pp-ease-back); }
@keyframes eaPop { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* Locked overlay — ink printed on the silver latex */
.ea-lock { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; padding: 0 16px; transition: opacity .5s ease, visibility .5s; }
.ea-lock svg { width: 24px; height: 24px; color: var(--pp-ink); }
.ea-lock-sub { font-family: var(--pp-f-body); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pp-ink); }
.ea-ticket.unlocked .ea-lock { opacity: 0; visibility: hidden; }
.ea-ticket.locked .ea-scratch-canvas { pointer-events: none; }

.ea-legend { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 11px; }
.ea-legend-label { font-family: var(--pp-f-body); font-size: .62rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--pp-ink-soft); }
.ea-legend-vals { display: flex; align-items: center; gap: 6px; font-family: var(--pp-f-body); font-size: .86rem; font-weight: 800; color: var(--pp-ink); }
.ea-legend-vals i { font-style: normal; color: var(--pp-ink-faint); }
.ea-legend-vals b.gold { color: var(--pp-red); font-weight: 900; }

.ea-ticket-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; padding-top: 10px; border-top: 2px dotted var(--pp-ink); }
/* Barcode printed on a white strip, like the real thing */
.ea-barcode-strip { display: inline-flex; align-items: center; padding: 3px 5px; background: var(--pp-paper-hi); border-radius: 1px; }
.ea-barcode { display: block; width: 104px; height: 21px; max-width: none; }
.ea-ticket-no { font-family: var(--pp-f-body); font-size: .72rem; font-weight: 800; letter-spacing: .14em; color: var(--pp-ink); }

.ea-odds-line { margin: 18px auto 0; max-width: 64ch; font-family: var(--pp-f-body); font-size: .84rem; font-weight: 500; line-height: 1.5; color: var(--pp-ink-soft); text-align: center; }
.ea-odds-line b { color: var(--pp-red); font-weight: 800; }
.ea-odds-line em { font-style: italic; font-weight: 700; color: var(--pp-ink); }

/* The gate — swapped out for the scratch prompt once they're on the list */
.ea-gate { margin-top: 16px; transition: opacity .4s ease; }
.ea-gate.hide { display: none; }
.ea-scratch-hint { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--pp-f-marker); font-size: 1.15rem; font-weight: 400; line-height: 1.1; color: var(--pp-red); animation: eaNudge 1.9s ease-in-out infinite; }
.ea-scratch-hint svg { width: 20px; height: 20px; flex: none; }
.ea-scratch-hint.hide, .ea-scratch-skip.hide { display: none; }
@keyframes eaNudge { 0%, 100% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }
.ea-scratch-skip { display: block; margin: 10px auto 0; min-height: 32px; background: none; border: none; font-family: var(--pp-f-body); font-size: .78rem; font-weight: 700; color: var(--pp-ink-soft); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; transition: color .3s; }
.ea-scratch-skip:hover { color: var(--pp-red); }

/* --- Stage 3: prize reveal — the winning stub --- */
.ea-prize { position: relative; padding: 34px 28px 26px; border: 2px solid var(--pp-ink); border-radius: 4px; background: var(--pp-kraft) url(../../images/paper/kraft.webp); background-size: 200px; box-shadow: 6px 6px 0 rgba(20,20,20,.16); color: var(--pp-ink); }
.ea-prize > * { position: relative; }
.ea-prize-tier { display: inline-block; font-family: var(--pp-f-body); font-size: .76rem; font-weight: 900; font-style: italic; letter-spacing: .16em; text-transform: uppercase; color: var(--pp-red); margin-bottom: 10px; }
.ea-prize-amt { font-family: var(--pp-f-display); font-weight: 400; font-size: clamp(4.6rem, 9.5vw, 6.6rem); line-height: .88; text-transform: uppercase; color: var(--pp-red); margin-bottom: 10px; }
.ea-prize-label { font-family: var(--pp-f-marker); font-size: 1.35rem; font-weight: 400; line-height: 1.1; color: var(--pp-ink); margin-bottom: 12px; }
.ea-prize-blurb { font-size: 1rem; font-weight: 500; line-height: 1.6; color: var(--pp-ink-soft); max-width: 38ch; margin: 0 auto 20px; }
.ea-prize-blurb:empty { display: none; }
.ea-code-row { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 16px; border: 2px dashed var(--pp-ink); border-radius: 3px; background: var(--pp-paper-hi); flex-wrap: wrap; }
.ea-code { font-family: var(--pp-f-display); font-size: 1.7rem; font-weight: 400; line-height: 1; letter-spacing: .06em; color: var(--pp-ink); user-select: all; }
.ea-copy-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 8px 14px; border: 0; border-radius: 50px; background: var(--pp-ink); color: #fff; font-family: var(--pp-f-body); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: background .2s, transform .2s; }
.ea-copy-btn:hover { background: var(--pp-red); }
.ea-copy-btn.copied { background: var(--pp-red); }
.ea-prize-foot { margin-top: 16px; font-family: var(--pp-f-body); font-size: .82rem; font-weight: 500; line-height: 1.55; color: var(--pp-ink-soft); }
.ea-prize-sign { margin-top: 10px; font-family: var(--pp-f-marker); font-size: 1.3rem; font-style: normal; line-height: 1; color: var(--pp-ink); rotate: -3deg; }
.ea-done { width: 100%; min-height: 50px; margin-top: 20px; padding: 14px; background: var(--pp-paper-hi); border: 2px solid var(--pp-ink); border-radius: 50px; color: var(--pp-ink); font-family: var(--pp-f-body); font-size: .85rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: background .25s, color .25s; }
.ea-done:hover { color: #fff; background: var(--pp-ink); }

/* --- Golden ticket variant: red frame + a rubber stamp --- */
.ea-prize.golden { border-color: var(--pp-red); box-shadow: 0 0 0 4px var(--pp-paper-hi) inset, 0 0 0 6px var(--pp-red) inset, 6px 6px 0 var(--pp-red); }
.ea-prize.golden { padding-top: 64px; }
.ea-prize.golden::after { content: '1 in 100'; position: absolute; top: 16px; left: 16px; font-family: var(--pp-f-display); font-size: 1.05rem; line-height: 1; letter-spacing: .05em; text-transform: uppercase; color: var(--pp-red); border: 3px solid var(--pp-red); border-radius: 6px; padding: .3em .55em .22em; rotate: -9deg; opacity: .9; mix-blend-mode: multiply; }
.ea-prize.golden .ea-prize-amt { animation: eaGoldPulse 2.4s ease-in-out infinite; }
@keyframes eaGoldPulse { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.05) rotate(-1.5deg); } }

/* --- Responsive --- */
@media (min-width: 901px) {
  /* Wide: headline on one line and name / email / phone on one row, so the
     Unlock button stays above the fold on a laptop. */
  .ea-headline br { display: none; }
  .ea-headline em { margin-left: .22em; }
  .ea-headline { font-size: clamp(2.3rem, 3.5vw, 3.15rem); padding-right: 44px; }
  .ea-form { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .ea-form > .ea-row-split { grid-column: 2; }
  .ea-form > .ea-submit, .ea-form > .ea-error, .ea-form > .ea-note { grid-column: 1 / -1; }
  .ea-form > .ea-note { margin-top: 2px; }
}
@media (min-width: 901px) {
  .ea-body { padding: 26px 44px 24px; }
  .ea-copy { margin-bottom: 8px; }
  .ea-hero-amt { font-size: 3.2rem; }
  .ea-ticket-hero { margin-bottom: 8px; }
  .ea-odds-line { margin-top: 14px; }
  .ea-gate { margin-top: 12px; }
  .ea-dismiss { margin-top: 6px; }
}
@media (max-width: 900px) {
  /* Drop the photo stub on phones — it ate the fold and pushed the Unlock
     button off-screen. The body becomes the whole modal. */
  .ea-visual { display: none; }
  .ea-panel { grid-template-columns: 1fr; max-height: calc(var(--vvh, 100vh) - 20px); box-shadow: 6px 6px 0 rgba(20,20,20,.32), var(--pp-shadow-2); }
  /* Body is the scroller: bounded height + scroll-from-top so the submit
     button is ALWAYS reachable (justify:center would clip a tall form). */
  .ea-body { padding: 24px 22px 28px; max-height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; min-height: 0; }
  .ea-headline { font-size: 2.6rem; margin-bottom: 10px; padding-right: 40px; }
}
@media (max-width: 520px) {
  .ea-overlay { padding: 10px; }
  .ea-row-split { grid-template-columns: 1fr; }
  .ea-body { padding: 24px 20px 28px; }
  .ea-headline { font-size: 2.5rem; }
  .ea-ticket { transform: rotate(-2deg); }
  .ea-ticket-body { padding: 12px 12px 10px; }
  .ea-scratch-area { height: 108px; }
  .ea-ticket-band { padding: 7px 12px 6px; }
  .ea-ticket-burst { font-size: 1rem; }
  .ea-ticket-issue { font-size: .56rem; }
  .ea-legend-vals { font-size: .8rem; gap: 5px; }
  .ea-barcode { width: 82px; height: 18px; }
  .ea-odds-line { font-size: .78rem; margin-top: 10px; }
  .ea-gate { margin-top: 16px; }
  .ea-prize { padding: 30px 18px 22px; }
  .ea-code { font-size: 1.45rem; }
}
/* Short viewports: keep the CTA above the fold — it's the conversion point. */
@media (max-height: 820px) {
  .ea-body { padding: 24px 44px 26px; }
  .ea-headline { font-size: 2.5rem; margin-bottom: 10px; }
  .ea-scratch-area { height: 88px; }
  .ea-under-amt { font-size: 2.5rem; }
  .ea-hero-amt { font-size: 2.7rem; }
  .ea-hero-up { font-size: .62rem; }
  .ea-hero-sub { font-size: .7rem; }
  .ea-ticket-hero { margin-bottom: 7px; }
  .ea-ticket-body { padding: 10px 14px 8px; }
  .ea-ticket-band { padding: 6px 14px 5px; }
  .ea-odds-line { font-size: .76rem; margin-top: 14px; }
  .ea-eyebrow { padding: 7px 13px; font-size: .72rem; margin-bottom: 9px; }
  .ea-copy { font-size: .87rem; margin-bottom: 10px; }
  .ea-legend { margin-top: 8px; }
  .ea-ticket-foot { margin-top: 8px; padding-top: 8px; }
  .ea-gate { margin-top: 12px; }
  .ea-form { gap: 10px; }
  .ea-form input { padding: 11px 14px; }
  .ea-submit { min-height: 50px; padding: .95em 1.4em; margin-top: 4px; }
  .ea-note { margin-top: 10px; font-size: .75rem; }
  .ea-dismiss { margin-top: 8px; }
}
/* Phones: hardest fold to win — the ticket gives ground.
   Input font-size stays 1rem or iOS zooms the page on focus. */
@media (max-width: 900px) and (max-height: 900px) {
  .ea-body { padding: 22px 20px 24px; }
  .ea-scratch-area { height: 82px; }
  .ea-under-amt { font-size: 2.3rem; }
  .ea-hero-amt { font-size: 2.5rem; }
  .ea-hero-up { font-size: .6rem; letter-spacing: .2em; }
  .ea-hero-sub { font-size: .68rem; }
  .ea-ticket-hero { margin-bottom: 7px; }
  .ea-ticket-body { padding: 10px 12px 8px; }
  .ea-ticket-band { padding: 6px 12px 5px; }
  .ea-copy { font-size: .85rem; line-height: 1.5; margin-bottom: 10px; }
  .ea-odds-line { font-size: .75rem; margin-top: 13px; }
  .ea-headline { font-size: 2.3rem; margin-bottom: 8px; }
  .ea-eyebrow { font-size: .7rem; margin-bottom: 10px; }
  .ea-lock-sub { font-size: .64rem; }
  .ea-ticket-foot { margin-top: 7px; padding: 7px 0 0; }
  .ea-barcode { height: 16px; }
  .ea-legend { margin-top: 8px; }
  .ea-gate { margin-top: 12px; }
  .ea-form { gap: 9px; }
  .ea-form input { padding: 10px 14px; }
  .ea-submit { min-height: 50px; padding: .95em 1em; margin-top: 4px; font-size: .92rem; }
  .ea-note { margin-top: 9px; font-size: .75rem; line-height: 1.5; }
  .ea-dismiss { margin-top: 6px; font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ea-panel, .ea-overlay .ea-visual img, .ea-ticket, .ea-ticket.unlocked { transition: opacity .3s ease !important; }
  .ea-panel, .ea-ticket, .ea-ticket.unlocked { transform: none !important; }
  .ea-overlay .ea-visual img { transform: rotate(-3deg) !important; }
  .ea-scratch-hint, .ea-foil-sheen, .ea-visual-dot, .ea-prize.golden .ea-prize-amt, .ea-scratch-area.done .ea-under-amt, .chat-online-dot::after { animation: none !important; }
  .ea-stage.active { animation: none !important; }
}

/* ==========================================================================
   MOBILE PASS
   Everything below is about phones (in-app browsers from TikTok / Instagram /
   Facebook: iOS WebKit and Android Chrome). Desktop keeps the rules above.

   State classes on <html>, all set by assets/paper/app.js (or home.js / s-gallery.js):
     pp-lock    a modal is open: page scroll is frozen
     kb-open    a text field has focus (the on-screen keyboard is up)
     chat-open  the chat panel is open
     stb-on     the sticky ticket bar is showing
     menu-open  the full-screen nav menu is open        (home.js)
     gal-lock   the gallery lightbox is open            (s-gallery.js)
   Custom properties on <html> while pp-lock is on:
     --vvh / --vvt   height / top of the VISIBLE viewport (visualViewport), so an
                     overlay ends at the top of the keyboard instead of under it
   ========================================================================== */

/* ---------- scroll lock ---------- */
html.pp-lock, html.pp-lock body { overflow: hidden; }
html.pp-lock body { overscroll-behavior: none; }

/* ---------- overlays follow the visible viewport + respect the notch / home bar ---------- */
.ea-overlay, .bd-overlay, .pdp-modal { inset: auto 0 auto 0; top: var(--vvt, 0px); height: var(--vvh, 100%); }
.ea-overlay, .bd-overlay {
  padding: max(24px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
}
.ea-panel:focus, .chatbot-panel:focus { outline: none; } /* focus target on touch (no keyboard pop); not a tab stop */

/* ==========================================================================
   THE DOCK — the floating things, as one system
     bottom row, phones:  [ ticket bar ..................... ] [chat photo]
     merch tag:           bottom-left; steps up to sit just above the ticket
                          bar whenever the bar is showing
     chat tooltip:        above the chat photo, never wider than the screen,
                          fades out by itself
   Nothing floats at the top any more, so nothing covers the nav, the logo or
   a headline. The whole dock leaves while the keyboard, the nav menu, the
   gallery lightbox or the chat sheet is up.
   ========================================================================== */
:root {
  --dock-b: max(14px, calc(env(safe-area-inset-bottom, 0px) + 6px));
  --dock-l: max(14px, env(safe-area-inset-left, 0px));
  --dock-r: max(14px, env(safe-area-inset-right, 0px));
  --chat-h: 100vh;
}
@supports (height: 100dvh) { :root { --chat-h: 100dvh; } }

@media (max-width: 899px), (max-height: 500px) {
  .chatbot-trigger { bottom: var(--dock-b); right: var(--dock-r); width: 56px; height: 56px; }
  .chatbot-trigger::before { width: 38px; height: 15px; top: -8px; }
  .chatbot-tooltip { bottom: calc(var(--dock-b) + 56px + 16px); right: var(--dock-r); font-size: 14px; max-width: min(300px, calc(100vw - var(--dock-l) - var(--dock-r))); }
  .chatbot-tooltip::after { right: 20px; }

  /* merch tag: a 44px round tag in the bottom-left corner */
  .ea-reopen {
    top: auto; left: var(--dock-l); bottom: calc(var(--dock-b) + 6px); height: 44px; min-width: 44px; padding: 0 10px; justify-content: center;
    transform: translateY(90px); translate: 0 0;
    transition: transform .5s var(--pp-ease-back), translate .4s var(--pp-ease), opacity .4s, background .2s;
  }
  .ea-reopen:active { background: var(--pp-red-deep); }
  /* the label peeks out once when the tag lands, so it's clear what the tag is, then folds away */
  .ea-reopen.show .ea-reopen-txt { animation: eaTagPeek 4.6s var(--pp-ease) .7s both; }
}
@keyframes eaTagPeek {
  0%, 100% { max-width: 0; margin-left: 0; opacity: 0; }
  12%, 86% { max-width: 150px; margin-left: 7px; opacity: 1; }
}
@media (max-width: 768px) {
  /* ticket bar showing: the tag steps up and sits on top of its left end */
  html.stb-on .ea-reopen { translate: 0 -58px; }
  /* the tooltip shares that row with the tag: leave the tag its corner */
  .chatbot-tooltip { max-width: min(300px, calc(100vw - var(--dock-l) - var(--dock-r) - 54px)); }
}
@media (prefers-reduced-motion: reduce) {
  .ea-reopen.show .ea-reopen-txt { animation: none; }
  .chatbot-tooltip, .chatbot-tooltip.is-nudge { animation-timing-function: step-end; }
}

/* --- when the dock gets out of the way --- */
/* full-screen nav menu / gallery lightbox: they sit below the dock in z-order, so hide it */
html.menu-open .sticky-ticket-bar, html.menu-open .chatbot-trigger, html.menu-open .chatbot-tooltip, html.menu-open .ea-reopen,
html.gal-lock .sticky-ticket-bar, html.gal-lock .chatbot-trigger, html.gal-lock .chatbot-tooltip, html.gal-lock .ea-reopen {
  opacity: 0 !important; visibility: hidden; pointer-events: none !important;
}
@media (max-width: 899px), (hover: none) {
  /* keyboard up: never sit on a field or its submit button */
  html.kb-open .sticky-ticket-bar, html.kb-open .chatbot-trigger, html.kb-open .chatbot-tooltip, html.kb-open .ea-reopen {
    opacity: 0 !important; visibility: hidden; pointer-events: none !important;
  }
}
@media (max-width: 768px), (max-height: 500px) {
  /* the chat is a full-screen sheet here */
  html.chat-open .sticky-ticket-bar, html.chat-open .chatbot-tooltip, html.chat-open .ea-reopen {
    opacity: 0 !important; visibility: hidden; pointer-events: none !important;
  }
}

/* ==========================================================================
   CHATBOT on phones — a full-screen sheet that ends at the keyboard
   (same media query as phoneChat in app.js)
   ========================================================================== */
@media (max-width: 768px), (max-height: 500px) {
  .chatbot-panel {
    --chat-gap: max(10px, env(safe-area-inset-top, 0px));
    left: 0; right: 0; bottom: auto; top: calc(var(--vvt, 0px) + var(--chat-gap)); width: 100%; max-width: 100%;
    height: calc(var(--vvh, var(--chat-h)) - var(--chat-gap)); max-height: none;
    border: none; border-top: 2px solid var(--pp-ink); border-radius: 14px 14px 0 0; box-shadow: 0 -10px 30px rgba(40,30,20,.22);
    transform: translateY(28px); /* height / top are not transitioned: the sheet snaps to the keyboard */
  }
  .chatbot-panel.open { transform: none; }
  .chatbot-header { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .chatbot-expand-btn { display: none; } /* already full-screen */
  .chatbot-close-btn { width: 44px; height: 44px; }
  .chatbot-close-btn svg { width: 20px; height: 20px; stroke-width: 3; }
  .chatbot-messages { padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  .chat-msg { font-size: 15px; }
  .chat-reactions { gap: 6px; }
  .chat-reaction-btn { min-height: 36px; min-width: 44px; justify-content: center; padding: 4px 10px; font-size: 15px; }
  /* quick replies: one row that swipes sideways and never moves the page */
  .quick-replies {
    flex: none; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    touch-action: pan-x; scrollbar-width: none; gap: 8px;
    padding: 4px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  }
  .quick-replies::-webkit-scrollbar { display: none; }
  .quick-reply { flex: none; min-height: 44px; padding: 8px 16px; font-size: 13px; }
  .chat-xp-bar { flex: none; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); font-size: 11px; }
  .rodney-banner { flex: none; padding-inline: max(14px, env(safe-area-inset-left, 0px)) max(14px, env(safe-area-inset-right, 0px)); }
  .chatbot-input { flex: none; padding: 12px max(14px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); }
  /* 16px+ keeps iOS Safari from zooming into the input on focus */
  .chatbot-input input { font-size: 16px !important; }
  .chat-xp-levelup { font-size: clamp(34px, 11vw, 64px); max-width: 94%; white-space: normal; text-align: center; -webkit-text-stroke-width: 6px; }

  /* keyboard up: the thread matters most; drop the extras, lose the top gap */
  html.kb-open .chatbot-panel { --chat-gap: env(safe-area-inset-top, 0px); border-radius: 0; }
  html.kb-open .chat-xp-bar, html.kb-open .rodney-banner { display: none; }
  html.kb-open .chatbot-input { padding-bottom: 10px; padding-top: 10px; }
}
@media (max-height: 500px) {
  /* landscape phone: same sheet, slimmer chrome */
  .chatbot-panel { --chat-gap: env(safe-area-inset-top, 0px); border-radius: 0; }
  .chatbot-header { padding-top: 6px; padding-bottom: 6px; }
  .chatbot-avatar { width: 38px; height: 38px; border-width: 2px; }
  .chatbot-header-info h4 { font-size: 22px; }
  .chatbot-header-info p { display: none; }
  .chatbot-messages { padding-top: 10px; padding-bottom: 10px; }
  .chat-xp-bar { display: none; }
  .quick-replies { padding-bottom: 6px; }
  .rodney-banner { padding-top: 4px; padding-bottom: 4px; }
  .rodney-toggle { padding-top: 4px; padding-bottom: 4px; }
  .chatbot-input { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  html.kb-open .chatbot-header { padding-top: 2px; padding-bottom: 2px; }
  html.kb-open .quick-replies { display: none; }
}

/* ==========================================================================
   VAULT on phones
   ========================================================================== */
@media (max-width: 900px) {
  .ea-overlay {
    padding: max(10px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
  }
  /* minimum legible sizes (labels >= 11px) and thumb-sized targets */
  .ea-ticket-issue, .ea-hero-up, .ea-hero-sub, .ea-lock-sub, .ea-legend-label { font-size: 11px; }
  .ea-hero-up { letter-spacing: .16em; }
  .ea-lock-sub { letter-spacing: .1em; }
  .ea-ticket-issue { letter-spacing: .08em; }
  .ea-ticket-no { font-size: 11.5px; }
  .ea-dismiss, .ea-scratch-skip { min-height: 44px; padding: 0 12px; }
  .ea-copy-btn { min-height: 44px; padding: 8px 18px; font-size: 12px; }
  .ea-copy-btn svg { width: 14px !important; height: 14px !important; }
  .ea-note { font-size: 12px; }
  .ea-odds-line { font-size: 12.5px; }
  .ea-body { scroll-padding-block: 64px 16px; }
  .ea-form input { min-height: 46px; }
  /* keyboard up: the form is all that matters. Fold the pitch away so name, email,
     phone and the Unlock button all sit in what is left above the keyboard. */
  html.kb-open .ea-odds-line { display: none; }
}
@media (max-width: 900px) and (max-height: 500px) and (min-width: 600px) {
  /* landscape phone: ticket on the left, the pitch + form on the right */
  #eaStageForm.active { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1fr); column-gap: 26px; align-items: start; }
  #eaStageForm > * { grid-column: 2; }
  #eaStageForm > .ea-ticket-wrap { grid-column: 1; grid-row: 1 / span 8; align-self: start; padding-top: 14px; }
  #eaStageForm > .ea-odds-line { display: none; }
  #eaStageForm > .ea-eyebrow { justify-self: start; }
  .ea-headline { padding-right: 52px; font-size: 2rem; }
  .ea-headline br { display: none; }
  .ea-headline em { margin-left: .2em; }
  .ea-prize { padding: 22px 20px 18px; }
  .ea-prize-amt { font-size: 3.6rem; }
  .ea-prize-blurb { margin-bottom: 12px; }
}

/* ==========================================================================
   BIRTHDAY on phones
   ========================================================================== */
.bd-banner { -webkit-touch-callout: none; }
@media (max-width: 600px), (max-height: 500px) {
  .bd-overlay {
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  }
  .bd-panel { max-height: calc(var(--vvh, 100vh) - 24px); }
  .bd-back, .bd-mode, .bd-tool { min-height: 44px; }
  .bd-mode { padding-inline: 14px; }
  .bd-tool { padding-inline: 16px; }
  .bd-theme-label { font-size: 11px; letter-spacing: .04em; }
  .bd-banner { font-size: 12px; min-height: 42px; }
}
@media (max-height: 500px) {
  /* landscape phone: the whole card has to be on screen to draw on it */
  .bd-card { width: min(100%, calc((var(--vvh, 100vh) - 150px) * 1.3333)); min-width: 240px; margin-inline: auto; }
  .bd-panel { padding-top: 34px; }
  .bd-compose-top { padding-right: 56px; } /* clear of the close button */
  .bd-cake-svg { width: 92px; }
  .bd-headline { font-size: 44px; }
}
/* drawing: the canvas owns the finger (no scroll, no text selection, no callout) */
.bd-draw { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* ==========================================================================
   CART + PRODUCT MODAL on phones
   ========================================================================== */
.cart-sidebar { top: var(--vvt, 0px); bottom: auto; height: var(--vvh, 100%); }
.cart-items { -webkit-overflow-scrolling: touch; }
.pdp-modal { -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) {
  /* full-width sheet */
  .cart-sidebar { width: 100%; max-width: 100%; border-left: 0; }
  .cart-header { padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 12px; }
  .cart-header h3 { font-size: 30px; }
  .cart-shipping-bar, .cart-items { padding-left: 18px; padding-right: 18px; }
  .cart-cody-reaction { padding: 12px 18px 0; }
  .cart-footer { padding-left: 18px; padding-right: 18px; }
  .cart-item-qty { gap: 6px; }
  .cart-item-qty button { width: 44px; height: 44px; }
  .cart-item-remove { padding: 12px 0; margin-top: 0; }
  .cart-savings { font-size: 11px; letter-spacing: .14em; }
  .cart-shipping-text { letter-spacing: .1em; }
}
@media (max-width: 768px) {
  .pdp-modal { padding: calc(20px + env(safe-area-inset-top, 0px)) 12px calc(24px + env(safe-area-inset-bottom, 0px)); }
  .pdp-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); }
  .pdp-share-btn { min-height: 44px; }
  .pdp-thumb-label { font-size: 10px; letter-spacing: .06em; }
  .pdp-related-grid { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
  .pdp-toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 32px); }
}
@media (max-height: 500px) {
  /* landscape phone: header + shipping bar + totals don't leave room for a list, so the whole sheet scrolls */
  .cart-sidebar { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .cart-sidebar > * { flex: none; }
  .cart-items { overflow: visible; }
  .pdp-share-btn { min-height: 44px; }
  .cart-header { padding-top: 10px; padding-bottom: 8px; }
  .cart-empty { padding: 16px 20px; }
  .cart-empty-icon { font-size: 30px; margin-bottom: 6px; }
}

/* Desktop: the expand button had no expanded size to go to */
@media (min-width: 769px) and (min-height: 501px) {
  .chatbot-panel.expanded { width: min(560px, calc(100vw - 56px)); height: min(760px, calc(100vh - 140px)); }
}

/* ==========================================================================
   VAULT POPUP — SIMPLIFIED (Kyle, 2026-11-15: "too much information… clean and simple")
   One headline, one line, the scratch panel, the form. Everything the scratch
   logic needs stays in the DOM; the ticket dressing is just not shown.
   ========================================================================== */
.ea-eyebrow, .ea-ticket-band, .ea-ticket-hero, .ea-legend, .ea-ticket-foot, .ea-odds-line,
.ea-visual-tag, .ea-visual-sub, .ea-foil-sheen { display: none !important; }
.ea-ticket::before, .ea-ticket::after { display: none; }
.ea-ticket-wrap { padding: 0; margin-block: 4px 16px; }
.ea-ticket, .ea-ticket.locked { rotate: 0deg; transform: none; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; filter: none; }
.ea-ticket-body { padding: 0; background: none; }
.ea-scratch-area { height: 96px; border-radius: 3px; box-shadow: 0 0 0 2px var(--pp-ink), 4px 4px 0 rgba(20,20,20,.14); }
.ea-headline { margin-bottom: 8px; }
.ea-copy { margin-bottom: 14px; }
.ea-form { gap: 10px; }
.ea-note { font-size: 11px; line-height: 1.45; color: var(--pp-ink-faint); margin-top: 2px; }
.ea-dismiss { margin-top: 10px; font-size: 13px; color: var(--pp-ink-faint); }
.ea-body { padding-block: 32px; }
@media (max-width: 700px) {
  .ea-body { padding: 26px 20px 22px; }
  .ea-headline { font-size: clamp(2.4rem, 11.5vw, 3.2rem); padding-right: 52px; }
}
.ea-headline br { display: none !important; }
.ea-headline em { display: block; margin: 0 !important; padding: 0 !important; }
/* phone + email only: the pair always spans the form */
.ea-form .ea-row-split { grid-column: 1 / -1; }
@media (min-width: 701px) { .ea-headline { font-size: clamp(2.6rem, 4vw, 3.4rem); } }
