@font-face { font-family: "Portal Calligraphy"; src: url("/portal-assets/fonts/portal-calligraphy.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Portal Interface"; src: url("/portal-assets/fonts/portal-interface.woff2") format("woff2"); font-style: normal; font-weight: 650; font-display: swap; }
:root {
  color-scheme: dark;
  --sans: "Portal Interface", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --display: "Portal Calligraphy", "Ma Shan Zheng", "STKaiti", serif;
  --ink: #102328; --text: #fff6e5; --gold: #d9b574;
  font-family: var(--sans); font-synthesis: none; color: var(--text); background: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; -webkit-text-size-adjust: 100%; background: #102328 url('/portal-assets/tabletop.webp') center top / 1280px auto repeat-y; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #fff1ac; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.portal-shell { max-width: 1280px; margin: auto; padding: 10px 12px 14px; }
.portal-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.brand { display: grid; place-items: center; flex: 0 0 38px; width: 38px; aspect-ratio: 1; border: 1px solid var(--gold); outline: 1px solid #d9b57480; outline-offset: -4px; color: #f3d8a2; font: 30px/1 var(--display); }
.brand-copy { min-width: 0; }
.brand-name { margin: 0; font-size: 14px; line-height: 1.35; font-weight: 700; letter-spacing: .02em; }
.slogan { margin: 3px 0 0; color: #f4ead4; font-size: 12px; line-height: 1.35; font-weight: 650; text-wrap: pretty; }
.games { display: grid; gap: 12px; }
.game { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 10 / 9; border: 1px solid #e7bd6a; border-radius: 8px; background: #e8d3a8; color: #151b1b; box-shadow: 0 6px 16px #030b0e70; }
.game-art { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.game-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.game-frame { position: absolute; inset: 4px; border: 1px solid #efcf8acc; border-radius: 4px; z-index: 1; pointer-events: none; }
.game[data-game="avalon"] { text-shadow: 0 1px 2px #fff7e0, 0 0 4px #fff7e0; }
.game[data-game="avalon"]::before, .game[data-game="avalon"]::after {
  content: ""; position: absolute; z-index: 2; top: 0; bottom: 0; width: 7px;
  background: linear-gradient(90deg,#6d3910,#e8b958 38%,#fff0a5 55%,#a86b20 85%); border: 1px solid #e7bc66; border-block: 5px double #e7bc66; border-radius: 5px; pointer-events: none; box-shadow: 1px 0 3px #3c1c0c80;
}
.game[data-game="avalon"]::before { left: 0; } .game[data-game="avalon"]::after { right: 0; }
.game[data-game="mafia"] { color: #fff6e5; background: #102329; text-shadow: 0 1px 3px #000, 0 0 5px #000c; }
.game[data-game="mafia"] .game-frame { border-color: #d5b778cc; border-radius: 1px; }
.game[data-game="mafia"] .game-frame::before, .game[data-game="mafia"] .game-frame::after { content: ""; position: absolute; top: -4px; width: 7px; height: 25px; border: 2px solid #d4ba82; border-radius: 5px; transform: rotate(14deg); box-shadow: 1px 1px 2px #0008; }
.game[data-game="mafia"] .game-frame::before { left: 8px; } .game[data-game="mafia"] .game-frame::after { right: 8px; }
.content { position: absolute; z-index: 0; inset: auto 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; text-align: center; background: transparent; }
.content h2 { position: relative; margin: 0; font: 400 clamp(27px,7.8vw,34px)/1.1 var(--display); letter-spacing: .01em; text-wrap: balance; }
.game[data-game="avalon"] h2 { color: #8c160e; }
.game[data-game="avalon"] h2 .title-lead { color: #102126; }
.game[data-game="mafia"] h2 { font-size: clamp(35px,10vw,42px); }
.game[data-game="mafia"] h2::after { content: ""; position: absolute; height: 2px; width: 55%; bottom: 0; left: 42%; background: #af231f; transform: rotate(-10deg); }
.hook { margin: 0; font-size: clamp(14px,4.15vw,17px); line-height: 1.25; font-weight: 700; text-wrap: balance; }
.description { margin: 0; max-width: 34em; font-size: clamp(12px,3.6vw,14px); line-height: 1.4; font-weight: 650; text-wrap: pretty; }
.meta { position: relative; display: flex; align-items: center; justify-content: center; gap: 5px; margin: 1px 0; font-size: 12px; line-height: 1.3; font-weight: 650; font-variant-numeric: tabular-nums; }
.meta::before,.meta::after { content:""; width: 24px; height: 1px; background: currentColor; opacity: .45; }
.enter { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; width: 92%; min-height: 44px; padding: 7px 14px; background: linear-gradient(#9b2017,#6c0b09); color: #fff7e7; border: 1px solid #ffe0a0; border-radius: 9px; outline: 1px solid #967039; outline-offset: 2px; box-shadow: inset 0 0 0 2px #76231a, inset 0 0 0 3px #d5af64, 0 2px 5px #110a0680; text-decoration: none; text-shadow: none; font-size: 18px; line-height: 1.3; font-weight: 700; transition: transform 120ms ease; }
.game[data-game="mafia"] .enter { background: linear-gradient(#123c43,#06252d); box-shadow: inset 0 0 0 2px #123238, inset 0 0 0 3px #c4a05d, 0 2px 5px #0006; }
.enter-ornament { position: absolute; inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); color: #f2d291; stroke-width: .8px; pointer-events: none; }
.enter:hover { outline: 2px solid #ffe9b5; outline-offset: 2px; } .enter:active { transform: translateY(1px); } .game:focus-within { border-color: #fff0c4; }
.game--fallback { aspect-ratio: auto; background: #18363c; color: var(--text); text-shadow: none; }
.game--fallback .art { display: grid; place-items: center; height: 130px; color: var(--gold); }
.game--fallback .art svg { height: 100px; width: 110px; }
.game--fallback .content { position: relative; inset: auto; padding: 0 12px 12px; }
@media (max-width: 759px) { .game[data-game="avalon"] .game-art img { object-position: center -16px; } }
@media (min-width: 760px) {
  .portal-shell { padding: 20px 24px 24px; }
  .portal-header { gap: 14px; margin-bottom: 20px; }
  .brand { width: 50px; flex-basis: 50px; font-size: 38px; }
  .brand-name { font-size: 19px; } .slogan { font-size: 14px; margin-top: 4px; }
  .games { gap: 24px; }
  .game { aspect-ratio: 3.4 / 1; min-height: 0; border-radius: 4px; }
  .game-art img { object-fit: cover; object-position: center; }
  .game[data-game="avalon"]::before,.game[data-game="avalon"]::after { width: 12px; }
  .content { position: relative; inset: auto; width: 44%; height: 100%; min-height: 0; padding: 20px 16px 20px 34px; gap: 7px; align-items: flex-start; justify-content: center; text-align: left; }
  .content h2 { font-size: clamp(30px,4.2vw,59px); line-height: 1.05; white-space: nowrap; }
  .game[data-game="mafia"] h2 { font-size: clamp(45px,5.8vw,78px); }
  .hook { font-size: clamp(16px,1.8vw,25px); }
  .description { max-width: 28em; font-size: clamp(12px,1.3vw,17px); line-height: 1.45; }
  .meta { font-size: clamp(12px,1.25vw,16px); margin: 0; gap: 6px; }
  .meta::before,.meta::after { width: 28px; }
  .enter { margin-top: 3px; width: 90%; min-height: clamp(42px,3.6vw,52px); font-size: clamp(17px,1.7vw,23px); }
  .game--fallback { display: flex; }
  .game--fallback .art { width: 47%; height: auto; order: 1; }
  .game--fallback .content { padding-top: 20px; }
}
@media (min-width: 760px) and (max-width: 1000px) {
  .game { aspect-ratio: 3 / 1; }
  .content { padding: 12px 10px 12px 22px; gap: 4px; width: 47%; }
  .content h2 { font-size: 31px; }
  .game[data-game="mafia"] h2 { font-size: 46px; }
  .hook { font-size: 16px; }
  .description { font-size: 12px; }
  .meta { font-size: 11px; }
  .enter { min-height: 44px; padding: 5px 10px; font-size: 17px; }
}
@media (max-width: 359px) { .portal-shell { padding-inline: 8px; } .content { inset-inline: 12px; gap: 3px; } .meta { font-size: 10px; } .enter { min-height: 44px; font-size: 16px; } .slogan { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .enter { transition: none; } }
@media (forced-colors: active) { .game { background: Canvas; color: CanvasText; border: 1px solid CanvasText; text-shadow: none; } .game-art,.game-frame { display: none; } .game[data-game="avalon"] h2,.game[data-game="avalon"] h2 .title-lead { color: CanvasText; } .enter { background: ButtonFace; color: ButtonText; } }
