/* PiXiEED home — a playground first, then works and places */
.home-play main { background: var(--pixieed-bg, #f7f8f6); }

/* ---- hero: the canvas is the page ---- */
.hp-hero { padding: 0; }
.hp-stage { position: relative; height: min(68svh, 38rem); min-height: 26rem; overflow: hidden; background: #0f1822; isolation: isolate; }
.hp-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; touch-action: none; cursor: crosshair; }
.hp-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,.35)); z-index: 1; }
.hp-hero-copy { position: absolute; left: 0; right: 0; bottom: 5.4rem; z-index: 2; display: grid; justify-items: center; gap: .7rem; padding: 0 1rem; text-align: center; pointer-events: none; }
.home-play .hp-hero-copy h1 { margin: 0; color: #fff; font-size: clamp(2.1rem, 8.5vw, 4.2rem); font-weight: 900; line-height: 1.08; letter-spacing: .02em; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.hp-hint { margin: 0; padding: .45rem .95rem; border-radius: 999px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.9); font-size: .85rem; font-weight: 700; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: hp-bob 2.4s ease-in-out infinite; transition: opacity .6s, transform .6s; }
.hp-hint.is-used { opacity: 0; transform: translateY(.5rem); animation: none; }
@keyframes hp-bob { 50% { transform: translateY(-4px); } }
.hp-tools { position: absolute; left: 50%; bottom: 1.1rem; translate: -50% 0; z-index: 3; display: flex; align-items: center; gap: .5rem; padding: .4rem .5rem; border-radius: 999px; background: rgba(15, 24, 34, .72); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hp-colors { display: flex; gap: .35rem; }
.hp-colors button { width: 1.9rem; height: 1.9rem; padding: 0; border: 2px solid rgba(255,255,255,.25); border-radius: .45rem; background: var(--c); cursor: pointer; transition: transform .15s var(--pixieed-ease), border-color .15s; }
.hp-colors button[aria-checked="true"] { border-color: #fff; transform: translateY(-3px) scale(1.08); box-shadow: 0 6px 14px rgba(0,0,0,.35); }
.hp-icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; }
.hp-icon svg { width: 1.15rem; height: 1.15rem; }
.hp-icon[aria-pressed="false"] .hp-wave { opacity: 0; }
.hp-icon[aria-pressed="false"] { opacity: .6; }

/* ---- toys ---- */
.hp-section { padding: 3rem 0 1rem; }
.home-play .hp-heading { margin: 0 0 1.1rem; font-size: clamp(1.4rem, 4.5vw, 2rem); font-weight: 900; letter-spacing: .02em; }
.hp-toys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
@media (min-width: 720px) { .hp-toys { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; } }
.hp-toy { position: relative; display: grid; gap: .15rem; padding: .55rem .55rem .8rem; border-radius: 1.2rem; background: var(--pixieed-surface, #fff); color: var(--pixieed-ink, #1b2025); text-decoration: none; box-shadow: 0 1px 0 var(--pixieed-line), 0 12px 30px rgba(27,32,37,.06); transition: transform .25s var(--pixieed-ease), box-shadow .25s; outline-offset: 3px;
  opacity: 0; transform: translateY(14px); }
.hp-toy.is-in { opacity: 1; transform: none; transition: opacity .5s var(--pixieed-ease), transform .5s var(--pixieed-ease), box-shadow .25s; }
.hp-toy:hover { transform: translateY(-3px); box-shadow: 0 1px 0 var(--pixieed-line), 0 18px 40px rgba(27,32,37,.12); }
.hp-view { display: grid; place-items: center; aspect-ratio: 1; margin-bottom: .45rem; border-radius: .8rem; background: var(--tone); overflow: hidden; }
.hp-view canvas { width: 100%; height: auto; image-rendering: pixelated; touch-action: manipulation; }
.home-play .hp-toy-name { padding: 0 .3rem; font-size: .92rem; font-weight: 900; line-height: 1.25; }
.hp-toy-line { padding: 0 .3rem; color: var(--pixieed-muted); font-size: .76rem; font-weight: 600; }
.hp-chip { position: absolute; top: .95rem; right: .95rem; padding: .22rem .55rem; border-radius: 999px; background: #ffd35a; color: #15171b; font-size: .66rem; font-weight: 900; letter-spacing: .04em; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.hp-chip.is-open { background: #fff; color: var(--pixieed-accent, #e75445); }
.hp-chip.is-open::after { content: " →"; }
@media (prefers-reduced-motion: reduce) { .hp-hint { animation: none; } .hp-toy { opacity: 1; transform: none; } }
.hp-score { position: absolute; top: 1rem; right: 1rem; z-index: 3; padding: .35rem .8rem; border-radius: 999px; background: rgba(255, 211, 90, .95); color: #15171b; font: 900 .95rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; box-shadow: 0 6px 18px rgba(0,0,0,.35); pointer-events: none; }
.hp-score[hidden] { display: none; }
.hp-score.is-pop { animation: hp-pop .35s var(--pixieed-ease); }
@keyframes hp-pop { 40% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .hp-score.is-pop { animation: none; } }

/* ---- where to go next: two doors on the first screen ---- */
.hp-go { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; padding: .9rem 1rem 1.3rem; background: #0f1822; border-top: 1px solid rgba(255,255,255,.06); }
.hp-go a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.15rem; border-radius: 999px; font-size: .92rem; font-weight: 900; text-decoration: none; letter-spacing: .02em; transition: transform .15s var(--pixieed-ease), box-shadow .15s; }
.hp-go-main { background: #ffd35a; color: #15171b; box-shadow: 0 4px 0 #b88f1d, 0 10px 24px rgba(0,0,0,.3); }
.hp-go-sub { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hp-go a:hover { transform: translateY(-2px); }
.hp-go a:active { transform: translateY(2px); box-shadow: none; }
.hp-go a:focus-visible, .hp-invite:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.hp-stage canvas:focus-visible { outline: 3px solid #ffd35a; outline-offset: -3px; }

/* ---- a nudge toward the tool that matches the play ---- */
.hp-invite { position: absolute; top: 1rem; left: 1rem; z-index: 4; display: flex; align-items: center; gap: .6rem; max-width: calc(100% - 7rem); padding: .4rem .9rem .4rem .4rem; border-radius: 1rem; background: #fff; color: #15171b; font-size: .88rem; font-weight: 900; line-height: 1.3; text-decoration: none; box-shadow: 0 4px 0 rgba(0,0,0,.25), 0 14px 34px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(-120%); transition: opacity .35s, transform .45s cubic-bezier(.2, 1.4, .4, 1); }
.hp-invite.is-in { opacity: 1; transform: none; }
.hp-invite[hidden] { display: none; }
.hp-invite-icon { position: static !important; flex: none; width: 2.6rem !important; height: 2.6rem !important; padding: .3rem; box-sizing: border-box; border-radius: .6rem; background: #fff1c9; image-rendering: pixelated; }
.hp-invite-go { flex: none; color: var(--pixieed-accent, #e75445); animation: hp-nudge 1s ease-in-out infinite; }
@keyframes hp-nudge { 50% { transform: translateX(3px); } }

/* ---- "もうすぐ": smaller, after the ones that open ---- */
.home-play .hp-subheading { margin: 1.8rem 0 .7rem; color: var(--pixieed-muted); font-size: .9rem; font-weight: 900; letter-spacing: .08em; }
.hp-toys--soon { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
@media (min-width: 720px) { .hp-toys--soon { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; } }
.hp-toys--soon .hp-toy { padding: .4rem .4rem .6rem; border-radius: 1rem; }
.hp-toys--soon .hp-view { margin-bottom: .3rem; border-radius: .65rem; }
.home-play .hp-toys--soon .hp-toy-name { font-size: .78rem; }
.hp-toys--soon .hp-toy-line { display: none; }
.hp-toys--soon .hp-chip { top: .6rem; right: .6rem; font-size: .58rem; padding: .16rem .42rem; }
.hp-toy.is-called { animation: hp-called 1.2s var(--pixieed-ease) 2; }
@keyframes hp-called { 30% { box-shadow: 0 0 0 4px #ffd35a, 0 18px 40px rgba(27,32,37,.18); transform: translateY(-4px); } }

/* ---- works that people posted, drifting by ---- */
.hp-feed { margin-top: 1rem; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.hp-feed[hidden] { display: none; }
.hp-feed-track { display: flex; gap: .7rem; width: max-content; animation: hp-drift calc(var(--n, 8) * 3.5s) linear infinite; }
.hp-feed:hover .hp-feed-track, .hp-feed:focus-within .hp-feed-track, .hp-feed:active .hp-feed-track { animation-play-state: paused; }
.hp-feed-item { flex: none; display: block; width: 6.5rem; aspect-ratio: 1; border-radius: .8rem; overflow: hidden; background: #0f1822; box-shadow: 0 1px 0 var(--pixieed-line), 0 10px 24px rgba(27,32,37,.1); transition: transform .2s var(--pixieed-ease); }
.hp-feed-item:hover { transform: translateY(-3px) rotate(-1.5deg); }
.hp-feed-item img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
@keyframes hp-drift { to { transform: translateX(calc(-50% - .35rem)); } }
@media (prefers-reduced-motion: reduce) { .hp-feed-track { animation: none; } .hp-feed { overflow-x: auto; } .hp-invite, .hp-invite-go, .hp-toy.is-called { animation: none; transition: none; } }
