* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: #e5e8ef;
    color: #172137;
}

.app {
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    background: #fff;
    position: relative;
}

/* Hero (login) */
.hero {
    background: #20356f;
    padding: 70px 22px 38px;
    border-radius: 0 0 26px 26px;
}

.logo {
    color: #fff;
    font-size: 38px;
    font-weight: 800;
}

    .logo span {
        color: #72e0ea;
    }

.eyebrow {
    color: #c0d4fa;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 5px;
}

.hero-title {
    color: #fff;
    font-size: 27px;
    font-weight: 800;
    margin-top: 33px;
    line-height: 34px;
}

.hero-sub {
    color: #d1dafa;
    font-size: 13px;
    margin-top: 13px;
}

/* Common */
.body {
    padding: 21px;
}

.title {
    font-size: 26px;
    font-weight: 800;
    color: #16213d;
    margin: 10px 0 6px;
}

.muted {
    color: #6c7482;
    font-size: 13px;
    margin-bottom: 16px;
}

.row {
    display: flex;
    gap: 9px;
}

.prefix {
    border: 1px solid #d9dfea;
    border-radius: 11px;
    padding: 14px 12px;
    font-size: 15px;
}

.input {
    width: 100%;
    border: 1px solid #d9dfea;
    border-radius: 11px;
    padding: 13px 12px;
    font-size: 15px;
    color: #172137;
    outline: none;
}

    .input:focus {
        border-color: #304f9e;
    }

.otp {
    font-size: 28px;
    letter-spacing: 12px;
    text-align: center;
}

.hint {
    text-align: center;
    color: #116a47;
    margin-top: 10px;
    font-weight: 700;
}

.link {
    display: inline-block;
    color: #3d5ab0;
    font-size: 13px;
    font-weight: 700;
    margin-top: 14px;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
}

.center {
    display: block;
    text-align: center;
}

.error {
    color: #af283b;
    font-size: 13px;
    margin-top: 12px;
}

.notice {
    background: #fff1d2;
    border: 1px solid #edc778;
    color: #6b4a00;
    border-radius: 11px;
    padding: 12px;
    font-size: 13px;
    margin-top: 12px;
}

.btn {
    display: block;
    width: 100%;
    background: #304f9e;
    color: #fff;
    border: 0;
    border-radius: 11px;
    min-height: 50px;
    font-size: 15px;
    font-weight: 700;
    margin-top: 20px;
    cursor: pointer;
}

    .btn:disabled {
        opacity: .6;
    }

/* Inner pages */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top {
    background: #20356f;
    padding: 40px 22px 24px;
}

.logo.sm {
    font-size: 26px;
}

.hello {
    color: #cbd7fa;
    font-size: 12px;
    margin-top: 20px;
}

.top-title {
    color: #fff;
    font-size: 23px;
    font-weight: 800;
    margin-top: 4px;
}

    .top-title.mt {
        margin-top: 18px;
    }

.top-sub {
    color: #d1dcf7;
    font-size: 12px;
    margin-top: 4px;
}

.top-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-small {
    color: #c0d4fa;
    font-size: 11px;
    font-weight: 700;
}

