/* Torkkelinmäen peliseura: "Pelipöytä".
   Rulebook paper on a hex board; cardboard chits for buttons; posts as game
   cards; colours from the crest (blue, yellow, red) and the flag (orange). */

@font-face { font-family: "Lilita One"; src: url("../fonts/lilita-one-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Bitter"; src: url("../fonts/bitter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Bitter"; src: url("../fonts/bitter-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Bitter"; src: url("../fonts/bitter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
    --orange: #f07d1a;
    --orange-deep: #c95d07;
    --blue: #0a5db8;
    --blue-deep: #073f7e;
    --yellow: #ffd21f;
    --red: #c8102e;
    --green: #2e8b57;
    --cream: #f8eedb;
    --paper: #fffaf0;
    --ink: #1d1a2b;
    --muted: #625a70;
    --line: #e5d5b5;
    --tag: var(--blue);
    --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
    --serif: "Bitter", Georgia, "Times New Roman", serif;
    --radius: 14px;
    --lift: 4px 4px 0 var(--ink);
    --lift-big: 7px 7px 0 var(--ink);
    --wrap: 1160px;
    --gh-font-heading: var(--display);
    --gh-font-body: var(--serif);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    font: 400 1.0625rem/1.65 var(--serif);
    background-color: var(--cream);
    /* Honeycomb board, drawn tile by tile */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34.64' height='60' viewBox='0 0 34.64 60'%3E%3Cpath d='M17.32 0L34.64 10V30L17.32 40L0 30V10ZM17.32 40V60' fill='none' stroke='%23ead9b8' stroke-width='1.2'/%3E%3C/svg%3E");
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--orange-deep); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.1; letter-spacing: .01em; margin: 0 0 .5em; }
.icon { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--ink); padding: .5em 1em; z-index: 100; }
.skip:focus { left: 1rem; }
.site-main { flex: 1; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

/* ---------- Chits: the cardboard buttons ---------- */
.chit {
    display: inline-flex; align-items: center; gap: .45em;
    font: 400 1rem/1 var(--display); letter-spacing: .02em;
    color: var(--ink); background: var(--paper);
    border: 2.5px solid var(--ink); border-radius: 10px;
    padding: .55em .9em; text-decoration: none; cursor: pointer;
    box-shadow: 3px 3px 0 var(--ink);
    transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.chit:hover { color: var(--ink); background: var(--yellow); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.chit:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.chit--big { font-size: 1.2rem; padding: .7em 1.15em; border-width: 3px; box-shadow: var(--lift); }
.chit--blue { background: var(--blue); color: #fff; }
.chit--blue:hover { background: var(--blue-deep); color: #fff; }
.chit--orange { background: var(--orange); color: #fff; }
.chit--orange:hover { background: var(--orange-deep); color: #fff; }
.chit--icon { padding: .5em .6em; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--blue);
    border-bottom: 4px solid var(--ink);
    box-shadow: 0 4px 0 var(--yellow);
}
.site-header__inner {
    max-width: var(--wrap); margin: 0 auto; padding: .55rem 1.25rem;
    display: flex; align-items: center; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; flex: none; }
.brand__crest { width: 56px; height: 56px; filter: drop-shadow(2px 2px 0 var(--ink)); transition: transform .3s; }
.brand:hover .brand__crest { transform: rotate(-8deg) scale(1.06); }
.brand__name {
    font: 400 1.35rem/1 var(--display); color: #fff;
    text-shadow: 2px 2px 0 var(--ink);
    display: flex; flex-direction: column;
}
.brand__name span + span { color: var(--yellow); font-size: .82em; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.site-nav .nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.site-nav .nav a {
    display: block; font: 400 .98rem/1 var(--display); letter-spacing: .02em;
    color: var(--ink); background: var(--paper); text-decoration: none;
    border: 2px solid var(--ink); border-radius: 8px; padding: .5em .7em;
    box-shadow: 2px 2px 0 var(--ink);
    transition: transform .12s, box-shadow .12s, background .12s;
}
.site-nav .nav a:hover { background: var(--yellow); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.site-nav .nav .nav-current a { background: var(--yellow); transform: rotate(-2deg); }
.site-nav__tools { display: flex; gap: .45rem; }
.chit--member { background: var(--orange); color: #fff; }
.chit--member:hover { background: var(--orange-deep); color: #fff; }
.nav-burger { display: none; margin-left: auto; width: 46px; height: 42px; cursor: pointer; border: 2.5px solid var(--ink); border-radius: 9px; background: var(--paper); box-shadow: 3px 3px 0 var(--ink); padding: 9px 8px; flex-direction: column; justify-content: space-between; }
.nav-burger span { display: block; height: 3px; background: var(--ink); border-radius: 2px; }

@media (max-width: 1120px) {
    .nav-burger { display: flex; }
    .site-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: .8rem;
        background: var(--blue-deep); padding: 1rem 1.25rem 1.25rem;
        border-bottom: 4px solid var(--ink);
    }
    .nav-toggle:checked ~ .site-nav { display: flex; }
    .site-nav .nav { flex-direction: column; }
    .site-nav .nav a { font-size: 1.15rem; padding: .75em .9em; }
}
@media (max-width: 420px) { .brand__name { font-size: 1.1rem; } .brand__crest { width: 46px; height: 46px; } }

/* ---------- Hero: the flag field ---------- */
.hero { position: relative; overflow: hidden; background: var(--orange); border-bottom: 4px solid var(--ink); }
.hero__field {
    position: absolute; inset: 0; opacity: .9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg opacity='.28'%3E%3Crect x='18' y='22' width='34' height='34' rx='7' fill='%23fff' transform='rotate(-14 35 39)'/%3E%3Cg fill='%23f07d1a' transform='rotate(-14 35 39)'%3E%3Ccircle cx='27' cy='31' r='3.4'/%3E%3Ccircle cx='35' cy='39' r='3.4'/%3E%3Ccircle cx='43' cy='47' r='3.4'/%3E%3C/g%3E%3Cpath transform='translate(128 18) scale(1.9)' fill='%230a5db8' d='M12 1.8a4.2 4.2 0 0 1 4.2 4.2c0 1.2-.5 2.3-1.3 3.1l5.3 1.8c1.3.5 2.2 1.2 2.2 2.3 0 1.1-1 1.7-2.2 1.7h-2.6l2.7 6.6c.3.7-.2 1.3-.9 1.3h-4.6L12 18.3l-2.8 4.5H4.6c-.7 0-1.2-.6-.9-1.3l2.7-6.6H3.8c-1.2 0-2.2-.6-2.2-1.7 0-1.1.9-1.8 2.2-2.3l5.3-1.8A4.2 4.2 0 0 1 12 1.8z'/%3E%3Cpath transform='translate(70 120) rotate(18 22 22)' fill='%23ffd21f' d='M22 0l19 11v22L22 44 3 33V11z'/%3E%3Cpath transform='translate(150 128) scale(1.5) rotate(-20 12 12)' fill='%23c8102e' d='M12 1.8a4.2 4.2 0 0 1 4.2 4.2c0 1.2-.5 2.3-1.3 3.1l5.3 1.8c1.3.5 2.2 1.2 2.2 2.3 0 1.1-1 1.7-2.2 1.7h-2.6l2.7 6.6c.3.7-.2 1.3-.9 1.3h-4.6L12 18.3l-2.8 4.5H4.6c-.7 0-1.2-.6-.9-1.3l2.7-6.6H3.8c-1.2 0-2.2-.6-2.2-1.7 0-1.1.9-1.8 2.2-2.3l5.3-1.8A4.2 4.2 0 0 1 12 1.8z'/%3E%3Crect x='10' y='150' width='30' height='30' rx='6' fill='%231d1a2b' transform='rotate(22 25 165)'/%3E%3Cg fill='%23fff' transform='rotate(22 25 165)'%3E%3Ccircle cx='19' cy='159' r='3'/%3E%3Ccircle cx='31' cy='159' r='3'/%3E%3Ccircle cx='19' cy='171' r='3'/%3E%3Ccircle cx='31' cy='171' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 25% 40%, rgba(255,255,255,.18), transparent 55%);
}
.hero__inner {
    position: relative; max-width: var(--wrap); margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 5rem) 1.25rem;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem);
}
.hero__crest img {
    width: clamp(170px, 24vw, 300px); height: auto; display: block;
    filter: drop-shadow(6px 6px 0 var(--ink));
    animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-8px); } }
.hero__title {
    font-size: clamp(2.6rem, 7vw, 5.2rem); color: #fff; margin: .15em 0 .2em;
    text-shadow: 3px 3px 0 var(--blue), 6px 6px 0 var(--ink);
    line-height: .98;
}
.hero__tagline { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--ink); font-weight: 700; max-width: 30ch; margin: 0 0 1.4rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.ribbon {
    display: inline-flex; align-items: stretch; margin: 0;
    font: 400 1rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase;
    transform: rotate(-2deg); filter: drop-shadow(3px 3px 0 var(--ink));
}
.ribbon span { background: var(--blue); color: #fff; padding: .55em 1em .5em 1.2em; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); }
.ribbon b { font-weight: 400; background: var(--yellow); color: var(--ink); padding: .55em 1.1em .5em .8em; clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 0 100%); }

/* ---------- The die ---------- */
.die-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 210px; }
.die { --s: 92px; background: none; border: 0; padding: 0; cursor: pointer; width: var(--s); height: var(--s); perspective: 600px; }
.die__cube {
    position: relative; display: block; width: 100%; height: 100%;
    transform-style: preserve-3d; transition: transform 1.1s cubic-bezier(.2, .9, .25, 1.15);
    transform: rotateX(-22deg) rotateY(28deg);
}
.die__face {
    position: absolute; inset: 0; background: var(--paper);
    border: 3px solid var(--ink); border-radius: 18px;
    display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 12px;
    box-shadow: inset -6px -6px 0 rgba(29, 26, 43, .08);
}
.die__face i { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); place-self: center; }
.die__face.f1 i { background: var(--red); width: 22px; height: 22px; grid-area: 2 / 2; }
.f2 i:nth-child(1) { grid-area: 1 / 1; } .f2 i:nth-child(2) { grid-area: 3 / 3; }
.f3 i:nth-child(1) { grid-area: 1 / 1; } .f3 i:nth-child(2) { grid-area: 2 / 2; } .f3 i:nth-child(3) { grid-area: 3 / 3; }
.f4 i:nth-child(1) { grid-area: 1 / 1; } .f4 i:nth-child(2) { grid-area: 1 / 3; } .f4 i:nth-child(3) { grid-area: 3 / 1; } .f4 i:nth-child(4) { grid-area: 3 / 3; }
.f5 i:nth-child(1) { grid-area: 1 / 1; } .f5 i:nth-child(2) { grid-area: 1 / 3; } .f5 i:nth-child(3) { grid-area: 2 / 2; } .f5 i:nth-child(4) { grid-area: 3 / 1; } .f5 i:nth-child(5) { grid-area: 3 / 3; }
.f6 i:nth-child(odd) { grid-column: 1; } .f6 i:nth-child(even) { grid-column: 3; }
.f1 { transform: translateZ(calc(var(--s) / 2)); }
.f6 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.f2 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.f5 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.f3 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.f4 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.die-says {
    margin: 0; min-height: 4.2em; text-align: center; font-weight: 700; font-size: .95rem; line-height: 1.35;
    background: var(--paper); border: 2.5px solid var(--ink); border-radius: 12px; padding: .6em .8em;
    box-shadow: 3px 3px 0 var(--ink); position: relative;
}
.die-says::before { content: ""; position: absolute; top: -10px; left: 50%; width: 16px; height: 16px; background: var(--paper); border-left: 2.5px solid var(--ink); border-top: 2.5px solid var(--ink); transform: translateX(-50%) rotate(45deg); }

@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .hero__tagline { margin-inline: auto; }
    .hero__actions { justify-content: center; }
    .die-wrap { width: min(260px, 100%); }
}

/* ---------- Next event: the board ---------- */
.board { padding: 0 1.25rem; margin-top: -1px; }
.board__inner {
    max-width: var(--wrap); margin: 2.5rem auto 0;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem;
    background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius);
    box-shadow: var(--lift-big); padding: 1.25rem 1.5rem;
    background-image: repeating-linear-gradient(90deg, transparent 0 46px, var(--line) 46px 48px);
    background-size: 100% 10px; background-repeat: no-repeat; background-position: bottom;
}
.board__label {
    font: 400 1.05rem/1 var(--display); text-transform: uppercase; letter-spacing: .1em;
    background: var(--red); color: #fff; padding: .7em .9em; border-radius: 10px; border: 2.5px solid var(--ink);
    transform: rotate(-3deg);
}
.board__event h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 .15em; }
.board__event h2 a { color: var(--ink); text-decoration: none; }
.board__event p { margin: 0; color: var(--muted); }
.board__count { display: flex; align-items: center; gap: .6rem; }
.board__tiles { display: flex; gap: .3rem; }
.board__tiles b {
    font: 400 2rem/1 var(--display); width: 1.4em; height: 1.6em; display: grid; place-items: center;
    background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 8px; box-shadow: 2px 2px 0 var(--ink);
}
.board__unit { font: 400 1.1rem/1.1 var(--display); max-width: 6em; }
@media (max-width: 760px) { .board__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

/* ---------- Deck of post cards ---------- */
.deck { max-width: var(--wrap); margin: 0 auto; padding: 3rem 1.25rem 1rem; }
.deck--page { padding-top: 2.5rem; }
.section-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.section-head h1, .section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0; text-shadow: 3px 3px 0 var(--yellow); }
.section-head p { margin: 0; color: var(--muted); font-style: italic; }
.deck__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 2rem 1.75rem; }
.deck__more { text-align: center; margin: 2.5rem 0 0; }

