:root { color-scheme: light dark; }
body { font-family: system-ui, sans-serif; margin: 0; }
main { max-width: 46rem; margin: 0 auto; padding: 1rem; }
header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
section { border: 1px solid #8886; border-radius: .5rem; padding: .75rem 1rem; margin: .75rem 0; }
h1 { font-size: 1.3rem; } h2 { font-size: 1.05rem; margin: .25rem 0; }
button, .button { font: inherit; padding: .45rem .8rem; margin: .2rem .2rem 0 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
pre { white-space: pre-wrap; word-break: break-word; }

/* ログイン画面 */
body.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem;
  box-sizing: border-box; color: #e8eaf2; background: radial-gradient(circle at 50% 0%, #2b2f55 0%, #0e1017 60%) #0e1017; }
body.login main.login-card { width: 100%; max-width: 26rem; margin: 0; padding: 2rem 1.6rem; box-sizing: border-box;
  background: #171a24; border: 1px solid #2b3042; border-radius: 1rem; box-shadow: 0 1.2rem 3rem #0008; text-align: center; }
.login-logo { width: 3.6rem; height: 3.6rem; color: #8b93ff; }
.login h1 { font-size: 1.6rem; margin: .4rem 0 0; }
.login .lead { margin: .3rem 0 1.4rem; color: #aeb4c8; }
.login .alert { background: #4a1d24; border: 1px solid #a3404e; color: #ffd9dd; border-radius: .6rem; padding: .7rem .9rem; margin: 0 0 1rem; text-align: left; }
.discord-button { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .95rem 1rem;
  border-radius: .7rem; background: #5865f2; color: #fff; font-weight: 700; font-size: 1.08rem; text-decoration: none; }
.discord-button:hover { background: #4752c4; }
.discord-button:focus-visible { outline: 3px solid #c7ccff; outline-offset: 2px; }
.discord-button svg { width: 1.5rem; height: 1.5rem; }
.login h2 { font-size: .85rem; color: #8d94ab; text-align: left; margin: 1.6rem 0 .5rem; }
.login .features { list-style: none; margin: 0; padding: 0; text-align: left; }
.login .features li { background: #1f2331; border-radius: .6rem; padding: .6rem .85rem; margin-bottom: .45rem; font-size: .9rem; color: #aeb4c8; }
.login .features strong { display: block; color: #e8eaf2; font-size: 1rem; }
.login .note { text-align: left; font-size: .85rem; line-height: 1.6; color: #aeb4c8; margin: .3rem 0; }
.server-info { white-space: pre-line; font-size: .9rem; opacity: .85; }
.copy-row { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin: .35rem 0; }
.copy-row span { overflow-wrap: anywhere; }
.copy-row button { font-size: .85rem; padding: .2rem .6rem; margin: 0; }
.update-needed { font-weight: 700; color: #b45309; border: 1px solid #f59e0b; border-radius: .4rem; padding: .35rem .6rem; background: #f59e0b1f; }
@media (prefers-color-scheme: dark) { .update-needed { color: #fbbf24; } }

/* SteamID の登録 */
.steam[hidden], .steam [hidden] { display: none; }
.steam-todo { border: 2px solid #5865f2; background: #5865f214; }
.steam .steps { padding-left: 1.4rem; line-height: 1.7; }
.steam .note { font-size: .85rem; opacity: .8; }
.steam-input { display: flex; flex-wrap: wrap; gap: .4rem; }
.steam-input input { font: inherit; flex: 1 1 14rem; min-width: 0; padding: .45rem .6rem; }
.steam-input button { margin: 0; }
.steam-error { color: #dc2626; margin: .4rem 0 0; }
.steam .steps li { margin-bottom: .6rem; }
.steam .steps img { display: block; width: 100%; max-width: 30rem; height: auto; margin-top: .35rem; }

/* 接続の許可 */
.access[hidden], .access [hidden] { display: none; }
.access-todo { border: 2px solid #f59e0b; background: #f59e0b14; }
.access h3 { font-size: .95rem; margin: .8rem 0 .2rem; }
.access .note { font-size: .85rem; opacity: .85; }
.plain { list-style: none; padding: 0; margin: .3rem 0; }
.plain li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; padding: .3rem 0; }
.plain li.same-line { font-weight: 700; }
.game-links { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin: .5rem 0; }
.game-links .launch { background: #2f7d32; color: #fff; font-weight: 700; text-decoration: none; border-radius: .4rem; padding: .5rem 1rem; }

/* ゲームの設定 */
.settings[hidden] { display: none; }
.settings { border: 2px solid #5865f2; }
.settings label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem; padding: .3rem 0; }
.settings input, .settings select { font: inherit; width: 9rem; padding: .3rem .5rem; }
.settings .note { font-size: .85rem; opacity: .85; }

/* 参加手順 */
.guide[hidden] { display: none; }
.guide { border: 2px solid #22c55e; }
.guide li { margin: .4rem 0; }