.back {
    width: 34px;
    height: 34px;
    border-radius: 17px;
    background: #ffffff2b;
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.list {
    padding: 18px;
    flex: 1;
}

.head-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.head-text {
    font-weight: 800;
    font-size: 15px;
    color: #16213d;
}

.flex1 {
    flex: 1;
}

.item {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e0e3ee;
    border-radius: 13px;
    padding: 13px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.sym {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #e9eeff;
    color: #304e9b;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-title {
    font-size: 14px;
    font-weight: 800;
    color: #17213d;
    margin-bottom: 3px;
}

    .item-title.sm {
        font-size: 13px;
        font-weight: 700;
        margin: 4px 0 0;
    }

.arrow {
    font-size: 22px;
    color: #a0a9bd;
}

.bottom {
    position: sticky;
    bottom: 0;
    display: flex;
    border-top: 1px solid #e5e8ef;
    padding: 10px 0 16px;
    background: #fff;
}

.tab {
    flex: 1;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #68748a;
    text-decoration: none;
}

    .tab.active {
        color: #2b51b4;
    }

/* Chapter select */
.chk {
    display: none;
}

.check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1.5px solid #a0a9bd;
    color: transparent;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item:has(.chk:checked) {
    background: #f0f3ff;
    border-color: #617dca;
}

    .item:has(.chk:checked) .check {
        background: #3353a8;
        border-color: #3353a8;
        color: #fff;
    }

.footer {
    position: sticky;
    bottom: 0;
    padding: 16px;
    border-top: 1px solid #e5e8ef;
    background: #fff;
}

.nm {
    margin-top: 0;
}

/* Profile */
.label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #16213d;
    margin: 16px 0 7px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip input {
    display: none;
}

.chip span {
    display: inline-block;
    border: 1px solid #d9dfea;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
}

.chip input:checked + span {
    background: #304f9e;
    border-color: #304f9e;
    color: #fff;
}

.btn-outline {
    width: 100%;
    background: #fff;
    color: #af283b;
    border: 1px solid #af283b;
    border-radius: 11px;
    min-height: 46px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.pt0 {
    padding-top: 0;
}
/* Revision */
.rev {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.rtop {
    padding: 22px 20px 18px;
}

.between {
    justify-content: space-between;
}

.mt18 {
    margin-top: 18px;
}

.mt12 {
    margin-top: 12px;
}

.rlogo {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

    .rlogo span {
        color: #73dfe9;
    }

button.back {
    border: 0;
    cursor: pointer;
    font-size: 16px;
}

.rsub {
    color: #fff;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar {
    height: 6px;
    border-radius: 10px;
    background: #ffffff40;
    margin-top: 12px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    background: #46ccd6;
    transition: width .2s;
}

.rtabs {
    display: flex;
    border-bottom: 1px solid #e2e5eb;
}

.rtab {
    flex: 1;
    padding: 14px 4px;
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    font-size: 13px;
    font-weight: 700;
    color: #69717d;
    cursor: pointer;
}

    .rtab.on {
        border-bottom-color: #3657b9;
        color: #3056b6;
    }

.cards {
    flex: 1;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}

    .cards::-webkit-scrollbar {
        display: none;
    }

.cpage {
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 14px 14px 34px;
}

.paper {
    height: 100%;
    overflow-y: auto;
    border: 1px solid #e3e5e9;
    border-radius: 20px;
    padding: 20px;
    scrollbar-width: thin;
}

.crow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tag {
    background: #e7edff;
    color: #32559c;
    border-radius: 10px;
    padding: 7px 12px;
    font-weight: 800;
    font-size: 12px;
}

.small {
    color: #737985;
    font-size: 12px;
}

.bm {
    border: 1px solid #d7dce8;
    background: #fff;
    border-radius: 14px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    color: #283657;
    cursor: pointer;
}

    .bm.on {
        background: #fff1d2;
        border-color: #edc778;
        color: #815909;
    }

.ctitle {
    font-size: calc(23px * var(--fs, 1));
    line-height: 1.3;
    font-weight: 800;
    color: #111;
    margin: 12px 0 16px;
}

.cbody {
    font-size: calc(15px * var(--fs, 1));
    line-height: 1.6;
    color: #1d2433;
    text-align: justify;
}

    .cbody p {
        margin-bottom: 10px;
    }

    .cbody table {
        width: 100%;
        border-collapse: collapse;
        margin: 10px 0;
        font-size: .9em;
        text-align: left;
    }

    .cbody th, .cbody td {
        border: 1px solid #d9dfea;
        padding: 6px 8px;
        vertical-align: top;
    }

    .cbody th {
        background: #f0f3ff;
    }

.cload {
    color: #6c7482;
    padding: 30px 0;
    text-align: center;
}

.tip {
    margin-top: 14px;
    border: 1px solid #e0e4ec;
    background: #f7f8fb;
    border-radius: 11px;
    padding: 13px;
}

.tip-head {
    font-size: 11px;
    font-weight: 800;
}

.tip-text {
    margin-top: 6px;
    color: #1d2433;
    text-align: justify;
    font-size: calc(13px * var(--fs, 1));
    line-height: 1.55;
}

.actions {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.act {
    border: 1px solid #d7dce8;
    background: #fff;
    border-radius: 11px;
    padding: 13px;
    font-weight: 800;
    font-size: 13px;
    color: #283657;
    cursor: pointer;
}

    .act.imp {
        background: #fff1d2;
        border-color: #edc778;
        color: #815909;
    }

    .act.ldr {
        background: #e5f3ff;
        border-color: #9bd0ee;
        color: #165c97;
    }

    .act.rm {
        color: #ae4050;
    }

.note {
    position: absolute;
    top: 200px;
    left: 30px;
    right: 30px;
    background: #20356f;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 14px #0003;
}

    .note[hidden] {
        display: none;
    }

.note-link {
    background: none;
    border: 0;
    color: #73dfe9;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.rhint {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: #7a8191;
    font-size: 11px;
    pointer-events: none;
}

.empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
}

.empty-icon {
    font-size: 38px;
}

.empty-title {
    font-weight: 800;
    font-size: 15px;
    color: #16213d;
}

/* Text size (profile) */
.fs-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fs-btn {
    width: 44px;
    height: 40px;
    border: 1px solid #d9dfea;
    background: #fff;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
}

    .fs-btn:disabled {
        opacity: .4;
    }

.fs-preview {
    flex: 1;
    border: 1px solid #e0e4ec;
    border-radius: 10px;
    padding: 10px;
    color: #1d2433;
    text-align: justify;
}