*{box-sizing:border-box}html{min-height:100%}body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:#f6f7fb;color:#172033}button,input,select{font:inherit}.page{width:min(1180px,100%);margin:0 auto;padding:18px}.home{min-height:100vh;display:grid;place-items:center}.hero{width:min(460px,100%);text-align:center}.card{background:#fff;border:1px solid #e6e8ef;border-radius:22px;padding:18px;box-shadow:0 12px 30px #0f172a14}.eyebrow{color:#6d28d9;font-weight:800;letter-spacing:.08em;text-transform:uppercase;font-size:12px}h1{font-size:clamp(36px,8vw,64px);margin:4px 0 8px}h2,h3{margin:0 0 12px}.muted{color:#667085;margin:0 0 8px}.field{display:grid;gap:8px;margin:14px 0;text-align:left;font-weight:700}input,select{width:100%;border:1px solid #d0d5dd;border-radius:14px;padding:12px 14px;background:#fff}.btn{border:0;border-radius:14px;padding:12px 16px;background:#5b21b6;color:#fff;font-weight:800;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn:disabled{opacity:.5;cursor:not-allowed}.btn.secondary{background:#eef2ff;color:#3730a3}.btn.danger{background:#fee2e2;color:#991b1b}.divider{margin:18px 0 4px;color:#98a2b3}.error{background:#fee2e2;color:#991b1b;padding:10px 12px;border-radius:12px;margin:12px 0}.grid{display:grid;gap:16px}.grid.two{grid-template-columns:1fr 1fr}.game-grid{grid-template-columns:minmax(0,2fr) minmax(280px,1fr);align-items:start}.prompt-options{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.stack{display:grid;gap:16px}.room-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.header-actions{display:flex;gap:8px;flex-wrap:wrap}.game-header{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(320px,1.2fr);align-items:stretch;gap:14px;margin-bottom:16px}.game-meta{display:grid;grid-template-columns:repeat(3,minmax(80px,1fr));gap:10px}.meta-item{background:#f8fafc;border:1px solid #eef2f7;border-radius:16px;padding:12px;text-align:center}.meta-item strong{display:block;font-size:15px}.timer-item{background:#fff7ed;border-color:#fed7aa}.timer-item strong{color:#9a3412;font-size:22px}.word-box{display:grid;place-items:center;text-align:center;min-height:86px;padding:14px;border-radius:18px;border:2px solid #c4b5fd;background:linear-gradient(135deg,#f5f3ff,#eef2ff)}.word-box .muted{margin:0;font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#5b21b6}.word-box strong{display:block;margin-top:6px;color:#172033;font-size:clamp(26px,4vw,42px);line-height:1.15;letter-spacing:.06em;word-break:break-word}.drawer-word{border-color:#86efac;background:linear-gradient(135deg,#f0fdf4,#ecfeff)}.drawer-word .muted{color:#166534}.guesser-word{border-color:#c4b5fd}.player-list,.leaderboard{display:grid;gap:8px}.player-row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #eef0f5}.game-main-area{min-width:0}.canvas-card{padding:12px}.waiting-card{min-height:260px;display:grid;place-items:center;text-align:center}.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px}.color-dot{width:30px;height:30px;border-radius:999px;border:2px solid #fff;box-shadow:0 0 0 1px #cbd5e1;cursor:pointer}.draw-canvas{width:100%;aspect-ratio:16 / 10;background:#fff;border:1px solid #d0d5dd;border-radius:16px;touch-action:none;display:block}.chat-card{min-height:340px;display:flex;flex-direction:column}.chat-header{display:grid;gap:2px;margin-bottom:8px}.chat-header h3{margin:0}.latest-message{display:none;margin:0;color:#667085;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.messages{flex:1;max-height:260px;overflow-y:auto;display:grid;gap:8px;align-content:start;padding-right:4px}.message{padding:8px 10px;border-radius:12px;background:#f2f4f7}.message.correct{background:#dcfce7;color:#166534;font-weight:800}.message.system{background:#fff7ed;color:#9a3412}.guess-input-wrap{margin-top:12px}.guess-form{display:flex;gap:8px}.prompt-choice{min-height:52px;white-space:normal}.reveal{margin-bottom:16px;text-align:center;background:#fffbeb;border-color:#fde68a}.winner{text-align:center;width:min(560px,100%);margin:0 auto}@media(max-width:900px){.game-header,.game-grid{grid-template-columns:1fr}}@media(max-width:820px){.grid.two,.game-grid{grid-template-columns:1fr}.page{padding:10px}.room-page{padding-bottom:96px}.card{border-radius:18px;padding:14px}.room-header{align-items:flex-start;flex-direction:column}.header-actions{width:100%}.header-actions .btn{flex:1;min-width:120px}.game-header{position:sticky;top:0;z-index:20;margin:-10px -10px 12px;border-radius:0 0 20px 20px;padding:10px;box-shadow:0 10px 22px #0f172a1f}.game-meta{grid-template-columns:repeat(3,1fr);gap:6px}.meta-item{padding:8px 6px;border-radius:12px}.meta-item .muted{font-size:11px;margin-bottom:4px}.meta-item strong{font-size:12px}.timer-item strong{font-size:18px}.word-box{min-height:72px;padding:10px}.word-box strong{font-size:clamp(24px,8vw,34px);letter-spacing:.08em}.canvas-card{padding:8px}.toolbar{gap:6px;margin-bottom:8px}.color-dot{width:26px;height:26px}.draw-canvas{aspect-ratio:4 / 3;border-radius:14px;min-height:300px}.stack{gap:10px}.chat-card{min-height:auto;padding-bottom:10px}.chat-header{margin-bottom:6px}.latest-message{display:block}.messages{max-height:118px;gap:6px}.message{padding:7px 9px;font-size:14px}.guess-input-wrap{position:sticky;bottom:8px;z-index:25;margin-top:8px;background:#fffffff5;border:1px solid #e6e8ef;border-radius:16px;padding:8px;box-shadow:0 10px 24px #0f172a29}.guess-form{flex-direction:row;gap:8px}.guess-form input{min-height:44px}.guess-form .btn{min-width:86px;padding-inline:12px}.prompt-options{grid-template-columns:1fr}}@media(max-width:430px){.page{padding:8px}.room-page{padding-bottom:108px}.game-header{margin:-8px -8px 10px;padding:8px}.game-meta{grid-template-columns:repeat(3,1fr)}.meta-item strong{font-size:11px}.timer-item strong{font-size:17px}.word-box strong{font-size:26px}.draw-canvas{min-height:280px}.messages{max-height:96px}}@media(max-width:820px){.game-grid{display:flex;flex-direction:column;gap:10px}.game-main-area{order:1}.stack{order:2;display:flex;flex-direction:column;gap:10px}.stack>.chat-card{order:-1}.stack>:not(.chat-card){order:2}.draw-canvas{min-height:240px;max-height:330px}.chat-card{padding:10px}.chat-card .messages{max-height:70px}.guess-input-wrap{position:sticky;bottom:6px;z-index:50;margin-top:6px}.guess-form{flex-direction:row}.guess-form input{font-size:16px}.guess-form .btn{min-width:82px}}@media(max-width:820px){.chat-card:focus-within .messages{max-height:0;overflow:hidden}.chat-card:focus-within .chat-header h3{display:none}}@media(max-width:820px){.room-page:has(.guess-form input:focus){padding-bottom:96px}.room-page:has(.guess-form input:focus) .game-header{padding:6px 8px;gap:6px}.room-page:has(.guess-form input:focus) .game-meta{gap:5px}.room-page:has(.guess-form input:focus) .meta-item{padding:6px 4px}.room-page:has(.guess-form input:focus) .meta-item .muted{display:none}.room-page:has(.guess-form input:focus) .meta-item strong{font-size:11px}.room-page:has(.guess-form input:focus) .timer-item strong{font-size:16px}.room-page:has(.guess-form input:focus) .word-box{min-height:52px;padding:6px}.room-page:has(.guess-form input:focus) .word-box .muted{font-size:11px}.room-page:has(.guess-form input:focus) .word-box strong{font-size:24px;margin-top:2px}.room-page:has(.guess-form input:focus) .draw-canvas{min-height:210px;max-height:245px;aspect-ratio:4 / 3}.room-page:has(.guess-form input:focus) .stack>:not(.chat-card){display:none}.room-page:has(.guess-form input:focus) .chat-card{padding:8px;box-shadow:none}.room-page:has(.guess-form input:focus) .chat-header h3{display:none}.room-page:has(.guess-form input:focus) .latest-message{display:block;font-size:13px;margin-bottom:4px}.room-page:has(.guess-form input:focus) .messages{display:none}.room-page:has(.guess-form input:focus) .guess-input-wrap{position:sticky;bottom:4px;z-index:100;margin-top:0}.room-page:has(.guess-form input:focus) .guess-form input{min-height:46px;font-size:16px}.room-page:has(.guess-form input:focus) .guess-form .btn{min-width:82px;padding:10px 14px}}@media(max-width:820px){.room-page{width:100%;max-width:100%;overflow-x:hidden}.game-grid,.game-main-area,.stack,.canvas-card,.chat-card,.stack>*,.draw-canvas{width:100%;max-width:100%}.game-main-area,.canvas-card,.chat-card,.stack>*{margin-left:auto;margin-right:auto}.canvas-card{overflow:hidden}.draw-canvas{display:block;margin:0 auto}.stack{align-items:stretch}.chat-card,.stack>.card{justify-self:stretch}}@media(max-width:820px){.room-page:has(.guess-form input:focus) .game-main-area,.room-page:has(.guess-form input:focus) .canvas-card{width:100%;max-width:100%;margin-left:auto;margin-right:auto}.room-page:has(.guess-form input:focus) .draw-canvas{width:100%;min-height:230px;max-height:270px;margin-left:auto;margin-right:auto}.room-page:has(.guess-form input:focus) .chat-card{width:100%;max-width:100%}}.player-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #eef0f5}.player-main{display:flex;align-items:center;gap:12px;min-width:0}.rank-icon{min-width:34px;font-weight:800;color:#6b7280}.avatar{width:42px;height:42px;border-radius:999px;background:#eef2ff;display:grid;place-items:center;font-size:22px;flex-shrink:0}.player-meta{display:flex;flex-direction:column;min-width:0}.player-name{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.player-score{font-size:18px}.active-drawer{background:#f8fafc}.offline-tag,.waiting-tag{font-size:12px;color:#667085}.waiting-tag{color:#7c3aed;font-weight:700}@media(max-width:820px){.avatar{width:36px;height:36px;font-size:18px}.player-score{font-size:16px}}.leaderboard-title{display:flex;justify-content:space-between;align-items:center;gap:12px}.leaderboard-title span{color:#667085;font-size:13px;font-weight:700}.active-drawer{background:#f5f3ff;border-radius:14px;padding-left:8px;padding-right:8px;border-bottom:0;box-shadow:inset 0 0 0 1px #ddd6fe}.drawer-tag{color:#6d28d9;font-size:12px;font-weight:800}.player-score{background:#f8fafc;border-radius:999px;padding:6px 10px;min-width:44px;text-align:center}.toast-stack{position:fixed;top:18px;right:18px;z-index:9999;display:flex;flex-direction:column;gap:10px;pointer-events:none}.toast{background:#111827eb;color:#fff;padding:12px 16px;border-radius:14px;font-weight:700;box-shadow:0 12px 24px #0000002e;animation:toastSlide .2s ease}@keyframes toastSlide{0%{transform:translateY(-10px);opacity:0}to{transform:translateY(0);opacity:1}}@media(max-width:820px){.toast-stack{left:12px;right:12px;top:10px}.toast{text-align:center}}@media(min-width:1100px){.page{width:min(1380px,100%)}.game-grid{grid-template-columns:minmax(0,3fr) minmax(300px,.9fr)}}.canvas-shell{position:relative;padding:10px}.drawing-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;flex-wrap:wrap}.tool-group{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.color-group{max-width:520px}.color-dot.selected-color{outline:3px solid #7c3aed;outline-offset:2px}.tool-pill{border:1px solid #d0d5dd;background:#fff;color:#344054;border-radius:999px;min-width:34px;height:32px;font-weight:800;cursor:pointer}.tool-pill.active-tool{background:#ede9fe;color:#5b21b6;border-color:#c4b5fd}.active-tool-button{box-shadow:inset 0 0 0 2px #7c3aed}.big-canvas{aspect-ratio:1000 / 650}@media(min-width:900px){.big-canvas{min-height:520px}}.viewer-topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px}.viewer-topbar .muted{margin:0}.reaction-buttons button{border:1px solid #e6e8ef;background:#fff;border-radius:999px;width:42px;height:36px;cursor:pointer;font-size:18px;box-shadow:0 8px 18px #0f172a14}.canvas-reaction-stage{position:relative}.floating-reactions{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;display:grid;place-items:center}.floating-reaction{display:grid;place-items:center;gap:2px;animation:reactionPop 1.4s ease forwards}.floating-reaction span{font-size:42px}.floating-reaction small{background:#111827db;color:#fff;padding:3px 8px;border-radius:999px;font-size:12px}@keyframes reactionPop{0%{transform:translateY(10px) scale(.8);opacity:0}20%{transform:translateY(0) scale(1.08);opacity:1}to{transform:translateY(-54px) scale(1);opacity:0}}@media(max-width:820px){.drawing-toolbar{position:sticky;top:112px;z-index:18;background:#fffffff5;border:1px solid #e6e8ef;border-radius:16px;padding:8px;margin-bottom:8px;box-shadow:0 10px 22px #0f172a1a}.color-group{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding:2px}.color-group::-webkit-scrollbar{display:none}.tool-group.action-group{width:100%;justify-content:space-between}.tool-group.action-group .btn{flex:1}.big-canvas{min-height:340px;max-height:460px;aspect-ratio:4 / 3}.viewer-topbar{margin-bottom:6px}.reaction-buttons button{width:46px;height:38px}}@media(max-width:430px){.big-canvas{min-height:320px;max-height:430px}.room-page:has(.guess-form input:focus) .big-canvas{min-height:240px;max-height:290px}}.canvas-card{position:relative}.compact-toolbar{display:grid;gap:8px;margin-bottom:8px}.toolbar-colors{display:flex;gap:7px;overflow-x:auto;padding:3px 2px 5px}.toolbar-colors::-webkit-scrollbar{display:none}.toolbar-colors .color-dot{flex:0 0 auto}.active-color{outline:3px solid #7c3aed;outline-offset:2px}.toolbar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.toolbar-actions select{width:auto;min-width:105px;padding:9px 10px}.toolbar-actions .btn{padding:9px 12px;min-height:40px}.canvas-wrapper{position:relative;width:100%}.canvas-wrapper .draw-canvas{width:100%;aspect-ratio:1200 / 700;min-height:520px}.canvas-reaction{position:absolute;z-index:20;left:50%;top:50%;transform:translate(-50%,-50%);background:#111827e6;color:#fff;border-radius:999px;padding:10px 16px;font-size:24px;font-weight:900;pointer-events:none;animation:canvasReactionPop 1.4s ease forwards}@keyframes canvasReactionPop{0%{opacity:0;transform:translate(-50%,-35%) scale(.7)}20%{opacity:1;transform:translate(-50%,-50%) scale(1.1)}to{opacity:0;transform:translate(-50%,-85%) scale(1)}}.canvas-floating-reactions{position:absolute;right:10px;bottom:10px;display:flex;gap:8px}.reaction-buttons{display:flex;gap:8px}.reaction-btn,.reaction-buttons button{border:1px solid #e6e8ef;background:#fffffff5;border-radius:999px;width:42px;height:38px;cursor:pointer;font-size:18px;box-shadow:0 8px 18px #0f172a14}.compact-viewer-topbar{margin-bottom:8px}.compact-viewer-topbar .muted{margin:0}@media(min-width:1100px){.page{width:min(1420px,100%)}.game-grid{grid-template-columns:minmax(0,3fr) minmax(280px,.85fr)}.canvas-wrapper .draw-canvas{min-height:560px}}@media(max-width:820px){.compact-toolbar{gap:6px;margin-bottom:6px}.toolbar-colors{gap:6px;padding-bottom:3px}.toolbar-colors .color-dot{width:24px;height:24px}.toolbar-actions{gap:6px}.toolbar-actions select{min-width:82px;max-width:96px;padding:7px 8px;font-size:13px}.toolbar-actions .btn{padding:8px 9px;min-height:36px;font-size:13px}.canvas-wrapper .draw-canvas{aspect-ratio:4 / 3;min-height:350px;max-height:440px}.canvas-floating-reactions{right:8px;bottom:8px}.reaction-btn,.reaction-buttons button{width:40px;height:36px}.compact-viewer-topbar{margin-bottom:6px}.chat-card .messages{max-height:52px}.leaderboard-card{font-size:13px}.leaderboard-card .player-row{padding:8px 0}}@media(max-width:430px){.canvas-wrapper .draw-canvas{min-height:330px;max-height:410px}.toolbar-actions .btn{padding:7px 8px}.room-page:has(.guess-form input:focus) .canvas-wrapper .draw-canvas{min-height:250px;max-height:300px}}.profile-card-mini,.xp-summary{display:flex;align-items:center;gap:12px;text-align:left;background:#f8fafc;border:1px solid #eef2f7;border-radius:18px;padding:12px;margin:14px 0}.profile-avatar-big{width:58px;height:58px;border-radius:999px;background:#eef2ff;display:grid;place-items:center;font-size:32px;flex-shrink:0}.profile-info-mini{flex:1;min-width:0;display:grid;gap:4px}.profile-info-mini strong{font-size:16px}.profile-info-mini span,.profile-info-mini small,.player-subtitle{color:#667085;font-size:12px;font-weight:700}.xp-bar{width:100%;height:8px;background:#e5e7eb;border-radius:999px;overflow:hidden}.xp-bar>div{height:100%;background:linear-gradient(90deg,#7c3aed,#2563eb);border-radius:999px}.avatar-picker{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 8px}.avatar-picker::-webkit-scrollbar{display:none}.avatar-choice{width:38px;height:38px;border-radius:999px;border:1px solid #e6e8ef;background:#fff;display:grid;place-items:center;font-size:20px;cursor:pointer;flex:0 0 auto}.avatar-choice.active-avatar{border-color:#7c3aed;box-shadow:0 0 0 3px #ede9fe}@media(max-width:820px){.profile-avatar-big{width:50px;height:50px;font-size:28px}.avatar-choice{width:34px;height:34px;font-size:18px}}@media(max-width:820px){html,body,#root{width:100%;max-width:100%;overflow-x:hidden}.home{width:100%;min-height:100dvh;padding:12px;display:flex;align-items:center;justify-content:center}.home .hero{width:100%;max-width:460px;margin:0 auto}.home .card{max-width:100%}.profile-card-mini,.xp-summary{width:100%;max-width:100%}.hero .btn{margin-top:8px}}.public-room-list{display:grid;gap:10px;margin-top:14px}.public-room-card{width:100%;border:1px solid #e6e8ef;background:#fff;border-radius:18px;padding:14px;text-align:left;cursor:pointer;transition:.2s ease}.public-room-card:hover{transform:translateY(-1px);box-shadow:0 10px 24px #0f172a14}.public-room-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.public-room-bottom{display:flex;justify-content:space-between;gap:10px;color:#667085;font-size:14px}.room-live,.room-waiting{font-size:11px;font-weight:800;border-radius:999px;padding:5px 10px}.room-live{background:#dcfce7;color:#166534}.room-waiting{background:#fef3c7;color:#92400e}@media(max-width:820px){.public-room-card{padding:12px}.public-room-bottom{font-size:13px;flex-direction:column;gap:4px}}.public-rooms{margin:18px 0;display:grid;gap:10px}.public-title{font-weight:800;color:#111827;text-align:left}.public-room-card{width:100%;border:1px solid #e5e7eb;background:#fff;border-radius:16px;padding:14px;display:flex;justify-content:space-between;align-items:center;cursor:pointer;transition:.2s ease;text-align:left}.public-room-card:hover{transform:translateY(-1px);border-color:#c4b5fd;box-shadow:0 10px 20px #5b21b614}.public-room-card p{margin:4px 0 0;color:#6b7280;font-size:14px}.room-badge{background:#ede9fe;color:#5b21b6;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800}
