:root {
    --ink: #26184a;
    --muted: #6d6490;
    --paper: #efeaff;
    --plum: #7a5cff;
    --gold: #f0b429;
    --surface: #fffdfa;
    --line: rgba(38, 24, 74, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--paper);
    min-height: 100dvh;
}

.wash {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 520px at 12% -8%, rgba(122, 92, 255, 0.28), transparent 58%),
        radial-gradient(700px 480px at 100% 8%, rgba(240, 180, 41, 0.18), transparent 52%);
}

.mark {
    position: fixed;
    z-index: 0;
    margin: 0;
    font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
    font-weight: 700;
    color: rgba(122, 92, 255, 0.07);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}
.mark-a { top: -8vw; right: -4vw; font-size: min(42vw, 280px); }
.mark-b { bottom: -10vw; left: -8vw; font-size: min(48vw, 320px); transform: rotate(-18deg); }

.sheet {
    position: relative;
    z-index: 1;
    overflow: visible;
    width: min(440px, calc(100% - 28px));
    margin: 84px auto 56px;
    padding: 8px 18px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 12px 18px 0 rgba(122, 92, 255, 0.12);
}

.intro {
    position: relative;
    padding: 8px 4px 18px 0;
    border-bottom: 1px solid var(--line);
    min-height: 132px;
}

.mascot {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 148px;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 10px 16px rgba(38, 24, 74, 0.12));
}

.brand {
    font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
    font-size: 15px;
    letter-spacing: 0.18em;
    color: var(--plum);
}

h1 {
    margin-top: 10px;
    max-width: 12em;
    font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
    font-size: clamp(28px, 7vw, 36px);
    font-weight: 700;
    line-height: 1.25;
}

.lesson {
    display: grid;
    gap: 12px;
    width: 100%;
    margin-top: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.lesson:focus-visible,
.scan:focus-visible,
.qq:focus-visible,
.close:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.phone {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    max-height: min(46vh, 380px);
    background: #1c1638;
    box-shadow: inset 0 0 0 8px #1c1638;
}
.phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    display: block;
}
.scrim {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(28, 22, 56, 0.55));
}
.play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    color: var(--ink);
    background: var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 8px 0 #c48a12;
}
.play svg { margin-left: 3px; }
.ribbon {
    position: absolute;
    left: 0;
    top: 18px;
    padding: 6px 12px 6px 10px;
    background: var(--gold);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}
.lesson-copy {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 0 2px;
}
.lesson-copy strong { font-size: 16px; }
.lesson-copy em {
    font-style: normal;
    color: var(--muted);
    font-size: 12px;
}

.actions {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}
.scan,
.qq {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    background: transparent;
    border: 1px solid var(--line);
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.scan img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    flex: none;
}
.scan strong,
.qq strong { display: block; font-size: 16px; }
.scan em {
    display: block;
    margin-top: 4px;
    font-style: normal;
    color: var(--muted);
    font-size: 12px;
}
.qq {
    justify-content: space-between;
    background: #1c1638;
    border-color: #1c1638;
    color: #f7f3ff;
}
.qq span { color: rgba(247, 243, 255, 0.62); font-size: 12px; }
.qq strong {
    font-family: "Songti SC", "STSong", "Noto Serif SC", ui-serif, serif;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(28, 22, 56, 0.82);
}
.overlay.active { display: grid; }
.video-box,
.qr-box {
    position: relative;
    width: min(420px, 100%);
    background: #000;
}
.video-box video {
    width: 100%;
    display: block;
    max-height: 82vh;
    background: #000;
}
.qr-box {
    background: var(--surface);
    padding: 36px 20px 18px;
    text-align: center;
}
.qr-box img { width: 100%; display: block; }
.qr-box p { margin-top: 12px; color: var(--muted); font-size: 13px; }
.close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    border: 0;
    padding: 6px 10px;
    background: var(--gold);
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.close.light { background: var(--ink); color: #fff; }

@media (max-width: 420px) {
    .sheet { width: calc(100% - 20px); margin-top: 20px; padding-right: 14px; }
    .mascot { width: 118px; top: -58px; right: -10px; }
    h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
