:root {
    color-scheme: light dark;
    --ink: #193637;
    --muted: #465d5c;
    --deep: #193c40;
    --paper: #fcfaf4;
    --line: #cbd7d0;
    --veil: #ffffffad;
    --rim: #ffffffb0;
    --shadow: 0 14px 36px -22px #29423f55;
    font: 100%/1.55 system-ui,-apple-system,sans-serif;
    color: var(--ink);
    background: var(--paper);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(ellipse at 90% 4%,#d4e9e5 0,transparent 54%),radial-gradient(ellipse at 0 90%,#f6e6d2 0,transparent 55%),var(--paper);
    min-height: 100vh;
}

a {
    color: inherit;
}

a:focus-visible,summary:focus-visible {
    outline: 3px solid #359392;
    outline-offset: 4px;
}

.shell {
    max-width: 79rem;
    margin: auto;
    padding: 0 clamp(1.25rem,5vw,5rem);
}

.top,footer,.top nav,footer nav,.brand {
    display: flex;
    align-items: center;
}

.top {
    min-height: 6rem;
    justify-content: space-between;
    gap: .75rem;
    border-bottom: 1px solid var(--line);
}

.brand,.top nav a,footer a,.primary {
    text-decoration: none;
}

.brand {
    gap: .67rem;
    font-weight: 720;
    letter-spacing: -.04em;
    font-size: 1.25rem;
}

.brand img {
    border-radius: 13px;
}

.top nav {
    gap: clamp(.6rem,2.5vw,2.1rem);
    font-size: .94rem;
}

.top nav>a:hover,footer a:hover {
    text-decoration: underline;
}

.languages {
    position: relative;
}

.languages summary,.primary,.contact {
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    cursor: pointer;
    font-weight: 630;
    min-height: 44px;
}

.languages summary {
    background: var(--veil);
    border: 1px solid var(--line);
    padding: .4rem .9rem;
    list-style: none;
}

.languages summary::-webkit-details-marker,.mode summary::-webkit-details-marker {
    display: none;
}

.languages summary span {
    font-size: 1.25rem;
}

.languages div {
    position: absolute;
    z-index: 5;
    right: 0;
    top: calc(100% + .5rem);
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(20rem,88vw);
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 1rem;
    padding: .6rem;
}

.languages div a {
    padding: .48rem;
    border-radius: .4rem;
}

.languages a:hover,.languages a[aria-current] {
    background: var(--line);
}

.hero {
    display: grid;
    grid-template-columns: .91fr 1.09fr;
    align-items: center;
    gap: clamp(2rem,5vw,5rem);
    padding: clamp(3.3rem,6vw,6rem) 0;
}

.hero h1,.reading h1,.game-section h2,.reading h2 {
    font-family: ui-serif,Georgia,"Songti SC","Noto Serif CJK SC",serif;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -.052em;
    text-wrap: balance;
    margin: 0;
}

.hero h1 {
    font-size: clamp(3rem,5.8vw,5.5rem);
}

.hero-text p {
    font-size: clamp(1.08rem,1.5vw,1.28rem);
    color: var(--muted);
    line-height: 1.6;
    max-width: 35rem;
    margin: 1.3rem 0 1.75rem;
}

.primary,.contact {
    background: var(--deep);
    color: #fff;
    padding: .72rem 1.6rem;
    text-decoration: none;
}

.primary:hover,.contact:hover {
    filter: brightness(1.18);
}

figure {
    margin: 0;
}

.hero-art {
    isolation: isolate;
    position: relative;
    border-radius: clamp(1.3rem,3vw,2.5rem);
    box-shadow: var(--shadow);
    background: #80bdbb;
}

.hero-art img,.mode img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3/2;
}

.hero-art img {
    border-radius: inherit;
}

.hero-art figcaption {
    position: absolute;
    bottom: 5%;
    left: 5%;
    max-width: 90%;
    border-radius: 1.4rem;
    background: #fffdf3ed;
    border: 1px solid #fff9;
    box-shadow: 0 4px 16px #153b3c20;
    backdrop-filter: blur(8px);
    color: #203c3e;
    padding: .45rem .95rem .45rem .55rem;
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 600;
    font-size: clamp(.86rem,1.2vw,1.03rem);
}

