:root{color-scheme:dark;--fg:#f1f6ff;--muted:#b9c8e1;--border:#476083}*{box-sizing:border-box}html{background:#10182b}body{margin:0;color:var(--fg);font-family:system-ui,"Yu Gothic",sans-serif;background:linear-gradient(#10193699,#0d1529d9),url("../houkago_gamebu_background_9x16.png") center/cover fixed;min-height:100dvh}
button,a,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ffe39a;outline-offset:2px}[hidden]{display:none!important}
.online-page{max-width:780px;margin:auto;min-height:100dvh;padding:12px 12px max(35px,env(safe-area-inset-bottom))}.top-nav{display:flex;justify-content:space-between;gap:10px}.top-nav a{padding:11px 16px;border-radius:12px;background:#f6f8ff;color:#10213c;text-decoration:none;font-size:13px;font-weight:950}
.hero{text-align:center;padding:10px 5px 18px;text-shadow:0 2px 8px #090f22}.hero .brand{display:block;width:min(300px,83%);max-height:130px;object-fit:contain;margin:0 auto}.eyebrow{font-size:11px;letter-spacing:.13em;color:#81eaff;font-weight:1000}.hero h1{font-size:clamp(24px,6vw,38px);margin:6px 0}.hero p:last-child{font-size:13px;margin:0;color:#dbe7fa}
.panel{padding:17px 15px;background:linear-gradient(150deg,rgba(23,41,78,.98),rgba(9,20,41,.98));border:1px solid var(--border);border-radius:21px;box-shadow:0 10px 30px #0007}.notice{padding:10px 12px;margin-bottom:12px;border:1px solid #bd7180;background:#513141;border-radius:11px;color:#ffe4ec;font-size:13px;font-weight:900}.notice.ok{background:#174039;border-color:#4cae85;color:#d3fff2}
label,.label-row{display:block;margin:0 0 7px;font-size:13px;color:#d4e8ff;font-weight:900}input,select{width:100%;min-height:49px;padding:10px 12px;border:1px solid #8198bd;border-radius:12px;background:#fff;color:#11223f;font-size:16px}.label-row{margin:13px 0 8px}.icons{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:17px}.icon-option{width:48px;height:48px;border:1px solid #4c648b;border-radius:11px;background:#253b63;color:#fff;font-size:26px}.icon-option.selected{border:3px solid #f9db8d;background:#64502b}
.split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.entry-part{min-width:0;border:1px solid #3d5375;border-radius:14px;background:#0c1b35e8;padding:13px}.entry-part h2{font-size:17px;margin:0 0 13px}.entry-part label{font-size:12px}.entry-part button{margin-top:12px;width:100%}
button.primary,.entry-part button,.game-change button{min-height:47px;padding:9px 12px;border:1px solid #92daff;border-radius:12px;background:linear-gradient(160deg,#aeedff,#6ac5f0 77%,#3989b9);color:#102c4b;font-weight:1000}.hint{font-size:12px;line-height:1.65;color:#c0cde3;margin:13px 0 0}
.room-head,.room-commands,.room-game,.member-head{display:flex;justify-content:space-between;align-items:center;gap:9px}.online-status{font-size:12px;color:#ffe3a2;font-weight:1000}.online-status.connected{color:#8ef7c8}.room-expiry{font-size:11px;color:#afc3e6}
.room-caption{text-align:center;font-size:12px;color:var(--muted);margin:14px 0 0;font-weight:900}.room-code{text-align:center;color:#ffe2a2;letter-spacing:.1em;font-size:clamp(32px,8vw,49px);font-weight:1000;margin-bottom:12px}.room-commands button{flex:1;min-height:43px;border:1px solid #7191c1;border-radius:10px;background:#233a5f;color:#ecf6ff;font-size:12px;font-weight:900;padding:7px}
.room-game{margin:18px 0;padding:12px;border:1px solid #3d5b81;border-radius:12px;background:#0b1932}.room-game small{display:block;font-size:11px;color:var(--muted);margin-bottom:5px}.room-game strong{font-size:16px}.room-game button{min-height:38px;padding:7px 10px;border-radius:10px;background:#29415f;color:#fff;border:1px solid #6e8ab1;font-weight:950}
.game-change{display:grid;gap:9px;padding:12px;margin-top:-10px;margin-bottom:17px;background:#132443;border:1px solid #47658a;border-radius:12px}.member-head h2{font-size:17px;margin:0}.member-head span{font-size:12px;color:var(--muted)}.members{display:grid;gap:8px;margin-top:11px}.member{display:flex;gap:9px;align-items:center;min-height:52px;border-radius:12px;background:#1a2b48;border:1px solid #324969;padding:10px}.member-icon{font-size:26px}.member strong{flex:1;min-width:0;overflow-wrap:anywhere;font-size:15px}.member em{font-size:10px;font-style:normal;color:#ffe2a0}.member-status{font-size:11px;color:#adbbd2}.member-status.ready{color:#87eed0;font-weight:1000}.member button{min-height:32px;background:#483042;color:#ffe0e6;border:1px solid #86516c;border-radius:9px;font-weight:900;font-size:11px}
.room-bottom{display:grid;gap:10px;margin-top:17px}.room-bottom .primary{width:100%;font-size:18px}.room-bottom .hint{text-align:center;margin:0}.room-bottom .leave{min-height:44px;background:#422b3e;color:#ffe6ec;border:1px solid #8e5776;border-radius:11px;font-weight:900}
@media(max-width:550px){.split{grid-template-columns:1fr}.online-page{padding:10px 10px 30px}.panel{padding:14px}.entry-part{padding:14px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* tablet native text entry: never block IME focus or caret selection */
#nickname,#code{
 font-size:16px;touch-action:auto;-webkit-user-select:text;user-select:text;
 -webkit-appearance:none;appearance:none;caret-color:#1461a8;
 scroll-margin-block:15vh;
}
#nickname:focus,#code:focus{outline:3px solid #7ed4ff;outline-offset:2px}
html{scroll-padding-bottom:25vh}
