*,*:before,*:after{box-sizing:border-box}html,body,#root{margin:0;padding:0;height:100%;width:100%;overflow:hidden;background:#2c3c4d;font-family:Lexend,-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;touch-action:manipulation}button{font-family:inherit}:root{--radius: 18px;--bg: radial-gradient(120% 120% at 50% 0%, #3f5366 0%, #2c3c4d 60%, #243240 100%);--strip-bg: #ffffff;--strip-ink: #243240;--strip-placeholder: #9fb0bf;--cmd-bg: #384c60;--cmd-bg-hover: #42596f;--cmd-ink: #dce6ee;--cmd-shadow: 0 2px 0 rgba(0, 0, 0, .18);--speak-bg: #2f9e8f;--speak-bg-hover: #37b1a0;--speak-ink: #ffffff;--panel: rgba(255, 255, 255, .96);--panel-line: rgba(40, 60, 80, .1);--heading: #243240}.color-yellow{--c-bg:#FBEAA6;--c-bg2:#F6E08A;--c-edge:#E6C24E;--c-ink:#574613}.color-green{--c-bg:#C8E7B6;--c-bg2:#B6DEA0;--c-edge:#83BE6A;--c-ink:#2c4a23}.color-blue{--c-bg:#C2DDEF;--c-bg2:#ABCFE8;--c-edge:#7BABD2;--c-ink:#1f4060}.color-red{--c-bg:#F6C9C4;--c-bg2:#F0B3AD;--c-edge:#DC8B86;--c-ink:#7a2f2b}.color-orange{--c-bg:#FBD9B0;--c-bg2:#F6C892;--c-edge:#E0A45C;--c-ink:#6b3f12}.color-purple{--c-bg:#DECFF1;--c-bg2:#CDB8EA;--c-edge:#A98FD0;--c-ink:#3f2a63}.color-teal{--c-bg:#B9E6DE;--c-bg2:#A3DCD1;--c-edge:#5FB8A8;--c-ink:#14463d}.color-white{--c-bg:#FFFFFF;--c-bg2:#F2F5F8;--c-edge:#C9D3DC;--c-ink:#28333d}.app{display:flex;flex-direction:column;height:100vh;width:100vw;padding:clamp(10px,1.6vw,20px);gap:clamp(10px,1.4vw,18px);background:var(--bg);box-sizing:border-box}.toolbar{display:grid;grid-template-columns:4fr 1fr 1fr 1fr 1fr;gap:clamp(8px,1.2vw,16px);flex:0 0 auto;height:clamp(88px,16vh,148px)}.edit-banner{flex:0 0 auto;text-align:center;padding:7px 14px;border-radius:12px;background:linear-gradient(180deg,#f6c892,#e0a45c);color:#5a3408;font-size:clamp(12px,1.6vh,16px);font-weight:600;letter-spacing:.2px;text-transform:lowercase;box-shadow:0 2px #0000001f}.grid{display:grid;gap:clamp(10px,1.3vw,18px);min-height:0}.tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;border:0;border-radius:var(--radius);background:var(--cmd-bg);color:var(--cmd-ink);box-shadow:var(--cmd-shadow);padding:10px;cursor:pointer;font-family:inherit;overflow:hidden;transition:transform .12s ease,background .15s ease,box-shadow .12s ease}.tool:hover:not(:disabled){background:var(--cmd-bg-hover)}.tool:active:not(:disabled){transform:translateY(2px);box-shadow:none}.tool:disabled{opacity:.4;cursor:default}.tool.tool-settings{background:#32465a}.tool-label{font-size:clamp(11px,1.5vh,17px);font-weight:500;letter-spacing:.2px;line-height:1.1;text-align:center;text-transform:lowercase}.tool-icon{flex:1;display:flex;align-items:center;justify-content:center;min-height:0;width:100%}.tool-icon svg{width:auto;height:70%;max-height:44px;max-width:80%}.tool[aria-label=Speak]{background:var(--speak-bg);color:var(--speak-ink);box-shadow:0 3px #00000029}.tool[aria-label=Speak]:hover:not(:disabled){background:var(--speak-bg-hover)}.message-bar{display:flex;align-items:center;gap:10px;background:var(--strip-bg);color:var(--strip-ink);border:0;border-radius:var(--radius);box-shadow:inset 0 2px 5px #1423321a,0 1px #fff6;padding:8px 16px;font-family:inherit;font-size:clamp(16px,3vh,28px);font-weight:600;cursor:pointer;overflow-x:auto;overflow-y:hidden;text-align:left;min-width:0;scrollbar-width:thin}.message-bar::-webkit-scrollbar{height:6px}.message-bar::-webkit-scrollbar-thumb{background:#0000001f;border-radius:99px}.msg-icon{flex-shrink:0;display:flex;align-items:center;width:clamp(20px,4vh,32px);height:clamp(20px,4vh,32px);color:var(--strip-placeholder)}.msg-icon svg{width:100%;height:100%}.msg-mini{display:flex;align-items:center;gap:8px;flex-shrink:0;max-height:100%}.mini.chip{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;flex:0 0 auto;width:clamp(50px,7.5vh,70px);height:clamp(50px,8vh,76px);padding:5px 6px;border-radius:calc(var(--radius) * .5);background:linear-gradient(180deg,var(--c-bg),var(--c-bg2));border:2px solid var(--c-edge);overflow:hidden;animation:chip-pop .22s cubic-bezier(.2,1.3,.5,1)}.mini-img{display:flex;align-items:center;justify-content:center;flex:1;width:100%;min-height:0}.mini-img img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}.mini-text{font-weight:700;font-size:clamp(11px,1.5vh,15px);line-height:1;color:var(--c-ink);text-transform:lowercase;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes chip-pop{0%{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}.msg-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:lowercase;min-width:0}.placeholder{color:var(--strip-placeholder);font-weight:500}.cell{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;border:0;border-radius:var(--radius);padding:clamp(8px,1.4vh,16px) 10px clamp(6px,1vh,12px);cursor:pointer;overflow:hidden;position:relative;font-family:inherit;background:linear-gradient(180deg,var(--c-bg),var(--c-bg2));box-shadow:inset 0 2px #ffffff8c,inset 0 -4px #0000000f,0 6px 14px #1423322e,0 1px 0 var(--c-edge);transition:transform .15s cubic-bezier(.2,.8,.3,1),filter .15s ease,box-shadow .15s ease}.cell:hover{transform:translateY(-2px);filter:brightness(1.03)}.cell:active{transform:translateY(2px) scale(.985);box-shadow:inset 0 3px 8px #0000002e;filter:brightness(.97)}.cell.empty{background:#ffffff0a;box-shadow:none;pointer-events:none}.cell-label{font-weight:700;color:var(--c-ink);text-align:center;line-height:1.05;letter-spacing:.1px;width:100%;margin-bottom:6px;text-transform:lowercase;flex-shrink:0;word-break:break-word}.cell-image{flex:1;width:100%;display:flex;align-items:center;justify-content:center;min-height:0}.cell-image img{max-width:100%;max-height:100%;object-fit:contain;pointer-events:none}.app.size-12 .cell-label{font-size:clamp(20px,4vh,40px);margin-bottom:8px}.app.size-12 .cell{padding:clamp(10px,1.8vh,20px) 12px}.app.size-30 .cell-label{font-size:clamp(14px,2.4vh,24px)}.app.size-30 .cell{padding:clamp(6px,1.1vh,12px) 8px}.app.size-50 .cell-label{font-size:clamp(11px,1.7vh,18px);margin-bottom:4px}.app.size-50 .cell{padding:clamp(4px,.8vh,9px) 6px;border-radius:12px}.app.size-50 .toolbar{grid-template-columns:5fr 1fr 1fr 1fr 1fr}.picker{height:100%;width:100vw;background:var(--bg);padding:clamp(24px,5vh,48px) 24px;box-sizing:border-box;overflow-y:auto;-webkit-overflow-scrolling:touch;font-family:inherit}.picker-header{text-align:center;margin:0 auto 28px;max-width:760px}.picker-header h1{margin:0 0 8px;color:#fff;font-size:clamp(30px,4.4vw,46px);font-weight:700;letter-spacing:.3px}.picker-header p{margin:0;color:#c4d1dc;font-size:clamp(14px,1.8vw,18px)}.picker-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;max-width:1200px;margin:0 auto;width:100%}.picker-card{display:flex;flex-direction:column;background:var(--panel);border:0;border-radius:var(--radius);padding:18px;cursor:pointer;text-align:left;font-family:inherit;box-shadow:0 8px 22px #0f192347;transition:transform .15s ease,box-shadow .15s ease}.picker-card:hover{transform:translateY(-3px);box-shadow:0 14px 32px #0f19235c}.picker-card:active{transform:translateY(0)}.picker-card-head{margin-bottom:8px}.picker-card-head h2{margin:0;color:var(--heading);font-size:22px}.picker-card-size{font-size:12px;color:#889;text-transform:lowercase}.picker-preview{display:grid;gap:3px;aspect-ratio:4 / 3;background:#2c3c4d;padding:5px;border-radius:10px;margin:10px 0 14px}.picker-cell{display:flex;align-items:center;justify-content:center;padding:1px 2px;border-radius:3px;overflow:hidden;color:#1a1a1a}.picker-cell span{font-size:9px;font-weight:600;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.picker-description{margin:0 0 14px;color:#444;font-size:14px;line-height:1.4;flex:1}.picker-cta{background:var(--speak-bg);color:#fff;text-align:center;padding:12px;border-radius:12px;font-weight:600;font-size:15px}.dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000008c;display:flex;align-items:center;justify-content:center;z-index:100;padding:16px}.dialog{background:#fff;border-radius:var(--radius);padding:20px;max-width:480px;width:100%;max-height:92vh;overflow-y:auto;font-family:inherit;box-shadow:0 20px 60px #0006}.dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.dialog-head h2{margin:0;color:var(--heading);font-size:22px}.dialog-close{background:none;border:0;font-size:28px;line-height:1;color:#888;cursor:pointer;padding:4px 10px;border-radius:6px}.dialog-close:hover{background:#0000000d;color:#222}.dialog-preview{border:1px solid rgba(0,0,0,.15);border-radius:12px;padding:14px;display:flex;flex-direction:column;align-items:center;margin-bottom:18px;min-height:120px}.dialog-preview-label{font-weight:700;color:#1a1a1a;text-transform:lowercase;font-size:20px;margin-bottom:8px}.dialog-preview img{max-width:80px;max-height:80px;object-fit:contain}.dialog-field{margin-bottom:16px;display:block}.dialog-label{display:block;font-size:13px;font-weight:600;color:#555;margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}.dialog-field input[type=text]{width:100%;padding:10px 12px;font-size:16px;font-family:inherit;border:1px solid rgba(0,0,0,.2);border-radius:8px;box-sizing:border-box}.dialog-field input[type=text]:focus{outline:none;border-color:var(--speak-bg);box-shadow:0 0 0 2px #2f9e8f33}.dialog-colors{display:flex;flex-wrap:wrap;gap:8px}.dialog-color{width:40px;height:40px;border-radius:10px;border:2px solid rgba(0,0,0,.15);cursor:pointer;padding:0;transition:transform .1s}.dialog-color.is-selected{border-color:var(--speak-bg);transform:scale(1.1);box-shadow:0 0 0 2px #2f9e8f4d}.dialog-picture-actions{display:flex;gap:8px;flex-wrap:wrap}.dialog-hint{margin:8px 0 0;font-size:12px;color:#888;line-height:1.4}.dialog-actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px;gap:8px}.dialog-actions-right{display:flex;gap:8px}.dialog-btn{padding:10px 16px;font-size:15px;font-weight:600;border-radius:10px;border:1px solid rgba(0,0,0,.15);background:#fff;color:#1a1a1a;cursor:pointer;font-family:inherit}.dialog-btn:hover{background:#f5f7fa}.dialog-btn-primary{background:var(--speak-bg);border-color:var(--speak-bg);color:#fff}.dialog-btn-primary:hover{background:var(--speak-bg-hover);border-color:var(--speak-bg-hover)}.dialog-btn-ghost{background:transparent;border-color:transparent;color:#888}.dialog-btn-ghost:hover{background:#0000000d;color:#222}.dialog-btn-danger{background:#fff;color:#b03030;border-color:#b0303066}.dialog-btn-danger:hover{background:#fef0f0;border-color:#b03030}.settings{height:100%;width:100vw;background:var(--bg);box-sizing:border-box;overflow-y:auto;-webkit-overflow-scrolling:touch;font-family:inherit}.settings-head{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;background:#243240eb;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid rgba(255,255,255,.08);position:sticky;top:0;z-index:10}.settings-head h1{margin:0;color:#fff;font-size:22px}.settings-head .dialog-btn{background:#ffffff1f;color:#fff;border-color:#ffffff2e}.settings-head .dialog-btn:hover{background:#fff3}.settings-spacer{width:120px}.settings-body{max-width:640px;margin:0 auto;padding:24px}.settings-section{background:var(--panel);border-radius:var(--radius);padding:20px;margin-bottom:16px;box-shadow:0 6px 18px #0f192338}.settings-section h2{margin:0 0 14px;color:var(--heading);font-size:18px}.settings-field{display:block;margin-bottom:16px}.settings-label{display:block;font-size:13px;font-weight:600;color:#555;margin-bottom:6px}.settings-field select,.settings-field input[type=range]{width:100%;padding:10px 12px;font-size:15px;font-family:inherit;border:1px solid rgba(0,0,0,.2);border-radius:8px;background:#fff;box-sizing:border-box}.settings-field input[type=range]{padding:0;height:36px}.settings-current{margin:0 0 12px;font-size:15px;color:#444}.settings-hint{margin:8px 0 0;font-size:13px;color:#777;line-height:1.5}.settings-toggle{display:flex;align-items:center;gap:10px;cursor:pointer}.settings-toggle input[type=checkbox]{width:22px;height:22px;flex-shrink:0;accent-color:var(--speak-bg);cursor:pointer}
