@import url('data:text/css,');
:root{font-family:ui-rounded,'SF Pro Rounded',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#202641;background:#f1f3fa;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;border:1px solid #dce0ee;background:white;border-radius:10px;color:#28314d;padding:11px 15px;font-size:14px;font-weight:600;min-height:44px;white-space:nowrap}button:hover{background:#eef0ff}button:focus-visible,input:focus-visible{outline:3px solid #ed9b00;outline-offset:4px}button:disabled{opacity:.5;cursor:default}.primary{background:#233bd1;color:#fff;border-color:#233bd1}.primary:hover{background:#192db1}main{max-width:1500px;margin:auto;padding:30px 40px 12px}header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}.brand{display:flex;align-items:center;gap:14px}.brand-mark{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:#ffcf45;color:#253acc;font-size:38px}h1{font-size:27px;letter-spacing:-1.1px;margin:0;font-weight:800}.period{color:#233bd1}.brand p{font-size:14px;color:#677087;margin:5px 0 0}.header-actions{display:flex;align-items:center;gap:20px}#status{font-size:14px;color:#586078}.workspace{border:1px solid #d8deed;border-radius:18px;overflow:hidden;box-shadow:0 8px 35px #25356b08;background:#fff}.toolbar{display:flex;align-items:center;gap:24px;flex-wrap:wrap;padding:15px 20px;border-bottom:1px solid #e7e9f1}.toolgroup{display:flex;gap:5px}.tool{border-color:transparent}.tool.selected{background:#e9edff;color:#233bd1;border-color:#cfd6ff}.palette{display:flex;gap:8px}.swatch{width:32px;height:44px;padding:0;min-height:44px;background:none;border:0;display:grid;place-items:center}.swatch::before{content:'';width:26px;height:26px;border-radius:50%;background:var(--ink);border:2px solid #fff;box-shadow:0 0 0 1px #0000000c}.swatch[aria-pressed=true]::before{box-shadow:0 0 0 2px var(--ink);transform:scale(.85)}.size{display:flex;align-items:center;gap:10px;font-size:14px;color:#586078}.size input{width:88px;accent-color:#233bd1}.size output{width:22px;font-variant-numeric:tabular-nums}.page-actions{margin-left:auto;display:flex;gap:8px}.page-actions button{border-color:transparent}.canvas-area{padding:24px 36px;background:#e9edf6;background-image:radial-gradient(#c9d1e3 .7px,transparent .7px);background-size:12px 12px;display:flex;align-items:center;justify-content:center}.paper{position:relative;width:min(100%, calc((100dvh - 285px)*1.5));min-width:0;aspect-ratio:3/2;box-shadow:0 4px 16px #28376212;background:white}canvas{display:block;width:100%;height:100%;touch-action:none;cursor:crosshair}canvas.unavailable{cursor:wait}#empty{position:absolute;top:50%;left:0;right:0;text-align:center;transform:translateY(-50%);pointer-events:none;color:#abb2c4}#empty span{font-family:Georgia,serif;font-style:italic;font-size:clamp(22px,3vw,38px)}#empty p{font-size:14px;margin:14px 10px}footer{display:flex;justify-content:space-between;gap:15px;padding:16px 22px;font-size:13px;color:#747d92}footer span:last-child{font-size:11px;letter-spacing:1.8px}.bottom-note{text-align:center;color:#8991a4;font-family:Georgia,serif;font-style:italic;font-size:14px;margin:18px 0}dialog{border:0;border-radius:20px;padding:34px;width:min(490px,calc(100% - 32px));box-shadow:0 20px 90px #14214d33;color:#202641}dialog::backdrop{background:#17224866;backdrop-filter:blur(3px)}dialog h2{font-size:29px;letter-spacing:-1px;margin:12px 0}dialog p{font-size:16px;line-height:1.6;color:#657086}.eyebrow{font-size:11px;letter-spacing:1.7px;font-weight:700;color:#233bd1}.close{position:absolute;right:16px;top:12px;border:0;font-size:24px}dialog label{display:block;font-size:14px;font-weight:600;margin:22px 0 8px}#join-link{width:100%;padding:13px;border:1px solid #cbd2e5;border-radius:9px;font-size:14px;color:#233bd1;background:#f6f7fc}#copy{margin-top:14px}dialog .fine{font-size:13px;margin-bottom:0}#other-links{font-size:13px;overflow-wrap:anywhere}#other-links a{display:block;color:#233bd1;margin-top:8px}.dialog-actions{display:flex;gap:10px;margin-top:24px;flex-wrap:wrap}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#202641;color:white;border-radius:12px;padding:14px 22px;box-shadow:0 5px 20px #0002;max-width:90%;font-size:14px;z-index:5}@media(max-width:1050px){main{padding:22px}.toolbar{gap:12px}.page-actions{margin-left:0}.canvas-area{padding:22px}.paper{width:100%}}@media(max-width:650px){main{padding:14px 10px}header{align-items:flex-start;margin-bottom:18px;gap:10px}.brand-mark{display:none}h1{font-size:23px}.brand p{font-size:12px}.header-actions{flex-direction:column-reverse;align-items:flex-end;gap:7px}#status{font-size:12px}.toolbar{padding:10px;gap:8px;justify-content:space-between}.palette{gap:5px}.swatch{width:28px}.size{gap:6px}.canvas-area{padding:12px 8px}footer{padding:12px;font-size:12px}footer span:last-child{display:none}.page-actions button{padding:8px;font-size:13px}.tool{padding:8px 10px}.workspace{border-radius:12px}dialog{padding:28px 22px}}@media(prefers-reduced-motion:no-preference){button{transition:background .15s ease}.swatch::before{transition:transform .15s ease}}

/* Keep the expanded palette easy to tap without crowding the canvas. */
.toolbar{gap:12px 20px}.toolgroup{flex-wrap:wrap}.palette{order:3;display:grid;grid-template-columns:repeat(18, minmax(32px,1fr));gap:4px;width:100%;border-top:1px solid #e7e9f1;padding-top:10px}.swatch{width:100%;min-width:32px}.swatch::before{width:28px;height:28px;box-shadow:0 0 0 1px #aab1c3}.paper{width:min(100%,calc((100dvh - 345px)*1.5))}canvas{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.page-actions #clear{color:#b12442;border:1px solid #edcbd3;background:#fff8fa}@media(max-width:1050px){.paper{width:100%}.palette{grid-template-columns:repeat(12,minmax(32px,1fr))}}@media(max-width:650px){.palette{grid-template-columns:repeat(6,minmax(36px,1fr))}.swatch{height:44px}.toolgroup{gap:2px}.tool{font-size:13px}}

.animal-tools{display:flex;flex-wrap:wrap;gap:4px;flex-basis:100%;border-top:1px solid #e7e9f1;padding-top:8px}.animal-tools .tool{border:1px solid #dce0ee}.paper{width:min(100%,calc((100dvh - 405px)*1.5))}@media(max-width:1050px){.paper{width:100%}}

.animal-tools{order:2}

#selection{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}

/* Picture-only library: fixed-height trays keep the paper in place between tabs. */
.image-library{order:2;width:100%;border-top:1px solid #e7e9f1;padding-top:10px;display:flex;align-items:stretch;gap:16px}
#image-tabs{display:flex;align-items:center;gap:5px;border-right:1px solid #e7e9f1;padding-right:14px;flex-shrink:0}
.image-tab{padding:7px;width:55px;height:55px;border:2px solid transparent;background:#f5f6fb}
.image-tab[aria-selected=true]{border-color:#233bd1;background:#e9edff}
#image-choices{display:flex;align-items:center;gap:6px;overflow-x:auto;min-width:0;flex:1;padding:4px;scrollbar-width:thin;overscroll-behavior-x:contain}
.image-choice{flex:0 0 62px;width:62px;height:62px;padding:7px;border:2px solid #e5e8f1;background:white}
.image-choice.selected{border-color:#233bd1;background:#e9edff}
.image-choice img,.image-tab img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}
.paper{width:min(100%,max(300px,calc((100dvh - 440px)*1.5)))}
@media(max-width:1050px){.image-library{flex-direction:column;gap:5px}#image-tabs{border-right:0;padding:0;justify-content:center}#image-choices{width:100%;min-height:75px}.paper{width:100%}}

.image-tray{display:flex;align-items:center;gap:4px;flex:1;min-width:0}
#image-choices{height:82px;scrollbar-width:none}#image-choices::-webkit-scrollbar{display:none}
.image-nav{flex:0 0 36px;width:36px;height:54px;padding:0;border:0;font-size:30px;color:#233bd1;background:#f5f6fb}.image-nav:disabled{opacity:.2}
@media(max-width:1050px){.image-tray{width:100%}}

/* Large picture controls; their accessible names remain in aria-label. */
.toolgroup,.texture-group{display:flex;gap:5px;align-items:center;flex-wrap:wrap}
.texture-group{border-left:1px solid #dce0ee;padding-left:12px}
.icon-button{width:56px;height:56px;min-width:56px;min-height:56px;padding:10px;display:inline-flex;align-items:center;justify-content:center;border:2px solid transparent;border-radius:13px}
.icon-button svg{display:block;width:32px;height:32px;flex:none}
.texture-option.selected{background:#e9edff;color:#233bd1;border-color:#cfd6ff}
.page-actions{gap:5px}.page-actions .icon-button{padding:10px}
@media(max-width:650px){.icon-button{width:52px;height:52px;min-width:52px;min-height:52px}.icon-button svg{width:30px;height:30px}.texture-group{padding-left:8px}}

/* Halve vertical whitespace, including the space inside each control. */
main{padding-top:15px;padding-bottom:6px}
header{margin-bottom:14px}
.brand p{margin-top:2.5px}
.toolbar{padding:7.5px 20px;row-gap:6px}
.toolgroup,.texture-group{row-gap:2.5px}
.icon-button,.page-actions .icon-button{height:46px;min-height:46px;padding-top:5px;padding-bottom:5px}
.texture-option:disabled,.texture-option:disabled:hover{color:#9297a3;background:#f1f2f5;border-color:transparent;opacity:.55}
.image-library{padding-top:5px}
.image-tab{height:48px;min-height:48px;padding-top:3.5px;padding-bottom:3.5px}
.image-choice{height:55px;min-height:55px;padding-top:3.5px;padding-bottom:3.5px}
#image-choices{height:65px;min-height:65px;padding-top:2px;padding-bottom:2px}
.image-nav{height:42px;min-height:42px}
.palette{padding-top:5px;row-gap:2px}
.swatch{height:36px;min-height:36px}
.canvas-area{padding-top:12px;padding-bottom:12px}
footer{padding-top:8px;padding-bottom:8px}
.bottom-note{margin-top:9px;margin-bottom:9px}
/* Includes landscape iPads; the old 1050px cutoff missed them. */
@media(max-width:1366px){
  main{padding:6px 14px}
  header{margin-bottom:6px}
  .toolbar{padding:2px 12px;gap:1.5px 2px}
  .toolgroup,.texture-group{gap:1px 2px}
  .texture-group{padding-left:6px}
  .icon-button{width:37px;height:33px;min-width:37px;min-height:33px;padding:3px 6px;border-radius:9px}
  .icon-button svg{width:23px;height:23px}
  .page-actions{margin-left:0;gap:3px}
  .page-actions .icon-button{height:33px;min-height:33px;padding:3px 6px}
  .size{gap:5px}
  .size input{width:55px}
  .size output{width:18px}
  .image-library{flex-direction:row;align-items:center;gap:9px;padding-top:1.75px}
  #image-tabs{border-right:1px solid #e7e9f1;padding:0 8px 0 0;gap:2px}
  .image-tab{width:42px;height:37px;min-height:37px;padding:2.5px 5px}
  .image-tray{width:auto}
  #image-choices{height:42px;min-height:42px;padding:.5px 1px;gap:4px}
  .image-choice{flex-basis:46px;width:46px;height:41px;min-height:41px;padding:2.5px 5px}
  .image-nav{flex-basis:28px;width:28px;height:34px;min-height:34px;font-size:24px}
  .palette{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;gap:3px;padding-top:1.75px;scrollbar-width:none}
  .palette::-webkit-scrollbar{display:none}
  .swatch{flex:0 0 36px;width:36px;height:32px;min-height:32px;min-width:36px}
  .swatch::before{width:25px;height:25px}
  .canvas-area{padding:6px 12px}
  .paper{width:min(100%,calc((100dvh - 230px)*1.5))}
  footer{padding:5px 14px}
}
@media(max-width:650px){
  main{padding:4px 8px}
  header{margin-bottom:4px}
  .header-actions{row-gap:3.5px}
  .brand p{display:none}
  .toolbar{padding:1.75px 7px;gap:1.5px 3px}
  .icon-button{width:44px;height:35.5px;min-width:44px;min-height:35.5px}
  .page-actions .icon-button{height:35.5px;min-height:35.5px}
  .image-library{flex-direction:column;align-items:stretch;gap:1.5px}
  #image-tabs{border-right:0;padding:0;justify-content:space-between}
  .image-tab{width:44px;height:38px;min-height:38px}
  .swatch{height:30.5px;min-height:30.5px}
  .canvas-area{padding:4px 8px}
}

/* One fluid color row: equal shares of the available width, at every tablet size. */
.palette{
  display:grid;grid-template-columns:repeat(24,minmax(0,1fr));
  gap:clamp(1px,.25vw,5px);overflow:visible;min-width:0;
}
.swatch{
  width:100%;min-width:0;min-height:0;height:clamp(24px,5dvh,44px);
  padding:clamp(1px,.15vw,3px);border-radius:50%;
}
.swatch::before{
  width:min(100%,4dvh,38px);height:auto;aspect-ratio:1;
  border-width:1px;box-shadow:0 0 0 1px #aab1c3;
}
.swatch[aria-pressed=true]::before{box-shadow:0 0 0 2px #233bd1;transform:scale(.85)}
.swatch:hover{background:none}
.swatch:hover::before{box-shadow:0 0 0 1px #aab1c3,0 0 0 9px #eef0ff}
.swatch[aria-pressed=true]:hover::before{box-shadow:0 0 0 2px #233bd1,0 0 0 9px #eef0ff}
.swatch:focus-visible{outline:none}
.swatch:focus-visible::before{box-shadow:0 0 0 3px #ed9b00,0 0 0 8px #fff0c8}

/* A borderless, one-category-wide wheel leaves the rest of the row for pictures. */
.image-library{flex-direction:row;align-items:center}
.category-wheel{flex:0 0 55px;width:55px;height:65px;display:flex;flex-direction:column;align-items:center;gap:0;border:0;background:none}
.category-arrow,.category-arrow:hover,.category-arrow:active{display:flex;align-items:center;justify-content:center;width:100%;height:12px;min-height:12px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:#586078}
.category-arrow svg{width:33px;height:6.75px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#category-current{width:100%;flex:1;min-height:0;padding:0 4px;display:flex;align-items:center;justify-content:center;touch-action:none;user-select:none;-webkit-user-select:none;cursor:ns-resize;border:0;background:none;box-shadow:none}
#category-icon{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
#category-current:focus-visible{outline:2px dashed #586078;outline-offset:1px}
@media(max-width:1366px){.category-wheel{flex-basis:42px;width:42px;height:48px}.category-arrow,.category-arrow:hover,.category-arrow:active{height:10px;min-height:10px}}

[hidden] {display:none!important}
.room-lobby {max-width:540px;margin:8vh auto;padding:28px;background:white;border-radius:20px;}
.room-lobby p {line-height:1.6;color:#62677e}
.room-lobby form {display:grid;gap:12px;margin:28px 0}
.room-lobby input {min-width:0;width:100%;padding:12px;box-sizing:border-box;border:1px solid #bfc5db;border-radius:10px}

/* The workspace occupies the window; drawing coordinates keep a fixed scale. */
main{width:100%;max-width:none;height:100dvh;min-height:520px;display:flex;flex-direction:column;padding:6px 12px}
#drawing-header{flex:none;margin-bottom:6px}
#drawing-workspace{display:flex;flex-direction:column;flex:1;min-height:0}
.toolbar,footer{flex:none}
.canvas-area{flex:1;min-height:0;min-width:0;overflow:auto;display:block;padding:8px}
.paper{width:100%;height:100%;min-width:var(--minimum-paper-width,0px);min-height:var(--minimum-paper-height,0px);aspect-ratio:auto;max-width:none}
.bottom-note{display:none}
@media(max-width:650px){main{padding:4px 6px}.canvas-area{padding:4px}}
