/* The approved review requests 10/11/15: canvas first, chat visible, tools on demand. */
.app[data-page="drawing"] main{padding:0 12px 12px;min-height:calc(100dvh - 23px)}
.draw-room{padding:0 0 10px;position:relative}.draw-room .draw-top{display:flex;gap:9px;height:55px;margin:0 0 8px;padding:0 5px;background:#ffffffed;border-radius:16px;font-size:12px}.draw-top .back{width:24px;min-width:24px;padding:0}.draw-top>img{width:29px;height:29px;object-fit:contain}.draw-top strong{font-size:14px;white-space:nowrap}.draw-top>span:not(.role-tag){margin-left:auto;color:#6e82ac}.draw-top time{background:#eeebff;color:#7970d4;padding:3px 9px;border-radius:10px;white-space:nowrap;font-size:13px;font-weight:700}.role-tag{padding:4px 10px;border-radius:14px;background:#8174fb;color:white;white-space:nowrap;font-size:11px}.draw-board{position:relative;border:1px solid #efdde0;border-radius:16px;background:#fff;box-shadow:0 3px 8px #897c9c14;overflow:hidden}.draw-board canvas{display:block;width:100%;height:auto;aspect-ratio:1/1.16;touch-action:none;background:white;cursor:crosshair}.secret-word{position:absolute;top:7px;left:12px;pointer-events:none;font-size:11px;color:#9ca8be;background:#ffffffdd;border-radius:8px;padding:3px 6px}.draw-conversation{margin-top:10px;background:#ffffffea;border:1px solid #e2eafb;border-radius:16px;padding:9px 12px}.draw-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.draw-section-title strong{font-size:12px;color:#637da6}.brush-launch{display:flex;align-items:center;gap:3px;min-height:36px;padding:3px 12px;border-radius:12px;background:#7971f6;color:white;font-size:12px}.brush-launch .icon{width:23px;height:23px;background:white;border-radius:7px}.draw-messages{height:76px;overflow:auto;overscroll-behavior:contain;margin:3px 0 7px}.draw-room .draw-empty{font-size:11px;color:#9cacbf;margin:12px 3px;line-height:1.6}.draw-message{display:flex;align-items:flex-start;gap:8px;padding:3px 0;font-size:11px}.draw-message>span{color:#8b9cbe;flex:none;margin-top:4px}.draw-message p{font-size:12px!important;margin:0;background:#eef4ff;color:#4c618a;border-radius:9px;padding:4px 8px;overflow-wrap:anywhere}.draw-message.mine p{background:#eeeaff}.draw-composer{display:flex;gap:7px;align-items:stretch;margin:0}.draw-composer .input{min-width:0;width:100%;min-height:39px;padding:8px 11px;font-size:12px}.draw-composer .send{border-radius:11px;min-width:55px;padding:0 10px;min-height:39px;font-size:12px}.draw-demo{font-size:10px;margin:6px 4px;color:#95a2ba}.draw-demo summary{cursor:pointer;padding:3px}.draw-demo button{font-size:11px;color:#7885ab;min-height:32px;padding:5px 9px}.guesser-view{background:linear-gradient(135deg,#b8e9d9,#e8f8fc);border:1px solid #9ec8ea;border-radius:21px;padding:9px}.guesser-view .draw-top{gap:6px;padding:0 5px}.guesser-view .role-tag{background:#66c7ac}.guesser-view .draw-board canvas{aspect-ratio:1.17;cursor:default}.guess-card{margin-top:12px;padding:14px 12px;background:#ffffffef;border-radius:17px;border:1px solid #e3eefc}.guess-card h3{margin:0 0 10px;font-size:14px;color:#617ba9}.guess-card .error{margin:4px 0;min-height:17px;font-size:11px}.guess-records{min-height:135px;max-height:190px;overflow:auto}.guess-record{display:flex;gap:9px;align-items:center;border-radius:9px;background:#f6f8fc;margin:5px 0;padding:9px 7px;font-size:12px;color:#7d90b2}.guess-record img{width:26px;height:26px;object-fit:contain}.guess-record strong{font-size:12px;font-weight:500;flex:1;overflow-wrap:anywhere}.guess-record>span:last-child{font-size:22px;color:#fa8494}.guess-record.correct{background:#e5f9ed;color:#4aa87d}.guess-record.correct>span:last-child{color:#4aaa7e}
.brush-dialog,.drawing-outcome{border:1px solid #cbd9fa;border-radius:23px;padding:20px;background:#fff;color:#294573;width:360px;max-width:calc(100% - 28px);box-shadow:0 15px 60px #3f538433}.brush-dialog::backdrop,.drawing-outcome::backdrop{background:#27386655}.brush-dialog{margin:auto auto 24px}.brush-dialog h3{margin:0;font-size:16px}.brush-dialog [data-close]{font-size:25px;color:#8192b7;min-width:40px;min-height:40px}.brush-dialog p{font-size:12px;margin:10px 0;color:#7e8cac}.brush-colors{display:flex;justify-content:space-between;gap:4px}.brush-colors button{width:34px;height:34px;min-height:34px;padding:0;border:5px solid white;border-radius:50%;background:var(--paint)}.brush-colors button[aria-pressed="true"]{outline:2px solid #a59ded;outline-offset:1px}.brush-size{display:flex;align-items:center;gap:12px;margin:25px 0;font-size:13px}.brush-size input{min-width:0;flex:1;accent-color:#8175fa}.brush-size output{width:24px}.brush-actions{display:flex;gap:5px}.brush-actions button{flex:1;min-width:0;display:flex;align-items:center;flex-direction:column;gap:3px;padding:8px 1px;border-radius:12px;font-size:11px;color:#697fab;background:#f6f8ff}.brush-actions button[aria-pressed="true"]{background:#e9e5ff;outline:1px solid #b6aefa}.brush-actions .icon{width:25px;height:25px}.redo-icon{font-size:24px;height:25px;line-height:25px}.brush-actions button:disabled{opacity:.35}.drawing-outcome{text-align:center;max-height:92dvh;overflow:auto}.drawing-outcome h2{font-size:21px;margin:5px 0;color:#6b62d4}.drawing-outcome>p{font-size:12px;margin:8px 0}.drawing-snapshot{display:block;width:100%;max-height:43dvh;object-fit:contain;background:white;border:1px solid #e6eaf6;border-radius:15px}.reaction-actions{display:flex;gap:10px;margin:15px 0 8px}.reaction-actions button{flex:1;border:1px solid #f0dce7;border-radius:13px;background:#fff5f9;color:#c77793;padding:8px;font-size:13px}.reaction-actions button+button{background:#fffaeb;color:#aa8a4c;border-color:#efe5ca}.reaction-actions span{font-size:11px;margin-left:5px}.drawing-outcome .reaction-status{font-size:11px;min-height:20px}.drawing-outcome .primary{width:100%}
@media(min-width:501px){.app[data-page="drawing"] main{min-height:760px}.draw-board canvas{aspect-ratio:1/1.12}}
@media(max-height:760px) and (max-width:500px){.painter-view .draw-board canvas{aspect-ratio:1/1.02}.draw-messages{height:60px}}
@media(max-width:350px){.app[data-page="drawing"] main{padding:0 8px 8px}.draw-room .draw-top{gap:5px}.draw-top time{padding:3px 6px}.role-tag{padding:4px 7px}.guesser-view .draw-top .back{min-width:20px;width:20px}.guesser-view .draw-top>img{width:23px}.guesser-view .draw-top strong{font-size:12px}}
.draw-composer .send{white-space:nowrap;flex-shrink:0;min-width:62px}.draw-composer .input{flex:1}

/* Fit the drawing workspace to the phone; let the board take remaining height. */
.app:has(.draw-room){display:flex;flex-direction:column;height:100dvh;min-height:0}.app:has(.draw-room) .demo-label{flex:none}.app:has(.draw-room) main{flex:1;min-height:0;padding:0 8px max(2px,env(safe-area-inset-bottom));display:flex;flex-direction:column}.draw-room{display:flex;flex-direction:column;flex:1;min-height:0;padding-bottom:0}.draw-room .draw-top{flex:none;margin-bottom:5px;height:49px}.draw-board{flex:1;min-height:150px}.draw-board canvas,.guesser-view .draw-board canvas{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto}.draw-conversation,.guess-card,.draw-demo{flex:none}.draw-conversation{margin-top:6px}.draw-demo{margin:0 4px}.draw-messages{height:66px}.guesser-view{padding:6px}.guess-records{min-height:95px;max-height:150px}.brush-dialog{position:fixed;margin:0;inset:auto;transform:translate(-50%,-50%);max-height:calc(100dvh - 16px);overflow:auto}
@media(min-width:501px){.app:has(.draw-room){height:calc(100dvh - 48px);min-height:540px}}
@media(max-height:600px){.draw-messages{height:38px}.draw-room .draw-top{height:42px}.draw-conversation{padding:5px 9px}.guess-records{min-height:45px;max-height:75px}}