.tcard { --tilt: 0deg; transform: rotate(var(--tilt)); transition: transform .2s ease; }
.tcard:nth-child(3n+1) { --tilt: -1.1deg; }
.tcard:nth-child(3n+2) { --tilt: .7deg; }
.tcard:nth-child(4n+3) { --tilt: -.4deg; }
.tcard:hover { transform: rotate(0deg) translateY(-6px); z-index: 2; }
.tcard__link {
    height: 100%; display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
    background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius);
    box-shadow: var(--lift); overflow: hidden; position: relative;
    transition: box-shadow .2s;
}
.tcard:hover .tcard__link { box-shadow: 9px 10px 0 var(--ink); color: var(--ink); }
.tcard__link::before { /* tag-coloured band, like a card's suit stripe */
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px; background: var(--tag); z-index: 1;
    border-bottom: 3px solid var(--ink);
}
.tcard__img { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 3px solid var(--ink); background: var(--tag); }
.tcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; filter: saturate(1.05) contrast(1.03); }
.tcard:hover .tcard__img img { transform: scale(1.05); }
.tcard__body { padding: 1rem 1.1rem .4rem; flex: 1; }
.tcard--noimg .tcard__body { padding-top: 1.6rem; }
.tcard__top { display: flex; align-items: center; gap: .5rem; margin-bottom: .55rem; }
.tcard__tag {
    font: 400 .78rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
    color: #fff; background: var(--tag); padding: .35em .6em; border-radius: 6px; border: 2px solid var(--ink);
}
.tcard__star { color: var(--orange-deep); font-size: 1.2rem; line-height: 1; }
.tcard__lock { color: var(--red); margin-left: auto; }
.tcard__title { font-size: 1.45rem; margin: 0 0 .35rem; }
.tcard__excerpt { margin: 0; color: var(--muted); font-size: .97rem; }
.tcard__foot {
    display: flex; justify-content: space-between; align-items: center;
    padding: .6rem 1.1rem .8rem; font-size: .9rem; color: var(--muted);
    border-top: 2px dashed var(--line); margin-top: .6rem;
}
.tcard__year { /* the corner value, as on a playing card */
    font: 400 .95rem/1 var(--display); color: var(--ink);
    background: var(--cream); padding: .35em .55em; border-radius: 7px; border: 2px solid var(--ink);
}
.tcard--featured .tcard__link { border-color: var(--ink); box-shadow: var(--lift), 0 0 0 5px var(--yellow); }
@media (min-width: 900px) {
    .tcard--featured { grid-column: span 2; }
    .tcard--featured:not(.tcard--noimg) .tcard__link { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr auto; }
    .tcard--featured:not(.tcard--noimg) .tcard__img { grid-row: 1 / 3; aspect-ratio: auto; border-bottom: 0; border-right: 3px solid var(--ink); }
    .tcard--featured .tcard__body { padding-top: 1.6rem; }
    .tcard--featured.tcard--noimg .tcard__excerpt { font-size: 1.08rem; columns: 2; column-gap: 2rem; }
    .tcard--featured .tcard__title { font-size: 2.1rem; }
}

