*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--bg: #f0f2f5;--surface: #ffffff;--primary: #2563eb;--primary-dark: #1d4ed8;--danger: #dc2626;--text: #111827;--text-muted: #6b7280;--border: #e5e7eb;--radius: 10px;--shadow: 0 2px 8px rgba(0,0,0,.1);--loading-overlay: rgba(255,255,255,.7);--error-bg: #fef2f2;--error-border: #fecaca;--playing-bg: #eff6ff}[data-theme=dark]{--bg: #111827;--surface: #1f2937;--primary: #3b82f6;--primary-dark: #2563eb;--danger: #f87171;--text: #f9fafb;--text-muted: #9ca3af;--border: #374151;--shadow: 0 2px 8px rgba(0,0,0,.4);--loading-overlay: rgba(0,0,0,.6);--error-bg: #450a0a;--error-border: #7f1d1d;--playing-bg: #1e3a5f}html{font-size:16px}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);min-height:100dvh}.art-background{--app-column: 480px;position:fixed;top:0;right:0;bottom:0;left:auto;width:max(0px,calc((100vw - var(--app-column)) / 2));z-index:0;background-size:contain;background-position:center;background-repeat:no-repeat;pointer-events:none;transition:background-image .3s ease}body.tesla-bg .art-background{left:0;width:100vw;background-size:cover;background-position:center;filter:blur(8px);transform:scale(1.03)}#app{max-width:480px;margin:0 auto;min-height:100dvh;position:relative;z-index:1}.view{min-height:100dvh;display:flex;flex-direction:column}.view.hidden{display:none}.view.active{display:flex}#view-login{justify-content:center;padding:24px 16px}.card{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);padding:28px 24px;width:100%}.card h1{font-size:1.5rem;font-weight:700;margin-bottom:24px;text-align:center;color:var(--primary)}form{display:flex;flex-direction:column;gap:12px}label{font-size:.85rem;font-weight:600;color:var(--text-muted);margin-bottom:-6px}input{width:100%;padding:12px 14px;border:1.5px solid var(--border);border-radius:8px;font-size:1rem;color:var(--text);background:var(--surface);transition:border-color .15s;min-height:44px}input:focus{outline:none;border-color:var(--primary)}button[type=submit],button.btn-primary{margin-top:8px;padding:13px;background:var(--primary);color:#fff;border:none;border-radius:8px;font-size:1rem;font-weight:600;cursor:pointer;min-height:44px;transition:background .15s}button[type=submit]:hover,button.btn-primary:hover{background:var(--primary-dark)}button[type=submit]:disabled{opacity:.6;cursor:not-allowed}header{display:flex;align-items:center;gap:8px;padding:12px 16px;background:var(--surface);border-bottom:1px solid var(--border);box-shadow:var(--shadow);position:sticky;top:0;z-index:10}header h2{flex:1;font-size:1.1rem;font-weight:700;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btn-text{background:none;border:none;color:var(--primary);font-size:.9rem;font-weight:600;cursor:pointer;padding:8px 4px;min-height:44px;white-space:nowrap;flex-shrink:0}.btn-icon{background:none;border:none;color:var(--text-muted);font-size:1.3rem;cursor:pointer;padding:8px;min-height:44px;min-width:44px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.btn-icon:hover{color:var(--primary)}.header-menu-wrap{position:relative;flex-shrink:0}.btn-menu{background:none;border:none;color:var(--text-muted);font-size:1.25rem;cursor:pointer;padding:8px;min-height:44px;min-width:44px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.btn-menu:hover{color:var(--primary)}.header-menu{display:none;position:absolute;top:100%;right:0;margin-top:4px;min-width:160px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);z-index:20;overflow:hidden}.header-menu.open{display:block}.header-menu button{display:block;width:100%;padding:12px 16px;background:none;border:none;text-align:left;font-size:.95rem;color:var(--text);cursor:pointer;transition:background .1s}.header-menu button:hover{background:var(--bg)}.item-list{list-style:none;padding:8px 0;flex:1;overflow-y:auto}.item-list li{border-bottom:1px solid var(--border)}.item-list li:last-child{border-bottom:none}.item-list li{display:flex;align-items:stretch}.item-list li.selected{background:var(--bg)}.item-list .row-select{flex-shrink:0;align-self:center;width:20px;height:20px;margin:0 12px 0 16px;cursor:pointer;accent-color:var(--primary)}.item-list button,.item-list a{display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--surface);border:none;text-align:left;font-size:.95rem;color:var(--text);cursor:pointer;min-height:52px;text-decoration:none;transition:background .1s}.item-list button:not(.btn-download):not(.btn-copy):not(.btn-info){width:100%}a.obj-preview{flex:1;min-width:0}#view-objects:not(.tesla-mode) a.obj-preview.list-row-art{position:relative;overflow:hidden;background-color:var(--surface);background-size:cover;background-position:center;background-repeat:no-repeat}#view-objects:not(.tesla-mode) a.obj-preview.list-row-art .track-lines{position:relative;z-index:1;padding-right:76px;box-sizing:border-box}:root[data-theme=light] #view-objects:not(.tesla-mode) a.obj-preview.list-row-art .track-lines{text-shadow:0 0 2px rgb(255 255 255 / .95),0 0 8px rgb(255 255 255 / .88),1px 1px 0 rgb(255 255 255 / .9),-1px -1px 0 rgb(255 255 255 / .9)}:root[data-theme=dark] #view-objects:not(.tesla-mode) a.obj-preview.list-row-art .track-lines{text-shadow:0 0 3px rgb(0 0 0 / .95),0 0 10px rgb(0 0 0 / .8),1px 1px 0 rgb(0 0 0 / .9),-1px -1px 0 rgb(0 0 0 / .9)}#view-objects:not(.tesla-mode) .item-list li[data-key]{position:relative}#view-objects:not(.tesla-mode) .item-list li .list-row-actions{position:absolute;top:6px;right:8px;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:flex-start;gap:4px;z-index:3;background:transparent;pointer-events:none}#view-objects:not(.tesla-mode) .item-list li .list-row-actions button{pointer-events:auto}#view-objects:not(.tesla-mode) .list-row-actions .btn-copy,#view-objects:not(.tesla-mode) .list-row-actions .btn-info,#view-objects:not(.tesla-mode) .list-row-actions .btn-download{width:20px;height:20px;min-height:20px;padding:0;gap:0;border-left:none;border-radius:4px;font-size:.62rem;line-height:1;flex-shrink:0}#view-objects:not(.tesla-mode) .list-row-actions .btn-download{font-size:.72rem}#view-objects:not(.tesla-mode) .list-row-actions .btn-info{font-size:.58rem;font-weight:700}#view-objects:not(.tesla-mode) .list-row-actions .btn-copy:active{background-color:#1e40af}#view-objects:not(.tesla-mode) .list-row-actions .btn-info:active{background-color:#1e293b}#view-objects:not(.tesla-mode) .list-row-actions .btn-download:active{background-color:#166534}#view-objects:not(.tesla-mode) .item-list li.selected a.obj-preview.list-row-art{background-color:var(--bg)}.item-list button:active{background:var(--bg)}.item-list a.obj-preview:not(.list-row-art):active{background:var(--bg)}#view-objects:not(.tesla-mode) .item-list a.obj-preview.list-row-art:active{background-color:var(--bg)}.btn-download{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:52px;min-height:52px;background:#16a34a;border:none;border-left:1px solid #15803d;color:#fff;font-size:1.3rem;cursor:pointer;transition:background .1s;padding:0}.btn-download:hover{background:#15803d}.btn-download:active{background:#166534}.btn-download:disabled{opacity:.4;cursor:not-allowed}.btn-copy{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:52px;border:none;border-left:1px solid #1d4ed8;background:#2563eb;color:#fff;font-size:1.1rem;cursor:pointer;transition:background .1s;padding:0}.btn-copy:hover{background:#1d4ed8}.btn-copy:active{background:#1e40af}.btn-copy:disabled{opacity:.4;cursor:not-allowed}.btn-info{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:52px;min-height:52px;border:none;border-left:1px solid #64748b;background:#475569;color:#fff;font-size:1.05rem;font-weight:700;cursor:pointer;transition:background .15s;padding:0}.btn-info:hover{background:#334155}.btn-info:active{background:#1e293b}.btn-info:disabled{opacity:.4;cursor:not-allowed}.track-lines{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;min-width:0;flex:1}.track-lines .title-line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-weight:600}.track-lines .artist-line{font-size:.8rem;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.track-lines .artist-line:empty{display:none}a.obj-preview .track-lines{flex:1}.item-list .icon{font-size:1.2rem;flex-shrink:0}.item-list .name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.item-list .meta{font-size:.78rem;color:var(--text-muted);flex-shrink:0}.item-list .chevron{color:var(--text-muted);flex-shrink:0}#view-objects.tesla-mode .item-list{display:grid;grid-template-columns:repeat(auto-fill,164px);justify-content:center;gap:16px;padding:16px;align-content:start;width:100vw;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);max-width:none}#view-objects.tesla-mode .item-list li{border:1px solid var(--border);border-radius:10px;background:var(--surface);box-shadow:var(--shadow);display:flex;flex-direction:column;align-items:stretch;width:164px;padding:10px;min-height:0;position:relative}#view-objects.tesla-mode .item-list li.selected{outline:2px solid var(--primary);outline-offset:-2px}#view-objects.tesla-mode .item-list .row-select{position:absolute;top:8px;left:8px;margin:0;width:18px;height:18px;z-index:2;background:#fff;border-radius:4px}#view-objects.tesla-mode .tesla-cover{width:144px;height:144px;border-radius:8px;border:1px solid var(--border);background-color:var(--bg);background-size:cover;background-position:center;background-repeat:no-repeat;margin-bottom:8px}#view-objects.tesla-mode .tesla-title{display:block;min-height:36px;padding:0;margin-bottom:8px;background:transparent}#view-objects.tesla-mode .tesla-title .track-lines{width:100%}#view-objects.tesla-mode .tesla-title .title-line{font-size:.85rem;line-height:1.2;white-space:nowrap;font-weight:600}#view-objects.tesla-mode .tesla-title .artist-line{font-size:.72rem}#view-objects.tesla-mode .tesla-actions{display:flex;gap:6px;margin-top:auto;width:100%;min-width:0;flex-shrink:0;box-sizing:border-box}#view-objects.tesla-mode .tesla-actions .btn-copy,#view-objects.tesla-mode .tesla-actions .btn-download,#view-objects.tesla-mode .tesla-actions .btn-info{flex:1 1 0;min-width:0;width:auto;max-width:none;min-height:38px;height:38px;border-radius:6px;border-left:none;font-size:1rem}#view-objects.tesla-mode .item-list a:active,#view-objects.tesla-mode .item-list button:active{background:inherit}.filter-bar{padding:10px 16px;background:var(--bg);border-bottom:1px solid var(--border);position:sticky;top:57px;z-index:9}.filter-bar input{width:100%;padding:10px 14px 10px 36px;border:1.5px solid var(--border);border-radius:8px;font-size:1rem;background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 12px center;background-size:16px;min-height:44px}.filter-bar input:focus{outline:none;border-color:var(--primary)}.empty-state{padding:48px 16px;text-align:center;color:var(--text-muted);font-size:.95rem}.error-msg{background:var(--error-bg);border:1px solid var(--error-border);color:var(--danger);border-radius:8px;padding:12px 14px;font-size:.88rem;margin:12px 16px 0}.error-msg.hidden{display:none}.loading{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--loading-overlay);display:flex;align-items:center;justify-content:center;z-index:100}.loading.hidden{display:none}.spinner{width:40px;height:40px;border:4px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.player-bar{position:fixed;bottom:0;left:50%;transform:translate(-50%);width:100%;max-width:480px;background:#111827;border-top:2px solid #374151;z-index:50}.player-bar.hidden{display:none}.player-header{display:flex;align-items:center;gap:8px;padding:8px 12px 4px}.player-title{flex:1;font-size:.8rem;color:#d1d5db;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-close{flex-shrink:0;background:none;border:none;color:#9ca3af;font-size:1.4rem;line-height:1;cursor:pointer;padding:2px 4px}.player-close:hover{color:#fff}#media-player{display:block;width:100%;height:40px;background:transparent}.view.player-open .item-list{padding-bottom:100px}li.playing{background:var(--playing-bg)}li.playing a.obj-preview{color:var(--primary);font-weight:600}li.playing a.obj-preview .artist-line{color:var(--primary);opacity:.85}.id3-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:16px}.id3-modal.hidden{display:none}.id3-modal-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;border:none;padding:0;margin:0;background:#00000073;cursor:pointer}.id3-modal-card{position:relative;z-index:1;width:100%;max-width:520px;max-height:min(85dvh,720px);background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);border:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden}.id3-modal-header{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border);flex-shrink:0}.id3-modal-title{flex:1;font-size:1.1rem;font-weight:700;margin:0}.id3-modal-close{flex-shrink:0;background:none;border:none;font-size:1.5rem;line-height:1;color:var(--text-muted);cursor:pointer;padding:4px 8px;border-radius:6px}.id3-modal-close:hover{color:var(--text);background:var(--bg)}.id3-modal-body{padding:12px 16px 16px;overflow-y:auto;font-size:.88rem}.id3-modal-body .id3-empty{color:var(--text-muted);text-align:center;padding:24px 8px}#download-url-modal .id3-modal-body form .error-msg{margin:8px 0 0}#download-url-modal .download-url-success{margin-top:8px;padding:12px 14px;font-size:.88rem;border-radius:8px;border:1px solid var(--border);background:var(--bg);color:var(--primary)}#download-url-modal .download-url-success.hidden{display:none}.id3-dl{display:grid;grid-template-columns:minmax(0,38%) 1fr;gap:8px 12px;margin:0}.id3-dl dt{margin:0;font-weight:600;color:var(--text-muted);word-break:break-word}.id3-dl dd{margin:0;word-break:break-word;white-space:pre-wrap}
