﻿:root{
    --bg: #FFF7EE;
    --bg-2: #FFEFE0;
    --ink: #2A1F1A;
    --ink-2: #6B5A4F;
    --line: #2A1F1A;
    --pink: #FFB6C1;
    --pink-deep: #FF8FA8;
    --yellow: #FFD66B;
    --mint: #A8E6CF;
    --lavender: #C9B6FF;
    --peach: #FFB893;
    --sky: #B6E1FF;
    --card: #FFFFFF;
  }
  *{box-sizing:border-box}
  html,body{margin:0;padding:0}
  body{
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x:hidden;
  }
  .display{ font-family: "Fraunces", serif; font-weight: 900; letter-spacing: -0.02em; }
  .script{ font-family: "Caveat", cursive; }
  .mono{ font-family: ui-monospace, "SF Mono", Menlo, monospace; }

  /* ---------- Top nav ---------- */
  .nav{
    position: relative; z-index: 10;
    backdrop-filter: blur(10px);
    background: rgba(255,247,238,0.9);
    border-bottom: 1px solid rgba(42,31,26,0.08);
  }
  .nav-inner{
    max-width: 1240px; margin: 0 auto;
    display:flex; align-items:center; justify-content:space-between;
    padding: 16px 32px;
  }
  .brand{ display:flex; align-items:center; gap: 10px; font-weight: 700; text-decoration: none; }
  .brand-mark{
    width: 42px; height: 42px; border-radius: 14px;
    background: linear-gradient(135deg, var(--yellow) 0%, var(--pink) 60%, var(--peach) 100%);
    border: 1.5px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    position: relative; flex-shrink: 0;
    display: grid; place-items: center;
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
  }
  .brand-mark:hover{ transform: rotate(-6deg) scale(1.05); }
  .brand-mark svg{ width: 28px; height: 28px; display:block; }
  .brand-mark::before{
    content: ""; position:absolute; top:-4px; left:8px;
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--mint); border:1px solid var(--ink);
  }
  .brand-mark::after{
    content: ""; position:absolute; bottom:-3px; right:6px;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--lavender); border:1px solid var(--ink);
  }
  .brand-mark--legacy{
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--yellow);
    border: 1.5px solid var(--ink);
    display:grid; place-items:center;
    box-shadow: 3px 3px 0 var(--ink);
    font-size: 18px;
  }
  .brand-name{ font-family:"Fraunces", serif; font-weight: 900; font-size: 20px; }
  .brand-name span{ color: var(--pink-deep); font-style: italic; }
  .nav-links{ display:flex; gap: 28px; font-weight: 500; font-size: 14px; }
  .nav-links a{ color: var(--ink); text-decoration:none; opacity: 0.75; }
  .nav-links a:hover{ opacity: 1; }
  .nav-cta{
    background: var(--ink); color: #fff; border:none;
    padding: 10px 18px; border-radius: 999px; font-weight: 600;
    cursor:pointer; font-size: 14px;
  }

  /* ---------- Hero ---------- */
  .hero{
    position: relative;
    max-width: 1240px; margin: 0 auto;
    padding: 64px 32px 32px;
    text-align: center;
  }
  .eyebrow{
    display:inline-flex; align-items:center; gap:8px;
    background: var(--card); border: 1.5px solid var(--ink);
    padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
    box-shadow: 3px 3px 0 var(--ink);
  }
  .eyebrow .dot{ width:8px; height:8px; border-radius:50%; background: var(--pink-deep); }
  .hero h1{
    font-family: "Fraunces", serif; font-weight: 900;
    font-size: clamp(48px, 8vw, 96px);
    line-height: 0.95; letter-spacing: -0.03em;
    margin: 18px 0 14px;
  }
  .hero h1 .word-1{ display:inline-block; }
  .hero h1 .word-2{
    display:inline-block; color: var(--pink-deep);
    font-style: italic; font-weight: 700;
    position: relative;
  }
  .hero h1 .word-2::after{
    content:""; position: absolute; left: 4%; right: 4%; bottom: 6px;
    height: 14px; background: var(--yellow); z-index: -1; border-radius: 6px;
    transform: rotate(-1deg);
  }
  .hero p.lead{
    max-width: 640px; margin: 0 auto;
    color: var(--ink-2); font-size: 18px; line-height: 1.55;
    text-wrap: pretty;
  }
  .hero-actions{
    display:flex; justify-content:center; gap: 12px; margin-top: 28px; flex-wrap: wrap;
  }
  .btn{
    display:inline-flex; align-items:center; gap: 8px;
    border: 1.5px solid var(--ink); border-radius: 999px;
    padding: 12px 22px; font-weight: 600; font-size: 15px;
    cursor: pointer; background: var(--card); color: var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    transition: transform 120ms ease, box-shadow 120ms ease;
    text-decoration:none;
  }
  .btn:hover{ transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
  .btn:active{ transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
  .btn.primary{ background: var(--pink); }
  .btn.warm{ background: var(--yellow); }
  .btn.mint{ background: var(--mint); }
  .btn.ghost{ background: transparent; box-shadow: none; }
  .btn.ghost:hover{ background: var(--card); box-shadow: 4px 4px 0 var(--ink); transform: translate(-1px,-1px); }

  .deco{ position:absolute; pointer-events:none; }
  .deco svg{ display:block; }

  /* ---------- Section frame ---------- */
  section.block{ max-width: 1240px; margin: 0 auto; padding: 64px 32px; }
  .section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom: 28px; flex-wrap: wrap;}
  .section-tag{ font-family:"Caveat", cursive; font-size: 28px; color: var(--pink-deep); transform: rotate(-2deg); display:inline-block; }
  .section-head h2{ font-family:"Fraunces", serif; font-weight:900; font-size: clamp(32px, 4vw, 48px); margin: 4px 0 6px; letter-spacing:-0.02em;}
  .section-head p{ color: var(--ink-2); margin:0; max-width: 520px; }
  .section-head .right{ display:flex; gap: 10px; }
  .pill{
    display:inline-flex; align-items:center; gap:8px;
    background: var(--card); border:1.5px solid var(--ink); border-radius: 999px;
    padding: 8px 14px; font-size: 13px; font-weight: 600;
    box-shadow: 3px 3px 0 var(--ink);
  }

  /* ---------- Studio (Card maker) ---------- */
  .studio{
    display:grid; grid-template-columns: 360px 1fr; gap: 24px;
    background: var(--card);
    border:1.5px solid var(--ink); border-radius: 28px;
    box-shadow: 8px 8px 0 var(--ink);
    overflow: hidden;
  }
  .studio-side{ padding: 28px; border-right: 1.5px solid var(--ink); background: var(--bg-2); }
  .studio-side h3{ font-family:"Fraunces", serif; margin: 0 0 4px; font-size: 22px; }
  .studio-side .hint{ color: var(--ink-2); font-size: 13px; margin: 0 0 18px; }
  .field{ margin-bottom: 18px; }
  .field label{ display:block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
  .field input, .field textarea, .field select{
    width:100%; border:1.5px solid var(--ink); border-radius: 14px; background:#fff;
    padding: 12px 14px; font: inherit; color: var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    outline: none;
  }
  .field input:focus, .field textarea:focus, .field select:focus{ box-shadow: 4px 4px 0 var(--pink-deep); border-color: var(--pink-deep); }
  .field textarea{ min-height: 78px; resize: vertical; }
  .row-2{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .swatches{ display:flex; flex-wrap:wrap; gap: 8px; align-items: center; position: relative; }
  .sw{
    width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink);
    cursor:pointer; box-shadow: 2px 2px 0 var(--ink);
  }
  .sw.active{ outline: 2px solid var(--ink); outline-offset: 3px; }
  .sw-custom{
    padding: 0; display: grid; place-items: center; color: var(--ink);
    font-family: "Fraunces", serif; font-weight: 900; font-size: 18px;
    position: relative;
  }
  .sw-custom-icon{
    background: rgba(255,255,255,0.85); width: 18px; height: 18px; border-radius: 50%;
    display: grid; place-items: center; font-size: 13px; line-height: 1;
    border: 1.5px solid var(--ink);
  }
  .custom-pop{
    position: absolute; left: 0; top: calc(100% + 10px); z-index: 5;
    width: 260px; padding: 14px;
    background: var(--bg-2); border: 1.5px solid var(--ink); border-radius: 14px;
    box-shadow: 4px 4px 0 var(--ink);
  }
  .custom-pop[hidden]{ display: none; }
  .cp-title{ font-family: "Fraunces", serif; font-weight: 900; font-size: 15px; margin-bottom: 10px; }
  .cp-row{
    display: grid; grid-template-columns: 80px 36px 1fr; gap: 8px; align-items: center;
    font-size: 13px; margin-bottom: 8px;
  }
  .cp-row input[type="color"]{
    width: 36px; height: 28px; padding: 0; border: 1.5px solid var(--ink);
    border-radius: 8px; cursor: pointer; background: none;
  }
  .cp-row code{
    font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px;
    background: var(--bg); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--ink-2);
    text-transform: uppercase; opacity: 0.75;
  }
  .cp-actions{ display: flex; justify-content: flex-end; margin-top: 6px; }

  .templates{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tpl{
    aspect-ratio: 4/5; border:1.5px solid var(--ink); border-radius: 12px;
    cursor:pointer; overflow:hidden; position: relative;
    box-shadow: 2px 2px 0 var(--ink);
    background: #fff;
  }
  .tpl.active{ outline: 3px solid var(--pink-deep); outline-offset: 2px; }
  .tpl-label{ position:absolute; left: 6px; bottom:6px; right:6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); background: rgba(255,255,255,0.85); padding: 3px 6px; border-radius: 6px;}

  .studio-stage{
    padding: 28px; display:grid; place-items:center; background:
      radial-gradient(1200px 600px at 80% -10%, #FFF1D6 0%, transparent 60%),
      radial-gradient(800px 500px at 0% 110%, #FFE2EC 0%, transparent 55%),
      var(--card);
    position:relative; min-height: 520px;
  }
  .card-preview{
    width: 440px; aspect-ratio: 4/5; border-radius: 22px;
    border: 1.5px solid var(--ink); box-shadow: 10px 10px 0 var(--ink);
    overflow:hidden; position:relative;
    transition: transform 200ms ease;
  }
  .card-preview .cp-bg{ position:absolute; inset:0; }
  .card-preview .cp-content{
    position:absolute; inset: 0; padding: 36px;
    display:flex; flex-direction: column; justify-content: space-between;
  }
  .cp-top{ display:flex; justify-content: space-between; align-items: flex-start; }
  .cp-top .age{
    font-family:"Fraunces", serif; font-weight: 900; font-size: 56px; line-height: 1;
    background: rgba(255,255,255,0.85); border: 1.5px solid var(--ink);
    padding: 4px 14px; border-radius: 14px;
  }
  .cp-greet{ font-family:"Fraunces", serif; font-weight: 700; font-style: italic; font-size: 22px; line-height: 1.2; }
  .cp-title{ font-family:"Fraunces", serif; font-weight: 900; font-size: 38px; line-height: 1; letter-spacing: -0.02em; margin: 14px 0 6px;}
  .cp-name{ font-family:"Caveat", cursive; font-size: 60px; line-height: 1; }
  .cp-msg{ font-size: 15px; line-height: 1.45; max-width: 320px; }
  .cp-from{ font-size: 12px; opacity: 0.85; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }

  .card-toolbar{
    display:flex; gap:10px; margin-top: 22px; justify-content:center; flex-wrap:wrap;
  }

  /* ---------- Birthday Screen builder ---------- */
  .screen-builder{
    display:grid; grid-template-columns: 360px 1fr; gap: 24px;
    background: var(--card);
    border:1.5px solid var(--ink); border-radius: 28px;
    box-shadow: 8px 8px 0 var(--ink);
    overflow: hidden;
  }
  .screen-side{ padding: 28px; border-right: 1.5px solid var(--ink); background: #FFF1E6; }
  .screen-side h3{ font-family:"Fraunces", serif; margin: 0 0 4px; font-size: 22px; }
  .screen-side .hint{ color: var(--ink-2); font-size: 13px; margin: 0 0 18px; }
  .scenes{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .scene-card{
    aspect-ratio: 16/9; border:1.5px solid var(--ink); border-radius: 12px;
    cursor:pointer; overflow:hidden; position: relative;
    box-shadow: 2px 2px 0 var(--ink); background:#fff;
  }
  .scene-card.active{ outline: 3px solid var(--pink-deep); outline-offset: 2px; }
  .scene-card .lbl{
    position:absolute; left:6px; bottom:6px; right:6px;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    background: rgba(255,255,255,0.88); padding: 3px 6px; border-radius: 6px;
  }
  .screen-stage{
    padding: 28px;
    background:
      radial-gradient(800px 400px at 100% 0%, #FFE9D6 0%, transparent 60%),
      radial-gradient(600px 400px at 0% 100%, #FFD9E5 0%, transparent 55%),
      var(--card);
    display:flex; flex-direction:column; gap: 16px; align-items:center;
  }
  .details-panel{
    width: 100%; max-width: 720px;
    background: rgba(255,255,255,0.78);
    border: 1.5px solid var(--ink);
    border-radius: 20px;
    box-shadow: 6px 6px 0 var(--ink);
    padding: 22px;
  }
  .details-panel h3{
    font-family:"Fraunces", serif; margin: 0 0 14px; font-size: 22px;
  }
  .details-panel--compact{
    max-width: 860px;
    padding: 26px 24px;
  }
  .details-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 22px;
    align-items: start;
  }
  .details-panel--compact .field{
    margin-bottom: 0;
  }
  .details-panel--compact .field-span-2{
    grid-column: 1 / -1;
  }
  .details-panel--compact .details-label{
    margin-bottom: 8px;
  }
  .details-panel--compact .details-help{
    margin-top: 8px;
  }
  .details-panel--compact textarea{
    min-height: 84px;
  }
  .details-label{
    display:block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
    font-weight: 700; color: var(--ink-2); margin-bottom: 8px;
  }
  .details-help{ font-size: 11px; color: var(--ink-2); margin-bottom: 0; }
  .screen-frame{
    width: 100%; max-width: 720px; aspect-ratio: 16/9;
    border:1.5px solid var(--ink); border-radius: 0;
    box-shadow: 10px 10px 0 var(--ink);
    overflow:hidden; position:relative; background:#000;
  }
  .screen-frame .sc-stage{ position:absolute; inset:0; }
  .screen-toolbar{ display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
  .card-maker-clone .scenes{ grid-template-columns: repeat(2, 1fr); }
  .card-maker-clone .scene-card{
    aspect-ratio: auto;
    height: 148px;
  }
  .card-maker-clone .screen-side{ background: var(--bg-2); }
  .card-maker-clone{
    grid-template-columns: 300px minmax(0, 1fr) 320px;
    align-items: stretch;
  }
  .card-maker-clone .screen-stage{
    background:
      radial-gradient(800px 400px at 100% 0%, #FFF1D6 0%, transparent 60%),
      radial-gradient(600px 400px at 0% 100%, #FFE2EC 0%, transparent 55%),
      var(--card);
    align-items: center;
  }
  .card-maker-center{
    justify-content: flex-start;
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .card-maker-frame{
    max-width: 440px;
    aspect-ratio: 4/5;
    background: var(--card);
  }
  .card-maker-chooser{
    display: flex;
    flex-direction: column;
    align-self: start;
    max-height: min(78vh, 920px);
    overflow: hidden;
  }
  .card-maker-chooser .scenes{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
    align-content: start;
    grid-auto-rows: 148px;
    scrollbar-width: thin;
  }
  .card-maker-chooser .scenes::-webkit-scrollbar{
    width: 8px;
  }
  .card-maker-chooser .scenes::-webkit-scrollbar-thumb{
    background: rgba(42,31,26,0.28);
    border-radius: 999px;
  }
  .card-maker-chooser .scenes::-webkit-scrollbar-track{
    background: rgba(42,31,26,0.06);
    border-radius: 999px;
  }
  .card-maker-side{
    width: 100%;
    max-width: none;
    min-height: 100%;
    margin: 0;
    align-self: stretch;
    background: #fff7f1;
    border: 0;
    border-left: 1.5px solid var(--ink);
    border-radius: 0;
    padding: 28px;
  }
  .card-maker-clone .sc-greet,
  .card-maker-clone .sc-name,
  .card-maker-clone .sc-title,
  .card-maker-clone .sc-sub,
  .card-maker-clone .sc-from{
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .card-maker-clone .sc-confetti span{
    animation: none !important;
  }

  /* ---------- The actual Birthday Screen content ---------- */
  .sc-root{
    position:absolute; inset:0;
    display:grid; place-items:center;
    overflow:hidden;
  }
  .sc-bg{ position:absolute; inset:0; }
  .sc-content{
    position: relative; z-index: 2;
    text-align:center; padding: 4%;
    max-width: 92%;
  }
  .sc-content--balloons,
  .sc-content--crown,
  .sc-content--graduate,
  .sc-content--petals{
    padding-top: 20%;
  }
  .sc-content--car,
  .sc-content--money,
  .sc-content--gifts{
    padding-bottom: 16%;
  }
  .sc-content--car .sc-sub,
  .sc-content--money .sc-sub,
  .sc-content--gifts .sc-sub{
    max-width: 52ch;
  }
  .sc-greet{
    font-family:"Fraunces", serif; font-style: italic; font-weight: 700;
    font-size: clamp(22px, 4.5cqw, 64px);
    letter-spacing: -0.01em; line-height: 1; margin-bottom: 0.4em;
    opacity: 0; animation: rise 800ms 200ms forwards;
  }
  .sc-name{
    font-family:"Caveat", cursive;
    font-size: clamp(48px, 13cqw, 200px);
    font-weight: 700;
    line-height: 0.95; margin: 0.1em 0 0.2em;
    opacity: 0; animation: pop 700ms 600ms forwards;
  }
  .sc-title{
    font-family:"Fraunces", serif; font-weight: 900;
    font-size: clamp(28px, 6.5cqw, 90px);
    letter-spacing: -0.02em; line-height: 1;
    opacity: 0; animation: rise 800ms 1000ms forwards;
  }
  .sc-sub{
    font-family:"Plus Jakarta Sans", sans-serif;
    font-size: clamp(14px, 1.8cqw, 24px);
    line-height: 1.5; max-width: 60ch; margin: 1em auto 0;
    opacity: 0; animation: rise 800ms 1500ms forwards;
    text-wrap: pretty;
  }
  .sc-from{
    font-size: clamp(11px, 1.3cqw, 18px);
    letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700;
    margin-top: 1.2em;
    opacity: 0; animation: rise 800ms 2000ms forwards;
  }
  .screen-frame{ container-type: inline-size; }
  .is-exporting .sc-greet,
  .is-exporting .sc-name,
  .is-exporting .sc-title,
  .is-exporting .sc-sub,
  .is-exporting .sc-from,
  .is-exporting .sc-photo{
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .is-exporting .sc-confetti span{
    animation: none !important;
  }
  @keyframes rise { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform:none; } }
  @keyframes pop  { 0%{opacity:0; transform: scale(0.6) rotate(-3deg);} 60%{opacity:1; transform:scale(1.06) rotate(1deg);} 100%{opacity:1; transform:scale(1) rotate(-1deg);} }

  /* ---------- Show overlay (the "play" mode) ---------- */
  .show-overlay{
    position: fixed; inset: 0; background: rgba(20,12,8,0.92);
    z-index: 200; display:none; align-items:center; justify-content:center;
    padding: 24px;
    backdrop-filter: blur(6px);
  }
  .show-overlay.open{ display:flex; }
  .show-stage{
    width: min(96vw, calc(96vh * 16 / 9));
    aspect-ratio: 16/9;
    border-radius: 0; overflow: hidden;
    border:1.5px solid #000; box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    position:relative; background: var(--bg);
    container-type: inline-size;
  }
  .show-overlay.fs{
    padding: 0;
    background: transparent;
  }
  .show-overlay.fs .show-stage{
    width: 100vw; height: 100vh; aspect-ratio: auto;
    border-radius: 0; border: none; box-shadow: none;
  }
  .show-overlay.fs .show-controls,
  .show-overlay.fs .esc-hint{
    display: none;
  }
  .show-controls{
    position: fixed; top: 18px; right: 18px;
    display:flex; gap: 8px; z-index: 210;
  }
  .show-controls .ctrl{
    background: rgba(255,255,255,0.95); color: var(--ink);
    border: 1.5px solid var(--ink); border-radius: 999px;
    padding: 10px 14px; font-weight: 700; font-size: 13px; cursor:pointer;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
  }
  .show-controls .ctrl:hover{ transform: translate(-1px,-1px); }
  .esc-hint{
    position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.85); font-size: 13px;
    background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 16px; border-radius: 999px; z-index: 210;
    display:flex; align-items:center; gap: 8px;
  }
  .esc-hint .kbd{
    background: #fff; color: #000; border-radius: 6px; padding: 2px 8px;
    font-family: ui-monospace, monospace; font-weight: 700; font-size: 12px;
  }

  /* ---------- Banners (gallery) ---------- */
  .banner-grid{
    display:grid; grid-template-columns: repeat(12, 1fr); gap: 18px;
  }
  .banner{
    border:1.5px solid var(--ink); border-radius: 20px; overflow:hidden;
    background: var(--card); box-shadow: 6px 6px 0 var(--ink);
    position:relative; cursor:pointer;
    transition: transform 150ms ease, box-shadow 150ms ease;
  }
  .banner:hover{ transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--ink); }
  .banner .art{ aspect-ratio: 16/7; position:relative; overflow:hidden; }
  .banner .meta{ display:flex; justify-content:space-between; align-items:center; padding: 12px 16px; border-top: 1.5px solid var(--ink); background: var(--card); }
  .banner .meta .name{ font-weight: 700; }
  .banner .meta .tag{ font-size: 12px; color: var(--ink-2); }
  .banner .pickbtn{ font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; border:1.5px solid var(--ink); background: var(--yellow); cursor:pointer; }
  .b-span-6{ grid-column: span 6; }
  .b-span-4{ grid-column: span 4; }
  .b-span-12{ grid-column: span 12; }
  @media (max-width: 900px){
    .b-span-6, .b-span-4, .b-span-12{ grid-column: span 12; }
  }

  /* ---------- Wishes ---------- */
  .wish-tools{ margin-bottom: 18px; }
  .wish-search{
    display:grid; gap:8px; max-width: 440px;
    font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--ink-2);
  }
  .wish-search input{
    width:100%; border:1.5px solid var(--ink); border-radius: 14px; background:#fff;
    padding: 12px 14px; font: inherit; color: var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    text-transform: none; letter-spacing: normal; font-weight: 500;
  }
  .wish-search input:focus{ box-shadow: 4px 4px 0 var(--pink-deep); border-color: var(--pink-deep); outline: none; }
  .wishes-wrap{ display:grid; grid-template-columns: 220px 1fr; gap: 24px; }
  .cats{ display:flex; flex-direction:column; gap:8px; }
  .cat{
    display:flex; align-items:center; justify-content:space-between;
    padding: 12px 14px; border:1.5px solid var(--ink); border-radius: 14px;
    background: var(--card); cursor:pointer; font-weight: 600;
    box-shadow: 3px 3px 0 var(--ink);
  }
  .cat.active{ background: var(--yellow); }
  .cat .count{ font-size: 12px; opacity: 0.7; }
  .wishes{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-content: start; }
  .wish{
    border:1.5px solid var(--ink); border-radius: 18px; padding: 22px;
    background: var(--card); position: relative;
    box-shadow: 5px 5px 0 var(--ink);
    display:flex; flex-direction:column; gap: 14px;
  }
  .wish .quote{
    font-family:"Fraunces", serif; font-size: 20px; line-height: 1.4; font-weight: 500;
    text-wrap: pretty;
  }
  .wish .quote::before{ content: "“"; font-size: 60px; line-height: 0; vertical-align: -22px; margin-right: 4px; color: var(--pink-deep); font-family:"Fraunces", serif;}
  .wish .footer{ display:flex; justify-content: space-between; align-items: center; }
  .chips{ display:flex; gap:6px; }
  .chip{ font-size: 11px; padding: 4px 10px; border-radius: 999px; border:1.5px solid var(--ink); background: var(--bg-2); font-weight: 600; }
  .wish .actions{ display:flex; gap: 8px; }
  .wish-empty{
    border:1.5px dashed var(--ink); border-radius: 18px; padding: 22px;
    background: var(--bg-2); color: var(--ink-2); font-weight: 600;
  }
  .icon-btn{
    width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ink);
    background: var(--card); cursor:pointer; display:grid; place-items:center;
    box-shadow: 2px 2px 0 var(--ink); font-size: 14px;
  }
  .icon-btn.fav.on{ background: var(--pink); }
  .icon-btn.use{ background: var(--mint); width: auto; padding: 0 12px; border-radius: 999px; font-weight: 700; font-size: 12px; }

  /* ---------- Footer ---------- */
  footer{
    margin-top: 100px; position: relative;
    background: var(--ink); color: #FFF7EE;
    overflow: hidden;
  }
  .foot-wave{
    position: absolute; top: -1px; left:0; right:0; height: 60px;
    line-height: 0; transform: translateY(-99%);
  }
  .foot-wave svg{ width: 100%; height: 100%; display:block; }
  .foot-confetti{
    position: absolute; inset: 0; pointer-events: none; opacity: 0.12;
    background-image:
      radial-gradient(circle at 8% 20%, var(--pink) 0 3px, transparent 4px),
      radial-gradient(circle at 22% 60%, var(--yellow) 0 3px, transparent 4px),
      radial-gradient(circle at 38% 30%, var(--mint) 0 3px, transparent 4px),
      radial-gradient(circle at 55% 75%, var(--lavender) 0 3px, transparent 4px),
      radial-gradient(circle at 72% 25%, var(--peach) 0 3px, transparent 4px),
      radial-gradient(circle at 88% 65%, var(--pink) 0 3px, transparent 4px),
      radial-gradient(circle at 15% 85%, var(--yellow) 0 3px, transparent 4px),
      radial-gradient(circle at 95% 15%, var(--mint) 0 3px, transparent 4px);
  }
  .foot-inner{
    position: relative; z-index: 1;
    max-width: 1240px; margin: 0 auto; padding: 56px 32px 32px;
    display:grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px;
    font-size: 14px;
  }
  .foot-col .foot-h{
    font-family: "Fraunces", serif; font-weight: 900; font-size: 16px;
    color: #FFF7EE; margin-bottom: 14px;
    display: inline-block; padding-bottom: 4px;
    border-bottom: 2px dashed rgba(255, 247, 238, 0.35);
  }
  .foot-blurb{ opacity:0.75; max-width: 360px; margin: 14px 0 16px; line-height: 1.55; }
  .foot-tags{ display:flex; flex-wrap: wrap; gap: 6px; }
  .foot-tag{
    font-size: 11.5px; padding: 5px 10px; border-radius: 999px;
    background: rgba(255, 247, 238, 0.08); border: 1px solid rgba(255, 247, 238, 0.18);
    color: #FFF7EE; font-weight: 500;
  }
  .foot-links{ list-style:none; padding:0; margin:0; display:grid; gap:8px; }
  .foot-links a, .foot-links li{
    color: #FFF7EE; opacity: 0.7; text-decoration: none;
    transition: opacity 0.15s, transform 0.15s; display: inline-block;
  }
  .foot-links a:hover{ opacity: 1; transform: translateX(3px); color: var(--pink); }

  .foot-card{
    background: linear-gradient(135deg, rgba(255, 143, 168, 0.12), rgba(232, 169, 59, 0.12));
    border: 1.5px dashed rgba(255, 247, 238, 0.3);
    border-radius: 16px; padding: 18px;
  }
  .foot-card-eyebrow{
    font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em;
    opacity: 0.6; margin-bottom: 8px;
  }
  .foot-card-title{
    font-family: "Fraunces", serif; font-weight: 900; font-size: 22px;
    line-height: 1.2; margin-bottom: 8px;
  }
  .foot-card-title span{ color: var(--yellow); }
  .foot-card-sub{ font-size: 13px; opacity: 0.7; line-height: 1.5; }

  .foot-bottom{
    position: relative; z-index: 1;
    border-top: 1px solid rgba(255, 247, 238, 0.12);
    padding: 14px 0; font-size: 12.5px;
  }
  .foot-bottom-inner{
    max-width: 1240px; margin: 0 auto; padding: 0 32px;
    display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
    opacity: 0.6;
  }
  .foot-marquee{
    overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  }
  .foot-marquee span{
    display: inline-block; padding-right: 24px;
    animation: marquee 40s linear infinite;
    font-family: "Fraunces", serif; font-style: italic;
  }
  @keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
  }
  .foot-inner .heart{ color: var(--pink); }

  @media (max-width: 900px){
    .foot-inner{ grid-template-columns: 1fr 1fr; gap: 32px; padding: 48px 24px 24px; }
    .foot-greet{ grid-column: 1 / -1; }
    .foot-bottom-inner{ grid-template-columns: 1fr; text-align:center; gap: 8px; }
    .foot-marquee{ order: -1; }
  }
  @media (max-width: 540px){
    .foot-inner{ grid-template-columns: 1fr; }
  }

  /* ---------- Photo upload ---------- */
  .photo-row{
    display:flex; align-items:center; gap: 10px;
    padding: 10px; border:1.5px dashed var(--ink);
    border-radius: 14px; background: #fff;
    margin-bottom: 8px;
  }
  .photo-row .toggle{ display:flex; align-items:center; gap:8px; font-weight: 600; font-size: 13px; cursor:pointer; user-select:none; flex: 0 0 auto; }
  .photo-row .toggle input{ width: 16px; height: 16px; accent-color: var(--pink-deep); }
  .photo-row .file-btn{
    flex: 1; font-size: 12px; padding: 6px 12px; border-radius: 999px;
    border:1.5px solid var(--ink); background: var(--mint); cursor:pointer;
    font-weight: 700; box-shadow: 2px 2px 0 var(--ink); text-align:center;
  }
  .photo-row .file-btn[disabled]{ opacity: 0.4; pointer-events:none; }
  .photo-row .thumb{
    width: 44px; height: 44px; border-radius: 50%; border:1.5px solid var(--ink);
    object-fit: cover; background: #f0e6da;
  }
  .photo-row .clear{
    border:1.5px solid var(--ink); background:#fff; border-radius: 50%;
    width: 28px; height: 28px; cursor:pointer; font-weight: 700; line-height: 1;
  }
  .photo-row .file-hint{ font-size: 11px; color: var(--ink-2); }
  .photo-row input[type=file]{ display:none; }

  /* photo display in card / screen */
  .photo-circle{
    width: 110px; height: 110px; border-radius: 50%;
    border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--ink), 4px 4px 0 var(--ink);
    object-fit: cover; background:#fff;
    display:block; margin: 0 auto 14px;
  }
  .sc-photo{
    width: clamp(80px, 14cqw, 220px); height: clamp(80px, 14cqw, 220px);
    border-radius: 50%; object-fit: cover;
    border: 4px solid #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    display:block; margin: 0 auto 1em;
    opacity: 0; animation: pop 700ms 100ms forwards;
  }
  .banner-photo{
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
    border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 3;
  }

  /* Banner customizer panel */
  .banner-customize{
    margin-top: 18px; padding: 18px; border:1.5px solid var(--ink); border-radius: 18px;
    background: var(--bg-2); box-shadow: 4px 4px 0 var(--ink);
    display: grid; grid-template-columns: 1.2fr 2fr; gap: 18px; align-items: start;
  }
  .banner-customize .preview{
    aspect-ratio: 16/7; border:1.5px solid var(--ink); border-radius: 14px; overflow:hidden;
    box-shadow: 4px 4px 0 var(--ink); position:relative; background:#fff;
  }
  .banner-customize h4{ font-family:"Fraunces", serif; margin: 0 0 6px; font-size: 18px; }
  .banner-customize .controls{ display:grid; gap: 12px; }
  .banner-customize .row-actions{ display:flex; gap: 8px; flex-wrap: wrap; }
  @media (max-width: 760px){
    .banner-customize{ grid-template-columns: 1fr; }
  }

  /* ---------- Toast ---------- */
  .toast{
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
    background: var(--ink); color: var(--bg);
    padding: 12px 18px; border-radius: 999px;
    font-size: 14px; font-weight: 600;
    opacity: 0; pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
    z-index: 300;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  }
  .toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }
  .scroll-top{
    position: fixed; right: 22px; bottom: 24px; z-index: 290;
    width: 52px; height: 52px; border-radius: 50%;
    border: 1.5px solid var(--ink); background: var(--yellow); color: var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    font: 900 22px/1 "Fraunces", serif;
    cursor: pointer; opacity: 0; pointer-events: none;
    transform: translateY(16px);
    transition: opacity 180ms ease, transform 180ms ease, box-shadow 120ms ease;
  }
  .scroll-top.show{
    opacity: 1; pointer-events: auto; transform: translateY(0);
  }
  .scroll-top:hover{ box-shadow: 7px 7px 0 var(--ink); transform: translate(-1px,-1px); }

  /* Background confetti */
  .bg-confetti{ position: absolute; inset: 0; pointer-events:none; overflow: hidden; z-index: -1;}
  .bg-confetti span{
    position:absolute; width: 10px; height: 14px; border-radius: 2px;
    animation: drift 12s linear infinite; opacity: 0.85;
  }
  @keyframes drift{ 0%{transform:translateY(-20px) rotate(0deg);} 100%{transform:translateY(110vh) rotate(540deg);} }
  @keyframes float-y{ 0%,100%{transform:translateY(0) rotate(var(--r,0deg));} 50%{transform:translateY(-10px) rotate(var(--r,0deg));} }
  .floaty{ animation: float-y 5s ease-in-out infinite; }

  /* Floating confetti for show-mode */
  .sc-confetti{ position:absolute; inset:0; pointer-events:none; overflow:hidden; }
  .sc-confetti span{
    position:absolute; width: 10px; height: 14px; border-radius: 2px;
    top: -20px; animation: scfall linear infinite;
  }
  @keyframes scfall{ to{ transform: translateY(120cqh) rotate(720deg); } }

  /* ---------- Flat UI: border only ---------- */
  .brand-mark,
  .brand-mark--legacy,
  .eyebrow,
  .btn,
  .btn.ghost:hover,
  .pill,
  .studio,
  .field input,
  .field textarea,
  .field select,
  .sw,
  .custom-pop,
  .tpl,
  .card-preview,
  .cp-top .age,
  .screen-builder,
  .scene-card,
  .details-panel,
  .screen-frame,
  .show-stage,
  .show-controls .ctrl,
  .banner,
  .wish-search input,
  .cat,
  .wish,
  .icon-btn,
  .photo-row .file-btn,
  .photo-circle,
  .banner-customize,
  .banner-customize .preview,
  .scroll-top{
    box-shadow: none !important;
  }

  .btn:hover,
  .btn:active,
  .btn.ghost:hover,
  .show-controls .ctrl:hover,
  .banner:hover,
  .scroll-top:hover{
    box-shadow: none !important;
    transform: none !important;
  }

  .field input:focus,
  .field textarea:focus,
  .field select:focus,
  .wish-search input:focus{
    box-shadow: none !important;
  }

  @media (max-width: 980px){
    .studio, .screen-builder{ grid-template-columns: 1fr; }
    .studio-side, .screen-side{ border-right: none; border-bottom: 1.5px solid var(--ink); }
    .wishes-wrap{ grid-template-columns: 1fr; }
    .wishes{ grid-template-columns: 1fr; }
    .nav-links{ display: none; }
    .details-grid{
      grid-template-columns: 1fr;
      gap: 14px;
    }
    .details-panel--compact .field-span-2{
      grid-column: auto;
    }
    .card-maker-clone{
      grid-template-columns: 1fr;
    }
    .card-maker-side{
      min-height: auto;
      border-left: 0;
      border-top: 1.5px solid var(--ink);
      padding: 24px;
    }
  }
