
:root{--navy:#172f40;--txt:#1d3545;--muted:#728493;--line:#dde6ec;--surface:#fff;--bg:#f3f6f9;--green:#087e74;--mint:#e4f4ef;--shadow:0 12px 42px rgba(28,52,72,.07);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--txt)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;overflow:hidden}body{background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #58b9b3;outline-offset:2px}button:disabled{opacity:.35;cursor:not-allowed}
.app{display:flex;flex-direction:column;min-height:100dvh;height:100dvh}.header{height:76px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:0 22px;background:#fff;border-bottom:1px solid var(--line);z-index:10}.brand{display:flex;align-items:center;gap:10px;min-width:196px}.brandmark{height:43px;width:43px;background:var(--navy);border-radius:13px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:29px;font-weight:900;letter-spacing:-3px}.brandmark span{color:#56ddbf}.brandcopy strong{font-size:20px;display:block;letter-spacing:-.6px}.brandcopy small{font-size:11px;color:var(--muted);display:block;margin-top:1px}.headercenter{display:flex;align-items:center;gap:15px;min-width:0}.headercenter input{font-size:16px;font-weight:750;color:var(--txt);border:1px solid transparent;background:transparent;border-radius:8px;padding:8px;max-width:235px;text-align:center}.headercenter input:hover{border-color:var(--line)}.save-indicator{font-size:11px;color:var(--green);white-space:nowrap;display:flex;gap:7px;align-items:center}.save-indicator i,.dot{height:7px;width:7px;display:inline-block;border-radius:50%;background:#13ab82}.headeractions{display:flex;align-items:center;gap:7px}.headeractions button,.outline,.primary{border-radius:10px;min-height:38px;border:1px solid var(--line);padding:8px 14px;font-weight:700;font-size:13px}.iconbtn{font-size:24px!important;border:0!important;background:transparent}.outline{background:#fff;color:var(--navy)}.primary{background:var(--navy);color:#fff;border-color:var(--navy)}
.workspace{display:flex;min-height:0;flex:1}.rail{width:86px;background:white;flex:none;border-right:1px solid var(--line);padding:12px 8px;display:flex;flex-direction:column;gap:3px;overflow:auto;scrollbar-width:thin}.tool{border:0;background:transparent;color:#54697a;padding:9px 3px;border-radius:12px;min-height:51px;display:grid;place-items:center;gap:1px;font-weight:600;font-size:10px}.toolicon{font-weight:800;font-size:22px;line-height:1.1}.tool[data-tool="letters"] .toolicon,.tool[data-tool="numbers"] .toolicon{font-size:19px}.tool:hover{background:#f1f6f8}.tool.active{background:var(--mint);color:#066f66}.tool-accent{color:#0e6f87}.railsep{height:1px;background:var(--line);margin:6px 9px}
.drawer{width:320px;background:#fff;flex:none;border-right:1px solid var(--line);box-shadow:5px 0 22px rgba(30,52,65,.035);display:flex;flex-direction:column;min-height:0}.drawer[hidden]{display:none}.drawer-header{display:flex;align-items:center;justify-content:space-between;padding:22px 21px 16px;border-bottom:1px solid var(--line)}.eyebrow{font-size:10px;letter-spacing:1.5px;font-weight:800;color:var(--green)}.drawer-header h2{font-size:22px;margin:5px 0 0;letter-spacing:-.7px}.closebtn{border:0;background:#eff4f7;border-radius:9px;width:34px;height:34px;font-size:24px;color:var(--txt)}.drawer-body{overflow:auto;padding:19px;display:flex;flex-direction:column;gap:17px;scrollbar-width:thin}.drawer-body p{font-size:13px;color:#617786;line-height:1.55;margin:0}.field{display:grid;gap:6px;font-weight:650;font-size:12px}.field input,.field textarea,.field select{background:#fff;border:1px solid #cad7df;border-radius:10px;width:100%;min-height:41px;padding:10px;color:var(--txt)}.field textarea{resize:vertical;min-height:75px}.smallnote{font-size:11px;color:var(--muted)}.action{width:100%;border:0;border-radius:10px;padding:12px;background:var(--navy);color:#fff;font-weight:700;text-align:center}.action.alt{background:#e9f4f2;color:#08665e}.action.warn{background:#fff0ed;color:#b64237}.actions-stack{display:grid;gap:9px}.chiprow{display:flex;flex-wrap:wrap;gap:7px}.chip{border:1px solid #cfdae1;background:white;color:var(--txt);padding:8px 11px;border-radius:10px;font-size:12px}.chip.active{background:var(--navy);color:white;border-color:var(--navy)}.sectiontitle{font-size:12px;font-weight:800;letter-spacing:.5px;color:#536b7d;margin-top:5px}.tilegrid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.tile{height:45px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--txt);font-weight:750;font-size:18px}.tile:hover,.clip:hover,.preset:hover{border-color:var(--green);background:#eef9f6}.twocol{display:grid;grid-template-columns:1fr 1fr;gap:8px}.twocol label{min-width:0}.clipgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.clip{padding:9px 5px;background:#fff;border:1px solid var(--line);border-radius:12px;display:flex;align-items:center;justify-content:center;gap:5px;flex-direction:column;min-height:94px}.clip .clipimage{height:53px;width:66px;object-fit:contain}.clip span{font-size:10px;color:#607481;max-width:75px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.presets{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.preset{background:white;border:1px solid var(--line);border-radius:12px;padding:8px;display:grid;gap:7px;text-align:left}.presetpreview{border-radius:8px;border:1px solid #dce4ea;height:62px}.preset strong{font-size:12px}.colorline{display:flex;gap:9px;align-items:center}.swatch{width:32px;height:32px;border:2px solid white;outline:1px solid #cbd7de;border-radius:50%;background:var(--c)}.swatch.active{outline:3px solid var(--green)}.colorline input[type=range]{flex:1}
.mainview{min-width:0;min-height:0;flex:1;display:flex;flex-direction:column;padding:16px 25px 9px}.stage-top{min-height:40px;display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:9px}.boardtag{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid var(--line);border-radius:100px;padding:8px 13px;font-size:12px;font-weight:700}.stage-tools{display:flex;gap:12px;align-items:center}.subtle{font-size:12px;color:var(--muted)}.softbtn,.smallbtn,.circlebtn,.addpage{border:1px solid var(--line);background:#fff;color:var(--txt);padding:8px 12px;border-radius:9px;font-size:12px;font-weight:700}.stage-outer{min-height:0;flex:1;display:flex;align-items:center;justify-content:center;overflow:auto;padding:4px 0}.board{width:min(100%,calc((100dvh - 225px)*1.77778));aspect-ratio:16/9;position:relative;background:white;border:1px solid #d8e1e7;border-radius:9px;box-shadow:var(--shadow);overflow:hidden;touch-action:none;flex:none;user-select:none}.board[data-bg=white]{background:#fff}.board[data-bg=soft]{background:#f0fbf9}.board[data-bg=sky]{background:linear-gradient(145deg,#d3ecfb,#f6fbff)}.board[data-bg=warm]{background:linear-gradient(125deg,#fff0d8,#ffe2ec)}.board[data-bg=chalk]{background:#214b49}.board[data-bg=grid]{background-color:#fff;background-image:linear-gradient(#dbe9ed 1px,transparent 1px),linear-gradient(90deg,#dbe9ed 1px,transparent 1px);background-size:32px 32px}.board[data-bg=birthday]{background:radial-gradient(circle at 82% 14%,#ffe3a6 0 12%,transparent 13%),radial-gradient(circle at 10% 85%,#f3c9e4 0 13%,transparent 14%),linear-gradient(125deg,#ffeaf4,#edf6ff)}.board:before{content:"";position:absolute;inset:0;pointer-events:none;border-radius:8px;z-index:1}.elements{position:absolute;inset:0;z-index:2}.boardobject{position:absolute;min-width:25px;touch-action:none;cursor:grab;display:flex;align-items:center;justify-content:center;text-align:center;transform-origin:left top;padding:4px;border:2px solid transparent;border-radius:8px;user-select:none}.boardobject.selected{border:2px dashed #0c9585;background:rgba(24,190,165,.05)}.boardobject.text{font-weight:750;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.22;justify-content:flex-start}.boardobject.hand{font-family:"Playwrite HU","Comic Sans MS",cursive;font-weight:350;line-height:1.55}.boardobject.image img{width:100%;height:100%;object-fit:contain;pointer-events:none}.boardobject.shape{font-size:30px;box-shadow:0 2px 8px #0001}.boardobject.task{font-weight:800;background:#fff;border:2px solid #b4dbd7;border-radius:16px;box-shadow:0 5px 0 #d0e8e4}#inkCanvas{position:absolute;inset:0;width:100%;height:100%;z-index:4;touch-action:none;pointer-events:none}#selectedControls{position:absolute;right:14px;top:14px;z-index:6;background:rgba(255,255,255,.96);box-shadow:0 5px 18px #233b4b27;border:1px solid #cbdadf;border-radius:12px;padding:5px;display:flex;gap:5px}#selectedControls[hidden]{display:none}#selectedControls button{background:#eff5f7;border:0;border-radius:8px;padding:8px 11px;font-size:17px;font-weight:750;color:#1f3f4f}#selectedControls .danger{color:#bf4b43;background:#fff0ee}
.stage-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:8px}.pager,.bottom-actions{display:flex;gap:7px;align-items:center}.pager #pageCount{font-size:12px;font-weight:800;white-space:nowrap;min-width:46px;text-align:center}.circlebtn,.addpage{height:34px;min-width:34px;padding:0;border-radius:10px;font-size:20px}.addpage{color:var(--green);font-size:21px}
.footer{background:#fff;min-height:37px;flex:none;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:7px 22px;color:#647b89;font-size:11px;gap:12px}.footer b{color:var(--navy)}.footer a{color:#607e90;text-decoration:none;margin-left:14px}.footer a:hover{color:var(--green)}#toast{position:fixed;z-index:30;bottom:65px;left:50%;transform:translateX(-50%);background:#183849;color:white;padding:11px 18px;border-radius:12px;box-shadow:0 8px 35px #0003;font-size:13px;max-width:min(90vw,470px);display:none}#toast.show{display:block}
@media(max-width:1050px){.headercenter .save-indicator{display:none}.drawer{width:282px}.mainview{padding:9px 11px}.board{width:min(100%,calc((100dvh - 195px)*1.77778))}.bottom-tip{display:none}}
@media(max-width:690px){.app{height:100dvh}.header{height:58px;padding:0 10px;gap:5px}.brand{min-width:auto}.brandmark{height:35px;width:35px;font-size:24px}.brandcopy strong{font-size:15px}.brandcopy small,.headercenter{display:none}.headeractions{gap:2px}.headeractions button{padding:6px 8px;min-height:32px}.headeractions .iconbtn{font-size:20px!important}.headeractions .top-save span,.headeractions .primary span{display:none}.workspace{flex-direction:column}.rail{width:100%;height:69px;flex-direction:row;flex:none;overflow:auto;padding:5px 8px;border-right:none;border-bottom:1px solid var(--line)}.tool{min-width:65px;padding:5px;min-height:55px;flex:none}.toolicon{font-size:20px}.railsep{height:40px;width:1px;margin:6px}.drawer{position:absolute;left:0;top:127px;bottom:37px;width:min(87vw,340px);z-index:16;box-shadow:8px 4px 40px #1b334b22}.mainview{padding:5px 9px}.stage-top{min-height:29px;margin-bottom:3px}.stage-tools .subtle{display:none}.stage-outer{align-items:center}.board{width:100%;max-height:66dvh}.stage-bottom{padding:4px 0}.stage-bottom .smallbtn{font-size:10px;padding:6px}.footer{min-height:34px;padding:7px 10px}.footer a{font-size:10px;margin-left:7px}}
@media(max-height:570px) and (min-width:691px){.header{height:57px}.rail{padding:5px}.tool{min-height:41px}.toolicon{font-size:18px}.mainview{padding:5px 13px}.board{width:min(100%,calc((100dvh - 165px)*1.77778))}.footer{min-height:29px}}
