/*
 * Shop computer proposals: the page around the computer (pitch card, demo bar), the room stage
 * with the desk and monitor, the zoom, and the parts every direction shares (.spc-*). Page chrome
 * (bar, intro, tabs, footer) is ../fountains/page.css. Each direction's look is themes/<id>.css,
 * scoped by .spc--<id>; it restyles the shared parts through the --spc-* tokens below.
 */

/* ---------------------------------------------------------------- page */
.pitch {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; margin: 0 0 14px; padding: 18px 20px;
  border-radius: 18px; background: #fff; box-shadow: 0 10px 26px rgba(38, 52, 69, 0.08), inset 0 0 0 2px rgba(38, 52, 69, 0.06);
}
.pitch__num {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--dark-navy); color: var(--primary-yellow);
  border: 4px solid #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18); font: 400 26px/1 var(--title-font); text-align: center;
}
.pitch__num small { display: block; font: 700 8px/1 var(--body-font); letter-spacing: 1.5px; color: #fff; margin-bottom: 2px; }
.pitch__name { margin: 0; font: 400 clamp(24px, 3vw, 32px)/1.05 var(--title-font); color: var(--primary-color); text-transform: uppercase; text-wrap: balance; }
.pitch__idea { margin: 6px 0; font: 600 16px/1.45 var(--body-font); color: var(--dark-navy); }
.pitch__why { margin: 0 0 10px; max-width: 82ch; font-size: 14px; line-height: 1.55; color: var(--badge-color); }
.pitch__why b { color: var(--dark-navy); }
.pitch__like { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pitch__like span { padding: 4px 10px; border-radius: 999px; background: var(--soft-peach); font: 600 12px/1.2 var(--body-font); }

.demo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 0 0 22px; padding: 10px 12px; border-radius: 14px;
  background: var(--soft-cream); box-shadow: inset 0 0 0 2px rgba(38, 52, 69, 0.08);
}
.demo__group, .demo__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.demo__label { margin-right: 2px; font: 700 11px/1 var(--body-font); letter-spacing: 1.4px; text-transform: uppercase; color: var(--secondary-color); }
.demo .tool { min-height: 44px; padding: 6px 12px; font-size: 13px; }
.demo .tool small { font-weight: 600; opacity: 0.7; }
.demo__owned { margin: 0; font-size: 13px; color: var(--badge-color); }
.demo__reset { margin-left: auto; }

.mockup { margin: 0 0 30px; }
.mockup__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; font: 400 26px/1.1 var(--heading-font); color: var(--dark-navy); letter-spacing: 0.3px; }
.mockup__h small { font: 500 14px/1.3 var(--body-font); color: var(--badge-color); letter-spacing: 0; }

