:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}*,*:before,*:after{box-sizing:border-box}html,body{margin:0;padding:0;overflow-x:hidden;width:100%;max-width:100%}#root{max-width:1280px;margin:0 auto;padding:0;text-align:center;width:100%;overflow-x:hidden}.logo{height:6em;padding:1.5em;will-change:filter;transition:filter .3s}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.react:hover{filter:drop-shadow(0 0 2em #61dafbaa)}@keyframes logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion: no-preference){a:nth-of-type(2) .logo{animation:logo-spin infinite 20s linear}}.card{padding:2em}.read-the-docs{color:#888}.app{min-height:100vh;min-height:100dvh;background:linear-gradient(135deg,#667eea,#764ba2);padding:.5rem;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;width:100vw;max-width:100%;overflow-x:hidden;box-sizing:border-box}.app.drawing{overflow:hidden;position:fixed;width:100%}.container{max-width:1400px;margin:0 auto;background:#fffffff2;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border-radius:20px;box-shadow:0 25px 50px #0000001a;overflow:hidden;width:100%;box-sizing:border-box}.header{text-align:center;padding:2rem 1rem 1rem;background:linear-gradient(135deg,#f093fb,#f5576c);color:#fff;box-sizing:border-box}.title{font-size:clamp(2rem,5vw,3.5rem);font-weight:700;margin:0 0 .5rem;text-shadow:0 2px 4px rgba(0,0,0,.1)}.gradient-text{background:linear-gradient(45deg,#fff,gold);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.subtitle{font-size:1.1rem;margin:0;opacity:.9;font-weight:300}.main{display:flex;flex-direction:column;gap:2rem;padding:1rem;max-width:1200px;margin:0 auto;width:100%;box-sizing:border-box}.canvas-section{display:flex;flex-direction:column;align-items:center;gap:1.5rem;order:1;width:100%;box-sizing:border-box}.canvas-container{position:relative;border-radius:15px;overflow:hidden;box-shadow:0 15px 35px #0000001a;background:#000;transition:transform .3s ease,box-shadow .3s ease;width:100%;max-width:min(400px,calc(100vw - 2rem));box-sizing:border-box}.drawing-canvas{display:block;cursor:crosshair;touch-action:none;width:100%;max-width:100%;height:auto;aspect-ratio:1;border:2px solid #e0e0e0;transition:border-color .3s ease;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box}.drawing-canvas:hover,.drawing-canvas:focus{border-color:#667eea}.canvas-overlay{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;display:flex;align-items:flex-end;justify-content:center;padding:1rem}.instruction{background:#ffffffe6;color:#333;padding:.5rem 1rem;border-radius:20px;font-size:.9rem;font-weight:500;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);opacity:.8;transition:opacity .3s ease}.canvas-container:hover .instruction{opacity:.3}.controls{display:flex;gap:1rem;flex-wrap:wrap;justify-content:center}.btn{padding:.75rem 1.5rem;border:none;border-radius:12px;font-size:1rem;font-weight:600;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;gap:.5rem;min-width:120px;justify-content:center;position:relative;overflow:hidden}.btn:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);transition:left .5s ease}.btn:hover:before{left:100%}.btn-primary{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;box-shadow:0 8px 20px #667eea4d}.btn-primary:hover{transform:translateY(-2px);box-shadow:0 12px 25px #667eea66}.btn-secondary{background:linear-gradient(135deg,#ff9a9e,#fecfef);color:#333;box-shadow:0 8px 20px #ff9a9e4d}.btn-secondary:hover{transform:translateY(-2px);box-shadow:0 12px 25px #ff9a9e66}.btn-small{padding:.5rem;min-width:auto;width:40px;height:40px;border-radius:50%;background:#f8f9fa;color:#666;border:2px solid #e9ecef;font-size:1rem}.btn-small:hover{background:#e9ecef;transform:scale(1.1)}.btn-small:disabled{opacity:.5;cursor:not-allowed;transform:none}.btn-danger{background:linear-gradient(135deg,#ff6b6b,#ee5a24);color:#fff;border-color:#ff6b6b}.btn-danger:hover{background:linear-gradient(135deg,#ee5a24,#ff6b6b)}.btn-icon{font-size:1.1em}.model-status-indicator{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:12px;font-size:.9rem;font-weight:600;min-width:140px;justify-content:center;transition:all .3s ease;cursor:default;-webkit-user-select:none;user-select:none}.status-dot{width:10px;height:10px;border-radius:50%;transition:all .3s ease;position:relative}.model-status-indicator.loading{background:linear-gradient(135deg,#ff9f43,#ffa726);color:#fff;box-shadow:0 4px 15px #ff9f434d}.model-status-indicator.loading .status-dot{background:#fff;animation:pulse 1.5s ease-in-out infinite}.model-status-indicator.loaded{background:linear-gradient(135deg,#2ed573,#1dd1a1);color:#fff;box-shadow:0 4px 15px #2ed5734d}.model-status-indicator.loaded .status-dot{background:#fff}.model-status-indicator.failed{background:linear-gradient(135deg,#ff6b6b,#ee5a24);color:#fff;box-shadow:0 4px 15px #ff6b6b4d}.model-status-indicator.failed .status-dot{background:#fff}.model-status-indicator.auto-predict-active{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;box-shadow:0 4px 15px #667eea4d}.model-status-indicator.auto-predict-active .status-dot{background:#fff;animation:pulse 1s ease-in-out infinite}@keyframes pulse{0%{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.2)}to{opacity:1;transform:scale(1)}}.model-selector{margin-top:1rem;margin-bottom:.75rem;display:flex;flex-direction:column;gap:.5rem;font-size:.9rem;color:#f0f0f0;max-width:500px;margin-left:auto;margin-right:auto}.model-selector label{font-weight:600;font-size:1rem;text-align:center;color:#fff}.model-select{padding:.75rem 3rem .75rem 1rem;border-radius:12px;border:2px solid rgba(255,255,255,.2);background:#ffffff1a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#fff;font-size:.9rem;font-weight:500;cursor:pointer;transition:all .3s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:1.5em 1.5em}.model-select:hover{border-color:#fff6;background:#ffffff26;transform:translateY(-2px);box-shadow:0 8px 25px #0003}.model-select:focus{outline:none;border-color:#667eea;box-shadow:0 0 0 3px #667eea4d,0 8px 25px #0003;background:#fff3}.model-select option{background-color:#333;color:#fff;padding:.75rem;font-weight:500}.initial-load-notification{margin-top:.75rem;padding:.75rem 1rem;background-color:#ffe6991a;border:1px solid rgba(255,204,51,.5);color:#fff5cc;border-radius:8px;font-size:.85rem;text-align:center;animation:fadeIn .5s ease-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.prediction-result{margin-top:1rem;width:100%;max-width:min(400px,calc(100vw - 2rem));box-sizing:border-box}.prediction-card{background:linear-gradient(135deg,#a8edea,#fed6e3);border-radius:20px;padding:1.5rem;text-align:center;box-shadow:0 10px 30px #0000001a;animation:slideUp .5s ease-out}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.prediction-digit{font-size:4rem;font-weight:700;color:#333;margin-bottom:.5rem;text-shadow:0 2px 4px rgba(0,0,0,.1)}.prediction-info{display:flex;justify-content:space-between;align-items:center;margin-top:1rem;font-size:.9rem;color:#666}.confidence{font-weight:600}.confidence-value{color:#28a745;font-weight:700}.timestamp{opacity:.8}.sidebar{display:flex;flex-direction:column;gap:2rem;order:2;width:100%}.predictions-section{background:#f8f9fa;border-radius:15px;padding:1.5rem;box-shadow:0 5px 15px #0000000d}.predictions-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.predictions-header h3{margin:0;color:#333;font-size:1.2rem;font-weight:600}.predictions-controls{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:flex-end}.predictions-list{max-height:400px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#ddd transparent}.predictions-list::-webkit-scrollbar{width:6px}.predictions-list::-webkit-scrollbar-track{background:transparent}.predictions-list::-webkit-scrollbar-thumb{background:#ddd;border-radius:3px}.prediction-item{display:flex;align-items:center;gap:1rem;padding:.75rem;margin-bottom:.5rem;background:#fff;border-radius:10px;box-shadow:0 2px 8px #0000000d;transition:transform .2s ease,box-shadow .2s ease}.prediction-item:hover{transform:translate(5px);box-shadow:0 4px 12px #0000001a}.prediction-item-digit{font-size:1.5rem;font-weight:700;color:#667eea;min-width:30px;text-align:center}.prediction-item-info{flex:1}.prediction-item-confidence{font-weight:600;color:#28a745;font-size:.9rem}.prediction-item-time{font-size:.8rem;color:#666;opacity:.8}.empty-state{text-align:center;padding:2rem 1rem;color:#666}.empty-icon{font-size:3rem;margin-bottom:1rem}.empty-state p{margin:.5rem 0}.empty-subtitle{font-size:.9rem;opacity:.7}.info-section{background:linear-gradient(135deg,#ffecd2,#fcb69f);border-radius:15px;box-shadow:0 5px 15px #0000000d;overflow:hidden;transition:all .3s ease}.info-toggle{width:100%;padding:1rem 1.5rem;background:transparent;border:none;color:#333;font-size:1.1rem;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:space-between;transition:all .3s ease}.info-toggle:hover{background:#ffffff1a}.info-toggle-icon{font-size:1.2rem;transition:transform .3s ease}.info-toggle-icon.expanded{transform:rotate(180deg)}.info-content{max-height:0;overflow:hidden;transition:max-height .3s ease;padding:0 1.5rem}.info-content.expanded{max-height:300px;padding:0 1.5rem 1.5rem}.info-list{list-style:none;padding:0;margin:0}.info-list li{border-bottom:1px solid rgba(255,255,255,.3);position:relative;padding:.5rem 0 .5rem 1.5rem;font-size:.9rem;color:#555}.info-list li:before{content:"→";position:absolute;left:0;color:#667eea;font-weight:700}.info-list li:last-child{border-bottom:none}.canvas-container.drawing{transform:scale(1.02);box-shadow:0 20px 40px #667eea33}.canvas-container.drawing .drawing-canvas{border-color:#667eea;box-shadow:0 0 20px #667eea4d}.reconstruction-result{margin-top:1.5rem;width:100%;max-width:min(400px,calc(100vw - 2rem));box-sizing:border-box}.reconstruction-card{background:linear-gradient(135deg,#e8f5e8,#f0f8ff);border-radius:20px;padding:1.5rem;text-align:center;box-shadow:0 10px 30px #0000001a;animation:slideUp .5s ease-out}.reconstruction-card h3{margin:0 0 1rem;color:#333;font-size:1.2rem;font-weight:600}.output-canvas-container{display:flex;justify-content:center;align-items:center;margin-top:1rem}.output-canvas{background:#000;box-shadow:0 4px 15px #0000001a;transition:transform .3s ease}.output-canvas:hover{transform:scale(1.05)}@media (max-width: 767px){.reconstruction-card{padding:1rem;margin:0 .5rem}.output-canvas{width:120px!important;height:120px!important}}@media (min-width: 768px){.main{padding:2rem}.canvas-section{order:1}.sidebar{order:2}}@media (min-width: 1024px){.main{display:grid;grid-template-columns:1fr 350px;gap:2rem;align-items:start}.canvas-section,.sidebar{order:unset}}@media (max-width: 767px){.app{padding:.25rem;min-height:100vh;min-height:100dvh}.container{border-radius:15px;margin:0;min-height:calc(100vh - .5rem);min-height:calc(100dvh - .5rem);width:calc(100vw - .5rem);max-width:calc(100vw - .5rem)}.header{padding:1rem .5rem .75rem}.main{padding:.75rem .5rem;gap:1.5rem}.model-selector{max-width:none;margin:1rem 0 .75rem}.model-select{font-size:.85rem;padding:.6rem 2.5rem .6rem .75rem;background-size:1.25em 1.25em;background-position:right .6rem center}.canvas-container{margin-bottom:1rem;width:calc(100vw - 2rem);max-width:calc(100vw - 2rem);border-radius:12px}.drawing-canvas{width:100%;max-width:100%;border-width:3px;border-radius:12px}.controls{flex-direction:row;gap:1rem;justify-content:center;flex-wrap:wrap;margin-top:1rem;width:100%}.btn{min-width:110px;padding:1rem 1.5rem;font-size:1.1rem;border-radius:15px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.model-status-indicator{font-size:.85rem;padding:.75rem 1rem;min-width:140px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.status-text{font-weight:600}.prediction-result{width:calc(100vw - 2rem);max-width:calc(100vw - 2rem)}.prediction-digit{font-size:3.5rem}.predictions-section{margin-bottom:1rem;padding:1.25rem 1rem;border-radius:12px;width:100%;box-sizing:border-box}.predictions-header{flex-direction:column;gap:.75rem;align-items:stretch}.predictions-header h3{text-align:center;margin-bottom:0;font-size:1.25rem}.predictions-controls{justify-content:center;gap:1rem}.prediction-card{padding:2rem 1.5rem;border-radius:15px;width:100%;box-sizing:border-box}.prediction-info{flex-direction:column;gap:.75rem;text-align:center}.btn-small{width:48px;height:48px;min-width:48px;font-size:1.1rem;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.prediction-item{padding:1.25rem 1rem;border-radius:12px;margin-bottom:.75rem}.prediction-item-digit{font-size:2rem;min-width:50px}.prediction-item-info{padding-left:.5rem}.prediction-item-confidence{font-size:1rem;font-weight:700}.prediction-item-time{font-size:.9rem;margin-top:.25rem}.info-toggle{padding:1.25rem 1rem;font-size:1.15rem;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.info-section{border-radius:12px;margin-bottom:1rem;width:100%;box-sizing:border-box}.instruction{font-size:.85rem;padding:.6rem 1rem;border-radius:25px;margin-bottom:.5rem}}@media (max-width: 480px){.app{padding:.125rem}.container{border-radius:12px;min-height:calc(100vh - .25rem);min-height:calc(100dvh - .25rem);width:calc(100vw - .25rem);max-width:calc(100vw - .25rem)}.title{font-size:1.75rem;line-height:1.2}.subtitle{font-size:.95rem;line-height:1.3}.main{padding:.5rem .25rem;gap:1.25rem}.canvas-container{width:calc(100vw - 1rem);max-width:calc(100vw - 1rem);border-radius:10px}.drawing-canvas{width:100%;max-width:100%;border-radius:10px}.prediction-result{width:calc(100vw - 1rem);max-width:calc(100vw - 1rem)}.prediction-digit{font-size:3rem}.controls{gap:.75rem;margin-top:1rem}.btn{padding:.9rem 1.2rem;font-size:1rem;min-width:100px;border-radius:12px}.model-status-indicator{font-size:.8rem;padding:.6rem .8rem;min-width:120px;border-radius:10px}.status-dot{width:8px;height:8px}.prediction-card{padding:1.5rem 1rem;border-radius:12px}.predictions-header h3{font-size:1.15rem}.predictions-section{padding:1rem .5rem}.prediction-item{padding:1rem .75rem;border-radius:10px}.prediction-item-digit{font-size:1.75rem;min-width:45px}.btn-small{width:44px;height:44px;min-width:44px;font-size:1rem}.info-toggle{padding:1rem .5rem;font-size:1.1rem}.info-section{border-radius:10px}.instruction{font-size:.8rem;padding:.5rem .9rem;border-radius:20px}.header{padding:.75rem .25rem .5rem}}@media (max-height: 600px) and (orientation: landscape) and (max-width: 1024px){.app{padding:.25rem}.container{min-height:calc(100vh - .5rem);min-height:calc(100dvh - .5rem)}.header{padding:.5rem 1rem}.title{font-size:1.5rem;margin-bottom:.25rem}.subtitle{font-size:.85rem}.main{padding:.75rem 1rem;gap:1rem;display:grid;grid-template-columns:auto 1fr;align-items:start}.canvas-section{order:1;width:auto}.sidebar{order:2;width:auto;max-width:300px;margin-left:1rem}.drawing-canvas{max-width:min(250px,40vw);width:min(250px,40vw);max-height:min(250px,40vw);height:min(250px,40vw)}.canvas-container{max-width:min(250px,40vw);width:auto}.controls{flex-direction:column;gap:.5rem}.btn{padding:.6rem 1rem;font-size:.9rem;min-width:100px}.predictions-section,.info-section{padding:.75rem;margin-bottom:.75rem}.prediction-card{padding:1rem}.prediction-digit{font-size:2.5rem}.predictions-header h3{font-size:1rem}.info-toggle{padding:.75rem;font-size:1rem}}@media (prefers-color-scheme: dark){.container{background:#1e1e1ef2;color:#e0e0e0}.predictions-section{background:#2a2a2a}.prediction-item{background:#3a3a3a;color:#e0e0e0}.info-section{background:linear-gradient(135deg,#2a2a2a,#3a3a3a);color:#e0e0e0}.predictions-header h3,.info-toggle{color:#e0e0e0}.info-list li{color:#b0b0b0;border-bottom-color:#ffffff1a}.empty-state{color:#b0b0b0}.instruction{background:#323232e6;color:#e0e0e0}}.btn:focus-visible,.drawing-canvas:focus-visible{outline:3px solid #667eea;outline-offset:2px}@media print{.app{background:#fff;padding:0}.container{box-shadow:none;background:#fff;border-radius:0;max-width:100%}.header{background:none;color:#000;padding:1rem 0}.gradient-text{background:none;-webkit-text-fill-color:black}.controls,.predictions-controls,.info-toggle,.sidebar{display:none!important}.main{display:block}.canvas-section{align-items:flex-start}.prediction-card{box-shadow:none;border:1px solid #ccc}}
