:root {
    --ink: #17241f;
    --muted: #3d4a44;
    --line: #e4ddd2;
    --paper: #f6f1e8;
    --card: #fffdf9;
    --pine: #14624f;
    --pine-deep: #0e3d32;
    --gold: #c9832a;
    --rose: #9d3b3b;
    --shadow: 0 16px 40px rgba(23, 36, 31, .08);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --shell: min(440px, 100%);
    font-family: "Segoe UI", "Avenir Next", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    background:
        radial-gradient(1200px 500px at 50% -10%, #d7ebe3, transparent 55%),
        var(--paper);
    color: var(--ink);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.phone {
    width: var(--shell);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: calc(18px + var(--safe-top)) 18px calc(92px + var(--safe-bottom));
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.phone:has(.top) {
    padding-top: calc(78px + var(--safe-top));
}

body.family-login {
    background: linear-gradient(to right, var(--theme-color-lite, #000956), var(--theme-color-dark, #003bca));
}
body.family-login .phone {
    justify-content: center;
    padding: 36px 14px calc(18px + var(--safe-bottom));
}
body.family-login .login-page { margin: 0; }
body.family-login .login-card {
    position: relative;
    overflow: visible;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 24px;
    box-shadow: 0 28px 60px rgba(8, 20, 45, .34);
    padding: 30px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform .22s ease;
    will-change: transform;
}
body.family-login .field input {
    font-weight: 700;
    font-size: 18px;
    color: #0b1220;
    letter-spacing: .02em;
}
body.family-login .field input::placeholder {
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0;
}
body.family-login .main-login-btn {
    position: absolute;
    top: -16px;
    right: 18px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #ffe14a;
    color: #111;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(17, 17, 17, 0.18);
}
body.family-login .main-login-btn svg {
    width: 14px;
    height: 14px;
}
body.family-login .main-login-btn:hover {
    color: #111;
    background: #ffd400;
}
body.family-login .hero {
    padding: 0;
    text-align: center;
    color: #17241f;
    background: transparent;
    border-radius: 0;
}
body.family-login .hero strong {
    font-size: 1.42rem;
    font-weight: 800;
    letter-spacing: .02em;
    color: #17241f;
}
body.family-login .slogan {
    display: block;
    margin-top: -2px;
    color: var(--theme-color-dark, #003bca);
    font-style: italic;
    font-size: 12px;
}
body.family-login h1 {
    margin: 6px 0 0;
    font-size: 22px;
    text-align: center;
}
body.family-login .lead { text-align: center; }
body.family-login .logo-plate {
    width: 104px;
    height: 104px;
    margin: 0 auto 8px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff, #eef2ff);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .2);
    padding: 4px;
}
body.family-login .logo-plate img { width: 88px; height: 88px; }
body.family-login .go {
    background: linear-gradient(to right, var(--theme-color-lite, #000956), var(--theme-color-dark, #003bca));
    border-radius: 14px;
    color: #fff;
}
body.family-login .texty,
body.family-login .ghost { color: var(--theme-color-dark, #003bca); }
body.family-login .field input:focus {
    outline: none;
    border-color: var(--theme-color-lite, #000956);
    box-shadow: 0 0 0 4px rgba(0, 9, 86, .12);
}
body.family-login .choice .badge {
    background: #eef2ff;
    color: var(--theme-color-dark, #003bca);
}
.logo-plate {
    width: 108px;
    height: 108px;
    margin: 0 auto 14px;
    border-radius: 32px;
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
}
.logo-plate img { width: 86px; height: 86px; object-fit: contain; }
.logo-plate.small { width: 46px; height: 46px; border-radius: 16px; margin: 0; box-shadow: none; }
.logo-plate.small img { width: 36px; height: 36px; }
.hero strong { display: block; font-size: 26px; letter-spacing: -.03em; }
.hero span { display: block; margin-top: 4px; color: #d7ebe4; font-size: 14px; }
.sheet-card {
    margin: -28px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.top {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    width: var(--shell);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(10px + var(--safe-top)) 18px 10px;
    background: rgba(246, 241, 232, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--pine-deep);
    color: #f4efe6;
    font-weight: 700;
    letter-spacing: .04em;
    flex: none;
}
.top strong { display: block; font-size: 16px; }
.top small, .quiet { color: var(--muted); }
h1 {
    margin: 8px 0 0;
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -.03em;
}
.lead { margin: 8px 0 0; color: var(--muted); line-height: 1.45; }

.choices, .stack { display: flex; flex-direction: column; gap: 12px; }
.choice, .ward, .video, .note, .day {
    width: 100%;
    text-align: left;
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 22px;
    padding: 16px;
    box-shadow: var(--shadow);
}
.choice {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 84px;
    padding: 14px 16px;
}
.choice .badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #e7f3ee;
    color: var(--pine-deep);
    font-weight: 700;
    flex: none;
}
.choice.parent .badge { background: #fff1df; color: #8a5a12; }
.choice b, .ward b, .video b, .note b { display: block; font-size: 18px; font-weight: 700; }
.choice span, .ward small, .video small, .note small, .day small {
    color: #24302b;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
}
.lead, .quiet, .alert-card p, .top small { color: #24302b; font-weight: 600; }
.choice i {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e7f3ee;
    color: var(--pine);
    font-style: normal;
    font-weight: 700;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; color: var(--muted); }
.field input {
    height: 54px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 0 16px;
    font-size: 17px;
}
.field input:focus { outline: 2px solid #b7ddd0; border-color: var(--pine); }
.go, .ghost, .texty {
    border: 0;
    border-radius: 16px;
    min-height: 52px;
    padding: 0 16px;
}
.go { background: var(--pine); color: white; font-weight: 700; }
.ghost, .texty { background: transparent; color: var(--pine-deep); }
.texty { min-height: 40px; }
.top .back-link {
    margin-left: auto;
    align-self: center;
    flex: none;
    border: 1px solid #c9d0cb;
    background: #fff;
    color: #17241f;
    font-weight: 700;
    border-radius: 14px;
    min-height: 40px;
    padding: 0 14px;
}
.confirm-card {
    width: min(408px, 100%);
    background: #fffdf9;
    color: #17241f;
    border-radius: 24px;
    padding: 22px 18px;
    max-height: calc(100dvh - 32px);
    overflow: auto;
}
.confirm-card b { display: block; font-size: 22px; }
.confirm-card p { margin: 8px 0 16px; color: #24302b; font-weight: 600; line-height: 1.4; }
.access-gate .go { width: 100%; }
.batch-gate .confirm-card { margin: 0; }
.batch-details { margin-top: 12px; }
.batch-details p { margin: 4px 0; color: #17241f; font-weight: 600; }
.batch-gate .go { width: 100%; margin-top: 10px; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions .ghost,
.confirm-actions .go { flex: 1; }
.error {
    margin: 0;
    color: var(--rose);
    background: #fdecec;
    border-radius: 14px;
    padding: 10px 12px;
}

.hello {
    position: relative;
    background: linear-gradient(to right, var(--theme-color-lite, #000956), var(--theme-color-dark, #003bca));
    color: #f7f3ea;
    border-radius: 28px;
    padding: 22px 20px 18px;
    box-shadow: var(--shadow);
}
.hello p { margin: 6px 0 0; color: #e7eefc; }
.hello-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hello-side {
    margin-left: auto;
    max-width: 48%;
    text-align: right;
}
.hello-campus {
    display: inline-block;
    max-width: 100%;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: #f7f3ea;
}
.hello.has-community h1,
.hello.has-community p {
    padding-right: 156px;
}
.hello-community {
    position: absolute;
    top: 56px;
    right: 20px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #128c4a;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    padding: 6px 10px;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .28);
}
.hello-community-icon {
    width: 14px;
    height: 14px;
    flex: none;
    display: block;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
    background: rgba(255,255,255,.14);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
}
.section-title { margin: 6px 2px 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.video, .note, .ward, .day { display: flex; gap: 12px; align-items: center; }
.thumb {
    width: 92px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    background: #d9e5df;
    flex: none;
}
.thumb.plain { display: grid; place-items: center; color: var(--pine-deep); font-size: 12px; font-weight: 700; }
.grow { flex: 1; min-width: 0; }
.ward b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video b, .note b {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}
.stage {
    position: relative;
    width: 100%;
    height: 300px;
    aspect-ratio: auto;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
}
.stage .frame, .stage video, .stage iframe { width: 100%; height: 100%; border: 0; background: #000; display: block; position: relative; z-index: 1; }
.shield { position: absolute; z-index: 8; background: transparent; pointer-events: auto; }
.top-border { top: 0; left: 0; width: calc(100% - 56px); height: 46px; }
.cog-side {
    top: 8px;
    right: 58px;
    width: 64px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    z-index: 6;
    cursor: default;
}
.share-bottom {
    left: 0;
    bottom: 0;
    width: 34%;
    height: 22%;
    min-width: 180px;
    min-height: 72px;
    z-index: 20;
    background: transparent;
    pointer-events: auto;
}
.logo-corner {
    right: 0;
    bottom: 0;
    width: 38%;
    height: 22%;
    min-width: 220px;
    min-height: 72px;
    z-index: 20;
    background: transparent;
    pointer-events: auto;
}
.fs-block {
    right: 0;
    bottom: 0;
    width: 48px;
    height: 48px;
    background: transparent;
    z-index: 7;
    pointer-events: none;
    cursor: default;
}
.yt-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
    background: #101613;
    color: #f6f1e8;
}
.yt-actions, .yt-tools {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 8px;
}
.yt-tools { grid-template-columns: 1fr 1fr; }
.yt-icon { display: grid; place-items: center; padding: 0; }
.yt-icon svg { width: 22px; height: 22px; display: block; }
.yt-scrub {
    display: flex;
    align-items: center;
    gap: 8px;
}
.yt-btn, .yt-speed {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #17241f;
    font-weight: 700;
    padding: 0 8px;
}
.yt-seek {
    flex: 1;
    min-width: 0;
    width: 100%;
    accent-color: #9ddec8;
}
.yt-time {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.yt-total::before { content: "/ "; }
.watch-page {
    height: calc(100dvh - 78px - var(--safe-top) - 92px - var(--safe-bottom));
    min-height: 0;
    overflow: auto;
}
.watch-side { display: contents; }
.watch-page .reader-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.reader {
    flex: 1;
    min-height: 0;
    height: auto;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
}
.pdf-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.live { color: var(--rose); font-weight: 700; font-size: 12px; letter-spacing: .06em; }

.dock {
    position: fixed;
    z-index: 12;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: var(--shell);
    display: flex;
    gap: 8px;
    padding: 10px 14px calc(10px + var(--safe-bottom));
    background: rgba(246, 241, 232, .92);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
}
.dock button {
    flex: 1;
    border: 0;
    background: transparent;
    border-radius: 14px;
    min-height: 48px;
    color: var(--muted);
}
.dock button.is-on, .dock button.is-back { background: #fff; color: #17241f; font-weight: 700; box-shadow: var(--shadow); }

.sheet {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(23, 36, 31, .46);
}
.player {
    width: min(var(--shell), 100%);
    background: #101613;
    color: white;
    border-radius: 24px 24px 0 0;
    padding: 12px 12px calc(16px + var(--safe-bottom));
}
.player header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.player header b { font-size: 15px; }
.player header button { border: 0; background: transparent; color: white; min-height: 40px; }
.frame, .player video {
    width: 100%;
    aspect-ratio: 16/9;
    border: 0;
    border-radius: 16px;
    background: black;
}
.ward-head h1 { margin-top: 0; }
.ward-head .chips { margin-top: 10px; }
.ward-head .chip {
    background: #fff;
    color: #17241f;
    border: 1px solid #d5ddd8;
    font-weight: 700;
}
.att-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 16px;
}
.att-main { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.att-status {
    display: inline-block;
    background: #e5f6ec;
    color: #0d6b3a;
    font-weight: 700;
    font-size: 13px;
    border-radius: 999px;
    padding: 4px 10px;
}
.att-main b { display: block; font-size: 17px; font-weight: 700; color: #17241f; }
.att-time { font-size: 18px; font-weight: 700; color: #17241f; white-space: nowrap; }
.att-row.att-today {
    border-color: #8ed4ae;
    background: #f3fbf6;
    animation: att-arrive .4s ease;
}
.att-today .att-status {
    animation: att-pulse 1.6s ease-in-out 3;
}
@keyframes att-arrive {
    from { opacity: .35; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
@keyframes att-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.perf-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.perf-metric {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 8px;
    text-align: center;
}
.perf-metric strong { display: block; font-size: 18px; color: #0b3f86; }
.perf-metric span { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; color: #24302b; }
.exam-card {
    background: #fff;
    border: 1px solid #d7e0ea;
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 12px 28px rgba(8, 20, 45, .08);
}
.exam-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.exam-kicker { display: block; font-size: 12px; font-weight: 700; color: #5b6b7c; letter-spacing: .04em; text-transform: uppercase; }
.exam-head b { display: block; margin-top: 2px; font-size: 18px; }
.exam-score { text-align: right; }
.exam-score strong { display: block; font-size: 28px; line-height: 1; color: #0b3f86; }
.exam-score span { font-size: 12px; font-weight: 700; color: #5b6b7c; }
.exam-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.exam-stat { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f7f9fc; border-radius: 12px; padding: 8px 10px; }
.exam-stat span { font-size: 12px; font-weight: 700; color: #24302b; }
.pill { display: inline-grid; place-items: center; min-width: 36px; border-radius: 999px; padding: 3px 8px; color: #fff; font-size: 13px; font-weight: 700; }
.pill.q, .pill.score { background: linear-gradient(135deg, #0056c7, #0072cc); }
.pill.ok { background: linear-gradient(135deg, #159a4a, #0d7a3c); }
.pill.bad { background: linear-gradient(135deg, #c62828, #e53935); }
.pill.miss { background: linear-gradient(135deg, #e69500, #f0ad4e); }
.pill.rank { background: linear-gradient(135deg, #1a1a1a, #333); }
.exam-subjects { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.exam-subject { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.exam-subject b { font-size: 13px; letter-spacing: .03em; }
.exam-pills { display: flex; gap: 4px; flex: none; }
.exam-foot {
    margin: 12px 0 0;
    background: #172033;
    color: #fff;
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
@media (min-width: 700px) {
    .stage {
        height: auto;
        aspect-ratio: 16 / 8.2;
        min-height: 300px;
    }
}
@media (min-width: 600px) {
    :root { --shell: 100%; }
    body.family-login { --shell: min(440px, 100%); }
    body:not(.family-login) .phone {
        padding-left: 22px;
        padding-right: 22px;
    }
    body:not(.family-login) .top,
    body:not(.family-login) .dock {
        left: 0;
        transform: none;
    }
}
@media (min-width: 1200px) {
    :root { --shell: min(1100px, calc(100% - 64px)); }
    body.family-login { --shell: min(440px, 100%); }
    body:not(.family-login) .top,
    body:not(.family-login) .dock {
        left: 50%;
        transform: translateX(-50%);
    }
    body:not(.family-login) .watch-page {
        height: auto;
    }
    body:not(.family-login) .watch-page .stage {
        width: 100%;
    }
    body:not(.family-login) .watch-page .reader {
        height: calc(100dvh - 230px - var(--safe-top) - var(--safe-bottom));
    }
}
@media (orientation: landscape) {
    :root { --shell: 100%; }
    body.family-login { --shell: min(440px, 100%); }
    body:not(.family-login) .phone {
        width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }
    body:not(.family-login) .phone:has(.watch-page:has(.stage)) {
        height: 100dvh;
        max-height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }
    body:not(.family-login) .top,
    body:not(.family-login) .dock {
        left: 0;
        width: 100%;
        transform: none;
    }
    body:not(.family-login) .watch-page:has(.stage) {
        flex: 1;
        display: grid;
        grid-template-columns: calc(80% - 6px) calc(20% - 6px);
        grid-template-rows: minmax(0, 1fr);
        column-gap: 12px;
        align-items: stretch;
        height: auto;
        min-height: 0;
        overflow: hidden;
    }
    body:not(.family-login) .watch-page:has(.stage) > .stage {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        height: 100%;
        min-height: 0;
        aspect-ratio: auto;
    }
    body:not(.family-login) .watch-page:has(.stage) > .stage iframe,
    body:not(.family-login) .watch-page:has(.stage) > .stage .frame,
    body:not(.family-login) .watch-page:has(.stage) > .stage video {
        position: absolute;
        inset: 0;
        z-index: 1;
        width: 100% !important;
        height: 100% !important;
    }
    body:not(.family-login) .watch-page:has(.stage) > .watch-side {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        overflow: hidden;
    }
    body:not(.family-login) .watch-side .watch-title {
        margin: 0;
        font-size: 22px;
        line-height: 1.15;
    }
    body:not(.family-login) .watch-side .watch-detail {
        margin: 0;
        font-size: 13px;
        line-height: 1.35;
    }
    body:not(.family-login) .watch-side .yt-controls {
        flex: 1;
        width: 100%;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 8px;
        gap: 8px;
        justify-content: flex-start;
        overflow: auto;
    }
    body:not(.family-login) .watch-side .yt-actions,
    body:not(.family-login) .watch-side .yt-tools {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    body:not(.family-login) .watch-side .yt-scrub {
        flex: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: 100%;
        margin-top: auto;
    }
    body:not(.family-login) .watch-side .yt-seek {
        writing-mode: horizontal-tb;
        direction: ltr;
        appearance: auto;
        width: 100%;
        height: 28px;
        min-height: 0;
        flex: none;
        margin: 0;
        accent-color: #9ddec8;
    }
    body:not(.family-login) .watch-side .yt-time {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        white-space: normal;
        text-align: center;
        font-size: 12px;
        line-height: 1.2;
    }
    body:not(.family-login) .watch-side .yt-total::before {
        content: "";
    }
    body:not(.family-login) .watch-side .yt-btn,
    body:not(.family-login) .watch-side .yt-speed {
        min-height: 36px;
        padding: 0 4px;
        font-size: 13px;
    }
}
@media (orientation: portrait) {
    .watch-page > .stage { order: 1; }
    .watch-page > .watch-title { order: 2; }
    .watch-page > .watch-detail { order: 3; }
    .watch-page > .yt-controls { order: 4; }
}
@media (prefers-reduced-motion: reduce) {
    .att-row.att-today,
    .att-today .att-status { animation: none; }
}
.empty {
    padding: 28px 8px;
    color: #24302b;
    font-weight: 600;
    text-align: center;
}
.alert-card {
    border-radius: 20px;
    padding: 14px;
    background: #fff8ee;
    border: 1px solid #f0d7b0;
}
.alert-card > b { display: block; font-size: 15px; letter-spacing: .02em; }
.alert-card p b { font-weight: 800; }
.alert-card p { margin: 8px 0 0; color: #24302b; font-weight: 600; line-height: 1.45; }
.fcm-token { word-break: break-all; font-size: 13px; }
.alert-card .alert-label { margin-top: 12px; }
.alert-card .alert-point { position: relative; margin: 6px 0 0; padding-left: 16px; }
.alert-card .alert-point::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8a5a12;
}
body:not(.family-login) .phone:has(.watch-page:has(.reader)) {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
}
body:not(.family-login) .watch-page:has(.reader) {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: hidden;
}
body:not(.family-login) .watch-page:has(.reader) > .reader-title {
    flex: none;
}
body:not(.family-login) .watch-page:has(.reader) > .reader {
    position: relative;
    flex: 1 1 0%;
    height: auto;
    min-height: 0;
    align-self: stretch;
}
body:not(.family-login) .watch-page:has(.reader) .pdf-frame {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}
body.ta-watch-fill:not(.family-login) .phone:has(.watch-page) {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    padding: 10px;
    overflow: hidden;
}
body.ta-watch-fill .top,
body.ta-watch-fill .dock {
    display: none;
}
body.ta-watch-fill:not(.family-login) .watch-page:has(.stage) {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(128px, 1fr);
    grid-template-rows: minmax(0, 1fr);
    column-gap: 12px;
    align-items: stretch;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
body.ta-watch-fill:not(.family-login) .watch-page:has(.stage) > .stage {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
}
body.ta-watch-fill:not(.family-login) .watch-page:has(.stage) > .watch-side {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
body.ta-watch-fill:not(.family-login) .watch-side .yt-controls {
    flex: 1;
    min-height: 0;
    overflow: auto;
}
