@font-face { font-family: Fraunces; src: url(/fonts/fraunces-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: Fraunces; src: url(/fonts/fraunces-latin-wght-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(/fonts/source-sans-3-latin-wght-normal.woff2) format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(/fonts/source-sans-3-latin-wght-italic.woff2) format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

/* The portal's one stylesheet. Each game re-skins it through the variables below,
   which the app sets from the game's theme. */
:root {
  /* Funmeister brand ("The Showman") is the default; a game overrides these. */
  --bg: #f6edd9;
  --panel: #fff9ea;
  --ink: #33231a;
  --muted: #6b5646;
  --accent: #8b2e2c;
  --accent-ink: #fff6e4;
  --display: Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --line: color-mix(in srgb, var(--ink) 18%, transparent);
  --soft: color-mix(in srgb, var(--ink) 8%, transparent);
  font-size: 17px;
}
:root.large { font-size: 21px; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); line-height: 1.45; -webkit-text-size-adjust: 100%; }
#app { min-height: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0 0 0.4em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.8em; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 0.6em 1em; min-height: 2.75rem; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.quiet { background: none; border-color: transparent; color: var(--muted); padding: 0.4em 0.6em; min-height: 2.2rem; text-decoration: underline; }
button.chosen { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); }
input[type="text"], input[type="email"], select, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0.65em 0.8em; min-height: 2.75rem; }
input:focus-visible, button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
label { display: block; margin-bottom: 0.9em; }
label > span { display: block; margin-bottom: 0.3em; }
label.check { display: flex; gap: 0.6em; align-items: flex-start; }
label.check input { width: 1.3em; height: 1.3em; margin-top: 0.15em; flex: none; accent-color: var(--accent); }

/* Simple pages: home, setup, join, props */
.page { max-width: 34rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; margin-bottom: 1rem; }
.brand { font-family: var(--display); letter-spacing: 0.04em; color: var(--muted); font-size: 0.9rem; margin-bottom: 1.2rem; }
.error { background: #7a1f1f; color: #fff; border-radius: 10px; padding: 0.6em 0.9em; margin-bottom: 0.9em; }
.row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 10rem; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem; margin: 0 0 1rem; }
legend { padding: 0 0.4em; color: var(--muted); }

