/* オンライン対戦（js/online.js）の画面。本編のネオンの枠（.px-btn・.side）に合わせる。
   .px-btn は使わない（ゲームがドット文字の絵に置き換えるので、日本語の文字が消える） */
.onl[hidden], .onl [hidden], .onl-wait[hidden], .onl-wait [hidden] { display: none !important; }
.onl { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(11, 6, 20, .66); touch-action: pan-y; }
.onl.onl-top { z-index: 35; }
.onl-card { box-sizing: border-box; width: min(100%, 440px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 16px;
  background: rgba(26, 11, 46, .97); border: 2px solid var(--cyan); box-shadow: 4px 4px 0 var(--pink), 0 0 30px rgba(1, 205, 254, .25);
  color: var(--pale); text-align: center; font: 14px/1.6 "DotGothic16", "Hiragino Sans", "Noto Sans JP", sans-serif; -webkit-user-select: none; user-select: none; }
.onl:not([hidden]) .onl-card { animation: onlIn .18s steps(4); }
@keyframes onlIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.onl-card h3 { margin: 0 0 12px; font-weight: 400; font-size: 20px; letter-spacing: .14em; color: var(--cyan); text-shadow: 2px 2px 0 #5b2a86; }
.onl-lead, .onl-text { margin: 0 0 .7em; font-size: 13.5px; line-height: 1.75; text-align: left; }
.onl-text b, .onl-lead b { color: var(--sun); font-weight: 400; }
.onl-field { display: flex; align-items: center; gap: 10px; margin: 12px 0 2px; text-align: left; }
.onl-field span { flex: none; font-size: 13px; color: var(--cyan); }
.onl-hint { margin: 2px 0 0; font-size: 11.5px; color: #a99fd1; text-align: left; }
.onl-card input:not([type=checkbox]) { flex: 1; min-width: 0; width: 100%; box-sizing: border-box; padding: 9px 12px; border: 2px solid var(--lav); border-radius: 0;
  background: var(--ink); color: var(--pale); font: 16px "DotGothic16", "Hiragino Sans", sans-serif; letter-spacing: .12em;
  -webkit-user-select: text; user-select: text; touch-action: manipulation; }
.onl-card input:focus { outline: none; border-color: var(--sun); box-shadow: 0 0 0 2px rgba(255, 251, 150, .25); }
#onlName, #onlCode { text-transform: uppercase; }
#onlCode { text-align: center; letter-spacing: .3em; }
.ob { pointer-events: auto; position: relative; font: 15px/1.2 "DotGothic16", "Hiragino Sans", sans-serif; color: var(--pale); background: var(--deep);
  border: 2px solid var(--lav); box-shadow: 3px 3px 0 var(--plum); padding: .6em 1em; letter-spacing: .04em; white-space: nowrap; cursor: pointer; touch-action: manipulation; }
.ob.primary { border-color: var(--cyan); box-shadow: 3px 3px 0 var(--pink); }
.ob.small { font-size: 13px; padding: .45em .8em; }
.ob:hover, .ob:focus-visible { background: var(--lav); color: var(--ink); border-color: var(--sun); outline: none; }
.ob.primary:hover, .ob.primary:focus-visible { background: var(--pink); }
.ob:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--plum); }
.ob:disabled { opacity: .38; cursor: default; transform: none; background: var(--deep); color: var(--pale); border-color: var(--lav); }
.ob.copied { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.onl-wide { display: block; width: 100%; margin-top: 12px; }
.onl-or { margin: 16px 0 6px; font-size: 12px; color: #a99fd1; }
.onl-join { display: flex; gap: 8px; }
.onl-join .ob { flex: none; }
.onl-link { margin: 12px 0 0; padding: 4px; border: 0; background: none; color: var(--cyan); font: 12.5px "DotGothic16", sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.onl-link:hover, .onl-link:focus-visible { color: var(--sun); outline: none; }
.onl-code { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 0 8px; }
.onl-code span { font-size: 11px; letter-spacing: .2em; color: #a99fd1; }
.onl-code b { font-weight: 400; font-size: 34px; line-height: 1.1; letter-spacing: .18em; padding-left: .18em; color: var(--sun); text-shadow: 3px 3px 0 var(--pink); -webkit-user-select: all; user-select: all; }
.onl-share { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.onl-seats, .onl-result, .onl-wait-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.onl-seat { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; margin: 0 0 5px; background: rgba(45, 27, 78, .75); border: 1px solid #44306e; }
.onl-seat.me { border-color: var(--sun); }
.onl-seat.empty { opacity: .5; border-style: dashed; }
.onl-seat i, .onl-result i, .onl-wait-list i { display: block; width: 10px; height: 10px; }
.onl-seat b { font-weight: 400; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .06em; }
.onl-seat b small { display: block; font-size: 11px; color: #a99fd1; letter-spacing: .04em; }
.onl-seat em { font-style: normal; font-size: 12px; color: #a99fd1; white-space: nowrap; }
.onl-seat em.ok { color: var(--mint); } .onl-seat em.away { color: #ff9e3d; }
.onl-pick { display: grid; grid-template-columns: 5.6em auto 1fr auto; align-items: center; gap: 8px; margin: 8px 0 0; text-align: center; }
.onl-pick > span { font-size: 11.5px; letter-spacing: .14em; color: var(--cyan); text-align: left; }
.onl-pick > b { font-weight: 400; font-size: 14px; color: var(--sun); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onl-pick > b small { color: #a99fd1; font-size: 11px; margin-left: .5em; }
.onl-pick .ob.arr { padding: .3em .6em; font-size: 13px; }
.onl-pick.ro { grid-template-columns: 5.6em 1fr; }
.onl-pick.ro .ob.arr { display: none; }
.onl-pick.ro > b { text-align: left; }
.onl-lv { grid-column: 2 / 5; display: flex; justify-content: center; border: 2px solid var(--lav); background: var(--deep); }
.onl-lv button { flex: 1; font: 13px "DotGothic16", sans-serif; color: var(--pale); background: transparent; border: 0; border-left: 2px solid var(--plum); padding: .5em .4em; cursor: pointer; letter-spacing: .04em; touch-action: manipulation; }
.onl-lv button:first-child { border-left: 0; }
.onl-lv button:hover { background: var(--plum); }
.onl-lv button:focus-visible { outline: 2px solid var(--sun); outline-offset: -4px; }
.onl-lv button.on[data-lv="0"] { background: var(--mint); color: var(--ink); }
.onl-lv button.on[data-lv="1"] { background: var(--cyan); color: var(--ink); }
.onl-lv button.on[data-lv="2"] { background: var(--pink); color: var(--ink); }
.onl-row { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.onl-row .ob:not(.small) { flex: 1; }
#onlReady.on { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.onl-ghost { margin-top: 12px; }
.onl-check { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 0; font-size: 13.5px; cursor: pointer; }
.onl-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--pink); }
.onl-status { min-height: 1.4em; margin: 12px 0 0; font-size: 13px; line-height: 1.7; color: var(--sun); white-space: pre-line; }
.onl-status:empty { margin: 0; min-height: 0; }
.onl-status.wait::after { content: "…"; display: inline-block; animation: onlDots 1.2s steps(4) infinite; width: 1.2em; overflow: hidden; vertical-align: bottom; text-align: left; }
@keyframes onlDots { 0% { width: 0; } 100% { width: 1.2em; } }
.onl-note { margin: 12px 0 0; font-size: 11.5px; line-height: 1.6; color: #a99fd1; }
.onl-result-head { margin: 0 0 10px; font-size: 26px; line-height: 1.2; letter-spacing: .12em; color: var(--sun); text-shadow: 3px 3px 0 var(--pink); font-style: italic; padding-right: .2em; }
.onl-result li { display: grid; grid-template-columns: 2.4em 10px 1fr auto; align-items: center; gap: 8px; padding: 5px 10px; margin: 0 0 4px; background: rgba(45, 27, 78, .75); }
.onl-result li.me { background: var(--pink); color: var(--ink); }
.onl-result li.cpu { opacity: .78; }
.onl-result .rk { font-size: 14px; color: var(--sun); }
.onl-result li.me .rk { color: var(--ink); }
.onl-result b { font-weight: 400; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .05em; }
.onl-result b small { font-size: 10.5px; margin-left: .5em; opacity: .7; }
.onl-result .sc { font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* ゴールしたあとの待ち表示（走るカメラの上の小さな札） */
.onl-wait { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 24; box-sizing: border-box;
  width: min(calc(100% - 32px), 320px); padding: 10px 14px 6px; text-align: center; background: rgba(11, 6, 20, .86); border: 2px solid var(--lav); box-shadow: 4px 4px 0 var(--pink);
  color: var(--pale); font: 13px/1.5 "DotGothic16", "Hiragino Sans", sans-serif; }
.onl-wait p { margin: 0; }
.onl-wait-head { font-size: 14px; color: var(--sun); }
.onl-wait-mine { margin: 2px 0 6px !important; font-size: 11.5px; color: #a99fd1; }
.onl-wait-list li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 7px; padding: 1px 2px; font-size: 12.5px; }
.onl-wait-list li.me b { color: var(--sun); }
.onl-wait-list li.cpu { opacity: .7; }
.onl-wait-list b { font-weight: 400; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .04em; }
.onl-wait-list em { font-style: normal; font-size: 12px; color: #a99fd1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.onl-wait .onl-link { margin-top: 2px; }
.onl-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 40; transform: translate(-50%, 8px); max-width: calc(100% - 32px); box-sizing: border-box;
  padding: 7px 16px; background: rgba(11, 6, 20, .92); border: 2px solid var(--cyan); color: var(--pale); font: 13.5px "DotGothic16", "Hiragino Sans", sans-serif;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onl-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .onl-status.wait::after { animation: none; width: 1.2em; } .onl:not([hidden]) .onl-card { animation: none; } }
