/* MNIV Studios: interactive features (desk, scratch card, wall preview, matcher, gift, seals, gossip box, live pieces, sound and paint toggles) */

/* ---------- Studio desk ---------- */
.studio-desk { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.desk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.6rem); }
@media (max-width: 980px) { .desk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .desk-grid { grid-template-columns: 1fr; } }
.desk-card { display: grid; justify-items: center; gap: .5rem; text-align: center; padding: 1.6rem 1.1rem 1.4rem; text-decoration: none; background: var(--sheet) var(--paper-grain); border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.45); outline-offset: -6px; box-shadow: 0 14px 22px -14px rgba(43,33,30,.45); transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.desk-card:hover, .desk-card:focus-visible { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 22px 28px -14px rgba(43,33,30,.5); }
.desk-card b { font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; color: var(--ink); }
.desk-card small { color: var(--ink-soft); font-size: .88rem; }
.desk-ico { position: relative; width: 104px; height: 104px; display: block; filter: drop-shadow(0 8px 8px rgba(43,33,30,.4)); }
.desk-ico img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.desk-ico .kn-knob { transition: transform .5s cubic-bezier(.3,1.6,.45,1); }
.desk-ico .kn-glyph { width: 34px; height: 34px; margin: -17px; }
.desk-ico .kn-glyph svg { width: 22px; height: 22px; fill: none; stroke: var(--burgundy); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.desk-card:hover .kn-knob, .desk-card:focus-visible .kn-knob { transform: rotate(-30deg); }
.desk-card.twist .kn-knob { transform: rotate(-75deg); }

/* ---------- Scratch to reveal ---------- */
.scratch-wrap { padding-block: clamp(1.5rem, 4vw, 3rem); }
.scratch-card { max-width: 440px; margin-inline: auto; display: grid; gap: .7rem; justify-items: center; text-align: center; padding: 1.6rem 1.4rem 1.3rem; background: var(--sheet) var(--paper-grain); border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.45); outline-offset: -7px; box-shadow: 0 18px 26px -16px rgba(43,33,30,.5); }
.scratch-card .script { font-size: 2rem; line-height: 1; }
.scratch-area { position: relative; width: 100%; height: 150px; border-radius: 4px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #7A3643, #5A2732 60%, #3A161E); box-shadow: inset 0 0 0 1px #B08A4A; }
.scratch-prize { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .25rem; color: #F1E3BF; }
.scratch-prize .label { color: #E7CFCB; }
.scratch-prize b { font-family: var(--f-script); font-weight: 400; font-size: 3rem; line-height: 1; -webkit-text-stroke: .03em currentColor; }
.scratch-prize .code { letter-spacing: .3em; padding-left: .3em; font-family: var(--f-display); font-size: 1.05rem; }
.scratch-prize .btn { padding: .45rem .9rem; font-size: .72rem; background: #F1E3BF; color: #3A161E; border-color: #F1E3BF; margin-top: .2rem; }
#scratchCanvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; transition: opacity .8s; }
#scratchCanvas.gone { opacity: 0; pointer-events: none; }
.petal { position: fixed; pointer-events: none; z-index: 9999; width: 10px; height: 14px; border-radius: 80% 0 80% 0; opacity: .95; }

/* ---------- Wall preview ---------- */
.wl { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .9fr); gap: clamp(1.5rem, 3vw, 2.5rem); padding-bottom: 5rem; align-items: start; }
@media (max-width: 900px) { .wl { grid-template-columns: 1fr; } }
.wl-stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #E9DCCB; border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.45); outline-offset: -7px; box-shadow: 0 22px 34px -20px rgba(43,33,30,.55); touch-action: none; user-select: none; }
.wl-room { position: absolute; inset: 0; background: var(--wall, #E9DCCB); }
.wl-room::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,.18), rgba(0,0,0,.06)); }
.wl-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 16%; background: linear-gradient(to bottom, #B89C78, #8F7655); border-top: 6px solid rgba(255,255,255,.55); }
.wl-sofa { position: absolute; left: 50%; bottom: 8%; width: 56%; transform: translateX(-50%); fill: var(--sofa, #7A3643); filter: drop-shadow(0 8px 6px rgba(0,0,0,.25)); }
.wl-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wl-art { position: absolute; left: 30%; top: 16%; cursor: grab; touch-action: none; box-shadow: 0 14px 18px -8px rgba(0,0,0,.5); background: #fff; }
.wl-art.dragging { cursor: grabbing; }
.wl-art img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.wl-art.edge { box-shadow: 0 0 0 3px #B08A4A, 0 0 0 5px #F1E3BF, 0 14px 18px -6px rgba(0,0,0,.5); }
.wl-art:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 6px; }
.wl-dim { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); white-space: nowrap; font: 600 .75rem/1 var(--f-body); letter-spacing: .1em; color: #fff; background: rgba(43,33,30,.78); padding: .3rem .6rem; border-radius: 2px; pointer-events: none; }
.wl-panel { display: grid; gap: 1.4rem; }
.wl-panel fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .9rem; min-width: 0; }
.wl-panel legend { padding: 0; margin-bottom: .7rem; }
.wl-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.btn.sm { padding: .6rem 1rem; font-size: .75rem; }
.wl-upload { cursor: pointer; }
.wl-swatches { display: flex; gap: .5rem; }
.wl-swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.wl-swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--burgundy); }
.wl-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: .45rem; }
.wl-thumbs button { padding: 0; border: 2px solid transparent; background: none; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.wl-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wl-thumbs button[aria-pressed="true"] { border-color: var(--burgundy); }
input[type="range"] { accent-color: var(--burgundy); width: 100%; }

/* ---------- Style matcher ---------- */
.mt { max-width: 760px; margin: 0 auto; padding-bottom: 5rem; }
.mt-card { background: var(--sheet) var(--paper-grain); border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.45); outline-offset: -8px; padding: clamp(1.6rem, 4vw, 2.8rem); box-shadow: 0 22px 34px -20px rgba(43,33,30,.5); display: grid; gap: 1.4rem; animation: mtIn .5s cubic-bezier(.2,.7,.2,1); }
@keyframes mtIn { from { opacity: 0; transform: translateY(14px) rotate(-.4deg); } to { opacity: 1; transform: none; } }
.mt-steps { display: flex; justify-content: center; gap: .6rem; }
.mt-steps i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--gold); background: transparent; transition: background .3s; }
.mt-steps i.on { background: radial-gradient(circle at 35% 30%, #A8616E, #5A2732); border-color: #5A2732; }
.mt-q { font-family: var(--f-display); font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.15; text-align: center; }
.mt-opts { display: grid; gap: .7rem; }
.mt-opts button { text-align: left; font: inherit; font-size: 1.05rem; padding: 1rem 1.2rem; background: var(--paper); border: 1px solid var(--line); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; color: var(--ink); }
.mt-opts button:hover, .mt-opts button:focus-visible { border-color: var(--burgundy); background: var(--blush); transform: translateX(4px); }
.mt-opts small { display: block; color: var(--ink-soft); font-size: .85rem; }
.mt-back { justify-self: center; background: none; border: 0; font: inherit; font-size: .85rem; color: var(--ink-soft); cursor: pointer; text-decoration: underline; }
.mt-res { text-align: center; display: grid; gap: .9rem; justify-items: center; }
.mt-res h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.mt-res .why { max-width: 48ch; color: var(--ink-soft); }
.mt-res .alt { font-size: .95rem; color: var(--ink-soft); }
.mt-res .alt a { color: var(--burgundy); }

/* ---------- Gift unwrapping ---------- */
.gf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); padding-bottom: 5rem; align-items: start; }
@media (max-width: 900px) { .gf { grid-template-columns: 1fr; } }
.gf-form { display: grid; gap: 1.4rem; }
.gf-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .9rem; min-width: 0; }
.gf-form legend { padding: 0; margin-bottom: .7rem; }
.gf-stage { display: grid; justify-items: center; gap: 1rem; position: sticky; top: 7rem; }
.gf-scene { position: relative; width: min(100%, 380px); height: 400px; perspective: 1000px; }
.gf-art { position: absolute; inset: 20px 30px 40px; opacity: 0; transform: scale(.92); transition: opacity 1s .2s, transform 1s .2s; background: var(--gilt); padding: 10px; box-shadow: 0 20px 30px -14px rgba(43,33,30,.55); }
.gf-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gf-art-note { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.gf-card { position: absolute; left: 50%; bottom: 120px; width: 250px; margin-left: -125px; padding: 1.1rem 1.2rem; background: var(--sheet) var(--paper-grain); border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.45); outline-offset: -5px; box-shadow: 0 10px 18px -8px rgba(43,33,30,.5); text-align: center; display: grid; gap: .5rem; transform: translateY(60px) rotate(-2deg); opacity: 0; transition: transform 1.1s cubic-bezier(.2,.8,.2,1), opacity .5s; z-index: 2; }
.gf-to, .gf-from { font-family: var(--f-script); font-size: 1.5rem; line-height: 1; color: var(--burgundy); -webkit-text-stroke: .03em currentColor; }
.gf-msg { font-size: .98rem; line-height: 1.5; word-break: break-word; }
.gf-box { position: absolute; left: 50%; bottom: 0; width: 250px; height: 200px; margin-left: -125px; transition: transform 1.1s .3s, opacity .9s .3s; z-index: 3; }
.gf-base { position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: radial-gradient(ellipse at 35% 25%, #7A3643, #5A2732 60%, #3A161E); box-shadow: inset 0 0 0 1px rgba(241,227,191,.5), 0 18px 20px -10px rgba(43,33,30,.55); }
.gf-lid { position: absolute; left: -8px; right: -8px; bottom: 132px; height: 54px; transform-origin: 0 100%; transition: transform 1s cubic-bezier(.3,.7,.2,1); }
.gf-lid-top { position: absolute; inset: 0; background: radial-gradient(ellipse at 35% 25%, #8C4452, #6A2E3B 60%, #4A1F28); box-shadow: inset 0 0 0 1px rgba(241,227,191,.5), 0 8px 10px -6px rgba(43,33,30,.5); }
.gf-ribbon { position: absolute; background: linear-gradient(to right, #E4CF9F, #B08A4A 50%, #E4CF9F); transition: transform .9s cubic-bezier(.3,.7,.2,1), opacity .6s; z-index: 1; }
.gf-rv { left: 50%; width: 26px; margin-left: -13px; bottom: 0; height: 186px; }
.gf-rh { left: 0; right: 0; height: 22px; bottom: 56px; }
.gf-bow { position: absolute; left: 50%; top: 4px; width: 120px; margin-left: -60px; border: 0; background: none; cursor: pointer; padding: 0; z-index: 4; transition: transform .8s cubic-bezier(.4,0,.6,1), opacity .6s; animation: bowWiggle 2.6s ease-in-out infinite; }
.gf-bow svg { width: 100%; display: block; fill: #E4CF9F; stroke: #8C6A33; stroke-width: 2; filter: drop-shadow(0 4px 4px rgba(43,33,30,.4)); }
@keyframes bowWiggle { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.gf-scene.is-untied .gf-bow { animation: none; transform: translateY(70px) rotate(24deg); opacity: 0; }
.gf-scene.is-untied .gf-rv { transform: translateX(80px) rotate(14deg); opacity: 0; }
.gf-scene.is-untied .gf-rh { transform: translateY(40px); opacity: 0; }
.gf-scene.is-open .gf-lid { transform: rotateX(100deg); }
.gf-scene.is-card .gf-card { transform: translateY(-120px) rotate(1.5deg); opacity: 1; }
.gf-scene.is-art .gf-art { opacity: 1; transform: none; }
.gf-scene.is-art .gf-box { transform: translateY(80px); opacity: 0; pointer-events: none; }
.gf-scene.is-art .gf-card { transform: translateY(-190px) scale(.86) rotate(-1deg); }
.gf-hint { color: var(--ink-soft); font-style: italic; text-align: center; min-height: 1.5em; }

/* ---------- Seal collection ---------- */
.seals { display: grid; gap: .9rem; padding: 1.3rem 1.2rem; background: var(--sheet) var(--paper-grain); border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.45); outline-offset: -6px; }
.seal-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; text-align: center; }
.sl { display: grid; gap: .35rem; justify-items: center; font-size: .8rem; color: var(--ink-soft); }
.sl-seal { width: 58px; height: 58px; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; transition: all .4s; position: relative; }
.sl-seal img { width: 62%; opacity: .25; filter: grayscale(1); transition: all .4s; }
.sl.on .sl-seal { border: 0; background: radial-gradient(circle at 34% 30%, #F1E3BF, #C9A566 40%, #8C6A33); box-shadow: 0 0 0 2px #7A5E2E, 0 6px 8px rgba(90,60,30,.35); animation: sealPop .6s cubic-bezier(.3,1.7,.5,1); }
.sl.on .sl-seal img { opacity: 1; filter: none; background: radial-gradient(circle, #FFFDF8, #F6EEE3); border-radius: 50%; padding: 3px 4px; width: 66%; }
.sl.on { color: var(--burgundy); }
.sl b { font-weight: 600; color: var(--ink); }
@keyframes sealPop { 0% { transform: scale(.4) rotate(-30deg); } 100% { transform: none; } }
@media (max-width: 420px) { .sl-seal { width: 46px; height: 46px; } }

/* ---------- Gossip box (post office) ---------- */
.po { display: grid; gap: 2.5rem; padding-bottom: 5rem; position: relative; }
.po-wall { position: absolute; inset: 0 -1rem auto; height: 420px; display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); grid-auto-rows: 64px; gap: 6px; opacity: .5; overflow: hidden; mask-image: linear-gradient(to bottom, #000 40%, transparent); -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); }
.po-wall i { background: linear-gradient(135deg, #D9B873, #A8823C); border-radius: 3px; box-shadow: inset 0 0 0 2px rgba(255,240,200,.5), inset 0 -3px 0 rgba(0,0,0,.2); position: relative; }
.po-wall i::after { content: ""; position: absolute; left: 50%; top: 58%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #5E4520; }
.po-main { position: relative; display: grid; justify-items: center; gap: 1.5rem; z-index: 1; }
.po-box { position: relative; width: 270px; height: 320px; border: 0; padding: 0; background: none; cursor: pointer; perspective: 1200px; filter: drop-shadow(0 22px 24px rgba(43,33,30,.5)); }
.po-box:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 8px; }
.po-cavity { position: absolute; inset: 0; background: #1c1311; border-radius: 6px; box-shadow: inset 0 0 0 5px #8C6A33, inset 0 0 30px #000; overflow: hidden; }
.po-letters { position: absolute; left: 14%; right: 14%; bottom: 14px; height: 70%; }
.po-letters i { position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: #F6EEE3; border-radius: 3px; box-shadow: 0 0 0 1px #C9A06A; }
.po-letters i:nth-child(1) { transform: rotate(-5deg) translateY(-8px); background: #EFD3CF; }
.po-letters i:nth-child(2) { transform: rotate(3deg) translateY(-24px); }
.po-letters i:nth-child(3) { transform: rotate(-1deg) translateY(-42px); background: #FBF6EF; }
.po-door { position: absolute; inset: 0; border-radius: 6px; background: linear-gradient(135deg, #E8CB88, #B8903F 45%, #8C6A33); box-shadow: inset 0 0 0 4px rgba(255,240,200,.55), inset 0 -6px 0 rgba(0,0,0,.2); transform-origin: 0 50%; transition: transform 1.1s cubic-bezier(.3,.7,.2,1); display: grid; align-content: space-between; justify-items: center; padding: 18px 16px 24px; backface-visibility: hidden; }
.po-no { font: 600 .9rem/1 var(--f-display); letter-spacing: .3em; color: #4A3414; text-shadow: 0 1px 0 rgba(255,240,200,.6); }
.po-glass { width: 66%; height: 70px; border-radius: 4px; background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(180,200,210,.25)); box-shadow: inset 0 0 0 3px #7A5E2E, inset 0 0 12px rgba(0,0,0,.35); }
.po-plate { background: linear-gradient(to bottom, #F4E6C2, #D9B873); padding: .55rem .9rem; border-radius: 3px; box-shadow: inset 0 0 0 1px #7A5E2E, 0 2px 3px rgba(0,0,0,.3); }
.po-plate-text { display: block; font-family: var(--f-script); font-size: 1.55rem; line-height: 1.05; color: #4A1F28; -webkit-text-stroke: .04em currentColor; }
.po-key { position: absolute; right: 20px; top: 44%; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F4E6C2, #8C6A33); box-shadow: 0 0 0 2px #5E4520; }
.po-key::after { content: ""; position: absolute; left: 50%; top: 55%; width: 3px; height: 8px; margin-left: -1.5px; background: #2A1B08; }
.po-dial { position: absolute; left: 20px; top: 44%; width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(#F4E6C2, #8C6A33, #F4E6C2, #8C6A33, #F4E6C2); box-shadow: 0 0 0 2px #5E4520; }
.po.open .po-door { transform: rotateY(-118deg); }
.po-slide { width: min(100%, 430px); overflow: hidden; padding: 0 0 1rem; margin-top: -1.4rem; }
.po.open .po-card { animation: poSlide 1.1s .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes poSlide { from { transform: translateY(-110%) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
.po-card { display: grid; gap: .9rem; padding: 1.5rem 1.4rem; background: var(--sheet) var(--paper-grain); border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.45); outline-offset: -6px; box-shadow: 0 16px 22px -12px rgba(43,33,30,.5); }
.po-card .script { font-size: 2rem; line-height: 1; text-align: center; }
.po-stars { display: flex; justify-content: center; gap: .3rem; }
.po-stars button { background: none; border: 0; font-size: 1.9rem; line-height: 1; color: #DCCBB8; cursor: pointer; padding: 0 .1rem; transition: transform .2s, color .2s; }
.po-stars button.on { color: #A8616E; }
.po-stars button:hover { transform: scale(1.2); }
.po-letters-wrap { position: relative; z-index: 1; display: grid; gap: 1.4rem; }
.po-lettergrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.4rem; align-items: start; }
.po-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); font-style: italic; }
.po-letter { position: relative; }
.po-env { width: 100%; display: grid; gap: .3rem; justify-items: center; padding: 3.2rem 1rem 1.4rem; font: inherit; color: var(--ink); background: linear-gradient(to bottom, #F6EEE3, #EBDFD0); border: 1px solid #C9A06A; cursor: pointer; position: relative; box-shadow: 0 12px 16px -10px rgba(43,33,30,.5); transition: transform .3s; }
.po-env::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 56px; background: #EFE4D6; clip-path: polygon(0 0, 100% 0, 50% 100%); border-bottom: 1px solid #C9A06A; }
.po-env::after { content: ""; position: absolute; left: 50%; top: 40px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #A8616E, #5A2732); box-shadow: 0 2px 3px rgba(0,0,0,.35); }
.po-env:hover { transform: translateY(-4px) rotate(-.8deg); }
.po-env b { font-family: var(--f-script); font-weight: 400; font-size: 1.6rem; line-height: 1; color: var(--burgundy); -webkit-text-stroke: .03em currentColor; }
.po-env small { color: #A8616E; letter-spacing: .2em; }
.po-paper { display: none; padding: 1.4rem 1.3rem; background: var(--sheet) var(--paper-grain); border: 1px solid #C9A06A; box-shadow: 0 14px 18px -10px rgba(43,33,30,.5); gap: .7rem; transform-origin: top; text-align: left; }
.po-letter.open .po-env { display: none; }
.po-letter.open .po-paper { display: grid; animation: unfold .6s cubic-bezier(.2,.8,.2,1); }
@keyframes unfold { from { transform: scaleY(.1); opacity: 0; } to { transform: none; opacity: 1; } }
.po-paper .stars { color: #A8616E; letter-spacing: .15em; }
.po-paper p { line-height: 1.6; }
.po-paper .by { font-family: var(--f-script); font-size: 1.5rem; color: var(--burgundy); line-height: 1; -webkit-text-stroke: .03em currentColor; }
.po-paper button { justify-self: start; background: none; border: 0; font: inherit; font-size: .8rem; color: var(--ink-soft); text-decoration: underline; cursor: pointer; padding: 0; }
.po-tag { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }

/* ---------- Live price pieces ---------- */
.pieces { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 58px; padding: .7rem; margin: .2rem 0 .4rem; border: 1px dashed var(--gold); background: rgba(255,255,255,.35); align-content: flex-start; }
.pieces:empty::before { content: "Your pieces will gather here"; color: var(--ink-soft); font-size: .85rem; font-style: italic; }
.piece { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem .3rem .4rem; font-size: .78rem; background: var(--sheet); border: 1px solid var(--gold); border-radius: 999px; box-shadow: 0 4px 6px -3px rgba(43,33,30,.4); animation: pieceIn .7s cubic-bezier(.3,1.5,.5,1) both; }
.piece svg { width: 24px; height: 24px; flex: none; padding: 3px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F4E6C2, #C9A566); stroke: #4A1F28; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.piece.leave { animation: pieceOut .35s ease forwards; }
@keyframes pieceIn { from { opacity: 0; transform: translateX(60px) scale(.5) rotate(10deg); } to { opacity: 1; transform: none; } }
@keyframes pieceOut { to { opacity: 0; transform: translateY(-14px) scale(.4); } }

/* ---------- Floating toggles + paint trail ---------- */
.fx { position: fixed; right: 14px; bottom: 14px; z-index: 50; display: grid; gap: 10px; justify-items: end; }
.fx-item { position: relative; display: flex; align-items: center; justify-content: flex-end; }
.knob { position: relative; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: none; filter: drop-shadow(0 6px 6px rgba(43,33,30,.4)); transition: transform .2s; }
.knob:hover { transform: scale(1.06); }
.knob:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 4px; }
.knob img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.kn-knob { transition: transform .5s cubic-bezier(.3,1.6,.45,1), filter .4s; }
.knob[aria-pressed="false"] .kn-knob { transform: rotate(-58deg); filter: saturate(.55) brightness(.82); }
.knob:active .kn-knob { transform: rotate(-24deg); }
.knob[aria-pressed="false"]:active .kn-knob { transform: rotate(-80deg); }
.kn-glyph { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #FFFDF8, #EBDDC2); box-shadow: 0 0 0 1px rgba(90,60,30,.55), inset 0 -2px 3px rgba(120,86,34,.3); pointer-events: none; }
.kn-glyph svg { width: 14px; height: 14px; fill: none; stroke: var(--burgundy); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fx-menu { position: absolute; right: 62px; bottom: 0; display: grid; gap: 2px; min-width: 210px; padding: .5rem; background: var(--sheet) var(--paper-grain); border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.45); outline-offset: -4px; box-shadow: 0 14px 24px -10px rgba(43,33,30,.55); opacity: 0; visibility: hidden; transform: translateX(10px); transition: opacity .25s, transform .25s, visibility .25s; }
.fx-music:hover .fx-menu, .fx-music:focus-within .fx-menu, .fx-music.open .fx-menu { opacity: 1; visibility: visible; transform: none; }
.fx-menu::after { content: ""; position: absolute; right: -16px; top: 0; bottom: 0; width: 16px; }
.fx-menu button { text-align: left; font: inherit; padding: .55rem .8rem; border: 0; background: none; cursor: pointer; color: var(--ink); display: grid; }
.fx-menu button b { font-family: var(--f-display); font-weight: 400; font-size: 1rem; }
.fx-menu button small { font-size: .78rem; color: var(--ink-soft); font-style: italic; }
.fx-menu button:hover, .fx-menu button:focus-visible { background: var(--blush); }
.fx-menu button[aria-checked="true"] { background: rgba(176,138,74,.18); box-shadow: inset 3px 0 0 var(--gold); }
#paintCanvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9998; }
body.brush-cursor { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M29 3 L13 19' stroke='%23B08A4A' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M15 17 L11 21' stroke='%23E4DED6' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M11 21 C8 22 6 25 3 29 C8 29 12 27 13 23 Z' fill='%235A2732'/%3E%3C/svg%3E") 3 29, auto; }
body.brush-cursor a, body.brush-cursor button, body.brush-cursor label, body.brush-cursor summary, body.brush-cursor [role="button"], body.brush-cursor input[type="range"], body.brush-cursor .obj { cursor: pointer; }
@media (hover: none) { #paintCanvas { display: none; } }
@media (prefers-reduced-motion: reduce) { .gf-bow, .piece, .po-card, .sl.on .sl-seal { animation: none !important; } .po-door, .gf-lid, .gf-card, .gf-box, .gf-art { transition: none; } }

/* ---------- Glowing light cursor ---------- */
body.glow-cursor, body.glow-cursor * { cursor: none !important; }
#glowCursor { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 99999; pointer-events: none; opacity: 0; transition: opacity .3s; }
#glowCursor i, #glowCursor b { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); }
#glowCursor i { width: 10px; height: 10px; background: #FFF3C8; box-shadow: 0 0 0 1px rgba(176,138,74,.7), 0 0 10px 4px rgba(255,214,120,.9), 0 0 2px 1px #fff; }
#glowCursor b { width: 64px; height: 64px; background: radial-gradient(circle, rgba(255,214,120,.6) 0%, rgba(235,185,95,.34) 38%, rgba(220,160,90,.14) 62%, transparent 72%); mix-blend-mode: normal; transition: width .25s, height .25s; }
#glowCursor.hot b { width: 96px; height: 96px; }
#glowCursor.pulse b { width: 130px; height: 130px; opacity: .6; }
@media (hover: none) { #glowCursor { display: none; } }

/* Studio desk: bare knobs with a short title, no cards */
.desk-card { background: none; border: 0; outline: 0; box-shadow: none; padding: .6rem; gap: .9rem; }
.desk-card:hover, .desk-card:focus-visible { box-shadow: none; transform: translateY(-4px); }
.desk-card:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 4px; }
.desk-card b { font-family: var(--f-script); font-weight: 400; font-size: 1.9rem; line-height: 1; color: var(--burgundy); -webkit-text-stroke: .03em currentColor; }
.desk-ico { width: 118px; height: 118px; }

/* Studio desk: three knobs in one straight row at every width */
.desk-grid { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: clamp(.5rem, 3vw, 3rem) !important; max-width: 760px; margin-inline: auto; align-items: start; }
@media (max-width: 560px) { .desk-ico { width: 78px; height: 78px; } .desk-card b { font-size: 1.4rem; } }

/* ---------- Name for the visit ---------- */
.name-ask { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 1.2rem; background: rgba(43,33,30,.55); backdrop-filter: blur(6px); animation: nmIn .4s ease; }
.name-ask.out { opacity: 0; transition: opacity .35s; }
@keyframes nmIn { from { opacity: 0; } to { opacity: 1; } }
.name-card { width: min(440px, 100%); display: grid; gap: .9rem; text-align: center; padding: clamp(1.6rem, 5vw, 2.6rem); background: var(--sheet) var(--paper-grain); border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.5); outline-offset: -8px; box-shadow: 0 30px 50px -20px rgba(0,0,0,.6); animation: nmCard .55s cubic-bezier(.2,.8,.2,1); }
@keyframes nmCard { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.name-card h2 { font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.1; margin: 0; }
.name-card input { font: inherit; font-size: 1.15rem; text-align: center; padding: .8rem 1rem; border: 1px solid var(--gold); background: #fffdf8; color: var(--ink); }
.name-card input:focus { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.name-actions { display: grid; gap: .6rem; justify-items: center; }
.name-skip { background: none; border: 0; font: inherit; font-size: .85rem; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }
.hello-line-unused { text-align: center; font-size: 1.7rem; line-height: 1.1; margin: 1.6rem 0 0; color: var(--burgundy); }
.hello-change { margin-left: .8rem; font: inherit; font-size: .8rem; background: none; border: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; vertical-align: middle; }
.name-card .script { font-size: 1.7rem; line-height: 1; margin: 0; }

/* Welcome strip */
.greet-bar { position: relative; text-align: center; padding: .55rem 1rem; background: linear-gradient(to bottom, #FBF6EC, #F1E7D6); border-bottom: 1px solid rgba(176,138,74,.55); }
.greet-bar[hidden], body.on-threshold .greet-bar { display: none; }
.greet-text { font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif; font-style: italic; font-weight: 600; font-size: clamp(1.15rem, 3vw, 1.5rem); letter-spacing: .06em; color: var(--burgundy); }
.greet-text::before, .greet-text::after { content: "\2726"; font-style: normal; font-size: .6em; color: var(--gold); margin: 0 .8em; vertical-align: .15em; }
.greet-change { position: absolute; right: clamp(.8rem, 4vw, 3rem); top: 50%; transform: translateY(-50%); font: inherit; font-size: .75rem; letter-spacing: .08em; background: none; border: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }
@media (max-width: 560px) { .greet-change { display: none; } }

/* Typed "Enter" */
.entry-link { position: relative; display: inline-block; }
.entry-link .ty-ghost { visibility: hidden; }
.entry-link .ty-live { position: absolute; left: 0; top: 0; white-space: nowrap; }
.entry-link .ty-caret { display: inline-block; width: 1px; height: 1em; margin-left: 2px; vertical-align: -.12em; background: currentColor; animation: tyBlink .9s steps(1) infinite; }
.entry-link .ty-caret.done { animation: tyBlink .9s steps(1) 3, tyFade .6s ease 2.7s forwards; }
@keyframes tyBlink { 50% { opacity: 0; } }
@keyframes tyFade { to { opacity: 0; } }

/* ---------- Circle perks ---------- */
.perks { display: grid; gap: 1rem; margin-top: 1.4rem; }
.perk { display: grid; gap: .25rem; padding: 1.2rem 1.3rem; text-decoration: none; color: inherit; background: var(--sheet) var(--paper-grain); border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.45); outline-offset: -6px; box-shadow: 0 14px 22px -14px rgba(43,33,30,.45); transition: transform .3s, box-shadow .3s; }
.perk:hover, .perk:focus-visible { transform: translateY(-4px); box-shadow: 0 22px 28px -14px rgba(43,33,30,.5); }
.perk .script { font-size: 1.4rem; line-height: 1; color: var(--burgundy); }
.perk b { font-family: var(--f-display); font-weight: 400; font-size: 1.35rem; }
.perk small { color: var(--ink-soft); font-size: .92rem; }

/* ---------- Blind box ---------- */
.bb { max-width: 760px; margin: 0 auto; padding-bottom: 5rem; }
.bb-card { gap: 1.2rem; display: grid; }
.bb-card textarea, .bb-card input { font: inherit; font-size: 1.1rem; padding: .9rem 1rem; border: 1px solid var(--gold); background: #fffdf8; color: var(--ink); width: 100%; }
.bb-card textarea:focus, .bb-card input:focus { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.bb-pick[aria-pressed="true"] { border-color: var(--burgundy); background: var(--blush); }
.bb-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .7rem; }
.bb-col { display: grid; gap: .4rem; justify-items: center; padding: .8rem .4rem; background: var(--paper); border: 1px solid var(--line); cursor: pointer; font: inherit; font-size: .9rem; color: var(--ink); transition: border-color .2s, transform .2s; }
.bb-col i { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--gold), 0 4px 6px rgba(43,33,30,.3); }
.bb-col:hover, .bb-col:focus-visible, .bb-col[aria-pressed="true"] { border-color: var(--burgundy); transform: translateY(-2px); }
.bb-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.bb-nav .btn { margin-left: auto; }
.bb-sheet { display: grid; gap: .8rem; text-align: left; width: 100%; margin: 0; }
.bb-sheet div { padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.bb-sheet dt { font-size: .82rem; letter-spacing: .06em; color: var(--ink-soft); }
.bb-sheet dd { margin: .2rem 0 0; font-family: var(--f-display); font-size: 1.15rem; color: var(--burgundy); }

/* ---------- Vault ---------- */
.vt { max-width: 860px; margin: 0 auto; padding-bottom: 5rem; display: grid; gap: 1.8rem; }
.vt-gate { display: grid; gap: .8rem; padding: 1.4rem; background: var(--sheet) var(--paper-grain); border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.45); outline-offset: -6px; }
.vt-tabs { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.vt-tabs button { font: inherit; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; padding: .6rem 1rem; background: none; border: 1px solid var(--line); cursor: pointer; color: var(--ink-soft); }
.vt-tabs button[aria-selected="true"] { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
.vt-panel { min-height: 160px; padding: 1.4rem; background: var(--sheet) var(--paper-grain); border: 1px solid var(--line); }
.vt-empty { text-align: center; display: grid; gap: .6rem; padding: 1.4rem; color: var(--ink-soft); }
.vt-sample { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); margin: 0 0 .8rem; }
.vt-list { list-style: none; margin: 0; padding: 0; display: grid; }
.vt-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px dashed var(--line); }
.vt-list b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.1rem; }
.vt-list small { color: var(--ink-soft); }
.vt-list em { color: var(--ink-soft); font-size: .85rem; white-space: nowrap; }
.vt-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.vt-imgs img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--gold), 0 8px 12px -6px rgba(43,33,30,.4); }
.vt-form { display: grid; gap: 1rem; padding: 1.6rem; background: var(--sheet) var(--paper-grain); border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.45); outline-offset: -6px; }
.vt-form .script { font-size: 1.8rem; line-height: 1; color: var(--burgundy); margin: 0; }
.vt-form select { font: inherit; padding: .7rem; border: 1px solid var(--line); background: #fffdf8; }

/* ---------- Post box (letters slide in and out) ---------- */
.po-main { gap: 2.2rem; }
.pbx { position: relative; width: 260px; height: 440px; z-index: 3; filter: drop-shadow(0 18px 18px rgba(43,33,30,.35)); }
.pbx svg { position: absolute; inset: 0; display: block; }
.pbx-door { position: absolute; left: 66px; top: 286px; width: 128px; height: 92px; padding: 0; border: 0; cursor: pointer; border-radius: 3px; background: linear-gradient(to right, #5E2531, #A5535F 45%, #6E2F3C); box-shadow: inset 0 0 0 3px #B08A4A, inset 0 0 0 5px rgba(255,240,200,.35); transform-origin: left center; transition: transform 1s cubic-bezier(.3,.8,.3,1); display: grid; place-items: center; }
.pbx-door::after { content: ""; position: absolute; right: 9px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F1E3BF, #8C6A33); }
.pbx-door:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.pbx-plate { font-family: var(--f-script); font-size: 1.05rem; line-height: 1.1; color: #F6E9C8; text-align: center; padding-right: 10px; -webkit-text-stroke: .02em currentColor; pointer-events: none; }
.pbx.open .pbx-door { transform: perspective(700px) rotateY(-112deg); }
.pbx.hit #pbxSlot { fill: #8C6A33; }
.pbx.hit { animation: pbxJolt .35s ease; }
@keyframes pbxJolt { 30% { transform: translateY(2px) rotate(-.4deg); } 60% { transform: translateY(-1px); } }
.po-slide { width: min(100%, 430px); overflow: visible; padding: 0; margin: 0; position: relative; z-index: 1; }
.po-card { animation: none !important; transform: none !important; opacity: 1 !important; }
.po-letters-wrap { z-index: 1; }
.fly-env { position: fixed; z-index: 99998; width: 140px; height: 90px; pointer-events: none; background: linear-gradient(to bottom, #FBF6EC, #EBDFD0); border: 1px solid #C9A06A; box-shadow: 0 10px 16px -6px rgba(43,33,30,.5); }
.fly-env::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 48px; background: #EFE4D6; clip-path: polygon(0 0, 100% 0, 50% 100%); border-bottom: 1px solid #C9A06A; }
.fly-env i { position: absolute; left: 50%; top: 32px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #A8616E, #5A2732); box-shadow: 0 2px 3px rgba(0,0,0,.35); }
.pbx.open .pbx-plate { opacity: 0; transition: opacity .2s; }
.vt-form input, .vt-form textarea, .vt-gate input { font: inherit; font-size: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); background: #fffdf8; color: var(--ink); width: 100%; }
.vt-form input:focus, .vt-form textarea:focus, .vt-form select:focus, .vt-gate input:focus { outline: 2px solid var(--burgundy); outline-offset: 2px; }

/* Scratch card newsletter gate */
.scratch-gate { display: grid; gap: .8rem; text-align: left; max-width: 420px; margin: 0 auto; }
.scratch-gate[hidden] { display: none; }
.scratch-gate input[type="email"] { font: inherit; padding: .8rem 1rem; border: 1px solid var(--gold); background: #fffdf8; color: var(--ink); }

/* Circle members' door */
.mem-door { display: grid; gap: .6rem; justify-items: center; text-align: center; max-width: 520px; margin: 1.5rem auto; padding: 1.6rem 1.4rem; background: var(--sheet) var(--paper-grain); border: 1px solid var(--gold); outline: 1px solid rgba(176,138,74,.45); outline-offset: -6px; }
.mem-door h3 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; }
.mem-door .script { margin: 0; font-size: 1.6rem; color: var(--burgundy); }
.mem-form { display: grid; gap: .5rem; width: 100%; }
.mem-form input { font: inherit; padding: .8rem 1rem; border: 1px solid var(--line); background: #fffdf8; color: var(--ink); width: 100%; }
.mem-ok { text-align: center; color: var(--burgundy); font-style: italic; margin: 1rem 0; }
.mem-door[hidden], .mem-ok[hidden], .vt-members[hidden], .bb[hidden], .vt-gate[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }


/* Play to win: the detective, no frame */
.pw-sleuth { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 3vw, 1.8rem); width: fit-content; max-width: 100%; margin: 1.6rem auto 0; text-decoration: none; color: var(--ink); transition: transform .3s; }
.pw-sleuth:hover, .pw-sleuth:focus-visible { transform: translateY(-3px); }
.pw-sleuth img { display: block; width: clamp(70px, 14vw, 110px); height: auto; flex: none; animation: pwBreath 7s ease-in-out infinite; transform-origin: 50% 100%; }
.pw-copy { display: grid; gap: .2rem; justify-items: start; text-align: left; }
.pw-script { font-family: var(--f-script); font-size: clamp(1.5rem, 4vw, 2rem); color: var(--burgundy); line-height: 1.1; }
.pw-copy b { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.05; color: var(--ink); }
.pw-sub { font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-text); margin-top: .25rem; padding-top: .45rem; border-top: 1px solid var(--gold); }
.pw-sleuth:hover .pw-sub { color: var(--burgundy); }
@keyframes pwBreath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .pw-sleuth { transition: none; } .pw-sleuth img { animation: none; } }