/* ---------------------------------------------------------------- the room */
.pc {
  position: relative; aspect-ratio: 16 / 10; min-height: 540px; max-height: 780px; width: 100%; overflow: hidden; border-radius: 22px; isolation: isolate;
  container-type: inline-size; container-name: pc;
  background: linear-gradient(180deg, #F7DDBF 0%, #F2CFA6 64%, #B97A4C 64%, #A86A3F 100%);
  box-shadow: 0 18px 40px rgba(204, 53, 48, 0.18), 0 0 0 6px #fff, 0 0 0 9px rgba(38, 52, 69, 0.08);
}
.pc__room { position: absolute; inset: 0; transform-origin: 50% 36%; transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1), filter 0.6s ease; }
.pc__room > * { position: absolute; display: block; }
/* floor planks */
.pc__room::before { content: ''; position: absolute; inset: 64% 0 0; background: repeating-linear-gradient(90deg, transparent 0 11.8%, rgba(60, 30, 10, 0.18) 11.8% 12%); }
/* skirting board */
.pc__room::after { content: ''; position: absolute; left: 0; right: 0; top: 62.5%; height: 1.6%; background: #fff3e4; box-shadow: 0 2px 0 rgba(60, 30, 10, 0.12); }
.pc__window {
  left: 5%; top: 9%; width: 17%; height: 30%; border-radius: 12px 12px 4px 4px; border: 8px solid #fff7ee;
  background: linear-gradient(180deg, #9FD8F5 0%, #D7F0FB 70%, #BEE7B0 70%, #9CD58B 100%); box-shadow: 0 6px 0 rgba(60, 30, 10, 0.12);
}
.pc__window::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; margin-left: -3px; background: #fff7ee; }
.pc__shelf { right: 5%; top: 16%; width: 20%; height: 3%; border-radius: 4px; background: #9B6136; box-shadow: 0 6px 0 rgba(60, 30, 10, 0.18); }
.pc__shelf i { position: absolute; bottom: 100%; width: 22%; border-radius: 6px 6px 2px 2px; }
.pc__shelf i:nth-child(1) { left: 6%; height: 260%; background: #E14826; }
.pc__shelf i:nth-child(2) { left: 36%; height: 360%; background: #FCAA1A; border-radius: 50% 50% 6px 6px; }
.pc__shelf i:nth-child(3) { left: 66%; height: 200%; background: #4B2A63; }
.pc__plant { right: 7%; top: 44%; width: 8%; height: 20%; border-radius: 6px 6px 10px 10px; background: linear-gradient(180deg, transparent 0 55%, #D06A3B 55%); }
.pc__plant::before { content: ''; position: absolute; left: -30%; right: -30%; top: -10%; height: 70%; border-radius: 50%; background: radial-gradient(circle at 35% 40%, #8ED07A, #4E9A4A 70%); }
.pc__desk { left: 20%; right: 20%; top: 61%; height: 5%; border-radius: 8px; background: linear-gradient(180deg, #C98A55, #A86A3F); box-shadow: 0 10px 0 rgba(60, 30, 10, 0.16); }
.pc__desk::before, .pc__desk::after { content: ''; position: absolute; top: 100%; width: 5%; height: 520%; background: #8E5530; }
.pc__desk::before { left: 4%; }
.pc__desk::after { right: 4%; }
.pc__keyboard { left: 41%; width: 18%; top: 58.6%; height: 2.6%; border-radius: 4px; background: repeating-linear-gradient(90deg, #EDE6DD 0 7%, #D6CCC0 7% 8%); box-shadow: 0 2px 0 #B9AEA2; }
.pc__mug { left: 63%; top: 55.5%; width: 3%; height: 5.5%; border-radius: 2px 2px 8px 8px; background: #fff; box-shadow: inset -4px 0 0 #F1E6DA; }
.pc__mug::after { content: ''; position: absolute; left: 92%; top: 22%; width: 60%; height: 46%; border: 3px solid #fff; border-left: 0; border-radius: 0 8px 8px 0; }
/* the player: a small villager seen from behind */
.pc__walker { left: 6%; top: 70%; width: 7%; height: 22%; transition: left 0.42s ease-in-out, top 0.42s ease-in-out, transform 0.42s ease; }
.pc__walker::before { content: ''; position: absolute; left: 14%; right: 14%; top: 0; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #5B3A28, #3D2618); }
.pc__walker::after { content: ''; position: absolute; left: 10%; right: 10%; top: 44%; bottom: 0; border-radius: 40% 40% 18% 18%; background: linear-gradient(180deg, #E14826, #CC3530); }
.pc__walker i { position: absolute; left: 6%; right: 6%; bottom: -6%; height: 12%; border-radius: 50%; background: rgba(60, 30, 10, 0.25); }
.pc.is-walked .pc__walker { left: 46.5%; top: 66%; animation: pcWalk 0.42s steps(4) 1; }
@keyframes pcWalk { 50% { transform: translateY(-4%); } }

/* the computer: a chunky monitor on a stand; its idle screen is the button */
.pc__monitor {
  position: absolute; z-index: 2; left: 33%; width: 34%; top: 20%; height: 37%; padding: 1.4% 1.4% 2.6%; border: 0; border-radius: 16px; cursor: pointer;
  background: linear-gradient(180deg, #34404F, #263445); box-shadow: 0 10px 0 rgba(38, 52, 69, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.12);
}
.pc__monitor::after { content: ''; position: absolute; left: 42%; right: 42%; top: 100%; height: 9%; background: linear-gradient(90deg, #1E2935, #34404F, #1E2935); }
.pc__idle {
  display: grid; place-content: center; gap: 6px; width: 100%; height: 100%; border-radius: 10px; color: #fff; text-align: center;
  background: radial-gradient(120% 90% at 30% 20%, #FCAA1A 0%, #E14826 55%, #A8281E 100%); box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.25);
}
.pc[data-site='f4f'] .pc__idle { background: radial-gradient(120% 90% at 30% 20%, #6B6B6B 0%, #262626 60%, #0E0E0E 100%); }
.pc[data-site='f4f'] .pc__idle b { color: #D9B45A; }
.pc__idle b { font: 400 clamp(18px, 3.2cqi, 34px)/1 var(--title-font); text-transform: uppercase; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.2); }
.pc__idle small { font: 600 clamp(11px, 1.4cqi, 14px)/1.2 var(--body-font); opacity: 0.92; animation: pcBlink 1.6s ease-in-out infinite; }
.pc__idle kbd { background: rgba(255, 255, 255, 0.92); color: var(--dark-navy); }
@keyframes pcBlink { 50% { opacity: 0.45; } }
.pc__monitor:hover .pc__idle, .pc__monitor:focus-visible .pc__idle { filter: brightness(1.08); }
.pc__monitor:focus-visible { outline: 4px solid var(--primary-yellow); outline-offset: 4px; }
.pc__hint {
  position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 12px; margin: 0; text-align: center; font: 600 13px/1.4 var(--body-font); color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.pc__hint kbd { background: rgba(255, 255, 255, 0.9); color: var(--dark-navy); }
.pc.is-on .pc__hint { visibility: hidden; }

/* ---------------------------------------------------------------- the screen: zoom, fade, lean */
.pc__screen { position: absolute; inset: 0; z-index: 5; display: flex; transform-origin: 0 0; overflow: hidden; }
.pc__screen[hidden] { display: none; }
.pc__screen.is-zooming { transition: transform 0.62s cubic-bezier(0.65, 0, 0.35, 1); }
.pc__screen--full { border-radius: 16px; }
.pc__screen.is-fade { opacity: 0; transition: opacity 0.2s ease; }
.pc__screen.is-fade.is-in { opacity: 1; }
.pc__app { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
/* lean: no zoom. The room leans in and softens; the monitor's own screen runs the shop. */
.pc.is-lean .pc__room { transform: scale(1.22); filter: saturate(0.9) blur(1px); }
.pc.is-lean .pc__monitor { visibility: hidden; }
.pc__screen--lean { opacity: 0; transition: opacity 0.35s ease 0.2s; }
.pc__screen--lean.is-lean-in, .pc__screen--lean.is-in { opacity: 1; }

/* ---------------------------------------------------------------- shared parts */
.spc {
  --spc-bg: #fff; --spc-fg: var(--dark-navy); --spc-muted: var(--badge-color); --spc-line: rgba(38, 52, 69, 0.14); --spc-card: #fff;
  --spc-accent: var(--primary-color); --spc-accent-fg: #fff; --spc-radius: 12px; --spc-font: var(--body-font);
  color: var(--spc-fg); font: 400 14px/1.45 var(--spc-font);
}
.spc *, .spc *::before, .spc *::after { box-sizing: border-box; }
.spc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.spc-i { width: 1em; height: 1em; flex: none; vertical-align: -0.12em; }
.spc button { font: inherit; color: inherit; }
.spc :focus-visible { outline: 3px solid var(--primary-yellow); outline-offset: 2px; }
.spc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--spc-accent); color: var(--spc-accent-fg); font-weight: 700; text-decoration: none; transition: transform 0.15s ease, filter 0.15s ease;
}
.spc-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.spc-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.spc-btn--ghost { background: transparent; color: var(--spc-fg); box-shadow: inset 0 0 0 2px var(--spc-line); }
.spc-link { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0; border: 0; background: none; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.spc-status { margin: 6px 0; color: var(--spc-muted); }
.spc-empty { margin: 14px 0; color: var(--spc-muted); }
.spc-note { margin: 6px 0; font-size: 12px; color: var(--spc-muted); }
.spc-nophoto { display: block; width: 100%; height: 100%; min-height: 40px; background: repeating-linear-gradient(45deg, rgba(38, 52, 69, 0.06) 0 8px, rgba(38, 52, 69, 0.1) 8px 16px); border-radius: 8px; }
.spc-price { font-weight: 700; }
.spc-was { margin-left: 2px; color: var(--spc-muted); font-size: 0.9em; }
.spc-stock { display: inline-flex; align-items: baseline; gap: 2px; padding: 2px 8px; border-radius: 999px; font: 700 11px/1.5 var(--body-font); letter-spacing: 0.3px; white-space: nowrap; }
.spc-stock small { font-weight: 500; }
.spc-stock--in { background: #DFF3E1; color: #1E6B2E; }
.spc-stock--pre { background: #ECE3F6; color: #4B2A63; }
.spc-stock--sale { background: #FFE2D9; color: #A8281E; }
.spc-stock--out { background: #E7E9EC; color: #4A525C; }
.spc-ptitle { margin: 0 0 4px; font: 700 20px/1.2 var(--spc-font); text-wrap: balance; }
.spc-ptitle small { font-weight: 500; font-size: 0.75em; color: var(--spc-muted); }
.spc-pprice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 18px; }
.spc-added { min-height: 1.4em; margin: 6px 0; font-weight: 600; }
.spc-desc { margin: 10px 0; font-size: 13px; line-height: 1.55; color: var(--spc-muted); }
.spc-desc p { margin: 0 0 8px; }
.spc-desc h3, .spc-desc h4 { margin: 10px 0 4px; font-size: 14px; color: var(--spc-fg); }
.spc-site { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 600; color: inherit; }
.spc-wish {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; font-size: 18px;
  background: var(--spc-card); color: var(--spc-muted); box-shadow: inset 0 0 0 2px var(--spc-line);
}
.spc-wish[aria-pressed='true'] { color: #E0245E; box-shadow: inset 0 0 0 2px #E0245E; }

/* options and quantity */
.spc-buy { margin: 8px 0; }
.spc-opt { margin: 0 0 10px; padding: 0; border: 0; }
.spc-opt legend { margin-bottom: 6px; padding: 0; font: 700 12px/1.2 var(--spc-font); letter-spacing: 0.6px; text-transform: uppercase; color: var(--spc-muted); }
.spc-chip { position: relative; display: inline-flex; margin: 0 6px 6px 0; cursor: pointer; }
.spc-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.spc-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--spc-line); font-weight: 600; }
.spc-chip input:checked + span { background: var(--spc-fg); color: var(--spc-bg); box-shadow: none; }
.spc-chip input:focus-visible + span { outline: 3px solid var(--primary-yellow); outline-offset: 2px; }
.spc-chip.is-out span { opacity: 0.55; text-decoration: line-through; }
.spc-buyrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spc-qty { display: inline-flex; align-items: center; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--spc-line); }
.spc-qty button { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; font-size: 18px; font-weight: 700; }
.spc-qty button:disabled { opacity: 0.35; cursor: not-allowed; }
.spc-qty output { min-width: 26px; text-align: center; font-weight: 700; }
.spc-add__sum { font-weight: 500; opacity: 0.9; }

/* cart */
.spc-cart-store { margin: 12px 0; padding: 12px; border-radius: var(--spc-radius); background: var(--spc-card); box-shadow: inset 0 0 0 2px var(--spc-line); }
.spc-cart-store h4 { margin: 0 0 8px; font: 700 15px/1.2 var(--spc-font); }
.spc-lines { margin: 0; padding: 0; list-style: none; }
.spc-line {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto auto; align-items: center; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--spc-line);
}
.spc-line img, .spc-line .spc-nophoto { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: #fff; }
.spc-line__text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.spc-line__text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spc-line__text span { color: var(--spc-muted); font-size: 12px; }
.spc-subtotal { display: flex; justify-content: space-between; margin: 10px 0; padding-top: 8px; border-top: 2px solid var(--spc-line); font-size: 15px; }
.spc-checkout { width: 100%; }
.spc-confirm { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: #FFF4D6; color: #3B2C05; }
.spc-confirm p { margin: 0 0 8px; }
.spc-confirm .spc-btn { margin: 0 6px 6px 0; }
.spc-confirm .spc-btn--ghost { color: #3B2C05; box-shadow: inset 0 0 0 2px rgba(59, 44, 5, 0.3); }

@container pc (max-width: 560px) {
  .spc-line { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .spc-line .spc-line__total { grid-column: 2; }
  .spc-line .spc-link { grid-column: 3; justify-self: end; }
}

@media (max-width: 640px) {
  .pitch { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .pitch__num { width: 56px; height: 56px; font-size: 20px; }
  .demo__reset { margin-left: 0; }
  .pc { aspect-ratio: auto; height: min(88svh, 760px); min-height: 600px; border-radius: 16px; background: linear-gradient(180deg, #F7DDBF 0%, #F2CFA6 59%, #B97A4C 59%, #A86A3F 100%); }
  .pc__room::before { inset: 59% 0 0; }
  .pc__room::after { top: 57.5%; }
  .pc__monitor { left: 14%; width: 72%; top: 18%; height: 34%; }
  .pc__desk { left: 6%; right: 6%; top: 56%; }
  .pc__keyboard { left: 35%; width: 30%; top: 53.5%; }
  .pc__mug { left: 75%; top: 50.5%; width: 6%; }
  .pc__window { width: 28%; height: 13%; top: 4%; }
  .pc__shelf { width: 34%; top: 7%; }
  .pc__plant { display: none; }
  .pc.is-walked .pc__walker { left: 43%; top: 64%; }
  .pc__walker { width: 13%; height: 16%; }
}

@media (prefers-reduced-motion: reduce) {
  .pc__room, .pc__walker, .pc__screen.is-zooming { transition: none; }
  .pc.is-walked .pc__walker, .pc__idle small { animation: none; }
}
