:root{
  --ink:#16213a;
  --muted:#677189;
  --paper:#fffdf9;
  --line:#ded8ce;
  --blue:#1687e8;
  --blue-dark:#0752a5;
  --red:#ef4355;
  --red-dark:#9b1726;
  --yellow:#ffcf3c;
  --green:#36a76d;
  --shadow:0 14px 34px rgba(30,44,64,.16);
}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;background:#e9eef4;color:var(--ink)}
button,input{font:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,a:focus-visible{outline:4px solid #ffb41f;outline-offset:2px}
img{max-width:100%;display:block}
.game-app{width:min(720px,100%);margin:0 auto;min-height:100vh;background:linear-gradient(rgba(245,249,255,.92),rgba(255,250,239,.96)),url("../../nise_transfer_student_background_9x16.png") center/cover fixed;padding:14px 14px 46px}
.top-nav{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:10px}
.back-home{display:inline-flex;align-items:center;text-decoration:none;background:rgba(255,255,255,.92);border:1px solid var(--line);color:var(--ink);border-radius:999px;padding:9px 13px;font-size:13px;font-weight:800;box-shadow:0 5px 16px rgba(24,42,66,.08)}
.game-brand{width:min(430px,76%);margin:4px auto 12px;filter:drop-shadow(0 7px 12px rgba(18,48,93,.17))}
.title{text-align:center;margin:10px 0 4px;font-size:clamp(25px,7vw,34px)}
.subtitle{text-align:center;color:var(--muted);margin:0 0 18px;line-height:1.6}
.card{background:rgba(255,253,249,.96);border:1px solid rgba(218,210,199,.95);border-radius:22px;padding:17px;box-shadow:var(--shadow);margin-bottom:13px;backdrop-filter:blur(4px)}
.stack{display:grid;gap:12px}.row{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.btn{border:0;border-radius:15px;padding:13px 15px;min-height:50px;background:linear-gradient(#41a9ff,#147ad4);color:#fff;font-weight:900;box-shadow:0 5px 0 #0755a2;touch-action:manipulation}.btn:active{transform:translateY(3px);box-shadow:0 2px 0 #0755a2}.btn.secondary{background:#edf2f7;color:var(--ink);box-shadow:0 4px 0 #c6d0dc}.btn.danger{background:linear-gradient(#ff6b77,#df3446);box-shadow:0 5px 0 #9d1b29}.btn.ok{background:linear-gradient(#58c98b,#2f9d66);box-shadow:0 5px 0 #1f6f49}.btn.yellow{background:linear-gradient(#ffe36b,#ffc62c);color:#342b16;box-shadow:0 5px 0 #c98810}.btn:disabled{opacity:.35;cursor:not-allowed;transform:none;box-shadow:none}.btn.full{width:100%}
.choice{background:#fff;color:var(--ink);border:2px solid #d9e1ea;box-shadow:none}.choice.selected{border-color:var(--blue);background:#eaf6ff}.choice:active{transform:none;box-shadow:none}
.note{padding:11px 12px;border-radius:13px;background:#f1f5f9;color:#47566d;line-height:1.6}.warning{background:#fff0f1;color:#852b35}.success{background:#ecfaf2;color:#266643}.tiny{font-size:12px;color:var(--muted);line-height:1.5}
.player-card{display:grid;gap:11px}.player-line{display:grid;grid-template-columns:56px minmax(0,1fr);gap:11px;align-items:center}.avatar{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#e9f5ff,#fff2dc);font-size:25px;border:2px solid #fff;box-shadow:0 3px 10px rgba(30,52,85,.12)}.avatar.large{width:82px;height:82px;font-size:42px;margin:0 auto 10px}.player-line input{width:100%;min-width:0;padding:13px;border:2px solid #d9e1e9;border-radius:13px;background:#fff;color:var(--ink);font-size:16px}.icon-pick{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}.icon-btn{min-height:44px;border:1px solid #dce2ea;background:#fff;border-radius:12px;font-size:22px}.icon-btn.selected{outline:3px solid var(--blue);background:#eaf6ff}.icon-btn:disabled{opacity:.2}
.role-row{display:grid;grid-template-columns:64px minmax(0,1fr) auto auto auto;gap:8px;align-items:center;padding:10px 0;border-bottom:1px dashed #ddd7cc}.role-row:last-child{border:0}.role-thumb{width:58px;height:58px;object-fit:contain}.role-title{font-weight:900}.side-tag{display:inline-block;margin-top:3px;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:900}.side-tag.real{background:#def2ff;color:#0a5ba2}.side-tag.fake{background:#ffe0e3;color:#a7192c}.count{min-width:28px;text-align:center;font-weight:900}
.privacy-screen{min-height:330px;display:grid;place-items:center;text-align:center;background:linear-gradient(160deg,#15233c,#09111f);color:#fff;border-radius:22px;padding:22px;box-shadow:var(--shadow)}.privacy-screen p{color:#cbd5e1}.privacy-screen .avatar{color:var(--ink)}.hold{user-select:none;-webkit-user-select:none;touch-action:none}
.role-reveal{text-align:center}.role-card-large{width:min(330px,90%);margin:0 auto 12px;filter:drop-shadow(0 10px 20px rgba(20,45,83,.2))}.role-desc{line-height:1.7;color:#4c5a70;margin:10px auto 16px;max-width:520px}
.cover-card{min-height:260px;display:grid;place-items:center;text-align:center;background:linear-gradient(145deg,#f9fbff,#fff8eb)}
.topbar{display:flex;justify-content:space-between;gap:8px;margin:0 0 10px}.topbar .btn{min-height:42px;padding:9px 11px;font-size:13px;box-shadow:none}.night-role{font-size:13px;font-weight:900;padding:5px 9px;border-radius:999px;background:#eaf6ff;color:#0a5ca5}.night-role.fake{background:#ffe3e5;color:#a9192b}
.timer{font-size:58px;font-weight:1000;text-align:center;letter-spacing:.03em;margin:16px 0}.timer.low{color:var(--red)}
.vote-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.vote-choice{display:grid;grid-template-columns:40px 1fr;align-items:center;text-align:left;gap:8px}.vote-choice .avatar{width:38px;height:38px;font-size:20px}
.result-hero{text-align:center;padding:16px 8px}.result-logo{width:min(520px,100%);margin:0 auto 8px;filter:drop-shadow(0 10px 17px rgba(19,45,82,.15))}.result-reason{font-weight:800;line-height:1.6}.result-role{display:grid;grid-template-columns:44px minmax(0,1fr) 70px;gap:9px;align-items:center;padding:10px 0;border-bottom:1px solid #e3ddd3}.result-role:last-child{border:0}.result-mini{width:66px;height:66px;object-fit:contain}.strike{color:var(--muted);text-decoration:line-through}
.modal-backdrop{position:fixed;inset:0;background:rgba(8,16,30,.62);display:grid;place-items:center;padding:16px;z-index:100}.modal{width:min(660px,100%);max-height:86vh;overflow:auto;background:#fffdf9;border-radius:22px;padding:17px;box-shadow:0 18px 60px rgba(0,0,0,.28)}.role-help{display:grid;grid-template-columns:80px 1fr;gap:10px;padding:11px 0;border-bottom:1px solid #e4ded5}.role-help img{width:80px}.role-help p{margin:4px 0 0;color:#526076;line-height:1.55}.reg-line{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #e4ded5;font-weight:800}
h1,h2,h3,p{margin-top:0}
@media(max-width:520px){.game-app{padding:10px 10px 38px}.grid3{grid-template-columns:repeat(2,minmax(0,1fr))}.icon-pick{grid-template-columns:repeat(5,1fr)}.role-row{grid-template-columns:52px minmax(0,1fr) auto auto auto}.role-thumb{width:48px;height:48px}.vote-grid{grid-template-columns:1fr}.timer{font-size:49px}.result-role{grid-template-columns:40px minmax(0,1fr) 56px}.result-mini{width:52px;height:52px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
