/* Collection home. Shared tokens, buttons and reveal come from /kit/ui.css. */
body { --accent: #c99bff; }
#stage { cursor: grab; }
#stage.dragging { cursor: grabbing; }

.home-top { position: fixed; z-index: 4; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(var(--safe-t) + 14px) calc(var(--safe-r) + 16px) 0 calc(var(--safe-l) + 16px); pointer-events: none; }
.home-top > * { pointer-events: auto; }
.logo { display: flex; flex-direction: column; line-height: 1; }
.logo b { font-size: 30px; font-weight: 1000; letter-spacing: .32em; background: linear-gradient(100deg, #fff 20%, #ffd98a 45%, #fff 70%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; filter: drop-shadow(0 0 18px rgba(255, 200, 120, .35)); }
.logo small { margin-top: 6px; font-size: 11px; font-weight: 900; letter-spacing: .22em; opacity: .6; text-transform: uppercase; }
@keyframes shine { to { background-position: -220% 0; } }
.top-right { display: flex; gap: 8px; align-items: center; }
.streak b { font-weight: 1000; }
.streak svg { color: #ffb347; }

/* the day: four badges, one per game */
.day { position: fixed; z-index: 4; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 74px); display: flex; gap: 8px; align-items: center; }
.badge { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; background: var(--glass); box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform .3s, box-shadow .3s, background .3s; cursor: pointer; border: 0; padding: 0; }
.badge.done { background: color-mix(in srgb, var(--r) 22%, transparent); box-shadow: inset 0 0 0 1.5px var(--r), 0 0 16px color-mix(in srgb, var(--r) 55%, transparent); }
.badge.on { transform: translateY(-3px) scale(1.08); }
.badge span { filter: grayscale(1) opacity(.45); }
.badge.done span { filter: none; }

/* bottom card */
.card { position: fixed; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  padding: 60px calc(var(--safe-r) + 18px) calc(var(--safe-b) + 22px) calc(var(--safe-l) + 18px);
  background: linear-gradient(rgba(7, 7, 26, 0), rgba(7, 7, 26, .78) 38%, rgba(7, 7, 26, .95)); pointer-events: none; }
.card > * { pointer-events: auto; max-width: 100%; }
.card h1 { margin: 0; font-size: clamp(40px, 12vw, 76px); line-height: 1; font-weight: 1000; letter-spacing: .05em; text-transform: uppercase;
  background: linear-gradient(#fff 35%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px color-mix(in srgb, var(--accent) 55%, transparent)); }
.card p { margin: 0; font-size: 16px; font-weight: 700; opacity: .8; max-width: 26em; }
.swap { animation: swap .45s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes swap { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.btn.play { min-width: 220px; font-size: 22px; min-height: 60px; }
.nav { position: fixed; z-index: 4; top: 46%; width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; color: var(--ink); cursor: pointer;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .15s, background .2s; }
.nav:hover { background: rgba(255, 255, 255, .14); } .nav:active { transform: scale(.92); }
.nav svg { width: 22px; height: 22px; }
.nav.prev { left: calc(var(--safe-l) + 12px); } .nav.next { right: calc(var(--safe-r) + 12px); }
.dots { display: flex; gap: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .25); transition: width .3s, background .3s; }
.dots i.on { width: 26px; background: var(--accent); }

/* sheets: cabinet and odds */
.sheet { position: fixed; z-index: 10; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: rgba(4, 4, 14, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadein .2s; }
.sheet-body { position: relative; width: min(100%, 760px); max-height: min(88vh, 900px); overflow-y: auto; border-radius: 26px 26px 0 0; background: linear-gradient(#17112e, #0c0a1c);
  box-shadow: 0 -10px 60px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1); padding: 22px calc(var(--safe-r) + 20px) calc(var(--safe-b) + 28px) calc(var(--safe-l) + 20px); animation: rise .35s cubic-bezier(.2, 1.1, .4, 1); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; font-size: 26px; font-weight: 1000; letter-spacing: .06em; text-transform: uppercase; }
.sheet-head small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .14em; opacity: .6; text-transform: uppercase; margin-top: 4px; }
.close { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--glass); color: var(--ink); font-size: 22px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.shelf { margin: 18px 0 6px; }
.shelf h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 1000; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.shelf h3 em { font-style: normal; opacity: .5; letter-spacing: .1em; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 420px) { .grid { gap: 8px; } }
.slot { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; border: 0; padding: 6px 6px 8px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; cursor: default; color: var(--ink); font: inherit;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rc) 22%, transparent), rgba(255, 255, 255, .03) 70%); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--rc) 45%, transparent); overflow: hidden; }
.slot.found { cursor: pointer; transition: transform .15s; }
.slot.found:hover { transform: translateY(-3px); }
.slot img { position: absolute; inset: 4px 4px 34px; width: calc(100% - 8px); height: calc(100% - 38px); object-fit: contain; }
.slot .q { position: absolute; inset: 0 0 30px; display: grid; place-items: center; font-size: 30px; font-weight: 1000; opacity: .25; }
.slot b { position: relative; font-size: 11px; font-weight: 900; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.slot i { position: relative; font-style: normal; font-size: 10px; font-weight: 900; letter-spacing: .12em; color: var(--rc); text-transform: uppercase; }
.slot .n { position: absolute; top: 6px; right: 8px; font-size: 11px; font-weight: 1000; opacity: .8; }
.slot .st { position: absolute; top: 5px; left: 8px; font-size: 10px; color: #ffd56a; letter-spacing: .05em; }
.odds { width: 100%; border-collapse: collapse; font-size: 15px; font-weight: 800; }
.odds th, .odds td { padding: 10px 8px; text-align: right; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.odds th { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
.odds td:first-child, .odds th:first-child { text-align: left; }
.odds td:first-child span { color: var(--rc); }
.note { margin: 14px 0 0; font-size: 14px; font-weight: 700; line-height: 1.5; opacity: .75; }
.pity { margin-top: 14px; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 900; letter-spacing: .06em; }
.pity .meter { flex: 1; height: 10px; }
.pity .meter > i { background: var(--legendary); }
.sharebox { width: 100%; min-height: 120px; margin-top: 12px; border-radius: 14px; border: 0; padding: 12px; font: 600 15px/1.5 ui-monospace, monospace; color: var(--ink); background: rgba(255, 255, 255, .06); user-select: text; -webkit-user-select: text; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--safe-b) + 30px); transform: translateX(-50%); padding: 12px 22px; border-radius: 999px; background: #fff; color: #120d24; font-weight: 1000; letter-spacing: .1em; animation: rise .3s; }
.flash { position: fixed; z-index: 15; inset: 0; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 70%, white), #07071a 70%); opacity: 0; transition: opacity .45s ease-in; }
.flash.on { opacity: 1; }

@media (max-height: 560px) {
  .card { gap: 8px; padding-top: 30px; }
  .card h1 { font-size: 38px; }
  .card p { display: none; }
  .day { top: calc(var(--safe-t) + 64px); }
  .btn.play { min-height: 48px; font-size: 18px; }
}
@media (min-width: 900px) { .nav.prev { left: 12vw; } .nav.next { right: 12vw; } }
