.jmq {
    --mq-ink: #edf5ff;
    --mq-muted: #b8c8e2;
    --mq-line: #3a4d72;
    --mq-blue: #80e2ff;
    --mq-surface: #152545;
    max-width: 1100px;
    margin: 1.5rem auto;
    color: var(--mq-ink);
    font: 16px/1.5 system-ui, sans-serif;
    text-align: left;
}
.jmq *, .jmq *::before, .jmq *::after { box-sizing: border-box; }
.jmq .mq-shell {
    container-type: inline-size;
    background: #0d1730;
    border: 1px solid #30446e;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 35px #06152b32;
    color: var(--mq-ink);
}
.jmq .mq-banner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    background: radial-gradient(ellipse at 55% 10%, #283877, transparent 72%), #0e1c41;
    position: relative;
    isolation: isolate;
    min-height: 172px;
}
.jmq .mq-intro { padding: clamp(16px, 4vw, 36px); align-self: center; z-index: 1; }
.jmq .mq-title {
    color: #fff;
    margin: 2px 0 8px;
    font: 900 clamp(34px, 6vw, 70px)/1 system-ui, sans-serif;
    letter-spacing: -.06em;
    text-shadow: 0 4px #143775, 0 0 22px #37adff6b;
}
.jmq .mq-cover {
    width: 100%;
    height: 100%;
    max-height: 265px;
    display: block;
    object-fit: cover;
    object-position: 43% center;
    mask-image: linear-gradient(90deg, transparent 0%, black 23%);
}
.jmq .mq-subtitle, .jmq .mq-map-note, .jmq .mq-muted, .jmq .mq-footer { color: var(--mq-muted); }
.jmq .mq-subtitle { margin: 0; font-size: .94rem; max-width: 32ch; }
.jmq .mq-kicker {
    margin: 0 0 4px;
    color: var(--mq-blue);
    font: 800 .69rem/1.4 system-ui, sans-serif;
    letter-spacing: .14em;
}
.jmq .mq-hud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px clamp(12px, 3vw, 22px);
    border-top: 1px solid var(--mq-line);
    border-bottom: 1px solid var(--mq-line);
    background: #12203d;
}
.jmq button {
    appearance: none;
    margin: 0;
    min-height: 44px;
    border-radius: 10px;
    cursor: pointer;
    font: 750 .88rem/1.25 system-ui, sans-serif;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    box-shadow: none;
    overflow-wrap: anywhere;
}
.jmq button:disabled { cursor: wait; opacity: .68; }
.jmq button:focus-visible, .jmq a:focus-visible { outline: 3px solid #ffdb81; outline-offset: 2px; }
.jmq .mq-button {
    padding: 8px 13px;
    border: 1px solid #7fdbff;
    background: #89deff;
    color: #0a1b35;
}
.jmq .mq-button:hover { background: #c7f1ff; color: #0a1b35; }
.jmq .mq-inventory { margin-left: auto; }
.jmq .mq-stat {
    padding: 6px 9px;
    border: 1px solid var(--mq-line);
    border-radius: 8px;
    color: #bfeaff;
    white-space: nowrap;
    font-size: .83rem;
    font-weight: 800;
}
.jmq .mq-profile {
    display: flex;
    gap: 7px;
    align-items: center;
    background: #20335c;
    color: #fff;
    border: 1px solid var(--mq-line);
    padding: 4px 8px;
}
.jmq .mq-avatar {
    display: block;
    width: 50px;
    height: 50px;
    flex: none;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #8ac5ff;
}
.jmq .mq-profile .mq-avatar { width: 32px; height: 32px; border-radius: 7px; }
.jmq .mq-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: clamp(10px, 2vw, 20px);
}
.jmq .mq-atlas, .jmq .mq-panel {
    min-width: 0;
    border: 1px solid var(--mq-line);
    border-radius: 15px;
    background: var(--mq-surface);
    padding: clamp(12px, 2vw, 19px);
    overflow-wrap: anywhere;
}
.jmq .mq-panel { scroll-margin-top: 75px; }
.jmq h3 { margin: 0 0 12px; color: var(--mq-ink); font: 850 1.28rem/1.2 system-ui, sans-serif; }
.jmq .mq-map {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(8px, 2vw, 18px);
    padding: clamp(8px, 2vw, 18px);
    background-color: #112f49;
    background-size: 100% 100%;
    border: 1px solid #40667f;
    border-radius: 12px;
}
.jmq .mq-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 94px;
    padding: 9px 3px 6px;
    border: 1px solid #6598b6;
    background: #152d4af0;
    color: #e8f8ff;
    box-shadow: 0 4px 0 #08172e;
}
.jmq .mq-tile:hover, .jmq .mq-tile.mq-active {
    border-color: #84eeff;
    background: #234973;
    color: #fff;
}
.jmq .mq-tile-icon { font-size: 24px; line-height: 1.1; }
.jmq .mq-tile-name { font-size: clamp(.69rem, 1.5vw, .86rem); }
.jmq .mq-ping, .jmq .mq-marker {
    position: absolute;
    width: 23px;
    height: 23px;
    top: -5px;
    border-radius: 50%;
    border: 1px solid #142948;
}
.jmq .mq-ping { right: -5px; background: #ffdb83; color: #292013; line-height: 20px; }
.jmq .mq-marker { left: -5px; object-fit: cover; border-color: #90f1ff; }
.jmq .mq-map-note { margin: 12px 0 0; font-size: .84rem; }
.jmq .mq-npc, .jmq .mq-quest {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    background: #101e39;
    border: 1px solid var(--mq-line);
    border-radius: 11px;
    padding: 9px;
    margin: 8px 0;
}
.jmq .mq-npc { justify-content: flex-start; }
.jmq .mq-npc p, .jmq .mq-review p { margin: 4px 0 0; font-size: .87rem; }
.jmq .mq-npc p { color: #d5e7fa; }
.jmq .mq-quest strong, .jmq .mq-quest small { display: block; }
.jmq .mq-quest small { margin-top: 2px; }
.jmq .mq-tier, .jmq .mq-lock {
    display: inline-block;
    border-radius: 5px;
    padding: 3px 6px;
    margin-bottom: 4px;
    font-size: .68rem;
    font-weight: 850;
}
.jmq .mq-tier-0 { background: #17436c; color: #b9eaff; }
.jmq .mq-tier-1 { background: #473468; color: #f1dbff; }
.jmq .mq-tier-2 { background: #583d1a; color: #ffe4a4; }
.jmq .mq-lock { flex: none; background: #263550; color: #dbe4f6; }
.jmq .mq-progress { width: 100%; height: 9px; accent-color: #8fdfff; }
.jmq .mq-prompt { margin: 12px 0; font-size: 1.07rem; font-weight: 700; white-space: pre-line; }
.jmq .mq-choices, .jmq .mq-characters { display: grid; gap: 8px; }
.jmq .mq-characters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jmq .mq-choice {
    padding: 9px;
    color: #fff;
    background: #20375f;
    border: 1px solid #5275a8;
    text-align: left;
}
.jmq .mq-choice:hover { color: #fff; background: #32538a; }
.jmq .mq-characters .mq-choice { display: grid; justify-items: center; gap: 8px; }
.jmq .mq-characters .mq-avatar { width: min(100%, 100px); height: auto; aspect-ratio: 1; }
.jmq .mq-score { color: #aaf3ca; font-weight: 850; }
.jmq .mq-review, .jmq .mq-badges { margin: 0; padding: 0; list-style: none; }
.jmq .mq-review li { margin: 7px 0; padding: 8px 9px; background: #101e39; border-radius: 8px; }
.jmq .mq-review .mq-correct strong { color: #aaf3ca; }
.jmq .mq-review .mq-incorrect strong, .jmq .mq-error { color: #ffbdbe; }
.jmq .mq-error { background: #471f38; border-radius: 8px; padding: 9px; }
.jmq .mq-link { background: transparent; border: 0; color: #b8e8ff; padding: 6px; text-decoration: underline; }
.jmq .mq-link:hover { color: #fff; background: #263c61; }
.jmq .mq-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px 12px;
    padding: 8px 17px 14px;
    font-size: .81rem;
}
.jmq .mq-footer a { color: #a8eaff; text-decoration: underline; }
@media (max-width: 710px) {
    .jmq .mq-layout { grid-template-columns: minmax(0, 1fr); }
    .jmq .mq-banner { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
    .jmq .mq-cover { position: absolute; right: 0; width: 48%; max-height: none; }
    .jmq .mq-tile { min-height: 74px; }
}
.jmq .mq-victory { width: 100%; display: block; border-radius: 10px; border: 1px solid #ffdb81; }

@media (min-width: 711px) {
    @container (max-width: 760px) {
        .jmq .mq-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
}

/* Protokol Gerhana */
.jmq .mq-shell {
    --mq-ink: #f0f7ff;
    --mq-line: #31436d;
    --mq-surface: #101a35;
    background: radial-gradient(ellipse at 30% 10%, #202d5e, #0b1228 55%);
    border-color: #4b6194;
    box-shadow: 0 16px 44px #0c153e60;
}
.jmq .mq-banner {
    min-height: 190px;
    background: radial-gradient(ellipse at 80% 15%, #4c3979 0%, #222f62 35%, #111a38 80%);
}
.jmq .mq-banner::after {
    position: absolute;
    content: '';
    inset: auto 0 0;
    height: 2px;
    background: linear-gradient(90deg, #5ce8ff, #a778ff, #ffd994);
}
.jmq .mq-title { margin-bottom: 6px; }
.jmq .mq-cover { max-height: none; }
.jmq .mq-quest > button { flex: none; white-space: nowrap; }
.jmq .mq-season {
    display: inline-block;
    margin: 0 0 9px;
    border: 1px solid #9972e1;
    border-radius: 4px;
    padding: 3px 6px;
    color: #f0d5ff;
    background: #412d67;
    font: 800 .64rem/1.3 system-ui, sans-serif;
    letter-spacing: .09em;
}
.jmq .mq-hud { background: #101a35; }
.jmq .mq-rank {
    display: grid;
    grid-template-columns: max-content max-content;
    gap: 2px 4px;
    align-items: center;
}
.jmq .mq-rank .mq-stat { padding: 1px 5px; border: 0; }
.jmq .mq-rank progress { width: 100%; height: 5px; grid-column: span 2; accent-color: #6eedff; }
.jmq .mq-journal { margin-left: auto; background: #222d53; color: #e5dfff; border-color: #6576a2; }
.jmq .mq-journal:hover { background: #363b70; color: #fff; }
.jmq .mq-inventory { margin-left: 0; }
.jmq .mq-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.jmq .mq-atlas, .jmq .mq-panel { box-shadow: 0 10px 27px #050c203c; }
.jmq .mq-campaign {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 9px;
    padding: 9px;
    border: 1px solid #665599;
    border-radius: 9px;
    background: linear-gradient(125deg, #302654, #1b2547);
}
.jmq .mq-campaign p, .jmq .mq-chapter p { margin: 4px 0 0; font-size: .82rem; color: #dbd9f2; }
.jmq .mq-track { flex: none; padding-inline: 8px; font-size: .75rem; }
.jmq .mq-campus {
    display: block;
    position: relative;
    aspect-ratio: 1.45;
    padding: 0;
    border: 1px solid #6088aa;
    border-radius: 9px;
    overflow: hidden;
    isolation: isolate;
}
.jmq .mq-campus:focus-visible { outline: 3px solid #ffdb81; outline-offset: 2px; }
.jmq .mq-campus .mq-tile {
    position: absolute;
    display: grid;
    place-items: end center;
    grid-template-columns: minmax(0, 1fr);
    transform: translate(-50%, -78%);
    width: 30%;
    min-height: 44px;
    padding: 0 2px 3px;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
    color: #f0f7ff;
}
.jmq .mq-campus .mq-tile:hover, .jmq .mq-campus .mq-tile:focus-visible { background: #6bd8ff24; }
.jmq .mq-campus .mq-tile-name {
    width: max-content;
    max-width: 100%;
    padding: 2px 4px;
    border-radius: 4px;
    background: #07152cf4;
    border: 1px solid #54799c;
    font-size: clamp(.56rem, 1.4vw, .7rem);
    line-height: 1.08;
}
.jmq .mq-campus .mq-active .mq-tile-name { color: #b9f3ff; border-color: #8cedff; }
.jmq .mq-campus .mq-ping {
    width: 18px;
    height: 18px;
    top: 0;
    right: 3px;
    line-height: 16px;
    box-shadow: 0 0 10px #ffd16b99;
}
.jmq .mq-walker {
    position: absolute;
    z-index: 2;
    width: clamp(22px, 4vw, 36px);
    aspect-ratio: 1;
    height: auto;
    border: 2px solid #a3faff;
    border-radius: 40% 40% 50% 50%;
    object-fit: cover;
    transform: translate(-50%, -52%);
    transition: left 110ms linear, top 110ms linear;
    box-shadow: 0 0 0 2px #15345d, 0 0 15px #66eaff;
    pointer-events: none;
}
.jmq .mq-controls { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 8px; }
.jmq .mq-direction, .jmq .mq-focus {
    color: #e8f5ff;
    background: #253961;
    border: 1px solid #5877ab;
    padding: 6px 9px;
}
.jmq .mq-direction { min-width: 44px; font-size: 1.1rem; }
.jmq .mq-direction:hover, .jmq .mq-focus:hover { background: #395587; color: #fff; }
.jmq .mq-interact { margin-left: auto; }
.jmq .mq-map-status { margin: 7px 0 0; color: #a7eaff; font-size: .82rem; font-weight: 700; }
.jmq .mq-map-note { margin-top: 5px; }
.jmq .mq-arena {
    --mq-arena-glow: #7659ef;
    position: relative;
    display: grid;
    place-items: center;
    isolation: isolate;
    min-height: 240px;
    padding: 36px 9px 33px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--mq-arena-glow);
    background: radial-gradient(ellipse at 48% 50%, var(--mq-arena-glow), #171740 50%, #0a1129 82%);
}
.jmq .mq-arena::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent 0 7px, #c4c9ff19 8px 9px);
    pointer-events: none;
    z-index: -1;
}
.jmq .mq-arena-0 { --mq-arena-glow: #3d91d3; }
.jmq .mq-arena-2 { --mq-arena-glow: #c78355; }
.jmq .mq-sentinel {
    width: min(82%, 300px);
    max-height: 240px;
    object-fit: contain;
    animation: mq-hover 3.3s ease-in-out infinite;
}
.jmq .mq-arena-0 .mq-sentinel { filter: hue-rotate(310deg); width: min(74%, 250px); }
.jmq .mq-arena-2 .mq-sentinel { filter: hue-rotate(70deg) saturate(1.3); }
.jmq .mq-hit .mq-sentinel { animation: mq-hit .42s ease-out; }
.jmq .mq-guard .mq-sentinel { animation: mq-block .42s ease-out; }
.jmq .mq-guard-meter {
    position: absolute;
    z-index: 1;
    inset: 9px 12px auto;
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-shadow: 0 1px #12152f;
}
.jmq .mq-segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 4px; }
.jmq .mq-segments span { height: 6px; background: #16223f; border: 1px solid #7c6ab3; border-radius: 4px; }
.jmq .mq-segments .mq-intact { background: linear-gradient(90deg, #f57cbe, #f8bcf3); }
.jmq .mq-arena-player {
    position: absolute;
    width: 46px;
    aspect-ratio: 1;
    bottom: 10px;
    left: 10px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #8cf4ff;
}
.jmq .mq-versus { position: absolute; bottom: 12px; right: 11px; font-size: .69rem; font-weight: 850; letter-spacing: .1em; }
.jmq .mq-battle-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.jmq .mq-strike, .jmq .mq-guarded { margin: 10px 0; font-weight: 800; }
.jmq .mq-strike { color: #96ffc3; }
.jmq .mq-guarded { color: #ffc7ad; }
.jmq .mq-choice.mq-picked-right { background: #184d47; border-color: #94f6c2; opacity: 1; }
.jmq .mq-choice.mq-picked-wrong { background: #642c4c; border-color: #ff9aab; opacity: 1; }
.jmq .mq-chapter { border: 1px solid #536499; border-radius: 8px; margin: 8px 0; padding: 8px; }
.jmq .mq-log-link, .jmq .mq-log-lock {
    display: block;
    width: 100%;
    padding: 7px;
    margin-top: 4px;
    border: 1px solid #44547d;
    color: #c5f4ff;
    background: #1a2b50;
    text-align: left;
    font-size: .82rem;
}
.jmq .mq-log-lock { border-color: transparent; background: transparent; color: #c1cce5; }
.jmq .mq-victory { animation: mq-reveal .55s ease-out both; }
@keyframes mq-hover { 50% { translate: 0 -7px; } }
@keyframes mq-hit { 35% { transform: translateX(8px) rotate(4deg); opacity: .55; } }
@keyframes mq-block { 40% { transform: scale(1.07); } }
@keyframes mq-reveal { from { transform: scale(.94); opacity: .4; } }
@container (max-width: 590px) {
    .jmq .mq-layout { grid-template-columns: minmax(0, 1fr); }
    .jmq .mq-arena { min-height: 165px; }
    .jmq .mq-sentinel { max-height: 140px; }
}
@container (max-width: 420px) {
    .jmq .mq-campaign { align-items: flex-start; flex-direction: column; }
    .jmq .mq-direction { min-width: 42px; }
    .jmq .mq-journal { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .jmq .mq-walker { transition: none; }
    .jmq .mq-sentinel, .jmq .mq-victory { animation: none; }
}
.jmq .mq-account-button { background: #ffe3a1; color: #271d3e; border-color: #ffcf71; }
.jmq .mq-account-button:hover { background: #fff0ca; color: #271d3e; }
.jmq .mq-account-form { display: grid; gap: 9px; margin: 8px 0; }
.jmq .mq-account-form p { margin: 0; font-size: .89rem; }
.jmq .mq-field { display: grid; gap: 4px; min-width: 0; font-size: .87rem; font-weight: 750; }
.jmq .mq-field input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid #6d85b2;
    border-radius: 8px;
    background: #0d1936;
    color: #eef6ff;
    font: 16px/1.25 system-ui, sans-serif;
}
.jmq .mq-field input:focus-visible { outline: 2px solid #ffdb81; outline-offset: 1px; }
.jmq .mq-account-name { font-weight: 800; }
.jmq .mq-native-login { display: block; padding: 8px 6px; color: #b8e8ff; font-size: .82rem; text-decoration: underline; }

/* Online lobby and duel */
.jmq .mq-online[hidden], .jmq .mq-online [hidden],
.jmq .mq-hud[hidden], .jmq .mq-layout[hidden] { display: none; }
.jmq .mq-arena-button { color: #f2e5ff; background: #4a3377; border-color: #bb94fb; }
.jmq .mq-arena-button:hover { color: #fff; background: #634696; }
.jmq .mq-online { padding: clamp(12px, 3vw, 22px); }
.jmq .mq-online h2 { margin: 0; color: var(--mq-ink); font: 850 clamp(1.4rem, 4vw, 2.1rem)/1.12 system-ui, sans-serif; }
.jmq .mq-online-header, .jmq .mq-online-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.jmq .mq-online-body { margin-top: 14px; }
.jmq .mq-online-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; }
.jmq .mq-online-board, .jmq .mq-online-detail {
    min-width: 0;
    background: var(--mq-surface);
    border: 1px solid var(--mq-line);
    border-radius: 14px;
    padding: 12px;
}
.jmq .mq-online-detail { align-self: start; overflow-wrap: anywhere; }
.jmq .mq-room-entry { display: grid; max-width: 470px; gap: 10px; }
.jmq .mq-room-entry .mq-online-actions { justify-content: flex-start; }
.jmq .mq-room-code { font-weight: 850; letter-spacing: .07em; color: #b9edff; }
.jmq .mq-online-floor {
    position: relative;
    width: 100%;
    min-height: 220px;
    aspect-ratio: 1.5;
    background-color: #102945;
    background-size: 100% 100%;
    border: 1px solid #617fa5;
    border-radius: 10px;
    margin-top: 10px;
}
.jmq .mq-online-floor:focus-visible { outline: 3px solid #ffdb81; outline-offset: 2px; }
.jmq .mq-online-token {
    position: absolute;
    display: grid;
    justify-items: center;
    max-width: min(110px, 32%);
    transform: translate(-50%, -50%);
    transition: left 145ms ease-out, top 145ms ease-out;
    pointer-events: none;
}
.jmq .mq-online-token img {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #d5bbff;
    box-shadow: 0 0 8px #a678ff;
}
.jmq .mq-online-token span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 4px;
    background: #101a35;
    border-radius: 4px;
    color: #f2eeff;
    font: 750 .72rem/1.15 system-ui, sans-serif;
}
.jmq .mq-online-you { z-index: 2; }
.jmq .mq-online-you img { border-color: #91f2ff; box-shadow: 0 0 9px #76deff; }
.jmq .mq-online-list { display: grid; gap: 6px; margin-top: 8px; }
.jmq .mq-online-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px;
    background: #152445;
    border-radius: 7px;
    overflow-wrap: anywhere;
}
.jmq .mq-online-player button { flex: none; }
.jmq .mq-online .mq-field select { min-height: 44px; padding: 6px; background: #172744; color: #fff; border: 1px solid #6d85b2; border-radius: 7px; }
.jmq .mq-online-timer { color: #ffdfa0; margin: 0 0 8px; font-weight: 800; }
.jmq .mq-online-timer:empty { display: none; }
.jmq .mq-online-last { color: #ffdfa0; font-weight: 750; }
@container (max-width: 640px) {
    .jmq .mq-online-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .jmq .mq-online-grid { grid-template-columns: minmax(0, 1fr); }
    .jmq .mq-online-floor { min-height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
    .jmq .mq-online-token { transition: none; }
}

/* Map-first layout and bottom navigation */
.jmq .mq-shell { overflow: clip; }
.jmq .mq-game-status {
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 10px clamp(10px, 3vw, 20px);
    border-top: 0;
    background: #101b35;
}
.jmq .mq-status-brand { min-width: 0; }
.jmq .mq-status-title {
    margin: 0;
    color: #f7fbff;
    font: 900 clamp(1.22rem, 4vw, 1.85rem)/1.02 system-ui, sans-serif;
    letter-spacing: -.035em;
}
.jmq .mq-status-identity { display: flex; align-items: center; gap: 8px; flex: none; }
.jmq .mq-status-identity .mq-avatar { width: 40px; height: 40px; border-radius: 9px; }
.jmq .mq-atlas[hidden], .jmq .mq-panel[hidden], .jmq .mq-dock[hidden],
.jmq .mq-dock-menu[hidden], .jmq .mq-online-back[hidden] { display: none; }
.jmq .mq-layout:not([hidden]):not([data-view="quiz"]) { display: block; }
.jmq .mq-layout[data-view="map"] { padding: clamp(7px, 2vw, 15px); }
.jmq .mq-layout[data-view="map"] .mq-atlas { padding: 0; background: transparent; border: 0; box-shadow: none; }
.jmq .mq-campus {
    width: 100%;
    min-height: 180px;
    aspect-ratio: 1.45;
    border: 1px solid #638caa;
    box-shadow: 0 8px 22px #080e28a0;
}
.jmq .mq-campus .mq-tile { touch-action: manipulation; }
.jmq .mq-campus .mq-tile-name {
    font-size: clamp(.69rem, 2.1vw, .9rem);
    padding: 3px 5px;
}
.jmq .mq-campus .mq-ping {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 24px;
    transform: translateX(-50%);
}
.jmq .mq-campus .mq-sprite {
    display: grid;
    justify-items: center;
    align-items: start;
    width: clamp(23px, 6vw, 42px);
    height: auto;
    aspect-ratio: auto;
    transform: translate(-50%, -44%);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 3px 3px #040d24) drop-shadow(0 0 4px #9df7ff88);
}
.jmq .mq-sprite-face {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border: 2px solid #a8f8ff;
    border-radius: 46% 46% 43% 43%;
    z-index: 1;
}
.jmq .mq-sprite-body {
    position: relative;
    display: block;
    width: 48%;
    aspect-ratio: 1.38;
    margin-top: -5%;
    border: 1px solid #a7def5;
    border-radius: 40% 40% 22% 22%;
    background: #234d8d;
}
.jmq .mq-sprite-alya .mq-sprite-body { background: #6b4aa1; }
.jmq .mq-sprite-body::after {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -3px;
    height: 3px;
    background: linear-gradient(90deg, #d9f2ff 0 38%, transparent 38% 62%, #d9f2ff 62%);
}
.jmq .mq-map-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 2px 2px;
}
.jmq .mq-dpad { display: grid; grid-template-columns: repeat(4, minmax(44px, 1fr)); gap: 4px; }
.jmq .mq-dpad .mq-direction { touch-action: none; user-select: none; }
.jmq .mq-map-location { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; }
.jmq .mq-map-location .mq-map-status { margin: 0; }
.jmq .mq-map-location .mq-interact { margin-left: 0; }
.jmq .mq-layout[data-view="map"] .mq-map-note { margin: 5px 2px 0; }
.jmq .mq-layout:not([data-view="map"]):not([data-view="quiz"]) .mq-panel { max-width: 720px; margin: 0 auto; }
.jmq .mq-return-map { display: block; margin-top: 8px; }
.jmq .mq-dock {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    padding: 7px clamp(9px, 3vw, 18px) max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid #344772;
    background: #101b35;
}
.jmq .mq-menu-toggle {
    min-width: 106px;
    padding-inline: 18px;
    color: #1c1836;
    background: #dfc1ff;
    border-color: #d2a4ff;
}
.jmq .mq-menu-toggle:hover { color: #1c1836; background: #eddbff; }
.jmq .mq-dock-menu {
    position: absolute;
    right: clamp(9px, 3vw, 18px);
    bottom: calc(100% + 5px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(350px, calc(100% - 18px));
    max-height: min(58vh, 450px);
    overflow: auto;
    gap: 6px;
    padding: 9px;
    border: 1px solid #8064af;
    border-radius: 12px;
    background: #172344;
    box-shadow: 0 9px 26px #080d2599;
}
.jmq .mq-dock-item {
    text-align: left;
    background: #273962;
    color: #edf4ff;
    border-color: #5672a4;
}
.jmq .mq-dock-item:hover { background: #385587; color: #fff; }
.jmq .mq-online-nav { margin-top: 10px; text-align: right; }
.jmq .mq-dock .mq-footer { padding: 0; font-size: .75rem; }
@container (max-width: 370px) {
    .jmq .mq-map-controls { display: grid; justify-content: stretch; }
    .jmq .mq-map-location { justify-content: space-between; }
}