.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 3rem 0 1rem; }
.pager__info { font: 400 1.05rem/1 var(--display); color: var(--muted); }

/* ---------- Tiles under the deck ---------- */
.tiles { max-width: var(--wrap); margin: 2rem auto 0; padding: 1rem 1.25rem 4rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.tile {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 1rem; align-items: center;
    text-decoration: none; color: var(--ink); background: var(--paper); padding: 1.2rem 1.3rem;
    border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--lift);
    transition: transform .15s, box-shadow .15s;
}
.tile:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.tile b { font: 400 1.45rem/1.1 var(--display); }
.tile > span:last-child { color: var(--muted); grid-column: 2; }
.tile__icon { grid-row: 1 / 3; width: 58px; height: 58px; display: grid; place-items: center; border: 2.5px solid var(--ink); border-radius: 12px; font-size: 1.7rem; color: #fff; }
.tile--shelf .tile__icon { background: var(--green); }
.tile--trophy .tile__icon { background: var(--yellow); color: var(--ink); }
.tile--chest .tile__icon { background: var(--red); }

/* ---------- Box lid (tag & author headers) ---------- */
.lid { padding: 2.5rem 1.25rem 0; }
.lid__inner {
    max-width: var(--wrap); margin: 0 auto; padding: 2rem 2rem 1.6rem;
    background: var(--tag); color: #fff; border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--lift-big);
    background-image: radial-gradient(circle at 92% 20%, rgba(255,255,255,.22) 0 60px, transparent 61px),
        radial-gradient(circle at 85% 85%, rgba(0,0,0,.12) 0 90px, transparent 91px);
}
.lid__kicker { margin: 0; font: 400 .95rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.lid__title { font-size: clamp(2.4rem, 6vw, 4rem); margin: .2em 0 .15em; text-shadow: 3px 3px 0 var(--ink); }
.lid__desc { margin: 0 0 .6rem; font-size: 1.15rem; max-width: 60ch; }
.lid__count { display: inline-block; margin: 0; font: 400 1rem/1 var(--display); background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; padding: .4em .7em; }

/* ---------- Post / page: the rulebook ---------- */
.rulebook {
    max-width: 920px; margin: 2.5rem auto 1rem; background: var(--paper);
    border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--lift-big);
    padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.1rem, 5vw, 4rem) clamp(2rem, 5vw, 3.5rem);
    position: relative;
}
@media (max-width: 960px) { .rulebook { margin: 1.5rem .75rem; } }
.rulebook::before { content: ""; position: absolute; left: -3px; right: -3px; top: -3px; height: 14px; background: var(--tag); border: 3px solid var(--ink); border-radius: var(--radius) var(--radius) 0 0; }
.rulebook--page::before { background: var(--orange); }
.rulebook__head { text-align: center; margin-bottom: 2rem; }
.rulebook__tags { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-bottom: 1rem; }
.chip {
    font: 400 .8rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
    color: #fff; background: var(--tag); padding: .4em .65em; border-radius: 6px; border: 2px solid var(--ink);
}
.chip:hover { color: var(--ink); background: var(--yellow); }
.chip--gold { background: var(--yellow); color: var(--ink); }
.rulebook__title { font-size: clamp(2.1rem, 5.5vw, 3.6rem); margin: 0 0 .35em; }
.rulebook__lead { font-size: 1.25rem; color: var(--muted); }
.rulebook__meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem; color: var(--muted); margin: 0; font-size: .95rem; }
.pip { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); display: inline-block; }
.rulebook__photo { margin: 0 auto 2.25rem; max-width: 820px; transform: rotate(-.8deg); }
.rulebook__photo img { display: block; width: 100%; border: 10px solid #fff; outline: 3px solid var(--ink); box-shadow: 8px 8px 0 rgba(29, 26, 43, .25); }
.rulebook__photo figcaption { text-align: center; font-style: italic; color: var(--muted); margin-top: .9rem; }

.gh-content { max-width: 68ch; margin: 0 auto; font-size: 1.12rem; }
.gh-content > * + * { margin-top: 1.2em; margin-bottom: 0; }
.gh-content > :first-child { margin-top: 0; }
.post-template .gh-content > p:first-of-type::first-letter {
    float: left; font: 400 4.1em/.82 var(--display); color: var(--orange); margin: .06em .1em 0 0;
    text-shadow: 3px 3px 0 var(--ink);
}
.gh-content h2 { font-size: 2rem; margin-top: 1.8em; }
.gh-content h3 { font-size: 1.5rem; margin-top: 1.6em; }
.gh-content h2 + *, .gh-content h3 + * { margin-top: .5em; }
.gh-content ul, .gh-content ol { padding-left: 1.4em; }
.gh-content li + li { margin-top: .35em; }
.gh-content ul li::marker { content: "⬢  "; color: var(--orange); font-size: .8em; }
.gh-content blockquote:not(.kg-blockquote-alt) {
    margin-left: 0; margin-right: 0; padding: .9em 1.2em; font: 400 1.35rem/1.3 var(--display);
    background: var(--yellow); border: 3px solid var(--ink); border-radius: 12px; box-shadow: var(--lift); transform: rotate(-1deg);
}
.gh-content blockquote.kg-blockquote-alt { font: 400 1.7rem/1.3 var(--display); text-align: center; color: var(--blue); padding: 0 1em; }
.gh-content hr { border: 0; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='18'%3E%3Cpath d='M12 2l7.8 4.5v9L12 20 4.2 15.5v-9z' fill='%23f07d1a' stroke='%231d1a2b' stroke-width='2'/%3E%3Cpath d='M36 2l7.8 4.5v9L36 20l-7.8-4.5v-9z' fill='%230a5db8' stroke='%231d1a2b' stroke-width='2'/%3E%3Cpath d='M60 2l7.8 4.5v9L60 20l-7.8-4.5v-9z' fill='%23ffd21f' stroke='%231d1a2b' stroke-width='2'/%3E%3C/svg%3E") center / 72px 18px no-repeat; margin: 2.5em 0; }
.gh-content figure { margin-left: 0; margin-right: 0; }
.gh-content .kg-image-card img, .gh-content figure > img, .gh-content figure > a > img { display: block; margin: 0 auto; border: 8px solid #fff; outline: 3px solid var(--ink); box-shadow: 6px 6px 0 rgba(29, 26, 43, .22); }
.gh-content .kg-image-card:nth-of-type(odd) img { transform: rotate(.6deg); }
.gh-content .kg-image-card:nth-of-type(even) img { transform: rotate(-.6deg); }
.gh-content figcaption { text-align: center; font-style: italic; color: var(--muted); font-size: .95rem; margin-top: 1rem; }
.gh-content table { border-collapse: collapse; width: 100%; }
.gh-content th, .gh-content td { border: 2px solid var(--ink); padding: .45em .7em; }
.gh-content code { background: var(--cream); padding: .1em .35em; border-radius: 4px; }
.kg-width-wide { position: relative; width: min(1000px, 92vw); left: 50%; transform: translateX(-50%); max-width: none; }
.kg-width-full { position: relative; width: 100vw; left: 50%; transform: translateX(-50%); max-width: none; }
.kg-width-full img { border-left: 0 !important; border-right: 0 !important; }

/* Members-only: the locked chest (replaces Ghost's default call to action) */
.chest {
    text-align: center; margin: 2rem auto; max-width: 520px; padding: 2.2rem 1.5rem 1.8rem;
    background: #6b3f1d; color: #fff3dc; border: 3px solid var(--ink); border-radius: 18px 18px 12px 12px; box-shadow: var(--lift-big);
    background-image: repeating-linear-gradient(90deg, transparent 0 70px, rgba(0,0,0,.18) 70px 74px), linear-gradient(#7a4a22, #5c3415);
    position: relative;
}
.chest::before { content: ""; position: absolute; left: -3px; right: -3px; top: 62px; height: 14px; background: var(--yellow); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.chest__lid { width: 64px; height: 64px; margin: 0 auto 1.6rem; display: grid; place-items: center; font-size: 2.1rem; color: var(--ink); background: var(--yellow); border: 3px solid var(--ink); border-radius: 12px; position: relative; z-index: 1; }
.chest__title { font-size: 2rem; color: var(--yellow); text-shadow: 3px 3px 0 var(--ink); margin: 0 0 .3em; }
.chest p { margin: 0 0 1.2rem; }
.chest .chest__small { font-size: .9rem; opacity: .85; margin: 1.1rem 0 0; }
.gh-post-upgrade-cta { display: none; }

.talk { max-width: 68ch; margin: 3rem auto 0; padding-top: 2rem; border-top: 3px dashed var(--line); }

.moves { max-width: 920px; margin: 1.5rem auto 3.5rem; padding: 0 .75rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.move { display: block; text-decoration: none; color: var(--ink); background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; padding: 1rem 1.2rem; box-shadow: var(--lift); transition: transform .15s, background .15s; }
.move:hover { background: var(--yellow); color: var(--ink); transform: translate(-2px, -2px); }
.move small { display: block; color: var(--muted); font-size: .85rem; }
.move b { font: 400 1.2rem/1.2 var(--display); }
.move--next { text-align: right; grid-column: 2; }
@media (max-width: 640px) { .moves { grid-template-columns: 1fr; } .move--next { grid-column: 1; } }

/* ---------- Page widgets used inside HTML cards ---------- */
.tmp-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.tmp-game {
    --c: var(--blue); position: relative; display: flex; flex-direction: column; gap: .25rem;
    background: #fff; border: 2.5px solid var(--ink); border-radius: 10px; padding: 1.1rem .9rem .9rem; box-shadow: 3px 3px 0 var(--ink);
    border-top: 12px solid var(--c); font-size: .95rem;
}
.tmp-game b { font: 400 1.2rem/1.15 var(--display); }
.tmp-game__kind { font: 400 .72rem/1 var(--display); text-transform: uppercase; letter-spacing: .1em; color: var(--c); }
.tmp-game__note { color: var(--muted); font-style: italic; font-size: .88rem; line-height: 1.35; }
.tmp-game--own { --c: var(--orange); background: #fff6e8; }
.tmp-game--valloitus { --c: var(--red); }
.tmp-game--yhteis { --c: var(--green); }
.tmp-game--resurssi { --c: var(--blue); }
.tmp-game--seikkailu { --c: #6b3f9c; }
.tmp-game--mini { --c: var(--orange-deep); }

.tmp-trophies { display: grid; gap: 1.1rem; margin: 1.5rem 0; }
.tmp-trophy { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0 1rem; background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; padding: 1rem 1.1rem; box-shadow: 3px 3px 0 var(--ink); }
.tmp-trophy__year { grid-row: 1 / 3; font: 400 1.5rem/1 var(--display); background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50% 50% 12px 12px; display: grid; place-items: center; height: 4.6rem; }
.tmp-trophy--team .tmp-trophy__year { background: var(--orange); color: #fff; text-shadow: 2px 2px 0 var(--ink); }
.tmp-trophy__event { font: 400 1.25rem/1.2 var(--display); margin-bottom: .3rem; }
.tmp-trophy ul { margin: 0; padding-left: 1.1em; font-size: 1rem; }
.tmp-trophy .tmp-unknown { color: var(--muted); font-style: italic; list-style: "?  "; }

.tmp-houses { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.tmp-house { --c: var(--blue); display: flex; flex-direction: column; gap: .3rem; background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; padding: 1rem; box-shadow: 3px 3px 0 var(--ink); font-size: .95rem; }
.tmp-house b { font: 400 1.25rem/1.1 var(--display); }
.tmp-house span:last-child { color: var(--muted); }
.tmp-house__token { width: 36px; height: 36px; border-radius: 50%; background: var(--c); border: 2.5px solid var(--ink); box-shadow: inset 0 -5px 0 rgba(0,0,0,.2); }
.tmp-house--hame { --c: var(--red); }
.tmp-house--karjala { --c: var(--blue); }
.tmp-house--kymi { --c: var(--yellow); }
.tmp-house--uusimaa { --c: #b9b4ad; }

.tmp-trail { list-style: none; padding: 0 0 0 1.6rem; margin: 1.5rem 0; position: relative; }
.tmp-trail::before { content: ""; position: absolute; left: .55rem; top: .5rem; bottom: .5rem; border-left: 4px dotted var(--orange); }
.tmp-trail li { position: relative; padding: .3rem 0 .3rem .8rem; }
.tmp-trail li::before { content: ""; position: absolute; left: -1.45rem; top: .65rem; width: 16px; height: 16px; background: var(--paper); border: 3px solid var(--ink); border-radius: 50%; }
.tmp-trail li:last-child::before { background: var(--yellow); }
.tmp-trail b { font-family: var(--display); font-weight: 400; margin-right: .4rem; }

.tmp-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.tmp-album {
    display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 1; text-decoration: none; color: var(--ink);
    background: #fff; border: 2.5px solid var(--ink); padding: .7rem .7rem 1rem; box-shadow: 4px 4px 0 var(--ink);
    background-image: linear-gradient(135deg, var(--orange) 0 60%, transparent 60%), linear-gradient(var(--blue), var(--blue));
    background-size: calc(100% - 1.4rem) 62%; background-position: .7rem .7rem; background-repeat: no-repeat;
    transition: transform .15s;
}
.tmp-album:nth-child(3n+1) { transform: rotate(-2deg); } .tmp-album:nth-child(3n+2) { transform: rotate(1.5deg); }
.tmp-album:hover { transform: rotate(0) scale(1.04); color: var(--ink); }
.tmp-album__year { font: 400 1.6rem/1 var(--display); }
.tmp-album__name { font-size: .95rem; line-height: 1.25; }

/* ---------- 404 ---------- */
.fumble { max-width: 640px; margin: 4rem auto; padding: 0 1.25rem; text-align: center; }
.fumble__die { width: 130px; height: 130px; margin: 0 auto 1.6rem; background: var(--paper); border: 4px solid var(--ink); border-radius: 26px; box-shadow: var(--lift-big); display: grid; place-items: center; transform: rotate(-12deg); animation: tumble 1.2s cubic-bezier(.2, .9, .3, 1.3); }
.fumble__die i { width: 34px; height: 34px; border-radius: 50%; background: var(--red); }
@keyframes tumble { from { transform: translateY(-120px) rotate(-300deg); } to { transform: rotate(-12deg); } }
.fumble__kicker { font: 400 1rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0; }
.fumble__title { font-size: clamp(2.6rem, 8vw, 4.4rem); margin: .2em 0 .3em; text-shadow: 3px 3px 0 var(--yellow); }
.fumble p { font-size: 1.15rem; margin-bottom: 1.8rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #f3e9d6; margin-top: 2rem; }
.track { /* the scoring track around a board */
    height: 22px; border-top: 4px solid var(--ink);
    background: repeating-linear-gradient(90deg, var(--orange) 0 44px, var(--paper) 44px 48px, var(--blue) 48px 92px, var(--paper) 92px 96px, var(--yellow) 96px 140px, var(--paper) 140px 144px, var(--red) 144px 188px, var(--paper) 188px 192px);
}
.site-footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 2.2rem 1.25rem 2.6rem; display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: center; }
.site-footer__crest { display: flex; align-items: center; gap: 1.1rem; }
.site-footer__crest img { width: 84px; height: 84px; }
.site-footer__motto { font: 400 1.8rem/1 var(--display); color: var(--yellow); margin: 0 0 .3rem; }
.site-footer__small { margin: 0; opacity: .8; font-size: .95rem; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; }
.site-footer__nav .nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.site-footer a { color: #f3e9d6; }
.site-footer a:hover { color: var(--yellow); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .tcard, .tmp-album, .rulebook__photo, .gh-content img { transform: none !important; }
}
