:root {
    color-scheme: light;
    --ink: #332c35;
    --muted: #6c6169;
    --rose: #9e385f;
    --strong: #87334f;
    --border: #e9dfe2;
    --paper: #fffcfb;
    --pad: clamp(16px, 4vw, 60px);
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
    font-size: 16px;
    color: var(--ink);
    background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, summary { font: inherit; color: inherit; cursor: pointer; }
button { border: 0; }
:focus-visible { outline: 3px solid #ad426c; outline-offset: 3px; }
.wrap { width: min(1220px, calc(100% - var(--pad) * 2)); margin-inline: auto; }
.skip { position: absolute; z-index: 3; left: .5rem; top: -4rem; padding: .6rem; background: white; }
.skip:focus { top: .5rem; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: .6rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 850; font-size: 1.22rem; white-space: nowrap; }
.monogram {
    display: grid; place-items: center; width: 38px; height: 38px; background: var(--rose); border-radius: 12px;
    font-family: Georgia, serif; font-size: 1.7rem; font-weight: 800; font-style: italic; letter-spacing: -.15em;
    line-height: 1; color: white; padding: 0 .2em .17em 0; transform: rotate(-5deg);
}
nav { display: flex; gap: clamp(13px, 3vw, 42px); align-items: center; font-size: .94rem; font-weight: 650; }
nav a { display: inline-flex; align-items: center; min-height: 44px; }
nav a:hover, .sub-link:hover { color: var(--rose); }
nav .lottery-link { gap: .58rem; border: 1px solid #eac8d3; background: #fff1f4; padding: 0 1rem; color: var(--strong); border-radius: 100px; min-height: 38px; }
.ticket { display: block; position: relative; width: 17px; height: 12px; border: 1.5px solid currentColor; border-radius: 3px; transform: rotate(-11deg); }
.ticket::after { content: ""; display: block; position: absolute; right: 3px; height: 7px; top: 1px; border-right: 1.5px dashed currentColor; }
.hero {
    display: grid; grid-template-columns: .84fr 1.45fr; align-items: center; gap: clamp(24px, 4vw, 64px); isolation: isolate;
    position: relative; margin-top: clamp(18px, 2.9vw, 39px); overflow: hidden; padding: clamp(27px, 4vw, 64px);
    border: 1px solid #efccd7; border-radius: clamp(20px, 2.5vw, 32px);
    background: radial-gradient(ellipse at 82% 35%, #fffcf7 0, transparent 67%), linear-gradient(115deg, #fce1e8, #f9e6e8 50%, #f5d4de);
}
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(#c9839b 1px, transparent 1px) 0 0 / 9px 9px;
    opacity: .21; mask-image: linear-gradient(105deg, transparent 0%, #0004 30%, #000 100%);
}
.intro { position: relative; }
.wordmark { font: italic 700 clamp(.89rem, 1.4vw, 1.1rem) Georgia, serif; color: var(--rose); letter-spacing: .13em; }
h1, h2, h3, p, figure { margin: 0; }
.intro h1 { font-size: clamp(2.4rem, 4.95vw, 4.6rem); letter-spacing: -.05em; font-weight: 900; line-height: 1.18; margin: .55rem 0 .7rem; white-space: nowrap; color: #482b37; }
.intro h1 span { color: #cc6c88; }
.intro p { color: #674650; font-size: clamp(.94rem, 1.48vw, 1.13rem); font-weight: 550; }
.primary { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; margin-top: 1.5rem; padding: .7rem 1.2rem; background: #893554; color: white; border-radius: 100px; font-size: .96rem; font-weight: 700; transition: background .15s; }
.primary:hover { background: #6c2841; }
.art-mat {
    position: relative; justify-self: stretch; transform: rotate(-2deg); padding: 6px; background: #fffdf9; border: 1px solid #e5ccd3;
    border-radius: 5px; box-shadow: 0 9px 23px #86425b25, 0 2px 5px #86425b1a;
}
.art-mat::before, .art-mat::after {
    content: ""; position: absolute; z-index: 1; width: 48px; height: 17px; background: repeating-linear-gradient(100deg,#f8d996aa 0 4px,#f7d997cc 4px 8px);
    border-inline: 2px dotted #e5c27f; box-shadow: 0 1px 1px #8e5a7711;
}
.art-mat::before { left: 14px; top: -6px; transform: rotate(-17deg); }
.art-mat::after { right: 14px; bottom: -6px; transform: rotate(-14deg); }
.hero-art { display: block; width: 100%; height: auto; }
.section { margin-top: clamp(31px, 4vw, 58px); scroll-margin-top: 16px; }
.section-title, .picker-head, figcaption, .pager, .viewer-bar { display: flex; align-items: center; }
.section-title { justify-content: space-between; gap: 1.25rem; margin-bottom: 16px; }
.section-title h2 { font-size: clamp(1.46rem, 2.5vw, 2.05rem); font-weight: 820; letter-spacing: -.045em; }
.sub-link { font-size: .88rem; font-weight: 650; color: var(--muted); border-bottom: 1px solid #cdbec4; padding: .2rem 0; white-space: nowrap; }
.game-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(8px, 1.2vw, 16px); }
.game {
    display: flex; gap: .45rem; justify-content: space-between; align-items: center; min-width: 0;
    padding: clamp(14px, 1.8vw, 24px); min-height: clamp(96px, 9.5vw, 126px); border: 1px solid var(--rim);
    border-radius: 18px; background: linear-gradient(120deg, var(--tone), var(--pale)); color: var(--edge);
    transition: transform .18s, box-shadow .18s;
}
.game:hover { transform: translateY(-3px); box-shadow: 0 6px 15px #55304412; }
.mine { --tone: #fff0ed; --pale: #ffe7e5; --rim: #f3d1cb; --edge: #974540; --artbg: #fff7f5; }
.flip { --tone: #f2edfa; --pale: #eee3f5; --rim: #e2d4e9; --edge: #76588b; --artbg: #fcf6ff; }
.maze { --tone: #ecf4f0; --pale: #ddeee5; --rim: #d1e3d7; --edge: #3c7362; --artbg: #f4fcf6; }
.hex { --tone: #fff5e5; --pale: #faebd0; --rim: #eedecc; --edge: #94652e; --artbg: #fff9ed; }
.game-copy { display: grid; gap: .38rem; }
.game strong { color: var(--ink); font-size: clamp(1.02rem, 1.65vw, 1.37rem); font-weight: 800; white-space: nowrap; }
.game small { font-size: .85rem; color: #645a60; }
.game-art { display: grid; position: relative; flex: 0 0 auto; width: 51px; height: 51px; align-items: center; justify-content: center; }
.art-mine {
    grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); gap: 2px; padding: 3px;
    background: var(--artbg); border: 1.5px solid; border-radius: 5px; transform: rotate(-9deg); box-shadow: 3px 4px #ce989367;
}
.art-mine i { display: grid; place-items: center; align-self: stretch; border: 1px solid #d2948d; border-radius: 2px; font: 700 9px/1 system-ui; }
.art-mine i:empty { background: #dca09a; }
.art-flip i, .art-flip b { position: absolute; display: grid; place-items: center; border: 1.5px solid; border-radius: 5px; width: 31px; height: 43px; }
.art-flip i { background: #d3bfdc; left: 3px; top: 1px; transform: rotate(-20deg); }
.art-flip b { background: var(--artbg); right: 2px; bottom: 0; transform: rotate(9deg); box-shadow: 2px 3px #ae98bb70; }
.art-maze { border: 2px solid; border-radius: 4px; background: var(--artbg); transform: rotate(-8deg); box-shadow: 3px 4px #95b6a677; }
.art-maze i { position: absolute; inset: 6px 8px 10px 6px; border: 2px solid; border-left: 0; }
.art-maze i::before, .art-maze i::after { content:""; position:absolute; border:2px solid; }
.art-maze i::before { top: 6px; left:0; width: 19px; height: 10px; border-right: 0; }
.art-maze i::after { bottom: -9px; right: 4px; width: 5px; height: 11px; border-right: 0; border-bottom: 0; }
.art-maze b { width: 4px; height: 4px; background: #b8707a; position: absolute; left: 9px; bottom: 7px; }
.art-hex { transform: rotate(9deg); }
.art-hex i, .art-hex b { position: absolute; inset: 0; display: grid; place-items: center; clip-path: polygon(25% 2%,75% 2%,100% 50%,75% 98%,25% 98%,0 50%); }
.art-hex i { background: currentColor; }
.art-hex b { inset: 2px; font-size: 1.5rem; color: var(--edge); background: linear-gradient(45deg,#edd9a5,var(--artbg) 65%); }
.categories { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.categories button { padding: .51rem 1.15rem; border-radius: 50px; color: var(--muted); border: 1px solid var(--border); font-size: .94rem; background: white; min-height: 42px; white-space: nowrap; }
.categories button[aria-pressed="true"] { background: var(--strong); border-color: var(--strong); color: white; }
.catalog-body { display: grid; grid-template-columns: minmax(225px, .8fr) minmax(0,2.6fr); gap: 16px; align-items: start; }
.sheet-picker, .poster-card { background: white; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.picker-head { padding: 17px; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.picker-head span, .pager span { color: var(--muted); font-size: .86rem; }
.picker-head h3, figcaption h3 { font-size: 1rem; font-weight: 750; }
.sheet-list { padding: 7px; display: grid; gap: 2px; max-height: 490px; overflow: auto; }
.sheet-list button { background: transparent; text-align: left; padding: .75rem .8rem; min-height: 43px; font-size: .94rem; border-radius: 9px; }
.sheet-list button[aria-pressed="true"] { color: var(--strong); background: #fcecf1; font-weight: 700; }
.sheet-list button:hover, .categories button:not([aria-pressed="true"]):hover { background: #f9f2f4; }
figcaption { justify-content: space-between; gap: 12px; padding: 10px 16px; min-height: 53px; }
.pager { gap: .6rem; flex: 0 0 auto; }
.pager button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: white; font: 1.4rem/1 Georgia, serif; }
.pager button:disabled { color: #b6aab1; cursor: default; border-color: #f1e9ed; }
.poster-open { position: relative; display: grid; width: 100%; place-items: center; padding: 0; overflow: hidden; background: #f7f2f1; border-top: 1px solid var(--border); cursor: zoom-in; }
.poster-open img { display: block; width: 100%; height: auto; max-height: 76vh; object-fit: contain; }
.expand-tag { display: flex; align-items: center; gap: .4rem; position: absolute; right: 12px; top: 12px; background: #fffcfbf2; color: #54414b; border: 1px solid #e3d3d9; border-radius: 30px; padding: .42rem .67rem; font-size: .8rem; font-weight: 650; }
.expand-icon { width: 12px; height: 12px; border: 1.5px dashed currentColor; }
.footer { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; padding-block: 24px 42px; margin-top: 48px; border-top: 1px solid var(--border); color: var(--muted); }
.footer div { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.footer b { color: var(--strong); }
.footer span { font: .78rem system-ui,sans-serif; }
.footer details { max-width: 40rem; font-size: .85rem; }
.footer summary { width: max-content; margin-left: auto; min-height: 36px; }
.footer details p { line-height: 1.65; }
body.viewing { overflow: hidden; }
#viewer { width: min(1180px,96vw); height: 92vh; height: 92dvh; max-width: none; max-height: none; padding: 0; border: none; border-radius: 14px; background: #272328; color: white; overflow: hidden; }
#viewer::backdrop { background: #231d27c9; }
.viewer-wrap { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr); }
.viewer-bar { padding: 9px 14px; gap: 8px; background: #393139; }
.viewer-bar h2 { margin-right: auto; font-size: 1rem; }
.viewer-bar button { padding: .45rem .7rem; background: #fff8fa; color: #36252c; border-radius: 7px; font-size: .88rem; min-height: 38px; }
.viewer-stage { overflow: auto; min-height: 0; }
.viewer-stage img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.viewer-stage.full-size img { width: auto; max-width: none; height: auto; margin-inline: auto; cursor: zoom-out; }

@media (max-width: 900px) {
    .game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .game { padding: 18px 20px; }
    .catalog-body { grid-template-columns: minmax(165px,.75fr) minmax(0,2fr); }
    .intro h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
}
@media (max-width: 650px) {
    .nav { min-height: 58px; }
    .brand { font-size: 1rem; gap: .38rem; }
    .monogram { width: 30px; height: 30px; font-size: 1.4rem; border-radius: 9px; }
    nav { gap: 13px; font-size: .875rem; }
    nav .lottery-link { padding: 0 .65rem; gap: .35rem; }
    .hero { grid-template-columns: 1fr; gap: 24px; padding: 22px 21px 25px; }
    .intro h1 { margin: .25rem 0 .35rem; font-size: clamp(2.5rem,10vw,3.25rem); }
    .wordmark { font-size: .83rem; }
    .intro .primary { margin-top: .9rem; }
    .art-mat { margin-inline: 2px; padding: 4px; }
    .game { padding: 13px; min-height: 88px; border-radius: 13px; }
    .game-art { transform: scale(.80) rotate(-5deg); transform-origin: right center; width: 47px; height: 47px; }
    .game-copy { gap: .2rem; }
    .game small { font-size: .77rem; white-space: nowrap; }
    .categories { flex-wrap: nowrap; overflow-x: auto; margin: -3px -3px 10px; padding: 3px; }
    .categories button { padding: .4rem .86rem; }
    .catalog-body { grid-template-columns: minmax(0,1fr); gap: 10px; }
    .picker-head { display: none; }
    .sheet-list { display: flex; flex-wrap: nowrap; overflow-x: auto; padding: 4px; gap: 4px; }
    .sheet-list button { flex: 0 0 auto; padding-inline: .75rem; }
    .sheet-picker { border-radius: 12px; }
    .footer { gap: .8rem; flex-wrap: wrap; }
    .footer summary { margin-inline-start: 0; }
    #viewer { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; }
}
@media (max-width: 370px) {
    .game-art { display: none; }
    nav { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto; transition-duration: 0s !important; animation-duration: 0s !important; }
}
