*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--bg: #f0f2f5;--surface: #ffffff;--border: #e2e8f0;--text: #0f172a;--text-secondary: #64748b;--accent: #2563eb;--accent-dark: #1d4ed8;--accent-light: #eff6ff;--radius: 12px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:15px;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}.app{min-height:100vh;display:flex;flex-direction:column}.app-header{background:var(--surface);border-bottom:1px solid var(--border);padding:12px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.app-brand{display:flex;align-items:baseline;gap:10px}.app-logo-text{font-size:20px;font-weight:700;letter-spacing:-.4px}.app-logo-text span{color:var(--accent)}.app-tagline{color:var(--text-secondary);font-size:13px}.app-main{flex:1;display:flex;flex-direction:column;gap:12px;padding:20px;max-width:960px;width:100%;margin:0 auto}.workspace{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);display:grid;grid-template-columns:1fr;overflow:hidden}@media (min-width: 720px){.workspace{grid-template-columns:1fr 1fr}}.workspace>*{padding:24px}.workspace>*:first-child{border-bottom:1px solid var(--border)}@media (min-width: 720px){.workspace>*:first-child{border-bottom:none;border-right:1px solid var(--border)}}.printer-status{display:flex;align-items:center;gap:8px}.status-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.status-dot--idle{background:#cbd5e1}.status-dot--connecting{background:#f59e0b;animation:pulse 1s infinite}.status-dot--ready{background:#22c55e}.status-dot--printing{background:#3b82f6;animation:pulse .7s infinite}.status-dot--error{background:#ef4444}.status-dot--asleep{background:#94a3b8}@keyframes pulse{0%,to{opacity:1}50%{opacity:.35}}.status-label{font-size:13px;color:var(--text-secondary);max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-actions{display:flex;gap:6px;margin-left:4px}.btn{display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:8px;font-size:13px;font-weight:500;padding:8px 14px;cursor:pointer;transition:background .15s,opacity .15s;white-space:nowrap}.btn:disabled{opacity:.45;cursor:not-allowed}.btn--sm{padding:6px 12px;font-size:12px}.btn--primary{background:var(--accent);color:#fff}.btn--primary:hover:not(:disabled){background:var(--accent-dark)}.btn--ghost{background:transparent;color:var(--text-secondary);border:1px solid var(--border)}.btn--ghost:hover:not(:disabled){background:var(--bg)}.btn--print{width:100%;background:var(--accent);color:#fff;font-size:15px;font-weight:600;padding:12px 16px;margin-top:4px;border-radius:10px}.btn--print:hover:not(:disabled){background:var(--accent-dark)}.label-editor{display:flex;flex-direction:column;gap:16px}.field{display:flex;flex-direction:column;gap:6px;flex:1}.field--narrow{flex:0 0 88px}.field-row{display:flex;gap:12px;align-items:flex-end}.field-row--options{align-items:center}label{font-size:12px;font-weight:600;color:var(--text-secondary)}input[type=text],input[type=number]{border:1px solid var(--border);border-radius:8px;padding:10px 12px;font-size:14px;color:var(--text);background:var(--surface);outline:none;width:100%;transition:border-color .15s,box-shadow .15s}input[type=text]:focus,input[type=number]:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}.checkbox-label{display:flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;font-weight:500;color:var(--text)}.checkbox-label--inline{padding-top:0}.batch-fieldset{border:1px solid var(--border);border-radius:8px;padding:12px;display:flex;flex-direction:column;gap:12px}.batch-fieldset .field-row{margin-top:0}.checkbox-label input{width:16px;height:16px;accent-color:var(--accent);cursor:pointer}.tape-detected{font-size:12px;color:var(--text-secondary);padding:8px 12px;background:var(--bg);border-radius:8px}.tape-detected strong{color:var(--text)}.hint{font-size:13px;color:var(--text-secondary);text-align:center}.label-preview{display:flex;flex-direction:column;gap:12px;height:100%}.preview-header{display:flex;justify-content:space-between;align-items:baseline}.preview-title{font-weight:600;font-size:14px}.preview-meta{font-size:12px;color:var(--text-secondary)}.preview-tape{flex:1;border-radius:8px;border:1px solid var(--border);padding:12px;background:#fafafa;min-height:120px}.preview-tape-stripe{border:1px solid rgba(0,0,0,.08);border-radius:4px;background:#fff;padding:8px;overflow:hidden}.preview-canvas{display:block;max-width:100%;width:100%;height:auto;image-rendering:pixelated}.preview-error{font-size:12px;color:#dc2626;padding:12px}.debug-panel{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);overflow:hidden}.debug-toggle{width:100%;display:flex;align-items:center;gap:8px;padding:10px 16px;background:transparent;border:none;font-size:13px;font-weight:500;color:var(--text-secondary);cursor:pointer;text-align:left}.debug-toggle:hover{background:var(--bg)}.debug-badge{font-size:11px;font-weight:600;background:var(--bg);color:var(--text-secondary);padding:2px 7px;border-radius:999px}.debug-chevron{margin-left:auto;font-size:11px;color:var(--text-secondary)}.debug-body{border-top:1px solid var(--border);padding:12px 16px 16px}.debug-actions{display:flex;gap:8px;margin-bottom:8px}.debug-log{max-height:240px;overflow:auto;border-radius:8px;background:#0f172a;color:#e2e8f0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}.debug-empty{padding:16px;color:#94a3b8}.debug-entry{padding:8px 12px;border-bottom:1px solid rgba(148,163,184,.12)}.debug-entry:last-child{border-bottom:none}.debug-entry-head{display:flex;justify-content:space-between;margin-bottom:2px;color:#94a3b8}.debug-entry-level{text-transform:uppercase;font-weight:700;font-size:10px;letter-spacing:.05em}.debug-entry--error .debug-entry-level{color:#fca5a5}.debug-entry--warn .debug-entry-level{color:#fcd34d}.debug-entry--hex .debug-entry-level{color:#93c5fd}.debug-entry-message{color:#f1f5f9;white-space:pre-wrap}.debug-entry-detail{margin-top:4px;white-space:pre-wrap;color:#cbd5e1;overflow-x:auto}
