.app-shell {
    --shell-bg: #091526;
    --shell-side: #06121F;
    --shell-top: #0B192B;
    --shell-main: #0A1728;
    --shell-card: #0D1E32;
    --shell-rail: #0C1C30;
    --shell-line: #29445F;
    --shell-text: #F3F7FC;
    --shell-muted: #A9BDD2;
    --shell-accent: #2AD5E7;
    background: var(--shell-bg);
    color: var(--shell-text);
}
html:has(body.app-shell) { background: #091526; }
.app-shell .sky-bg, .app-shell .sky-stars, .app-shell .sky-fog { display: none; }
.app-shell .app-frame { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: var(--shell-bg); }
.app-side { position: sticky; top: 0; height: 100dvh; max-height: 100dvh; display: flex; flex-direction: column; gap: 4px; padding: 16px 12px 12px; background: var(--shell-side); border-right: 1px solid var(--shell-line); overflow: hidden; }
.app-side .brand-lockup { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 4px 8px 14px; color: var(--shell-text); text-decoration: none; }
.app-side .brand-lockup img { width: var(--logo-size, 36px) !important; height: var(--logo-size, 36px) !important; max-height: var(--logo-size, 36px) !important; object-fit: contain; }
.app-side .brand-name { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; }
.app-side .brand-sub { display: block; color: var(--shell-muted); font-size: 11px; letter-spacing: .08em; }
.app-side .main-nav { display: block; position: static; left: auto; transform: none; width: auto; min-width: 0; flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; }
.app-side .main-nav > ul { display: flex; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 0; list-style: none; }
.side-label { margin: 16px 12px 6px; color: var(--shell-muted); font-size: 12px; font-weight: 700; }
.app-side a.side-link,
.app-side a.side-link:visited,
.app-side .main-nav a.side-link,
.app-side .nav-toggle {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    height: auto;
    padding: 8px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--shell-text);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
}
.app-side .nav-toggle span,
.app-side .side-link span { flex: 1 1 auto; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-side .side-caret { margin-left: auto; flex: 0 0 auto; width: auto; color: #8eafc8; font-size: 11px; transition: transform .15s ease; }
.app-side .nav-drop.open > .nav-toggle .side-caret { transform: rotate(90deg); color: var(--shell-accent); }
.app-side .nav-toggle:hover,
.app-side .side-link:hover { background: rgba(42, 213, 231, .08); }
.app-side .nav-drop.open > .nav-toggle { background: rgba(42, 213, 231, .1); color: #dff8ff; }
.app-side .main-nav a.side-link::after { display: none; }
.app-side .side-link i,
.app-side .nav-toggle i { width: 18px; flex: 0 0 18px; text-align: center; color: var(--shell-muted); }
.app-side .is-current > .side-link {
    background: rgba(42, 213, 231, .14);
    color: var(--shell-accent);
    box-shadow: inset 3px 0 0 var(--shell-accent);
}
.app-side .is-current > .side-link i { color: var(--shell-accent); }
.app-side .nav-drop { position: static; }
.app-side .nav-drop .nav-sub,
.app-side .nav-drop .nav-sub[hidden] { display: none; }
.app-side .nav-drop.open > .nav-sub { display: block; position: static; width: auto; max-width: none; margin: 2px 0 8px 18px; padding: 2px 0 2px 12px; list-style: none; background: transparent; border: 0; border-left: 1px solid #29445f; border-radius: 0; }
.app-side .nav-drop:hover > .nav-sub { display: none; }
.app-side .nav-drop.open:hover > .nav-sub { display: block; }
.app-side .nav-sub a,
.app-side .nav-sub a:visited { position: relative; display: block; min-height: 34px; padding: 7px 8px 7px 16px; color: #9fb4cc; font-size: 13px; font-weight: 500; line-height: 1.35; text-align: left; text-decoration: none; border-radius: 8px; }
.app-side .nav-sub a::before { content: ""; position: absolute; left: 0; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: #6e8eab; }
.app-side .nav-sub a:hover,
.app-side .nav-sub a:focus-visible { color: #f3f7fc; background: rgba(42, 213, 231, .08); }
.app-side .nav-sub a.is-current,
.app-side .nav-sub a.is-current:visited { color: var(--shell-accent); background: rgba(42, 213, 231, .14); box-shadow: inset 3px 0 0 var(--shell-accent); }
.app-side .nav-sub a.is-current::before { background: var(--shell-accent); }
.app-side .nav-sep { display: block; padding: 8px 8px 2px 16px; color: #6e8eab; font-size: 12px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 12px; }
.side-foot .head-drop { position: static; }
.side-foot .nav-sub { position: static; display: none; background: transparent; border: 0; }
.side-foot .head-drop.open > .nav-sub,
.side-foot .head-drop:focus-within > .nav-sub { display: block; }
.app-shell .app-column { min-width: 0; background: var(--shell-main); }
.app-shell .main-header { position: sticky; top: 0; z-index: 30; background: var(--shell-top); border-bottom: 1px solid var(--shell-line); box-shadow: none; min-height: 0; }
.app-shell .head-bar { width: auto; max-width: none; margin: 0; padding: 0 22px; }
.app-shell .head-top { min-height: 64px; }
.app-shell main { padding: 0; background: var(--shell-main); color: var(--shell-text); }
.app-shell .main-footer { display: none; }
.app-shell .head-brand .brand-lockup { display: none; }
.app-shell .main-header .main-nav { display: none !important; }
.app-shell .head-link,
.app-shell .head-link:visited,
.app-shell .head-admin,
.app-shell .head-account,
.app-shell .head-bell,
.app-shell .head-bell:visited { color: var(--shell-text); }
.app-shell .head-ask { background: transparent; border-color: var(--shell-line); color: var(--shell-text); }
.app-shell .head-ask.is-on { border-color: var(--shell-accent); color: var(--shell-accent); background: rgba(42, 213, 231, .12); }
.head-bell { position: relative; display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; text-decoration: none; }
.head-bell b, .desk-head .desk-unread { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #e23b3b; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; white-space: nowrap; }
.desk-head { position: relative; }
.desk-head h2 { padding-right: 28px; }
.desk-toggle { display: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--shell-text); cursor: pointer; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; width: auto; margin: 0; padding: 28px 24px 24px; background: var(--shell-main); align-items: start; }
.home-layout.is-solo { grid-template-columns: minmax(0, 1fr); }
.home-center { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.home-hello h1 { margin: 0; font-size: 28px; line-height: 1.3; color: var(--shell-text); }
.home-hello p { margin: 6px 0 0; color: var(--shell-muted); }
.home-banner { position: relative; height: var(--banner-h, 196px); border-radius: 16px; overflow: hidden; border: 1px solid var(--shell-line); background: #07111f; }
.home-banner img { width: 100%; height: 100%; object-fit: cover; object-position: var(--banner-x, 68%) var(--banner-y, 42%); }
.home-banner div { position: absolute; left: 28px; top: 28px; max-width: min(420px, 70%); color: #f4fbff; text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.home-banner small { color: #d5e8f8; letter-spacing: .08em; }
.home-banner strong { display: block; margin-top: 4px; font-size: 34px; color: #fff; }
.home-banner span { color: var(--shell-accent); }
.home-banner p { margin: 4px 0 0; }
.home-banner .banner-sub, .home-banner .banner-aside { font-size: 13px; color: #d7e8f6; }
.home-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.home-quick a, .start-card a, .news-card, .desk-card { border: 1px solid var(--shell-line); border-radius: 14px; background: var(--shell-card); color: var(--shell-text); text-decoration: none; }
.home-quick a { display: flex; gap: 12px; align-items: center; min-height: 78px; height: 100%; padding: 14px 16px; }
.home-quick a:visited, .start-card a:visited, .news-row:visited, .desk-item:visited { color: var(--shell-text); }
.card-ico, .desk-mine a > span > i { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(42, 213, 231, .12); color: var(--shell-accent); flex: 0 0 36px; }
.card-ico .menu-ico, .card-ico .menu-ico i { width: 20px; height: 20px; flex: none; background: transparent; border-radius: 0; color: inherit; font-size: 18px; font-weight: 900; }
.home-quick .fa-chevron-right, .start-card .fa-chevron-right, .desk-mine .fa-chevron-right { width: auto; height: auto; margin-left: auto; background: transparent; color: var(--shell-muted); flex: none; }
.home-quick small, .start-card small, .news-row small, .desk-copy small { display: block; color: var(--shell-muted); font-weight: 500; }
.home-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; align-items: stretch; }
.news-card, .start-card, .desk-card { padding: 16px; }
.news-card h2, .start-card h2, .desk-card h2 { margin: 0 0 8px; color: var(--shell-text); font-size: 16px; }
.news-head, .desk-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.news-tabs, .desk-tabs { display: flex; gap: 16px; }
.news-tabs button, .desk-tabs button { border: 0; background: transparent; color: var(--shell-muted); font-weight: 800; cursor: pointer; padding: 0 0 8px; }
.news-tabs button.is-on, .desk-tabs button.is-on { color: var(--shell-accent); box-shadow: inset 0 -2px 0 var(--shell-accent); }
.news-head a, .news-head a:visited, .desk-more, .desk-more:visited { color: var(--shell-accent); text-decoration: none; font-size: 13px; font-weight: 700; }
.news-row { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid rgba(41, 68, 95, .7); color: var(--shell-text); text-decoration: none; }
.news-row b { font-weight: 650; }
.news-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 148px; justify-content: center; color: var(--shell-muted); text-align: center; }
.news-empty i { font-size: 28px; color: #6e8eab; }
.news-empty b { color: var(--shell-text); font-weight: 700; }
.start-card { display: flex; flex-direction: column; gap: 8px; }
.start-card a { display: flex; gap: 10px; align-items: center; padding: 10px; background: transparent; border: 0; }
.home-rail { min-width: 0; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 80px; max-height: calc(100vh - 96px); }
.desk-card { display: flex; flex-direction: column; gap: 8px; min-height: 0; background: var(--shell-rail); }
.desk-list { overflow: auto; min-height: 0; }
.desk-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid rgba(41, 68, 95, .7); background: transparent; color: var(--shell-text); text-align: left; text-decoration: none; cursor: pointer; }
.desk-face { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #163454; color: #dff7ff; font-size: 12px; font-weight: 800; flex: 0 0 40px; }
.desk-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.desk-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.desk-line b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.desk-line em { flex: none; color: var(--shell-muted); font-style: normal; font-size: 12px; font-weight: 600; }
.desk-line time { margin-left: auto; flex: none; color: var(--shell-muted); font-size: 12px; }
.desk-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-item .desk-unread { position: static; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #e23b3b; color: #fff; font-size: 11px; font-style: normal; font-weight: 800; line-height: 18px; text-align: center; white-space: nowrap; }
.desk-empty { margin: 12px 0; color: var(--shell-muted); }
.desk-mine a { display: flex; align-items: center; gap: 8px; min-height: 42px; color: var(--shell-text); text-decoration: none; }
.desk-mine a:visited { color: var(--shell-text); }
.desk-mine b { margin-left: auto; color: var(--shell-text); }
.desk-manage { display: flex; justify-content: center; min-height: 36px; align-items: center; border-radius: 10px; border: 1px solid var(--shell-line); color: var(--shell-accent); text-decoration: none; }
.desk-manage:visited { color: var(--shell-accent); }
.app-shell a:focus-visible, .app-shell button:focus-visible { outline: 2px solid var(--shell-accent); outline-offset: 2px; }
body.app-shell { background: #091526 !important; }
body.app-shell .main-header { background: #0B192B !important; backdrop-filter: none; }
body.app-shell main { background: #0A1728 !important; }
.app-shell .moon-section[hidden] { display: none !important; }
body.auth-screen { background: #091526; margin: 0; }
body.auth-screen .main-header, body.auth-screen .main-footer, body.auth-screen .sky-bg, body.auth-screen .sky-stars, body.auth-screen .sky-fog, body.auth-screen .name-prompt { display: none; }
.login-split { display: grid; grid-template-columns: 1.45fr .72fr; width: 100%; min-height: 100vh; margin: 0; overflow: hidden; background: #0c1830; }
.login-art { position: relative; min-height: 100vh; }
.login-art img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 38%; }
.login-art div { position: absolute; left: 40px; bottom: 42px; max-width: 46%; color: #f4fbff; text-shadow: 0 2px 16px rgba(0, 0, 0, .6); }
.login-art h1 { margin: 0 0 8px; font-size: 40px; }
.login-art h1 span { color: #2AD5E7; }
.login-box { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 36px 32px; }
.login-brand { display: flex; gap: 10px; align-items: center; }
.login-brand img { width: 42px; height: 42px; }
.login-brand b, .login-brand small { display: block; }
.login-brand small { color: #A9BDD2; letter-spacing: .12em; font-size: 11px; }
.login-box h2 { margin: 8px 0 0; font-size: 28px; color: #F3F7FC; }
.login-box label { display: block; margin-bottom: 6px; color: #F3F7FC; font-weight: 700; }
.login-field { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; border: 1px solid #29445F; border-radius: 12px; background: #102033; }
.login-field input { flex: 1; border: 0; background: transparent; color: #F3F7FC; outline: none; }
.login-field button { border: 0; background: transparent; color: #A9BDD2; cursor: pointer; }
.login-row { display: flex; justify-content: space-between; align-items: center; color: #A9BDD2; font-size: 13px; }
.login-row a, .login-row a:visited { color: #9fdfff; }
.login-submit { width: 100%; height: 48px; border: 0; border-radius: 12px; background: #2AD5E7; color: #062033; font-size: 16px; font-weight: 800; cursor: pointer; }
.login-fine { display: flex; justify-content: space-between; color: #A9BDD2; font-size: 13px; }
.login-fine a, .login-fine a:visited { color: #9fdfff; }
@media (max-width: 1180px) {
    .home-layout, .home-split { grid-template-columns: 1fr; }
    .home-rail { display: none; position: fixed; z-index: 45; top: 0; right: 0; width: min(380px, 100%); height: 100vh; max-height: none; overflow: auto; padding: 16px; background: #0C1C30; }
    .home-rail.is-open { display: flex; }
    .desk-toggle { display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 860px) {
    .app-shell .app-frame { grid-template-columns: 1fr; }
    .app-side { display: none; position: fixed; z-index: 50; width: min(280px, 86vw); height: 100vh; }
    .app-side.is-open { display: flex; }
    .app-shell .head-brand .brand-lockup { display: flex; }
    .home-layout { padding: 16px 12px 24px; }
    .home-quick { grid-template-columns: 1fr; }
    .home-banner { height: min(var(--banner-h, 196px), 180px); }
    .home-hello h1, .login-art h1 { font-size: 24px; }
    .login-split { grid-template-columns: 1fr; }
    .login-art { min-height: 220px; }
}
.app-side .menu-ico,
.main-header .menu-ico {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--menu-ico-color, var(--shell-muted));
    line-height: 1;
}
.app-side .menu-ico i,
.app-side .side-link .menu-ico i,
.app-side .nav-toggle .menu-ico i,
.main-header .menu-ico i {
    width: auto;
    flex: none;
    font-size: var(--menu-ico-size, 20px);
    color: inherit;
    line-height: 1;
}
.app-side .menu-svg,
.main-header .menu-svg { width: var(--menu-ico-size, 20px); height: var(--menu-ico-size, 20px); display: block; }
.app-side .menu-ico img,
.main-header .menu-ico img { width: auto; height: auto; max-width: var(--menu-ico-size, 20px); max-height: var(--menu-ico-size, 20px); object-fit: contain; background: transparent; }
.app-side .menu-emoji,
.main-header .menu-emoji { font-size: var(--menu-ico-size, 20px); line-height: 1; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.app-side .is-current > .side-link .menu-ico:not(.is-custom),
.app-side .nav-sub a.is-current .menu-ico:not(.is-custom) { color: var(--shell-accent); }
.app-side .is-current > .side-link .menu-ico.is-custom i,
.app-side .nav-sub a.is-current .menu-ico.is-custom i,
.app-side .is-current > .side-link .menu-ico.is-custom { color: var(--menu-ico-color); }
.app-side .nav-sub a,
.app-side .nav-sub a:visited { display: flex; align-items: center; gap: 8px; padding: 7px 8px; }
.app-side .nav-sub a::before { content: none; }
.app-side .nav-sub a span { min-width: 0; }
.app-side .nav-sub .menu-ico { color: var(--menu-ico-color, #6e8eab); }
.app-side .nav-sub .menu-ico.is-empty::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.main-header .menu-ico { width: 18px; height: 18px; flex-basis: 18px; }
.icon-stage.is-rail .side-link span,
.icon-stage.is-rail .nav-toggle span,
.icon-stage.is-rail .side-caret { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.icon-stage.is-rail .side-link,
.icon-stage.is-rail .nav-toggle { justify-content: center; width: 52px; height: 52px; margin: 4px auto; padding: 0; }
