/* Bardstar — styles for hooks.js (saved apps, votes, filters, finder, dock, stars, love, up next). */

/* ---------------------------------------------------------------- home grid: cells carry the buttons */
.st-grid > .st-cell { grid-column: span 2; position: relative; display: flex; min-width: 0; }
.st-grid > .st-cell.st-big { grid-column: span 3; }
.st-grid > .st-cell[hidden] { display: none; }
.st-cell > .st-card { flex: 1; grid-column: auto; }
.st-grid.filtered > .st-cell { grid-column: span 3; }
@media (max-width: 1000px) {
  .st-grid > .st-cell, .st-grid > .st-cell.st-big, .st-grid.filtered > .st-cell { grid-column: span 1; }
  .st-grid:not(.filtered) > .st-cell.st-big:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) { .st-grid > .st-cell.st-big:first-child { grid-column: auto; } }
.st-cell.st-glow > .st-card { animation: st-glow 1.6s var(--cl-out) 2; }
@keyframes st-glow { 50% { box-shadow: 0 0 0 3px rgb(var(--acc)) inset, 0 30px 70px -20px rgba(var(--acc), .8); } }

/* pointer light on each card */
.st-cell > .st-card { position: relative; }
.st-cell > .st-card::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  background: radial-gradient(420px circle at var(--gx, -500px) var(--gy, -500px), rgba(var(--acc), .14), transparent 60%); }

