/* Profile page */

.pf-head { margin-bottom: 18px; }

.pf-title { font-size: 1.8rem; font-weight: 800; }

.pf-sub { color: var(--text-secondary); font-size: 0.85rem; }

.pf-season { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }

.pf-season-badge {
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary); font: inherit; cursor: pointer;
  font-size: 0.8rem; font-weight: 700; padding: 4px 12px; border-radius: var(--radius-pill); white-space: nowrap;
}

.pf-season-badge:hover { border-color: var(--border-accent); color: var(--text-primary); }

.pf-season-badge[aria-pressed="true"] { background: rgba(61,217,179,0.12); border-color: var(--border-accent); color: var(--accent-teal); cursor: default; }

.pf-season-badge:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }

.pf-note { margin: 4px 0 10px; }

.pf-stats { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-bottom: 8px; }

.pf-stat { background: var(--gradient-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; }

.pf-stat-value { font-size: 1.25rem; font-weight: 700; }

.pf-stat-label { color: var(--text-secondary); font-size: 0.8rem; }

.pf-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }

.pf-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.pf-row-main { min-width: 0; }

.pf-empty { color: var(--text-muted); font-size: 0.9rem; }

/* On a phone the seven tiles must not overflow the screen */
@media (max-width: 600px) {
  .pf-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .pf-stat { padding: 10px 12px; }
  .pf-stat-value { font-size: 1.05rem; }
  .pf-stat-label { font-size: 0.72rem; }
  .pf-title { font-size: 1.4rem; }
  .pf-avatar { width: 64px; height: 64px; }
}

/* Layout: the admin's side menu (css/admin.css), with the profile's sections */
.pf-shell { margin-top: 0; }

.pf-panel[hidden] { display: none; }
.pf-panel { animation: fadeIn 0.25s ease; }

#pfPanel-ajustes { max-width: 640px; }

.pf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.pf-panel .pf-cols { margin: 28px 0 32px; }

@media (max-width: 700px) {
  .pf-cols { grid-template-columns: 1fr; }
}

.pf-bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 0.85rem; }
.pf-bar-label .score-badge { font-size: 0.68rem; margin-left: 4px; }

.pf-bar { height: 6px; background: var(--border); border-radius: var(--radius-pill); overflow: hidden; margin-top: 4px; }
.profile-card { margin-bottom: 12px; border-color: var(--border-accent); }

.pf-bar > div { height: 100%; background: var(--gradient-brand); }

.pf-form { display: flex; flex-direction: column; gap: 12px; }

#pfPush { margin-top: 12px; }

#pfAbout { display: flex; flex-direction: column; gap: 12px; }
.pf-place-current { font-weight: 600; color: var(--text-primary); }
.pf-place-search { display: flex; gap: 8px; }
.pf-place-search input { flex: 1; min-width: 0; }
.pf-place-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pf-place-results .pf-btn { width: 100%; text-align: left; }

/* A checkbox goes to the right of the text that says what it does */
.pf-form label.pf-check { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }

.pf-check-text { display: flex; flex-direction: column; gap: 4px; color: var(--text-primary); font-size: 0.95rem; }

.pf-check-text .pf-sub { font-weight: 400; }

.pf-check input { flex: none; width: 20px; height: 20px; accent-color: var(--accent-teal); cursor: pointer; }

.pf-notice-head, .pf-notice { display: grid; grid-template-columns: 1fr 64px 64px; align-items: center; gap: 8px; }
.pf-notice-head { color: var(--text-secondary); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; text-align: center; }
.pf-notice-name { font-weight: 600; }
.pf-notice-box { display: flex; justify-content: center; cursor: pointer; }
.pf-notice-box input { width: 20px; height: 20px; accent-color: var(--accent-teal); cursor: pointer; }
/* Each notice is one block (its row and, if it has them, its options) so the options read as part of it */
.pf-notice-item { display: flex; flex-direction: column; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.pf-notice-options { padding: 12px 14px; background: var(--bg-surface); border-radius: var(--radius-sm); }
.pf-notice-options summary { cursor: pointer; color: var(--text-secondary); font-size: 0.85rem; font-weight: 600; }
.pf-notice-fields { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.pf-notice-options[hidden] { display: none; }
.pf-notice-save { padding-top: 14px; border-top: 1px solid var(--border); }

.pf-form label, .pf-form-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }

.pf-btn { background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-primary); font: inherit; font-size: 0.9rem; font-weight: 600; padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer; }

