:root {
    --k: 1;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        Segoe UI,
        sans-serif;
    color: #eaf0ff;
    background: #070b15;
}
html.big {
    --k: 1.2;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: radial-gradient(circle at 25% -10%, #243c67 0, transparent 35%), #070b15;
    min-height: 100vh;
}
button,
input {
    font: inherit;
}
button {
    cursor: pointer;
}
.shell {
    max-width: 1180px;
    margin: auto;
    padding: 22px;
}
.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.topr {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 850;
    letter-spacing: 0.03em;
}
.logo {
    background-image: url('icon.png'); 
    background-color: #eaf0ff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #071121;
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    font-size: 22px;
}
.muted {
    color: #9aacca;
}
.tag {
    border: 1px solid #32415f;
    border-radius: 30px;
    padding: 7px 11px;
    font-size: 12px;
    color: #b7c9e8;
}
.layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr) 275px;
    gap: 16px;
}
.panel {
    background: #111a2d;
    border: 1px solid #27334d;
    border-radius: 19px;
    padding: 20px;
    box-shadow: 0 14px 36px #03081430;
}
.smallhead {
    color: #a9b9d7;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    font-weight: 750;
    margin: 0 0 13px;
}
.avatar {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    font-size: 38px;
    border-radius: 22px;
    background: linear-gradient(140deg, #304f82, #57478a);
    margin: 4px 0 12px;
}
.name {
    font-size: 24px;
    font-weight: 850;
    margin: 0;
    word-break: break-word;
}
.sub {
    color: #a7b8d3;
    font-size: calc(13px * var(--k));
    line-height: 1.55;
}
.divider {
    height: 1px;
    background: #293652;
    margin: 18px 0;
}
.metric {
    margin: 14px 0;
}
.metrictop {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #c8d5ec;
    margin-bottom: 7px;
}
.bar {
    height: 8px;
    border-radius: 20px;
    background: #26334e;
    overflow: hidden;
}
.fill {
    height: 100%;
    background: linear-gradient(90deg, #37b8be, #80e2c6);
    border-radius: 20px;
    transition: width 0.5s;
}
.fill.warn {
    background: linear-gradient(90deg, #f07a75, #ffd079);
}
.hud {
    display: none;
}
.gameheader {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}
.gameheader h1 {
    font-size: 24px;
    line-height: 1.15;
    margin: 5px 0;
}
.eyebrow {
    font-size: 12px;
    color: #78d7ef;
    font-weight: 800;
    letter-spacing: 0.1em;
}
.progress {
    height: 6px;
    background: #26334e;
    border-radius: 9px;
    margin: 12px 0 0;
    overflow: hidden;
}
.progress i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #6ed7ea, #9b90fa);
    transition: width 0.5s;
}
.chapter {
    display: inline-block;
    background: #2a2150;
    color: #d6ccff;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 750;
    margin: 14px 0 0;
}
.story {
    color: #c7d5ee;
    line-height: 1.7;
    font-size: calc(15px * var(--k));
}
.mail {
    margin: 17px 0;
    padding: 17px;
    background: #0b1426;
    border: 1px solid #314766;
    border-radius: 14px;
}
.mailhead {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #b9cbeb;
    font-weight: 750;
    font-size: 13px;
}
.mailicon {
    background: #24456a;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
}
.mail p {
    margin: 13px 0 0;
    color: #e3ecff;
    line-height: 1.65;
    white-space: pre-wrap;
    font-size: calc(15px * var(--k));
}
.mail .inline {
    line-height: 2.1;
}
.options {
    display: grid;
    gap: 10px;
}
.choice {
    color: #eaf0ff;
    background: #192740;
    border: 1px solid #385170;
    text-align: left;
    border-radius: 13px;
    padding: 14px 16px;
    line-height: 1.45;
    transition: 0.2s;
    font-size: calc(15px * var(--k));
}
.choice:hover,
.choice:focus-visible {
    background: #244064;
    border-color: #66cfe4;
    outline: none;
}
.choice.sel {
    background: #2a4d73;
    border-color: #8ee3f5;
}
.choice:disabled {
    opacity: 0.45;
    cursor: default;
}
.choice.right,
.choice.wrong {
    opacity: 1;
}
.choice.right {
    background: #12382d;
    border-color: #38b88f;
}
.choice.wrong {
    background: #3a2025;
    border-color: #c0606b;
}
.primary {
    background: linear-gradient(110deg, #6ed7ea, #9b90fa);
    color: #081328;
    border: 0;
    border-radius: 12px;
    padding: 13px 17px;
    font-weight: 850;
}
.primary:hover {
    filter: brightness(1.07);
}
.primary:disabled {
    opacity: 0.5;
}
.secondary {
    background: #1b2a45;
    color: #e1ecff;
    border: 1px solid #405476;
    border-radius: 12px;
    padding: 12px 16px;
}
.ghost {
    background: transparent;
    color: #bcd0f0;
    border: 1px solid #38496b;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
}
.ghost:hover {
    background: #1b2a45;
}
.actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.tools {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
}
.hintbox {
    color: #ffe2a6;
    font-size: 14px;
    line-height: 1.5;
    flex: 1 1 220px;
}
.notice {
    background: #132c33;
    border: 1px solid #316977;
    border-radius: 14px;
    padding: 16px;
    line-height: 1.65;
    margin-top: 15px;
    color: #ccebf0;
    animation: pop 0.35s;
    font-size: calc(15px * var(--k));
}
.notice.danger {
    background: #352127;
    border-color: #8f535e;
    color: #ffe1dd;
}
.notice.good {
    background: #12332a;
    border-color: #2f8a69;
    color: #c9f4e2;
}
.banner {
    background: #33270f;
    border: 1px solid #8c6a2c;
    color: #ffe8b8;
    border-radius: 13px;
    padding: 13px 15px;
    margin: 14px 0;
    line-height: 1.55;
    font-size: 14px;
    animation: pop 0.4s;
}
.lesson {
    background: #1b2547;
    border: 1px solid #4451a0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 14px;
    line-height: 1.6;
    color: #d9defa;
    font-size: calc(14px * var(--k));
}
.teacher {
    background: #2a2145;
    border: 1px dashed #7a63c9;
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 12px;
    line-height: 1.6;
    color: #e5dcff;
    font-size: calc(14px * var(--k));
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}
.chip {
    font-size: 12px;
    padding: 5px 9px;
    border-radius: 99px;
    background: #17314a;
    border: 1px solid #2b5a78;
}
.chip.up {
    color: #9bf0c6;
    border-color: #2e7a5c;
}
.chip.down {
    color: #ffb2aa;
    border-color: #8f4a46;
}
.reveal {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    gap: 7px;
    font-size: calc(13px * var(--k));
    line-height: 1.5;
    color: #c3d2ec;
}
.reveal li {
    padding: 8px 10px;
    background: #0c1528;
    border-radius: 10px;
    border: 1px solid #27395a;
}
.reveal li.ok {
    border-color: #2e7a5c;
}
.reveal li.no {
    border-color: #8f4a46;
}
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 14px;
    background: linear-gradient(160deg, #16294a, #1d2f58);
    border: 3px solid #dfe8fa;
    border-radius: 12px;
}
.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    background: #0d1729cc;
    color: #eaf0ff;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px 8px;
    font-size: calc(13px * var(--k));
    line-height: 1.35;
}
.tile .te {
    font-size: 30px;
}
.tile:hover {
    border-color: #66cfe4;
}
.tile.picked {
    border-color: #ff8d8d;
    background: #4a2431;
}
.frag {
    background: transparent;
    color: #e3ecff;
    border: 1px dashed #4a6285;
    border-radius: 7px;
    padding: 2px 5px;
    text-align: left;
    line-height: 1.5;
    margin: 2px;
}
.frag:hover {
    border-color: #66cfe4;
}
.frag.picked {
    background: #5a2b3a;
    border: 1px solid #ff8d8d;
}
.trow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #0d1729;
    border: 1px solid #2c4062;
    border-radius: 12px;
    margin-bottom: 9px;
    font-size: calc(15px * var(--k));
}
.sw {
    width: 52px;
    height: 30px;
    border-radius: 99px;
    border: 0;
    background: #33405c;
    position: relative;
    flex: none;
    transition: 0.2s;
}
.sw::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    transition: 0.2s;
}
.sw.on {
    background: #38b88f;
}
.sw.on::after {
    left: 25px;
}
.pwbox {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: calc(19px * var(--k));
    background: #0b1426;
    border: 1px solid #314766;
    border-radius: 12px;
    padding: 14px;
    margin: 10px 0;
    word-break: break-all;
    min-height: 52px;
}
.wchips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}
.wchip {
    background: #192740;
    color: #eaf0ff;
    border: 1px solid #385170;
    border-radius: 99px;
    padding: 9px 14px;
}
.wchip.on {
    background: #2a4d73;
    border-color: #8ee3f5;
}
.timer {
    height: 5px;
    background: #26334e;
    border-radius: 9px;
    overflow: hidden;
    margin-bottom: 12px;
}
.timer i {
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #f5c06a, #f07a75);
}
.log {
    display: grid;
    gap: 12px;
    max-height: 340px;
    overflow: auto;
}
.event {
    border-left: 2px solid #4c729a;
    padding: 0 0 0 12px;
    color: #b1c1de;
    font-size: 12px;
    line-height: 1.55;
}
.event b {
    color: #e4efff;
    display: block;
    margin-bottom: 3px;
}
.foot {
    text-align: center;
    font-size: 12px;
    color: #7f93b5;
    margin: 21px auto;
}
.center {
    max-width: 760px;
    margin: 36px auto;
}
.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.045em;
    margin: 20px 0;
}
.gradient {
    background: linear-gradient(90deg, #77def1, #a7a1ff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.intro {
    font-size: 18px;
    line-height: 1.7;
    color: #b9c8e3;
}
.input {
    display: block;
    width: 100%;
    background: #0b1425;
    border: 1px solid #3c5275;
    border-radius: 12px;
    color: white;
    padding: 13px;
    margin: 8px 0 16px;
}
.input:focus {
    outline: 2px solid #78d9ee;
}
.avs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0 18px;
}
.av {
    font-size: 28px;
    width: 54px;
    height: 54px;
    border-radius: 15px;
    background: #192740;
    border: 2px solid #385170;
}
.av.on {
    border-color: #8ee3f5;
    background: #2a4d73;
}
.reportgrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.reportcard {
    background: #0c1528;
    border: 1px solid #2b3e5f;
    border-radius: 13px;
    padding: 15px;
}
.reportcard h3 {
    margin: 0 0 8px;
    font-size: 15px;
}
.reportcard p {
    margin: 0 0 8px;
    font-size: calc(13px * var(--k));
    line-height: 1.6;
    color: #aebfdb;
}
.pill {
    display: inline-block;
    background: #243951;
    color: #b9e4f0;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 11px;
    margin-bottom: 8px;
}
.ending {
    font-size: 32px;
    margin: 0 0 8px;
}
.list {
    line-height: 1.8;
    color: #b8c8e4;
    padding-left: 19px;
    font-size: calc(14px * var(--k));
}
.statnums {
    display: flex;
    gap: 15px;
    color: #b3c7e4;
    font-size: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.statnums b {
    color: #e7f5ff;
}
.badges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 9px;
    margin-top: 10px;
}
.badge {
    background: #0d1729;
    border: 1px solid #2c4062;
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    opacity: 0.4;
    filter: grayscale(1);
}
.badge span {
    font-size: 28px;
    display: block;
}
.badge small {
    font-size: 11px;
    color: #b9cbeb;
}
.badge.on {
    opacity: 1;
    filter: none;
    border-color: #8ee3f5;
}
.badge.fresh {
    box-shadow: 0 0 0 2px #ffd079;
}
.modal {
    position: fixed;
    inset: 0;
    background: #030812cc;
    display: grid;
    place-items: center;
    padding: 16px;
    z-index: 50;
}
.modalbox {
    background: #111a2d;
    border: 1px solid #3a4c70;
    border-radius: 19px;
    padding: 22px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}
