/* layout: a sheet of crumpled grid paper; the tag hangs on the left, a right-hand panel holds
   the tag picker and a stack of small tickets that open up to edit one thing at a time */
:root {
  --paper: #F7F6F2;
  --grid: rgba(40, 38, 30, .055);
  --white: #FFFFFF;
  --ink: #141414;
  --ink-2: #474744;
  --muted: #8C8B85;
  --edge: rgba(20, 20, 10, .10);
  --edge-strong: rgba(20, 20, 10, .22);

  --f-ui: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-narrow: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", sans-serif;
  --f-hand: "Gaegu", "Segoe Print", "Comic Sans MS", cursive;

  --panel-w: 400px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  position: relative;
  margin: 0;
  color: var(--ink);
  font: 400 14px/1.45 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 36px 36px;
  background-position: -1px -1px;
}
/* crumpled paper: ridged noise lit from the top left, multiplied over the sheet */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='1100' viewBox='0 0 1600 1100' preserveAspectRatio='none'%3E%3Cfilter id='c' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='turbulence' baseFrequency='.0026 .0034' numOctaves='5' seed='11' result='t'/%3E%3CfeDiffuseLighting in='t' surfaceScale='5' lighting-color='%23ffffff' result='l'%3E%3CfeDistantLight azimuth='235' elevation='38'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E") center / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: .3;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .06 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button, input, select { font: inherit; color: inherit; }
.sr-only { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-w);
  height: 100%;
}

.stage {
  position: relative;
  overflow: hidden;
  min-height: 0;
  user-select: none;
  -webkit-user-select: none;
}
.site {
  position: absolute; z-index: 5; margin: 0;
  left: max(28px, env(safe-area-inset-left, 0px)); top: 26px;
  font: 600 22px/1 var(--f-ui); letter-spacing: -.035em;
  pointer-events: none;
}
.cursor { margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* ---------- the hanging rig ---------- */
.mount {
  position: absolute;
  left: 50%;
  top: 0;
  transform-origin: 50% 0;
  display: flex;
  justify-content: center;
}
.drop {
  transition: transform .6s cubic-bezier(.2, 1.3, .35, 1), opacity .25s ease;
}
.drop.leave { transform: translateY(-120%); transition: transform .24s cubic-bezier(.5, 0, .9, .45), opacity .2s; }
.drop.leave.from-sticker { transform: scale(.8) rotate(-8deg); opacity: 0; }
.drop.enter { transform: translateY(-120%); transition: none; }
.drop.enter.to-sticker { transform: scale(1.4) rotate(5deg); opacity: 0; }

.rig {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -400px;
  transform-origin: 50% 400px;
  perspective: 1100px;
  perspective-origin: 50% 85%;
  will-change: transform;
}
.rig.sticker { margin-top: 0; transform-origin: 50% 50%; }
.rig.sticker .strap, .rig.sticker .clip { display: none; }

.strap {
  width: 26px;
  height: var(--strap-h, 610px);
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, rgba(0,0,0,.22), rgba(0,0,0,0) 22%, rgba(0,0,0,0) 78%, rgba(0,0,0,.22)),
    var(--strap, #1E2329);
  overflow: hidden;
  display: flex;
  justify-content: center;
}
.strap span {
  writing-mode: vertical-rl;
  font: 700 10px/26px var(--f-display);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--strap-ink, rgba(255,255,255,.82));
  white-space: nowrap;
  padding-top: 380px;
}

