*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, sans-serif; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
  * {
    -webkit-tap-highlight-color: transparent;
  }

  html,
  body {
    margin: 0;
    padding: 0;
    height: 100%;
  }

  body {
  --tw-bg-opacity: 1;
  background-color: rgb(11 13 18 / var(--tw-bg-opacity, 1));
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, sans-serif;
  --tw-text-opacity: 1;
  color: rgb(233 237 246 / var(--tw-text-opacity, 1));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    overscroll-behavior: none;
    background-image:
      radial-gradient(90% 60% at 50% -10%, rgba(139, 92, 246, 0.18) 0%, rgba(11, 13, 18, 0) 70%),
      radial-gradient(70% 50% at 100% 100%, rgba(90, 169, 255, 0.08) 0%, rgba(11, 13, 18, 0) 70%);
    background-color: var(--tg-bg, var(--bg));
}

  button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
  }

  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  h1,
  h2,
  h3,
  p,
  dl,
  dd,
  dt {
    margin: 0;
  }
.visible {
  visibility: visible;
}
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.ease-in {
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

/* Dark palette, mirrored from tailwind.config.js so plain CSS can use it too. */
:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --surface: #141821;
  --surface-2: #1b2130;
  --line: #272e3f;
  --ink: #e9edf6;
  --muted: #8e97ad;
  --accent: #8b5cf6;
  --accent-soft: #a78bfa;
  --good: #46d18a;
  --bad: #f2596b;
  --info: #5aa9ff;
  --radius: 20px;
}

/* ------------------------------------------------------------------ *
 * Shell
 * ------------------------------------------------------------------ */

.app-shell {
  display: flex;
  flex-direction: column;
  height: var(--tg-viewport-height, 100dvh);
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(11, 13, 18, 0.96) 55%, rgba(11, 13, 18, 0) 100%);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 19px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.35), rgba(90, 169, 255, 0.16));
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 8px 24px -12px rgba(139, 92, 246, 0.9);
}

.app-brand-text {
  min-width: 0;
}

.app-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.app-sub {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-pill {
  flex: none;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--accent-soft);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
}

.screens {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px 16px 24px;
}

.screen-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: screenIn 180ms ease-out;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------ *
 * Cards screen
 * ------------------------------------------------------------------ */

.cards-screen {
  min-height: 100%;
}

.deck {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 2px 0 0;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  /* Pointer events own the gesture: no scrolling, no text selection. */
  touch-action: none;
  -moz-user-select: none;
       user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  will-change: transform;
}

.game-card.card-dragging {
  cursor: grabbing;
}

.game-card.card-in {
  animation: cardIn 220ms cubic-bezier(0.22, 0.9, 0.3, 1);
}

