/* 部屋に入るページ（GAIP GAME CENTER と同じネオンの語法：黒地・蛍光の黄とマゼンタ・硬い影・斜めの帯） */
:root {
  --ink: #05050a;
  --panel: #0c0d16;
  --panel-2: #141522;
  --line: #2c2f42;
  --text: #f6f7fb;
  --text-dim: #b1b5c9;
  --outline: #0a0a10;
  --yellow: #ffe63b;
  --magenta: #ff45e6;
  --cyan: #19e3ff;
  --red: #ff2e44;
  --lime: #7dff5a;
  --on-neon: #0a0a10;
  --font-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", system-ui, sans-serif;
  --font-latin: "Arial Black", "Segoe UI Black", "Helvetica Neue", Arial, var(--font-ja);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--ink); color: var(--text); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-ja);
  font-weight: 500;
  line-height: 1.7;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 69, 230, .16), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(25, 227, 255, .12), transparent 70%),
    var(--ink);
  overflow-x: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
p, h1, h2 { margin: 0; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 斜めの帯（画面の上と下の端だけ）。傾けた分のはみ出しは枠で隠す */
.tape-wrap { overflow: hidden; padding-block: 8px; }
.tape {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-latin);
  font-size: .78rem;
  letter-spacing: .12em;
  line-height: 1;
  padding: 7px 0;
  border-block: 3px solid var(--outline);
  margin-inline: -20px;
}
.tape--top { background: var(--yellow); color: var(--on-neon); transform: rotate(-1.2deg); margin-top: 10px; }
.tape--bottom { background: var(--magenta); color: var(--on-neon); transform: rotate(1deg); margin-bottom: 14px; }
.tape span { flex: none; padding-right: 0; animation: tape 26s linear infinite; }
.tape--bottom span { animation-direction: reverse; }
@keyframes tape { to { transform: translateX(-100%); } }

.top { max-width: 720px; margin: 18px auto 0; padding: 0 20px; }
.back {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-family: var(--font-latin);
  font-size: .82rem;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--text-dim);
}
.back:hover { color: var(--text); }

.main { max-width: 720px; margin: 0 auto; padding: 26px 20px 40px; }

.kicker { display: flex; gap: 10px; align-items: center; font-size: .9rem; color: var(--text-dim); }
.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--magenta);
  color: var(--on-neon);
  font-family: var(--font-latin);
  font-size: .78rem;
  letter-spacing: .08em;
  box-shadow: 2px 2px 0 var(--outline);
}

.title {
  margin-top: 12px;
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 3px 0 var(--outline), 0 0 28px rgba(255, 69, 230, .45);
}
.title-en {
  display: block;
  font-family: var(--font-latin);
  font-size: .42em;
  letter-spacing: .14em;
  color: var(--yellow);
  margin-bottom: 6px;
}
.lead { margin-top: 14px; color: var(--text-dim); max-width: 34em; }

/* 部屋番号 */
.entry { margin-top: 28px; }
.entry-label { display: block; font-weight: 900; margin-bottom: 8px; }
.entry-row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.entry-input {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 340px;
  min-height: 72px;
  padding: 6px 18px;
  border: 3px solid var(--outline);
  border-radius: 12px;
  background: var(--panel-2);
  box-shadow: 0 0 0 2px var(--line), 5px 5px 0 var(--outline);
  font-family: var(--font-latin);
  font-size: 2.6rem;
  letter-spacing: .32em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.entry-input::placeholder { color: #4a4e66; }
/* ルーム名のボタン（押すとポップアップ） */
.entry-pick { cursor: pointer; color: var(--yellow); text-align: center; }
.entry-pick.is-empty { color: var(--text-dim); font-family: var(--font-ja); font-size: 1.15rem; font-weight: 800; letter-spacing: .04em; }
.entry-pick:hover { box-shadow: 0 0 0 3px var(--yellow), 5px 5px 0 var(--outline); }
.entry-input:focus { outline: none; box-shadow: 0 0 0 3px var(--yellow), 5px 5px 0 var(--outline), 0 0 26px rgba(255, 230, 59, .45); }
.entry-input--small { min-height: 56px; font-size: 1.6rem; letter-spacing: .24em; max-width: 260px; }

.go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 72px;
  padding: 10px 28px;
  border: 0;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--on-neon);
  font-size: 1.3rem;
  font-weight: 900;
  box-shadow: 0 0 0 3px var(--outline), 5px 5px 0 var(--outline), 0 0 26px rgba(255, 230, 59, .5);
  transform: skewX(-8deg);
  cursor: pointer;
}
.go > span { transform: skewX(8deg); }
.go:hover { filter: brightness(1.08); }
.go:active { transform: skewX(-8deg) translate(3px, 3px); box-shadow: 0 0 0 3px var(--outline), 2px 2px 0 var(--outline); }
.go--small { min-height: 56px; min-width: 112px; font-size: 1.05rem; background: var(--cyan); box-shadow: 0 0 0 3px var(--outline), 5px 5px 0 var(--outline); }
.entry.is-busy .go { filter: saturate(.4) brightness(.8); cursor: progress; }

.status { min-height: 1.7em; margin-top: 16px; font-weight: 700; }
.status[data-kind="error"] { color: #ff8aa0; }
.status[data-kind="ok"] { color: var(--lime); }

/* 見つかった部屋（番号が重なったとき） */
.found, .mine { margin-top: 26px; }
.found-title, .mine-title { font-size: 1.15rem; font-weight: 900; }
.found-lead { color: var(--text-dim); margin-top: 4px; }
.found-list, .mine-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
.found-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  align-items: center;
  padding: 14px 18px;
  border: 3px solid var(--outline);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 0 0 2px var(--magenta), 5px 5px 0 var(--outline);
  text-decoration: none;
}
.found-item:hover { background: var(--panel-2); }
.found-name { font-weight: 900; font-size: 1.1rem; }
.found-state { grid-column: 1; font-size: .86rem; color: var(--text-dim); }
.found-go { grid-column: 2; grid-row: 1 / span 2; font-family: var(--font-latin); font-size: 1.4rem; color: var(--magenta); }
.mine-item {
  min-height: 48px;
  padding: 8px 18px;
  border: 3px solid var(--outline);
  border-radius: 10px;
  background: var(--panel-2);
  box-shadow: 0 0 0 2px var(--line), 4px 4px 0 var(--outline);
  font-weight: 800;
  cursor: pointer;
}
.mine-item:hover { box-shadow: 0 0 0 2px var(--cyan), 4px 4px 0 var(--outline); }

/* 表示端末・司会としてつなぐ */
.link {
  margin-top: 34px;
  padding: 14px 18px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: rgba(12, 13, 22, .7);
}
.link summary { cursor: pointer; font-weight: 800; }
.link p { margin: 10px 0 14px; color: var(--text-dim); font-size: .92rem; }

.foot {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 20px 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-dim);
  font-family: var(--font-latin);
  font-size: .78rem;
  letter-spacing: .06em;
}
.foot a { text-decoration: none; }

@media (max-width: 520px) {
  .entry-input, .entry-input--small { max-width: none; flex-basis: 100%; }
  .go { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tape span { animation: none; }
}
html[data-motion="off"] .tape span { animation: none; }
