/* Game-PC configurator (gamepc.html): the 3D workshop full width, the steps
   in a panel on the right (below it on phones). */
.pc-page { --ink: #060807; --panel: #0b0f0c; --line: #1f2a21; --muted: #9aa69a; --green: var(--studio-green); }
.pc-main { display: grid; grid-template-columns: minmax(0, 1fr) 420px; height: calc(100svh - clamp(64px, 5.85vw, 84px)); min-height: 600px; background: var(--ink); }
.pc-stage { position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(60% 55% at 50% 60%, #0f1d12 0%, #060807 70%); }
.pc-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.pc-stage canvas:active { cursor: grabbing; }
.pc-stage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, #050b12dd, transparent 31%, transparent 78%, #050b12c7); }
.pc-room-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; pointer-events: auto; }
.pc-room-tools button { min-height: 34px; padding: 7px 12px; border: 1px solid #b9d6eb30; border-radius: 8px; background: #09121dd9; color: #bdcbd5; font: 600 11px Arial, Helvetica, sans-serif; cursor: pointer; backdrop-filter: blur(10px); }
.pc-room-tools button[aria-pressed="true"] { border-color: #96e5c27a; color: #d4ffe7; background: #16352dd9; }
.pc-room-tools button:hover { border-color: #b3ffe1; color: #fff; }
.pc-room-tools button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.pc-room-tools button[hidden] { display: none; }
#pc-room-overview { margin-left: 6px; border-color: transparent; background: #09121d99; }

.pc-heading { position: absolute; z-index: 2; top: 26px; left: 32px; pointer-events: none; }
.pc-back { pointer-events: auto; display: inline-block; margin-bottom: 14px; font-size: 13px; color: var(--muted) !important; }
.pc-back:hover { color: var(--green) !important; }
.pc-eyebrow { margin: 0 0 8px !important; font-size: 11px; font-weight: 700; letter-spacing: .24em; color: var(--green); }
.pc-heading h1 { margin: 0; font-size: clamp(26px, 2.6vw, 40px); line-height: 1; letter-spacing: -.02em; }
.pc-heading h1 span, .pc-order h2 span { color: var(--green); }

/* Step pills along the bottom of the stage. */
.pc-steps { position: absolute; z-index: 2; left: 24px; right: 24px; bottom: 22px; display: flex; flex-wrap: wrap; gap: 6px; }
.pc-pill { padding: 7px 12px; border: 1px solid #ffffff1f; border-radius: 999px; background: #0b0f0ccc; color: #c9d0c8; font: 600 12px Arial, Helvetica, sans-serif; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, color .2s, border-color .2s; }
.pc-pill.is-done { border-color: #30ff0b55; color: #e8ffe2; }
.pc-pill.is-done::before { content: "✓ "; color: var(--green); }
.pc-pill[aria-current="step"] { background: var(--green); border-color: var(--green); color: #071004; }
.pc-pill[aria-current="step"]::before { content: none; }
.pc-pill:disabled { opacity: .35; cursor: default; }
.pc-pill:not(:disabled):hover { border-color: var(--green); }
.pc-hint { position: absolute; z-index: 2; right: 26px; top: 30px; margin: 0; font-size: 12px; color: #7f8a7f; pointer-events: none; }

.pc-toast { position: absolute; z-index: 3; left: 50%; top: 24px; max-width: min(520px, 80%); margin: 0; padding: 10px 16px; border-radius: 12px; background: #0b0f0cee; border: 1px solid #30ff0b66; color: #e8ffe2; font-size: 13px; line-height: 1.4; text-align: center; translate: -50% -12px; opacity: 0; pointer-events: none; transition: opacity .3s, translate .3s; }
.pc-toast.is-on { opacity: 1; translate: -50% 0; }

.pc-loading { position: absolute; z-index: 4; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; background: var(--ink); color: var(--muted); }
.pc-loading[hidden] { display: none; }
.pc-spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid #30ff0b33; border-top-color: var(--green); animation: pc-spin .9s linear infinite; }
@keyframes pc-spin { to { rotate: 360deg; } }

/* The panel. */
.pc-panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--panel); }
.pc-panel-head { padding: 28px 28px 16px; border-bottom: 1px solid var(--line); }
.pc-step-count { margin: 0 0 6px !important; font-size: 12px; font-weight: 700; letter-spacing: .18em; color: var(--green); text-transform: uppercase; }
.pc-panel-head h2 { margin: 0; font-size: 30px; letter-spacing: -.02em; }
.pc-step-tip { margin-top: 6px !important; font-size: 14px; color: var(--muted); }
.pc-options { flex: 1; overflow-y: auto; padding: 18px 28px 24px; display: grid; align-content: start; gap: 18px; }
.pc-group { display: grid; gap: 8px; }
.pc-group h3 { margin: 4px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #c9d0c8; }
.pc-option { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 3px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #0f1510; color: var(--studio-text); text-align: left; font: inherit; cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.pc-option:hover:not(:disabled) { border-color: #30ff0b88; }
.pc-option:active:not(:disabled) { transform: scale(.99); }
.pc-option[aria-checked="true"] { border-color: var(--green); background: linear-gradient(90deg, #30ff0b1f, #30ff0b08); box-shadow: inset 3px 0 0 var(--green); }
.pc-option:disabled { opacity: .45; cursor: not-allowed; }
.pc-option-name { font-weight: 700; font-size: 15px; }
.pc-option-sub { grid-column: 1; font-size: 13px; color: var(--muted); }
.pc-option-sub em { font-style: normal; color: #ffb3a8; }
.pc-option-price { grid-column: 2; grid-row: 1 / 3; align-self: center; font-weight: 700; font-size: 14px; color: #e8ffe2; }
.pc-option:focus-visible, .pc-pill:focus-visible, .pc-swatch:focus-visible, .pc-chip:focus-visible, .pc-nav button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.pc-note { margin: 0 !important; font-size: 13px; color: var(--muted); }

.pc-power { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.pc-power-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.pc-power-head b { color: var(--studio-text); }
.pc-power-bar { height: 8px; margin: 10px 0; border-radius: 99px; background: #1a231c; overflow: hidden; }
.pc-power-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #30ff0b, #c6ff3a); }
.pc-power p { margin: 0 !important; font-size: 12px; color: #7f8a7f; }

.pc-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.pc-swatch { width: 38px; height: 38px; padding: 0; border: 2px solid #ffffff22; border-radius: 50%; background: var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 55%, transparent); cursor: pointer; transition: transform .15s, border-color .2s; }
.pc-swatch.is-off { background: repeating-linear-gradient(135deg, #1b231d 0 6px, #0f1510 6px 12px); box-shadow: none; }
.pc-swatch[aria-checked="true"] { border-color: #fff; transform: scale(1.12); }
.pc-chips { display: flex; gap: 8px; }
.pc-chip { flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #0f1510; color: var(--studio-text); font: 600 13px Arial, Helvetica, sans-serif; cursor: pointer; }
.pc-chip[aria-pressed="true"] { border-color: var(--green); color: var(--green); }

.pc-summary { display: grid; gap: 0; margin: 0; }
.pc-summary div { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.pc-summary dt { color: var(--muted); }
.pc-summary dd { margin: 0; }
.pc-summary-price { text-align: right; color: #e8ffe2; }

.pc-panel-foot { padding: 16px 28px 22px; border-top: 1px solid var(--line); background: #090c0a; }
.pc-total { display: flex; justify-content: space-between; align-items: baseline; }
.pc-total span { font-size: 13px; color: var(--muted); }
.pc-total b { font-size: 26px; letter-spacing: -.01em; }
.pc-demo { margin: 6px 0 12px !important; font-size: 11px; color: #6f7a6f; }
.pc-nav { display: flex; gap: 8px; }
.pc-prev { width: 52px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--studio-text); font-size: 18px; cursor: pointer; }
.pc-prev:disabled { opacity: .3; cursor: default; }
.pc-next { flex: 1; min-height: 52px; border: 0; border-radius: 999px; background: var(--green); color: #071004; font: 700 15px Arial, Helvetica, sans-serif; cursor: pointer; transition: box-shadow .2s; }
.pc-next:hover { box-shadow: 0 10px 30px #30ff0b55; }

/* The order (demo). */
.pc-order { width: min(520px, calc(100vw - 32px)); padding: 32px; border: 1px solid #30ff0b55; border-radius: 20px; background: #0b0f0c; color: var(--studio-text); overflow: hidden; }
.pc-order::backdrop { background: #000000b3; backdrop-filter: blur(4px); }
.pc-order h2 { margin: 0 0 16px; font-size: 30px; letter-spacing: -.02em; }
.pc-order-list { display: grid; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 14px; }
.pc-order-list span { display: inline-block; min-width: 96px; color: var(--muted); }
.pc-order-total { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.pc-order-total b { font-size: 22px; color: var(--green); }
.pc-order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pc-order-cta { flex: 1 1 100%; display: grid; place-items: center; min-height: 50px; border-radius: 999px; background: var(--green); color: #071004 !important; font-weight: 700; }
.pc-order-ghost { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--studio-text); cursor: pointer; font: 600 14px Arial, Helvetica, sans-serif; }
.pc-order-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #ffffff12; color: var(--studio-text); font-size: 20px; cursor: pointer; }
.pc-confetti { position: absolute; inset: 0; pointer-events: none; }
.pc-confetti i { position: absolute; left: 50%; top: 30%; width: 8px; height: 14px; border-radius: 2px; background: var(--green); opacity: 0; }
.pc-confetti i:nth-child(3n) { background: #fff; }
.pc-confetti i:nth-child(4n) { background: #9a55ff; }
.pc-order.is-party .pc-confetti i { animation: pc-confetti 1.4s cubic-bezier(.2, .7, .3, 1) both; }
.pc-confetti i:nth-child(1) { --x: -220px; --y: -60px; --r: 200deg; } .pc-confetti i:nth-child(2) { --x: -160px; --y: -140px; --r: -120deg; }
.pc-confetti i:nth-child(3) { --x: -90px; --y: -190px; --r: 300deg; } .pc-confetti i:nth-child(4) { --x: -30px; --y: -220px; --r: -260deg; }
.pc-confetti i:nth-child(5) { --x: 40px; --y: -210px; --r: 160deg; } .pc-confetti i:nth-child(6) { --x: 110px; --y: -180px; --r: -320deg; }
.pc-confetti i:nth-child(7) { --x: 170px; --y: -130px; --r: 240deg; } .pc-confetti i:nth-child(8) { --x: 220px; --y: -50px; --r: -180deg; }
.pc-confetti i:nth-child(9) { --x: -200px; --y: 40px; --r: 280deg; } .pc-confetti i:nth-child(10) { --x: 200px; --y: 50px; --r: -220deg; }
.pc-confetti i:nth-child(11) { --x: -120px; --y: 90px; --r: 140deg; } .pc-confetti i:nth-child(12) { --x: 130px; --y: 100px; --r: -150deg; }
@keyframes pc-confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 160px)) rotate(var(--r)); } }

@media (max-width: 960px) {
    .pc-main { grid-template-columns: 1fr; grid-template-rows: 56svh auto; height: auto; }
    .pc-panel { border-left: 0; border-top: 1px solid var(--line); }
    .pc-options { overflow: visible; }
    .pc-panel-foot { position: sticky; bottom: 0; z-index: 5; }
    .pc-heading { top: 16px; left: 16px; }
    .pc-heading h1 { font-size: 24px; }
    .pc-room-tools { gap: 5px; margin-top: 12px; }
    .pc-room-tools button { padding: 7px 9px; min-height: 36px; font-size: 10px; }
    #pc-room-overview { margin-left: 0; }
    .pc-back { margin-bottom: 8px; }
    .pc-hint { display: none; }
    .pc-steps { left: 12px; right: 12px; bottom: 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .pc-pill { flex: none; }
    .pc-panel-head, .pc-options, .pc-panel-foot { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .pc-order.is-party .pc-confetti i { animation: none; }
    .pc-spinner { animation-duration: 3s; }
}