/* save + share: round glass buttons on the artwork */
.st-save, .st-share { position: absolute; top: 14px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgba(10, 12, 30, .38); box-shadow: 0 0 0 1px rgba(255, 255, 255, .22) inset; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: .0; transform: scale(.9); transition: opacity .2s, transform .25s var(--cl-out), background .2s; }
.st-save { right: 14px; }
.st-share { right: 62px; }
.st-save svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.st-share svg { width: 18px; height: 18px; }
.st-cell:hover .st-save, .st-cell:hover .st-share, .st-cell:focus-within .st-save, .st-cell:focus-within .st-share, .st-save[aria-pressed="true"] { opacity: 1; transform: none; }
.st-save[aria-pressed="true"] { color: #ff4f7b; background: rgba(255, 255, 255, .92); }
.st-save[aria-pressed="true"] svg { fill: currentColor; stroke: none; }
.st-save:hover, .st-share:hover { background: rgba(10, 12, 30, .6); }
.st-save:focus-visible, .st-share:focus-visible, .st-vote:focus-visible { outline: 3px solid #9db4ff; outline-offset: 2px; }
@media (hover: none) { .st-save, .st-share { opacity: 1; transform: none; } }

/* "Build this next" */
.st-vote { position: absolute; right: 22px; bottom: 22px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 13px/1 var(--font); color: var(--cl-ink-2); background: var(--cl-bg); box-shadow: 0 0 0 1px var(--cl-line) inset; transition: color .2s, background .2s, transform .2s var(--cl-out); }
.st-vote svg { width: 14px; height: 14px; }
.st-vote b { font-variant-numeric: tabular-nums; }
.st-vote b:empty { display: none; }
.st-vote:hover { transform: translateY(-2px); color: var(--cl-ink); }
.st-vote[aria-pressed="true"] { color: #fff; background: rgb(var(--acc, 106, 76, 255)); box-shadow: none; }
.st-cell[data-app] .st-vote { --acc: inherit; }
.st-cell[data-app="backlight"] .st-vote[aria-pressed="true"] { background: #0e7490; }
.st-cell[data-app="recap"] .st-vote[aria-pressed="true"] { background: #0f9488; }
.st-cell[data-app="tally"] .st-vote[aria-pressed="true"] { background: #3f9a45; }
.st-cell[data-app="flick"] .st-vote[aria-pressed="true"] { background: #d63d7a; }
@media (max-width: 420px) { .st-vote span { display: none; } }

/* ---------------------------------------------------------------- grid head: freshness, filters, keys */
.st-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.st-filters button { padding: 9px 16px; border: 0; border-radius: 999px; cursor: pointer; font: 600 14px/1 var(--font); color: var(--cl-ink-2); background: var(--cl-card); box-shadow: 0 0 0 1px var(--cl-line) inset; transition: color .2s, background .2s; }
.st-filters button:hover { color: var(--cl-ink); }
.st-filters button[aria-pressed="true"] { color: var(--cl-bg); background: var(--cl-ink); box-shadow: none; }
.st-keys { margin-top: 12px; font-size: 13px; color: var(--cl-muted); }
.st-keys kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; font: 600 11.5px/1 var(--font); background: var(--cl-card); box-shadow: 0 0 0 1px var(--cl-line) inset; }

/* your picks + recently viewed */
.st-mine { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin: -8px 0 28px; }
.st-mine[hidden] { display: none; }
.st-mine > p { font-size: 13.5px; font-weight: 600; color: var(--cl-muted); }
.st-mine > div { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.st-mine a { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--cl-ink);
  background: var(--cl-card); box-shadow: 0 0 0 1px var(--cl-line) inset; transition: transform .2s var(--cl-out); }
.st-mine a:hover { transform: translateY(-2px); }
.st-mine img { border-radius: 24%; }
.st-mine i { font-style: normal; color: #ff4f7b; font-size: 12px; }

/* ---------------------------------------------------------------- finder + surprise */
.st-quiz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: 20px 40px; margin-top: 40px; padding: clamp(24px, 4vw, 40px); border-radius: 28px;
  background: var(--cl-card); box-shadow: 0 0 0 1px var(--cl-line) inset; }
.st-quiz-h { font-family: var(--cl-serif); font-size: clamp(28px, 3vw, 38px); font-weight: 500; letter-spacing: -.01em; line-height: 1.1; color: var(--cl-ink); }
.st-quiz-s { margin-top: 6px; color: var(--cl-muted); }
.st-quiz-step > p { font-weight: 600; margin-bottom: 12px; color: var(--cl-ink); }
.st-quiz-step > div { display: flex; flex-wrap: wrap; gap: 10px; }
.st-quiz-step button, .st-quiz-again { padding: 12px 18px; border: 0; border-radius: 14px; cursor: pointer; font: 600 15px/1.2 var(--font); color: var(--cl-ink); background: var(--cl-bg);
  box-shadow: 0 0 0 1px var(--cl-line) inset, 0 8px 20px -14px rgba(20, 30, 80, .5); transition: transform .2s var(--cl-out), box-shadow .2s; }
.st-quiz-step button:hover { transform: translateY(-2px); box-shadow: 0 0 0 1.5px #6a4cff inset, 0 12px 26px -14px rgba(106, 76, 255, .6); }
.st-quiz-out a { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 20px; text-decoration: none; color: var(--cl-ink); background: var(--cl-bg); box-shadow: 0 0 0 1px var(--cl-line) inset; }
.st-quiz-out img { border-radius: 24%; flex: none; }
.st-quiz-out a > span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.st-quiz-out small { font-size: 12.5px; font-weight: 600; color: var(--cl-muted); }
.st-quiz-out b { font-size: 20px; }
.st-quiz-out em { font-style: normal; font-size: 14.5px; color: var(--cl-muted); }
.st-quiz-out a > svg { width: 20px; height: 20px; flex: none; }
.st-quiz-again { margin-top: 12px; padding: 8px 14px; font-size: 13.5px; }
@media (max-width: 760px) { .st-quiz { grid-template-columns: minmax(0, 1fr); } }
.st-tools { display: flex; justify-content: center; margin-top: 24px; }
.st-dice { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border: 0; border-radius: 999px; cursor: pointer; font: 600 15px/1 var(--font); color: var(--cl-ink); background: var(--cl-card); box-shadow: 0 0 0 1px var(--cl-line) inset; }
.st-dice span { display: inline-block; transition: transform .6s var(--cl-out); }
.st-dice:hover span { transform: rotate(-20deg); }
.st-dice.roll span { transform: rotate(720deg) scale(1.2); }

/* ---------------------------------------------------------------- promise: numbers + every-launch form */
.st-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.st-nums > div { display: flex; flex-direction: column; gap: 4px; padding: 22px; border-radius: 22px; background: var(--cl-card); box-shadow: 0 0 0 1px var(--cl-line) inset; }
.st-nums b { font-family: var(--cl-serif); font-size: clamp(44px, 5vw, 60px); font-weight: 500; line-height: 1; color: var(--cl-ink); font-variant-numeric: tabular-nums; }
.st-nums span { font-size: 14.5px; color: var(--cl-muted); }
@media (max-width: 860px) { .st-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-launch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin-top: 28px; padding: clamp(22px, 3.5vw, 34px); border-radius: 26px; color: #fff;
  background: radial-gradient(80% 140% at 0% 0%, #6a4cff, transparent 60%), radial-gradient(80% 140% at 100% 100%, #1fb6ff, transparent 60%), #1b1f4a; }
.st-launch-h { font-family: var(--cl-serif); font-size: clamp(26px, 2.8vw, 34px); font-weight: 500; line-height: 1.1; }
.st-launch-s { margin-top: 4px; color: rgba(255, 255, 255, .78); font-size: 15px; }
.st-launch-f { display: flex; gap: 8px; flex: 1 1 340px; max-width: 460px; }
.st-launch-f input[type="email"] { flex: 1; min-width: 0; padding: 14px 16px; border: 0; border-radius: 14px; font: 500 16px/1.2 var(--font); color: #19191d; background: #fff; }
.st-launch-f input[type="email"]:focus-visible { outline: 3px solid #9db4ff; }
.st-launch-f button { padding: 14px 20px; border: 0; border-radius: 14px; cursor: pointer; font: 700 15px/1 var(--font); color: #1b1f4a; background: #ffd9bd; white-space: nowrap; }
.st-launch-f button:disabled { opacity: .7; cursor: default; }
.st-launch-f p { font-weight: 600; }

/* ---------------------------------------------------------------- dock (home page, after the hero) */
.bs-dock { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; border-radius: 24px;
  background: color-mix(in srgb, var(--cl-bg) 72%, transparent); box-shadow: 0 0 0 1px var(--cl-line), 0 20px 50px -18px rgba(10, 20, 60, .45); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  transform: translate(-50%, 140%); opacity: 0; transition: transform .45s var(--cl-out), opacity .3s; pointer-events: none; }
.bs-dock.in { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.bs-dock a { position: relative; display: block; transform-origin: 50% 100%; transform: scale(var(--m, 1)); transition: transform .12s ease-out; }
.bs-dock img { display: block; width: 44px; height: 44px; border-radius: 24%; box-shadow: 0 8px 18px -10px rgba(0, 0, 30, .6); }
.bs-dock span { position: absolute; left: 50%; bottom: calc(100% + 10px); translate: -50% 0; padding: 4px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: #fff; background: rgba(20, 20, 30, .9);
  opacity: 0; pointer-events: none; transition: opacity .15s; }
.bs-dock a:hover span, .bs-dock a:focus-visible span { opacity: 1; }
.bs-dock a:focus-visible { outline: 3px solid #9db4ff; outline-offset: 3px; border-radius: 12px; }
@media (max-width: 520px) { .bs-dock { gap: 5px; padding: 6px 7px; border-radius: 18px; } .bs-dock img { width: 36px; height: 36px; } }
.bs-dock-on .bs-toast { bottom: 96px; }

/* ---------------------------------------------------------------- Yapstar card + Backlight torch */
.st-typed b { min-height: 1.3em; }
.st-art-bl { --tx: 50%; --ty: 50%; }
.st-art-bl::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(150px circle at var(--tx) var(--ty), rgba(255, 244, 214, .22), rgba(255, 244, 214, .06) 45%, transparent 70%); }
.st-art-bl.lit::after { opacity: 1; }
.st-bl-thing { position: absolute; right: 14%; top: 26%; display: flex; gap: 10px; opacity: 0; transition: opacity .6s; z-index: 1; }
.st-bl-thing i { width: 8px; height: 4px; border-radius: 50%; background: #ff2a24; box-shadow: 0 0 10px 2px rgba(255, 42, 36, .8); animation: st-blink 5s infinite; }
@keyframes st-blink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.1); } }
.st-art-bl.lit .st-bl-thing { opacity: 1; }
@media (hover: none) { .st-bl-thing { opacity: .8; } }

/* hero: sparkle trail */
.bs-spark { position: fixed; z-index: 5; pointer-events: none; color: #fff; font-style: normal; text-shadow: 0 0 8px rgba(200, 210, 255, .9); translate: -50% -50%;
  animation: bs-spark .9s ease-out forwards; }
@keyframes bs-spark { from { opacity: .95; transform: none; } to { opacity: 0; transform: translate(var(--dx, 0), 26px) scale(.3) rotate(90deg); } }

/* ---------------------------------------------------------------- site-wide */
/* hidden stars */
.bs-hidden-star { position: absolute; left: var(--x, 70%); bottom: 18px; z-index: 3; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  font-size: 15px; line-height: 30px; color: #f5b82e; background: transparent; opacity: .38; transition: opacity .2s, transform .3s var(--cl-out); animation: bs-twinkle 3.6s ease-in-out infinite; }
.bs-hidden-star:hover, .bs-hidden-star:focus-visible { opacity: 1; transform: scale(1.5) rotate(20deg); }
.bs-hidden-star.got { opacity: 1; transform: scale(3) rotate(180deg); transition: transform .6s var(--cl-out), opacity .6s; animation: none; pointer-events: none; }
@keyframes bs-twinkle { 50% { opacity: .16; } }
.bs-starchip { color: #b7860b; font-weight: 600; }
:root[data-theme="dark"] .bs-starchip { color: #f5c451; }

/* gold theme (all stars found) */
.bs-gold .cl-sky { background: linear-gradient(180deg, #1a1206 0%, #4a3310 38%, #a8792a 68%, #f1d69a 88%, var(--cl-bg) 100%); }
.bs-gold .cl-btn-glow { background: linear-gradient(180deg, #f3c55a, #c98a12); box-shadow: 0 .7px 0 rgba(255, 240, 200, .9) inset, 0 0 0 1px rgba(170, 110, 10, .9), 0 22px 50px -14px rgba(240, 170, 40, .8); }
.bs-gold .cl-h1 em { background-image: linear-gradient(100deg, #fff 20%, #ffe29a 60%, #ffb347); }

/* love button on app pages */
.bs-love { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 55; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border: 0; border-radius: 999px;
  cursor: pointer; font: 600 14px/1 var(--font); color: var(--cl-ink); background: color-mix(in srgb, var(--cl-bg) 82%, transparent); box-shadow: 0 0 0 1px var(--cl-line), 0 14px 34px -16px rgba(10, 20, 60, .5);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .35s var(--cl-out); }
.bs-love.in { opacity: 1; transform: none; pointer-events: auto; }
.bs-love svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.bs-love[aria-pressed="true"] { color: #e11d5b; }
.bs-love[aria-pressed="true"] svg { fill: currentColor; stroke: none; }
.bs-love[aria-pressed="true"] span { display: none; }
.bs-love b { font-variant-numeric: tabular-nums; color: var(--cl-muted); }
.bs-love b:empty { display: none; }
.bs-love.pop svg { animation: bs-pop .5s var(--cl-out); }
@keyframes bs-pop { 40% { transform: scale(1.5); } }
@media (max-width: 520px) { .bs-love span { display: none; } }

/* up next */
.bs-upnext { padding: clamp(40px, 6vw, 72px) 0; }
.bs-upnext .container > a { display: flex; align-items: center; gap: 20px; max-width: 760px; margin: 0 auto; padding: 22px 26px; border-radius: 26px; text-decoration: none; color: var(--cl-ink);
  background: var(--cl-card); box-shadow: 0 0 0 1px var(--cl-line) inset; transition: transform .3s var(--cl-out); }
.bs-upnext .container > a:hover { transform: translateY(-4px); }
.bs-upnext img { border-radius: 24%; flex: none; }
.bs-upnext a > span { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.bs-upnext small { font-size: 13px; font-weight: 600; color: var(--cl-muted); }
.bs-upnext b { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.01em; }
.bs-upnext em { font-style: normal; color: var(--cl-muted); }
.bs-upnext a > svg { width: 24px; height: 24px; flex: none; transition: transform .2s; }
.bs-upnext a:hover > svg { transform: translateX(4px); }
.bs-upnext p { margin-top: 14px; text-align: center; font-size: 14.5px; }
.bs-upnext p a { color: var(--cl-muted); }

/* FAQ: did this help? */
.bs-helped { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; font-size: 13.5px; color: var(--cl-muted); }
.bs-helped button { padding: 5px 12px; border: 0; border-radius: 999px; cursor: pointer; font: 600 13px/1 var(--font); color: var(--cl-ink-2); background: var(--cl-card); box-shadow: 0 0 0 1px var(--cl-line) inset; }
.bs-helped button:hover { color: var(--cl-ink); }

/* resume reading */
.bs-resume { position: fixed; left: 50%; top: 84px; z-index: 70; display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 14.5px/1 var(--font); white-space: nowrap; color: #fff; background: hsla(252, 10%, 10%, .92); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .5);
  transform: translate(-50%, -12px); opacity: 0; transition: opacity .3s, transform .4s var(--cl-out); }
.bs-resume.in { transform: translate(-50%, 0); opacity: 1; }
.bs-resume svg { width: 16px; height: 16px; }

