/* Hero + Today's Games */
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 900; }
.hero__sub { display: none; margin: 8px 0 0; font-size: 1.2rem; color: var(--text-muted); }

.today { position: relative; }
.today__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.today__fallback { text-align: center; padding: 32px 16px; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); font-weight: 700; }
.today__fallback[hidden] { display: none; }
.today__fallback a { margin-top: 8px; }

.today-card {
  --accent: var(--primary);
  position: relative; display: grid; gap: 4px 12px; padding: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow);
  grid-template-columns: 1fr; align-content: start;
  grid-template-areas: "img" "body" "act"; grid-template-rows: auto 1fr auto;
}
.today-card__title a { text-decoration: none; }
.today-card__img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; grid-area: img; align-self: start; }
.today-card__body { display: flex; flex-direction: column; gap: 2px; grid-area: body; min-width: 0; }
.today-card__kicker { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 800; color: var(--accent); }
.today-card__title { font-size: 1.35rem; font-weight: 900; }
.today-card__desc { margin: 2px 0 0; color: var(--text-muted); font-size: .98rem; }
.today-card__meta { margin-top: 6px; display: flex; }
.today-card__meta .pill { display: none; }
.today-card__time { display: inline-block; padding: 4px 12px; border-radius: 8px; font-size: .9rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: color-mix(in srgb, var(--accent) 80%, var(--text)); }
.today-card__actions { grid-area: act; display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.today-card__actions .btn { flex: 1; }
.chev {
  width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center;
  text-decoration: none; font-size: 1.5rem; font-weight: 700; flex: none;
}
.today-card__stretch::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-card); z-index: 1; }
.today-card .btn, .today-card .chev { position: relative; z-index: 2; }

/* Tiles (catalog) */
.tiles { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 12px; }
.tile { flex: 0 0 auto; width: 124px; scroll-snap-align: start; }
.tile[hidden] { display: none; }
.tile__link { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.tile__img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; box-shadow: 0 2px 8px rgba(16,20,43,.18);
  transition: transform .15s; }
.tile__link:hover .tile__img { transform: translateY(-3px); }
.tile__name { font-weight: 800; font-size: 1.02rem; }
.tile .pill { padding: 2px 10px; font-size: .8rem; }

.more { padding-top: 12px; }
.more__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.more__head h2 { font-size: 1.7rem; font-weight: 900; }
.more__all { text-decoration: none; font-weight: 600; color: var(--text-muted); padding: 8px 0; }

/* Catalog page */
.filters { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
.field--search { grid-column: 1 / -1; }
.result-count { color: var(--text-muted); margin: 0 0 12px; font-size: .95rem; }
.tiles--catalog { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 14px; overflow: visible; }
.tiles--catalog .tile { width: auto; }
.empty { text-align: center; padding: 40px 0; color: var(--text-muted); font-weight: 600; }
.empty[hidden] { display: none; }
.tile.is-saved .tile__link { position: relative; }
.tile.is-saved .tile__link::after {
  content: ""; position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(16,20,43,.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.5s-8-5-8-10.6A4.5 4.5 0 0 1 12 7a4.5 4.5 0 0 1 8 2.9c0 5.6-8 10.6-8 10.6Z' fill='%23ff4d6d'/%3E%3C/svg%3E") center / 18px no-repeat;
}

/* My Games page */
.my__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px;
  padding: 4px 4px 4px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.my__bar[hidden], .my__tools[hidden] { display: none; }
.my__count { color: var(--text-muted); font-weight: 600; }
.my__manage {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
  background: none; color: var(--text); font: inherit; font-weight: 700; cursor: pointer;
}
.my__manage svg { width: 22px; height: 22px; }
.my__manage::after { content: "›"; font-size: 1.4rem; line-height: 1; margin-left: 2px; }
.my__manage[aria-pressed="true"] { background: var(--primary); color: #fff; }
.my__manage[aria-pressed="true"]::after { content: none; }
.my__tools { margin: -4px 0 16px; }
.my__tools p { margin: 0; color: var(--text-muted); font-size: .92rem; }
.tiles--my { grid-template-columns: repeat(3, 1fr); gap: 18px 12px; }
.tiles--my .tile { display: none; position: relative; }
.tiles--my .tile.is-mine { display: block; }
.tiles--my .tile__name { line-height: 1.15; }
.tile__remove {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; display: none; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: rgba(16,20,43,.72); color: #fff; cursor: pointer;
}
.tile__remove svg { width: 14px; height: 14px; }
.tiles--my.is-managing .tile__remove { display: grid; }
.tiles--my.is-managing .tile { touch-action: none; cursor: grab; }
.tiles--my.is-managing .tile__img { outline: 2px dashed var(--primary); outline-offset: 3px; }
.tiles--my .tile.is-dragging { opacity: .55; cursor: grabbing; }
.my .empty p { margin: 0 0 4px; }
.my__note { text-align: center; color: var(--text-muted); margin: 24px 0 8px; }

/* Save toggle (game pages) */
.save-toggle {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 700; cursor: pointer;
}
.save-toggle[hidden] { display: none; }
.save-toggle svg { width: 22px; height: 22px; fill: none; color: #e5484d; }
.save-toggle[aria-pressed="true"] svg { fill: currentColor; }

/* Game details page */
.game-page { --accent: var(--primary); padding-block: 16px 24px; }
.crumbs { font-size: .95rem; color: var(--text-muted); margin-bottom: 14px; }
.crumbs a { font-weight: 700; text-decoration: none; color: var(--primary); }
.game-hero {
  display: grid; gap: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow);
}
.game-hero__img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; }
.game-hero__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.game-hero__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.game-hero__time { padding: 3px 12px; border-radius: 8px; font-size: .88rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: color-mix(in srgb, var(--accent) 80%, var(--text)); }
.game-hero h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 900; }
.game-hero__lede { margin: 0; font-size: 1.15rem; color: var(--text-muted); }
.game-hero__play { margin-top: 8px; align-self: stretch; }

.game-details { max-width: 760px; padding-top: 8px; }
.game-details section { margin-top: 24px; }
.game-details h2 { font-size: 1.45rem; font-weight: 900; margin: 0 0 8px; }
.game-details h3 { font-size: 1.12rem; margin: 16px 0 6px; }
.game-details p, .game-details li { color: var(--text-muted); font-size: 1.05rem; }
.game-details p { margin: 0 0 10px; }
.game-details strong { color: var(--text); }
.game-details ul, .game-details ol { margin: 0 0 10px; padding-left: 1.4rem; }
.game-details ul li { list-style: disc; }
.game-details ol li { list-style: decimal; }
.game-details li { padding-block: 3px; }
.game-details a { color: var(--primary); }
.game-details img, .game-details video { width: 100%; height: auto; border-radius: 12px; margin: 8px 0 12px; }
.game-details figure { margin: 0; }
.game-details figcaption { font-size: .9rem; color: var(--text-muted); margin-top: -4px; }
.game-details .tip {
  padding: 12px 16px; border-radius: 12px; border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}
.game-details .tip p:last-child { margin-bottom: 0; }

.game-cta { margin: 28px 0 8px; }
.game-cta .btn { width: 100%; }
.game-page .more { margin-top: 24px; }