.modalbox h2 {
    margin: 0 0 14px;
}
.toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    background: #1d2f58;
    border: 1px solid #66cfe4;
    color: #fff;
    border-radius: 99px;
    padding: 11px 18px;
    z-index: 60;
    font-size: 14px;
    animation: pop 0.3s;
    max-width: 90vw;
}
@keyframes pop {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
html.calm * {
    transition: none !important;
    animation: none !important;
}
@media (max-width: 950px) {
    .layout {
        grid-template-columns: 230px minmax(0, 1fr);
    }
    .right {
        grid-column: 1/-1;
    }
    .log {
        max-height: 200px;
    }
}
@media (max-width: 650px) {
    .shell {
        padding: 12px;
    }
    .layout {
        display: flex;
        flex-direction: column;
    }
    .panel {
        padding: 16px;
        border-radius: 16px;
    }
    .top {
        margin-bottom: 12px;
    }
    .tag.hide {
        display: none;
    }
    .left {
        display: none;
    }
    .right {
        order: 3;
    }
    .hero h1 {
        font-size: 40px;
    }
    .center {
        margin: 16px auto;
    }
    .reportgrid {
        grid-template-columns: 1fr;
    }
    .gameheader h1 {
        font-size: 21px;
    }
    .hud {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        margin-bottom: 14px;
        padding-bottom: 12px;
        border-bottom: 1px solid #293652;
    }
    .hud div {
        text-align: center;
        font-size: 15px;
    }
    .hud .bar {
        height: 6px;
        margin-top: 4px;
    }
    .tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media print {
    body {
        background: #fff;
        color: #111;
    }
    .top,
    .actions,
    .foot,
    .left,
    .right,
    .noprint,
    .modal,
    .toast {
        display: none !important;
    }
    .layout {
        display: block;
    }
    .panel,
    .reportcard {
        background: #fff !important;
        color: #111 !important;
        border: 1px solid #bbb;
        box-shadow: none;
    }
    .reportcard p,
    .story,
    .sub,
    .list {
        color: #333 !important;
    }
    .shell {
        max-width: 100%;
    }
}

.nstrip {
    display: none;
}
.lure {
    color: #ffd079;
}
.sm {
    padding: 9px 13px;
    font-size: 13px;
}
.slots {
    display: flex;
    gap: 6px;
    margin: 14px 0;
}
.slotp {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 8px 4px;
    border-radius: 10px;
    background: #0d1729;
    border: 1px solid #27395a;
    color: #8fa4c8;
}
.slotp.now {
    border-color: #8ee3f5;
    background: #1c3a57;
    color: #fff;
    font-weight: 700;
}
.slotp.past {
    opacity: 0.5;
}
.acts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 10px;
}
.act {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
    color: #eaf0ff;
    background: #192740;
    border: 1px solid #385170;
    border-radius: 13px;
    padding: 13px;
    transition: 0.2s;
}
.act:hover:not(:disabled),
.act:focus-visible {
    background: #244064;
    border-color: #66cfe4;
    outline: none;
}
.act.ph {
    background: #1d2145;
    border-color: #4a4f9a;
}
.act:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.act .ai {
    font-size: 26px;
}
.act small {
    color: #a7b8d3;
    line-height: 1.35;
}
.act .chips {
    margin-top: 2px;
}
.inbox {
    display: grid;
    gap: 8px;
}
.inb {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #0d1729;
    border: 1px solid #2c4062;
    border-radius: 12px;
    padding: 11px 13px;
    line-height: 1.45;
    font-size: calc(14px * var(--k));
}
.inb.msg {
    border-color: #6b5a2c;
    background: #2a2412;
}
.inb > div:nth-child(2) {
    flex: 1;
}
.inbb {
    display: flex;
    gap: 6px;
    flex: none;
}
@media (max-width: 650px) {
    .nstrip {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin: 0 0 14px;
        padding-bottom: 12px;
        border-bottom: 1px solid #293652;
    }
    .nstrip div {
        text-align: center;
        font-size: 15px;
    }
    .nstrip .bar {
        height: 6px;
        margin-top: 4px;
    }
    .inb {
        flex-wrap: wrap;
    }
    .inbb {
        width: 100%;
    }
    .acts {
        grid-template-columns: repeat(2, 1fr);
    }
    .slotp {
        font-size: 11px;
    }
}
.fgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}
.fcard {
    display: flex;
    align-items: center;
    gap: 11px;
    background: #0d1729;
    border: 1px solid #2c4062;
    border-radius: 12px;
    padding: 10px 12px;
}
.fav {
    font-size: 30px;
}
.fmid {
    flex: 1;
    min-width: 0;
}
.fmid .bar {
    margin: 5px 0 3px;
}
.fb {
    display: flex;
    gap: 6px;
    flex: none;
}
.fb .ghost:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
@media (max-width: 650px) {
    .fgrid {
        grid-template-columns: 1fr;
    }
}
.miss {
    margin-top: 20px;
    background: #0b1426;
    border: 1px solid #27395a;
    border-radius: 14px;
    padding: 12px 14px;
}
.miss summary {
    cursor: pointer;
    font-weight: 700;
    color: #cfe0ff;
    font-size: calc(14px * var(--k));
}
.mgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.mcard {
    background: #0d1729;
    border: 1px solid #2c4062;
    border-radius: 12px;
    padding: 10px 12px;
    line-height: 1.4;
}
.mcard.done {
    border-color: #2e7a5c;
    background: #10281f;
}
.mtop {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 7px;
}
.mic {
    font-size: 24px;
}
.mmid {
    flex: 1;
    min-width: 0;
    font-size: calc(14px * var(--k));
}
.mmid small {
    color: #a7b8d3;
}
.mchk {
    font-weight: 800;
    font-size: 13px;
    color: #cfe0ff;
}
.mtag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #243951;
    color: #b9e4f0;
    padding: 2px 6px;
    border-radius: 6px;
    vertical-align: middle;
}
.mcard .bar {
    margin: 4px 0 6px;
}
@media (max-width: 650px) {
    .mgrid {
        grid-template-columns: 1fr;
    }
}
