/* Try it — an interactive illustration of the Puck Mac app and Android
   companion. The Mac window keeps its own dark chrome in both page themes. */
.puck-try {
    background: var(--puck-hero-bg); padding: clamp(1.5rem, 3vw, 3rem) 0 clamp(5rem, 9vw, 8rem);
    --try-mac-h: clamp(440px, calc(100svh - var(--chrome-top) - var(--product-nav-height, 3.25rem) - 220px), 660px);
}

.puck-try__modes { display: flex; gap: .5rem; margin: 2rem 0 clamp(1.6rem, 3.5vw, 2.6rem); }
.puck-try__mode {
    appearance: none; border: 1px solid var(--puck-line); background: transparent;
    color: var(--puck-muted); font-family: var(--font-mono); font-size: .78rem;
    letter-spacing: .04em; padding: .85rem 1.5rem; border-radius: 999px; cursor: pointer;
}
.puck-try__mode:hover { color: var(--puck-ink); border-color: color-mix(in srgb, var(--puck-ink) 45%, transparent); }
.puck-try__mode[aria-pressed="true"] { background: var(--puck-ink); color: var(--puck-hero-bg); border-color: var(--puck-ink); }
.puck-try button:focus-visible, .puck-try input:focus-visible, .puck-try [role="button"]:focus-visible { outline: 2px solid var(--puck-blue); outline-offset: 3px; }

.puck-try__stage {
    position: relative; display: flex; align-items: flex-end; justify-content: center;
    padding: clamp(1.75rem, 4.5vw, 3.5rem) clamp(1rem, 4vw, 3rem) clamp(2.25rem, 5vw, 3.5rem);
    border-radius: 20px; overflow: hidden;
    background:
        radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--puck-ink) 12%, transparent), transparent 60%),
        linear-gradient(180deg, color-mix(in srgb, var(--puck-ink) 8%, var(--puck-hero-bg)), color-mix(in srgb, var(--puck-ink) 4%, var(--puck-hero-bg)));
    border: 1px solid color-mix(in srgb, var(--puck-ink) 14%, transparent);
    box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .55);
}
.puck-try__stage::after {
    content: ""; position: absolute; left: 8%; right: 8%; bottom: 8%;
    height: 22px; border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, .4), transparent 70%);
    pointer-events: none;
}

/* ------- Mac window ------- */
.puck-try__mac { position: relative; z-index: 1; width: min(78%, 800px); flex: 0 0 auto; transition: width .5s cubic-bezier(.25, .8, .3, 1), height .5s cubic-bezier(.25, .8, .3, 1), opacity .4s ease, filter .4s ease; }
/* Handheld mode: same DOM and layout, scaled down and pushed right/back — no reflow. */
.puck-try__stage[data-mode="handheld"] .puck-try__mac { width: calc(min(78%, 800px) * .72); height: calc(var(--try-mac-h) * .72); margin-left: 4%; opacity: .88; filter: saturate(.92); }
.puck-try__stage[data-mode="handheld"] .puck-macwin { width: calc(100% / .72); transform: scale(.72); transform-origin: top left; }