.pf-btn:hover:not(:disabled) { border-color: var(--accent-teal); }

.pf-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.pf-btn.primary { background: var(--gradient-brand); color: #0a0a14; border-color: transparent; }

.pf-import { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; }
.pf-import ul { margin: 0; padding-left: 20px; }
.pf-msg { min-height: 1.2em; font-size: 0.85rem; }

.pf-msg.ok { color: var(--accent-teal); }

.pf-msg.err { color: var(--accent-pink); }

.pf-head { display: flex; align-items: center; gap: 16px; }

.pf-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border-accent); }

.pf-avatar-placeholder { display: flex; align-items: center; justify-content: center; background: var(--gradient-brand); color: #0a0a14; font-size: 2rem; font-weight: 800; }

.pf-avatar-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

.pf-avatar-actions .pf-btn { padding: 5px 12px; font-size: 0.8rem; }

.pf-game { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pf-game:not(:has(~ .pf-game)) { border-bottom: 0; }
.pf-thumb { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.pf-thumb-placeholder { display: flex; align-items: center; justify-content: center; background: var(--bg-card-hover); }
.pf-game-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-game-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.pf-platforms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pf-chip { font-size: 0.72rem; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--bg-card-hover); color: var(--text-primary); }
.pf-chip.muted { color: var(--text-muted); }
.pf-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 6px 0 0; font-size: 0.82rem; }
.pf-meta div { display: flex; gap: 5px; }
.pf-meta dt { color: var(--text-muted); }
.pf-meta dd { margin: 0; color: var(--text-primary); font-weight: 600; }
.pf-tag { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--bg-card-hover); color: var(--text-secondary); }
.pf-tag.done { background: rgba(61, 217, 179, 0.15); color: var(--accent-teal); }
.pf-score-input { width: 90px; }
.pf-date-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
/* row buttons: icon + label; icon only on a phone */
.pf-game-actions .pf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 11px; font-size: 0.8rem; }
.pf-game-actions .pf-btn svg { flex-shrink: 0; }
.pf-game-actions .pf-btn[data-armed] .pf-label { display: inline; }
@media (max-width: 700px) {
  /* basis 0 keeps the text beside the cover (it would wrap under it otherwise); the actions take the next line */
  .pf-game .pf-row-main { flex: 1 1 0; }
  .pf-game-actions { margin-left: 0; width: 100%; }
  .pf-game-actions .pf-btn { min-width: 44px; min-height: 44px; padding: 8px 12px; }
  .pf-game-actions .pf-btn:not([data-armed]) .pf-label { display: none; }
}
.pf-game.locked .pf-thumb { filter: grayscale(1); opacity: 0.55; }
.pf-game.locked .pf-game-title strong { color: var(--text-secondary); }
.pf-tag.abandoned { background: rgba(245, 197, 66, 0.15); color: var(--accent-gold); }
.pf-tag.muted { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.pf-lock { margin-top: 4px; font-size: 0.8rem; color: var(--text-secondary); }

/* Sessions of a game, under its row in the profile games list */
.pf-sessions { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; }
.pf-sessions li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; font-size: 0.85rem; color: var(--text-secondary); border-bottom: 1px dashed var(--border); }
.pf-sessions li:last-child { border-bottom: none; }

.pf-btn.danger { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.35); color: #fca5a5; }
.pf-btn.danger:hover:not(:disabled) { border-color: rgba(239, 68, 68, 0.7); background: rgba(239, 68, 68, 0.2); }

/* Game page */
/* the guide heading is the first child of its box, so the sibling rule of .section-header does not space it */
#gmGuide > .section-header:first-child { margin-top: 32px; }

.gm-back { margin-bottom: 14px; }
.gm-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.gm-cover { width: 96px; height: 96px; border-radius: var(--radius-md); object-fit: cover; flex: none; }
.gm-cover-placeholder { display: flex; align-items: center; justify-content: center; background: var(--bg-card); font-size: 2rem; }
/* genres and tags are two lists, but one run of pills */
.gm-pills { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; align-items: center; }
.gm-pills > .gm-genres { display: contents; }
.gm-genres, .gm-dlc { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; align-items: center; }
.gm-you-row { flex-direction: row; align-items: center; justify-content: space-between; }
.gm-rate { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.gm-rate:hover { background: var(--bg-card-hover); border-color: var(--border-accent); }
.gm-rate:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
/* A chip of its own under the figures, so it reads as part of the group's data and not as a stray line */
.gm-wanted { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 6px 14px; border: 1px solid var(--border-accent); border-radius: 999px; background: rgba(61, 217, 179, 0.08); color: var(--text-primary); font-size: 0.85rem; }
.gm-wanted::before { content: "♥"; color: var(--accent-teal); }
.gm-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 28px; align-items: start; margin-top: 28px; } /* air between the screenshots and what follows */
@media (min-width: 1000px) {
  /* What is yours on the left, the group on the right: the page is no longer one long strip */
  .gm-body { grid-template-columns: minmax(300px, 4fr) minmax(0, 7fr); grid-template-areas: "you group"; }
  .gm-col-you { grid-area: you; }
  .gm-col-group { grid-area: group; }
  .gm-col-group .pf-stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}
