/* CELESTIAL / BRASS — a separate optional game skin. Original and previous skins are not rewritten. */
:root[data-ui-theme=aegis] { --aegis-gold:#9b7d46;--aegis-navy:#142e3c;--skin-heading:var(--font-cjk);--ui-radius:8px; }
:root[data-ui-theme=aegis] .app-bg { background:radial-gradient(ellipse at 100% 0,#d8e8e0,transparent 55%),#edf1f0; }
:root[data-ui-theme=aegis] :is(.btn,.modal__box,.panel,.mode-card,.diff-card,.seat,.scard,.lo-card,.augment-card) { font-family:var(--font-cjk); }
:root[data-ui-theme=aegis] .btn--primary { background:linear-gradient(115deg,#23686a,#173c4c);color:#fff;border-color:#2b6666;box-shadow:inset 0 1px 0 #d1b67a55,0 4px 12px #173f4a20;clip-path:polygon(0 0,calc(100% - 8px) 0,100% 8px,100% 100%,0 100%); }
:root[data-ui-theme=aegis] .btn--primary:disabled { background:var(--bg-3);color:var(--text-lo);clip-path:none;box-shadow:none; }
:root[data-ui-theme=aegis] :is(.topbar,.stephead) { background:var(--aegis-navy);--text-hi:#f7f6ee;--text-md:#d0dedc;--text-lo:#adc4c5;--text-dim:#adc4c5;--mint-500:#b9d8cf;--mint-400:#d9e9d5;border-bottom:2px solid var(--aegis-gold);box-shadow:0 8px 24px #0e283b13;border-radius:0; }
:root[data-ui-theme=aegis] :is(.topbar,.stephead) .btn:not(.btn--danger) { background:#ffffff08;color:#e0e9e3;border-color:#b6cbc42e; }
:root[data-ui-theme=aegis] :is(.topbar,.stephead) .micro { color:#a9bebc; }
:root[data-ui-theme=aegis] .title-bg { opacity:.08; }
:root[data-ui-theme=aegis] .title-bg__glow { opacity:.25; }
:root[data-ui-theme=aegis] .title-screen { background:linear-gradient(125deg,#eef3ee 0%,#fbfcf7 50%,#dce9e3 100%); }
:root[data-ui-theme=aegis] .title-screen::before { content:'';position:absolute;right:0;bottom:0;width:68vw;height:78vh;pointer-events:none;background:var(--aegis-ribbon) right bottom/contain no-repeat;opacity:.8; }
:root[data-ui-theme=aegis] .title-main { width:min(1160px,90vw);margin:0 auto;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);gap:80px;text-align:left;align-items:center; }
:root[data-ui-theme=aegis] .title-identity { display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:26px 0; }
:root[data-ui-theme=aegis] .title-entry { display:block;min-width:0;position:relative; }
:root[data-ui-theme=aegis] .title-identity .emblem { margin-bottom:26px;transform:scale(.65);transform-origin:left center;height:85px; }
:root[data-ui-theme=aegis] .emblem__bracket { border-color:#9b7d4666; }
:root[data-ui-theme=aegis] .title-en { align-items:flex-start;gap:8px; }
:root[data-ui-theme=aegis] .title-en__a { font-size:14px;letter-spacing:.26em;padding-left:0;color:var(--text-lo); }
:root[data-ui-theme=aegis] .title-en__b { font-size:17px;letter-spacing:.35em;padding-left:0;color:var(--mint-500); }
:root[data-ui-theme=aegis] .title-cn { margin-top:24px;font-size:clamp(38px,4.2vw,63px);letter-spacing:.025em;line-height:1.25;font-weight:800;color:var(--aegis-navy);text-shadow:none; }
:root[data-ui-theme=aegis] .title-cn__colon { display:none; }
:root[data-ui-theme=aegis] .title-cn em { display:block;font-size:.65em;letter-spacing:.34em;margin-top:10px;color:var(--mint-500);text-shadow:none; }
:root[data-ui-theme=aegis] .title-tag { max-width:36ch;font-size:14px;line-height:1.9;letter-spacing:.035em;margin-top:22px; }
:root[data-ui-theme=aegis] .title-edition { display:block;order:-1;font-size:12px;font-weight:600;letter-spacing:.18em;padding:7px 13px;border-left:2px solid var(--aegis-gold);background:#9b7d460d;color:#775d2e;margin-bottom:22px; }
:root[data-ui-theme=aegis] .title-screen .title-login { width:100%;margin:0;padding:28px 25px 22px;gap:20px;background:#fbfcf7;border:1px solid #c3d1c7;border-top:3px solid var(--aegis-gold);border-radius:10px;box-shadow:0 20px 50px #142e3c15;backdrop-filter:none;-webkit-backdrop-filter:none; }
:root[data-ui-theme=aegis] .title-login::before { display:none; }
:root[data-ui-theme=aegis] .title-login .field__box { height:48px;background:#f0f4ef;border-radius:5px; }
:root[data-ui-theme=aegis] .title-login .field__input { font-size:19px;font-weight:600; }
:root[data-ui-theme=aegis] .title-login .field__label { font-size:12px; }
:root[data-ui-theme=aegis] .title-login .btn--xl { min-height:56px;height:auto;padding:14px 20px;font-size:19px;letter-spacing:.15em; }
:root[data-ui-theme=aegis] .title-screen .title-conn { gap:6px;font-size:11px; }
:root[data-ui-theme=aegis] .title-guide { font-size:11px; }
:root[data-ui-theme=aegis] .title-screen .title-assets { width:100%;margin-top:14px;gap:10px; }
:root[data-ui-theme=aegis] .title-assets__item > .btn { min-height:34px;font-size:12px;padding:7px; }
:root[data-ui-theme=aegis] .title-assets__item > small { font-size:10px;line-height:1.55; }
:root[data-ui-theme=aegis] .title-corner .micro,:root[data-ui-theme=aegis] .title-foot { color:var(--text-lo); }
:root[data-ui-theme=aegis] .lobby-body { max-width:1260px;padding:28px 32px;gap:32px;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); }
:root[data-ui-theme=aegis] .mode-cards { grid-template-columns:minmax(0,1fr);gap:14px; }
:root[data-ui-theme=aegis] .mode-card { display:grid;grid-template-columns:66px minmax(0,1fr);align-items:center;gap:18px;min-height:154px;padding:22px;background:var(--bg-1);border:1px solid #c2d1c9;border-radius:8px;box-shadow:0 4px 18px #14383d08; }
:root[data-ui-theme=aegis] .mode-card.is-selected { background:linear-gradient(110deg,#f7fbf6,#e2eeea);border-color:#387875;box-shadow:inset 4px 0 #286d6c,0 7px 20px #14383d0c; }
:root[data-ui-theme=aegis] .mode-card__icon { width:60px;height:60px;clip-path:none;border-radius:12px;background:#e0eae4;color:#326c6b; }
:root[data-ui-theme=aegis] .mode-card__icon .icon { width:30px;height:30px; }
:root[data-ui-theme=aegis] .mode-card__name { font-family:var(--font-cjk);font-size:25px;font-weight:650;letter-spacing:.04em; }
:root[data-ui-theme=aegis] .mode-card__text .micro { font-size:9px;color:var(--text-lo); }
:root[data-ui-theme=aegis] .mode-card__desc { font-size:12px;line-height:1.75; }
:root[data-ui-theme=aegis] .mode-card__points { font-size:11px;gap:4px; }
:root[data-ui-theme=aegis] .mode-card__check { top:12px;right:12px;bottom:auto;font-size:9px;padding:3px 6px;border-radius:3px;background:#286d6c;color:white; }
:root[data-ui-theme=aegis] .mode-card:not(.is-selected) .mode-card__check { display:none; }
:root[data-ui-theme=aegis] .section-label { font-family:var(--font-cjk);font-size:14px;font-weight:600;margin:18px 0 12px; }
:root[data-ui-theme=aegis] .section-label:first-child { margin-top:0; }
:root[data-ui-theme=aegis] .section-label__idx { background:transparent;border:0;color:var(--aegis-gold);font-size:12px; }
:root[data-ui-theme=aegis] .diff-card { background:#fbfcf7;border:1px solid #c7d5cc;border-radius:7px;box-shadow:none;padding:15px 18px; }
:root[data-ui-theme=aegis] .diff-card.is-selected { box-shadow:inset 0 0 0 1px var(--mint-500); }
:root[data-ui-theme=aegis] .diff-card__name { font-size:19px;font-weight:650; }
:root[data-ui-theme=aegis] .diff-card__effects,:root[data-ui-theme=aegis] .diff-card__desc { font-size:11px;line-height:1.6; }
:root[data-ui-theme=aegis] .diff-card__check { width:24px;height:24px; }
:root[data-ui-theme=aegis] .join-panel { padding:18px;background:#fbfcf7;border-radius:8px;box-shadow:none; }
:root[data-ui-theme=aegis] .join-panel.brackets::before,:root[data-ui-theme=aegis] .join-panel.brackets::after { display:none; }
:root[data-ui-theme=aegis] .join-row .btn { min-height:40px;font-size:12px;padding:8px 12px; }
:root[data-ui-theme=aegis] .join-row .field--code .field__box { height:40px; }
:root[data-ui-theme=aegis] .join-row .field__input { font-size:20px;letter-spacing:.2em; }
:root[data-ui-theme=aegis] .tips { border:0;border-left:2px solid #9b7d4666;background:#e7ece5;padding:14px 18px;box-shadow:none;border-radius:0 6px 6px 0; }
:root[data-ui-theme=aegis] .create-box { background:transparent;padding-top:18px; }
:root[data-ui-theme=aegis] .create-box > .btn { min-height:52px;font-size:18px; }
:root[data-ui-theme=aegis] .room-capacity { background:#e4ebe5;border-bottom:1px solid #c3d1c7; }
:root[data-ui-theme=aegis] .room-bar { background:#fbfcf7;border-top:1px solid #c3d1c7;border-radius:0; }
:root[data-ui-theme=aegis] .invite { border:0;border-left:1px solid #9b7d4655;background:transparent; }
:root[data-ui-theme=aegis] .invite.brackets::before,:root[data-ui-theme=aegis] .invite.brackets::after { display:none; }
:root[data-ui-theme=aegis] .invite__code span { background:#ffffff0d;border-bottom:1px solid #c9af76;color:#eadbbc;font-size:30px; }
:root[data-ui-theme=aegis] .seat { border:1px solid #c2d1c9;border-top:3px solid #9b7d4688;border-radius:9px;background:#fbfcf7;box-shadow:0 8px 24px #173b440c; }
:root[data-ui-theme=aegis] .seat.brackets::before,:root[data-ui-theme=aegis] .seat.brackets::after { display:none; }
:root[data-ui-theme=aegis] .seat__art { background:radial-gradient(ellipse at 50% 40%,#c9ddd3,#e8efea 65%);border:1px solid #cfdbd2;border-radius:5px; }
:root[data-ui-theme=aegis] .seat__stripes { display:none; }
:root[data-ui-theme=aegis] .seat__name { font-size:max(16px,calc(.23 * var(--t))); }
:root[data-ui-theme=aegis] .seat__bot-label { background:#dfece6;color:#3e6569;border-color:#b2cbc1;border-radius:3px; }
:root[data-ui-theme=aegis] .seat__foot { border-color:#d1ddd4; }
:root[data-ui-theme=aegis] .modal__box { background:#fbfcf7;border-radius:10px;border:1px solid #bbcdc2;border-top:2px solid #a68b54;box-shadow:0 22px 70px #102b3a2b; }
:root[data-ui-theme=aegis] .settings-dialog__nav { background:#e5ede6; }
:root[data-ui-theme=aegis] .settings-dialog__nav button.is-current { background:#fbfcf7;border-left:3px solid #9b7d46;color:#245b60; }
:root[data-ui-theme=aegis] .augment-card { background:linear-gradient(155deg,#fbfcf7,#e3ece5);border-radius:8px;border-top:3px solid #9b7d46;box-shadow:0 6px 18px #173b4410; }
:root[data-ui-theme=aegis] .augment-card h3 { font-family:var(--font-cjk);font-size:23px;font-weight:650; }
:root[data-ui-theme=aegis] .augment-card.is-selected { background:#dcece4;box-shadow:inset 0 0 0 1px #236b69; }
:root[data-ui-theme=aegis] :is(.lo,.st,.settle) { background-color:#edf1f0; }
:root[data-ui-theme=aegis] :is(.lo-card,.lo-detail,.st-card,.st-record,.dpanel,.bpop,.edrawer,.rcard) { border-color:#bbcdc2;border-radius:6px;box-shadow:0 4px 16px #173b440a; }
:root[data-ui-theme=aegis] :is(.gtop__center,.team,.gm__corner,.pbanner__band) { border-color:#a68b54; }
.ui-theme-scope[data-ui-theme=aegis] { --skin-heading:var(--font-cjk);--skin-radius:8px; }
.ui-theme-scope[data-ui-theme=aegis] .theme-specimen__head { border-top:2px solid #9b7d46; }
@media(max-width:980px),(max-height:650px) {
 :root[data-ui-theme=aegis] .title-main { width:92vw;grid-template-columns:minmax(0,1fr) minmax(320px,.95fr);gap:30px; }
 :root[data-ui-theme=aegis] .title-identity .emblem { display:none; }
 :root[data-ui-theme=aegis] .title-identity { padding:12px 0; }
 :root[data-ui-theme=aegis] .title-cn { font-size:34px;margin-top:16px; }
 :root[data-ui-theme=aegis] .title-tag { font-size:12px; }
 :root[data-ui-theme=aegis] .title-screen .title-login { padding:18px 16px;gap:13px; }
 :root[data-ui-theme=aegis] .lobby-body { padding:18px;gap:20px; }
 :root[data-ui-theme=aegis] .mode-card { padding:14px;min-height:142px;grid-template-columns:44px minmax(0,1fr);gap:12px; }
 :root[data-ui-theme=aegis] .mode-card__icon { width:40px;height:40px; }
 :root[data-ui-theme=aegis] .mode-card__name { font-size:20px; }
}
@media(max-width:700px) {
 :root[data-ui-theme=aegis] .title-main { grid-template-columns:minmax(0,1fr);width:min(450px,91vw);gap:18px; }
 :root[data-ui-theme=aegis] .title-identity { display:none; }
 :root[data-ui-theme=aegis] .title-screen .title-assets { grid-template-columns:1fr 1fr; }
 :root[data-ui-theme=aegis] .lobby-body { grid-template-columns:1fr; }
 :root[data-ui-theme=aegis] .mode-cards { grid-template-columns:1fr 1fr; }
}

:root[data-ui-theme=aegis] {--aegis-ribbon:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20700%20650%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22a%22%20x2%3D%221%22%20y2%3D%221%22%3E%3Cstop%20stop-color%3D%22%23d6dfcd%22%2F%3E%3Cstop%20offset%3D%22.55%22%20stop-color%3D%22%2399c5bc%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23245c68%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22b%22%3E%3Cstop%20stop-color%3D%22%23d9c596%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23a48750%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M720%2080C270%2020%20700%20420%2060%20650h660C380%20390%20790%20350%20720%2080Z%22%20fill%3D%22url(%23a)%22%20opacity%3D%22.17%22%2F%3E%3Cpath%20d%3D%22M700%200C440%20190%20740%20260%20200%20660h90C770%20310%20500%20180%20700%2040Z%22%20fill%3D%22url(%23b)%22%20opacity%3D%22.14%22%2F%3E%3Cpath%20d%3D%22M710%20210C430%20250%20650%20530%20300%20650%22%20fill%3D%22none%22%20stroke%3D%22%237c9b94%22%20stroke-width%3D%221%22%20opacity%3D%22.22%22%2F%3E%3C%2Fsvg%3E');}
:root[data-ui-theme=aegis] .emblem__svg { filter:none; }
:root[data-ui-theme=aegis] .emblem__svg circle { fill:#2e696b;opacity:.5; }
:root[data-ui-theme=aegis] .emblem__svg circle.is-accent { fill:var(--aegis-gold);opacity:1;filter:none; }
/* Keep header contrast independent of the generic panel-surface rule. */
:root[data-ui-theme=aegis] .screen :is(.topbar,.stephead) { background:var(--aegis-navy);border-bottom:2px solid var(--aegis-gold); }
:root[data-ui-theme=aegis] .topbar .me-chip { background:#ffffff0b;border:1px solid #a9bebc33;color:#e5eeea; }
@media(max-width:700px) {
 :root[data-ui-theme=aegis] .title-identity { display:block;padding:0;text-align:center; }
 :root[data-ui-theme=aegis] .title-identity :is(.emblem,.title-en,.title-tag,.title-edition) { display:none; }
 :root[data-ui-theme=aegis] .title-identity .title-cn { margin:0;font-size:26px;line-height:1.3; }
 :root[data-ui-theme=aegis] .title-identity .title-cn em { display:inline;font-size:.7em;letter-spacing:.1em;margin:0 0 0 8px; }
}
@media(max-height:520px) {
 :root[data-ui-theme=aegis] .title-main { gap:20px; }
 :root[data-ui-theme=aegis] .title-screen .title-login { padding:12px 16px;gap:10px; }
 :root[data-ui-theme=aegis] .title-login .field__box { height:40px; }
 :root[data-ui-theme=aegis] .title-login .btn--xl { min-height:42px;padding:9px 16px;font-size:17px; }
 :root[data-ui-theme=aegis] .title-assets__item > small { display:none; }
 :root[data-ui-theme=aegis] .title-assets__item > .btn { min-height:30px;padding:5px;font-size:11px; }
}
:root[data-ui-theme=aegis] .seat .avatar__img { background:linear-gradient(145deg,#e6eee8,#cadcd2); }
:root[data-ui-theme=aegis] .seat .avatar__glyph { color:#2a5d60;text-shadow:none; }
:root[data-ui-theme=aegis] .seat .avatar__bot { color:#477678;filter:none; }
:root[data-ui-theme=aegis] .seat .avatar { border-color:#779c92;box-shadow:0 5px 16px #173b4414; }
:root[data-ui-theme=aegis] .dpick { gap:5px; }
:root[data-ui-theme=aegis] .dpick__opt { background:var(--bg-2);border:1px solid var(--line);border-radius:4px; }
:root[data-ui-theme=aegis] .dpick__opt.is-active { background:#e6eee5;border-color:var(--mint-500); }
:root[data-ui-theme=aegis] .seat.is-ready::before { background:#518b79;box-shadow:none; }
:root[data-ui-theme=aegis] .seat.is-me { box-shadow:0 0 0 1px #387875,0 8px 24px #173b4410; }
@media(max-height:520px) {
 :root[data-ui-theme=aegis] .title-main { margin-top:-22px; }
 :root[data-ui-theme=aegis] .title-foot { left:18px;right:18px;bottom:5px;flex-wrap:nowrap;gap:10px;font-size:8px; }
 :root[data-ui-theme=aegis] .title-foot > span:not(.title-foot__meta) { display:none; }
 :root[data-ui-theme=aegis] .title-foot__meta { margin-left:auto;flex-wrap:nowrap;gap:10px; }
 :root[data-ui-theme=aegis] .title-foot .micro { font-size:8px; }
 :root[data-ui-theme=aegis] .title-plugins { font-size:8px;padding:3px 6px;white-space:nowrap; }
}
