/* The Music Academy of Vienna — arm B's onboarding rail (js/academy.js) */
#academy { z-index: 11; padding: 0; display: block; background: #0b0b14; overflow: hidden; }
#academy.hidden { display: none; }
#ac-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#ac-bg.cover { object-fit: cover; object-position: center; }
#ac-bg.contain { object-fit: contain; object-position: center 30%; background: radial-gradient(ellipse at 50% 40%, #2a2416 0%, #0b0b14 70%); }
#academy::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,5,12,.15) 0%, rgba(5,5,12,0) 30%, rgba(5,5,12,.55) 75%, rgba(5,5,12,.85) 100%); }
#ac-panel { position: absolute; left: 0; right: 0; bottom: 0; top: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: center; padding: 16px; pointer-events: none; }
#ac-panel > * { pointer-events: auto; }

/* her dialogue box — the town engine's .tw-dialog look, bigger portrait */
.ac-dialog { width: min(760px, 100%); display: flex; gap: 16px; align-items: flex-start;
  background: rgba(20,16,10,.95); border: 1px solid rgba(255,215,94,.5); border-radius: 16px; padding: 14px 16px;
  color: #eee; font-family: "Avenir Next","Segoe UI",system-ui,sans-serif; box-shadow: 0 12px 40px rgba(0,0,0,.55); margin-bottom: 4vh; }
.ac-dialog.wide { width: min(920px, 100%); }
.ac-face { width: 96px; height: 100px; object-fit: cover; object-position: top; border-radius: 12px; flex: none; border: 2px solid rgba(255,215,94,.6); background: #111; }
.ac-body { flex: 1; min-width: 0; text-align: left; }
.ac-name { display: block; color: #ffd75e; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 6px; font-weight: 900; }
.ac-text { font-size: 15.5px; line-height: 1.5; }
.ac-text b { color: #ffe9a3; }
.ac-text i { opacity: .7; }
.ac-principles { margin: 8px 0 8px 22px; padding: 0; }
.ac-principles li { margin: 3px 0; font-weight: 700; color: #ffe9a3; }
.ac-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ac-btn { font: 700 13px "Avenir Next","Segoe UI",system-ui,sans-serif; padding: 9px 14px; border-radius: 10px;
  border: 1px solid rgba(255,215,94,.5); background: transparent; color: #ffd75e; cursor: pointer; text-align: left; }
.ac-btn:hover { background: rgba(255,215,94,.15); }
.ac-btn.primary { background: linear-gradient(180deg, #ffe9a3, #ffd75e); color: #221; border-color: transparent; box-shadow: 0 3px 0 #b8922c; }
.ac-btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #b8922c; }
.ac-result { background: rgba(255,215,94,.12); border: 1px solid rgba(255,215,94,.35); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 15px; }
.ac-score { font-size: 22px; color: #fff; }

/* the character pick */
.ac-card { width: min(760px, 100%); background: rgba(20,16,10,.94); border: 1px solid rgba(255,215,94,.5); border-radius: 18px;
  padding: 18px 22px 20px; text-align: center; margin: auto; box-shadow: 0 12px 40px rgba(0,0,0,.55); }
#ac-panel:has(.ac-card) { align-items: center; }
.ac-kicker { font-size: 11px; font-weight: 900; letter-spacing: 3px; color: #ffd75e; margin: 0 0 4px; }
.ac-heroes { display: flex; gap: 16px; justify-content: center; margin: 14px 0 6px; flex-wrap: wrap; }
.ac-heroes button { width: 250px; background: rgba(255,255,255,.04); border: 2px solid rgba(255,255,255,.14); border-radius: 16px;
  padding: 12px 12px 14px; color: #eee; cursor: pointer; font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .15s, border-color .15s; }
.ac-heroes button:hover { transform: translateY(-3px); border-color: #ffd75e; background: rgba(255,215,94,.08); }
.ac-heroes img { width: 170px; height: 170px; object-fit: contain; object-position: bottom; }
.ac-heroes b { font-size: 17px; color: #ffe9a3; }
.ac-heroes span { font-size: 12.5px; opacity: .7; line-height: 1.4; }

.ac-character-create { width: min(980px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; }
.ac-pick-hint { margin-top: 0; }
.ac-genders { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid rgba(255,215,94,.3); border-radius: 99px; background: rgba(0,0,0,.2); }
.ac-genders button { min-width: 112px; min-height: 42px; padding: 8px 24px; border: 0; border-radius: 99px; background: transparent; color: #c6bead; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ac-genders button[aria-pressed="true"] { background: #ffd75e; color: #251d0e; }
.ac-character-create .ac-heroes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 8px; }
.ac-character-create .ac-heroes button { width: 100%; min-width: 0; padding: 8px 10px 12px; overflow: hidden; }
.ac-character-create .ac-heroes img { width: 100%; height: auto; aspect-ratio: 1; }
.ac-character-create .ac-heroes b { font-size: 16px; }
.ac-character-create .ac-heroes button > span:not(.ac-pick-mark) { flex: 1; }
.ac-character-create .ac-heroes button[aria-pressed="true"] { border-color: #ffd75e; background: rgba(255,215,94,.12); }
.ac-character-create .ac-pick-mark { margin-top: 5px; color: #ffe9a3; font-size: 11px; font-weight: 700; opacity: .9; }
.ac-pick-status { min-height: 20px; margin: 10px 0 8px; font-size: 13px; color: #d5c9ae; }
.ac-pick-confirm { min-width: 180px; min-height: 44px; text-align: center; }
.ac-pick-confirm:disabled { opacity: .4; cursor: default; box-shadow: none; }
.ac-character-create .mode-row { margin-top: 14px; gap: 8px; }
.ac-character-create button:focus-visible { outline: 3px solid #fff0b9; outline-offset: 3px; }
@media (max-width: 720px) {
  .ac-character-create { padding: 16px 12px; }
  .ac-character-create .ac-heroes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
  .ac-character-create .ac-heroes img { max-height: 145px; }
  .ac-character-create .ac-heroes b { font-size: 14px; }
  .ac-character-create .ac-heroes button { padding: 6px 8px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-character-create .ac-heroes button { transition: none; }
  .ac-character-create .ac-heroes button:hover { transform: none; }
}

/* the input pick */
.ac-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 12px 0 8px; }
.ac-inputs button { background: rgba(255,255,255,.04); border: 2px solid rgba(255,255,255,.14); border-radius: 12px; padding: 12px; color: #eee;
  cursor: pointer; font-family: inherit; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.ac-inputs button.on { border-color: #ffd75e; background: rgba(255,215,94,.1); }
.ac-inputs button b { font-size: 14px; color: #ffe9a3; }
.ac-inputs button span { font-size: 12px; opacity: .75; line-height: 1.4; }
.ac-inputs button span a { color: #7fd8ff; }
.ac-in-icon { font-size: 22px; }
.ac-status { font-size: 13px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.06); min-height: 18px; }

/* the coach: spotlight ring + card, same family as #tour */
#ac-coach { position: fixed; inset: 0; z-index: 70; font-family: "Avenir Next","Segoe UI",system-ui,sans-serif; }
#ac-coach.hidden { display: none; }
#ac-ring { position: fixed; border: 3px solid var(--gold, #ffd75e); border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(4,6,14,.6), 0 0 24px rgba(255,215,94,.8); pointer-events: none; transition: all .25s ease; }
#ac-card { position: fixed; padding: 14px 16px; text-align: left; background: #141a30; border: 1px solid rgba(255,215,94,.5);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.6); display: flex; gap: 14px; align-items: flex-start; }
#ac-card .ac-face { width: 84px; height: 88px; }
#ac-card:not(.has-face) .ac-face { display: none; }
.ac-card-body { flex: 1; min-width: 0; }
.ac-step { font-size: 11px; font-weight: 900; letter-spacing: 2px; color: var(--gold, #ffd75e); margin-bottom: 6px; text-transform: uppercase; }
.ac-card-text { font-size: 14px; line-height: 1.55; color: #e6ecf5; }
.ac-card-text b { color: var(--gold, #ffd75e); }
.ac-card-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.ac-card-actions button { font: inherit; cursor: pointer; border-radius: 10px; }
.ac-skip { font-size: 12px; color: #9aa3c0; background: none; border: none; text-decoration: underline; padding: 6px 2px; margin-right: auto; }
.ac-skip:hover { color: #d7e0ea; }
.ac-next { font-size: 14px; font-weight: 900; letter-spacing: 1px; color: #002; background: linear-gradient(180deg, #ffe9a3, var(--gold, #ffd75e));
  border: none; padding: 9px 18px; box-shadow: 0 3px 0 #b8922c; }
.ac-next:active { transform: translateY(2px); box-shadow: 0 1px 0 #b8922c; }
.ac-alt { font-size: 13px; font-weight: 700; color: #ffd75e; background: transparent; border: 1px solid rgba(255,215,94,.5); padding: 8px 12px; }
.ac-alt:hover { background: rgba(255,215,94,.12); }
.ac-slider { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 700; }
.ac-slider input { flex: 1; accent-color: var(--gold, #ffd75e); }
.ac-slider b { min-width: 46px; text-align: right; }

/* the floating portrait during a run: top-left under the HUD row, like the
   assist toggles — which move down below it while it shows. The sheet panel
   sets --sheet-h (main.js), the same variable the HUD reads. */
#ac-float { position: fixed; left: 14px; top: 118px; z-index: 41; display: flex; gap: 10px; align-items: flex-start; pointer-events: none;
  font-family: "Avenir Next","Segoe UI",system-ui,sans-serif; }
#ac-float.hidden { display: none; }
#ac-float img { width: 84px; height: 88px; object-fit: cover; object-position: top; border-radius: 12px; border: 2px solid rgba(255,215,94,.7);
  box-shadow: 0 6px 20px rgba(0,0,0,.5); background: #111; display: block; }
.ac-float-bubble { max-width: 300px; background: rgba(20,16,10,.92); border: 1px solid rgba(255,215,94,.5); border-radius: 12px; padding: 8px 12px;
  color: #eee; font-size: 13.5px; line-height: 1.4; position: relative; margin-top: 6px; }
.ac-float-bubble.hidden { display: none; }
.ac-float-bubble .ac-float-name { display: block; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #ffd75e; font-weight: 900; margin-bottom: 2px; }
.ac-float-bubble::before { content: ""; position: absolute; left: -7px; top: 14px; border: 7px solid transparent; border-right-color: rgba(255,215,94,.5); border-left: 0; }
body.sheet-on #ac-float { top: calc(var(--sheet-h, 164px) + 104px); }
@media (max-width: 720px) {
  .ac-face { width: 64px; height: 68px; }
  .ac-text { font-size: 14px; }
  .ac-dialog, .ac-card { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
  .ac-card .title.small { font-size: 28px; }
  .ac-heroes { gap: 10px; }
  .ac-heroes button { width: calc(50% - 6px); min-width: 0; padding: 8px 6px 10px; }
  .ac-heroes img { width: 110px; height: 110px; }
  .ac-heroes span { font-size: 11.5px; }
  #ac-float img { width: 60px; height: 62px; }
  .ac-float-bubble { max-width: 210px; font-size: 12px; padding: 6px 9px; }
  body.sheet-on #ac-float { top: calc(var(--sheet-h, 164px) + 150px); }
}


/* the "is there a piano next to you" question: two cards, so the answer reads
   as a choice rather than as a form field. The cable question below it wears
   the same two, which is what makes the flow feel like one conversation. */
.ac-inputs.ac-yesno { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ac-inputs.ac-yesno button { min-height: 130px; }
.ac-inputs.ac-yesno .ac-in-icon { font-size: 26px; }

/* the confirm step: what we landed on, stated once, large, with the live
   status under it. Not a card in a row of cards — nothing here is being
   compared any more, the choosing is over. */
.ac-chosen { display: grid; grid-template-columns: 46px 1fr; gap: 2px 14px; align-items: center;
  margin: 12px 0 10px; padding: 14px 16px; border-radius: 14px; text-align: left;
  border: 2px solid #ffd75e; background: linear-gradient(180deg, rgba(255,215,94,.16), rgba(255,215,94,.05)); }
.ac-chosen .ac-in-icon.big { font-size: 36px; grid-row: span 2; text-align: center; }
.ac-chosen b { font-size: 17px; color: #ffe9a3; }
.ac-chosen-d { font-size: 12.5px; opacity: .8; line-height: 1.45; }
.ac-status.ok { background: rgba(47,208,122,.14); color: #b6f5d4; }
/* the way out of a step that cannot be completed (a cable that will not
   connect): the funnel says this is where visits ended */
.ac-rescue { margin-top: 8px; font-size: 12px; line-height: 1.5; opacity: .85; text-align: left; }
.ac-link { background: none; border: 0; padding: 0; font: inherit; font-size: 12px;
  color: #7fd8ff; text-decoration: underline; cursor: pointer; }
.ac-otherway { margin-top: 10px; font-size: 11.5px; opacity: .6; text-align: left;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ac-chip { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.16);
  border-radius: 99px; padding: 5px 11px; font: inherit; font-size: 11.5px; color: #cfcfe0; cursor: pointer; }
.ac-chip:hover { border-color: #ffd75e; color: #fff; }