.gm-wanted + .gm-lower { margin-top: 12px; }
.gm-players { list-style: none; margin: 0; gap: 14px; }
.gm-player { display: flex; align-items: center; gap: 12px; }
.gm-player .pl-avatar { width: 40px; height: 40px; font-size: 1rem; border: 0; }
.gm-player-main { flex: 1; min-width: 0; }
.gm-player-name { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-tag.live { background: rgba(74, 222, 128, 0.15); color: var(--live-green); }
@media (max-width: 640px) { .gm-cover { width: 72px; height: 72px; } }

/* Group page */
.ac-day { margin: 18px 0 8px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.ac-list { list-style: none; margin: 0; gap: 14px; }
.ac-event { display: flex; align-items: center; gap: 12px; }
.ac-event .pl-avatar { width: 36px; height: 36px; border: 0; }
.ac-text { min-width: 0; color: var(--text-secondary); overflow-wrap: anywhere; }
.ac-text strong { color: var(--text-primary); }

/* Statistics placeholder */
.wip-card { align-items: flex-start; }
.wip-card .menu-wip { margin-left: 0; }

/* Games page */
.gc-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.gc-search { flex: 1; min-width: 180px; }
.gc-toggles { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.gc-toggle { font: inherit; font-size: 0.8rem; font-weight: 600; padding: 6px 12px; border-radius: var(--radius-pill); cursor: pointer;
  background: none; border: 1px solid var(--border); color: var(--text-secondary); }
.gc-toggle[aria-pressed="true"] { color: var(--accent-teal); border-color: var(--accent-teal); background: rgba(61, 217, 179, 0.1); }
.gc-count { margin: 6px 0 12px; }
.gc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 14px; }
.gc-card { display: flex; flex-wrap: wrap; gap: 10px 12px; padding: 10px; text-decoration: none; color: inherit; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.gc-card:hover { border-color: var(--accent-teal); background: var(--bg-card-hover); }
.gc-cover { width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; flex: none; }
.gc-cover-placeholder { display: flex; align-items: center; justify-content: center; background: var(--bg-surface); font-size: 1.6rem; }
.gc-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gc-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.gc-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.8rem; margin-top: auto; }
.gc-card > .gc-meta { flex: 1 0 100%; margin-top: 0; }
@media (max-width: 640px) { .gc-grid { grid-template-columns: 1fr; } }

/* Achievements page */
.ach-filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.ach-count { margin: 0; }
.ach-block { margin-bottom: 28px; }
.pl-block, .ach-block.pl-block { margin: 32px 0 0; }
.pl-ids { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.pl-id { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 4px 12px 4px 10px; font: inherit; font-size: 0.82rem; cursor: pointer; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--text-primary); }
.pl-id:hover, .pl-id:focus-visible { background: var(--bg-card-hover); border-color: var(--accent-teal); }
.pl-id .svc-logo { flex: none; color: var(--accent-teal); }
.pl-id-service { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pl-id-value { font-weight: 600; overflow-wrap: anywhere; text-align: left; }
.ach-note { margin: 0 0 12px; }
.ach-fold { width: 100%; padding: 0; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
/* The toggle of every foldable section (achievements, group library, saga, media): a labelled pill, so it reads as a control
   on a phone too. The label follows the state, the arrow points where the section will go: down opens it, up closes it. */
.ach-chevron { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 5px 10px 5px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg-card); color: var(--text-secondary); font-size: 0.75rem; font-weight: 700; transition: border-color 0.2s ease, color 0.2s ease; }
.ach-chevron::before { content: 'Ocultar'; }
.ach-block.folded .ach-chevron::before { content: 'Mostrar'; }
.ach-chevron svg { width: 18px; height: 18px; transition: transform 0.2s ease; transform: rotate(180deg); }
.ach-block.folded .ach-chevron svg { transform: none; }
.ach-fold:hover .ach-chevron, .ach-fold:focus-visible .ach-chevron { border-color: var(--border-accent); color: var(--accent-teal); }
.ach-fold:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 4px; border-radius: var(--radius-sm); }
.ach-block.folded .ach-content { display: none; }
.ach-block.folded .ach-fold { margin-bottom: 0; }
.ach-progress { display: flex; flex-direction: column; gap: 4px; }
.ach-bar { height: 8px; border-radius: 999px; background: var(--bg-card-hover); overflow: hidden; }
.ach-bar-fill { height: 100%; border-radius: inherit; background: var(--gradient-brand); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ach-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.ach-card.mine { border-color: var(--border-accent); background: var(--gradient-card); }
.ach-card.hidden { opacity: 0.6; }
.ach-card.locked { opacity: 0.55; }
/* A special one shines in the colour of its level, unlocked or not (and dimmed like any other when it is not) */
.ach-card[class*="special-"] { border-color: rgb(var(--aura-rgb)); box-shadow: 0 0 16px rgba(var(--aura-rgb), 0.55), inset 0 0 20px rgba(var(--aura-rgb), 0.12); animation: ach-shine 2.8s ease-in-out infinite alternate; }
.ach-card[class*="special-"] .ach-img { box-shadow: 0 0 12px rgba(var(--aura-rgb), 0.75); }
@keyframes ach-shine {
  from { box-shadow: 0 0 10px rgba(var(--aura-rgb), 0.35), inset 0 0 14px rgba(var(--aura-rgb), 0.08); }
  to { box-shadow: 0 0 24px rgba(var(--aura-rgb), 0.8), inset 0 0 24px rgba(var(--aura-rgb), 0.16); }
}
@media (prefers-reduced-motion: reduce) { .ach-card[class*="special-"] { animation: none; } }
/* The aura sits in the card's padding (negative margin) so the text keeps its alignment and does not touch the bar */
.pf-row[class*="special-"] {
  margin: -4px -10px; padding: 4px 10px; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(var(--aura-rgb), 0.18), rgba(var(--aura-rgb), 0.04) 70%, transparent);
  box-shadow: inset 3px 0 0 rgb(var(--aura-rgb));
}
.pf-tag[class*="special-"] { background: rgba(var(--aura-rgb), 0.16); color: rgb(var(--aura-rgb)); }
.pf-tag.secret { background: rgba(255, 255, 255, 0.9); color: #0a0a14; }
.ach-img { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; flex: none; }
.ach-img-placeholder { display: flex; align-items: center; justify-content: center; background: var(--bg-surface); font-size: 1.5rem; }
.ach-head { display: flex; align-items: center; gap: 12px; }
.ach-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ach-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .ach-grid { grid-template-columns: 1fr; } }

/* Players pages */
.pl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pl-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; text-decoration: none; color: inherit; background: var(--gradient-card), var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.pl-card:hover { transform: translateY(-2px); border-color: var(--accent-teal); box-shadow: var(--shadow-glow); }
.pl-card.live { border-color: rgba(74, 222, 128, 0.35); background: linear-gradient(145deg, rgba(74, 222, 128, 0.1) 0%, rgba(61, 217, 179, 0.03) 100%), var(--bg-card); }
.pl-card.inactive { background: var(--bg-card); }
.pl-card.inactive .pl-card-head, .pl-card.inactive .pl-figs { opacity: 0.55; }
.pl-card.inactive:hover .pl-card-head, .pl-card.inactive:hover .pl-figs { opacity: 0.85; }
.pl-card-head { display: flex; align-items: center; gap: 14px; }
.pl-card .pl-avatar { width: 56px; height: 56px; font-size: 1.3rem; border: 0; }
.pl-card-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-card-name { font-weight: 700; font-size: 1.05rem; }
.pl-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.pl-fig { text-align: center; }
.pl-fig-value { font-weight: 700; font-size: 1.05rem; color: var(--accent-teal); }
.pl-fig-label { color: var(--text-secondary); font-size: 0.72rem; }
.pf-head .pl-avatar { width: 72px; height: 72px; font-size: 1.8rem; border: 0; }
@media (max-width: 640px) { .pl-cards { grid-template-columns: 1fr; } }

/* Wishlist page */
.pf-tag.dlc { background: rgba(167, 139, 250, 0.15); color: #c4b5fd; }
.pf-tag.early { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }
.pf-tag.wish { background: rgba(244, 114, 182, 0.15); color: #f9a8d4; }
.wl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.wl-card { position: relative; }
.wl-link { display: flex; gap: 12px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.wl-remove { position: absolute; top: 4px; right: 6px; font: inherit; font-size: 1.1rem; line-height: 1; padding: 2px 7px; background: transparent; border: 0; border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; }
.wl-remove:hover { color: #fca5a5; background: rgba(239, 68, 68, 0.15); }
.wl-card .gc-name { padding-right: 22px; }
.wl-empty { margin-bottom: 16px; }
.pg-title { margin-bottom: 18px; }

/* Release calendar page */
.cal-intro { margin: -8px 0 14px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cal-title { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px; }
.cal-month { font-size: 1.15rem; font-weight: 700; margin: 0; }
.cal-nav .pf-btn.cal-today { min-width: 0; font-size: 0.85rem; padding: 4px 10px; }
.cal-nav .pf-btn { min-width: 40px; font-size: 1.2rem; line-height: 1; }
.cal-nav .pf-btn:disabled { opacity: 0.35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 14px; }
.cal-weekday { text-align: center; color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; padding: 4px 0; }
.cal-cell { position: relative; min-height: 64px; padding: 4px 5px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; text-align: left; font: inherit; color: inherit;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.cal-cell { text-decoration: none; }
.cal-cell.blank { background: transparent; border-color: transparent; }
.cal-cell.has { cursor: pointer; border-color: var(--accent-teal); }
.cal-cell.has:hover { background: var(--bg-card-hover); }
.cal-day { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.cal-cell.has .cal-day { color: var(--accent-teal); }
.cal-cell.today .cal-day { align-self: flex-start; padding: 0 6px; border-radius: 999px; background: var(--accent-gold); color: #1a1a1f; }
.cal-thumb { width: 100%; height: 26px; object-fit: cover; border-radius: 3px; }
.cal-count { font-size: 0.68rem; line-height: 1.2; color: var(--text-secondary); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-layout { display: grid; gap: 16px; margin-bottom: 16px; }
.cal-side, .cal-list { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; }
.cal-list-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 10px; }
.cal-list { display: flex; flex-direction: column; }
.cal-empty { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 120px; text-align: center; color: var(--text-secondary); }
.cal-side .cal-grid { margin-bottom: 0; }
.cal-games { display: grid; gap: 10px; }
.cal-day-games { padding: 8px 20px 20px; }
@media (min-width: 1000px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 16px; align-items: stretch; }
  .cal-cell { min-height: 56px; }
  /* The calendar sets the row height; a long month scrolls inside the list instead of stretching the page. */
  .cal-list { contain: size; overflow-y: auto; }
}
@media (max-width: 640px) {
  .cal-cell { min-height: 44px; padding: 3px; }
  .cal-thumb, .cal-count { display: none; }
  .cal-cell.has::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-teal); margin: auto 0 2px 2px; }
}

/* Challenges page */
.ch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ch-title { font-weight: 700; min-width: 0; }
/* the time left: one line, colored by where the challenge is (running, upcoming; the rest stay quiet) */
.ch-time { flex: none; white-space: nowrap; }
.ch-time.active { background: rgba(61, 217, 179, 0.15); color: var(--accent-teal); }
.ch-time.upcoming { background: rgba(245, 197, 66, 0.15); color: var(--accent-gold); }
.ch-time.finished, .ch-time.declined { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.ch-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-chip { font-size: 0.72rem; font-weight: 600; padding: 2px 9px; border-radius: var(--radius-pill); background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-secondary); }
.ch-chip.versus { border-color: rgba(245, 197, 66, 0.4); color: var(--accent-gold); }
.ch-players { display: flex; flex-direction: column; gap: 6px; }
.ch-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 92px; gap: 10px; align-items: center; font-size: 0.85rem; }
.ch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-total { padding-top: 8px; border-top: 1px solid var(--border); font-weight: 600; }
.ch-bar { height: 8px; border-radius: 4px; background: var(--bg-surface); overflow: hidden; }
.ch-bar > i { display: block; height: 100%; background: var(--accent-teal); }
.ch-bar.ok > i { background: #4ade80; }
.ch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-actions:empty { display: none; }
.ch-digest { margin: 0 0 14px; font-weight: 600; color: var(--accent-teal); }
.ch-standing { padding: 6px 10px; border-radius: var(--radius-sm); border-left: 3px solid var(--border); background: var(--bg-surface); font-size: 0.85rem; }
.ch-standing.done { border-left-color: #4ade80; }
.ch-standing.ok { border-left-color: var(--accent-teal); }
.ch-standing.behind { border-left-color: var(--accent-gold); }
.ch-standing.urgent { border-left-color: #f87171; }
.ch-games > summary { cursor: pointer; font-size: 0.85rem; color: var(--text-secondary); }
.ch-games-items { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ch-standing.failed, .ch-standing.pending { color: var(--text-secondary); }
/* Home card: one block with the digest and the (few) challenges that need attention, one line each */
.ch-mine { gap: 8px; margin-bottom: 18px; color: inherit; text-decoration: none; }
.ch-mine-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding-left: 10px; border-left: 3px solid var(--border); font-size: 0.9rem; }
.ch-mine-item > span { color: var(--text-secondary); font-size: 0.85rem; }
.ch-mine-item.done { border-left-color: #4ade80; }
.ch-mine-item.ok { border-left-color: var(--accent-teal); }
.ch-mine-item.behind { border-left-color: var(--accent-gold); }
.ch-mine-item.urgent { border-left-color: #f87171; }
.ch-history { display: flex; flex-direction: column; gap: 8px; }
.ch-history-item { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* "Mis juegos": the filters above the list and the random rating */
.pf-lib-bar { margin-bottom: 12px; }
.pf-lib-bar [data-filter="q"] { flex: 1 1 180px; }
.pf-lib-bar .pf-btn { display: inline-flex; align-items: center; gap: 6px; }
.pf-lib-bar .pf-rate-random { margin-left: auto; }
.rand-game { display: flex; gap: 14px; align-items: center; }
.rand-cover { width: 96px; height: 96px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.rand-name { font-size: 1.05rem; }
.rand-done { padding: 12px 0; text-align: center; color: var(--text-secondary); }

/* Notifications page */
.nt-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.nt-card { position: relative; display: block; padding: 0; }
.nt-card.unread { border-color: var(--accent-teal); }
.nt-link { display: block; padding: 12px 38px 12px 14px; color: inherit; text-decoration: none; }
.nt-title { font-weight: 700; }
.nt-body { margin-top: 2px; color: var(--text-secondary); overflow-wrap: anywhere; }
.nt-date { margin-top: 4px; font-size: 0.8rem; color: var(--text-muted); }
.nt-remove { position: absolute; top: 6px; right: 6px; font: inherit; font-size: 1.1rem; line-height: 1; padding: 2px 7px; background: transparent; border: 0; border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; }
.nt-remove:hover { color: #fca5a5; background: rgba(239, 68, 68, 0.15); }
.ch-game-results { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ch-game-results:empty { display: none; }
.ch-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-next { margin-bottom: 14px; }
.pf-next summary { cursor: pointer; }
.pf-next-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 10px; }
.pf-next-list h3 { margin: 0 0 6px; font-size: 0.95rem; color: var(--accent-teal); }
.pf-next-item { margin-bottom: 8px; }
.pf-info-head { position: relative; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.pf-info-head h3 { margin: 0; }
.pf-field-head { margin-bottom: 0; font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }
.pf-info summary { display: flex; cursor: pointer; list-style: none; color: var(--text-secondary); border-radius: 50%; }
.pf-info summary::-webkit-details-marker { display: none; }
.pf-info summary:hover, .pf-info[open] summary { color: var(--accent-teal); }
.pf-info summary:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
/* beside a title the popover is as wide as a sentence, not as the title: it opens below it, from its left edge */
.pf-info-title { margin-bottom: 0; }
/* in a tile the "i" is part of the label; its popover is as wide as the whole row of tiles and opens under it */
.pf-stat .pf-info-head { position: static; display: inline-flex; margin: 0; }
.pf-stat .pf-info-text { color: var(--text-secondary); font-size: 0.8rem; font-weight: 400; }
.pf-info-title .pf-info-text { right: auto; width: min(34rem, calc(100vw - 48px)); font-size: 0.85rem; }
.pf-info-title .pf-info-text p { margin: 0; }
.pf-info-title .pf-info-text p + p { margin-top: 8px; }
.pf-info-text { position: absolute; left: 0; right: 0; top: 100%; z-index: 2; margin-top: 6px; padding: 10px 12px; font-size: 0.8rem; line-height: 1.4; color: var(--text-secondary); background: var(--bg-surface); border: 1px solid var(--border-accent); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.lc-games { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lc-games li { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.02); }
.lc-name { font-weight: 600; margin-bottom: 2px; }
.lc-side { display: grid; grid-template-columns: 3.5rem 1fr auto; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); }
.lc-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-done { white-space: nowrap; }
.gm-pace { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.gl-note { margin: 0 0 8px; }
.gl-games { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gl-game { display: flex; gap: 10px; align-items: center; }
.gl-bars { display: flex; flex-direction: column; gap: 8px; }
.gl-bar-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 0.85rem; }
.gl-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-bar { height: 8px; border-radius: 4px; background: var(--bg-surface); overflow: hidden; }
.gl-bar > i { display: block; height: 100%; background: var(--accent-teal); }
.sg-games { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sg-game { display: flex; gap: 12px; align-items: flex-start; }
.sg-game.current { border-left: 3px solid var(--accent-teal); padding-left: 8px; }
.sg-year { width: 40px; flex-shrink: 0; }
.sg-summary { margin-bottom: 4px; }
.gl-section { scroll-margin-top: 70px; }
.gl-pills { margin: 4px 0 12px; }
@media (max-width: 640px) {
  /* One strip that scrolls sideways and stays under the navbar, instead of four ragged rows */
  .gl-pills { position: sticky; top: 64px; z-index: 50; flex-wrap: nowrap; overflow-x: auto; margin: 4px -16px 12px; padding: 8px 16px; background: rgba(10, 10, 20, 0.92); border-bottom: 1px solid var(--border); scrollbar-width: none; }
  .gl-pills::-webkit-scrollbar { display: none; }
  .gl-pills .pf-season-badge { flex: none; }
  .gl-pills:not(:has(button)) { display: none; }
  .gl-section { scroll-margin-top: 120px; }
}
.gl-count { margin-left: 6px; }
.gl-fold .gl-count, .gl-section .section-header .gl-count { white-space: nowrap; }
.sg-count { margin-left: 6px; }
.gm-top > #gmMedia .ach-block { margin-bottom: 16px; }
@media (min-width: 1000px) {
  /* The trailer sits beside the header and the screenshots run below it, so the media block dissolves into the grid */
  .gm-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 24px; align-items: start; }
  .gm-top.has-trailer { grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); }
  .gm-top .gm-head { align-items: flex-start; grid-column: 1; grid-row: 1; }
  .gm-top > #gmMedia, #gmMediaBlock, #gmMediaBlock .ach-content, #gmMediaBlock .gm-media { display: contents; }
  #gmMediaBlock .ach-fold { display: none; }
  #gmMediaBlock .gm-trailer { grid-column: 2; grid-row: 1; max-width: none; }
  #gmMediaBlock .gm-carousel { grid-column: 1 / -1; grid-row: 2; }
}
.gm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 6px; }
.gm-outside { display: contents; }
.gm-fact { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); }
.gm-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 6px; border-radius: 8px; font-size: 1.05rem; font-weight: 800; color: #0a0a14; }
.gm-badge.good { background: var(--live-green); }
.gm-badge.mid { background: var(--accent-gold); }
.gm-badge.bad { background: #f87171; }
.gm-badge.age { background: transparent; border: 2px solid var(--text-secondary); color: var(--text-primary); font-size: 0.95rem; }
.gm-media { display: flex; flex-direction: column; gap: 12px; }
.gm-desc { margin: 4px 0 8px; line-height: 1.5; color: var(--text-secondary); }
/* A long description (RAWG's can be a page) would push everything down: a few lines, the rest one tap away */
.gm-desc:not(.open) { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
@media (min-width: 1000px) { .gm-desc:not(.open) { -webkit-line-clamp: 6; } }
.gm-lower { margin-top: 4px; }
@media (min-width: 1000px) {
  /* The saga is always open on a wide screen: there is room */
  #gmSagaBlock .ach-content { display: block; }
  #gmSagaBlock .ach-fold { pointer-events: none; }
  #gmSagaBlock .ach-chevron { display: none; }
}
.gm-details, .gm-publisher { margin: 6px 0; line-height: 1.5; } /* the same 6px as the pills above and below */
.pf-tag.gm-platform { background: var(--bg-card-hover); color: var(--text-secondary); }
.gm-trailer { position: relative; display: block; width: 100%; max-width: 560px; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--radius-sm); background: var(--bg-surface); overflow: hidden; cursor: pointer; }
.gm-trailer img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gm-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: #fff; background: rgba(0, 0, 0, 0.35); }
.gm-trailer:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
video.gm-trailer, iframe.gm-trailer { cursor: auto; background: #000; }
.gm-carousel { position: relative; }
.gm-shots { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 4px; }
.gm-shots a { flex: 0 0 min(280px, 78%); scroll-snap-align: start; }
.gm-shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; }
.gm-nav { display: none; position: absolute; top: calc(50% - 18px); width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.gm-nav.prev { left: 6px; }
.gm-nav.next { right: 6px; }
.gm-nav:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
@media (hover: hover) and (min-width: 700px) { .gm-nav { display: block; } }
.gm-more { cursor: pointer; font: inherit; font-size: 0.72rem; font-weight: 700; }
.gm-more:hover { color: var(--text-primary); }
.gm-source-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 0.85rem; text-decoration: none; border-color: var(--border-accent); color: var(--accent-teal); }
.gm-source-btn:hover { background: rgba(61,217,179,0.1); }
.gm-source-btn:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
#gmSaga { margin-top: 28px; }
/* opens under the row, full width, like the sessions */
.pf-price-form { align-items: flex-end; gap: 12px 16px; width: 100%; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--border); }
.pf-price-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.pf-price-box { display: inline-flex; align-items: center; gap: 6px; color: var(--text-primary); }
.pf-price-input { width: 100px; }
.pf-price-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
@media (max-width: 700px) { .pf-price-actions { margin-left: 0; width: 100%; } }
.pf-value { margin-bottom: 14px; }
.pf-value summary { cursor: pointer; }
.pv-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 10px 0; }
.pv-list h3 { margin: 0 0 6px; font-size: 0.95rem; color: var(--accent-teal); }
.pv-item { margin-bottom: 8px; }

/* Mi IA: where the cost of the chat and the guide goes, as a small information box above the key and not a section of its own */
.ai-cost-note {
  display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 16px; padding: 10px 14px;
  border: 1px solid var(--border-accent); border-left-width: 3px; border-radius: var(--radius-md); background: rgba(61, 217, 179, 0.06);
  font-size: 0.92rem; line-height: 1.45; color: var(--text-primary);
}
.ai-cost-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px;
  border: 1.5px solid var(--accent-teal); border-radius: 50%; color: var(--accent-teal); font-size: 0.75rem; font-weight: 700; font-style: italic; font-family: serif;
}
.ai-cost-text > div + div { margin-top: 4px; }
.ai-cost-text .ai-budget { color: var(--text-secondary); font-size: 0.86rem; }
.ai-cost-note .ai-beta { color: var(--accent-teal); }
.ai-cost-note .ai-stopped { color: #fca5a5; }

/* Mi IA: what the chat and the guide do, side by side on a wide screen and one over the other on a phone */
/* a section that is folded until it is wanted: its title is the summary, with a chevron */
.ai-fold { margin-top: 20px; }
.ai-fold > summary { list-style: none; cursor: pointer; }
.ai-fold > summary::-webkit-details-marker { display: none; }
.ai-fold-head { margin-bottom: 0; }
.ai-fold[open] .ai-fold-head { margin-bottom: 14px; }
.ai-fold-chevron { display: inline-flex; color: var(--text-secondary); transition: transform 0.15s; }
.ai-fold[open] .ai-fold-chevron { transform: rotate(180deg); }
.ai-fold-head:hover .section-title, .ai-fold-head:hover .ai-fold-chevron { color: var(--accent-teal); }
.ai-fold > summary:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 4px; border-radius: var(--radius-sm); }
.ai-about { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 8px; }
.ai-about-card h3 { margin: 0 0 6px; font-size: 1rem; color: var(--accent-teal); }
.ai-about-card h4 { margin: 12px 0 4px; font-size: 0.9rem; }
.ai-about-list { margin: 0; padding-left: 18px; font-size: 0.92rem; line-height: 1.45; }
.ai-about-list li + li { margin-top: 4px; }
.ai-about-limit, .ai-about-cost { margin-top: 10px; }
/* the cards of the keys and the spending are siblings with nothing between them: give each some air */
.pf-card.ai-locked, .pf-card.ai-provider, .pf-card[data-preferred], .pf-card[data-spend] { margin-bottom: 14px; }

/* a small label beside a tab's name (Mi IA: beta) */
.pf-tag { margin-left: 4px; padding: 1px 6px; border: 1px solid var(--accent-teal); border-radius: 999px; color: var(--accent-teal); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: 1px; }