figcaption b {
    border-radius: 50%;
    width: 1.55rem;
    height: 1.55rem;
    background: #2b5657;
    color: white;
    display: grid;
    place-items: center;
    flex: none;
}

.game-section {
    border-top: 1px solid var(--line);
    padding: 2.6rem 0 3.2rem;
    scroll-margin: 1rem;
}

.game-section h2 {
    font-size: clamp(2rem,3.6vw,3.35rem);
    margin: 0 0 1.6rem;
}

.modes {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    align-items: start;
    gap: clamp(.8rem,1.7vw,1.5rem);
}

.mode {
    background: var(--veil);
    border: 1px solid var(--rim);
    border-radius: 1.35rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.mode summary {
    cursor: pointer;
    list-style: none;
}

.mode-label {
    position: relative;
    display: grid;
    gap: .25rem;
    padding: 1.25rem 3rem 1.35rem 1.2rem;
}

.mode-label:after {
    content: '+';
    position: absolute;
    right: 1.15rem;
    top: 1.15rem;
    font-size: 1.4rem;
    color: var(--muted);
}

.mode[open] .mode-label:after {
    content: '−';
}

.mode-label strong {
    font: 600 1.45rem/1.2 ui-serif,Georgia,serif;
}

.mode-label>span,.library,.mode p {
    color: var(--muted);
}

.mode p {
    margin: 0 1.25rem 1.5rem;
}

.library {
    max-width: 63rem;
    margin: 1.8rem 0 0;
}

.reading {
    max-width: 52rem;
    margin: clamp(2.25rem,5vw,4.5rem) auto;
    background: var(--veil);
    border: 1px solid var(--rim);
    border-radius: 1.8rem;
    padding: clamp(1.45rem,4vw,3.6rem);
    box-shadow: var(--shadow);
}

.reading h1 {
    font-size: clamp(2.55rem,5vw,4.1rem);
    margin-bottom: 1.8rem;
}

.reading h2 {
    font-size: 1.6rem;
    margin: 1.8rem 0 .55rem;
}

.reading p {
    line-height: 1.75;
}

.reading .contact {
    margin-top: .65rem;
    overflow-wrap: anywhere;
}

footer {
    gap: 1.2rem 2rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding: 1.6rem 0 2rem;
    font-size: .94rem;
}

footer nav {
    flex-wrap: wrap;
    gap: .65rem 1.4rem;
}

.footer-name {
    font-weight: 700;
    margin-right: auto;
}

footer>a {
    color: var(--muted);
}

@media(max-width:700px) {
    .top {
        min-height: 4.6rem;
    }
    .hero {
        grid-template-columns: 1fr;
        gap: 1.6rem;
        padding: 2.65rem 0 2.3rem;
    }
    .hero h1 {
        font-size: clamp(2.85rem,9vw,4.2rem);
    }
    .hero-text p {
        margin: .9rem 0 1.15rem;
    }
    .modes {
        grid-template-columns: 1fr;
    }
    .mode summary {
        display: grid;
        grid-template-columns: 36% 1fr;
        align-items: center;
    }
    .mode img {
        height: 100%;
        min-height: 7.5rem;
        object-fit: cover;
    }
    .mode p {
        padding-top: .7rem;
    }
    .game-section {
        padding: 1.8rem 0 2rem;
    }
    .brand {
        font-size: 1.05rem;
    }
    .brand img {
        width: 35px;
        height: 35px;
    }
    .top nav {
        gap: .65rem;
    }
    .languages summary {
        padding: .3rem .65rem;
    }
    .top .support-nav {
        display: none;
    }
    footer {
        align-items: flex-start;
        flex-direction: column;
        gap: .85rem;
    }
}

@media(prefers-color-scheme:dark) {
    :root {
        --ink: #eff7ef;
        --muted: #b8cbc5;
        --deep: #254b50;
        --paper: #15292a;
        --line: #3d5655;
        --veil: #263e3deb;
        --rim: #48605d;
        --shadow: 0 15px 30px -22px #0008;
    }
    body {
        background: radial-gradient(ellipse at 86% 10%,#294748 0,transparent 58%),var(--paper);
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto;
    }
}

.footer-name small {
    display: block;
    font-size: .875rem;
    font-weight: 400;
    color: var(--muted);
    margin-top: .25rem;
}
