/* SKYLINE — Pages: mission flow, desks, lobby, planes, block editor, rooms, hangar, profile, new pilot, GM desk. */
/* ================================================================ mission flow (MIS) */
#hd-mission { font: 600 12px var(--head); color: var(--accent); letter-spacing: .04em; }
#mission-card { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 9; width: min(560px, 90%);
  max-height: 84%; overflow: auto; padding: 18px 20px; border-radius: 12px; background: var(--glass); border: 1px solid var(--accent);
  box-shadow: 0 20px 60px rgba(0,0,0,.55); color: var(--text); }
#mission-card h2 { font-size: 24px; letter-spacing: .03em; margin-bottom: 6px; }
.mis-k { font: 700 11px var(--head); letter-spacing: .22em; color: var(--accent); }
.mis-text { white-space: pre-wrap; line-height: 1.6; margin: 10px 0; font-size: 15px; }
.mis-obj { list-style: none; padding: 0; margin: 8px 0; } .mis-obj li { padding: 3px 0; } .mis-obj li.ok { color: var(--good); }
.mis-steps { display: flex; gap: 4px; margin: 6px 0 4px; flex-wrap: wrap; }
.mis-steps span { font: 600 10px var(--head); letter-spacing: .1em; text-transform: uppercase; padding: 2px 8px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--muted); }
.mis-steps span.done { color: var(--text); border-color: var(--muted); } .mis-steps span.on { background: var(--accent); color: var(--onacc); border-color: var(--accent); }
.mis-ld { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 8px 34px; margin: 6px 0; border: 1px solid var(--line); border-radius: 8px;
  position: relative; cursor: pointer; color: var(--text); }
