:root {
  --bg: #0f1216; --panel: #171b21; --panel-2: #1e232b; --line: #2a313b;
  --text: #e8ecf1; --muted: #9aa5b1; --accent: #4f9dff; --accent-ink: #06101d;
  --ok: #3ecf8e; --warn: #f5b942; --bad: #ff6b6b; --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); }
a.btn { text-decoration: none; display: inline-block; }
header.site { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
header.site .brand { font-weight: 700; font-size: 18px; letter-spacing: .2px; color: var(--text); text-decoration: none; }
header.site nav a { color: var(--muted); text-decoration: none; margin-left: 18px; }
header.site nav a.active, header.site nav a:hover { color: var(--text); }
main.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; max-width: 1240px; margin: 0 auto; padding: 24px; }
@media (max-width: 900px) { main.layout { grid-template-columns: 1fr; padding: 16px; } }
h1 { font-size: 24px; margin: 0 0 4px; } .lead { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none; }
.card-head .title { font-weight: 600; min-width: 170px; }
.card-head .picked { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-head .picked.has { color: var(--text); }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.badge.need { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.card-body { border-top: 1px solid var(--line); padding: 8px; display: none; }
.card.open .card-body { display: block; }
.option { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; background: transparent; color: inherit; border: 1px solid transparent; border-radius: 8px; padding: 10px 12px; font: inherit; cursor: pointer; }
.option:hover:not(:disabled) { background: var(--panel-2); }
.option.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.option:disabled { cursor: not-allowed; opacity: .5; }
.option .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); margin-top: 3px; flex: none; }
.option.selected .dot { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--panel); }
.option .name { font-weight: 500; } .option .specs { color: var(--muted); font-size: 13px; }
.option .why { color: var(--bad); font-size: 13px; }
.toolbar { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 4px 8px 8px; }
.toolbar label { color: var(--muted); font-size: 13px; }
.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 500; padding: 6px 12px; }
.btn.ghost:hover { color: var(--text); }
.btn.block { width: 100%; }
aside .sticky { position: sticky; top: 76px; }
.summary h2, .panel h2 { font-size: 16px; margin: 0 0 10px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.sum-list { list-style: none; margin: 0 0 12px; padding: 0; font-size: 14px; }
.sum-list li { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.sum-list li > span:first-child { color: var(--muted); min-width: 84px; }
.meter { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.meter > div { height: 100%; background: var(--ok); }
.small { font-size: 13px; color: var(--muted); }
.msg { font-size: 13px; padding: 8px 10px; border-radius: 8px; margin: 6px 0; }
.msg.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: #ffc2c2; }
.msg.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: #ffe2a6; }
.msg.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: #b8f5d9; }
form.quote label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
form.quote input, form.quote textarea, select { width: 100%; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; }
form.quote textarea { min-height: 72px; resize: vertical; }
input:focus, textarea:focus, select:focus, .option:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hidden { display: none !important; }
@media (max-width: 560px) { .card-head { flex-wrap: wrap; } .card-head .title { min-width: 0; flex: 1; } .card-head .picked { order: 3; flex-basis: 100%; } header.site { padding: 12px 16px; } header.site nav a { margin-left: 12px; } }

/* Por juegos */
main.games-page { max-width: 1100px; margin: 0 auto; padding: 24px; }
.step-title { font-size: 16px; margin: 20px 0 10px; }
.games-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.games-toolbar input { flex: 1; min-width: 0; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.game { display: flex; flex-direction: column; text-align: left; padding: 0 0 10px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font: inherit; cursor: pointer; }
.game:hover, .result:hover:not(:disabled) { border-color: var(--accent); }
.game img, .game .art-fallback, .chosen-game img, .chosen-game .art-fallback { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; display: block; background: var(--panel-2); }
.art-fallback { display: grid; place-items: center; padding: 8px; text-align: center; font-weight: 800; font-size: 28px; letter-spacing: 1px; color: var(--muted); background: linear-gradient(135deg, var(--panel-2), color-mix(in srgb, var(--accent) 18%, var(--panel-2))) !important; }
.game-name { font-weight: 600; padding: 8px 10px 0; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.result { display: flex; gap: 10px; align-items: center; text-align: left; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px; font: inherit; cursor: pointer; }
.result img, .result .art-fallback { width: 92px; height: 43px; object-fit: cover; border-radius: 4px; flex: none; background: var(--panel-2); font-size: 10px; padding: 2px; }
.result .result-name { flex: 1; min-width: 0; }
.result:disabled { opacity: .5; cursor: wait; }
.chosen-game { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: center; margin: 16px 0 20px; }
.chosen-game img, .chosen-game .art-fallback { border-radius: var(--radius); }
.chosen-game .lead { margin: 10px 0 4px; }
.game-desc { margin: 4px 0 6px; max-width: 720px; }
.store-link { font-size: 14px; font-weight: 600; text-decoration: none; }
.store-link:hover { text-decoration: underline; }
.builds { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.build { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.build.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.build h2 { margin: 0; font-size: 18px; }
.build .small { margin: 0 0 6px; }
.build-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.btn.outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.same-note { grid-column: 1 / -1; margin: 0; }
.req-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0 6px; }
.req-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 4px; border-bottom: 1px solid var(--line); }
.req-table td { padding: 4px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.req-table td:first-child { color: var(--muted); white-space: nowrap; }
.req-table td.yes { color: var(--ok); text-align: center; } .req-table td.no { color: var(--bad); text-align: center; } .req-table td.unk { color: var(--warn); text-align: center; font-weight: 700; }
.quote-panel { max-width: 760px; }
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.quote-panel .btn { margin-top: 10px; }
@media (max-width: 760px) {
  main.games-page { padding: 16px; }
  .builds, .quote-grid { grid-template-columns: 1fr; }
  .chosen-game { grid-template-columns: 1fr; gap: 10px; }
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results { grid-template-columns: 1fr; }
}

/* Inicio */
main.home { max-width: 1100px; margin: 0 auto; padding: 48px 24px; }
.home-hero h1 { font-size: 32px; margin-bottom: 8px; }
.home-hero .lead { font-size: 17px; max-width: 640px; }
.home-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.home-option { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.home-option:hover, .home-option:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.home-option .icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, var(--panel-2)); color: var(--accent); }
.home-option h2 { margin: 0; font-size: 20px; }
.home-option p { margin: 0; color: var(--muted); }
.home-option .go { margin-top: auto; color: var(--accent); font-weight: 600; }
.home-note { margin-top: 28px; color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .home-options { grid-template-columns: 1fr; } main.home { padding: 28px 16px; } .home-hero h1 { font-size: 26px; } }
/* Footer with the feedback button (public/footer.js) */
footer.site-footer { max-width: 1240px; margin: 32px auto 0; padding: 20px 24px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
footer.site-footer .fb-open { margin-top: 10px; }
.fb-dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; width: min(460px, calc(100vw - 32px)); }
.fb-dialog::backdrop { background: rgb(0 0 0 / .6); }
.fb-dialog h3 { margin: 0 0 12px; }
.fb-dialog label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.fb-dialog textarea, .fb-dialog input { width: 100%; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; }
.fb-dialog .fb-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.store-link .store-logo { display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; background: currentColor; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
header.site nav .nav-count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
header.site nav a.active { color: var(--text); font-weight: 600; }
.badge:empty { display: none; }
header.site nav#admin-nav { display: flex; flex-wrap: wrap; align-items: center; row-gap: 6px; }
header.site nav#admin-nav a { white-space: nowrap; }
@media (max-width: 700px) {
  header.site:has(#admin-nav) { flex-wrap: wrap; }
  header.site nav#admin-nav { width: 100%; }
  header.site nav#admin-nav a { margin: 0 14px 0 0; }
}
.art-fit { position: relative; display: block; overflow: hidden; background: var(--panel-2); flex: none; }
.game .art-fit, .chosen-game .art-fit { width: 100%; aspect-ratio: 460 / 215; }
.chosen-game .art-fit { border-radius: var(--radius); }
.result .art-fit { width: 92px; height: 43px; border-radius: 4px; }
.art-fit::before { content: ''; position: absolute; inset: -12px; background: var(--bg) center / cover no-repeat; filter: blur(12px) brightness(.55); }
.game .art-fit img, .chosen-game .art-fit img, .result .art-fit img { position: relative; width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; padding: 0; background: none; border-radius: 0; }
/* Header on phones: name on top, the menu below it in one row */
header.site nav a { white-space: nowrap; }
@media (max-width: 560px) {
  header.site { flex-wrap: wrap; row-gap: 6px; }
  header.site nav { width: 100%; display: flex; flex-wrap: wrap; gap: 4px 16px; }
  header.site nav a { margin-left: 0; }
}
/* Background picture of the chosen game (public/games.js, showBackground) */
.game-bg { position: absolute; left: 0; right: 0; top: 0; height: min(78vh, 760px); z-index: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: center top / cover no-repeat; -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgb(0 0 0 / .6) 45%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, rgb(0 0 0 / .6) 45%, transparent 100%); }
.game-bg.on { opacity: .38; }
.game-bg.soft { filter: blur(18px) saturate(1.2); transform: scale(1.08); opacity: 0; }
.game-bg.soft.on { opacity: .3; }
main.games-page, footer.site-footer { position: relative; z-index: 1; }
.chosen-game .game-hits { margin: -4px 0 8px; font-size: 13px; color: var(--muted); }
.chosen-game h1, .chosen-game .game-desc, .chosen-game .game-hits { text-shadow: 0 1px 8px rgb(0 0 0 / .7); }
.manual-note { grid-column: 1 / -1; }
.manual-note h2 { margin-top: 0; }

/* The owner's own comment for a game, under "Elegí una de las dos PCs". Hidden when empty. */
.owner-comment { margin: 10px 0 0; padding: 4px 10px; border-left: 2px solid rgba(79, 157, 255, .45); background: rgba(255, 255, 255, .04); border-radius: 0 6px 6px 0; color: var(--muted); font-style: italic; white-space: pre-line; }

/* (i) with a short note, shown on hover, tap or keyboard focus. The script places the note inside the screen. */
.info-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 16px; min-width: 0; height: 16px; margin-left: 6px; border: 1px solid var(--muted); border-radius: 50%; color: var(--muted); font-size: 11px; font-weight: 700; font-style: italic; line-height: 1; cursor: help; vertical-align: middle; flex: none; }
.info-tip:hover, .info-tip:focus { color: var(--text); border-color: var(--text); outline: none; }
.info-tip::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: var(--tip-x, -120px); width: var(--tip-w, 260px); box-sizing: border-box; padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); color: var(--text); font-size: 13px; font-weight: 400; font-style: normal; line-height: 1.4; text-align: left; white-space: normal; opacity: 0; visibility: hidden; transition: opacity .15s; z-index: 30; pointer-events: none; }
.info-tip:hover::after, .info-tip:focus::after { opacity: 1; visibility: visible; }
.footer-brand { margin: 10px 0 0; text-align: center; color: var(--muted); }