@keyframes cardIn {
  from {
    opacity: 0.35;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.game-cover {
  position: relative;
  aspect-ratio: 1 / 1.06;
  max-height: 46vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.game-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.cover-emoji {
  font-size: clamp(64px, 20vw, 104px);
  line-height: 1;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
}

.cover-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 10px;
  font-weight: 600;
  background: rgba(9, 11, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  color: #eef1f8;
}

.badge-liked {
  border-color: rgba(242, 89, 107, 0.45);
}

.badge-played {
  border-color: rgba(70, 209, 138, 0.4);
}

/* Direction hints - opacity is driven directly by swipe.ts */
.swipe-tag {
  position: absolute;
  z-index: 3;
  padding: 7px 12px;
  border: 2px solid currentColor;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 90ms linear;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.tag-like {
  top: 18px;
  left: 16px;
  color: var(--good);
  background: rgba(70, 209, 138, 0.14);
  transform: rotate(-9deg);
}

.tag-dislike {
  top: 18px;
  right: 16px;
  color: var(--bad);
  background: rgba(242, 89, 107, 0.14);
  transform: rotate(9deg);
}

.tag-skip {
  bottom: 18px;
  left: 50%;
  color: #b9c1d4;
  background: rgba(15, 18, 26, 0.6);
  transform: translateX(-50%);
}

.tag-done {
  top: 44%;
  left: 50%;
  color: var(--info);
  background: rgba(90, 169, 255, 0.14);
  transform: translate(-50%, -50%) rotate(-5deg);
}

.game-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 14px 14px;
}

.game-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.genres {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.genre {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--accent-soft);
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.28);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.stat {
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(27, 33, 48, 0.62);
  border: 1px solid var(--line);
  min-width: 0;
}

.stat-wide {
  grid-column: 1 / -1;
}

.stat dt {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 2px;
}

.stat dd {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-dim {
  color: var(--muted);
  font-weight: 500;
  font-size: 11.5px;
  margin-left: 3px;
}

.swipe-hint {
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
  opacity: 0.85;
}

.deck-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.swipe-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(20, 24, 33, 0.85);
  color: #cfd6e6;
  transition: transform 120ms ease, background 160ms ease, border-color 160ms ease;
}

.swipe-btn:active {
  transform: scale(0.95);
  background: rgba(27, 33, 48, 0.95);
}

.swipe-btn-icon {
  font-size: 17px;
  line-height: 1.1;
}

.swipe-btn-text {
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.swipe-btn-bad {
  border-color: rgba(242, 89, 107, 0.35);
}

.swipe-btn-good {
  border-color: rgba(70, 209, 138, 0.35);
}

.progress {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: #171c27;
  overflow: hidden;
  border: 1px solid rgba(39, 46, 63, 0.7);
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width 260ms ease;
}

.progress-label {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.deck-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(20, 24, 33, 0.55);
  text-align: center;
}

.deck-empty-icon {
  font-size: 40px;
}

.deck-empty-title {
  font-size: 17px;
  font-weight: 700;
}

.deck-empty-text {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 30ch;
  line-height: 1.45;
  margin-bottom: 6px;
}

/* ------------------------------------------------------------------ *
 * Roulette
 * ------------------------------------------------------------------ */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 0;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-hint {
  font-size: 11.5px;
  color: var(--muted);
}

.link-btn {
  font-size: 11.5px;
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.filter-groups {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.filter-title {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--surface);
  color: #b9c1d4;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
  white-space: nowrap;
}

.chip:active {
  transform: scale(0.97);
}

.chip-on {
  color: #f1ecff;
  border-color: rgba(139, 92, 246, 0.7);
  background: rgba(139, 92, 246, 0.24);
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border-radius: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 120ms ease, filter 160ms ease, background 160ms ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d4aff 100%);
  box-shadow: 0 14px 34px -16px rgba(139, 92, 246, 0.95);
}

.btn-ghost {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}

.btn-danger {
  background: rgba(242, 89, 107, 0.14);
  border-color: rgba(242, 89, 107, 0.45);
  color: #ffa3ae;
}

.btn-small {
  border-radius: 0.75rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface-2);
  border-color: var(--line);
  color: #cfd6e6;
}

.btn-block {
  width: 100%;
}

.btn-spin {
  padding-top: 14px;
  padding-bottom: 14px;
  font-size: 14.5px;
}

.result {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: screenIn 200ms ease-out;
}

.result-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(27, 33, 48, 0.9), rgba(20, 24, 33, 0.9));
}

.result-cover {
  display: grid;
  place-items: center;
  border-radius: 14px;
  min-height: 96px;
  font-size: 34px;
}

.result-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  justify-content: center;
}

.result-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.2;
}

.result-genres,
.result-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.result-hint {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ------------------------------------------------------------------ *
 * Played
 * ------------------------------------------------------------------ */

.played-list,
.blacklist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.played-row,
.blacklist-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(20, 24, 33, 0.8);
}

.played-cover {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 20px;
}

.played-main,
.blacklist-main {
  min-width: 0;
}

.played-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.played-meta {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.votes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.vote {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 2px;
  border-radius: 999px;
  background: rgba(27, 33, 48, 0.9);
  border: 1px solid transparent;
  font-size: 10px;
  color: #a7b0c4;
}

.vote-like {
  border-color: rgba(70, 209, 138, 0.32);
  color: #b9f0d3;
}

.avatar {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 8.5px;
  font-weight: 800;
  color: #fff;
}

.vote-mark {
  font-size: 9px;
}

.played-score {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.score-good {
  color: var(--good);
}

/* ------------------------------------------------------------------ *
 * Blacklist
 * ------------------------------------------------------------------ */

.blacklist-reason {
  font-size: 11px;
  color: #cfd6e6;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blacklist-date {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

.danger-zone {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.confirm {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(242, 89, 107, 0.35);
  background: rgba(242, 89, 107, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: screenIn 150ms ease-out;
}

.confirm-text {
  font-size: 12.5px;
  color: #ffd2d7;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ------------------------------------------------------------------ *
 * Empty states
 * ------------------------------------------------------------------ */

.empty-state {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  padding: 26px 14px;
  line-height: 1.5;
}

.empty-state-error {
  color: #ffa3ae;
}

/* ------------------------------------------------------------------ *
 * Bottom navigation
 * ------------------------------------------------------------------ */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  max-width: 560px;
  margin: 0 auto;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0px));
  background: rgba(11, 13, 18, 0.88);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(39, 46, 63, 0.9);
  box-shadow: 0 -20px 44px -28px rgba(0, 0, 0, 0.95);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0 5px;
  border-radius: 12px;
  color: var(--muted);
  transition: color 150ms ease, background 150ms ease;
}

.tab:active {
  transform: scale(0.97);
}

.tab-on {
  color: #f2efff;
  background: rgba(139, 92, 246, 0.18);
}

.tab-icon {
  font-size: 17px;
  line-height: 1.1;
}

.tab-label {
  font-size: 9.5px;
  letter-spacing: 0.01em;
}

/* Leave room for the fixed tabbar. */
.screens {
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 430px) {
  .game-cover {
    aspect-ratio: 1 / 1.12;
  }

  .game-title {
    font-size: 22px;
  }
}