.clip { position: relative; width: 40px; height: 46px; margin-bottom: -22px; z-index: 3; }
.clip-body, .clip-stem, .clip-ring { position: absolute; left: 50%; }
.clip-body {
  top: -2px; width: 32px; height: 18px; margin-left: -16px; border-radius: 4px;
  background: linear-gradient(90deg, #8E9097, #F5F6F8 32%, #B5B7BE 58%, #EEF0F2 80%, #8A8C93);
  box-shadow: 0 2px 3px rgba(0,0,0,.25);
}
.clip-stem {
  top: 15px; width: 8px; height: 10px; margin-left: -4px; border-radius: 2px;
  background: linear-gradient(90deg, #8E9097, #F0F1F3 45%, #9EA0A7);
}
.clip-ring {
  top: 22px; width: 28px; height: 30px; margin-left: -14px; border-radius: 50% 50% 46% 46%;
  border: 4px solid #C9CBD1;
  border-top-color: #EEF0F2; border-left-color: #A3A5AC;
  box-shadow: 0 2px 3px rgba(0,0,0,.22);
}

/* ---------- card + faces ---------- */
.card {
  position: relative;
  width: var(--cw, 300px);
  height: var(--ch, 440px);
  transform: rotateY(var(--twist, 0deg));
  transform-style: preserve-3d;
  cursor: grab;
  touch-action: none;
  outline: none;
  border-radius: 20px;
}
.rig.grabbing .card { cursor: grabbing; }
.card:focus-visible::after {
  content: ""; position: absolute; inset: -8px; border-radius: 26px;
  border: 3px solid var(--accent); pointer-events: none;
}
.flip {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .75s cubic-bezier(.3, 1.45, .5, 1);
}
.card.is-flipped .flip { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(15, 15, 30, .12), 0 22px 44px -18px rgba(15, 15, 30, .45);
}
.face.back { transform: rotateY(180deg); }
.face { transition: visibility 0s linear .19s; }
.card:not(.is-flipped) .face.back, .card.is-flipped .face.front { visibility: hidden; }
.rig.sticker .face.back { display: none; }
.rig.sticker .face { overflow: visible; }

.sheen {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 5;
  background: linear-gradient(110deg, rgba(255,255,255,0) 35%, rgba(255,255,255,.28) 47%, rgba(255,255,255,0) 58%);
  background-size: 300% 100%;
  background-position: calc(50% + var(--sh, 0) * 140%) 0;
}

.slot {
  position: absolute; top: 14px; left: 50%; width: 46px; height: 10px; margin-left: -23px; z-index: 4;
  border-radius: 6px; background: rgba(20,20,28,.16);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.3);
}
.dark .slot { background: rgba(255,255,255,.14); }

.fit { white-space: nowrap; overflow: hidden; }
.flip.slap { animation: slap .42s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes slap {
  0% { transform: scale(1); }
  28% { transform: scale(1.07, .9); }
  62% { transform: scale(.97, 1.04); }
  100% { transform: scale(1); }
}

/* --- classic: HELLO, I'M sticker --- */
.cl-wrap { height: 100%; padding: 10px; background: #FFFFFF; border-radius: 34px; }
.cl {
  height: 100%; border-radius: 26px; background: var(--c);
  display: flex; flex-direction: column; padding: 0 20px 22px;
}
.cl-head {
  width: 100%; text-align: center; color: #FFFFFF;
  font: 800 52px/1 var(--f-display); letter-spacing: .08em;
  padding: 22px 0 14px;
}
.cl-box {
  position: relative; flex: 1; background: #FFFFFF; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; padding: 0 18px; min-width: 0;
}
.cl-name {
  width: 100%; text-align: center; color: #141414;
  font: 700 86px/1.2 var(--f-hand); transform: rotate(-2deg);
}
.cl-pron { position: absolute; right: 12px; bottom: 8px; font: 500 14px var(--f-ui); color: #707070; }

/* stickers: flat on the paper at rest, lifted while dragged, pressed down when dropped */
.rig.sticker .face { box-shadow: 0 1px 1px rgba(15, 15, 30, .16), 0 4px 8px -4px rgba(15, 15, 30, .22); transition: box-shadow .22s ease; }
.rig.sticker.lifted .face { box-shadow: 0 2px 6px rgba(15, 15, 30, .1), 0 30px 46px -16px rgba(15, 15, 30, .42); transition-duration: .15s; }
.rig.sticker .flip { transition: transform .18s ease; }
.rig.sticker.lifted .flip { transform: scale(1.045); }
.flip.stick { animation: stick .38s cubic-bezier(.3, 1.2, .5, 1); }
@keyframes stick {
  0% { transform: scale(1.045); }
  40% { transform: scale(.975, .985); }
  72% { transform: scale(1.006); }
  100% { transform: scale(1); }
}

/* classic, round */
.card.is-circle .face { border-radius: 50%; }
.cl-wrap.circle { border-radius: 50%; }
.cl.circle { border-radius: 50%; justify-content: center; align-items: center; gap: 10px; padding: 0 30px 22px; }
.cl.circle .cl-head { padding: 0; width: 240px; }
.cl.circle .cl-box { flex: none; width: 100%; height: 132px; border-radius: 16px; }
.cl.circle .cl-pron { right: 12px; bottom: 6px; font-size: 13px; }

/* --- volunteer: "hi, i'm" lanyard badge --- */
.vol { height: 100%; position: relative; background: #F2F1ED; color: #1C2127; display: flex; flex-direction: column; }
.vol-org { margin-top: 42px; text-align: center; font: 800 14px var(--f-display); letter-spacing: -.01em; }
.vol-org span { font-weight: 500; }
.vol-main { margin-top: auto; padding: 0 24px 26px; }
.vol-hi { font: 700 46px/1 var(--f-display); letter-spacing: -.035em; }
.vol-pill {
  display: flex; width: fit-content; align-items: center; gap: 12px; max-width: 100%;
  margin-top: 10px; padding: 0 20px 0 16px; border-radius: 999px; background: #E3E1DA;
}
.vol-name { min-width: 0; padding: 4px 6px 0 2px; font: 700 64px/1.05 var(--f-hand); color: var(--a); }
.vol-pron { margin-top: 10px; font: 500 14px var(--f-ui); color: #6A6E74; }
.vol-band {
  height: 66px; flex: none; background: #1E2329; color: #F2F1ED;
  display: flex; align-items: center; justify-content: center; padding: 0 20px;
}
.vol-role { width: 100%; text-align: center; font: 600 27px/1.2 var(--f-display); letter-spacing: -.02em; }
.vol.dark { background: #1E2329; color: #F2F1ED; }
.vol-backtext {
  position: absolute; left: 24px; right: 20px; bottom: 26px; top: 150px;
  display: flex; align-items: flex-end;
  font: 700 58px/.98 var(--f-display); letter-spacing: -.04em;
}
.vol-backtext span { display: block; width: 100%; }
.vol-bigsmile { position: absolute; right: 30px; top: 74px; transform: scale(2.4); transform-origin: 100% 0; }

/* hand-drawn smiley (CSS only, so it exports cleanly) */
.smile { position: relative; flex: none; width: 34px; height: 26px; display: inline-block; }
.smile i { position: absolute; top: 2px; width: 4px; height: 9px; border-radius: 3px; background: var(--sc, #1C2127); }
.smile i:first-child { left: 9px; transform: rotate(-6deg); }
.smile i:nth-child(2) { left: 21px; transform: rotate(8deg); }
.smile b {
  position: absolute; left: 1px; top: 8px; width: 32px; height: 16px;
  border: 3px solid var(--sc, #1C2127); border-top: 0; border-radius: 0 0 32px 32px;
  transform: rotate(-4deg);
}



/* drawings on cards are blocks, so the exporter places them exactly where the screen does */
.card svg, .card img { display: block; }

/* cards whose outline isn't a rectangle cast their shadow from the drawing itself */
.card.no-box .face { box-shadow: none !important; overflow: visible; }
.card.no-box .sheen { display: none; }
.card.no-box .front .pc, .card.no-box:not(.is-flipped) .front .cf, .card.no-box.is-flipped .back .cf { filter: drop-shadow(0 2px 2px rgba(15, 15, 30, .14)) drop-shadow(0 16px 22px rgba(15, 15, 30, .2)); }
.rig.sticker.lifted .card.no-box .front .pc { filter: drop-shadow(0 4px 6px rgba(15, 15, 30, .12)) drop-shadow(0 32px 40px rgba(15, 15, 30, .32)); }
.rig.sticker .card.no-box .front .pc { filter: drop-shadow(0 1px 1px rgba(15, 15, 30, .18)) drop-shadow(0 4px 6px rgba(15, 15, 30, .16)); }

/* --- postcard: stamp-edged sticker with a little sea buddy --- */
.pc { position: relative; width: 460px; height: 240px; }
.pc-bg { position: absolute; inset: 0; display: block; }
.pc-critter { position: absolute; left: 34px; top: 64px; width: 172px; height: auto; }
.pc-write { position: absolute; left: 214px; right: 44px; bottom: 58px; display: flex; flex-direction: column; gap: 2px; }
.pc-greet { font: 700 18px/1 var(--f-hand); color: var(--ink); opacity: .55; }
.pc-name { font: 700 46px/1.15 var(--f-hand); color: var(--ink); padding: 0 4px 0 2px; }
.pc-line { height: 2.5px; border-radius: 2px; background: var(--ink); opacity: .85; margin-top: 2px; }

/* --- slogan: one card, a soft look and a bold look --- */
.sl { height: 100%; position: relative; overflow: hidden; background: var(--bg); color: var(--ink); }
.sl-tex { position: absolute; inset: 0; opacity: .22; background-size: 300px 300px; pointer-events: none; }
.sl .slot { background: rgba(255, 255, 255, .7); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.sl-smile { position: absolute; width: 130px; height: auto; }
.sl-smile.s1 { right: -18px; top: 54px; transform: rotate(-12deg); }
.sl-smile.s2 { left: -34px; bottom: 82px; transform: rotate(14deg); }
.sl-smile.s3 { left: 50%; top: 96px; transform: translateX(-50%) rotate(-6deg); }
.sl-stack { position: absolute; left: 26px; right: 26px; top: 128px; height: 200px; display: flex; align-items: center; justify-content: center; text-align: center; font: 500 58px/.92 var(--f-display); letter-spacing: -.05em; }
.sl-stack span { display: block; width: 100%; }
.sl-foot { position: absolute; left: 20px; right: 20px; bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.sl-foot b { font: 800 15px/1.2 var(--f-display); letter-spacing: -.01em; }
.sl-foot span { font: 500 11px var(--f-ui); opacity: .75; }
.sl-backtext { position: absolute; left: 26px; right: 26px; top: 236px; bottom: 74px; display: flex; align-items: center; justify-content: center; text-align: center; font: 600 40px/1 var(--f-display); letter-spacing: -.04em; }
.sl-backtext span { display: block; width: 100%; }
.sl-tag { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); max-width: 80%; padding: 4px 12px 5px; border-radius: 999px; border: 1.5px solid var(--ink); font: 600 12px var(--f-ui); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-ring { position: absolute; left: 0; right: 0; top: 40px; height: 22px; overflow: hidden; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); opacity: .85; }
.sl-ring span { display: block; white-space: nowrap; font: 700 11px/19px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; }
.sl-foot-back { flex-direction: row; justify-content: space-between; align-items: baseline; border-top: 1.5px solid var(--ink); padding-top: 8px; }
.sl-foot-back span { opacity: .85; }

/* --- coffee: starburst over a white card with a doodled coffee drinker --- */
.cf { position: relative; width: 340px; height: 450px; }
.cf-body { position: absolute; left: 34px; right: 34px; top: 96px; bottom: 0; background: #FFFFFF; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .05); }
.cf-burst { position: absolute; left: 0; top: 0; width: 340px; height: 230px; }
.cf-name { position: absolute; left: 88px; right: 88px; top: 64px; height: 104px; display: flex; align-items: center; justify-content: center; text-align: center; transform: rotate(-7deg); font: 700 56px/1 var(--f-hand); color: #111; padding: 0 4px; }
.cf-name span { display: block; width: 100%; overflow-wrap: normal; }
.cf-side { position: absolute; left: 14px; bottom: 16px; transform-origin: 0 100%; transform: rotate(-90deg) translateY(100%); white-space: nowrap; font: 400 11px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: #111; }
.cf-side b { font-weight: 800; letter-spacing: .1em; }
.cf-person { position: absolute; left: 22px; bottom: -6px; width: 240px; height: auto; }
.cf-star { position: absolute; right: 22px; top: 150px; width: 40px; height: 40px; transform: rotate(12deg); }
.cf-burst-back { height: 150px; }
.cf-body-back { top: 70px; }
.cf-backtext { position: absolute; left: 22px; right: 22px; top: 80px; bottom: 30px; display: flex; align-items: flex-end; font: 700 46px/1.05 var(--f-hand); color: #111; }
.cf-backtext span { display: block; width: 100%; }
.cf-star-b { top: 22px; right: 20px; }

/* --- licensed: a creative licence in a clear holder, with stickers --- */
.lc { height: 100%; position: relative; border-radius: 18px; background: rgba(255, 255, 255, .62); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .09), inset 0 2px 0 rgba(255, 255, 255, .9); color: #111; }
.lc .slot { top: 12px; background: rgba(20, 20, 28, .14); }
.lc-card { position: absolute; left: 14px; right: 14px; top: 34px; bottom: 14px; background: #FFFFFF; border: 2px solid #111; border-radius: 6px; padding: 26px 16px 12px; }
.lc-mono { font: 400 7.5px/1.2 "Courier Prime", "Courier New", monospace; letter-spacing: .08em; text-transform: uppercase; }
.lc-stars { position: absolute; left: 22px; right: 22px; top: 8px; display: flex; justify-content: space-between; }
.lc-stars svg:nth-child(odd) { margin-top: 3px; }
.lc-grid { display: grid; grid-template-columns: 142px minmax(0, 1fr); gap: 16px; height: 100%; }
.lc-left { position: relative; display: flex; flex-direction: column; gap: 4px; }
.lc-photo { width: 142px; height: 168px; border: 5px solid #111; background: #8E8A84 center / cover no-repeat; filter: grayscale(1) contrast(1.05); }
.lc-photo-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #EDEAE4; background: linear-gradient(160deg, #9A948C, #625E58); }
.lc-photo-empty span { font: 700 54px/1 var(--f-hand); }
.lc-photo-empty small { font: 400 7px "Courier Prime", monospace; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.lc-barcode { display: flex; height: 20px; margin-top: 8px; }
.lc-barcode i { display: block; height: 100%; background: #111; }
.lc-barcode b { display: block; height: 100%; }
.lc-cap { font-size: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 142px; }
.lc-right { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.lc-title { display: flex; flex-direction: column; }
.lc-title span:first-child { font: 900 40px/.86 var(--f-display); letter-spacing: -.03em; }
.lc-title span:last-child { font: 700 31px/.95 var(--f-narrow); letter-spacing: -.01em; }
.lc-fields { flex: 1; margin-top: 10px; border-left: 1.5px solid #111; display: flex; flex-direction: column; }
.lc-f { flex: 1; border-top: 1.5px solid #111; padding: 3px 0 3px 8px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.lc-f b { font: 800 17px/1.15 var(--f-display); letter-spacing: -.01em; text-transform: uppercase; white-space: nowrap; overflow: hidden; }
.lc-occ b { height: 34px; display: flex; align-items: center; white-space: normal; line-height: 1.05; font-size: 15px; }
.lc-occ b span { display: block; width: 100%; }
.lc-font { border-bottom: 1.5px solid #111; }
.lc-font em { font: 700 26px/1.2 var(--f-hand); font-style: normal; color: #111; white-space: nowrap; overflow: hidden; padding-right: 4px; }

/* stickers: each has a home on the card and a white die-cut edge */
.lk { position: absolute; z-index: 3; filter: drop-shadow(1px 1.5px 1px rgba(0, 0, 0, .18)); }
.lk svg { display: block; }
.lk-certified { display: flex; flex-direction: column; align-items: center; padding: 5px 10px 4px; border-radius: 50%; background: #E3F06B; border: 2px solid #111; font: 800 7.5px/1.05 var(--f-display); text-transform: uppercase; letter-spacing: .05em; box-shadow: 0 0 0 3px #FFFFFF; }
.lk-certified b { margin-top: 2px; padding: 1px 6px; border-radius: 4px; background: #111; color: #FFFFFF; font-size: 8px; letter-spacing: .1em; }
.lc-card .lk-certified { left: 2px; top: 170px; transform: rotate(-10deg); }
.lc-card .lk-heart { left: 108px; top: 156px; transform: rotate(8deg) scale(.78); }
.lc-card .lk-pencil { right: -14px; bottom: -14px; transform: rotate(-24deg) scale(.72); }
.lc-card .lk-nib { right: 8px; top: 72px; transform: rotate(14deg) scale(.7); }
.lc-card .lk-gold { left: 132px; top: 10px; transform: scale(.75); }
.lc-card .lk-holo { left: 118px; bottom: -6px; transform: rotate(12deg) scale(.62); }
.lc-card .lk-smiley { right: -14px; top: -18px; transform: rotate(12deg) scale(.9); }
.lc-card .lk-rainbow { left: -14px; top: -16px; transform: rotate(-24deg); }
.lk-back { right: 18px; top: 18px; }
.lc-card-back { display: flex; flex-direction: column; padding: 34px 18px 14px; }
.lc-backtext { flex: 1; display: flex; align-items: center; font: 900 34px/.95 var(--f-display); letter-spacing: -.02em; }
.lc-backtext span { display: block; width: 100%; }
.lc-backfoot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.lc-backfoot .lc-barcode { margin-top: 0; }

/* sticker picker: the stickers themselves, tap to stick or peel */
#stickerOpts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stk-opt { position: relative; height: 62px; padding: 0; border: 1px solid var(--edge); border-radius: 10px; background: #FBFBF9; cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s, transform .15s; }
.stk-opt:hover { border-color: var(--edge-strong); transform: translateY(-1px); }
.stk-opt[aria-checked="true"] { border-color: var(--ink); background: var(--white); box-shadow: inset 0 0 0 1px var(--ink); }
.stk-opt[aria-checked="true"]::after { content: ""; position: absolute; right: 5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.stk-prev { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.stk-prev .lk { position: static; transform: scale(.72); }
.stk-opt:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* glitter stars scattered over the desk while the licence is out */
.confetti { position: absolute; inset: 0; z-index: 0; isolation: isolate; pointer-events: none; opacity: 0; transition: opacity .4s; }
.confetti span { position: absolute; transform: scale(.4); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.stage[data-tpl="licence"] .confetti { opacity: .9; }
.stage[data-tpl="licence"] .confetti span { transform: scale(1); }

/* --- crayon: folded place card --- */
.cr { position: relative; width: 440px; height: 300px; border-radius: 6px; overflow: hidden; }
.cr-art { position: absolute; inset: 0; }
.cr-name { position: absolute; left: 92px; right: 92px; top: 74px; height: 78px; display: flex; align-items: center; justify-content: center; text-align: center; font: 700 64px/1.1 var(--f-hand); transform: rotate(-2deg); padding: 0 4px; }
.cr-pron { position: absolute; right: 22px; bottom: 16px; font: 700 26px/1 var(--f-hand); transform: rotate(-2deg); }
.cr-wax { position: absolute; left: 70px; top: 52px; pointer-events: none; opacity: .9; }
.card:has(.cr) .face { border-radius: 6px; }

/* --- glow: soft light with a face --- */
.gl { height: 100%; position: relative; background: #FFF6E6; }
.gl-orb { position: absolute; inset: -6%; animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); } }
.gl-top {
  position: relative; height: 198px; background: #FFFFFF; border-radius: 20px;
  padding: 34px 22px 18px; display: flex; flex-direction: column;
  box-shadow: 0 10px 26px -14px rgba(120, 70, 10, .35);
}
.gl-crumbs { font: 400 15px var(--f-ui); color: #A0A0A0; }
.gl-name { margin-top: auto; font: 500 44px/1.15 var(--f-ui); letter-spacing: -.035em; color: #121212; }
.gl-row { display: flex; align-items: center; gap: 14px; margin-top: 6px; font: 400 16px var(--f-ui); color: #1A1A1A; }
.gl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 4px; vertical-align: 2px; }
.gl-edit { margin-left: auto; color: #A0A0A0; }
.gl-backtext {
  position: absolute; left: 24px; right: 24px; top: 48px; height: 190px;
  font: 600 46px/1 var(--f-ui); letter-spacing: -.035em; color: #1C1408;
  display: flex; align-items: flex-start;
}
.gl-backtext span { display: block; width: 100%; }

.eye-pair {
  position: absolute; left: 50%; top: 318px; width: 96px; height: 50px; margin: -25px 0 0 -48px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.eye {
  display: block; width: 28px; height: 40px; border-radius: 999px; background: #FFFFFF;
  transform: translate(var(--ex, 0px), var(--ey, 0px)) rotate(-8deg);
  transition: height .09s ease, width .15s ease, border-radius .15s;
  box-shadow: 0 2px 6px rgba(160, 70, 0, .18);
}
.eye-pair.sleepy .eye { height: 14px; }
.eye-pair.happy .eye {
  width: 30px; height: 30px; background: transparent; box-shadow: none;
  border: 6px solid #FFFFFF; border-bottom-color: transparent; border-left-color: transparent; border-radius: 50%;
  transform: translate(var(--ex, 0px), var(--ey, 0px)) rotate(-45deg);
}
.eye-pair.blink .eye { height: 4px; }
.eye-pair.happy.blink .eye { height: 30px; }
.rig.grabbing .eye-pair:not(.happy) .eye { height: 46px; width: 32px; }
.gl-back .eye-pair { top: 350px; }




/* ---------- right panel ---------- */
.panel {
  min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 22px;
  padding: 24px max(24px, env(safe-area-inset-right, 0px)) 0 4px;
  scrollbar-width: thin; scrollbar-color: var(--edge-strong) transparent;
}

.pick { display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; }
/* tag picker: separate pills, like name-tag stickers on a sheet */
.share {
  position: fixed; z-index: 30;
  right: max(24px, env(safe-area-inset-right, 0px)); bottom: max(24px, env(safe-area-inset-bottom, 0px));
}
.share-item svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.share-pop {
  position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 20; width: 248px; padding: 6px;
  background: var(--white); border-radius: 12px; box-shadow: 0 0 0 1px var(--edge), 0 18px 36px -16px rgba(20, 20, 10, .35);
  display: flex; flex-direction: column;
}
.share-pop:not([hidden]) { animation: pop-in .18s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }
.share-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; font: inherit;
}
.share-item:hover { background: #F4F3EF; }
.share-item svg { width: 18px; height: 18px; color: var(--ink-2); }
.share-item span { display: flex; flex-direction: column; gap: 1px; }
.share-item b { font: 500 13.5px var(--f-ui); }
.share-item small { font-size: 12px; color: var(--muted); }
.share-btn:focus-visible, .share-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pick-h, .tickets-h { margin: 0; font: 500 16px var(--f-ui); letter-spacing: -.01em; color: var(--ink); }
/* tag picker: two rows of four, plain tiles in the same white as the tickets */
.seg-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.seg {
  height: 38px; padding: 0 6px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--white); color: var(--ink-2); font: 500 13.5px var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 0 0 1px var(--edge), 0 1px 2px rgba(20, 20, 10, .04);
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg:hover { box-shadow: 0 0 0 1px var(--edge-strong), 0 1px 2px rgba(20, 20, 10, .04); color: var(--ink); }
.seg[aria-pressed="true"] { background: var(--ink); color: var(--white); box-shadow: none; }
.seg:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.act.share-btn { width: 214px; }
.act.share-btn[aria-expanded="true"] { box-shadow: 0 0 0 1px var(--ink), 0 8px 18px -12px rgba(20, 20, 10, .25); }
.glyph { display: block; flex: none; border: 1.5px solid currentColor; border-radius: 2.5px; }
.glyph.portrait { width: 9px; height: 12px; }
.glyph.landscape { width: 13px; height: 9px; border-radius: 3px; }

/* tickets: each field is a small ticket with a numbered stub; it opens to fill in */
.tickets { display: flex; flex-direction: column; gap: 8px; }
.ticket {
  --notch-y: 29px;
  position: relative;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--edge), 0 1px 2px rgba(20, 20, 10, .04);
  -webkit-mask:
    radial-gradient(circle at 0 var(--notch-y), transparent 6px, #000 6.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% var(--notch-y), transparent 6px, #000 6.5px) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle at 0 var(--notch-y), transparent 6px, #000 6.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% var(--notch-y), transparent 6px, #000 6.5px) right / 51% 100% no-repeat;
  transition: box-shadow .2s, transform .2s;
}
.ticket:not(.is-open):hover { transform: translateX(-2px); box-shadow: 0 0 0 1px var(--edge-strong), 0 1px 2px rgba(20, 20, 10, .04); }
/* the stub's dashed tear line runs the full height of the ticket */
.ticket::before {
  content: ""; position: absolute; left: 46px; top: 0; bottom: 0; width: 0;
  border-left: 1px dashed var(--edge-strong); pointer-events: none;
}
.ticket.is-open { box-shadow: 0 0 0 1px var(--ink), 0 10px 24px -14px rgba(20, 20, 10, .3); }

.t-head {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) 20px; align-items: center;
  width: 100%; min-height: 54px; padding: 0 16px 0 0; border: 0; background: none; cursor: pointer; text-align: left;
}
.t-no {
  align-self: stretch; display: grid; place-items: center;
  font: 500 11px var(--f-ui); color: var(--muted); font-variant-numeric: tabular-nums;
}
.t-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 10px 0 10px 16px; }
.t-q { font: 500 14.5px/1.25 var(--f-ui); color: var(--ink); letter-spacing: -.01em; }
.t-plus { position: relative; width: 12px; height: 12px; justify-self: end; }
.t-plus::before, .t-plus::after { content: ""; position: absolute; left: 0; top: 5.25px; width: 12px; height: 1.5px; background: var(--ink-2); border-radius: 1px; transition: transform .25s; }
.t-plus::after { transform: rotate(90deg); }
.ticket.is-open .t-plus::after { transform: rotate(0deg); }

.t-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s cubic-bezier(.3, .7, .2, 1); }
.ticket.is-open .t-body { grid-template-rows: 1fr; }
.t-inner { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 0 16px 0 62px; }
.ticket.is-open .t-inner { padding-bottom: 16px; }

.t-input {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--edge); border-radius: 8px; background: #FBFBF9; outline: none;
  font: 400 15px var(--f-ui);
  transition: border-color .15s, background .15s;
}
.t-input:focus { border-color: var(--ink); background: var(--white); }
.t-input::placeholder { color: var(--muted); opacity: .75; }
#f-name { height: 50px; font: 700 28px var(--f-hand); padding-top: 3px; }

.greets { display: flex; flex-wrap: wrap; gap: 6px; padding: 3px; }
.greet {
  height: 32px; padding: 0 11px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--edge); background: #FBFBF9; font-size: 13.5px; color: var(--ink-2);
  transition: border-color .15s, background .15s;
}
.greet:hover { border-color: var(--edge-strong); }
.opt { display: inline-flex; align-items: center; gap: 8px; }
.shape-ic { display: block; border: 1.5px solid currentColor; }
.shape-ic.rect { width: 15px; height: 11px; border-radius: 3px; }
.shape-ic.circle { width: 13px; height: 13px; border-radius: 50%; }
.greet[aria-checked="true"] { border-color: var(--ink); background: var(--white); color: var(--ink); }

.q-text { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.link { align-self: flex-start; padding: 0; border: 0; background: none; cursor: pointer; font: 500 13px var(--f-ui); color: var(--ink); text-decoration: underline; text-decoration-color: var(--edge-strong); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }
.link.muted { color: var(--muted); }
.fine { font-size: 12px; color: var(--muted); }

.photo-row { display: flex; align-items: center; gap: 14px; }
.photo-tile { flex: none; width: 44px; height: 54px; border-radius: 6px; cursor: pointer; background: #FBFBF9 center / cover no-repeat; border: 1px dashed var(--edge-strong); }
.photo-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: none; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: var(--ink); }
.range::-moz-range-track { height: 2px; border-radius: 2px; background: var(--ink); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; border-radius: 50%; background: var(--white); border: 1.5px solid var(--ink); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 1.5px solid var(--ink); }
.range-ends { display: flex; justify-content: space-between; margin-top: -6px; font-size: 12px; color: var(--muted); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px; }
.swatch {
  width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
}
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--white), 0 0 0 3.5px var(--ink); }

/* actions sit on the stage, bottom left, so the tickets never push them away */
.actions {
  position: absolute; z-index: 4;
  left: max(28px, env(safe-area-inset-left, 0px)); bottom: 24px;
  display: flex; align-items: flex-end; gap: 20px;
}
.stack { display: flex; flex-direction: column; gap: 8px; width: 214px; }

/* the two actions: white tiles with an icon chip, a label and a live status line */
.act {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  width: 100%; padding: 9px 14px 9px 9px; border: 0; border-radius: 14px; cursor: pointer; text-align: left;
  background: var(--white); color: var(--ink);
  box-shadow: 0 0 0 1px var(--edge), 0 1px 2px rgba(20, 20, 10, .05), 0 8px 18px -12px rgba(20, 20, 10, .25);
  transition: transform .18s, box-shadow .18s;
}
.act:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--edge-strong), 0 1px 2px rgba(20, 20, 10, .05), 0 12px 22px -12px rgba(20, 20, 10, .3); }
.act:active { transform: translateY(0) scale(.985); }
.act-ic {
  grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: #F1F0EB; color: var(--ink);
  transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), background .2s, color .2s;
}
.act-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.act-t { font: 500 14px/1.2 var(--f-ui); }
.act { min-height: 56px; }
.act-s { font-size: 12px; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.act.primary .act-ic { background: var(--ink); color: var(--white); }
.act.primary:hover .act-ic svg { animation: nudge .5s ease; }
@keyframes nudge { 40% { transform: translateY(2px); } }
.act.primary.busy { cursor: progress; }
.act.primary.busy .act-ic svg { animation: nudge .8s ease infinite; }

/* flipped: the chip turns over and picks up a warm tint, nothing goes black */
#flipBtn[aria-pressed="true"] .act-ic { transform: rotateY(180deg); background: #FFE6D8; color: #B4471B; }
#flipBtn[aria-pressed="true"] .act-s { color: #B4471B; }
#flipBtn:disabled { cursor: not-allowed; transform: none; box-shadow: 0 0 0 1px var(--edge); background: rgba(255, 255, 255, .55); }
#flipBtn:disabled .act-t, #flipBtn:disabled .act-ic { opacity: .45; }
.act:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.hint {
  position: absolute; z-index: 2; left: 50%; bottom: 24px; transform: translateX(-50%); margin: 0;
  font-size: 12.5px; line-height: 1; color: var(--muted); white-space: nowrap; pointer-events: none;
}
.ghost, .txt {
  padding: 0; border: 0; background: none; cursor: pointer; font: 500 14px var(--f-ui); color: var(--ink);
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color .15s;
}
.ghost:hover, .txt:hover, .ghost[aria-pressed="true"] { text-decoration-color: currentColor; }
.ghost:disabled { color: var(--muted); cursor: not-allowed; text-decoration-color: transparent; }
.solid {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 20px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--ink); color: var(--white); text-decoration: none; font: 500 14px var(--f-ui); white-space: nowrap;
  transition: opacity .15s;
}
.solid:hover { opacity: .86; }
.solid.secondary { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--edge-strong); }
.solid:disabled { opacity: .5; cursor: progress; }

.t-head:focus-visible, .seg:focus-visible, .greet:focus-visible, .swatch:focus-visible, .link:focus-visible,
.ghost:focus-visible, .txt:focus-visible, .solid:focus-visible, .range:focus-visible, .photo-tile:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 2px;
}
.t-head:focus-visible { outline-offset: -4px; border-radius: 10px; }

/* ---------- save dialog + toast ---------- */
.dlg {
  border: 0; border-radius: 14px; padding: 0; overflow: hidden;
  background: var(--white); color: var(--ink); width: min(420px, calc(100vw - 32px));
  box-shadow: 0 0 0 1px var(--edge), 0 40px 80px -30px rgba(0, 0, 0, .35);
}
.dlg::backdrop { background: rgba(247, 246, 242, .8); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 0 22px; }
.dlg h2 { margin: 0; font: 600 17px var(--f-ui); letter-spacing: -.015em; }
.dlg-x { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: #F1F0EC; color: var(--ink); cursor: pointer; }
.dlg-x:hover { background: #E8E7E2; }
.dlg-x svg, .dlg-dl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dlg-x:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dlg-img { display: grid; place-items: center; padding: 22px 22px 6px; }
.dlg-img img { display: block; max-width: 100%; max-height: 52vh; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .14)); }

.dlg-actions { display: flex; padding: 18px 20px 20px; }
.dlg-dl { flex: 1; gap: 8px; height: 46px; border-radius: 12px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: 8px;
  font-size: 13px; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- small screens ---------- */
/* phone-only controls stay hidden on larger screens */
.tagbar, .panel-top { display: none; }

/* ---------- phones: same stage as desktop; the editor opens as a side column ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr) 0px; transition: grid-template-columns .35s cubic-bezier(.3, .7, .2, 1); }
  .editing .app { grid-template-columns: minmax(0, 1fr) min(62vw, 300px); }
  .site { left: max(22px, env(safe-area-inset-left, 0px)); top: calc(12px + env(safe-area-inset-top, 0px)); font-size: 19px; line-height: 42px; }

  /* flip, save and share become small icon buttons in the top right */
  /* top row, left to right: flip, save, share */
  .actions { left: auto; right: 66px; bottom: auto; top: calc(12px + env(safe-area-inset-top, 0px)); }
  .stack { flex-direction: row; width: auto; gap: 8px; }
  .share { right: 16px; bottom: auto; top: calc(12px + env(safe-area-inset-top, 0px)); }
  .act, .act.share-btn { width: 42px; min-height: 42px; height: 42px; padding: 0; border-radius: 12px; display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr; place-items: center; }
  .act .act-t, .act .act-s { display: none; }
  .act .act-ic { grid-row: auto; width: 42px; height: 42px; background: transparent; border-radius: 12px; }
  .act.primary .act-ic { background: transparent; color: var(--ink); }
  .act.share-btn { background: var(--ink); box-shadow: 0 8px 18px -10px rgba(20, 20, 10, .5); }
  .act.share-btn .act-ic { background: transparent; color: var(--white); }
  .act:disabled .act-ic { opacity: .35; }
  .share-pop { bottom: auto; top: calc(100% + 8px); }
  .hint { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(124px + env(safe-area-inset-bottom, 0px)); max-width: none; white-space: nowrap; text-align: center; }
  .editing .hint, .editing .site, .editing .actions, .editing .share { opacity: 0; pointer-events: none; }
  .actions, .share { transition: opacity .2s; }



  /* ---- phones: no 3D on the card (iOS draws black corners on 3D rounded layers) ---- */
  .card { transform: none !important; }
  .flip { transform: none !important; transition: none; transform-style: flat; }
  .face { -webkit-backface-visibility: visible; backface-visibility: visible; }
  .face.back { transform: none; }
  .flip.flat-flip { animation: flat-flip .38s cubic-bezier(.4, 0, .2, 1); }
  @keyframes flat-flip { 50% { transform: scaleX(.02); } }
  .rig:not(.sticker) .card:not(.no-box) .face { box-shadow: none; clip-path: inset(0 round 18px); }
  .rig:not(.sticker) .card:not(.no-box) .flip { filter: drop-shadow(0 2px 3px rgba(15, 15, 30, .14)) drop-shadow(0 18px 22px rgba(15, 15, 30, .22)); }
  .tagpill.edit-toggle { display: none; }

  /* ---- bottom: field pills that open a little card, and one tag-type button ---- */
  .panel {
    position: fixed; z-index: 12; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    display: block; height: auto; overflow: visible; padding: 0; background: none; box-shadow: none;
  }
  .panel-top, .pick { display: none; }
  .tickets {
    flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none;
    padding: 4px max(12px, env(safe-area-inset-right, 0px)) 4px max(12px, env(safe-area-inset-left, 0px));
  }
  .tickets::-webkit-scrollbar { display: none; }
  .ticket, .ticket.is-open, .ticket:not(.is-open):hover { flex: none; -webkit-mask: none; mask: none; transform: none; border-radius: 10px; box-shadow: 0 0 0 1px var(--edge), 0 1px 2px rgba(20, 20, 10, .05); }
  .ticket::before, .t-no, .t-plus, .t-q { display: none; }
  .t-head { display: flex; align-items: center; min-height: 0; height: 36px; padding: 0 14px; }
  .t-head::after { content: attr(data-short); font: 500 13.5px var(--f-ui); color: var(--ink-2); white-space: nowrap; }
  .t-main { padding: 0; }
  .ticket.is-open { background: var(--ink); }
  .ticket.is-open .t-head::after { color: var(--white); }
  .ticket .t-body { display: none; }
  .ticket.is-open .t-body {
    display: block; position: fixed; z-index: 13; left: 12px; right: 12px; bottom: calc(118px + env(safe-area-inset-bottom, 0px));
    background: var(--white); border-radius: 14px; box-shadow: 0 0 0 1px var(--edge), 0 18px 36px -16px rgba(20, 20, 10, .35);
    animation: sheet-up .2s ease-out;
  }
  @keyframes sheet-up { from { opacity: 0; transform: translateY(8px); } }
  .t-body::before { content: attr(data-q); display: block; padding: 14px 16px 0; font: 500 14px var(--f-ui); color: var(--ink); }
  .t-inner, .ticket.is-open .t-inner { padding: 12px 16px 16px; overflow: visible; }
  .t-head:focus-visible { outline-offset: -3px; border-radius: 10px; }

  .tagbar {
    position: fixed; z-index: 14; left: 0; right: 0; bottom: 0; display: block;
    padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  }
  .typebtn {
    width: 100%; height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 16px; border: 0; border-radius: 12px; cursor: pointer;
    background: var(--ink); color: var(--white); font: 500 15px var(--f-ui); touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  }
  .typebtn-l { color: rgba(255, 255, 255, .6); }
  .typebtn-v { flex: 1; text-align: left; }
  .typebtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
  .typebtn[aria-expanded="true"] svg { transform: rotate(180deg); }
  .typemenu {
    position: absolute; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(100% - 2px);
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px;
    background: var(--white); border-radius: 14px; box-shadow: 0 0 0 1px var(--edge), 0 18px 36px -16px rgba(20, 20, 10, .35);
    animation: sheet-up .2s ease-out;
  }
  .typemenu[hidden] { display: none; }
  .tagpill {
    height: 44px; padding: 0 12px; border: 0; border-radius: 9px; cursor: pointer; text-align: left;
    background: #F4F3EF; color: var(--ink-2); font: 500 14px var(--f-ui); touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  }
  .tagpill[aria-pressed="true"] { background: var(--ink); color: var(--white); }
  .t-input { font-size: 16px; }
  .greet { font-size: 13px; }
  .act, .seg, .t-head, .greet, .swatch, .link { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .drop, .flip, .t-body, .seg-ind, .t-plus::before, .t-plus::after { transition-duration: .01s !important; animation: none !important; }
  .gl-orb, .cursor { animation: none; }
}

/* ---------- export: flatten 3D so html2canvas sees a plain card ---------- */
.exporting .mount, .exporting .drop, .exporting .rig, .exporting .card, .exporting .flip, .exporting .face, .exporting .gl-orb {
  transform: none !important; transition: none !important; animation: none !important;
}
.exporting .card:not(.is-flipped) .back, .exporting .card.is-flipped .front, .exporting .sheen { display: none !important; }
.exporting .face { box-shadow: none !important; }
.exporting .fit { overflow: visible !important; }

