:root{--chat-ink:#20263a;--chat-purple:#6d4cd3;--chat-pink:#ff7ab6;--chat-yellow:#ffd768;--chat-mint:#baf2dc;--chat-paper:#fffdf7}.chat-game-page{min-height:100vh;color:var(--chat-ink);background:radial-gradient(circle at 8% 10%,#fff2a9 0 8%,transparent 24%),radial-gradient(circle at 92% 18%,#ffc7e3 0 9%,transparent 25%),linear-gradient(145deg,#eef8ff,#f8efff 58%,#eafff4)}.chat-game-main{width:min(1180px,calc(100% - 28px));margin:auto;padding:34px 0 72px}.chat-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;align-items:center;margin-bottom:28px}.chat-hero h1{font-size:clamp(2.3rem,7vw,5.6rem);line-height:.94;max-width:850px;margin:.15em 0}.chat-hero h1 em{color:var(--chat-purple)}.chat-hero-art{font-size:clamp(5rem,14vw,10rem);filter:drop-shadow(0 18px 20px #5b3aa633);animation:chat-float 3.4s ease-in-out infinite}.chat-choice-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.chat-choice{display:grid;gap:10px;padding:26px;border:3px solid #342a65;border-radius:28px;background:#fff;box-shadow:0 10px 0 #342a65;color:inherit;text-decoration:none;transition:.18s transform}.chat-choice:hover{transform:translateY(-4px)}.chat-choice>span{font-size:3rem}.chat-choice strong{font-size:1.35rem}.chat-panel{background:#ffffffeb;border:3px solid #342a65;border-radius:28px;box-shadow:0 10px 0 #342a65;padding:clamp(18px,4vw,34px);margin:20px 0}.chat-panel h2,.chat-panel h3{margin-top:0}.chat-auth-grid,.chat-profile-grid,.chat-host-grid,.chat-reveal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.chat-profile-grid label,.chat-form label{display:grid;gap:7px;font-weight:800}.chat-profile-grid input,.chat-profile-grid select,.chat-form input,.chat-form textarea,.chat-form select,.chat-compose input,.chat-reply textarea{width:100%;border:2px solid #6a6290;border-radius:14px;background:#fff;padding:13px 14px;font:inherit;color:inherit}.chat-profile-grid input:focus,.chat-form input:focus,.chat-form textarea:focus,.chat-compose input:focus,.chat-reply textarea:focus{outline:4px solid #ffd768;border-color:#342a65}.chat-button{min-height:48px;border:0;border-radius:15px;padding:11px 18px;background:var(--chat-purple);color:#fff;font:800 1rem/1.1 inherit;cursor:pointer;box-shadow:0 4px 0 #35256e}.chat-button.secondary{background:#fff;color:#35256e;border:2px solid #35256e}.chat-button.danger{background:#bd315c}.chat-button:disabled{opacity:.45;cursor:not-allowed}.chat-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.chat-room-code{display:inline-block;letter-spacing:.16em;font-size:clamp(2rem,7vw,4.6rem);font-weight:950;color:var(--chat-purple);background:#fff5bd;border:3px dashed #6d4cd3;border-radius:22px;padding:10px 20px}.chat-status{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.chat-pill{display:inline-flex;align-items:center;min-height:34px;padding:6px 12px;border-radius:999px;background:#eee8ff;font-weight:800}.chat-safety{padding:14px 16px;border-radius:16px;background:#fff2c7;border-left:6px solid #f6b600}.chat-message-list{display:grid;gap:13px;min-height:260px;max-height:58vh;overflow:auto;padding:15px;background:linear-gradient(#f7f5ff,#f5fffb);border:2px solid #d8d2ee;border-radius:22px}.chat-bubble{max-width:min(78%,650px);padding:13px 17px;border-radius:20px;background:#fff;border:2px solid #4a4074;box-shadow:0 4px 0 #ddd6f1;white-space:pre-wrap;overflow-wrap:anywhere}.chat-bubble.class{justify-self:end;background:#fff0a9;border-color:#725e13}.chat-bubble.teacher{justify-self:start;background:#dff8ef}.chat-bubble small{display:block;opacity:.65;font-weight:800;margin-bottom:3px}.chat-compose{display:grid;grid-template-columns:1fr auto;gap:10px;margin-top:13px}.chat-compose .chat-button{min-width:130px}.chat-turns{height:12px;background:#ddd7ef;border-radius:999px;overflow:hidden;margin:11px 0}.chat-turns span{display:block;height:100%;background:linear-gradient(90deg,var(--chat-purple),var(--chat-pink));transition:width .3s}.chat-typing{font-weight:800;color:#5b4e84;padding:8px 2px}.chat-vote{display:grid;grid-template-columns:1fr 1fr;gap:18px}.chat-vote button{min-height:130px;font-size:clamp(1.25rem,4vw,2.1rem);border-radius:24px}.chat-reveal-card{border:3px solid #473c75;border-radius:22px;padding:17px;background:#fff}.chat-reveal-card.ai{box-shadow:0 0 0 7px #ffcf6c}.chat-result{font-size:clamp(1.5rem,4vw,2.7rem);font-weight:950;text-align:center}.chat-wait{text-align:center;padding:32px}.chat-wait-icon{font-size:5rem;animation:chat-float 2.7s ease-in-out infinite}.chat-private{border:4px solid #bd315c;background:#fff6fa}.chat-notice{min-height:24px;margin-top:9px;font-weight:800}.chat-notice.error{color:#b40035}.chat-notice.success{color:#147046}.chat-hidden{display:none!important}@keyframes chat-float{50%{transform:translateY(-10px) rotate(2deg)}}@media(max-width:760px){.chat-hero{grid-template-columns:1fr}.chat-hero-art{display:none}.chat-choice-grid,.chat-auth-grid,.chat-profile-grid,.chat-host-grid,.chat-reveal-grid{grid-template-columns:1fr}.chat-compose{grid-template-columns:1fr}.chat-vote{grid-template-columns:1fr}.chat-bubble{max-width:90%}}

.chat-game-page [hidden]{display:none!important}.chat-explanation{margin:1rem 0 .4rem}.chat-explanation summary{cursor:pointer;font-weight:750}.chat-profile-grid textarea{width:100%;box-sizing:border-box;padding:.65rem;border:1px solid #baceca;border-radius:.65rem;font:inherit}.chat-question{border-left:4px solid #52a69a;padding:.7rem 1rem;margin:0;font-size:1.17rem}.chat-choice-grid:has(>a:nth-child(2):last-child){grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}

.chat-game-main > .chat-safety + .chat-choice-grid { margin-block-start: clamp(1.5rem, 4vw, 3rem); }
