/* The Grand Compendium - The Lucky Claw Arcade (2026-11-22). Cabinet artwork from the owner; the claw is still a simple drawing (approved stand-in). */
.gc-claw{background:linear-gradient(150deg,#fff8e8,#f8e8ff 60%,#e9f6ff);border:3px solid #f0d9a8;border-radius:25px;padding:clamp(14px,3vw,28px);box-shadow:0 8px 0 #ead6ef;color:#5c4270}
.gc-claw-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;flex-wrap:wrap}
.gc-claw-head h1{font:800 clamp(26px,4vw,38px) Georgia,serif;color:#874db2;margin:0 0 6px}
.gc-claw-head p{margin:0;max-width:640px;line-height:1.55}
.gc-claw-tries{display:flex;flex-direction:column;align-items:center;background:#fffaf0;border:2px solid #f0d9a8;border-radius:18px;padding:10px 18px;min-width:120px}
.gc-claw-tries b{font:800 30px Georgia,serif;color:#a0592a}
.gc-claw-tries small{color:#8a6aa3;text-align:center}
.gc-claw-error{color:#a8325a;font-weight:700;margin:12px 0 0}
.gc-claw-error:empty{display:none}
.gc-claw-msg{text-align:center;color:#8a6aa3;font-weight:700;margin:18px 0}
.gc-claw-signin{text-align:center;background:#fffdf8;border:1px dashed #e1c6ea;border-radius:16px;padding:14px;margin:16px 0}
.gc-claw-signin p{margin:0 0 10px}
.gc-claw-noart{font-size:30px;color:#c9add8}
/* Machine chooser */
.gc-claw-machines{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:18px;margin-top:18px}
.gc-claw-card{background:#fffdf8;border:2px solid #ecd6ef;border-radius:20px;padding:16px;display:flex;flex-direction:column;gap:6px}
.gc-claw-card p{margin:0}
.gc-claw-card .btn{align-self:flex-start;margin-top:6px}
.gc-claw-cardtop{background:linear-gradient(180deg,#6d3f98,#4b2a6e);border-radius:14px;padding:10px;text-align:center}
.gc-claw-marquee{display:inline-block;font:800 16px Georgia,serif;color:#ffe9a8;letter-spacing:.06em;text-shadow:0 0 8px #ffcf5c99}
.gc-claw-peeks{display:flex;justify-content:center;gap:6px;margin-top:8px}
.gc-claw-peek{width:54px;height:54px;background:#ffffff22;border-radius:12px;display:grid;place-items:center;overflow:hidden}
.gc-claw-peek img{max-width:90%;max-height:90%;object-fit:contain}
/* Prize list */
.gc-claw-pool{margin-top:10px}
.gc-claw-pool summary{cursor:pointer;font-weight:800;color:#7b4f99}
.gc-claw-poolgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;margin-top:10px}
.gc-claw-poolitem{display:flex;flex-direction:column;align-items:center;text-align:center;gap:2px;background:#fff;border:1px solid #eee0f3;border-radius:14px;padding:8px}
.gc-claw-poolitem b{font-size:13px;color:#5f3c7d}
.gc-claw-poolitem small{font-size:11px;color:#9a8aa6}
.gc-claw-poolart{width:64px;height:64px;display:grid;place-items:center}
.gc-claw-poolart img{max-width:100%;max-height:100%;object-fit:contain}
/* Cabinet: the owner's cabinet artwork (assets/arcade/claw-cabinet.webp) sits on top; the play area shows
   through its see-through window. Sizes inside the play area scale with it (cqw = 1% of the window's width). */
/* Centred, and sized so the whole machine plus its control box fit on screen without scrolling.
   The cabinet picture is 1.56x taller than wide; --gc-header-h is the pinned site header's height
   (measured by lucky-claw.js) and ~185px is left for the control box and gaps. */
.gc-claw-play{display:flex;flex-direction:column;align-items:center}
.gc-claw-cabinet{width:min(460px,100%,calc((100dvh - var(--gc-header-h,90px) - 185px) * .641));min-width:200px;margin:14px auto 0}
.gc-claw-play .gc-claw-pool{align-self:stretch;text-align:center}
.gc-claw-play .gc-claw-poolgrid{text-align:left}
/* compact result inside the control box */
.gc-claw-mini{display:flex;align-items:center;justify-content:center;gap:10px;margin:0 0 10px;text-align:left}
.gc-claw-mini span{display:flex;flex-direction:column;gap:1px}
.gc-claw-mini b{font:700 16px Georgia,serif;color:#fff4d6}
.gc-claw-mini small{color:#f3e2ff;font-size:12px}
.gc-claw-mini.miss{text-align:center}
.gc-claw-miniart{width:52px;height:52px;flex:none;display:grid!important;place-items:center;background:#ffffff22;border-radius:12px}
.gc-claw-miniart img{max-width:46px;max-height:46px;object-fit:contain}

.gc-claw-frame{position:relative;width:100%;aspect-ratio:520/811;container-type:inline-size}
.gc-claw-frame::before{content:"";position:absolute;left:13%;right:13%;top:22%;height:43%;z-index:0;background:linear-gradient(180deg,#eef6ff,#f3eaff)}   /* pale glass behind the side windows */
.gc-claw-art{position:absolute;inset:0;width:100%;height:100%;z-index:4;pointer-events:none;user-select:none;filter:drop-shadow(0 10px 14px #4b2a6e40)}
/* window in the artwork: left 24.2%, top 30.2%, width 51.5%, height 29.6% (a little bigger so it tucks under the gold edge) */
.gc-claw-glass{position:absolute;left:23.4%;top:29.4%;width:53.2%;height:31.2%;overflow:hidden;z-index:1;container-type:inline-size;background:#5c3f8e url(/assets/arcade/claw-interior.webp?v=1) center/100% 100% no-repeat}
.gc-claw-sign{position:absolute;left:16%;right:16%;top:11.5%;height:8%;z-index:5;display:grid;place-items:center;text-align:center;font:800 5.2cqw Georgia,serif;color:#6c4290;letter-spacing:.04em;text-shadow:0 1px 0 #fff8;pointer-events:none}
.gc-claw-rail,.gc-claw-floor{display:none}
/* the painted claw (open + closed pictures stacked; .is-closed shows the closed one) on a gold cable */
.gc-claw-arm{position:absolute;left:50%;top:0;width:26cqw;margin-left:-13cqw;z-index:5;transition:transform .9s cubic-bezier(.45,.05,.4,1)}
.gc-claw-cable{position:absolute;left:calc(50% - .8cqw);bottom:calc(100% - 2px);width:1.6cqw;height:200cqw;background:linear-gradient(90deg,#8a6a2e,#e3c070 50%,#8a6a2e)}
.gc-claw-img{position:relative;display:block;width:100%;height:auto;z-index:2;user-select:none;filter:drop-shadow(0 3px 3px #2a184066);transition:opacity .12s}
.gc-claw-img-closed{position:absolute;left:0;top:0;opacity:0}
.gc-claw-arm.is-closed .gc-claw-img-open{opacity:0}
.gc-claw-arm.is-closed .gc-claw-img-closed{opacity:1}
/* the prize hangs in the claw's grip, just behind the prongs */
.gc-claw-held{position:absolute;left:50%;top:22cqw;width:20cqw;margin-left:-10cqw;z-index:1;display:grid;place-items:center;pointer-events:none}
.gc-claw-held img,.gc-claw-carried img{max-width:18cqw;max-height:18cqw;object-fit:contain;filter:drop-shadow(0 4px 4px #2a184066);animation:none!important}
.gc-claw-carried{display:grid;place-items:center}
.gc-claw-carried.is-slipping{animation:gcClawSlip .52s ease-in forwards}
@keyframes gcClawSlip{0%{transform:translateY(0) rotate(0)}100%{transform:translateY(55cqw) rotate(18deg);opacity:0}}
/* loose prizes standing on the striped floor of the painted interior (about three show at once) */
.gc-claw-belt{position:absolute;left:0;bottom:11cqw;display:flex;align-items:flex-end;width:max-content;z-index:2}
.gc-claw-belt.is-moving{animation:gcClawBelt 7s linear infinite}
@keyframes gcClawBelt{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.gc-claw-prize{width:32cqw;height:26cqw;flex:none;display:grid;place-items:end center;transform:translateY(calc(var(--lift,0px) * -.3)) rotate(var(--tilt,0deg))}
.gc-claw-prize img{max-width:23cqw;max-height:23cqw;object-fit:contain;filter:drop-shadow(0 4px 4px #2a184066);animation:none!important}
.gc-claw-prize.is-gone{visibility:hidden}
.gc-claw-controls{text-align:center;margin-top:8px;padding:10px 10px;border-radius:18px;background:linear-gradient(180deg,#7e4fae,#4b2a6e);border:3px solid #e7b94f;color:#ffe9a8}
.gc-claw-controls .mini{color:#f3e2ff;margin:6px 0 0;font-size:12px}
.gc-claw-drop{font-size:16px;padding:10px 24px}
.gc-claw-again{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.gc-claw-again .btn{padding:8px 14px;font-size:14px}
/* Result */
.gc-claw-result{display:flex;align-items:center;gap:16px;max-width:720px;margin:16px 0 0;padding:14px 18px;border-radius:18px;animation:gcClawPop .4s ease-out}
.gc-claw-result.win{background:linear-gradient(120deg,#fff6e5,#f6eaff);border:2px solid #f0cf9c}
.gc-claw-result.miss{background:#fffafc;border:2px dashed #e2cfe9;justify-content:center;text-align:center}
.gc-claw-result div{display:flex;flex-direction:column;gap:3px}
.gc-claw-result b{font:700 21px Georgia,serif;color:#5f3c7d}
.gc-claw-result small{color:#8a6aa3}
.gc-claw-result .rarity{align-self:flex-start}
.gc-claw-resultart{width:100px;height:100px;flex:none;display:grid!important;place-items:center}
.gc-claw-resultart img{max-width:100%;max-height:100%;object-fit:contain}
@keyframes gcClawPop{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.gc-claw-belt.is-moving{animation-duration:14s}.gc-claw-result{animation:none}}
@media (max-width:600px){
        .gc-claw-tries{flex-direction:row;gap:8px;width:100%;justify-content:center}
  .gc-claw-result.win{flex-direction:column;text-align:center}
  .gc-claw-result .rarity{align-self:center}
  .gc-claw-again{flex-wrap:nowrap}
  .gc-claw-again .btn{padding:8px 10px;font-size:13px;white-space:nowrap}
  .gc-claw-mini{margin-bottom:8px}
  .gc-claw-mini b{font-size:15px}
}
.gc-claw-switch{display:inline-block;margin-top:6px;background:none;border:0;color:#ffe9a8;font:700 14px system-ui,sans-serif;text-decoration:underline;cursor:pointer}
.gc-claw-switch:hover,.gc-claw-switch:focus-visible{color:#fff}
/* Developer site: which days a machine is in the public Palace (2026-11-23). */
.gc-machine-days{margin:4px 0 6px;font-size:12px;font-weight:700;color:#3f7d55}
.gc-machine-days.is-away{color:#a0564f}
