
.apo-app .ca-stage { position: relative; width: 100%; height: 520px; border-radius: 0; overflow: hidden; background: #05070f;
    border: 1px solid rgba(251, 191, 36, 0.28); box-shadow: 0 0 0 1px rgba(0,0,0,0.6) inset, 0 18px 50px rgba(0, 0, 0, 0.5); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.apo-app .ca-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.apo-app #caGL { z-index: 0; } .apo-app #caHud { z-index: 1; }
.apo-app .ca-over { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 14px; box-sizing: border-box;
    background: radial-gradient(ellipse at center, rgba(5, 4, 10, 0.5), rgba(5, 4, 10, 0.84)); z-index: 3; overflow-y: auto; }
.apo-app .ca-over.show { display: flex; animation: caFade 0.25s ease-out; }
@keyframes caFade { from { opacity: 0; } to { opacity: 1; } }
.apo-app .ca-card { width: min(540px, 100%); background: linear-gradient(180deg, rgba(22, 14, 10, 0.95), rgba(8, 6, 6, 0.97)); border: 1px solid var(--ca-acc, #fbbf24);
    border-radius: 0; padding: 18px 18px 16px; box-shadow: 0 0 40px rgba(251, 191, 36, 0.16), 0 20px 60px rgba(0, 0, 0, 0.65); text-align: center; color: #ece6dc; margin: auto; }
.apo-app .ca-kicker { font: bold 11px monospace; letter-spacing: 3px; color: var(--ca-acc, #fbbf24); text-transform: uppercase; }
.apo-app .ca-title { font: 900 27px/1.15 'Segoe UI', system-ui, sans-serif; margin: 6px 0 4px; letter-spacing: 1px; color: #fff; text-shadow: 0 0 18px var(--ca-acc, #fbbf24); }
.apo-app .ca-title.bad { color: #fecaca; text-shadow: 0 0 18px #dc2626; }
.apo-app .ca-sub { font-size: 13.5px; color: #bdb3a6; margin-bottom: 12px; line-height: 1.5; }
.apo-app .ca-stars { font-size: 30px; letter-spacing: 6px; margin: 2px 0 4px; }
.apo-app .ca-stars .off { filter: grayscale(1) brightness(0.45); }
.apo-app .ca-stars span { display: inline-block; animation: caStar 0.5s cubic-bezier(.2,1.6,.4,1) both; }
.apo-app .ca-stars span:nth-child(2) { animation-delay: 0.15s; } .apo-app .ca-stars span:nth-child(3) { animation-delay: 0.3s; }
@keyframes caStar { from { transform: scale(0) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.apo-app .ca-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 12px; }
.apo-app .ca-stat { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0; padding: 7px 2px; }
.apo-app .ca-stat b { display: block; font: bold 18px monospace; color: #fff; }
.apo-app .ca-stat i { font-style: normal; font-size: 9.5px; letter-spacing: 1px; color: #988c7e; text-transform: uppercase; }
.apo-app .ca-rev { text-align: left; margin: 4px 0 12px; max-height: 220px; overflow-y: auto; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 8px; }
.apo-app .ca-rev-h { font: bold 11px monospace; letter-spacing: 2px; color: #988c7e; margin-bottom: 6px; text-align: left; }
.apo-app .ca-rev-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 5px 2px; border-bottom: 1px dashed rgba(255,255,255,0.07); font-size: 13px; }
.apo-app .ca-rev-row b { font: bold 14px monospace; color: #fde68a; letter-spacing: 0.3px; }
.apo-app .ca-rev-row span.d { color: #bdb3a6; flex: 1 1 140px; }
.apo-app .ca-why { font: bold 9.5px monospace; border-radius: 0; padding: 1px 5px; white-space: nowrap; }
.apo-app .ca-why.missed { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.apo-app .ca-why.typo { background: rgba(251, 191, 36, 0.16); color: #fcd34d; }
.apo-app .ca-why.flared { background: rgba(249, 115, 22, 0.18); color: #fdba74; }
.apo-app .ca-go { background: linear-gradient(135deg, #fde047, #f97316); color: #1c0d02; border: 0; border-radius: 0; padding: 11px 26px;
    font: 900 15px 'Segoe UI', system-ui, sans-serif; letter-spacing: 1px; cursor: pointer; box-shadow: 0 0 22px rgba(249, 115, 22, 0.45); }
.apo-app .ca-go:hover { filter: brightness(1.1); }
.apo-app .ca-hint { font-size: 12px; color: #8a7f72; margin-top: 10px; }
.apo-app .ca-hint kbd { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); border-radius: 0; padding: 0 5px; font: bold 11px monospace; color: #ece6dc; }
.apo-app .ca-band { display: inline-block; font: bold 11px monospace; padding: 2px 8px; border-radius: 0; border: 1px solid var(--b); color: var(--b); margin-left: 6px; vertical-align: middle; }
.apo-app .ca-foes { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin: 2px 0 12px; }
.apo-app .ca-foe { font: bold 10.5px monospace; border: 1px solid rgba(255,255,255,0.14); border-radius: 0; padding: 2px 8px; color: #d6cdc0; background: rgba(255,255,255,0.03); }
.apo-app .ca-keys { display: none; margin: 8px auto 0; gap: 5px; flex-direction: column; user-select: none; -webkit-user-select: none; touch-action: manipulation; max-width: 625px; }
.apo-app .ca-keys.show { display: flex; }
.apo-app .ca-krow { display: flex; gap: 5px; justify-content: center; }
.apo-app .ca-key { flex: 1 1 0; height: 46px; border-radius: 0; border: 1px solid rgba(251, 191, 36, 0.22);
    background: linear-gradient(180deg, #2a1f18, #16100c); color: #fbf3e6; font: bold 18px monospace; text-transform: lowercase; padding: 0; cursor: pointer;
    box-shadow: 0 2px 0 #070403; -webkit-tap-highlight-color: transparent; }
.apo-app .ca-key.wide { flex: 1.5 1 0; font-size: 16px; }
.apo-app .ca-key[data-k="space"] { flex: 6.5 1 0; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: #cbbfae; }
.apo-app .ca-key[data-k="flare"] { flex: 2 1 0; }
.apo-app .ca-key.next { border-color: #fde047; box-shadow: 0 0 10px rgba(253, 224, 71, 0.5), 0 2px 0 #070403; color: #fde047; }
.apo-app .ca-key.down { transform: translateY(2px); box-shadow: none; background: #3a2a1e; }
.apo-app .ca-key.off { opacity: 0.35; }
@media (max-width: 640px) {
    .apo-app .ca-title { font-size: 21px; }
    .apo-app .ca-stats { grid-template-columns: repeat(2, 1fr); margin: 6px 0 8px; }
    .apo-app .ca-key { height: 43px; font-size: 17px; }
    .apo-app .ca-card { padding: 14px 12px 12px; }
    .apo-app .ca-rev { max-height: 150px; }
}
.apo-app, .apo-app * { box-sizing: border-box; }
.apo-app { --apo-cut: 8px; --gs-ink: #e8f4ff; --gs-muted: #9fb3c8; --gs-line: #3a2a18; --gs-accent: #fbbf24; --gs-accent-ink: #1c0d02;
  --gs-panel: #160e0a; --gs-bg: #05070f; --gs-chip: rgba(20, 12, 6, .92);
  position: relative; display: flex; flex-direction: column; color: #e8f4ff; font: 16px/1.4 "Segoe UI", system-ui, Arial, sans-serif;
  overflow: clip; -webkit-tap-highlight-color: transparent; }
.apo-app.apo-embedded { height: clamp(320px, calc(100svh - 110px), 900px); border: 1px solid #3a2a18; background: #05070f;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.apo-app.gs-fs { background: #05070f; }
.apo-app .gs-stage, .apo-app .gs-main { min-height: 0; }
.apo-app.gs-wide .gs-stage { align-items: stretch; grid-template-rows: minmax(0, 1fr); }
.apo-app .gs-side { min-height: 0; overflow: auto; }
.apo-app .gs-main { display: flex; flex-direction: column; }
.apo-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.apo-app .ca-stage { flex: 1; min-height: 240px; height: auto; border-radius: 0;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.apo-app .ca-keys { flex: none; width: 100%; padding-bottom: env(safe-area-inset-bottom, 0); }
.apo-app .ca-keys.show { margin-top: 0; }
.apo-app .ca-key { min-height: 48px; border-radius: 0; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.apo-cut { clip-path: polygon(var(--apo-cut) 0, 100% 0, 100% calc(100% - var(--apo-cut)), calc(100% - var(--apo-cut)) 100%, 0 100%, 0 var(--apo-cut)); }
.apo-hud { position: absolute; left: 8px; right: 8px; top: 8px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; z-index: 2; }
.apo-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 9px; background: rgba(10, 6, 4, .72); border: 1px solid rgba(251, 191, 36, .25); }
.apo-chip small { font: 700 9.5px/1 monospace; letter-spacing: 1.5px; color: #8796ad; }
.apo-chip b { font: 800 14px/1 monospace; color: #fff; }
.apo-chip b.gold { color: #fde68a; }
.apo-sp { color: #fde68a; font-size: 13px; }
.apo-sp b { color: #fde68a; }
.apo-sp.up { animation: apoUp .6s ease-out; }
@keyframes apoUp { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }
.apo-app .ca-card { border-radius: 0; clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); max-height: calc(100% - 12px); overflow-y: auto; }
.apo-hud[hidden], .apo-chip[hidden] { display: none !important; }
.apo-msg { text-align: center; padding: 30px 10px; color: #9fb3c8; }
@media (max-width: 420px) {   
  .apo-app .gs-title { font-size: 13px; letter-spacing: .04em; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .apo-app .gs-tools { gap: 4px; }
  .apo-app .ca-keys { gap: 4px; }
  .apo-app .ca-krow { gap: 3px; }   
}
@media (max-width: 560px) {
  .apo-hud { left: 6px; right: 6px; top: 6px; gap: 4px; }
  .apo-chip { padding: 3px 6px; gap: 4px; }
  .apo-chip small { font-size: 8.5px; letter-spacing: 1px; }
  .apo-chip b { font-size: 12.5px; }
}
.apo-app .ca-stat, .apo-app .ca-why, .apo-app .ca-band, .apo-app .ca-hint kbd { border-radius: 0;
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
@media (max-height: 480px) and (orientation: landscape) {
  .apo-app .ca-stage { min-height: 150px; }
  .apo-app .ca-key { min-height: 36px; height: 36px; }
  .apo-app .ca-keys { gap: 3px; }
}
.apo-app .ca-go { border-radius: 0; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); min-height: 44px; }
.apo-app .ca-foe, .apo-app .ca-rev-row b { border-radius: 0; }
.apo-app .ca-foe { clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); }
.apo-app .ca-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
