/* AI 우정 테스트: an exchange diary on a lavender gingham tablecloth. Pages are white with lavender rules and
   a pink margin line, bound with rings along the top; options are stickers stuck on at slight angles. The
   result is a game-style status window. One column on phones; from 980px the lobby splits in two and a diary
   puts its board beside the pages. */
/* --warn is the site alarm red darkened for small text on white (4.5:1). */
.friend-page { --rule: #DCD3FF; --margin-line: #F2A7C3; --lav-ink: #5B3FD1; --lav-tint: #F1ECFF; --ring: #E9E9E6; --warn: #B3261E; }
.friend-page .site-bar .site-header-inner,
.friend-page .site-footer.is-slim .site-footer-inner { max-width: 1104px; }
/* A pale cloth with large, low-contrast checks: the game colour stays for the cover, stickers and grade
   (2026-10-13: the first, full-lavender 28px gingham was too hard on the eyes; this is option B of four). */
.friend-page .site-main {
    background-color: #E6DFFF;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.4) 50%, transparent 50%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.4) 50%, transparent 50%);
    background-size: 44px 44px;
}
.diary [hidden] { display: none !important; }
.tabular { font-variant-numeric: tabular-nums; }

.diary { max-width: 600px; margin: 0 auto; padding: 22px 16px 56px; }

/* Buttons */
.btn-big, .btn-ink, .btn-lav, .btn-line {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 2px solid var(--ink);
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}
.btn-big { height: 60px; margin-top: 22px; background: var(--ink); color: var(--paper); font-size: 19px; letter-spacing: -0.02em; box-shadow: 0 5px 0 rgba(22, 22, 22, 0.28); }
.btn-ink { height: 52px; margin-top: 24px; background: var(--ink); color: var(--paper); font-size: 16px; }
.btn-lav { height: 54px; margin-top: 12px; background: var(--lavender); color: var(--ink); font-size: 17px; box-shadow: 0 4px 0 var(--ink); }
.btn-line { height: 52px; margin-top: 14px; background: var(--paper); color: var(--ink); font-size: 16px; }
.btn-small { flex: none; height: 46px; padding: 0 14px; border: var(--line); border-radius: 10px; background: var(--paper); font-size: 14px; font-weight: 900; cursor: pointer; }
.btn-text { display: block; margin: 10px auto 0; border: 0; background: none; padding: 6px 10px; font-size: 13.5px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-big:disabled, .btn-ink:disabled, .btn-lav:disabled { opacity: 0.4; cursor: default; box-shadow: none; }

.turnstile { margin-top: 16px; display: flex; justify-content: center; }
.turnstile:empty { display: none; }

/* Messages sit on white so they read on the gingham. */
.status { margin: 14px 0 0; padding: 10px 12px; background: var(--paper); border: var(--line); border-radius: 12px; font-size: 14px; font-weight: 800; line-height: 1.5; text-align: center; }
.status:empty { display: none; }
.fine { margin: 16px 0 0; text-align: center; font-size: 12.5px; font-weight: 800; }
.fine-muted { margin: 10px 0 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.fine-muted.left { text-align: left; }
.toast { margin: 0; text-align: center; font-size: 13px; font-weight: 800; }

/* Cards */
.card { background: var(--paper); border: var(--line); border-radius: 16px; padding: 16px; }
.card-strong { border-width: 2px; box-shadow: 4px 5px 0 var(--ink); padding: 18px 16px; }
.card-title { margin: 0 0 12px; font-size: 15px; font-weight: 900; }
.card-head { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -0.03em; }
.card-text { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--soft); }

/* A diary page: rules every 34px (lines sit on the bottom of each 34px row from the top padding), a margin
   line, rings above the top edge and a folded corner. */
.page {
    position: relative;
    margin-top: 14px;
    background-color: var(--paper);
    background-image:
        linear-gradient(90deg, transparent 38px, var(--margin-line) 38px, var(--margin-line) 40px, transparent 40px),
        repeating-linear-gradient(to bottom, transparent 0 33px, var(--rule) 33px 34px);
    background-position: 0 0, 0 30px;
    border: 1.5px solid var(--ink);
    border-radius: 8px 8px 0 8px;
    box-shadow: 5px 6px 0 var(--ink);
    padding: 30px 18px 24px 52px;
}
.rings { position: absolute; left: 0; right: 0; top: -13px; display: flex; justify-content: space-between; padding: 0 22px; pointer-events: none; }
.rings span { width: 10px; height: 26px; border: 2.5px solid var(--ink); border-radius: 6px; background: var(--ring); }
.curl {
    position: absolute;
    right: -1.5px;
    bottom: -1.5px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 34px 34px;
    border-color: transparent transparent var(--lav-tint) transparent;
    filter: drop-shadow(-2px -2px 0 var(--ink));
    pointer-events: none;
}
.page-head { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12px; font-weight: 800; line-height: 34px; }
.page-head span:first-child { color: var(--lav-ink); }
.page-note { margin: 0; font-size: 12.5px; font-weight: 700; line-height: 34px; color: var(--soft); }

/* Lobby */
.split { display: grid; gap: 26px; }
.split-right { display: grid; gap: 14px; align-content: start; }
.tag { margin: 0; display: inline-flex; align-items: center; gap: 8px; background: var(--paper); border: var(--line); border-radius: 999px; padding: 3px 12px 3px 3px; font-size: 13px; font-weight: 800; }
.tag span { background: var(--ink); color: var(--paper); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 900; }
.lobby-title { margin: 14px 0 0; font-size: 50px; font-weight: 900; letter-spacing: -0.055em; line-height: 1.05; }
.lobby-lead { margin: 12px 0 22px; font-size: 16px; line-height: 1.6; font-weight: 700; }

/* Writing on the lines: each label and each input is one 34px row. */
.field label { display: block; font-size: 13px; font-weight: 900; line-height: 34px; }
.ink-input {
    display: block;
    width: 100%;
    height: 34px;
    margin: 0;
    padding: 0 8px;
    border: 0;
    border-bottom: 2px solid var(--ink);
    border-radius: 6px 6px 0 0;
    background: rgba(241, 236, 255, 0.75);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 32px;
}
.ink-input::placeholder { color: #857C9E; font-weight: 600; }
.ink-input:focus { outline: none; background: var(--lav-tint); border-bottom-color: var(--lav-ink); box-shadow: 0 2px 0 var(--lav-ink); }
.ink-input.is-wrong { background: #FFE7E2; border-bottom-color: var(--alarm); }
#make-form .btn-big { margin-top: 18px; }
/* While the model writes, the page's rules shimmer. */
#make-form.is-writing { background-image:
        linear-gradient(90deg, transparent 38px, var(--margin-line) 38px, var(--margin-line) 40px, transparent 40px),
        repeating-linear-gradient(to bottom, transparent 0 33px, var(--lav-ink) 33px 34px); animation: writing 1.6s ease-in-out infinite; }
@keyframes writing {
    0%, 100% { background-position: 0 0, 0 30px; }
    50% { background-position: 0 0, 0 31px; }
}

.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14.5px; line-height: 1.55; }
.steps li { display: flex; gap: 10px; }
.steps b { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--lavender); border: var(--line); font-size: 12px; }

.mine { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mine a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: var(--line); border-radius: 12px; text-decoration: none; }
.mine a.is-open { border-style: dashed; }
.mine small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.mine strong { display: block; font-size: 15.5px; font-weight: 900; }
.mine b { flex: none; font-size: 20px; font-weight: 900; letter-spacing: -0.02em; }
.mine .pill { flex: none; background: var(--lavender); border: var(--line); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 900; }

/* One diary */
.chips { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; font-weight: 900; }
.chip { background: var(--paper); border: var(--line); border-radius: 999px; padding: 3px 12px; }
.chip-ink { background: var(--ink); color: var(--paper); }
.chip:empty { display: none; }
.book-title { margin: 12px 0 0; font-size: 32px; font-weight: 900; letter-spacing: -0.05em; line-height: 1.2; overflow-wrap: anywhere; }
.book-lead { margin: 8px 0 0; font-size: 15px; font-weight: 700; line-height: 1.6; }
.book-lead:empty { display: none; }
.book-grid { margin-top: 18px; display: grid; gap: 18px; }
.book-main, .book-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.book-actions { display: grid; gap: 12px; }
.book-actions .btn-big, .book-actions .btn-line { margin-top: 0; }

.note-box { margin: 0; padding: 10px 12px; background: var(--paper); border: 1.5px dashed var(--ink); border-radius: 12px; font-size: 13.5px; font-weight: 800; line-height: 1.55; }

/* Stickers: the four options. Pressed means "this is my answer". */
.stickers { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 12px 10px; }
.sticker {
    min-height: 46px;
    padding: 9px 16px;
    border: 1.5px solid var(--ink);
    border-radius: 12px;
    background: var(--paper);
    color: var(--ink);
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transform: rotate(var(--tilt, 0deg));
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.sticker:nth-child(4n + 1) { --tilt: -2deg; }
.sticker:nth-child(4n + 2) { --tilt: 2.5deg; }
.sticker:nth-child(4n + 3) { --tilt: 1deg; }
.sticker:nth-child(4n + 4) { --tilt: -1.5deg; }
.sticker:hover { transform: rotate(var(--tilt, 0deg)) translateY(-2px); }
.sticker[aria-pressed="true"] { padding: 8px 15px; border-width: 2.5px; background: var(--lavender); font-weight: 900; box-shadow: 3px 4px 0 var(--ink); }
.sticker[aria-pressed="true"]::after { content: " ✓"; }
.sticker:disabled { cursor: default; }

/* The owner's drafts: one small page per question. */
.drafting { display: grid; gap: 14px; }
.drafts { margin: 0; padding: 0; list-style: none; display: grid; gap: 22px; }
.dq.page { margin-top: 0; padding: 4px 14px 16px 52px; box-shadow: 4px 5px 0 var(--ink); background-position: 0 0, 0 4px; }
.dq.is-done { border-width: 2px; }
.dq-head { margin: 0; display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 800; line-height: 34px; color: var(--lav-ink); }
.dq-head .dq-ai { color: var(--muted); font-weight: 700; }
.dq-q { margin: 0; font-size: 19px; font-weight: 900; letter-spacing: -0.03em; line-height: 34px; }
.dq-hint { margin: 0; font-size: 12.5px; font-weight: 800; line-height: 34px; color: var(--muted); }
.dq.is-done .dq-hint { color: var(--lav-ink); }
.dq-skill { margin: 12px 0 0; font-size: 12.5px; font-weight: 700; color: var(--soft); }
.dq-skill b { color: var(--ink); font-weight: 900; }
.dq-tools { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.tool { min-height: 36px; padding: 0 12px; border: var(--line); border-radius: 999px; background: var(--paper); font-size: 13px; font-weight: 800; cursor: pointer; }
.tool:disabled { opacity: 0.4; cursor: default; }
.tool.is-ink { background: var(--ink); color: var(--paper); }
.dq-edit { margin-top: 10px; display: grid; gap: 8px; }
.dq-edit input { display: block; width: 100%; height: 42px; padding: 0 10px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; }
.dq-edit p { margin: 0; font-size: 12.5px; font-weight: 800; color: var(--warn); }
.dq-edit p:empty { display: none; }
.finish { text-align: center; }
.finish-count { margin: 0; font-size: 15px; font-weight: 800; }
.finish-count b { font-size: 22px; font-weight: 900; }
.finish .btn-big { margin-top: 12px; }

/* The owner sends the link. */
.link-row { margin-top: 14px; display: flex; gap: 8px; }
.link-box { margin: 0; flex: 1; min-width: 0; height: 46px; padding: 0 12px; border: var(--line); border-radius: 10px; background: var(--lav-tint); font-size: 13px; font-weight: 700; line-height: 43px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The cover a friend sees first. */
.cover { display: grid; gap: 16px; }
.cover-book {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 26px 20px 24px 46px;
    background: var(--lavender);
    border: 2px solid var(--ink);
    border-radius: 10px 18px 18px 10px;
    box-shadow: 6px 7px 0 var(--ink);
    text-align: center;
}
.cover-spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 26px;
    border-right: 2px solid var(--ink);
    border-radius: 8px 0 0 8px;
    background-color: var(--ink);
    background-image: radial-gradient(circle at 13px 50%, var(--ring) 0 4px, transparent 4.5px);
    background-size: 26px 26px;
}
.cover-kicker { margin: 0; font-size: 12.5px; font-weight: 900; letter-spacing: 0.3em; }
.cover-label { margin: 0; max-width: 100%; padding: 12px 18px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; font-size: 26px; font-weight: 900; letter-spacing: -0.04em; line-height: 1.25; overflow-wrap: anywhere; }
.cover-mark { width: 64px; height: 64px; margin-top: 4px; }
.cover-meta { margin: 0; font-size: 14px; font-weight: 900; }
.start label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 8px; font-size: 15px; font-weight: 900; }
.start label span { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.box-input { display: block; width: 100%; height: 54px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; }
.box-input::placeholder { color: #8A8A85; font-weight: 600; }
.start .btn-big { margin-top: 14px; }
#rename-text { margin: 0 0 10px; color: var(--warn); font-weight: 800; }

/* A friend's pages */
.quiz { display: grid; gap: 16px; }
.quiz-page { margin-top: 14px; }
.quiz-page.is-turn { animation: turn 0.32s ease-out; }
@keyframes turn {
    from { opacity: 0; transform: translateX(18px) rotate(0.8deg); }
    to { opacity: 1; transform: none; }
}
.quiz-no { margin: 0; font-size: 12px; font-weight: 800; color: var(--muted); line-height: 34px; }
.quiz-q { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -0.035em; line-height: 34px; overflow-wrap: anywhere; }
.quiz-ai { margin: 0; font-size: 12px; color: var(--muted); line-height: 34px; }
.quiz-ai:empty { display: none; }
.quiz .stickers { margin-top: 14px; }
.progress-head { margin: 0; display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 900; }
.segments { margin-top: 10px; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.segments span { height: 12px; border-radius: 3px; border: 1.5px dashed #9A9A94; }
.segments span.is-on { background: var(--lavender); border: 1.5px solid var(--ink); }
.segments span.is-here { border: 1.5px solid var(--ink); }

/* The status window: a friend's result, and the sample in the lobby. */
.status-window { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 5px 6px 0 var(--ink); overflow: hidden; }
.sw-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 900; letter-spacing: 0.06em; }
.sw-head > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.sw-head > span:first-child::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--lavender); }
.sw-tag { flex: none; background: var(--paper); color: var(--ink); border-radius: 999px; padding: 1px 10px; font-size: 11.5px; font-weight: 800; letter-spacing: 0; }
.sw-body { padding: 16px; display: grid; gap: 14px; }
.sw-body p { margin: 0; }
.sw-who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 16px; }
.sw-who b { font-weight: 900; overflow-wrap: anywhere; }
.sw-main { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.sw-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.sw-score span { width: 100%; font-size: 13px; font-weight: 900; }
.sw-score b { font-size: 76px; font-weight: 900; line-height: 0.92; letter-spacing: -0.045em; }
.sw-score small { font-size: 15px; font-weight: 800; color: var(--muted); }
.sw-grade { flex: none; display: grid; place-items: center; align-content: center; width: 78px; height: 84px; background: var(--lavender); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 3px 4px 0 var(--ink); }
.sw-grade span { font-size: 11px; font-weight: 900; }
.sw-grade b { font-size: 44px; font-weight: 900; line-height: 1; }
.sw-bar { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.sw-bar i { height: 12px; border-radius: 3px; border: 1.5px dashed #9A9A94; }
.sw-bar i.on { background: var(--lavender); border: 1.5px solid var(--ink); }
.sw-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.sw-title span, .sw-part { font-size: 12.5px; font-weight: 900; color: var(--muted); }
.sw-title b { background: var(--lav-tint); border: 1.5px solid var(--ink); border-radius: 8px; padding: 2px 10px; font-size: 18px; font-weight: 900; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.sw-line { font-size: 14.5px; font-weight: 700; line-height: 1.55; }
.sw-stats { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 14px; align-items: center; font-size: 13.5px; }
.sw-stats dt { font-weight: 800; }
.sw-stats dd { margin: 0; display: flex; gap: 5px; }
.pip { width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); }
.pip.is-on { background: var(--lavender); }
.sw-skills { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.sw-skills li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; background: var(--ink); color: var(--paper); border-radius: 999px; font-size: 13.5px; font-weight: 800; }
.sw-skills li::before { content: ""; width: 8px; height: 8px; background: var(--lavender); transform: rotate(45deg); }
.sw-none { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.sw-rank { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 12px; border-top: 1.5px dashed var(--ink); font-size: 14px; font-weight: 800; }
.sw-rank b { font-size: 18px; font-weight: 900; }
.status-window.is-sample .sw-score b { font-size: 60px; }
.status-window.is-sample .sw-grade { width: 66px; height: 72px; }
.status-window.is-sample .sw-grade b { font-size: 36px; }

.result { display: grid; gap: 14px; }
.result .btn-big { margin-top: 0; }
.result.is-reveal .sw-score b, .result.is-reveal .sw-grade { animation: rise 0.6s 0.25s ease-out both; }
.result.is-reveal .sw-bar i.on { animation: fill 0.3s ease-out both; animation-delay: calc(var(--i) * 70ms + 0.4s); }
.is-reveal .review li { animation: rise 0.35s ease-out both; animation-delay: calc(var(--i) * 60ms + 0.5s); }
@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
@keyframes fill {
    from { background: var(--paper); }
}

/* Marked answers (a friend's) and the answer key (the owner's). */
.review { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.review li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 12px; border: var(--line); border-radius: 12px; }
.rv-mark { width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); font-size: 13px; font-weight: 900; }
.rv-mark svg { width: 14px; height: 14px; }
.is-right .rv-mark { background: var(--lavender); }
.review p { margin: 0; }
.rv-q { font-size: 14.5px; font-weight: 900; line-height: 1.45; overflow-wrap: anywhere; }
.rv-a { margin-top: 4px !important; font-size: 13.5px; line-height: 1.55; }
.rv-a b { background: var(--lav-tint); border-radius: 4px; padding: 0 4px; font-weight: 900; }
.rv-a s { color: var(--muted); }
.rv-meta { margin-top: 4px !important; font-size: 12px; font-weight: 700; color: var(--muted); }

/* The board */
.board { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.board li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: var(--line); border-radius: 12px; }
.board.is-owner li { grid-template-columns: 30px minmax(0, 1fr) auto auto; }
.board li.is-me { background: var(--lav-tint); border-width: 2px; }
.board li.is-hidden { border-style: dashed; color: var(--muted); }
.board li.is-empty { display: block; border-style: dashed; font-size: 13.5px; font-weight: 700; color: var(--muted); text-align: center; }
.bd-rank { width: 30px; height: 30px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%; font-size: 13.5px; font-weight: 900; }
.bd-rank.is-top { background: var(--lavender); }
.bd-who { min-width: 0; }
.bd-who strong { display: block; font-size: 15px; font-weight: 900; overflow-wrap: anywhere; }
.bd-who small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.bd-score { font-size: 21px; font-weight: 900; letter-spacing: -0.02em; }
.bd-hide { min-height: 32px; padding: 0 10px; border: var(--line); border-radius: 999px; background: var(--paper); font-size: 12px; font-weight: 800; cursor: pointer; }

.notice-title { margin: 0; font-size: 19px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.4; }

/* Phones: one column in reading order: the page in hand first, then the board, then the long lists
   (the owner's answer key, a friend's marked answers), then the way out. */
@media (max-width: 979px) {
    .book-grid { display: flex; flex-direction: column; gap: 14px; }
    .book-main, .book-side { display: contents; }
    #board-box { order: 2; }
    #key, #review-box { order: 3; }
    .book-actions { order: 4; }
}

@media (min-width: 980px) {
    .diary { max-width: 1104px; padding: 36px 16px 64px; }
    .split { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); column-gap: 44px; align-items: start; }
    .lobby-title { font-size: 76px; }
    .lobby-lead { font-size: 18px; }
    .book-title { font-size: 44px; }
    .book-grid { margin-top: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); column-gap: 28px; align-items: start; }
    .quiz-q { font-size: 28px; line-height: 34px; }
    .sticker { font-size: 16.5px; }
}

@media (max-width: 380px) {
    .page { padding-left: 48px; padding-right: 14px; }
    .lobby-title { font-size: 44px; }
    .sw-score b { font-size: 64px; }
}

@media (prefers-reduced-motion: reduce) {
    .quiz-page.is-turn, #make-form.is-writing,
    .result.is-reveal .sw-score b, .result.is-reveal .sw-grade, .result.is-reveal .sw-bar i.on, .is-reveal .review li { animation: none; }
    .sticker { transition: none; }
}
