.mor-body { background: #07070b; }
.mor {
    --mor-red: #ff2a2a;
    --mor-orange: #ff7a18;
    --mor-gold: #f0c14b;
    --pad: max(12px, env(safe-area-inset-left));
    max-width: 860px;
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 400px at 20% -10%, rgba(255,42,42,0.16), transparent 55%),
        radial-gradient(800px 300px at 100% 0%, rgba(255,122,24,0.12), transparent 50%),
        #09090f;
    color: #f4f1ea;
    padding-bottom: calc(76px + env(safe-area-inset-bottom) + var(--kb, 0px));
}
.mor-head {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px var(--pad) 12px;
    padding-top: max(10px, env(safe-area-inset-top));
    background: linear-gradient(180deg, rgba(9,9,15,0.96), rgba(9,9,15,0.88));
    border-bottom: 1px solid rgba(255,122,24,0.22);
    backdrop-filter: blur(12px);
}
.mor-back {
    width: 40px; height: 40px; border-radius: 12px;
    display: grid; place-items: center;
    color: #fff; background: rgba(255,255,255,0.06); text-decoration: none;
}
.mor-head__meta { min-width: 0; flex: 1; }
.mor-kicker {
    margin: 0; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: #ff9a4a; font-weight: 800;
}
.mor-head h1 {
    margin: 2px 0 0; font-size: 1.05rem; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mor-sub { margin: 3px 0 0; font-size: 0.75rem; color: #9aa0ae; }
.mor-head__status { text-align: right; flex-shrink: 0; }
.mor-live {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em;
    color: #ffb4b4; background: rgba(255,42,42,0.16);
    border: 1px solid rgba(255,42,42,0.45); border-radius: 999px; padding: 4px 8px;
}
.mor-live i {
    width: 7px; height: 7px; border-radius: 50%; background: #ff2a2a;
    box-shadow: 0 0 0 0 rgba(255,42,42,0.8); animation: morPulse 1.6s infinite;
    display: inline-block;
}
@keyframes morPulse {
    0% { box-shadow: 0 0 0 0 rgba(255,42,42,0.7); }
    70% { box-shadow: 0 0 0 8px rgba(255,42,42,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,42,42,0); }
}
.mor-count { display: block; margin-top: 4px; font-size: 0.7rem; color: #b7bcc8; }
.mor-feed {
    flex: 1;
    padding: 12px var(--pad) 18px;
    display: flex; flex-direction: column; gap: 10px;
}
.mor-msg {
    max-width: 92%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 10px 12px;
}
.mor-msg--mine { align-self: flex-end; background: rgba(255,122,24,0.12); border-color: rgba(255,122,24,0.22); }
.mor-msg--official {
    max-width: 100%;
    background: linear-gradient(180deg, rgba(240,193,75,0.14), rgba(20,14,6,0.4));
    border-color: rgba(240,193,75,0.45);
}
.mor-msg--system { align-self: center; background: transparent; border: 0; color: #8b909c; font-size: 0.78rem; }
.mor-msg__meta { display: flex; gap: 8px; align-items: center; font-size: 0.72rem; color: #9aa0ae; margin-bottom: 4px; }
.mor-msg__avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: #1a1a22; }
.mor-msg__text { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 0.95rem; }
.mor-card {
    margin-top: 8px; border-radius: 14px; padding: 12px;
    background: #101018; border: 1px solid rgba(255,122,24,0.28);
}
.mor-card h3 {
    margin: 0 0 8px; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mor-gold);
}
.mor-card__row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,0.06); font-size: 0.86rem; }
.mor-card__secret { font-family: ui-monospace, monospace; letter-spacing: 0.12em; color: #d7c48a; }
.mor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mor-btn {
    appearance: none; border: 0; border-radius: 10px; padding: 10px 12px; font-weight: 800; font-size: 0.8rem;
    background: linear-gradient(135deg, var(--mor-orange), var(--mor-red)); color: #111; cursor: pointer;
    min-height: 42px;
}
.mor-btn--ghost { background: rgba(255,255,255,0.08); color: #fff; }
.mor-status { font-weight: 800; }
.mor-status--ok { color: #4ade80; }
.mor-status--warn { color: #fbbf24; }
.mor-status--bad { color: #f87171; }
.mor-status--wait { color: #94a3b8; }
.mor-composer, .mor-lock {
    position: fixed; left: 0; right: 0; bottom: var(--kb, 0px);
    max-width: 860px; margin: 0 auto;
    padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom));
    background: rgba(9,9,15,0.94); border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; z-index: 30;
}
.mor-plus, .mor-send {
    width: 46px; height: 46px; border-radius: 14px; border: 0; font-weight: 800; cursor: pointer;
}
.mor-plus { background: #16161d; color: var(--mor-gold); font-size: 1.4rem; }
.mor-send { width: auto; padding: 0 16px; background: linear-gradient(135deg, var(--mor-orange), var(--mor-red)); color: #111; }
.mor-composer input {
    flex: 1; min-width: 0; height: 46px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.1);
    background: #12121a; color: #fff; padding: 0 12px; font-size: 16px;
}
.mor-lock { display: none; justify-content: center; color: #fbbf24; font-weight: 700; }
.mor-sheet { position: fixed; inset: 0; z-index: 50; }
.mor-sheet__scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.mor-sheet__panel {
    position: absolute; left: 0; right: 0; bottom: var(--kb, 0px);
    max-height: min(82vh, 640px); overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: #121218; border-radius: 18px 18px 0 0;
    padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,122,24,0.3);
}
.mor-sheet__grab { width: 44px; height: 4px; border-radius: 99px; background: #333; margin: 4px auto 12px; }
/* Class rules with an explicit display beat the UA [hidden] rule, so opt back in. */
.mor [hidden] { display: none !important; }
.mor-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mor-tool {
    background: #1a1a22; border: 1px solid #2a2a32; color: #eee;
    border-radius: 12px; padding: 12px 10px; text-align: left; cursor: pointer; font-weight: 700; font-size: 0.82rem;
}
.mor-tool-form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.mor-tool-form select, .mor-tool-form input, .mor-tool-form textarea {
    background: #0d0d12; color: #fff; border: 1px solid #2a2a32; border-radius: 10px; padding: 10px; font-size: 16px;
    min-height: 46px; width: 100%;
}
.mor-tool-form textarea { min-height: 90px; }
.mor-tool-actions {
    position: sticky; bottom: 0; z-index: 2;
    display: flex; gap: 8px; margin-top: 4px;
    padding: 10px 0 calc(4px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(18,18,24,0), #121218 22%);
}
.mor-tool-actions .mor-btn { flex: 1; min-height: 48px; }
.mor-tool-error { margin: 0; color: #f87171; font-size: 0.8rem; font-weight: 700; }
.mor-tool-empty { margin: 0; color: #9aa0ae; font-size: 0.82rem; }
.mor-banner {
    margin: 8px var(--pad) 0; padding: 10px 12px; border-radius: 12px;
    background: rgba(240,193,75,0.12); border: 1px solid rgba(240,193,75,0.35); color: #f8e7a0; font-size: 0.85rem;
}
.mor-home, .morh {
    --mor-orange: #ff7a18; --mor-red: #ff2a2a;
}
.morh {
    margin: 0 0 18px;
    border-radius: 18px;
    padding: 16px;
    background:
        linear-gradient(135deg, rgba(255,42,42,0.16), rgba(255,122,24,0.08) 46%, rgba(12,12,16,0.9)),
        #101016;
    border: 1px solid rgba(255,122,24,0.38);
    box-shadow: 0 12px 40px rgba(255,42,42,0.12);
    color: #f6f3ee;
}
.morh__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.morh__kicker {
    margin: 0; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 800; color: #ff9a4a;
}
.morh h2 { margin: 4px 0 2px; font-size: 1.25rem; }
.morh p { margin: 0; color: #c5c8d0; font-size: 0.9rem; }
.morh__cta {
    display: inline-flex; align-items: center; justify-content: center;
    margin-top: 12px; min-height: 44px; padding: 0 16px; border-radius: 12px;
    background: linear-gradient(135deg, var(--mor-orange), var(--mor-red));
    color: #111; font-weight: 800; text-decoration: none;
}
.morh__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.morh__chip {
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
    padding: 5px 8px; border-radius: 999px; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.08);
}
.morh__chip--live { color: #ffb4b4; border-color: rgba(255,42,42,0.5); }
.morh__chip--gold { color: #f8e7a0; border-color: rgba(240,193,75,0.5); }
.morh__chip--warn { color: #fdba74; border-color: rgba(251,146,60,0.5); }
.morh__chip--ok { color: #86efac; border-color: rgba(74,222,128,0.4); }
.morh__list { margin-top: 10px; }
.morh__more { color: #ffb27a; font-size: 0.8rem; font-weight: 700; }
@media (max-width: 720px) {
    .mor-body .navbar { display: none; }
    .mor { padding-bottom: calc(88px + env(safe-area-inset-bottom) + var(--kb, 0px)); }
    .mor--manage { padding-bottom: calc(148px + env(safe-area-inset-bottom) + var(--kb, 0px)); }
}
.mor--manage { padding-bottom: calc(136px + env(safe-area-inset-bottom) + var(--kb, 0px)); }
.mor-cd {
    display: block; margin-top: 4px; font-size: 0.68rem; font-weight: 800;
    color: #f8e7a0; letter-spacing: 0.04em;
}
.mor-dock {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    padding: 8px var(--pad); border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(12,12,18,0.9); position: sticky; top: 62px; z-index: 15;
}
.mor-dock__btn, .mor-dock__phase {
    appearance: none; border: 1px solid #2a2a32; background: #16161d; color: #eee;
    border-radius: 10px; padding: 8px 10px; font-size: 0.72rem; font-weight: 800; cursor: pointer;
    min-height: 36px;
}
.mor-dock__phase { background: #0f0f16; color: #f0c14b; }
.mor-pins {
    display: flex; flex-direction: column; gap: 6px;
    margin: 8px var(--pad) 0;
}
.mor-pin {
    display: flex; gap: 8px; align-items: center; cursor: pointer;
    padding: 8px 10px; border-radius: 12px;
    background: rgba(240,193,75,0.1); border: 1px solid rgba(240,193,75,0.28);
    font-size: 0.8rem; color: #f8e7a0;
}
.mor-reply {
    flex: 1 0 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: rgba(255,122,24,0.12); border: 1px solid rgba(255,122,24,0.25);
    border-radius: 10px; padding: 6px 10px; font-size: 0.78rem; color: #ffd7b0;
}
.mor-reply button { border: 0; background: transparent; color: #fff; font-size: 1.1rem; cursor: pointer; }
.mor-msg__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mor-msg__acts button {
    border: 0; background: rgba(255,255,255,0.06); color: #c5c8d0;
    border-radius: 8px; padding: 4px 8px; font-size: 0.68rem; font-weight: 700; cursor: pointer;
}
.mor-check { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: #9aa0ae; }
.mor-people-search {
    width: 100%; min-height: 46px; margin: 0 0 8px;
    background: #0d0d12; color: #fff; border: 1px solid #2a2a32;
    border-radius: 10px; padding: 10px 12px; font-size: 16px;
}
.mor-people-hits { display: flex; flex-direction: column; gap: 0; margin: 0 0 8px; }
.mor-people-hits .mor-btn { flex: 0 0 auto; min-height: 40px; padding: 8px 12px; }
.mor-people-row--hit { border-top: 1px solid #222; }
.mor-people-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 0; border-top: 1px solid #222;
}
.mor-edit { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.mor-edit textarea {
    width: 100%; min-height: 72px; border-radius: 10px; border: 1px solid #2a2a32;
    background: #0d0d12; color: #fff; padding: 10px; font-size: 16px;
}
.mor-people-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mor-people-acts select {
    background: #0f0f16; color: #fff; border: 1px solid #2a2a32; border-radius: 8px;
    padding: 6px 8px; font-size: 0.72rem; min-height: 34px;
}
