@font-face {
    font-family: "Siyue Display";
    src: url("/assets/fonts/siyue-display.woff2") format("woff2");
    font-display: swap;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
body { margin: 0; background: var(--ink); color: var(--text); font: 1rem/1.75 var(--body); }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip {
    position: fixed;
    inset: .75rem auto auto .75rem;
    z-index: 20;
    padding: .5rem 1rem;
    color: var(--ink);
    background: var(--accent);
    transform: translateY(-200%);
}
.skip:focus { transform: translateY(0); }

/* The header shares the hero's first row so the film reaches the top edge. */
.homepage { display: grid; grid-template-columns: minmax(0, 1fr); }
.homepage > .site-header, .homepage > main { grid-area: 1 / 1; }
.homepage > .site-header {
    align-self: start;
    background: rgb(16 18 22 / 76%);
    border-color: rgb(211 208 197 / 24%);
}
.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: end;
    min-height: 100vh;
    min-height: 100svh;
    background: transparent;
}
.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(0deg, #101115ed, #11131733 36%, transparent 70%),
        linear-gradient(84deg, #101216db, #14171bad 24%, #161a212b 51%, transparent 72%);
}
.hero-inner {
    width: 100%;
    padding-block: max(7.5rem, 16vh) clamp(1.1rem, 3.5vh, 2.4rem);
}
.hero-content { width: fit-content; max-width: 100%; }
.bga-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    margin-top: clamp(1.6rem, 6vh, 4rem);
    padding-top: .65rem;
    border-top: 1px solid rgb(213 209 198 / 38%);
    color: #ece8df;
    font-size: .94rem;
}
.bga-caption a { color: inherit; text-underline-offset: .23em; }
.bga-caption a:hover { color: var(--accent); }
.hero-name {
    display: flex;
    align-items: baseline;
    width: fit-content;
}
.volume-word {
    --level: 0;
    /* The cap and baseline of Cinzel within the .9em line box. */
    --cap-top: .025em;
    --cap-height: .76em;
    position: relative;
    isolation: isolate;
    width: fit-content;
    font: 400 clamp(4.7rem, 10.7vw, 10.3rem)/.9 var(--title);
    letter-spacing: -.045em;
    margin-inline-start: -.064em;
}
.hero h1 {
    position: relative;
    font: inherit;
    letter-spacing: inherit;
    text-shadow: 0 0 2rem #080c1480;
}
.hero h1 > :first-child { color: var(--accent); }
.volume-ink {
    display: none;
    position: absolute;
    inset: 0;
    pointer-events: none;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    /* Keep the gold geometry and red maple leaves, cropping the printed plate name. */
    background: url("/assets/maimai/plate-6117.webp") left center / 125% 118% no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    clip-path: inset(0 0 calc(100% - var(--cap-top) - var(--cap-height) * var(--level)) 0);
}
.volume-word[data-ready] .volume-ink { display: block; }
.volume-word[data-edge="empty"] .volume-ink { visibility: hidden; }
.volume-word[data-edge="full"] .volume-ink { clip-path: none; }
.volume-surface {
    position: absolute;
    inset: var(--cap-top) 0 auto;
    height: var(--cap-height);
}
#title-volume {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    appearance: none;
    opacity: 0;
    writing-mode: vertical-lr;
    direction: ltr;
    cursor: ns-resize;
    touch-action: none;
}
#title-volume::-webkit-slider-runnable-track { width: 100%; height: 100%; }
#title-volume::-webkit-slider-thumb { appearance: none; width: 100%; height: 1px; }
#title-volume::-moz-range-track { width: 100%; height: 100%; }
#title-volume::-moz-range-thumb { width: 100%; height: 1px; border: 0; }
.volume-line {
    position: absolute;
    inset-inline: 0;
    top: calc(100% * var(--level));
    height: 1px;
    background: #f5efe3;
    box-shadow: 0 1px 2px #101217;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease;
}
.volume-value {
    position: absolute;
    inset: auto .18rem .3rem auto;
    padding: .14rem .35rem;
    background: #15171bec;
    color: #fff7e8;
    font: 600 .78rem/1 var(--body);
    font-variant-numeric: tabular-nums;
    letter-spacing: .03em;
}
#title-volume:focus-visible + .volume-line, #title-volume:active + .volume-line { opacity: 1; }
@media (hover: hover) {
    .volume-word:hover .volume-line { opacity: 1; }
}
@media (forced-colors: active) {
    .volume-word[data-ready] .volume-ink { display: none; }
    .volume-line { background: Highlight; forced-color-adjust: none; }
    .volume-value { color: HighlightText; background: Highlight; }
}
.name-secret {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-inline-start: clamp(-1rem, -1.1vw, -.5rem);
    padding: .25em .12em .25em clamp(.9rem, 2vw, 1.8rem);
    font: 400 clamp(1.15rem, 3vw, 2.6rem)/1 "Siyue Display", sans-serif;
    letter-spacing: .09em;
}
.secret-id {
    color: #e1e7f1;
    text-shadow: 0 1px 4px #10131c, 0 0 .38em #c4d6f65c;
    opacity: 0;
    transition: opacity .45s ease;
}
.name-secret:focus-visible { outline: 1px solid var(--accent); outline-offset: .15em; }
.name-secret:focus-visible .secret-id, .name-secret:active .secret-id { opacity: 1; }
@media (hover: hover) {
    .name-secret:hover .secret-id { opacity: 1; }
}
@media (hover: none) {
    .name-secret:focus .secret-id { opacity: 1; }
}
.hero-description { margin-top: 1.15rem; color: #f5f1e8; font-size: clamp(1rem, 2.4vw, 1.2rem); }

.panel { padding-block: clamp(3.5rem, 8vw, 7rem); background: rgb(17 19 23 / 44%); }
.homepage .panel { background: rgb(17 19 23 / 77%); }
.site-footer { background: rgb(17 19 23 / 80%); }
.panel + .panel { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: .45rem; margin-bottom: clamp(1.6rem, 4vw, 2.7rem); }
.section-head.split { grid-template-columns: 1fr auto; align-items: end; }
.section-head.split .section-index { grid-column: 1 / -1; }
.section-index {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--accent);
    font: 500 .82rem/1.4 var(--body);
    text-transform: uppercase;
    letter-spacing: .2em;
}
.section-index::before { content: ""; width: 1.7rem; height: 1px; background: #b0b1b3; }
.section-head h2, .page-title h1 {
    font: 400 clamp(2.35rem, 6vw, 4.75rem)/1.12 var(--title);
    letter-spacing: -.04em;
}
.section-link {
    width: fit-content;
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: .35em;
    font-size: .9rem;
}
.section-link:hover { color: var(--text); }
.entry-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.entry {
    min-height: 10.5rem;
    padding: 1.6rem clamp(1.05rem, 2.9vw, 2.4rem);
    text-decoration: none;
    display: grid;
    align-content: center;
    gap: .35rem;
    background: linear-gradient(135deg, #f5eddb0c, transparent 73%);
    transition: background-color .2s;
}
.entry + .entry { border-inline-start: 1px solid var(--line); }
.entry:hover { background-color: var(--surface); }
.entry h3 { font: 400 1.7rem/1.25 var(--title); }
.entry p, .quiet { color: var(--muted); }

.work-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
}
.work-caption { display: grid; justify-items: start; gap: .9rem; }
.work-caption h2, .work-caption h3 { font: 400 clamp(1.55rem, 3vw, 2.45rem)/1.35 var(--title); }
.video-frame {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    background: #1e2228;
    border: 1px solid #62666c;
}
.video-frame:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.video-frame iframe, .video-preview { display: block; width: 100%; height: 100%; border: 0; }
.video-preview img { width: 100%; height: 100%; object-fit: cover; }
.video-preview::after { content: ""; position: absolute; inset: 0; background: #080c1435; transition: background-color .2s; }
.video-preview:hover::after { background: #080c1410; }
.play {
    display: grid;
    place-items: center;
    width: clamp(3.1rem, 7vw, 4.6rem);
    aspect-ratio: 1;
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #e5dfd0b0;
    border-radius: 50%;
    background: #080c14d9;
}
.play::before {
    content: "";
    margin-inline-start: .18rem;
    border: solid transparent;
    border-width: .54rem 0 .54rem .8rem;
    border-left-color: var(--text);
}
.video-preview:hover .play { background: var(--accent); }
.video-preview:hover .play::before { border-left-color: var(--ink); }

.page-title {
    background: linear-gradient(90deg, #111317af, #14171b33 65%, transparent);
    border-bottom: 1px solid var(--line);
}
.page-title .wrap { padding-block: clamp(3.5rem, 9vw, 8.5rem); }
.page-title .section-index { margin-bottom: .65rem; }
.page-title p:not(.section-index) { max-width: 38rem; margin-top: .9rem; color: #e6e3dc; }

.game-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
    margin: 0;
    list-style: none;
    border: 1px solid var(--line);
}
.game-list li { min-width: 0; }
.game-list li + li { border-inline-start: 1px solid var(--line); }
.game-list a {
    min-height: 10rem;
    height: 100%;
    display: grid;
    grid-template-rows: 3.6rem auto;
    justify-items: center;
    align-items: center;
    align-content: center;
    gap: .6rem;
    padding: 1rem;
    background: linear-gradient(140deg, #f1ebdc10, #111a2710);
    color: var(--text);
    text-decoration: none;
}
.game-list a:hover { background-color: var(--surface); }
.game-list img { width: 10rem; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 4px #e0f2ff3b); }
.game-list img[src$="/arcaea.png"] { filter: drop-shadow(0 0 3px #d5ecffbc); }
.game-list strong { font: 600 1.02rem/1.3 var(--body); text-align: center; }

.rating {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .6rem 2rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.7rem;
}
.rating h2 { font: 400 2.1rem/1.25 var(--title); }
.rating strong { color: var(--accent); font-size: 1.9rem; margin-inline-start: .45rem; }
.plate-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.plate { background: var(--surface); border: 1px solid var(--line); padding: clamp(.65rem, 2vw, 1rem); }
.plate img { width: 100%; height: auto; }
.plate-info { display: flex; justify-content: space-between; gap: .5rem; margin-top: .55rem; }
.plate-info strong { font-weight: 600; }
.plate-info span { color: var(--accent); font-size: .88rem; }
.plate-info .confirmed { color: var(--amber); }

.record-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.record-list li, .contact-item {
    display: grid;
    grid-template-columns: minmax(7rem, 11rem) 1fr;
    gap: .5rem 1.5rem;
    align-items: baseline;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--line);
}
.record-label, .contact-item dt { color: var(--accent); font-size: .9rem; }
.contact-list { margin: 0; border-top: 1px solid var(--line); }
.contact-item dd { margin: 0; overflow-wrap: anywhere; }
.contact-item a { text-underline-offset: .3em; }
.contact-item a:hover { color: var(--accent); }

@media (max-width: 730px) {
    html { scroll-padding-top: 8rem; }
    .hero::before {
        background: linear-gradient(0deg, #101115f2 0%, #121418bf 30%, #16181c58 53%, transparent 78%);
    }
    .hero-inner { padding-block: 9rem max(1rem, env(safe-area-inset-bottom)); }
    .bga-caption { margin-top: 1.65rem; }
    .volume-word { font-size: clamp(4.85rem, 18vw, 8rem); }
    .hero-description { margin-top: 1.15rem; }
    .work-layout { grid-template-columns: 1fr; }
    .entry-list { grid-template-columns: 1fr; }
    .entry { min-height: 6.7rem; }
    .entry + .entry { border-inline-start: 0; border-top: 1px solid var(--line); }
    .game-list a { min-height: 7rem; padding: .6rem; grid-template-rows: 2.55rem auto; }
    .game-list strong { font-size: .88rem; }
    .plate-list { grid-template-columns: 1fr; }
}
@media (max-width: 410px) {
    .record-list li, .contact-item { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0s !important; }
}
