@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');
:root{font-family:Nunito,system-ui,sans-serif;color:#10244b;background:#e9edf4}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:inherit}.hidden{display:none!important}.top{height:68px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f5f7fb;border-bottom:1px solid #d5deeb;padding:0 clamp(12px,3vw,42px)}.brand{font-weight:900;text-decoration:none;color:#10244b}.brand span{color:#177eae}.top-name{font-weight:900;font-size:17px}.top-state{font-size:12px;color:#70809d;font-weight:800}.layout{max-width:1360px;padding:28px clamp(12px,3vw,42px) 70px;margin:auto}.hero{text-align:center;margin:22px auto 35px;max-width:700px}.hero h1{font-size:clamp(36px,5vw,60px);letter-spacing:-.05em;margin:12px 0}.hero p,.muted{color:#687a98;line-height:1.6}.eyebrow{font-size:12px;font-weight:900;letter-spacing:.16em;color:#5488aa}.entry-cards{display:grid;grid-template-columns:1fr 1fr;gap:22px;max-width:1050px;margin:auto}.card{background:#fff;border:1px solid #d6e0ed;border-radius:22px;padding:28px;box-shadow:0 12px 26px rgba(20,45,91,.04)}.card h2{margin:0 0 8px;font-size:25px}.card label{display:block;font-size:13px;font-weight:900;margin:18px 0 8px}.card input,.card select,.card textarea{width:100%;border:1px solid #cad7e8;background:#f8fafd;border-radius:12px;padding:13px 15px;color:#10244b;outline:none}.card textarea{resize:vertical;min-height:175px;font-size:17px}.card input:focus,.card select:focus,.card textarea:focus{border-color:#26a9d3;box-shadow:0 0 0 3px #d7f3fc}.btn{border:0;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:12px 19px;border-radius:12px;font-weight:900;min-height:46px;text-decoration:none}.primary{background:#127ba8;color:#fff}.primary:hover{background:#0c6790}.secondary{background:#e9f2fb;color:#10244b}.secondary:hover{background:#d9e9fb}.wide{width:100%;margin-top:22px}.tips{margin-top:26px;background:#f2f7fc;border-radius:13px;padding:16px;font-size:14px}.tips p{margin-bottom:0;color:#687a98}.notice{min-height:0;text-align:center;font-weight:800;color:#c23b5a}.notice:not(:empty){margin-bottom:16px;padding:12px;background:#ffe6eb;border-radius:12px}.stagebar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}.stage-title{font-size:clamp(20px,3vw,31px);font-weight:900;letter-spacing:-.03em}.clock{background:#fff;border:1px solid #d4dfed;box-shadow:0 4px 10px #10244b0c;border-radius:16px;padding:12px 22px;font-size:28px;font-weight:900;font-variant-numeric:tabular-nums}.invite{background:#123056;border-radius:24px;color:#fff;padding:clamp(22px,4vw,42px)}.invite .eyebrow{color:#9fc9e8}.invite h2{font-size:clamp(28px,4.5vw,52px);margin:6px 0 25px;letter-spacing:-.04em}.invite-inner{display:grid;grid-template-columns:260px 1fr;gap:clamp(18px,4vw,55px);align-items:center;max-width:950px;margin:auto}.qr-box{display:flex;align-items:center;flex-direction:column;gap:10px}.qr-box img{width:240px;height:240px;object-fit:contain;padding:13px;background:#fff;border-radius:15px}.qr-box small,.muted-light{color:#c1d4e9}.invite-side h3{font-size:28px;margin:8px 0}.invite-side p{line-height:1.6;color:#d6e5f5}.pin{font-size:clamp(44px,6vw,78px);line-height:1.12;letter-spacing:.09em;font-weight:900;margin:5px 0 20px}.buttons{display:flex;gap:11px;flex-wrap:wrap;align-items:center}.light{background:#fff;color:#123056}.ghost{color:#fff;background:#254970}.invite-link{display:block;border:1px solid #51708d;border-radius:10px;padding:13px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;font-size:13px}.lobby-card{margin-top:18px}.between{display:flex;align-items:center;justify-content:space-between;gap:12px}.status{color:#70839d;font-size:13px}.players{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.player{border:1px solid #d5e0ed;border-radius:13px;padding:11px 15px;background:#f6f9fc;font-weight:800}.player.ready{background:#e2f8ed;border-color:#b7eacb}.task{padding:20px 25px;border:1px solid #cae5f0;border-radius:18px;background:#e8f8ff;margin-bottom:20px}.task p{font-size:clamp(18px,3vw,28px);font-weight:900;margin:9px 0 0}.write-stage{max-width:870px;margin:0 auto}.writing-icon{font-size:48px}.write-stage h2{font-size:29px}.write-stage textarea{margin:18px 0}.drawing-stage{background:#f0ddeb;border:1px solid #e2c9dc;border-radius:22px;padding:18px}.drawing-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:0 5px 13px;font-weight:900;font-size:20px}.drawing-heading .muted{font-size:13px;font-weight:700}.studio{display:grid;grid-template-columns:85px minmax(0,1fr) 85px;gap:10px;align-items:stretch}.palette,.tools{border:2px solid #ab7a9d;background:#ba8bac;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px;border-radius:15px;align-content:start}.swatch{aspect-ratio:1;border:2px solid #ffffff80;border-radius:8px;padding:0}.swatch.selected{outline:3px solid #fff;outline-offset:1px}.tools{grid-template-columns:repeat(2,minmax(0,1fr))}.tool{background:#dfb6d2;color:#552b4f;border:1px solid #9b638a;border-radius:9px;min-height:42px;font-size:24px;font-weight:900}.tool.active{background:#fff;color:#93366d;box-shadow:inset 0 0 0 2px #93366d}.canvas-frame{min-width:0;display:flex;align-items:center;background:white;border:7px solid #fff;border-radius:13px;box-shadow:0 5px 0 #c4b7c2,0 8px 13px #5b305633;overflow:hidden}canvas{width:100%;height:auto;display:block;background:#fff;touch-action:none;cursor:crosshair;aspect-ratio:8/5}.studio-bottom{margin-top:14px;display:flex;align-items:center;justify-content:space-between;gap:14px}.stroke-dots{display:flex;gap:8px}.dot-button{width:34px;height:34px;border-radius:50%;border:2px solid #c8a0b7;background:#e2b8d0;display:grid;place-items:center}.dot-button span{border-radius:50%;background:#613052}.dot-button.selected{outline:3px solid #fff}.width-control{display:flex;gap:10px;align-items:center;color:#602e53;font-weight:900;font-size:13px}.width-control input{accent-color:#a73f75;max-width:120px}.submit-drawing{min-width:190px;background:#123d75}.waiting{text-align:center;margin:auto;max-width:740px}.waiting-icon{font-size:54px}.review{max-width:920px;margin:auto}.review-head{text-align:center;margin-bottom:20px}.review-head h2{font-size:clamp(27px,4vw,42px);margin:7px}.review-card{background:#fff;border:1px solid #d8e2ef;padding:22px;border-radius:20px;min-height:230px}.review-author{font-size:13px;letter-spacing:.1em;color:#70839b;font-weight:900}.review-text{text-align:center;font-size:clamp(23px,4vw,39px);font-weight:900;padding:28px 10px}.review-image{width:100%;display:block;max-height:530px;object-fit:contain;background:white}.review-buttons{justify-content:center;margin:25px}.review-empty{color:#8591a1;text-align:center;padding:50px 10px}.name-wrap small{color:#2a8899}.progress{height:12px;background:#d8e3f0;border-radius:20px;overflow:hidden}.progress>span{display:block;height:100%;background:#2cafd0}
@media(max-width:820px){.entry-cards{grid-template-columns:1fr}.invite-inner{grid-template-columns:1fr}.studio{grid-template-columns:1fr}.canvas-frame{order:0}.palette{order:1;grid-template-columns:repeat(9,1fr)}.tools{order:2;grid-template-columns:repeat(9,1fr)}.palette,.tools{padding:6px}.tool{min-height:38px;font-size:18px}.drawing-heading{font-size:15px}.drawing-heading .muted{display:none}.studio-bottom{flex-wrap:wrap}.stroke-dots{display:none}}
@media(max-width:520px){.top{height:56px}.top-state{display:none}.layout{padding:14px 10px 40px}.card{padding:18px}.invite{padding:24px 18px}.qr-box img{width:200px;height:200px}.pin{font-size:49px}.drawing-stage{padding:8px;border-radius:12px}.palette{grid-template-columns:repeat(9,minmax(0,1fr));gap:3px}.tools{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.swatch{border-radius:4px}.canvas-frame{border:3px solid #fff}.tool{min-height:40px}.studio-bottom{gap:6px}.width-control{font-size:11px}.submit-drawing{min-width:130px}.stage-title{font-size:20px}.clock{font-size:19px;padding:10px}.task{padding:14px}}

/* v19: clear and independent guest identity for joining */
.join-identity{background:#f2f7fc;border:1px solid #d9e6f2;border-radius:15px;padding:12px 15px 15px;margin-top:17px}.join-identity label{margin:0 0 8px}.join-identity input{background:#fff}.join-identity .name-help{display:block;font-size:12px;color:#527395;margin-top:8px;line-height:1.5}.join-identity input:disabled{background:#e8eff7;color:#304b70;opacity:1}.entry-cards .card{min-width:0}


/* v23 – Originali Žaidimukai piešimo studija, telpanti į ekraną */
.drawing-brand,.drawing-title,.drawing-note,#drawPrompt{display:block}
#play{display:flex;flex-direction:column;gap:10px}
body.draw-live{background:#e9edf4;overflow:hidden}
body.draw-live .top{height:54px}
body.draw-live .layout{max-width:none;width:100%;height:calc(100vh - 54px);height:calc(100dvh - 54px);padding:7px clamp(8px,1.15vw,20px) 10px;margin:0;display:flex;flex-direction:column;overflow:hidden}
body.draw-live .notice{flex:0 0 auto}
body.draw-live .notice:not(:empty){margin:0 0 5px;padding:6px 12px;font-size:13px}
body.draw-live #game{flex:1;min-height:0;display:flex;flex-direction:column}
body.draw-live .stagebar{flex:0 0 53px;min-height:0;margin:0;align-items:center}
body.draw-live .stage-title{font-size:clamp(18px,2vw,27px);line-height:1.08}
body.draw-live .stagebar .eyebrow{font-size:10px}
body.draw-live .clock{font-size:22px;line-height:1.1;padding:9px 15px;border-radius:13px}
body.draw-live #play{flex:1;min-height:0;gap:0}
body.draw-live #task{display:none!important}
body.draw-live .drawing-stage{display:flex;flex:1;flex-direction:column;min-height:0;padding:10px;border:2px solid #bad0e8;border-radius:20px;background:linear-gradient(150deg,#203c79,#172e60 60%,#142750);box-shadow:0 12px 26px rgba(16,34,74,.13)}
body.draw-live .drawing-heading{display:grid;grid-template-columns:1fr minmax(0,3fr) 1fr;gap:10px;flex:0 0 62px;min-height:0;align-items:center;margin:0;padding:7px 16px;border:2px solid #4172ba;border-bottom:0;border-radius:16px 16px 0 0;background:linear-gradient(135deg,#2862ac,#213e87 70%);color:#fff}
body.draw-live .drawing-brand{display:inline-block;justify-self:start;padding:7px 10px;background:#163364;border-radius:9px;color:#fff;font-weight:900;font-size:15px}
body.draw-live .drawing-prompt{display:flex;flex-direction:column;align-items:center;gap:3px;text-align:center;min-width:0}
body.draw-live .drawing-title{font-size:10px;letter-spacing:.18em;font-weight:900;color:#91e7fa}
body.draw-live #drawPrompt{font-size:clamp(16px,2.4vw,26px);line-height:1.12;font-weight:900;overflow-wrap:anywhere;color:#fff}
body.draw-live .drawing-note{justify-self:end;max-width:180px;text-align:right;font-size:11px;line-height:1.4;color:#d3e5fd}
body.draw-live .studio{display:grid;flex:1;min-height:0;grid-template-columns:108px minmax(0,1fr) 108px;gap:12px;padding:12px 10px;background:#122755;border:2px solid #4172ba;border-top:0;border-radius:0 0 16px 16px;align-items:stretch}
body.draw-live .palette,body.draw-live .tools{min-height:0;overflow:hidden;display:grid;align-content:start;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:8px;background:#234b8d;border:2px solid #4c80cb;border-radius:14px;box-shadow:inset 0 1px 0 #ffffff21}
body.draw-live .swatch{width:100%;aspect-ratio:1;border:2px solid #ffffff88;border-radius:7px;box-shadow:inset 0 1px 0 #ffffff44}
body.draw-live .swatch.selected{outline:2px solid white;outline-offset:1px;border-color:#092850}
body.draw-live .canvas-frame{min-width:0;min-height:0;display:flex;justify-content:center;align-items:center;padding:7px;background:#19386f;border:0;border-radius:12px;overflow:hidden;box-shadow:none}
body.draw-live canvas{display:block;width:auto;height:auto;max-width:100%;max-height:100%;aspect-ratio:8/5;border-radius:8px;background:#fff;box-shadow:0 4px 0 #c6d5e7,0 8px 0 #e9eff7,0 10px 14px #061c3c44;touch-action:none;cursor:crosshair}
body.draw-live .tool{min-height:38px;padding:3px;background:#3865a3;border:2px solid #6e98cf;color:#fff;border-radius:9px;font-size:24px;font-weight:900;line-height:1}
body.draw-live .tool.active{color:#174074;background:#eaf5ff;border-color:#fff;box-shadow:inset 0 0 0 2px #7bbceb}
body.draw-live .studio-bottom{display:grid;grid-template-columns:auto minmax(160px,1fr) auto;align-items:center;gap:12px;flex:0 0 61px;min-height:0;margin-top:9px;padding:7px 10px;background:#214b8c;border:2px solid #4172ba;border-radius:14px}
body.draw-live .stroke-dots{display:flex;align-items:center;gap:5px;padding:4px 8px;border-radius:11px;background:#153568}
body.draw-live .dot-button{width:33px;height:33px;display:grid;place-items:center;background:#2e5a9a;border:2px solid #698fc3;border-radius:50%}
body.draw-live .dot-button span{border-radius:50%;background:#deecff}
body.draw-live .dot-button.selected{border-color:#fff;outline:2px solid #7cc5ff}
body.draw-live .width-control{justify-content:center;color:#fff;font-size:12px;white-space:nowrap}
body.draw-live .width-control input{width:min(16vw,220px);max-width:220px;accent-color:#6bd4f4}
body.draw-live .submit-drawing{min-width:155px;min-height:43px;padding:8px 14px;color:#102a54;background:#ffcc57;border:1px solid #fff2c8;border-radius:11px;box-shadow:0 3px 0 #b38b36}
body.draw-live .submit-drawing:hover{background:#ffdb7e}
@media(max-height:700px) and (min-width:821px){body.draw-live .drawing-stage{padding:6px}body.draw-live .drawing-heading{flex-basis:52px}body.draw-live .studio{padding:7px}body.draw-live .studio-bottom{flex-basis:51px;margin-top:6px}body.draw-live .stagebar{flex-basis:45px}body.draw-live .tool{min-height:30px;font-size:20px}body.draw-live .palette,body.draw-live .tools{padding:6px;gap:4px}body.draw-live .dot-button{width:27px;height:27px}}
@media(max-width:1100px) and (min-width:821px){body.draw-live .studio{grid-template-columns:86px minmax(0,1fr) 86px;gap:8px}body.draw-live .tool{min-height:30px;font-size:19px}body.draw-live .studio-bottom{gap:6px}body.draw-live .width-control input{width:12vw}}
@media(max-width:820px){body.draw-live{overflow:auto}body.draw-live .layout{height:auto;min-height:calc(100dvh - 54px);overflow:visible;padding:8px 8px 22px}body.draw-live #game,body.draw-live #play,body.draw-live .drawing-stage{display:block;min-height:0;height:auto}body.draw-live .stagebar{min-height:48px;margin-bottom:8px}body.draw-live .drawing-stage{padding:7px;border-radius:13px}body.draw-live .drawing-heading{display:flex;flex-direction:column;align-items:center;gap:4px;min-height:0;padding:9px;border-radius:10px 10px 0 0}body.draw-live .drawing-brand,body.draw-live .drawing-note{display:none}body.draw-live #drawPrompt{font-size:clamp(17px,4.2vw,24px)}body.draw-live .studio{display:flex;flex-direction:column;gap:7px;padding:7px;border-radius:0 0 10px 10px}body.draw-live .canvas-frame{order:0;padding:3px;min-height:0;background:#19386f}body.draw-live canvas{width:100%;max-width:100%;height:auto;max-height:none;aspect-ratio:8/5;box-shadow:0 3px 0 #c6d5e7}body.draw-live .palette{order:1;grid-template-columns:repeat(9,minmax(0,1fr));gap:4px;padding:6px}body.draw-live .tools{order:2;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;padding:6px}body.draw-live .tool{min-height:42px;font-size:22px}body.draw-live .studio-bottom{display:flex;flex-direction:column;gap:10px;padding:10px;margin-top:8px}body.draw-live .width-control{width:100%;justify-content:space-between}body.draw-live .width-control input{width:55vw;max-width:none}body.draw-live .submit-drawing{width:100%;min-height:49px}body.draw-live .stroke-dots{justify-content:center}}
@media(max-width:400px){body.draw-live .layout{padding:6px 5px 16px}body.draw-live .studio{padding:5px}body.draw-live .palette,body.draw-live .tools{gap:3px;padding:5px}body.draw-live .tool{min-height:39px;font-size:19px}}


/* v24: piešimo studija glaudžiau apgaubia patį baltą lapą, išlaiko desktop aukštį. */
@media (min-width:821px){
  body.draw-live .drawing-stage{width:min(100%, 1140px);margin-inline:auto;}
  body.draw-live .studio{grid-template-columns:108px minmax(0,1fr) 108px;gap:10px;}
  body.draw-live .canvas-frame{padding:6px;}
}
@media (min-width:821px) and (max-width:1100px){
  body.draw-live .studio{grid-template-columns:86px minmax(0,1fr) 86px;gap:8px;}
}

/* v29: use the same shell/layout as other games */
.tp-page{max-width:1160px;margin:0 auto;color:#10224a}
.tp-msg{padding:12px 15px;border-radius:12px;background:#ffe9ec;color:#ae2c42;font-weight:800;margin:12px 0}
.tp-msg:empty{display:none}
.tp-page .entry{margin-top:0}
.tp-page #game{margin-top:10px}
@media(max-width:900px){.tp-page{margin:0 auto}}