.mis-ld input { position: absolute; left: 10px; top: 11px; width: auto; }
.mis-ld.sel { border-color: var(--accent); background: var(--soft); }
.mis-rep { padding: 8px 0; border-top: 1px solid var(--line); } .mis-rep .xp { float: right; font: 700 15px var(--head); color: var(--good); }
#mission-banner { position: absolute; inset: 0; z-index: 10; display: grid; place-content: center; text-align: center; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.55) 30%, rgba(0,0,0,.55) 70%, transparent); }
#mission-banner div { font: 800 72px var(--head); letter-spacing: .3em; color: #fff; text-shadow: 0 0 30px var(--accent); }
#mission-banner small { font: 600 16px var(--head); letter-spacing: .2em; color: #cfd8dc; }
#mission-banner.on { animation: sortie 3.2s ease forwards; }
@keyframes sortie { 0% { opacity: 0; transform: scale(1.3); } 12%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
table.mini { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 12px; }
table.mini th, table.mini td { border-bottom: 1px solid var(--line); padding: 3px 4px; text-align: left; }
table.mini button { padding: 0 6px; font-size: 11px; }

/* pilot desk (Sheet) + GM Pilots desk + soundboard */
#pdesk section { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
#pdesk details summary { cursor: pointer; color: var(--accent); margin: 6px 0; }
.ok { color: var(--good); } .bad { color: var(--bad); }
.hreq b { text-transform: uppercase; font: 600 10px var(--head); letter-spacing: .08em; margin-right: 4px; }
.hreq.approved b { color: var(--good); } .hreq.rejected b { color: var(--bad); } .hreq.pending b { color: var(--warn); }
.hq { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin: 6px 0; }
#ic-board { display: flex; gap: 4px; flex-wrap: wrap; }
#ic-board button { padding: 1px 8px; }
.clip-slot { display: flex; gap: 4px; align-items: center; }
.clip-slot .play { padding: 2px 7px; }
#ic-board { padding: 4px 10px 0; }
/* ================================================================ Lobby (NAV-01), page fade (NAV-03), YouTube mini player (MED-02) */
#lobby { position: fixed; inset: 44px 0 0 0; z-index: 30; overflow: hidden; display: grid; grid-template-columns: 1fr var(--lbw); --lbw: clamp(340px, 40vw, 620px); }
.lb-bg { position: absolute; inset: 0; background: linear-gradient(180deg,#1b2430 0%,#2c3a4a 55%,#3b4652 56%,#22282f 100%); }
.lb-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 40%, transparent 30%, rgba(0,0,0,.55)); }
.lb-me { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 4vh; }
.lb-me img { max-height: 72vh; max-width: 90%; object-fit: contain; filter: drop-shadow(0 10px 30px rgba(0,0,0,.6)); animation: lbin .7s ease; }
.lb-sil { width: 220px; height: 60vh; border-radius: 110px 110px 20px 20px; background: linear-gradient(180deg, var(--accent), transparent); opacity: .35; }
.lb-name { font: 700 26px var(--head); color: #fff; text-shadow: 0 2px 10px #000; text-align: center; margin-top: 6px; }
.lb-name small { display: block; font: 500 13px var(--body); color: #cfd8dc; }
.lb-menu { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 14px 22px; background: linear-gradient(90deg, transparent, rgba(0,0,0,.45) 25%);
  overflow-y: auto; scrollbar-width: thin; }
.lb-grp { display: flex; flex-direction: column; gap: 4px; }
.lb-gk { font: 700 10px var(--head); letter-spacing: .28em; color: var(--muted); margin-top: 2px; }
.lb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lb-grid .lb-go.live, .lb-grp.top .lb-go:last-child:nth-child(odd) { grid-column: 1 / -1; }
.lb-k { font: 700 11px var(--head); letter-spacing: .3em; color: var(--accent); margin-bottom: 4px; }
.lb-go { text-align: left; padding: 8px 12px; border-radius: 9px; background: var(--glass); border: 1px solid var(--line); animation: lbin .5s ease backwards; min-width: 0; }
.lb-go:nth-child(3) { animation-delay: .05s; } .lb-go:nth-child(4) { animation-delay: .1s; } .lb-go:nth-child(5) { animation-delay: .15s; } .lb-go:nth-child(6) { animation-delay: .2s; }
.lb-go b { display: block; font: 700 15px var(--head); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-go span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-height: 720px) { .lb-go { padding: 6px 10px; } .lb-go b { font-size: 14px; } .lb-go span { display: none; } .lb-menu { gap: 6px; } }
.lb-go:hover { border-color: var(--accent); transform: translateY(-2px); } .lb-go.live { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
@keyframes lbin { from { opacity: 0; transform: translateX(20px); } }
@media (max-width: 760px) { #lobby { grid-template-columns: 1fr; grid-template-rows: 28vh 1fr; } .lb-me img { max-height: 26vh; } .lb-menu { background: rgba(0,0,0,.55); justify-content: flex-start; } .lb-go span { display: none; } }
#page-fade { position: fixed; inset: 0; z-index: 60; background: #000; opacity: 0; pointer-events: none; }
#page-fade.on { animation: pfade .45s ease; }
@keyframes pfade { 0% { opacity: 0; } 35% { opacity: .85; } 100% { opacity: 0; } }
#yt-mini { position: fixed; right: 12px; bottom: 12px; z-index: 35; width: 212px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
#yt-mini.big { width: 412px; } #yt-mini.big iframe { width: 400px !important; height: 225px !important; }
#yt-mini.min #yt-player, #yt-mini.min iframe { height: 0 !important; overflow: hidden; }
.yt-bar { display: flex; gap: 4px; align-items: center; font-size: 11px; margin-bottom: 3px; } .yt-bar span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.yt-bar button { padding: 0 6px; }
.art-prev { display: flex; gap: 4px; margin: 4px 0; } .art-prev img { width: 48px; height: 64px; object-fit: contain; background: var(--input); border-radius: 4px; }

/* planes (airframes) + skill groups */
.planes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.plane { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.plane b { color: var(--text); font-size: 14px; } .plane.sel { border-color: var(--accent); background: var(--soft); }
.pl-stats { font: 600 11px var(--head); color: var(--accent); letter-spacing: .04em; }
.pl-trait { color: var(--text); } .pl-trait b { color: var(--warn); }
.sk-group { grid-column: 1 / -1; font: 700 11px var(--head); letter-spacing: .14em; color: var(--accent); margin-top: 6px; text-transform: uppercase; }
.skill.sel { background: var(--soft); }
.sk-line { margin: 3px 0; }

/* block editor (Maker skills + plane traits) */
.bk { border: 1px dashed var(--line); border-radius: 8px; padding: 8px; margin: 6px 0; display: flex; flex-direction: column; gap: 6px; }
.bk-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .bk-row label { margin: 0; }
.bk-cond { display: flex; flex-wrap: wrap; gap: 2px 12px; } .bk-cond .radio { margin: 0; }
.bk-eff { display: grid; grid-template-columns: 210px 70px 150px 1fr 30px; gap: 6px; align-items: center; }
.bk-eff > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-meter { height: 6px; border-radius: 3px; background: var(--input); overflow: hidden; margin-top: 4px; }
.bk-meter span { display: block; height: 100%; background: var(--good); } .bk-meter.over span { background: var(--bad); }
.mk-trait { border-left: 3px solid var(--warn); padding-left: 8px; margin: 8px 0; }
@media (max-width: 900px) { .bk-row { grid-template-columns: 1fr; } .bk-eff { grid-template-columns: 1fr 70px; } }

/* ================================================================ full pages (PG-01/02, ROOM-01) */
.page { position: fixed; inset: 44px 0 0 0; z-index: 31; background: radial-gradient(ellipse at 20% 0%, #16263a 0%, var(--bg) 60%); overflow: auto; animation: pgin .25s ease; }
@keyframes pgin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pg-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: rgba(11,15,22,.92);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.pg-head > b { font: 700 18px var(--head); letter-spacing: 3px; color: var(--accent); }
.pg-tools { margin-left: auto; display: flex; gap: 6px; }
.pg-body { max-width: 1180px; margin: 0 auto; padding: 18px; }
.card.pg-card { width: auto; padding: 16px; border-radius: 10px; }
.page .label { margin-top: 12px; }
.page .label:first-child { margin-top: 0; }
/* rooms */
.rm-list { display: flex; flex-direction: column; gap: 10px; }
#rm-form { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.rm-card { display: grid; grid-template-columns: 180px 1fr auto; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px; transition: border-color .15s; }
.rm-card:hover { border-color: #3a4d68; }
.rm-card.live { border-left: 3px solid var(--good); }
.rm-card.here { box-shadow: 0 0 0 1px var(--accent) inset; }
.rm-card.closed { opacity: .65; }
.rm-pic { position: relative; height: 100px; border-radius: 7px; background: linear-gradient(160deg, #1d2b3d, #0d141e) center/cover; }
.rm-acc { position: absolute; left: 6px; top: 6px; font-size: 11px; padding: 2px 7px; border-radius: 10px; background: rgba(0,0,0,.65); }
.rm-acc.gm { color: var(--warn); } .rm-acc.shut { left: auto; right: 6px; color: var(--bad); }
.rm-info b { font: 600 16px var(--head); }
.rm-info small { display: block; }
.rm-info p { margin: 4px 0; font-size: 13px; }
.rm-last { font-size: 12px; color: #c5d1de; font-style: italic; margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 560px; }
.rm-on { font-size: 12px; }
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 6px; box-shadow: 0 0 6px var(--good); }
.rm-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 140px; }
.rm-act input { width: 160px; }
.rm-tools { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
button.danger { border-color: var(--bad); color: #ffb3b1; }
@media (max-width: 760px) { .rm-card { grid-template-columns: 1fr; } .rm-pic { height: 80px; } }
/* hangar */
.hg-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; align-items: start; }
.hg-wide { grid-column: 1 / -1; }
.hg-top { display: flex; gap: 16px; align-items: center; }
.hg-jet { width: 150px; flex: 0 0 auto; fill: var(--accent); opacity: .85; filter: drop-shadow(0 6px 14px rgba(79,195,247,.35)); }
.hg-name { font: 700 24px var(--head); }
.hg-stats { display: grid; grid-template-columns: 80px 1fr 38px; gap: 6px 10px; align-items: center; margin: 12px 0 8px; font-size: 13px; }
.hg-stats.sm { grid-template-columns: 34px 1fr 30px; font-size: 12px; margin: 8px 0; }
.hg-bar { height: 8px; border-radius: 4px; background: #0d131d; border: 1px solid var(--line); overflow: hidden; }
.hg-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2b8fc0, var(--accent)); }
.hg-wpns { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.hg-wpn { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.hg-wpn b { color: var(--text); font-size: 13px; }
.hg-wpn.sp { border-color: var(--warn); }
.hg-wpn em { color: #c5d1de; margin-top: 3px; }
.hg-fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.hg-plane { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.hg-plane.on { border-color: var(--good); }
#page-hangar #pd-hangar-now { display: none; }
@media (max-width: 860px) { .hg-grid, .pf-grid { grid-template-columns: 1fr; } }
/* profile */
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.pf-idcard { padding: 0 !important; overflow: hidden; }
.pf-banner { height: 110px; background: linear-gradient(120deg, #0f3b57, #182435) center/cover; }
.pf-who { display: flex; gap: 14px; align-items: flex-end; padding: 0 16px; margin-top: -46px; }
.pf-who img, .lb-sil.sm { width: 96px; height: 96px; object-fit: cover; object-position: top; border-radius: 12px; border: 3px solid var(--panel); background: var(--panel2); }
.lb-sil.sm { opacity: .5; }
.pf-name { font: 700 22px var(--head); }
.pf-bio { padding: 0 16px 14px; white-space: pre-wrap; }
.pf-idcard > :last-child { padding-bottom: 14px; }
.pf-acc { grid-column: 1 / -1; }
.pf-acc .card { width: auto; max-height: none; }
.vn-only-note { display: none; }
.vn-room .vn-only-note { display: block; }
.vn-room #pd-bond-form { display: none; }
/* VN room: the Host gets the stage tools only */
.vn-room #gm-nav [data-g=combat], .vn-room #gm-nav [data-g=pilots], .vn-room #gm-nav [data-g=admin],
.vn-room #tabs [data-tab=plan], .vn-room #tab-gm .box:has(#gm-script), .vn-room #mission-card { display: none !important; }
#hd-room { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.pf-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#page-hangar #pd-hangar-form .row { flex-wrap: wrap; }
#page-hangar #pd-hangar-form select, #page-hangar #pd-hangar-form input[type=number] { width: auto; }
#page-hangar #pd-hangar-form #hr-name { width: auto; flex: 1; min-width: 140px; }
#lg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
#login > .keyart, #login > .lg-side { position: relative; z-index: 1; }
#login.has-art .keyart > * { display: none; }
.key-prev { margin: 6px 0; }
.key-prev img, .key-prev video { width: 100%; max-height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
/* new pilot (CHR-01 v2) */
.cc-card { width: min(720px, 94vw); }
.cc-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.cc-head b { font: 800 22px var(--head); letter-spacing: .2em; color: var(--accent); }
.cc-grid { display: grid; grid-template-columns: 180px 1fr; gap: 18px; }
.cc-avatar { width: 180px; height: 230px; border: 2px dashed var(--line); border-radius: 10px; display: grid; place-items: center; align-content: center;
  font-size: 40px; color: var(--muted); cursor: pointer; overflow: hidden; background: #0d131d; }
.cc-avatar small { font-size: 12px; }
.cc-avatar:hover { border-color: var(--accent); }
.cc-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (max-width: 600px) { .cc-grid { grid-template-columns: 1fr; } .cc-avatar { width: 100%; height: 160px; } }
.pf-sk { max-height: 420px; overflow: auto; }
.mk-bi { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; margin: 4px 0; display: flex; flex-direction: column; gap: 4px; }
.mk-bi .row input { flex: 1; }
.mk-bi.gone { opacity: .6; border-style: dashed; }
.nowrap { white-space: nowrap; }
/* PG-01 v2: Hangar as an ASSEMBLY screen (ref: Armored Core VI) */
#page-hangar { background: #0a1220; }
.hg-asm { position: relative; display: grid; grid-template-columns: minmax(260px, 340px) 1fr; grid-template-rows: 1fr auto auto; gap: 0 20px;
  min-height: calc(100vh - 44px - 58px); padding: 18px 28px 10px; overflow: hidden;
  background: radial-gradient(ellipse at 62% 40%, rgba(60,110,170,.28), transparent 60%),
    linear-gradient(rgba(120,170,220,.05) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(120,170,220,.05) 1px, transparent 1px) 0 0 / 28px 100%, #0b1626; }
.asm-list { grid-row: 1 / 3; z-index: 2; display: flex; flex-direction: column; gap: 3px; }
.asm-h { font: 800 22px var(--head); letter-spacing: .14em; color: #fff; padding: 6px 14px; margin-bottom: 8px;
  background: linear-gradient(90deg, rgba(110,150,200,.35), transparent); border-left: 3px solid #fff; clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); }
.asm-sec { font: 700 10px var(--head); letter-spacing: .24em; color: #8fa6bf; margin: 10px 0 2px; padding-left: 4px; border-bottom: 1px solid rgba(143,166,191,.25); }
.asm-row { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 5px 10px; border-radius: 0;
  background: rgba(20,34,52,.72); border: 1px solid rgba(143,166,191,.18); transition: background .12s, border-color .12s; }
.asm-row:hover { background: rgba(40,64,94,.8); }
.asm-row.on { background: linear-gradient(90deg, rgba(190,210,230,.9), rgba(140,165,190,.75)); border-color: #fff; }
.asm-row.on .tx b, .asm-row.on .tx small, .asm-row.on .ic { color: #0b1626; }
.asm-row .ic { width: 34px; height: 26px; display: grid; place-items: center; font-size: 16px; color: #cfe3f7; border: 1px solid rgba(207,227,247,.35); }
.asm-row .tx { display: flex; flex-direction: column; min-width: 0; }
.asm-row .tx small { font: 600 9px var(--head); letter-spacing: .16em; color: #8fa6bf; }
.asm-row .tx b { font: 700 14px var(--head); letter-spacing: .04em; color: #eaf2fb; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asm-view { grid-row: 1 / 3; position: relative; display: grid; place-items: center; min-height: 420px; }
.asm-grid { position: absolute; left: 10%; right: 0; bottom: 6%; height: 34%; transform: perspective(500px) rotateX(62deg);
  background: linear-gradient(rgba(120,190,255,.25) 1px, transparent 1px) 0 0 / 100% 22px, linear-gradient(90deg, rgba(120,190,255,.25) 1px, transparent 1px) 0 0 / 22px 100%;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%); mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%); }
.asm-jet { position: relative; width: min(620px, 92%); filter: drop-shadow(0 30px 30px rgba(0,0,0,.55)) drop-shadow(0 0 22px rgba(79,195,247,.25)); animation: asmfloat 6s ease-in-out infinite; transform: rotate(-24deg); }
.asm-jet .body { fill: url(#hjb); stroke: #0b1626; stroke-width: 2; }
.asm-jet .line { fill: none; stroke: rgba(11,22,38,.35); stroke-width: 2; }
.asm-jet .canopy { fill: #2b6aa8; stroke: #0b1626; stroke-width: 2; }
.asm-jet .accent { fill: none; stroke: #39b8ff; stroke-width: 4; stroke-linecap: round; }
@keyframes asmfloat { 50% { transform: rotate(-22deg) translateY(-8px); } }
.asm-name { position: absolute; left: 4%; bottom: 2%; font: 600 13px var(--head); letter-spacing: .12em; color: #8fa6bf; text-transform: uppercase; }
.asm-name small { font-size: 10px; margin-right: 8px; }
.asm-part { position: absolute; left: 4%; top: 2%; width: min(320px, 60%); padding: 10px 14px; background: rgba(10,20,34,.78); border: 1px solid rgba(143,166,191,.3); }
.asm-part .ap-cat { font: 600 9px var(--head); letter-spacing: .2em; color: #8fa6bf; }
.asm-part .ap-t { font: 800 18px var(--head); text-transform: uppercase; color: #fff; }
.asm-part .ap-x { font-size: 12px; color: #c5d1de; margin: 3px 0 6px; }
.asm-part .ap-r { display: flex; justify-content: space-between; font: 600 12px var(--head); color: #c5d1de; border-top: 1px solid rgba(143,166,191,.15); padding: 2px 0; }
.asm-part .ap-r b { color: #fff; }
.asm-spec { position: absolute; right: 28px; bottom: 54px; width: min(380px, 40%); z-index: 2; padding: 10px 14px; background: rgba(14,26,44,.85); border: 1px solid rgba(143,166,191,.35); }
.sp-h { font: 700 11px var(--head); letter-spacing: .2em; color: #cfe3f7; margin-bottom: 4px; }
.sp-r { display: grid; grid-template-columns: 1fr 18px 50px 110px; align-items: center; gap: 6px; font: 600 13px var(--head); color: #dbe6f2; padding: 2px 0; border-bottom: 1px solid rgba(143,166,191,.12); }
.sp-r > span:nth-child(2) { color: #8fa6bf; }
.sp-r b { text-align: right; color: #fff; }
.sp-bar { height: 5px; background: rgba(255,255,255,.12); position: relative; }
.sp-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #eaf2fb; }
.asm-keys { grid-column: 1 / -1; display: flex; gap: 22px; justify-content: center; font: 600 12px var(--head); color: #c5d1de; padding: 8px 0 0; }
.asm-keys kbd { display: inline-block; min-width: 20px; padding: 0 6px; margin-right: 6px; border-radius: 10px; background: #e9eef3; color: #0b1626; font: 700 11px var(--head); text-align: center; }
.hg-more { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 900px) { .hg-asm { grid-template-columns: 1fr; } .asm-list { grid-row: auto; } .asm-view { grid-row: auto; min-height: 300px; }
  .asm-spec { position: relative; right: auto; bottom: auto; width: auto; margin-top: 10px; } .hg-more { grid-template-columns: 1fr; } }
/* GM desk page */
.gmp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.gmp-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; text-align: left; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
.gmp-tile b { font: 800 30px var(--head); line-height: 1; } .gmp-tile span { font: 700 13px var(--head); } .gmp-tile small { color: var(--muted); font-size: 11px; }
.gmp-tile.hot { border-color: var(--warn); } .gmp-tile.hot b { color: var(--warn); }
.gmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.gmp-grid #gmp-acc, .gmp-grid #gmp-pilots { grid-column: 1 / -1; }
.gmp-box { margin-bottom: 12px; }
.gmp-t { width: 100%; border-collapse: collapse; } .gmp-t th { text-align: left; color: var(--muted); font-weight: 600; } .gmp-t td, .gmp-t th { padding: 4px 6px; border-bottom: 1px solid var(--line); }
.gmp-pl { width: 34px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 6px; }
.gmp-room { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid var(--line); }
.gmp-room button { margin-left: auto; }
@media (max-width: 860px) { .gmp-grid { grid-template-columns: 1fr; } }
#stage.combat #dialogue.comm { max-height: none; min-height: 124px; padding: 22px 18px 12px 130px; }
#rolling button { margin-left: 6px; padding: 1px 7px; font-size: 11px; } #rolling { pointer-events: auto; }

/* BRF-01..05 the Ace Combat briefing screen */
#brief-ac { position: fixed; inset: 0; z-index: 60; color: #d9ecff; font-family: "Share Tech Mono", "Orbitron", ui-monospace, monospace;
  text-transform: uppercase; letter-spacing: .12em; display: grid; overflow: hidden;
  grid-template-columns: minmax(200px, 23%) 1fr minmax(200px, 23%); grid-template-rows: 64px 1fr 120px;
  grid-template-areas: "top top top" "l map r" "sub sub sub"; gap: 0 2.2%; padding: 0 3%; animation: ac-in .6s ease both; }
#brief-ac.hidden { display: none; }
@keyframes ac-in { from { opacity: 0; filter: brightness(2) blur(2px); } to { opacity: 1; filter: none; } }
#brief-ac .ac-bg { position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(ellipse at 50% 45%, rgba(20,60,130,.0) 40%, rgba(0,4,16,.75) 100%),
    linear-gradient(rgba(90,150,240,.10) 1px, transparent 1px) 0 0 / 12.5vw 12.5vw,
    linear-gradient(90deg, rgba(90,150,240,.10) 1px, transparent 1px) 0 0 / 12.5vw 12.5vw,
    linear-gradient(rgba(60,110,200,.05) 1px, transparent 1px) 0 0 / 2.5vw 2.5vw,
    linear-gradient(90deg, rgba(60,110,200,.05) 1px, transparent 1px) 0 0 / 2.5vw 2.5vw,
    linear-gradient(160deg, #0a2a63, #061a44 55%, #04122f); }
#brief-ac .ac-scan { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(transparent 0 2px, rgba(0,0,0,.18) 2px 3px); mix-blend-mode: multiply; }
.ac-top { grid-area: top; position: relative; font-size: 13px; color: #cfe6ff; }
.ac-top > * { position: absolute; top: 22px; }
.ac-chev { font-size: 30px; color: #9cc6ff; top: 8px !important; } .ac-chev.up { left: 1%; } .ac-chev.dn { left: 22%; } .ac-chev.tri { right: 1%; }
.ac-num { left: 7%; } .ac-num.r { left: auto; right: 7%; }
.ac-arw { font-size: 28px; color: #7fb2ff; top: 10px !important; } .ac-arw.l { left: 41%; } .ac-arw.r { right: 41%; }
.ac-side { display: flex; flex-direction: column; gap: 18px; padding-top: 26px; }
.ac-side.l { grid-area: l; } .ac-side.r { grid-area: r; }
.ac-box { border: 1.5px solid rgba(200,225,255,.75); padding: 12px 14px; font-size: clamp(12px, 1.25vw, 18px); line-height: 1.35;
  box-shadow: 0 0 10px rgba(80,150,255,.25), inset 0 0 18px rgba(40,100,220,.18); background: rgba(6,24,60,.35); min-height: 96px; }
.ac-box.tall { min-height: 250px; } .ac-box b { font-weight: 500; color: #fff; }
.ac-hl { display: inline-block; background: #d7ecff; color: #0a2a63; padding: 0 6px; margin-top: 2px; animation: ac-blink 1.4s steps(2) infinite; }
.ac-code { color: #ffb74d; margin-top: 4px; }
@keyframes ac-blink { 50% { opacity: .45; } }
.ac-map { grid-area: map; position: relative; border: 2px solid #ff5a6a; box-shadow: 0 0 0 1px rgba(255,255,255,.65) inset, 0 0 22px rgba(255,80,100,.35);
  margin-top: 18px; background: rgba(4,18,48,.55); }
.ac-map::before { content: ""; position: absolute; left: -2px; right: -2px; top: -2px; height: 2px; background: #fff; box-shadow: 0 0 10px #9cf; }
.ac-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ac-tag { position: absolute; left: 14px; top: 10px; z-index: 2; font-size: 11px; color: #ff5a6a; border: 1px solid #ff5a6a; padding: 0 5px; animation: ac-blink 1s steps(2) infinite; }
.ac-x { position: absolute; right: -11px; top: -14px; z-index: 2; font-size: 22px; color: #fff; text-shadow: 0 0 10px #7cf, 0 0 20px #7cf; }
.ac-map .cmp { position: absolute; font-style: normal; color: #6fa8ff; font-size: 15px; z-index: 2; }
.cmp.n { top: 6%; left: 50%; } .cmp.s { bottom: 6%; left: 50%; } .cmp.w { left: 5%; top: 50%; } .cmp.e { right: 5%; top: 50%; }
.ac-foot { position: absolute; bottom: -22px; font-size: 11px; color: #9cc6ff; } .ac-foot.l { left: -150px; } .ac-foot.r { right: -150px; }
.ac-sub { grid-area: sub; position: relative; display: flex; align-items: center; padding: 18px 9% 0; }
.ac-sub i { position: absolute; left: 7%; top: 22px; bottom: 18px; width: 2px; background: rgba(220,236,255,.8); }
.ac-sub p { margin: 0; font-size: clamp(15px, 1.8vw, 26px); line-height: 1.4; letter-spacing: .14em; text-transform: none; color: #eef6ff;
  text-shadow: 0 0 8px rgba(120,180,255,.45); font-family: "Share Tech Mono", "Noto Sans Thai", monospace; }
.ac-more { position: absolute; right: 3%; bottom: 14px; font-size: 11px; color: #8fb8ee; }
.ac-obj { position: absolute; left: 50%; bottom: 136px; transform: translateX(-50%); z-index: 3; min-width: min(520px, 46%);
  background: rgba(4,16,44,.88); border: 1.5px solid #d9ecff; padding: 14px 20px; box-shadow: 0 0 20px rgba(80,150,255,.4); }
.ac-obj.hidden { display: none; } .ac-obj b { color: #ffd54f; } .ac-obj ul { margin: 8px 0 0; padding: 0; list-style: none; text-transform: none; letter-spacing: .06em; }
.ac-obj li { padding: 3px 0; }
.ac-ctl { position: absolute; right: 3%; top: 64px; display: flex; gap: 6px; z-index: 4; }
.ac-ctl button { background: rgba(6,24,60,.75); color: #cfe6ff; border: 1px solid #7fb2ff; font: inherit; font-size: 11px; padding: 3px 9px; letter-spacing: .1em; }
.ac-ctl button:hover { background: #1b3f86; } .ac-ctl button.go { border-color: #ffd54f; color: #ffd54f; }
.ac-wait { font-size: 11px; color: #ffd54f; padding: 4px 8px; animation: ac-blink 1.2s steps(2) infinite; }
#brief-pill { position: fixed; right: 16px; bottom: 16px; z-index: 61; background: #0a2a63; color: #d9ecff; border: 1px solid #7fb2ff;
  font-family: "Share Tech Mono", monospace; letter-spacing: .12em; }
#brief-pill.hidden { display: none; }
@media (max-width: 760px) {
  #brief-ac { grid-template-columns: 1fr; grid-template-rows: 54px auto 1fr auto 110px; grid-template-areas: "top" "l" "map" "r" "sub"; overflow-y: auto; }
  .ac-side { flex-direction: row; padding-top: 6px; gap: 8px; } .ac-box { min-height: 0; flex: 1; padding: 6px; font-size: 11px; } .ac-box.tall { min-height: 0; }
  .ac-map { min-height: 42vh; } .ac-foot { display: none; } .ac-ctl { top: auto; bottom: 6px; right: 6px; }
}
.mis-info-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; margin-top: 6px; }
.mis-info-g label { display: flex; flex-direction: column; font-size: 11px; } .mis-info-g .wide { grid-column: 1 / -1; }

/* NOW-01 now-playing bar (replaces the picture-in-picture title) */
#now-playing { position: fixed; right: 12px; bottom: 62px; z-index: 36; display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px;
  background: rgba(10,14,20,.88); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 6px 18px rgba(0,0,0,.45); font-size: 12px; max-width: 340px; }
#now-playing.hidden { display: none; }
#now-playing .np-disc { width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; animation: np-spin 3.2s linear infinite;
  background: radial-gradient(circle, var(--accent) 0 3px, #111 3.5px 5px, #2a2a2a 5.5px 6px, #111 6.5px 9px, #262626 9.5px 10px, #111 10.5px 13px, #333 13.5px 14px); }
#now-playing .np-disc i { display: block; width: 100%; height: 100%; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 20%, rgba(255,255,255,.12) 25%, transparent 30% 70%, rgba(255,255,255,.08) 75%, transparent 80%); }
#now-playing.paused .np-disc { animation-play-state: paused; opacity: .6; }
@keyframes np-spin { to { transform: rotate(360deg); } }
#now-playing .np-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e3f2fd; }
#now-playing .np-vol { width: 64px; }
body.reduce-motion #now-playing .np-disc { animation: none; }
/* a YouTube track keeps its (required) visible player, docked above the bar */
#yt-mini { bottom: 106px !important; width: 212px; }
#yt-mini #yt-title { display: none; }
#yt-mini iframe { width: 200px !important; height: 200px !important; }
#yt-mini.big iframe { width: 400px !important; height: 225px !important; }

/* YouTube box hidden: only the record shows. The player stays loaded off-screen (display:none would stop it). */
#yt-mini { position: fixed !important; left: -10000px !important; right: auto !important; top: 0 !important; bottom: auto !important;
  opacity: 0 !important; pointer-events: none !important; }
#now-playing.needs-tap .np-pause { animation: np-tap 1.2s ease-in-out infinite; }
#now-playing.needs-tap .np-disc { animation-play-state: paused; opacity: .6; }
@keyframes np-tap { 50% { box-shadow: 0 0 0 4px rgba(79,195,247,.45); } }
/* PRT-03 Hangar parts */
.pt-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-top: 6px; }
.pt-slot { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02); }
.pt-slot.off { opacity: .45; } .pt-slot select { width: 100%; }
.pt-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.pt-card { display: flex; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; } .pt-card.own { border-color: rgba(102,187,106,.5); }
.pt-card img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
/* GME-01 GM edit panel */
.pe-modal .xm-box { max-width: 520px; }
.pe-sec { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; }
.pe-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; flex-wrap: wrap; } .pe-row > span:first-child { width: 80px; color: var(--muted); font-size: 12px; }
.pe-row b { min-width: 64px; text-align: center; }
.st-edit { cursor: pointer; border-radius: 4px; } .st-edit:hover { background: rgba(79,195,247,.12); }
/* MUS-05 now-playing: movable, small mode */
#now-playing .np-min { padding: 0 6px; min-width: 0; }
#now-playing.np-mini { padding: 4px; gap: 0; } #now-playing.np-mini > :not(.np-disc) { display: none; }
/* GAL-01 Scene select tools */
#episodes .ep-tools { gap: 10px; flex-wrap: wrap; margin: 0 0 10px; align-items: center; }
#episodes .ep-tools label { display: inline-flex; gap: 4px; align-items: center; }
/* TRN-02 Maker › Maps painter */
.mm-cv { width: 100%; max-width: 760px; aspect-ratio: 760 / 520; border: 1px solid rgba(120,170,220,.25); border-radius: 6px; cursor: crosshair; touch-action: none; display: block; margin: 6px 0; }
.mm-tools .sel { outline: 2px solid var(--accent, #4fc3f7); }
#dep-palette .dep-pic { width: 20px; height: 20px; object-fit: cover; border-radius: 3px; vertical-align: middle; margin-right: 4px; }
