:root{--bg: #1a1612;--bg-warm: #211c17;--shelf-bg: #2a2319;--shelf-border: #3d3426;--text: #f0e6d6;--text-dim: #a89880;--text-muted: #6d5f4e;--accent: #c8956c;--accent-hover: #daa87e;--danger: #c75a5a;--danger-hover: #d97070;--wood-dark: #3b2f20;--wood-mid: #5a4830;--wood-light: #7a6440;--book-shadow: rgba(0, 0, 0, .35);--radius: 10px;--radius-sm: 6px;--transition: .2s ease}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body,#root{min-height:100vh;font-family:Georgia,Times New Roman,serif;background:var(--bg);color:var(--text);line-height:1.5}.app{max-width:960px;margin:0 auto;padding:2rem 1.5rem 3rem;min-height:100vh;display:flex;flex-direction:column}.header{margin-bottom:2rem}.header-top{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.75rem;margin-bottom:1rem}.header-title{display:flex;align-items:center;gap:.6rem}.header-icon{font-size:1.8rem;line-height:1}.header h1{font-size:1.65rem;font-weight:700;letter-spacing:-.02em;color:var(--text)}.header-stats{display:flex;align-items:center;gap:.5rem;font-size:.85rem;color:var(--text-dim);font-family:system-ui,sans-serif}.stat-dot{width:4px;height:4px;border-radius:50%;background:var(--text-muted)}.header-controls{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.search-wrap{position:relative;flex:1;min-width:180px}.search-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:.85rem;pointer-events:none;opacity:.6}.search-input{width:100%;padding:.55rem 2rem .55rem 2.2rem;border:1px solid var(--shelf-border);border-radius:var(--radius);background:var(--bg-warm);color:var(--text);font-family:system-ui,sans-serif;font-size:.9rem;outline:none;transition:border-color var(--transition)}.search-input::placeholder{color:var(--text-muted)}.search-input:focus{border-color:var(--accent)}.search-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:none;border:none;color:var(--text-muted);cursor:pointer;font-size:.8rem;padding:4px 6px;border-radius:4px;line-height:1;transition:color var(--transition)}.search-clear:hover{color:var(--text)}.btn{display:inline-flex;align-items:center;gap:.35rem;padding:.55rem 1rem;border:1px solid var(--shelf-border);border-radius:var(--radius);background:var(--bg-warm);color:var(--text-dim);font-family:system-ui,sans-serif;font-size:.85rem;cursor:pointer;transition:all var(--transition);white-space:nowrap;-webkit-user-select:none;user-select:none}.btn:hover{background:var(--shelf-bg);color:var(--text);border-color:var(--text-muted)}.btn-add-shelf{background:var(--accent);color:#1a1612;border-color:var(--accent);font-weight:600}.btn-add-shelf:hover{background:var(--accent-hover);border-color:var(--accent-hover)}.btn-confirm{background:var(--accent);color:#1a1612;border-color:var(--accent);font-weight:600}.btn-confirm:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover)}.btn-confirm:disabled{opacity:.5;cursor:not-allowed}.btn-cancel{background:transparent;color:var(--text-muted)}.btn-cancel:hover{color:var(--text-dim);background:#ffffff0a}.btn-icon{width:30px;height:30px;display:flex;align-items:center;justify-content:center;border:1px solid var(--shelf-border);border-radius:var(--radius-sm);background:var(--bg-warm);color:var(--text-dim);font-size:1rem;cursor:pointer;transition:all var(--transition);line-height:1}.btn-icon:hover{background:var(--shelf-bg);color:var(--text);border-color:var(--text-muted)}.btn-icon-danger:hover{background:var(--danger);color:#fff;border-color:var(--danger)}.shelves{flex:1;display:flex;flex-direction:column;gap:1.5rem}.shelf{background:var(--shelf-bg);border:1px solid var(--shelf-border);border-radius:var(--radius);padding:1rem 1.25rem 1.25rem;transition:border-color var(--transition),box-shadow var(--transition)}.shelf-drop-active{border-color:var(--accent);box-shadow:0 0 0 2px #c8956c26}.shelf-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.75rem}.shelf-title{font-size:1.1rem;font-weight:600;color:var(--text);cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:color var(--transition)}.shelf-title:hover{color:var(--accent)}.shelf-book-count{font-family:system-ui,sans-serif;font-size:.7rem;font-weight:500;background:var(--wood-dark);color:var(--text-dim);padding:.15rem .5rem;border-radius:999px;line-height:1}.shelf-rename-input{font-family:inherit;font-size:1.1rem;font-weight:600;color:var(--text);background:var(--bg-warm);border:1px solid var(--accent);border-radius:var(--radius-sm);padding:.2rem .5rem;outline:none;width:200px}.shelf-actions{display:flex;gap:.4rem}.add-book-form{background:var(--bg-warm);border:1px solid var(--shelf-border);border-radius:var(--radius-sm);padding:.85rem;margin-bottom:.75rem;display:flex;flex-direction:column;gap:.6rem}.add-book-title{width:100%;padding:.5rem .75rem;border:1px solid var(--shelf-border);border-radius:var(--radius-sm);background:var(--shelf-bg);color:var(--text);font-family:inherit;font-size:.95rem;outline:none;transition:border-color var(--transition)}.add-book-title::placeholder{color:var(--text-muted)}.add-book-title:focus{border-color:var(--accent)}.add-book-row{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.color-palette,.icon-palette{display:flex;flex-wrap:wrap;gap:6px}.color-swatch{width:26px;height:26px;border-radius:50%;border:2px solid transparent;cursor:pointer;transition:all var(--transition);outline:none}.color-swatch:hover{transform:scale(1.15)}.color-swatch-active{border-color:#fff;box-shadow:0 0 0 2px var(--bg),0 0 0 4px currentColor;transform:scale(1.15)}.icon-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid var(--shelf-border);border-radius:var(--radius-sm);background:var(--shelf-bg);cursor:pointer;font-size:1rem;transition:all var(--transition)}.icon-btn:hover{background:var(--wood-dark);border-color:var(--text-muted)}.icon-btn-active{border-color:var(--accent);background:var(--wood-dark);box-shadow:0 0 0 2px #c8956c33}.add-book-actions{display:flex;gap:.5rem}.books-row{display:flex;flex-wrap:wrap;gap:.75rem;min-height:60px;padding:.5rem 0}.books-empty{width:100%;text-align:center;color:var(--text-muted);font-size:.85rem;font-style:italic;padding:1rem 0;font-family:system-ui,sans-serif}.book{--book-color: #5b8fb9;width:110px;border-radius:var(--radius-sm);overflow:hidden;cursor:grab;transition:transform .2s ease,box-shadow .2s ease,opacity .2s ease;box-shadow:0 3px 8px var(--book-shadow),0 1px 2px #0003;-webkit-user-select:none;user-select:none;position:relative;background:var(--shelf-bg)}.book:hover{transform:translateY(-4px);box-shadow:0 8px 20px var(--book-shadow),0 2px 4px #0003}.book:active{cursor:grabbing}.book-dragging{opacity:.35;transform:scale(.95)}.book-drop-spot{position:relative}.book-drop-spot:before{content:"";position:absolute;left:-6px;top:0;bottom:0;width:3px;background:var(--accent);border-radius:2px;animation:drop-pulse .8s ease infinite}@keyframes drop-pulse{0%,to{opacity:1}50%{opacity:.4}}.book-spine{height:14px;display:flex;align-items:center;justify-content:center;position:relative}.book-spine:after{content:"";position:absolute;bottom:0;left:10%;right:10%;height:1px;background:#0003}.book-icon{font-size:.7rem;line-height:1;filter:brightness(1.3)}.book-body{padding:.45rem .5rem .55rem;display:flex;align-items:flex-start;justify-content:space-between;gap:.25rem;min-height:54px}.book-title{font-size:.75rem;font-weight:600;color:var(--text);line-height:1.3;word-break:break-word;flex:1}.book-delete{flex-shrink:0;width:18px;height:18px;display:flex;align-items:center;justify-content:center;border:none;border-radius:50%;background:transparent;color:var(--text-muted);font-size:.6rem;cursor:pointer;opacity:0;transition:all var(--transition);line-height:1}.book:hover .book-delete{opacity:1}.book-delete:hover{background:var(--danger);color:#fff}.empty-state{text-align:center;padding:3rem 1rem;color:var(--text-muted)}.empty-icon{font-size:2.5rem;display:block;margin-bottom:.75rem}.empty-state p{font-size:.95rem;font-family:system-ui,sans-serif}.footer{margin-top:2.5rem;text-align:center}.footer p{font-size:.8rem;color:var(--text-muted);font-family:system-ui,sans-serif}@media(max-width:640px){.app{padding:1rem .75rem 2rem}.header h1{font-size:1.3rem}.header-controls{flex-direction:column;align-items:stretch}.search-wrap{min-width:unset}.btn{justify-content:center}.book{width:90px}.shelf-rename-input{width:140px}}@media(max-width:400px){.book{width:80px}.book-body{padding:.35rem .4rem .45rem}.book-title{font-size:.7rem}}