.puck-macwin {
    display: flex; flex-direction: column; width: 100%; height: var(--try-mac-h); border-radius: 12px; overflow: hidden;
    background: #1c1d24; border: 1px solid rgba(255, 255, 255, .09);
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .65), 0 4px 14px rgba(0, 0, 0, .3);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    color: #e8e9ee; font-size: 12px; line-height: 1.35;
}
.puck-macwin__chrome { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #282a32; border-bottom: 1px solid rgba(0, 0, 0, .35); }
.puck-macwin__lights { display: inline-flex; gap: 7px; }
.puck-macwin__lights i { width: 11px; height: 11px; border-radius: 50%; }
.puck-macwin__lights .is-red { background: #ff5f57; }
.puck-macwin__lights .is-yellow { background: #febc2e; }
.puck-macwin__lights .is-green { background: #28c840; }
.puck-macwin__sidetoggle { appearance: none; border: 0; background: transparent; color: #9aa0ab; padding: 3px; border-radius: 4px; cursor: pointer; display: inline-flex; }
.puck-macwin__sidetoggle:hover { color: #e8e9ee; background: rgba(255, 255, 255, .08); }
.puck-macwin__sidetoggle[aria-pressed="false"] { color: #6e747f; }
.puck-macwin__appname { font-weight: 600; font-size: 12px; color: #c9ccd4; }
.puck-macwin__conn { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: #9aa0ab; font-family: var(--font-mono); }
.puck-macwin__dot { width: 6px; height: 6px; border-radius: 50%; background: #30d158; }

.puck-macwin__body { display: grid; grid-template-columns: 148px minmax(0, 1fr) 196px; flex: 1; min-height: 0; }
.puck-macwin__body.is-sidehidden { grid-template-columns: 0 minmax(0, 1fr) 196px; }
.puck-macwin__body.is-sidehidden .puck-macwin__sidebar { visibility: hidden; padding: 0; border: 0; overflow: hidden; }

.puck-macwin__sidebar { padding: 10px 8px; background: #22232b; border-right: 1px solid rgba(0, 0, 0, .3); overflow: hidden; transition: padding .2s ease; }
.puck-macwin__grouplabel { margin: 12px 8px 3px; font-size: 10px; font-weight: 600; color: #787d88; }
.puck-macwin__systems { display: block; }
.puck-macwin__row {
    display: flex; align-items: center; gap: 7px; width: 100%;
    appearance: none; border: 0; background: transparent; color: #c9ccd4;
    font: inherit; text-align: left; padding: 4px 8px; border-radius: 6px; cursor: pointer;
}
.puck-macwin__row svg { flex: 0 0 auto; color: #8f95a0; }
.puck-macwin__row:hover { background: rgba(255, 255, 255, .06); }
.puck-macwin__row.is-selected { background: #3d4657; color: #fff; }
.puck-macwin__row.is-selected svg { color: #fff; }
.puck-macwin__count { margin-left: auto; font-size: 10px; color: #787d88; font-family: var(--font-mono); }
.puck-macwin__row.is-selected .puck-macwin__count { color: #c9ccd4; }

.puck-macwin__main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 12px 14px 10px; }
.puck-macwin__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.puck-macwin__toolbar h3 { margin: 0; font-size: 17px; font-weight: 600; color: #f2f3f6; }
.puck-macwin__search { display: inline-flex; align-items: center; gap: 6px; background: #14151a; border: 1px solid rgba(255, 255, 255, .09); border-radius: 7px; padding: 4px 8px; color: #787d88; }
.puck-macwin__search input { appearance: none; border: 0; background: transparent; color: #e8e9ee; font: inherit; font-size: 11px; width: 92px; outline: none; }
.puck-macwin__search input::placeholder { color: #6c727d; }
.puck-macwin__search input::-webkit-search-cancel-button { display: none; }

.puck-macwin__grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px 10px; align-content: start;
    flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent;
    padding-right: 4px;
}
.puck-macwin__grid::-webkit-scrollbar { width: 6px; }
.puck-macwin__grid::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 3px; }
.puck-macwin__grid::-webkit-scrollbar-track { background: transparent; }
.puck-macwin__card {
    appearance: none; border: 0; background: transparent; padding: 0; cursor: pointer;
    display: flex; flex-direction: column; gap: 5px; text-align: left; color: inherit; font: inherit;
    border-radius: 8px;
}
.puck-macwin__cover { display: block; border-radius: 7px; overflow: hidden; background: #14151a; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); transition: transform .15s ease, box-shadow .15s ease; }
.puck-macwin__cover img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.puck-macwin__card:hover .puck-macwin__cover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 0, 0, .45); }
.puck-macwin__card.is-selected .puck-macwin__cover { outline: 2px solid #0a84ff; outline-offset: 2px; }
.puck-macwin__cardtitle { font-size: 11px; font-weight: 600; color: #e8e9ee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.puck-macwin__cardsys { font-size: 10px; color: #787d88; }
.puck-macwin__card.is-launching .puck-macwin__cover { animation: puck-try-pulse .45s ease 2; }
@keyframes puck-try-pulse { 50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(10, 132, 255, .25); } }

.puck-macwin__empty { margin: 18px 0; color: #787d88; }
.puck-macwin__hint { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 10.5px; color: #8f95a0; animation: puck-try-hintpulse 2.4s ease-in-out infinite; }
.puck-macwin__hint.is-done { animation: none; opacity: .55; }
@keyframes puck-try-hintpulse { 50% { color: #c9ccd4; } }

.puck-macwin__detail { padding: 14px 12px; background: #20212a; border-left: 1px solid rgba(0, 0, 0, .3); overflow-y: auto; scrollbar-width: none; }
.puck-macwin__detail::-webkit-scrollbar { display: none; }
.puck-macwin__detailcover { display: block; width: 100%; max-width: 152px; height: auto; border-radius: 9px; margin: 0 auto 10px; box-shadow: 0 8px 20px rgba(0, 0, 0, .45); }
.puck-macwin__detailhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.puck-macwin__detailhead h4 { margin: 0; font-size: 14px; font-weight: 600; color: #f2f3f6; }
.puck-macwin__pill { font-size: 10px; font-weight: 600; color: #a5b4cc; background: #333947; border-radius: 999px; padding: 2px 8px; }
.puck-macwin__play {
    appearance: none; border: 0; width: 100%; margin: 10px 0 12px; padding: 7px 0;
    background: #0a84ff; color: #fff; font: inherit; font-weight: 600; font-size: 12px;
    border-radius: 7px; cursor: pointer; text-align: center;
}
.puck-macwin__play:hover { background: #2f96ff; }
.puck-macwin__play:active { background: #0970d9; }
.puck-macwin__fields { margin: 0; }
.puck-macwin__fields div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.puck-macwin__fields dt { color: #787d88; font-size: 10.5px; }
.puck-macwin__fields dd { margin: 0; color: #c9ccd4; font-size: 10.5px; text-align: right; }
.puck-macwin__devices { margin-top: 14px; }
.puck-macwin__devices > p { margin: 0 0 6px; font-size: 10px; font-weight: 600; color: #787d88; }
.puck-macwin__device { display: flex; flex-direction: column; gap: 4px; background: #191b22; border: 1px solid rgba(255, 255, 255, .07); border-radius: 8px; padding: 9px 10px; position: relative; }
.puck-macwin__devicestatus { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: #30d158; }
.puck-macwin__devicename { display: flex; flex-direction: column; font-size: 9.5px; color: #787d88; }
.puck-macwin__devicename strong { font-size: 11px; font-weight: 600; color: #e8e9ee; }
.puck-macwin__chips { display: flex; gap: 4px; margin-top: 3px; }
.puck-macwin__chips i { font-style: normal; font-size: 9px; font-family: var(--font-mono); color: #9aa0ab; background: #262a33; border-radius: 4px; padding: 2px 5px; }

/* ------- Player window ------- */
.puck-macwin__player {
    position: absolute; z-index: 5; left: 50%; top: 50%; width: min(430px, 72%);
    transform: translate(-50%, -50%) scale(.94); opacity: 0; pointer-events: none;
    background: #16171d; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 30px 70px -18px rgba(0, 0, 0, .8), 0 4px 16px rgba(0, 0, 0, .5);
    transition: transform .25s cubic-bezier(.2, .8, .3, 1.1), opacity .22s ease;
}
.puck-macwin__player.is-open { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.puck-macwin__playerbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #282a32; border-bottom: 1px solid rgba(0, 0, 0, .35); }
.puck-macwin__playerclose { appearance: none; border: 0; width: 12px; height: 12px; flex: 0 0 auto; border-radius: 50%; background: #ff5f57; cursor: pointer; padding: 0; }
.puck-macwin__playerclose:hover { box-shadow: 0 0 0 3px rgba(255, 95, 87, .3); }
.puck-macwin__playerbar span { font-size: 11px; color: #c9ccd4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.puck-macwin__playerscreen { position: relative; aspect-ratio: 4 / 3; background: #000; }
.puck-macwin__playerscreen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.puck-macwin__playerfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 10px 5px 12px; background: #1d1f27; border-top: 1px solid rgba(0, 0, 0, .35); }
.puck-macwin__playerfoot p { margin: 0; font-size: 10px; color: #787d88; }
.puck-macwin__end { appearance: none; border: 1px solid rgba(255, 255, 255, .18); background: #262a33; color: #e8e9ee; font: inherit; font-size: 10.5px; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.puck-macwin__end:hover { background: #333845; }

/* ------- Handheld ------- */
.puck-try__device { position: relative; z-index: 2; flex: 0 0 auto; width: 176px; margin-left: -110px; margin-bottom: -14px; transition: width .5s cubic-bezier(.25, .8, .3, 1), margin .5s cubic-bezier(.25, .8, .3, 1); }
.puck-try__svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .45)); }
.puck-try__stage[data-mode="handheld"] .puck-try__device { order: -1; width: 296px; margin-left: 0; margin-right: -70px; }
.puck-try__stage[data-mode="handheld"] .puck-try__svg { filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .55)); }

.puck-try__shade { transition: transform .3s cubic-bezier(.25, .8, .3, 1); }
.puck-try__shade.is-dragging { transition: none; }
.puck-try__figure { position: relative; }
/* HTML overlay (not SVG — Blink doesn't honor touch-action on SVG children), covering the top of the screen */
.puck-try__drag { position: absolute; left: 9.4%; top: 8.6%; width: 81.2%; height: 14.4%; touch-action: none; cursor: grab; }
.puck-try__drag:active { cursor: grabbing; }
.puck-try__tile { cursor: pointer; }
.puck-try__press { transition: opacity .18s ease; }
.puck-try__shade.is-tapped .puck-try__press { opacity: .45; }
.puck-try__ripple { transition: opacity .3s ease; }
.puck-try__shade.is-tapped .puck-try__ripple { animation: puck-try-ripple .5s ease-out; }
@keyframes puck-try-ripple { from { r: 4; opacity: .9; } to { r: 26; opacity: 0; } }
.puck-try__playcard { transition: opacity .35s ease; }

.puck-try__finger { position: absolute; left: 50%; top: 9%; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: rgba(255, 255, 255, .28); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85), 0 2px 8px rgba(0, 0, 0, .3); pointer-events: none; opacity: 0; }
.puck-try__finger i { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #fff; }
.puck-try__stage[data-mode="handheld"]:not(.is-interacted) .puck-try__finger { opacity: 1; animation: puck-try-finger 2.4s ease-in-out infinite; }
@keyframes puck-try-finger { 0%, 15% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 62% { transform: translateY(44px); opacity: 1; } 80%, 100% { transform: translateY(44px); opacity: 0; } }

.puck-try__devicebar { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.puck-try__qs, .puck-try__again {
    appearance: none; border: 1px solid color-mix(in srgb, var(--puck-ink) 30%, transparent);
    background: transparent; color: var(--puck-ink); font-family: var(--font-mono);
    font-size: .68rem; letter-spacing: .04em; padding: .55rem .95rem; border-radius: 999px; cursor: pointer;
}
.puck-try__qs:hover, .puck-try__again:hover { border-color: var(--puck-ink); }
.puck-try__stage[data-mode="mac"] .puck-try__qs, .puck-try__stage[data-mode="mac"] .puck-try__again, .puck-try__stage[data-mode="mac"] .puck-try__drag { display: none; }

.puck-try__toast {
    position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6;
    margin: 0; padding: .6rem 1.1rem; border-radius: 999px; white-space: nowrap; max-width: calc(100% - 2rem);
    background: color-mix(in srgb, var(--puck-ink) 92%, transparent); color: var(--puck-hero-bg);
    font-size: .75rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); overflow: hidden; text-overflow: ellipsis;
}

.puck-try__note { margin: 1.4rem 0 0; font-size: .78rem; color: var(--puck-muted); }
.puck-try__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------- Compact ------- */
@media (max-width: 799px) {
    .puck-try__stage { flex-direction: column; align-items: stretch; gap: 0; padding: 1.25rem 1rem 3.5rem; }
    .puck-try__mac, .puck-try__stage[data-mode="handheld"] .puck-try__mac { width: 100%; height: auto; margin-left: 0; }
    .puck-try__stage[data-mode="handheld"] .puck-macwin { width: 100%; transform: none; }
    .puck-macwin { height: auto; }
    .puck-macwin__body { grid-template-columns: minmax(0, 1fr); }
    .puck-macwin__body.is-sidehidden { grid-template-columns: minmax(0, 1fr); }
    .puck-macwin__sidebar { display: flex; overflow-x: auto; gap: 4px; padding: 8px; border-right: 0; border-bottom: 1px solid rgba(0, 0, 0, .3); align-items: center; }
    .puck-macwin__body.is-sidehidden .puck-macwin__sidebar { display: none; }
    .puck-macwin__grouplabel { display: none; }
    .puck-macwin__systems { display: contents; }
    .puck-macwin__row { width: auto; flex: 0 0 auto; }
    .puck-macwin__main { padding-bottom: 6px; }
    .puck-macwin__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 0 0 auto; max-height: 292px; }
    /* Detail collapses to a compact row: thumb, title, Play. */
    .puck-macwin__detail { display: flex; align-items: center; gap: 10px; padding: 10px; border-left: 0; border-top: 1px solid rgba(0, 0, 0, .3); }
    .puck-macwin__detailcover { width: 52px; max-width: none; margin: 0; flex: 0 0 auto; border-radius: 6px; }
    .puck-macwin__detailhead { flex: 1; min-width: 0; flex-wrap: nowrap; }
    .puck-macwin__detailhead h4 { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .puck-macwin__play { width: auto; margin: 0; padding: 7px 14px; flex: 0 0 auto; }
    .puck-macwin__fields, .puck-macwin__devices { display: none; }
    .puck-try__device, .puck-try__stage[data-mode="handheld"] .puck-try__device { order: 1; width: min(58%, 240px); margin: -6% auto 0; }
    .puck-try__toast { bottom: 10px; white-space: normal; text-align: center; }
    .puck-macwin__player { width: 88%; }
}

@media (prefers-reduced-motion: reduce) {
    .puck-try__finger { display: none; }
    .puck-try__shade, .puck-try__playcard, .puck-try__mac, .puck-try__device, .puck-macwin__player { transition: none; }
    .puck-macwin__card.is-launching .puck-macwin__cover, .puck-macwin__hint { animation: none; }
}

.puck-try .puck-editorial-head { padding-top: 1.5rem; margin-bottom: 1.5rem; }
@media (max-width: 799px) {
    .puck-try .puck-editorial-head { gap: .75rem; }
    .puck-try__modes { margin: 1rem 0; }
    .puck-try__mode { padding: .75rem 1rem; font-size: .7rem; }
    .puck-try__stage { padding: .75rem .5rem 1.5rem; }
    .puck-macwin__grid { max-height: 210px; }
    .puck-macwin__pill { display: none; }
    .puck-macwin__conn { font-size: 8px; }
    .puck-macwin__detail { gap: 6px; }
    .puck-macwin__detailcover { width: 36px; }
    .puck-macwin__play { padding-inline: 8px; }
    .puck-try__device, .puck-try__stage[data-mode="handheld"] .puck-try__device { width: min(44%, 180px); margin-top: .75rem; }
}
/* Screen coordinates follow the device artwork's translate(3 -13). */
.puck-try__drag { left: 10.3%; top: 5.6%; }
.puck-macwin__playerscreen img { object-fit: contain; }
.puck-try__devicebar { flex-wrap: wrap; }
.puck-try__game-choice { display: flex; flex-direction: column; gap: .35rem; width: 100%; color: var(--puck-muted); font: .65rem var(--font-mono); }
.puck-try__game-choice select { max-width: 100%; width: 100%; padding: .5rem; border: 1px solid var(--puck-line); border-radius: 6px; background: var(--puck-hero-bg); color: var(--puck-ink); font: .7rem var(--font-mono); }
.puck-try__stage[data-mode="mac"] .puck-try__game-choice { display: none; }
.puck-try__transport { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.puck-try__transport .puck-try__mode { border-radius: 6px; padding: .65rem .8rem; font-size: .7rem; }
.puck-try__transport > span { flex: 1 1 250px; color: var(--puck-muted); font: .78rem/1.5 var(--font-mono); }
.puck-try__finger { display: none; }
@media (max-width: 799px) {
 .puck-try__stage[data-mode="handheld"] .puck-try__device { order: -1; width: min(65%, 210px); margin: 0 auto 1.25rem; }
 .puck-try__stage[data-mode="handheld"] .puck-macwin__grid { max-height: 125px; }
}
