/* Ninth Orbit help chat (help.js). Uses the colours and fonts set in styles.css. */
.helpdock { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 45; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-family: var(--body); }
.player:not([hidden]) ~ .helpdock { bottom: calc(84px + env(safe-area-inset-bottom)); }
.hopen { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 10px 18px; border: 0; cursor: pointer; clip-path: var(--cut); background: var(--amber); color: #1b1203; font-family: var(--ui); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; transition: filter 0.15s; }
.hopen:hover { filter: drop-shadow(0 0 12px rgba(255, 181, 71, 0.7)); background: #ffc76e; }
.hopen:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }
.hopen i { width: 9px; height: 9px; border-radius: 50%; background: #1b1203; }
.hpanel { display: flex; flex-direction: column; padding: 0; width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 100px)); height: min(600px, calc(100dvh - 100px)); background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6); overflow: hidden; }
.hpanel[hidden] { display: none; }
.hpanel:focus { outline: none; }
.hhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line2); }
.hhead h2 { margin: 0; font-size: 15px; letter-spacing: 0.05em; text-shadow: none; }
.hclose { width: 44px; height: 44px; flex: none; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.hclose:hover { background: rgba(92, 225, 255, 0.1); color: var(--text); }
.hlog { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.5; }
.hlog:focus-visible { outline-offset: -2px; }
.hmsg { max-width: 94%; flex: none; overflow-wrap: anywhere; scroll-margin-top: 58px; }
.hmsg p { margin: 0 0 7px; }
.hmsg p:last-of-type { margin-bottom: 0; }
.hmsg a { color: var(--ice); }
.hmsg b { color: #fff; }
.hmsg.bot { align-self: flex-start; padding: 11px 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; }
.hmsg.you { align-self: flex-end; padding: 8px 13px; background: rgba(92, 225, 255, 0.14); border-radius: 12px 4px 12px 12px; }
.hnext { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.hchip { min-height: 38px; padding: 6px 12px; border: 1px solid var(--line2); border-radius: 8px; background: rgba(92, 225, 255, 0.06); color: var(--text); font-family: var(--ui); font-size: 14px; font-weight: 600; line-height: 1.25; text-align: left; cursor: pointer; }
.hchip:hover { background: rgba(92, 225, 255, 0.16); border-color: var(--ice); }
.hform { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line2); }
.hform input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg); color: var(--text); font: 16px var(--body); }
.hform input::placeholder { color: var(--muted); }
.hform input:focus { outline: 2px solid var(--ice); outline-offset: 0; }
.hform .btn { flex: none; min-height: 44px; }

@media (max-width: 560px) {
  .helpdock { right: 12px; }
  .helpopen .helpdock { inset: 0; right: 0; bottom: 0; gap: 0; }
  .helpopen .hopen { display: none; }
  .helpopen .hpanel { width: 100%; height: 100%; border: 0; border-radius: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  .player:not([hidden]) ~ .helpdock { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .helpopen .player:not([hidden]) ~ .helpdock { bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .hopen { transition: none; } }

/* order ticket (order.js), on top of the download dialog's styles */
.orderdlg h2 em { font-style: normal; color: var(--amber); }
.qapps { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.qapps legend { padding: 0; margin-bottom: 8px; font-family: var(--ui); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.qbundle { margin: 0; font-size: 14px; color: var(--ice); }
.qbundle[hidden] { display: none; }
.qhint { margin: 0; font-size: 14px; color: var(--muted); }
.orderdlg textarea { min-height: 72px; }
.qticket { margin: 0; font-family: var(--mono); font-size: 26px; letter-spacing: 0.08em; color: var(--amber); user-select: all; }
.getdlg .qdone:focus { outline: none; }
.qlegal { padding: 12px 14px; border: 1px solid var(--line2); border-radius: 10px; font-size: 14px; color: var(--muted); }
.qlegal h3 { margin: 0 0 6px; font-family: var(--ui); font-size: 15px; color: var(--text); }
.qlegal p { margin: 0 0 6px; }
.qlegal p:last-child { margin: 0; }
.qcheck input[aria-invalid="true"] { outline: 2px solid #ff6b7a; outline-offset: 2px; }