/* The room */
.room { display: flex; flex-direction: column; height: 100dvh; max-width: 70rem; margin: 0 auto; }
.top { padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.top .title { font-family: var(--display); font-size: 1.1rem; flex: 1 1 12rem; min-width: 0; }
.top .title small { display: block; color: var(--muted); font-family: var(--body); font-size: 0.8rem; }
.digits { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.digit { border: 1px solid var(--accent); border-radius: 8px; padding: 0.15em 0.5em; font-size: 0.85rem; white-space: nowrap; }
.digit b { color: var(--accent); font-size: 1.05rem; margin-left: 0.3em; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; border: 0; border-radius: 0; background: none; border-bottom: 3px solid transparent; color: var(--muted); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 0.5em; margin-left: 0.4em; font-size: 0.8rem; font-weight: 700; }
.cols { flex: 1; min-height: 0; display: flex; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.col h2 { padding: 0.6rem 1rem 0; margin: 0; font-size: 1rem; color: var(--muted); display: none; }
.scroll { flex: 1; overflow-y: auto; padding: 0.8rem 1rem; overscroll-behavior: contain; }
.col.hidden { display: none; }
@media (min-width: 52rem) {
  .tabs { display: none; }
  .col.hidden { display: flex; }
  .col + .col { border-left: 1px solid var(--line); max-width: 26rem; }
  .col h2 { display: block; }
}

.msg { margin: 0 0 0.7rem; max-width: 40rem; }
.msg .who { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.15rem; }
.msg .bubble { background: var(--panel); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 0.55em 0.8em; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.host .who { color: var(--accent); }
.msg.with-avatar { display: flex; gap: 0.5rem; align-items: flex-start; }
.msg .said { min-width: 0; }
.avatar { width: 2.5rem; height: 2.5rem; flex: none; border-radius: 50%; background: var(--soft); object-fit: contain; }
.people .avatar { width: 1.6rem; height: 1.6rem; vertical-align: middle; margin: -0.2em 0.35em -0.2em -0.45em; }
.block.picture { display: block; width: 100%; height: auto; border-radius: 10px; }
.prop-header { display: block; width: 100%; height: auto; border-radius: 14px; margin-bottom: 1rem; }
.tv .avatar { width: 3.4rem; height: 3.4rem; }
.msg.char .bubble { font-family: var(--display); font-style: italic; }
.msg.mine { margin-left: auto; text-align: right; }
.msg.mine .bubble { border-radius: 14px 4px 14px 14px; background: color-mix(in srgb, var(--accent) 18%, var(--panel)); text-align: left; display: inline-block; }
.msg.system { text-align: center; color: var(--muted); font-size: 0.85rem; max-width: none; }
.card { border: 1px solid var(--accent); border-radius: 12px; background: var(--panel); margin: 0 0 0.9rem; overflow: hidden; }
.card > header { display: flex; align-items: center; gap: 0.5em; }
.card .emblem { width: 1.75rem; height: 1.75rem; flex: none; }
.card > header { background: color-mix(in srgb, var(--accent) 20%, transparent); padding: 0.4em 0.8em; font-family: var(--display); font-weight: 600; }
.card > .body { padding: 0.7em 0.8em; white-space: pre-wrap; overflow-wrap: anywhere; }
.card .block, .msg .block { margin-top: 0.6em; white-space: normal; }

.glyphs { display: flex; flex-wrap: wrap; gap: 0.7rem 1.1rem; }
.glyphs .group { display: flex; gap: 0.1rem; padding: 0.2rem 0.3rem; border-bottom: 2px solid var(--line); }
.glyph { width: min(2.3rem, 8vw); height: min(2.3rem, 8vw); stroke: var(--ink); fill: var(--ink); }
.key { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.2rem, 1fr)); gap: 0.35rem; }
.key div { display: flex; align-items: center; gap: 0.2rem; border: 1px solid var(--line); border-radius: 8px; padding: 0.1rem 0.35rem; font-weight: 700; font-size: 1.1rem; }
.tile { width: 9rem; max-width: 100%; aspect-ratio: 1; border-radius: 6px; border: 2px dashed var(--line); background-repeat: no-repeat; }
.file { margin: 0; padding-left: 1.3em; }
.file li { margin-bottom: 0.3em; }
a.proplink { display: inline-block; border: 1px solid var(--accent); border-radius: 10px; padding: 0.5em 0.8em; text-decoration: none; font-weight: 600; }

/* The action panel: what the game is asking for right now */
.action { border-top: 1px solid var(--line); background: var(--panel); padding: 0.8rem 1rem; max-height: 55dvh; overflow-y: auto; }
.action .prompt { font-family: var(--display); font-size: 1.05rem; margin-bottom: 0.6rem; }
.action .waiting { color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; }
.action .extras { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 0.5rem; }
.task { border: 1px solid var(--line); border-radius: 10px; padding: 0.6em 0.75em; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.task .what { flex: 1 1 12rem; }
.task.done { opacity: 0.6; }
.statement { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.statement input[type="radio"] { width: 1.3em; height: 1.3em; flex: none; accent-color: var(--accent); }
.chat { display: flex; gap: 0.5rem; padding: 0.6rem 1rem; border-top: 1px solid var(--line); }
.chat input { flex: 1; }
.toast { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); background: #7a1f1f; color: #fff; padding: 0.6em 1em; border-radius: 10px; max-width: calc(100% - 2rem); z-index: 5; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4); }
.offline { background: #7a1f1f; color: #fff; text-align: center; padding: 0.3em; font-size: 0.85rem; }

.people { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 1rem; padding: 0; list-style: none; }
.people li { border: 1px solid var(--line); border-radius: 999px; padding: 0.25em 0.8em; }
.people li.off { opacity: 0.55; }
.people li small { color: var(--muted); margin-left: 0.3em; }
.linkbox { display: flex; gap: 0.5rem; margin-bottom: 0.6rem; }
.linkbox input { flex: 1; min-width: 0; }

/* The keepsake: a paper certificate, light on any game's background, sized to screenshot well. */
.souvenir { --paper: #f6ecd2; --pink: #2a221a; --pmuted: #6a5a48; --rule: #cdb98f; background: var(--paper); color: var(--pink); border-radius: 10px; padding: 1.4rem 1.1rem 1rem; margin: 0 auto 1rem; max-width: 34rem; text-align: center; box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6.5px var(--rule), inset 0 0 0 10px var(--paper), inset 0 0 0 11px var(--rule); }
.souvenir .crest { width: 5.5rem; height: 5.5rem; }
.souvenir .kicker { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem; color: var(--pmuted); margin: 0.5rem 0 0.2rem; }
.souvenir h2 { display: block; font-size: 1.9rem; margin: 0 0 0.3rem; padding: 0; color: var(--pink); }
.souvenir .byline { font-family: var(--display); font-style: italic; font-size: 1.05rem; margin: 0 auto 1rem; max-width: 26rem; }
.awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.5rem; margin: 0.8rem 0; text-align: left; }
.award { display: flex; gap: 0.6rem; align-items: flex-start; border: 1px solid var(--rule); border-radius: 10px; padding: 0.6em 0.7em; background: #fbf5e3; font-size: 0.95rem; }
.award img { width: 2.6rem; height: auto; flex: none; }
.award b { font-family: var(--display); display: block; color: #7a2c22; }
.souvenir table.timeline { text-align: left; }
.souvenir table.timeline td, .souvenir table.timeline th { border-bottom-color: var(--rule); }
.souvenir table.timeline th { color: var(--pmuted); font-weight: 600; }
.souvenir .closing { font-family: var(--display); font-style: italic; margin: 1rem 0 0.3rem; }
.souvenir .imprint { font-size: 0.8rem; letter-spacing: 0.04em; color: var(--pmuted); margin: 0.4rem 0 0; }
.souvenir .offer { color: var(--pmuted); margin: 0.8rem 0 0; }
table.timeline { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.timeline td, table.timeline th { text-align: left; padding: 0.3em 0.4em; border-bottom: 1px solid var(--line); }

/* Shared screen */
.tv { font-size: 1.35rem; }
.tv .room { max-width: none; }
.tv .msg { max-width: 60rem; }

@media (prefers-reduced-motion: no-preference) {
  .msg, .card { animation: rise 0.25s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } }
}

/* Shop and legal pages */
.brand { margin-bottom: 1rem; }
.wordmark { display: inline-block; background: #f6edd9; border-radius: 10px; padding: 0.2rem 0.6rem; line-height: 0; }
.wordmark img { width: 9.5rem; height: auto; display: block; }

/* Funmeister's own pages */
.site { max-width: 62rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
.site-head { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.site-head .wordmark img { width: 12rem; }
.site-head nav { gap: 1.2rem; }
.site-head nav a { color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; padding: 0.4em 0; }
.site-head nav a:hover { border-bottom-color: var(--accent); }
.site section { margin-bottom: 2.5rem; scroll-margin-top: 1rem; }
.site h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
.site h2 { font-size: 1.5rem; border-bottom: 2px solid var(--accent); padding-bottom: 0.25em; margin: 0 0 0.8em; }
.hero img, .title-card img { display: block; width: 100%; height: auto; }
.hero { background: #1c2f4a; color: #f6edd9; border-radius: 16px; overflow: hidden; border: 3px solid #d8b98a; }
.hero-text { padding: 1.3rem 1.2rem 1.5rem; max-width: 44rem; }
.hero a.button.primary { background: #f6edd9; color: #33231a; border-color: #f6edd9; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.steps li { counter-increment: step; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1rem 1rem 3.4rem; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 0.9rem; top: 0.9rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 700; display: grid; place-items: center; }
.title-card { background: var(--panel); border: 3px solid var(--accent); border-radius: 16px; overflow: hidden; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-bottom: 2rem; }
.title-card { align-items: center; }
/* The plain Funmeister title frame, used for every game. */
.title-frame { margin: 0; background: #1c2f4a; border-radius: 14px; padding: 0.55rem 0.55rem 0.6rem; box-shadow: inset 0 0 0 0.3rem #1c2f4a, inset 0 0 0 0.36rem #7f8ea3; display: flex; flex-direction: column; align-items: center; }
.title-frame .tf-title, .title-frame figcaption { background: #f6edd9; color: #1c2f4a; font-family: var(--display); border: 2px solid #c9d1dc; text-align: center; position: relative; z-index: 1; }
.title-frame .tf-title { font-size: clamp(1.15rem, 3.2vw, 1.6rem); font-weight: 600; padding: 0.1em 1.4em; border-radius: 6px; margin: 0.1rem 0 -0.5rem; }
.title-frame img { display: block; width: 100%; height: auto; border: 3px solid #c9d1dc; border-radius: 5px; }
.title-frame figcaption { font-style: italic; font-size: 0.95rem; padding: 0.1em 1.3em; border-radius: 999px; margin: -0.5rem 0 0; }
.title-card { border: 0; background: none; gap: 1.2rem; overflow: visible; }
.title-card-text { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.title-card-text { padding: 1.1rem 1.2rem 1.3rem; }
.title-card h3 { font-size: 1.6rem; margin-bottom: 0.1em; }
.facts { padding-left: 1.1em; margin: 0 0 1em; }
.facts li { margin-bottom: 0.2em; }
a.button { display: inline-block; border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 0.6em 1em; text-decoration: none; color: var(--ink); }
a.button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.foot { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 0.8rem; line-height: 1.8; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.8rem; letter-spacing: 0.08em; text-align: center; border: 2px dashed var(--accent); border-radius: 12px; padding: 0.5em; user-select: all; }
.legal h2 { margin-top: 1.3em; font-size: 1.1rem; }
.legal li { margin-bottom: 0.35em; }
.legal table td, .legal table th { vertical-align: top; }

/* One page per game */
a.plain { text-decoration: none; color: inherit; display: block; }
.genre-line { font-family: var(--display); font-weight: 600; color: var(--accent); margin: 0 0 0.8em; }
.title-card .row .coming { margin: 0; align-self: center; }
.coming { display: inline-block; padding: 0.2em 0.9em; border: 2px solid var(--accent); border-radius: 999px; color: var(--accent); font-family: var(--display); font-weight: 600; }
.game-page .title-card h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin-bottom: 0.1em; }
.genres, .ways { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.genres li, .ways li { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1rem; }
.genres li { border-top: 4px solid var(--accent); }
.genres strong, .ways strong { display: block; font-family: var(--display); font-size: 1.15rem; margin-bottom: 0.2em; }
.ways p { margin: 0.2em 0 0; }
.ways .soon { display: inline-block; font-size: 0.8rem; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 0.05em 0.7em; margin-bottom: 0.2em; }
.steps.flow { grid-template-columns: 1fr; }
.screens { display: flex; gap: 1.2rem; overflow-x: auto; padding: 0.4rem 0.2rem 1rem; scroll-snap-type: x proximity; }
.phone { flex: 0 0 15rem; margin: 0; scroll-snap-align: start; }
.phone-body { background: #1c1c1e; border-radius: 1.8rem; padding: 0.55rem; box-shadow: 0 6px 18px rgba(51, 35, 26, 0.25); }
.phone-screen { height: 26rem; overflow: hidden; border-radius: 1.3rem; background: #122820; }
.phone-screen img { display: block; width: 100%; height: auto; }
@media (min-width: 720px) { .screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem 2rem; overflow: visible; } .phone { max-width: 16rem; width: 100%; margin: 0 auto; } }
.phone figcaption, .tv figcaption { font-size: 0.95rem; margin-top: 0.6rem; }
.tv { margin: 1rem auto 0; max-width: 44rem; }
.tv-body { background: #1c1c1e; border-radius: 0.8rem; padding: 0.5rem; box-shadow: 0 6px 18px rgba(51, 35, 26, 0.25); }
.tv-body img { display: block; width: 100%; height: auto; border-radius: 0.3rem; }
.tv figcaption { text-align: center; }
.host { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; }
.host > div:last-child { flex: 1 1 18rem; }
.host h2 { border: 0; margin-bottom: 0.3em; padding: 0; }
.host-faces { display: flex; gap: 0.6rem; }
.host-faces img { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; background: #e9dcc0; border: 2px solid var(--accent); }
.waitlist h2 { border: 0; padding: 0; margin-bottom: 0.4em; }
.waitlist input[type="email"] { flex: 1 1 14rem; }
.waitlist .trap { position: absolute; left: -200vw; width: 1px; height: 1px; opacity: 0; }
