/* Interactive service demos. Sizes use cqw (1% of the demo's width), so each demo
   scales as one piece. Colours come from the card tone (deck.css). */
/* Brand demo typefaces. Fetched only when the Brand card is reached. Bodoni Moda: SIL OFL 1.1. */
@font-face { font-family: "Bodoni Moda"; src: url(brandfonts/BodoniModa-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(brandfonts/IBMPlexMono-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
.demo { position: relative; width: min(100%, calc(calc(var(--vh, 1vh) * 60) * 4 / 3)); aspect-ratio: 4 / 3; container-type: inline-size; border-radius: 24px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); user-select: none; -webkit-user-select: none; touch-action: pan-y; text-align: left; }
.dm { position: absolute; inset: 0; padding: 6cqw; display: flex; flex-direction: column; gap: 3cqw; color: var(--ink); }
.dm-lab { font: 500 max(2.5cqw, 11.5px)/1.25 var(--sans); color: var(--muted); }
.dm-big { font: 700 7.5cqw/1 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.dm-row { display: flex; justify-content: space-between; align-items: flex-start; }
.dm-tag { font: 600 max(2.1cqw, 10px)/1 var(--sans); color: var(--muted); border: 1px solid var(--line); padding: 1.3cqw 2.2cqw; border-radius: 99px; }
.demo button { font-family: var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.demo .sq-in:focus-visible { outline: none; }
.demo button:focus-visible, .demo [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pop { animation: pop .45s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { 35% { transform: scale(.9); } 70% { transform: scale(1.08); } }
/* burst particles */
.pt { position: absolute; width: 3.6cqw; height: 3.6cqw; margin: -1.8cqw 0 0 -1.8cqw; pointer-events: none; z-index: 9; animation: pt .9s cubic-bezier(.2,.8,.2,1) both; }
.pt.heart { background: #E05A47; -webkit-mask: var(--heart) center/contain no-repeat; mask: var(--heart) center/contain no-repeat; }
.pt.conf { width: 1.6cqw; height: 2.4cqw; margin: -1.2cqw 0 0 -.8cqw; border-radius: .3cqw; background: var(--accent); }
.pt.conf:nth-child(3n) { background: var(--ink); } .pt.conf:nth-child(3n+1) { background: #E05A47; }
@keyframes pt { from { opacity: 1; transform: translate(0, 0) scale(.5) rotate(0); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--r)); } }
.demo { --heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/%3E%3C/svg%3E"); }

/* 1 performance */
.pf-h { display: flex; flex-direction: column; gap: 1.2cqw; }
.pf-wrap { position: relative; flex: 1; min-height: 0; }
.pf-chart { width: 100%; height: 100%; overflow: visible; }
.pf-hit { fill: transparent; cursor: pointer; }
.pf-bar { opacity: .9; transition: opacity .3s; } .pf-bar.pf-g { fill: var(--accent); } .pf-bar.pf-m { fill: var(--ink); } .pf-bar.pf-l { fill: #8A7A69; }
.pf-col { cursor: pointer; } .pf-col.hot .pf-bar { opacity: 1; }
.pf-col.pop .pf-bar { animation: pfPop .5s var(--ease); } @keyframes pfPop { 40% { opacity: .55; } }
.pf-plus { font: 700 11px var(--sans); fill: var(--accent-text); text-anchor: middle; opacity: 0; pointer-events: none; }
.pf-plus.go { animation: pfPlus 1.3s var(--ease) forwards; } @keyframes pfPlus { 0% { opacity: 0; transform: translateY(14px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px); } }
.pf-chs { display: flex; gap: 1.4cqw; flex-wrap: wrap; justify-content: flex-end; }
.pf-ch { display: inline-flex; align-items: center; gap: 1.2cqw; padding: 1.4cqw 2.4cqw; border: 1px solid var(--line); border-radius: 99px; background: none; color: var(--muted); font: 600 max(2.3cqw, 10px)/1 var(--sans); cursor: pointer; transition: color .3s, border-color .3s, background .3s; }
.pf-ch i { width: 1.8cqw; height: 1.8cqw; border-radius: 50%; border: 1px solid currentColor; transition: background .3s; }
.pf-ch.pf-g i { color: var(--accent); } .pf-ch.pf-m i { color: var(--ink); } .pf-ch.pf-l i { color: #8A7A69; }
.pf-ch[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); } .pf-ch[aria-pressed="true"] i { background: currentColor; }
.pf-ch.pf-g[aria-pressed="true"] i { background: var(--accent); } .pf-ch.pf-m[aria-pressed="true"] i { background: var(--ink); } .pf-ch.pf-l[aria-pressed="true"] i { background: #8A7A69; }
@media (hover: hover) { .pf-ch:hover { border-color: var(--accent); color: var(--ink); } }
.pf-ch.no { animation: pfNo .35s; } @keyframes pfNo { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.pf-chart:hover .pf-col:not(.hot) .pf-bar { opacity: .4; }
.pf-day { font: 500 11px var(--sans); fill: var(--muted); text-anchor: middle; }
.pf-col.hot .pf-day { fill: var(--accent-text); font-weight: 700; }
.pf-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; opacity: .7; }
.pf-tip { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; font: 600 max(2.4cqw, 10px)/1 var(--sans); padding: 1.6cqw 2.2cqw; border-radius: 1.6cqw;
  background: var(--accent); color: var(--on-accent); pointer-events: none; opacity: 0; transition: opacity .2s; }
.pf-tip.on { opacity: 1; }
.pf-meter { position: relative; height: 1.3cqw; border-radius: 1cqw; background: var(--line); cursor: pointer; touch-action: none; }
.pf-meter::before { content: ""; position: absolute; left: 0; right: 0; top: -3cqw; bottom: -3cqw; }   /* bigger grab area */
.pf-meter:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.pf-meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--accent); }
.pf-meter span { position: absolute; top: 50%; width: 4.4cqw; height: 4.4cqw; margin: -2.2cqw 0 0 -2.2cqw; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1.3cqw var(--accent-soft); cursor: grab; transition: box-shadow .3s, transform .3s; }
@media (hover: hover) { .pf-meter:hover span { box-shadow: 0 0 0 2cqw var(--accent-soft), 0 0 4cqw rgba(205,168,95,.6); } }
.pf-meter.drag span { cursor: grabbing; transform: scale(1.15); box-shadow: 0 0 0 2.4cqw var(--accent-soft), 0 0 5cqw rgba(205,168,95,.7); }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqw; border-top: 1px solid var(--line); padding-top: 3cqw; }
.pf-stats > div { display: flex; flex-direction: column; gap: 1cqw; }
.pf-stats b { font: 700 4.8cqw/1.1 var(--serif); font-variant-numeric: tabular-nums; }

/* 2 search */
.dm-seo { gap: 3.5cqw; }
.sq { display: flex; align-items: center; gap: 2.4cqw; padding: 1.4cqw 1.4cqw 1.4cqw 3.6cqw; border: 1px solid var(--line); border-radius: 99px; background: var(--panel-2); cursor: text; transition: border-color .3s, box-shadow .3s; }
.sq:hover, .sq.focus { border-color: var(--accent); box-shadow: 0 0 0 1cqw var(--accent-soft); }
.sq > svg { width: 3.8cqw; height: 3.8cqw; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.sq-box { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.sq-in { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 max(3cqw, 10px)/1.4 var(--sans); padding: 0; caret-color: var(--accent); }
.sq-mir { position: absolute; visibility: hidden; white-space: pre; font: 500 max(3cqw, 10px)/1.4 var(--sans); }
.caret { position: absolute; top: 50%; width: 2px; height: 3.8cqw; margin-top: -1.9cqw; margin-left: 1px; background: var(--accent); animation: caret 1s steps(2) infinite; pointer-events: none; }
.sq.focus .caret { display: none; }
@keyframes caret { 50% { opacity: 0; } }
.sq-go { flex: none; font: 600 max(2.4cqw, 10px)/1 var(--sans); padding: 2.2cqw 3.4cqw; border-radius: 99px; background: var(--accent); color: var(--on-accent); }
.slist { position: relative; flex: 1; }
.slist.refresh .other .sr-txt { animation: shim .5s ease; }
@keyframes shim { 40% { opacity: .2; } }
.sr { --i: 0; position: absolute; left: 0; right: 0; top: 0; height: 9.4cqw; display: flex; align-items: center; gap: 3cqw; padding: 0 3cqw; border-radius: 2.2cqw;
  transform: translateY(calc(var(--i) * 10.6cqw)); transition: transform .7s cubic-bezier(.2,.8,.2,1), background .3s; }
.sr-pos { flex: none; width: 5.2cqw; height: 5.2cqw; border-radius: 50%; display: grid; place-items: center; font: 600 max(2.4cqw, 10px)/1 var(--sans); font-style: normal; color: var(--muted); border: 1px solid var(--line); }
.sr-txt { display: flex; flex-direction: column; gap: 1.4cqw; flex: 1; min-width: 0; }
.sr-txt u { display: block; height: 1.5cqw; width: 70%; border-radius: 1cqw; background: var(--line); text-decoration: none; transition: background .3s; }
.sr-txt u + u { width: 42%; height: 1.2cqw; }
.sr-tag { font: 600 max(2cqw, 10px)/1 var(--sans); color: var(--muted); opacity: 0; transition: opacity .25s; }
.sr.other:hover { background: var(--panel-2); }
.sr.other:hover u { background: var(--muted); opacity: .45; }
.sr.other:hover .sr-tag { opacity: 1; }
.sr.you { background: var(--accent-soft); border: 1px solid var(--accent); z-index: 2; cursor: pointer; outline: none; }
.sr.you .sr-pos { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.sr.you b { font: 700 3.1cqw/1.1 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr.you .sr-txt > span { font: 500 max(2.3cqw, 10px)/1 var(--sans); color: var(--accent-text); }
.sr.you.top { box-shadow: 0 0 0 1cqw var(--accent-soft); }
.snip { position: absolute; left: 11cqw; right: 3cqw; top: calc(100% + 1cqw); display: flex; align-items: center; gap: 2.4cqw; padding: 2.2cqw 2.6cqw; border-radius: 2cqw;
  background: var(--panel); border: 1px solid var(--accent); font: 500 max(2.3cqw, 10px)/1 var(--sans); color: var(--muted); opacity: 0; transform: translateY(-1.5cqw); pointer-events: none;
  transition: opacity .3s, transform .4s cubic-bezier(.2,.8,.2,1); box-shadow: 0 3cqw 6cqw -3cqw rgba(0,0,0,.4); }
.snip .stars { color: var(--accent); letter-spacing: .3cqw; }
.snip em { margin-left: auto; font-style: normal; font-weight: 600; padding: 1.4cqw 2.4cqw; border-radius: 99px; background: var(--accent); color: var(--on-accent); }
.sr.you:hover .snip, .sr.you:focus .snip { opacity: 1; transform: none; }
.sai { position: absolute; right: 5cqw; bottom: 5cqw; display: flex; align-items: center; gap: 2cqw; padding: 2.4cqw 3.2cqw; border-radius: 2.4cqw; font: 500 max(2.5cqw, 10px)/1.3 var(--sans);
  background: var(--panel); border: 1px solid var(--accent); box-shadow: 0 3cqw 6cqw -3cqw rgba(0,0,0,.45); opacity: 0; transform: translateY(3cqw) scale(.96); transition: opacity .45s, transform .55s cubic-bezier(.2,.8,.2,1); z-index: 3; pointer-events: none; }
.sai svg { width: 4cqw; height: 4cqw; fill: var(--accent); }
.sai.on { opacity: 1; transform: none; }

/* 3 social */
.dm-social { flex-direction: row; align-items: center; justify-content: space-between; gap: 3cqw; }
.sc-side { width: 22cqw; display: flex; flex-direction: column; align-items: center; gap: 3cqw; text-align: center; }
.sc-btn { display: flex; align-items: center; justify-content: center; gap: 1.6cqw; width: 100%; padding: 3cqw 0; border-radius: 99px; font: 700 max(3cqw, 10px)/1 var(--sans);
  border: 1.5px solid var(--accent); background: transparent; color: var(--ink); transition: background .25s, color .25s, transform .2s; }
.sc-btn svg { width: 4cqw; height: 4cqw; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sc-btn.like svg { fill: #E05A47; stroke: #E05A47; }
.sc-btn:hover { background: var(--accent-soft); transform: translateY(-.4cqw); }
.sc-btn.fol { background: var(--accent); color: var(--on-accent); }
.sc-btn.fol:hover { background: var(--ink); color: var(--panel); }
.sc-btn.fol.on { background: transparent; color: var(--accent-text); }
.sc-n { display: flex; flex-direction: column; gap: .8cqw; }
.sc-n b { font: 700 6.4cqw/1 var(--serif); font-variant-numeric: tabular-nums; }
.ph { position: relative; height: 96%; aspect-ratio: 9 / 18.5; border-radius: 5.4cqw; padding: 1cqw; background: var(--frame); flex: none; }
.ph-scr { position: relative; height: 100%; border-radius: 4.4cqw; overflow: hidden; background: var(--panel-2); display: flex; flex-direction: column; }
.ph-prof { display: flex; align-items: center; gap: 1.4cqw; padding: 3cqw 2.2cqw 2cqw; border-bottom: 1px solid var(--line); }
.ph-prof > i { width: 4.6cqw; height: 4.6cqw; border-radius: 50%; background: var(--accent); flex: none; }
.ph-who { display: flex; flex-direction: column; gap: .5cqw; min-width: 0; flex: 1; }
.ph-who b { font: 700 max(2.2cqw, 10px)/1 var(--sans); } .ph-who span { font: 500 max(1.7cqw, 10px)/1 var(--sans); color: var(--muted); white-space: nowrap; }
.ph-fol { font: 700 max(1.8cqw, 10px)/1 var(--sans); padding: 1.3cqw 1.8cqw; border-radius: 99px; border: 0; background: var(--accent); color: var(--on-accent); }
.ph-fol.on { background: var(--line); color: var(--ink); }
.ph-feed { flex: 1; overflow: hidden; }
.ph-trk { padding: 2cqw; display: flex; flex-direction: column; gap: 2cqw; will-change: transform; }
.fp { border-radius: 2.2cqw; background: var(--panel); padding: 1.6cqw; display: flex; flex-direction: column; gap: 1.2cqw; }
.fp-m { aspect-ratio: 1; border-radius: 1.6cqw; display: grid; place-items: center; cursor: pointer; }
.fp-m svg { width: 70%; height: 70%; fill: var(--accent); }
.fp-m .k { fill: var(--panel); } .fp-m .k2 { fill: var(--ink); opacity: .5; }
.fp-m.m0 { background: linear-gradient(150deg, #3A2B1D, #1E1712); } .fp-m.m1 { background: linear-gradient(150deg, #E9DFCF, #CDBB9C); } .fp-m.m2 { background: linear-gradient(150deg, #2C3B33, #1A221E); }
.fp-like { align-self: flex-start; display: flex; align-items: center; gap: 1cqw; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 99px; padding: .9cqw 1.6cqw; font: 600 max(1.9cqw, 10px)/1 var(--sans); }
.fp-like svg { width: 2.8cqw; height: 2.8cqw; fill: none; stroke: currentColor; stroke-width: 2; }
.fp-like:hover { border-color: #E05A47; }
.fp-like.liked svg { fill: #E05A47; stroke: #E05A47; }

/* 4 website */
.dm-web { gap: 3cqw; }
.wb-seg { align-self: center; display: flex; gap: 1cqw; padding: 1cqw; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); }
.wb-seg button { display: flex; align-items: center; gap: 1.4cqw; padding: 1.8cqw 3cqw; border-radius: 99px; border: 0; background: transparent; color: var(--muted); font: 600 max(2.5cqw, 10px)/1 var(--sans); transition: background .25s, color .25s, transform .2s; }
.wb-seg svg { width: 3.6cqw; height: 3.6cqw; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wb-seg button:hover, .wb-seg button.prev { color: var(--ink); background: var(--accent-soft); }
.wb-seg button.on { background: var(--accent); color: var(--on-accent); }
.wb-stage { position: relative; flex: 1; min-height: 0; display: flex; justify-content: center; }
.wb { height: 100%; width: 100%; border-radius: 2.2cqw; border: 1px solid var(--line); background: var(--panel-2); overflow: hidden; display: flex; flex-direction: column; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.wb-top { display: flex; align-items: center; gap: 1cqw; padding: 1.8cqw 2.2cqw; border-bottom: 1px solid var(--line); font: 500 max(2cqw, 10px)/1 var(--sans); color: var(--muted); white-space: nowrap; overflow: hidden; }
.wb-top i { width: 1.4cqw; height: 1.4cqw; border-radius: 50%; background: var(--line); flex: none; }
.wb-top span { margin-left: 1.6cqw; }
.wb-body { flex: 1; padding: 2.6cqw; display: flex; flex-direction: column; gap: 2.4cqw; min-height: 0; }
.wb-nav { display: flex; align-items: center; gap: 2cqw; }
.wb-nav b { width: 9cqw; height: 2cqw; border-radius: 1cqw; background: var(--ink); opacity: .75; margin-right: auto; }
.wb-nav span { width: 6cqw; height: 1.2cqw; border-radius: 1cqw; background: var(--line); }
.wb-nav em { display: none; width: 4cqw; height: 2.6cqw; border-top: 2px solid var(--muted); border-bottom: 2px solid var(--muted); }
.wb.mob .wb-nav span { display: none; } .wb.mob .wb-nav em { display: block; }
.wb-hero { display: flex; flex-direction: column; gap: 1.6cqw; align-items: flex-start; padding: 3cqw; border-radius: 1.8cqw; background: var(--accent-soft); }
.wb-hero b { height: 2.6cqw; width: 60%; border-radius: 1cqw; background: var(--ink); opacity: .8; } .wb-hero b.s { width: 40%; opacity: .35; height: 1.6cqw; }
.wb-hero span { font: 600 max(2cqw, 10px)/1 var(--sans); padding: 1.4cqw 2.4cqw; border-radius: 99px; background: var(--accent); color: var(--on-accent); margin-top: .6cqw; transition: transform .2s; }
.wb-hero span:hover { transform: scale(1.06); }
.wb-grid { display: grid; gap: 1.8cqw; flex: 1; min-height: 0; overflow: hidden; align-content: start; }
.wb-grid div { height: 8cqw; border-radius: 1.4cqw; background: var(--panel); border: 1px solid var(--line); transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s; }
.wb-grid div:hover { transform: translateY(-.8cqw); border-color: var(--accent); }
.wb-foot { display: flex; align-items: center; gap: 3cqw; font: 600 max(2.6cqw, 10px)/1 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.wb-fast { margin-left: auto; display: flex; align-items: center; gap: 1.6cqw; color: var(--accent-text); }
.wb-fast svg { width: 5.5cqw; height: 5.5cqw; transform: rotate(-90deg); }
.wb-fast circle { fill: none; stroke: var(--line); stroke-width: 3; }
.wb-fast .arc { stroke: var(--accent); stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; transition: stroke-dashoffset 1.6s cubic-bezier(.2,.8,.2,1) .3s; }
.dk.in .wb-fast .arc { stroke-dashoffset: 5; }

/* 5 app */
.dm-app { flex-direction: row; align-items: center; gap: 4cqw; }
.ap-side { width: 30cqw; display: flex; flex-direction: column; gap: 2.4cqw; }
.ap-side button { display: flex; align-items: center; gap: 2cqw; padding: 2.8cqw 3cqw; border-radius: 2.4cqw; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font: 600 max(2.7cqw, 10px)/1 var(--sans); text-align: left; transition: border-color .25s, background .25s, transform .2s; }
.ap-side button svg { width: 4cqw; height: 4cqw; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ap-side button:hover { border-color: var(--accent); transform: translateX(.8cqw); }
.ap-side button.on { background: var(--accent); color: var(--on-accent); } .ap-side button.on svg { stroke: var(--on-accent); }
.busy svg, .ap-btn.busy { animation: spin .9s linear infinite; }
.ap-btn.busy { animation: none; opacity: .6; }
@keyframes spin { to { transform: rotate(360deg); } }
.ap-scene { flex: 1; height: 100%; display: grid; place-items: center; perspective: 120cqw; }
.ap-phone { position: relative; height: 96%; aspect-ratio: 9 / 18.5; border-radius: 5.4cqw; padding: 1cqw; background: var(--frame); transform-style: preserve-3d; }
.ap-scr { height: 100%; border-radius: 4.4cqw; background: var(--panel-2); color: var(--ink); padding: 3cqw 2.2cqw 2cqw; display: flex; flex-direction: column; gap: 2cqw; transition: background .4s, color .4s; }
.ap-scr.dark { background: #0F0B09; color: #F1E9DE; --panel: #1E1713; --line: rgba(241,233,222,.12); --muted: #B3A392; }
.ap-hd { display: flex; justify-content: space-between; align-items: center; font: 700 3.4cqw/1 var(--serif); }
.ap-bell { position: relative; } .ap-bell svg { width: 3.6cqw; height: 3.6cqw; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ap-bell i { position: absolute; right: -1.2cqw; top: -1.2cqw; min-width: 3cqw; height: 3cqw; border-radius: 99px; background: #E05A47; color: #fff; font: 700 max(1.7cqw, 10px)/3cqw var(--sans); font-style: normal; text-align: center; transform: scale(0); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.ap-bell i.on { transform: scale(1); }
.ap-views { position: relative; flex: 1; min-height: 0; }
.ap-view { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 2cqw; opacity: 0; transform: translateX(4cqw); pointer-events: none; transition: opacity .3s, transform .4s cubic-bezier(.2,.8,.2,1); }
.ap-view.on { opacity: 1; transform: none; pointer-events: auto; }
.ap-card { border-radius: 2.2cqw; background: var(--panel); padding: 2cqw; display: flex; flex-direction: column; gap: 1.2cqw; }
.ap-card svg { width: 100%; height: 10cqw; overflow: visible; }
.ap-card path { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.ap-btn { margin-top: auto; border: 0; font: 600 max(2.3cqw, 10px)/1 var(--sans); padding: 2.2cqw; border-radius: 99px; background: var(--accent); color: var(--on-accent); }
.ap-orders { display: flex; flex-direction: column; gap: 1.4cqw; }
.ap-o { display: flex; align-items: center; justify-content: space-between; gap: 1cqw; padding: 1.6cqw; border-radius: 1.8cqw; background: var(--panel); font: 600 max(1.9cqw, 10px)/1 var(--sans); }
.ap-o.new { animation: slideIn .5s cubic-bezier(.2,.8,.2,1); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-2cqw); } }
.ap-o button { display: flex; align-items: center; gap: .6cqw; border: 0; padding: 1.1cqw 1.6cqw; border-radius: 99px; background: var(--accent); color: var(--on-accent); font: 700 max(1.7cqw, 10px)/1 var(--sans); }
.ap-o button svg { width: 2cqw; height: 2cqw; fill: none; stroke: currentColor; stroke-width: 3; }
.ap-o button:disabled { background: var(--line); color: var(--muted); cursor: default; }
.ap-ring { display: grid; place-items: center; gap: 1cqw; padding-top: 3cqw; text-align: center; }
.ap-ring svg { width: 20cqw; height: 20cqw; transform: rotate(-90deg); grid-area: 1 / 1; }
.ap-ring circle { fill: none; stroke: var(--line); stroke-width: 3.5; }
.ap-ring .arc { stroke: var(--accent); stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.ap-ring b { grid-area: 1 / 1; font: 700 6cqw/1 var(--serif); }
.ap-tabs { display: flex; gap: .8cqw; padding: .8cqw; border-radius: 99px; background: var(--panel); }
.ap-tabs button { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--muted); padding: 1.4cqw 0; border-radius: 99px; font: 600 max(1.8cqw, 8.5px)/1 var(--sans); letter-spacing: -0.01em; }   /* tabs inside the tiny phone mock: smaller floor so they fit */
.ap-tabs button.on { background: var(--accent); color: var(--on-accent); }
.ap-f { position: absolute; left: 50%; top: -1cqw; white-space: nowrap; font: 600 max(2.4cqw, 10px)/1 var(--sans); padding: 2.2cqw 3cqw; border-radius: 2.2cqw; background: var(--panel); border: 1px solid var(--accent); color: var(--ink);
  box-shadow: 0 3cqw 6cqw -3cqw rgba(0,0,0,.5); transform: translate(-50%, 0) translateZ(8cqw); opacity: 0; pointer-events: none; }
.ap-f.pop { animation: note 2.2s cubic-bezier(.2,.8,.2,1) both; }
@keyframes note { 0% { opacity: 0; transform: translate(-50%, -3cqw) translateZ(8cqw); } 15%, 80% { opacity: 1; transform: translate(-50%, 0) translateZ(8cqw); } 100% { opacity: 0; transform: translate(-50%, 0) translateZ(8cqw); } }

/* 6 creative */
.cr-prev { position: absolute; left: 6cqw; right: 6cqw; top: 6cqw; aspect-ratio: 16 / 9; border-radius: 2.4cqw; overflow: hidden; cursor: pointer; }
.cr-svg { display: block; width: 100%; height: 100%; }
.cr-prev::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.28); opacity: 0; transition: opacity .3s; pointer-events: none; }
.cr-prev.paused::after { opacity: 1; }
.cr-tc { position: absolute; right: 2.4cqw; bottom: 2.4cqw; z-index: 2; font: 600 max(2.4cqw, 10px)/1 var(--sans); color: #F1E9DE; background: rgba(0,0,0,.45); padding: 1.2cqw 1.8cqw; border-radius: 99px; font-variant-numeric: tabular-nums; }
.cr-play { position: absolute; left: 2.4cqw; bottom: 2.4cqw; z-index: 2; width: 7cqw; height: 7cqw; border-radius: 50%; border: 0; background: var(--accent); display: grid; place-items: center; transition: transform .25s; }
.cr-play:hover { transform: scale(1.1); }
.cr-play svg { width: 3.2cqw; height: 3.2cqw; fill: #17110E; }
.cr-prev.paused .cr-play { left: 50%; bottom: 50%; width: 11cqw; height: 11cqw; margin: 0 0 -5.5cqw -5.5cqw; }
.cr-prev.paused .cr-play svg { width: 4.6cqw; height: 4.6cqw; }
.cr-tl { position: absolute; left: 6cqw; right: 6cqw; bottom: 6cqw; height: 9cqw; display: flex; gap: .6cqw; cursor: ew-resize; }
.cr-tl > svg { flex: 1; height: 100%; border-radius: 1cqw; opacity: .7; transition: opacity .2s; }
.cr-tl:hover > svg { opacity: .9; }
.cr-head { position: absolute; top: -1.6cqw; bottom: -1.6cqw; width: 2px; margin-left: -1px; background: var(--accent); box-shadow: 0 0 0 1px var(--panel); pointer-events: none; }
.cr-head::before { content: ""; position: absolute; left: 50%; top: -1.6cqw; width: 3.2cqw; height: 3.2cqw; margin-left: -1.6cqw; border-radius: 50%; background: var(--accent); }

/* 7 brand */
.dm-brand { --b: #CDA85F; --bi: #17110E; --bf: var(--serif); --bw: 700; gap: 4cqw; }
.br-top { flex: 1; min-height: 0; display: flex; align-items: center; gap: 5cqw; }
.br-stage { position: relative; flex: 1; height: 100%; display: grid; place-items: center; perspective: 120cqw; }
.br-card, .br-back { width: 48cqw; aspect-ratio: 1.75; border-radius: 2.6cqw; }
.br-back { position: absolute; background: var(--panel-2); border: 1px solid var(--line); transform: rotate(-8deg) translate(-3cqw, 3cqw); }
.br-card { position: relative; background: var(--b); color: var(--bi); padding: 4cqw; display: flex; flex-direction: column; justify-content: space-between;
  transition: background .5s, color .5s; box-shadow: 0 5cqw 9cqw -5cqw rgba(0,0,0,.55); }
.br-card.swap .br-txt { animation: swap .5s cubic-bezier(.2,.8,.2,1); }
@keyframes swap { from { opacity: 0; transform: translateY(1.5cqw); } }
.br-mark { width: 8cqw; height: 8cqw; fill: none; stroke: currentColor; stroke-width: 3; }
.br-mark path { fill: currentColor; stroke: none; }
.br-txt { display: flex; flex-direction: column; gap: 1.2cqw; }
.br-name { font-family: var(--bf); font-weight: var(--bw); font-size: 5.6cqw; line-height: 1; letter-spacing: -0.02em; }
.br-line { font-family: var(--bf); font-size: 2.4cqw; opacity: .8; }
.br-side { width: 20cqw; display: flex; flex-direction: column; align-items: flex-start; gap: 3cqw; }
.br-icon { width: 14cqw; height: 14cqw; border-radius: 3.6cqw; background: var(--b); color: var(--bi); display: grid; place-items: center; transition: background .5s, color .5s; box-shadow: 0 3cqw 6cqw -3cqw rgba(0,0,0,.5); }
.br-icon .br-mark { width: 7cqw; height: 7cqw; }
.br-shop { font: 600 max(2.4cqw, 10px)/1 var(--sans); font-family: var(--bf); padding: 2cqw 3.4cqw; border-radius: 99px; background: var(--b); color: var(--bi); transition: background .5s, color .5s; }
.br-mood { display: flex; flex-direction: column; gap: .8cqw; }
.br-mood b { font: 700 4.2cqw/1 var(--serif); }
.br-ctl { display: flex; flex-direction: column; gap: 2.4cqw; border-top: 1px solid var(--line); padding-top: 3cqw; }
.br-sw { display: flex; gap: 2cqw; }
.br-sw button { flex: 1; aspect-ratio: 1; max-width: 7cqw; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.br-sw button:hover { transform: scale(1.15); }
.br-sw button.on { box-shadow: 0 0 0 .6cqw var(--panel), 0 0 0 1cqw var(--ink); }
.br-ty { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2cqw; }
.br-ty button { display: flex; align-items: baseline; justify-content: center; gap: 1.4cqw; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 2cqw; padding: 2cqw 0; transition: border-color .25s, background .25s; }
.br-ty button b { font-size: 3.8cqw; line-height: 1; font-weight: inherit; }
.br-ty button span { font: 500 max(1.9cqw, 10px)/1 var(--sans); color: var(--muted); }
.br-ty button:hover { border-color: var(--accent); }
.br-ty button.on { border-color: var(--accent); background: var(--accent-soft); }

/* 8 retention */
.dm-ret { padding: 3cqw 5cqw 5cqw; gap: 1cqw; }
.rt-svg { flex: 1; min-height: 0; width: 100%; cursor: pointer; }
.rt-ring { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 3 7; }
.rt-pulse { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.rt-c .b { fill: var(--accent); transition: fill .4s; }
.rt-c .e { fill: var(--on-accent); }
.rt-c .m, .rt-c .f { fill: none; stroke: var(--on-accent); stroke-width: 1.4; stroke-linecap: round; }
.rt-c .f { display: none; }
.rt-c.sad .b { fill: var(--muted); } .rt-c.sad .m { display: none; } .rt-c.sad .f { display: block; }
.rt-mid rect, .rt-mid path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.rt-mid { transform-box: fill-box; transform-origin: center; }
.rt-mid.pop { animation: pop .5s cubic-bezier(.2,.8,.2,1); }
.rt-env rect { fill: var(--accent); } .rt-env path { fill: none; stroke: var(--on-accent); stroke-width: 1.4; }
.rt-n { font: 700 32px var(--serif); fill: var(--ink); text-anchor: middle; font-variant-numeric: tabular-nums; }
.rt-l { font: 500 11px var(--sans); fill: var(--muted); text-anchor: middle; }
.rt-combo { font: 700 13px var(--sans); fill: var(--accent-text); text-anchor: middle; transform-box: fill-box; transform-origin: center; }
.rt-combo.pop { animation: pop .5s cubic-bezier(.2,.8,.2,1); }
.rt-plus { font: 700 13px var(--sans); fill: var(--accent-text); text-anchor: middle; animation: plus .9s ease-out forwards; }
@keyframes plus { to { transform: translateY(-16px); opacity: 0; } }
.rt-bar { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; }
.rt-bar > div { display: flex; flex-direction: column; gap: .6cqw; min-width: 16cqw; }
.rt-bar > div.r { text-align: right; }
.rt-bar b { font: 700 5cqw/1 var(--serif); font-variant-numeric: tabular-nums; }
.rt-camp { --cd: 0; position: relative; overflow: hidden; isolation: isolate; border: 0; padding: 2.8cqw 4.4cqw; border-radius: 99px; background: var(--accent); color: var(--on-accent); font: 700 max(2.6cqw, 10px)/1 var(--sans); transition: transform .2s; }
.rt-camp:hover { transform: translateY(-.4cqw); }
.rt-camp i { position: absolute; inset: 0; z-index: -1; background: var(--ink); opacity: .25; transform: scaleX(var(--cd)); transform-origin: left; }
.rt-camp.wait { cursor: wait; }

@media (prefers-reduced-motion: reduce) { .demo * { transition: none !important; animation: none !important; } }

/* touch screens (11 Oct device test): small buttons inside the demos get a finger-sized invisible hit area */
@media (pointer: coarse) {
  .pf-ch, .fp-like, .ph-fol, .ap-orders button, .ap-tabs button { position: relative; }
  .pf-ch::after, .fp-like::after, .ph-fol::after, .ap-orders button::after, .ap-tabs button::after { content: ""; position: absolute; inset: -9px -3px; }
  .pf-meter::before { top: -14px; bottom: -14px; }
}
/* the smallest phones: the app mock-up is narrow, so its three tab labels shrink a little more to stay apart */
@container (max-width: 330px) { .ap-tabs { gap: .4cqw; padding: .6cqw; } .ap-tabs button { font-size: 7px; letter-spacing: -0.03em; padding-left: 0; padding-right: 0; } }

/* 21 Oct: text for screen readers only (demo buttons) */
.dm-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
