/* The site's own pages: the home page's cards, after the screenshot the user sent, and the duel page. Colors match
   the games'. The duel page also loads src/duel/duel.css. */
:root{--bg:#f3efe5;--paper:#fbf8f0;--ink:#1f2422;--muted:#6e746f;--line:#cec8bb;--blue:#315f89;--blue-soft:#dbe8f2;--red:#94463f;--red-soft:#f2d9d4;--gold:#b88a3b;--green:#3b7654;--duel:#f7efc6;--shadow:0 18px 50px rgba(31,36,34,.12)}
*{box-sizing:border-box}
html,body{margin:0;overscroll-behavior:none}
body{color:var(--ink);background:var(--bg);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-tap-highlight-color:transparent;line-height:1.4}
.page{max-width:1416px;margin:0 auto;padding:clamp(16px,4vw,40px) clamp(14px,3vw,32px) 48px}
/* viewport-fit=cover draws under a phone's notch and home bar: keep content inside the safe area. */
@supports (padding:max(0px)){.page{padding-left:max(clamp(14px,3vw,32px),env(safe-area-inset-left));padding-right:max(clamp(14px,3vw,32px),env(safe-area-inset-right));padding-bottom:max(48px,env(safe-area-inset-bottom))}}

/* Home: the name, the date, and the daily number on one line, then the title, the tagline, and the sub-tagline, above the cards. */
.masthead{text-align:center;margin:0 0 clamp(18px,4vw,34px)}
.masthead .today{margin:0;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);text-wrap:balance}
.masthead h1{margin:8px 0 0;font-weight:800;font-size:clamp(30px,5.2vw,46px);line-height:1.1;letter-spacing:-.02em}
.masthead .tagline{margin:2px 0 6px;font-weight:800;font-size:clamp(22px,3.8vw,32px);line-height:1.15;letter-spacing:-.015em}
.masthead .subtagline{margin:0;color:var(--muted);font-size:clamp(15px,2vw,18px)}

/*
 * The cards, the duel card first: all one size, as many across as fit (four on a wide screen, one on a phone), and
 * centred. Every row is as tall as the tallest card, so every card is too. A game card's pitch is one line
 * (MAX_PITCH, games.ts), and its Play sits at its foot.
 */
.cards{--card:320px;display:grid;grid-template-columns:repeat(auto-fill,min(100%,var(--card)));grid-auto-rows:1fr;justify-content:center;gap:clamp(14px,2.4vw,24px)}
.card{display:flex;flex-direction:column;background:#fff;border:1px solid #d9d3c6;border-radius:10px;overflow:hidden}
/* A name is one line too (MAX_NAME, games.ts). */
.card h2{font-family:Georgia,"Times New Roman",serif;font-weight:700;font-size:clamp(24px,2.8vw,29px);margin:0;letter-spacing:-.01em;white-space:nowrap}
.card .top{background:var(--top);display:grid;justify-items:center;align-content:center;gap:12px;padding:28px 16px 24px;height:200px;text-align:center}
.card .top svg{width:72px;height:72px}
.card .body{display:flex;flex-direction:column;gap:10px;padding:18px 20px 22px;flex:1;text-align:center}
.card .pitch{margin:0;color:#3f4542;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card .body .pill{margin-top:auto}
.card .about{margin:0;color:var(--muted);font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.pill{display:block;text-align:center;padding:13px 18px;border:1.5px solid #c9c2b4;border-radius:999px;background:#fff;color:var(--ink);font-weight:800;font-size:16px;text-decoration:none}
.pill:hover{border-color:var(--ink)}
.pill.primary{background:var(--ink);border-color:var(--ink);color:#fff}

/*
 * The duel card is the featured one: pale yellow throughout, its art, a badge, and the black button. It is kept as
 * short as a game card, since every card in a row is as tall as the tallest: compact art, and its buttons side by side.
 */
.card.duel{position:relative;background:var(--duel);border-color:#e6d993;text-align:center;padding:18px 20px 22px;gap:12px}
.card.duel .art{display:grid;place-items:center;min-height:112px}
.card.duel .art svg{width:min(100%,190px);height:auto}
/* In the card's corner, clear of the art. */
.card.duel .badge{position:absolute;top:10px;right:10px;background:#2b2f2c;color:#fff;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;border-radius:8px;padding:5px 9px}
.card.duel p{margin:0;font-size:16px;color:#3f4542;text-wrap:pretty}
.card.duel .actions{margin-top:auto;display:flex;gap:8px}
.card.duel .actions .pill{flex:1;padding-left:8px;padding-right:8px;white-space:nowrap}
.pill[hidden]{display:none}

.site-foot{margin-top:28px;text-align:center;font-size:13px;color:var(--muted)}
.site-foot a{color:var(--muted)}
.site-foot + .site-foot{margin-top:8px}
/* The last card: more games to come, drawn as a space waiting to be filled. */
.card.more{background:transparent;border:2px dashed var(--line);justify-content:center;align-items:center;gap:10px;padding:28px 20px;text-align:center;min-height:200px}
.card.more svg{width:64px;height:64px;color:var(--line)}
.card.more h2{color:var(--muted)}
.card.more p{margin:0;color:var(--muted);font-size:16px;text-wrap:pretty}

/* The duel page. */
.duel-page{max-width:560px;margin:0 auto}
.site-top{max-width:560px;margin:0 auto 14px}
.back{color:var(--muted);text-decoration:none;font-weight:700;font-size:14px}
.duel-page h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(28px,6vw,38px);margin:0 0 4px}
.duel-page .lead{margin:0 0 20px;color:var(--muted);font-size:16px}
button{font:inherit;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);padding:9px 13px;cursor:pointer;font-weight:700;touch-action:manipulation}
button.primary{background:var(--ink);color:#fff;border-color:var(--ink)}
.tiny{font-size:12px;color:var(--muted);line-height:1.5;margin:4px 0 0}

/* The cloud home page's own style rules, which the build adds after the home site's (src/site/site.css), for the home
   page and 404.html. */

/* "Your duels · 2 invites" doesn't fit beside "Start a duel" in the card, so the row wraps, and the longer one has a line of its own. */
.card.duel .actions{flex-wrap:wrap}

/* The invite banner (invites.ts): the page's first thing after the masthead while this browser has invites, so a phone
   shows it without scrolling. Gold-edged, like the duel it opens. */
.invite-banner{display:flex;align-items:center;gap:16px;max-width:664px;margin:0 auto clamp(14px,2.4vw,24px);padding:14px 18px;background:#fff;border:2px solid var(--gold);border-radius:10px;box-shadow:var(--shadow)}
.invite-banner .text{flex:1;min-width:0}
.invite-banner .kicker{margin:0;font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--gold)}
.invite-banner h2{margin:2px 0 0;font-family:Georgia,"Times New Roman",serif;font-size:22px;line-height:1.2;overflow-wrap:anywhere}
.invite-banner .detail{margin:2px 0 0;color:var(--muted);font-size:15px}
.invite-banner .pill{flex:none;min-width:132px}
@media (max-width:520px){.invite-banner{flex-direction:column;align-items:stretch;text-align:center;gap:12px}}

/* 404.html: the page Hosting serves for an address the site lacks. */
.lost{max-width:560px;margin:clamp(24px,8vh,72px) auto 0;text-align:center}
.lost h1{margin:0 0 8px;font-family:Georgia,"Times New Roman",serif;font-size:clamp(28px,6vw,38px)}
.lost p{margin:0 0 22px;color:var(--muted);font-size:16px;line-height:1.5}
.lost .pill{display:inline-block;min-width:220px}
