*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--bg: #f5f0eb;--surface: #fff;--card-bg: #fff;--card-shadow: 0 4px 24px rgba(0,0,0,.12);--accent: #4f6ef7;--accent-hover: #3a57d4;--got-it: #22c55e;--forgot: #ef4444;--text: #1a1a2e;--muted: #6b7280;--border: #e5e7eb;--sidebar-bg: #fff;--radius: 16px;--toggle-active-bg: #e5e7eb;--toggle-active-text: var(--text)}html.dark{--bg: #111827;--surface: #1f2937;--card-bg: #1f2937;--card-shadow: 0 4px 24px rgba(0,0,0,.5);--text: #f3f4f6;--muted: #9ca3af;--border: #374151;--sidebar-bg: #1f2937;--toggle-active-bg: var(--accent);--toggle-active-text: #fff}html.dark kbd{background:#374151;border-color:#4b5563;color:var(--text)}html.dark .card__back-tertiary{color:var(--muted)}html.dark .stat--new{background:#374151;color:#9ca3af}html.dark #vocab-table tbody tr:hover{filter:brightness(1.1)}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--bg);color:var(--text);min-height:100vh;display:flex;flex-direction:column}header{padding:1rem 2rem;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);background:var(--surface)}header h1{font-size:1.15rem;font-weight:700;letter-spacing:-.02em;display:flex;flex-direction:column;gap:.1rem}#header-subtitle{font-size:.7rem;font-weight:400;color:var(--muted);letter-spacing:.01em}#author-link{color:inherit;text-decoration:underline;text-underline-offset:2px}#author-link:hover{opacity:.7}#progress-bar-wrap{flex:1;max-width:300px;margin:0 2rem}#progress-text{font-size:.75rem;color:var(--muted);margin-bottom:4px}#progress-bar{height:6px;background:var(--border);border-radius:999px;overflow:hidden}#progress-fill{height:100%;background:var(--accent);border-radius:999px;transition:width .4s ease;width:0%}#settings-btn{background:none;border:1px solid var(--border);border-radius:8px;padding:.4rem .8rem;cursor:pointer;font-size:.85rem;color:var(--muted);transition:border-color .2s,color .2s}#settings-btn:hover{border-color:var(--accent);color:var(--accent)}#menu-btn{background:none;border:1px solid var(--border);border-radius:8px;padding:.35rem .65rem .5rem;font-size:1.25rem;line-height:1;cursor:pointer;color:var(--muted);transition:border-color .2s,color .2s;display:flex;align-items:center;justify-content:center}#menu-btn:hover{border-color:var(--accent);color:var(--accent)}#menu-backdrop{display:none;position:fixed;top:0;right:0;bottom:0;left:0;background:#00000059;z-index:300}#menu-backdrop.open{display:block}#menu-sidebar{position:fixed;top:0;right:0;width:300px;height:100vh;background:var(--surface);box-shadow:-4px 0 24px #0000001f;z-index:301;display:flex;flex-direction:column;transform:translate(100%)}#menu-sidebar.loaded{transition:transform .28s cubic-bezier(.4,0,.2,1)}#menu-sidebar.open{transform:translate(0)}#menu-sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:1.1rem 1.25rem;border-bottom:1px solid var(--border);font-weight:600;font-size:.95rem}#menu-sidebar-close{background:none;border:none;font-size:1rem;cursor:pointer;color:var(--muted);padding:.25rem .4rem;border-radius:6px;transition:background .15s}#menu-sidebar-close:hover{background:var(--bg)}#menu-nav{flex:1;display:flex;flex-direction:column;padding:.5rem 0;overflow-y:auto}#menu-nav a,#menu-nav button{display:flex;align-items:center;gap:.75rem;width:100%;padding:.9rem 1.25rem;font-size:.95rem;text-align:left;background:none;border:none;cursor:pointer;color:var(--text);text-decoration:none;transition:background .15s}#menu-nav a:hover,#menu-nav button:hover{background:var(--bg)}.menu-divider{height:1px;background:var(--border);margin:.4rem 0}#menu-class-wrap{padding:.15rem 1.25rem .6rem}#menu-class-select{width:100%;padding:.5rem .75rem;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font-size:.875rem;font-family:inherit;cursor:pointer}#menu-nav .menu-big-btn{margin:.75rem 1.25rem .25rem;width:auto;padding:.75rem 1rem;background:var(--toggle-active-bg);color:var(--toggle-active-text);border:none;border-radius:10px;font-size:.95rem;font-weight:600;cursor:pointer;text-align:center;justify-content:center;transition:background .15s}#menu-nav .menu-big-btn:hover{filter:brightness(.92)}.script-toggle{display:flex;margin:.25rem 1.25rem .5rem;border:1px solid var(--border);border-radius:8px;overflow:hidden;flex-shrink:0}#menu-nav .script-opt{flex:1;display:block;width:auto;padding:.5rem .25rem;text-align:center;font-size:.82rem;gap:0;border:none;background:none;cursor:pointer;color:var(--muted);font-family:inherit;transition:background .15s,color .15s}#menu-nav .script-opt+.script-opt{border-left:1px solid var(--border)}#menu-nav .script-opt.active{background:var(--toggle-active-bg);color:var(--toggle-active-text)}#menu-nav .script-opt:not(.active):hover{background:var(--bg);color:var(--text)}.menu-danger{color:var(--forgot)!important}#menu-about{padding:.75rem 1.25rem;font-size:.65rem;color:var(--muted);line-height:1.5;opacity:.7;text-align:left}#menu-custom-sheet{display:flex;flex-direction:column;gap:.5rem;padding:1.75rem 1.25rem .6rem}#menu-custom-sheet label{font-size:.78rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}#menu-nav #menu-sheet-help{display:inline;width:auto;padding:0;font-size:.7rem;color:var(--muted);text-decoration:underline;background:none}#menu-nav #menu-sheet-help:hover{background:none}#menu-sheet-input{width:100%;padding:.5rem .75rem;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font-size:.8rem;font-family:inherit;box-sizing:border-box}#menu-sheet-input:focus{outline:none;border-color:var(--accent)}#menu-custom-sheet .menu-big-btn{margin:0;width:100%;justify-content:center}#menu-sheet-error{font-size:.78rem;color:var(--forgot);margin:0;min-height:1em}#sheet-help-overlay{display:none;position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;z-index:400;align-items:center;justify-content:center;padding:1.5rem;box-sizing:border-box}#sheet-help-overlay.open{display:flex}#sheet-help-dialog{background:var(--surface);border-radius:14px;width:100%;max-width:480px;max-height:80vh;display:flex;flex-direction:column;box-shadow:0 8px 40px #0000002e;overflow:hidden}#sheet-help-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;border-bottom:1px solid var(--border);flex-shrink:0}#sheet-help-header h2{font-size:1rem;font-weight:700}#sheet-help-close{background:none;border:1px solid var(--border);border-radius:8px;padding:.25rem .6rem;font-size:.85rem;cursor:pointer;color:var(--muted)}#sheet-help-body{padding:1.25rem;overflow-y:auto;font-size:.875rem;line-height:1.6}#sheet-help-body p{margin:.75rem 0 .4rem}#sheet-help-body p:first-child{margin-top:0}#sheet-help-body ul,#sheet-help-body ol{margin:0;padding-left:1.4rem}#sheet-help-body li{margin-bottom:.3rem}#sheet-help-body code{background:var(--bg);border:1px solid var(--border);border-radius:4px;padding:.1rem .35rem;font-size:.8rem;font-family:monospace}main{flex:1;position:relative;padding:2rem;max-width:1200px;margin:0 auto;width:100%}#card-area{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:calc(100vh - 200px)}#deck-info{font-size:.8rem;color:var(--muted);margin-bottom:1rem}.scene{width:100%;max-width:520px;height:340px;perspective:1200px;cursor:pointer}.card{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .5s cubic-bezier(.4,0,.2,1)}.card.flipped{transform:rotateY(180deg)}.card__face{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:var(--radius);background:var(--card-bg);box-shadow:var(--card-shadow);backface-visibility:hidden;-webkit-backface-visibility:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;text-align:center}.card__face--back{transform:rotateY(180deg)}.card__hint{position:absolute;top:1rem;font-size:.7rem;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.card__content{display:flex;flex-direction:column;align-items:center;width:100%;text-align:center}.card__front-primary{font-size:2.4rem;font-weight:700;letter-spacing:-.03em;margin-bottom:.5rem}.card__front-secondary{font-size:1rem;color:var(--muted);font-style:italic}.card__front-tertiary{font-size:.85rem;color:var(--muted);margin-top:.25rem}.remove-btn{position:absolute;top:.75rem;left:.85rem;background:none;border:none;font-size:1.1rem;cursor:pointer;line-height:1;color:#d1d5db;transition:color .15s,transform .15s;padding:.2rem}.remove-btn:hover{color:#ef4444;transform:scale(1.2)}.star-btn{position:absolute;top:.75rem;right:.85rem;background:none;border:none;font-size:1.4rem;cursor:pointer;line-height:1;color:#d1d5db;transition:color .15s,transform .15s;padding:.2rem}.star-btn:hover{color:#f59e0b;transform:scale(1.2)}.star-btn.starred{color:#f59e0b}.card__front-bottom-left{position:absolute;bottom:1rem;left:1rem;font-size:.75rem;color:var(--muted)}.card__stat{position:absolute;bottom:1rem;right:1rem;font-size:.7rem;font-weight:600;padding:.25rem .6rem;border-radius:999px;letter-spacing:.03em}.stat--new{background:#f3f4f6;color:#9ca3af}.stat--red{background:#fee2e2;color:#dc2626}.stat--orange{background:#ffedd5;color:#ea580c}.stat--yellow{background:#fef9c3;color:#ca8a04}.stat--green{background:#dcfce7;color:#16a34a}.card__back-primary{font-size:2.8rem;font-weight:700;margin-bottom:.2rem}.card__back-secondary{font-size:1.1rem;color:var(--muted);margin-bottom:.3rem}.card__back-tertiary{font-size:.9rem;color:#444;font-style:italic;max-width:90%}#action-btns{display:none;gap:1rem;margin-top:1.5rem}#action-btns.visible{display:flex}.btn-action{padding:.65rem 2rem;border:none;border-radius:999px;font-size:.95rem;font-weight:600;cursor:pointer;transition:transform .15s,opacity .15s}.btn-action:hover{transform:translateY(-2px);opacity:.9}.btn-action:active{transform:translateY(0)}#btn-got{background:var(--got-it);color:#fff}#btn-forgot{background:var(--forgot);color:#fff}#sidebar{position:absolute;top:2rem;right:2rem;width:260px;display:flex;flex-direction:column}#sidebar h2{font-size:.85rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:.75rem}#done-list{overflow-y:auto;display:flex;flex-direction:column;gap:.5rem;max-height:calc(100vh - 200px);padding-right:4px}.done-item{background:var(--sidebar-bg);border-radius:10px;padding:.65rem .85rem;box-shadow:0 1px 4px #00000012;display:flex;align-items:center;gap:.6rem;font-size:.85rem}.done-item__status{width:8px;height:8px;border-radius:50%;flex-shrink:0}.done-item__status.got{background:var(--got-it)}.done-item__status.forgot{background:var(--forgot)}.done-item__primary{font-weight:600}.done-item__back{margin-left:auto;text-align:right}.done-item__back-primary{display:block;color:var(--muted);font-size:.82rem}.done-item__back-secondary{display:block;color:var(--muted);font-size:.75rem;opacity:.7}#loading,#empty{text-align:center;color:var(--muted);font-size:1rem;padding:3rem 0}#loading{display:flex;flex-direction:column;align-items:center;gap:1rem}.spinner{width:36px;height:36px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.btn-primary{padding:.55rem 1.4rem;background:var(--accent);color:#fff;border:none;border-radius:8px;font-weight:600;cursor:pointer;font-size:.9rem}.btn-primary:hover{background:var(--accent-hover)}@media (pointer: coarse){#shortcuts{display:none}}#shortcuts{display:flex;justify-content:center;gap:2rem;padding:.85rem 2rem;border-top:1px solid var(--border);background:var(--surface);font-size:.78rem;color:var(--muted)}kbd{display:inline-block;padding:.15rem .45rem;border:1px solid #d1d5db;border-bottom-width:2px;border-radius:5px;background:#f9fafb;font-family:inherit;font-size:.75rem;color:var(--text);margin-right:.3rem}#complete-screen{display:none;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:1rem;padding:3rem}#complete-screen.visible{display:flex}#complete-screen h2{font-size:2rem}#complete-screen p{color:var(--muted)}#vocab-overlay{display:none;position:fixed;top:0;right:0;bottom:0;left:0;background:var(--bg);z-index:200;flex-direction:column}#vocab-overlay.open{display:flex}#vocab-modal{display:flex;flex-direction:column;height:100%}#vocab-modal-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-bottom:1px solid var(--border);background:var(--surface);flex-shrink:0}#vocab-modal-header h2{font-size:1.1rem;font-weight:700}#vocab-count{font-size:.85rem;font-weight:400;color:var(--muted);margin-left:.4rem}#vocab-close{background:none;border:1px solid var(--border);border-radius:8px;font-size:.85rem;cursor:pointer;color:var(--muted);padding:.35rem .75rem;transition:border-color .15s,color .15s}#vocab-close:hover{border-color:var(--accent);color:var(--accent)}#vocab-table-wrap{overflow-y:auto;flex:1;padding:1.5rem}#vocab-table{width:100%;border-collapse:collapse;font-size:.875rem;background:var(--surface);border-radius:var(--radius);overflow:hidden;box-shadow:0 1px 6px #0000000f}#vocab-table thead{position:sticky;top:-1.5rem;background:var(--surface);z-index:1}#vocab-table th{padding:.75rem 1rem;text-align:left;font-size:.72rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);border-bottom:2px solid var(--border);cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none}#vocab-table th:hover{color:var(--text)}#vocab-table th.th-active{color:var(--accent)}.sort-arrow{margin-left:.2rem;opacity:.5}th.th-active .sort-arrow{opacity:1}#vocab-table td{padding:.65rem 1rem;border-bottom:1px solid var(--border);vertical-align:middle}#vocab-table tbody tr:last-child td{border-bottom:none}#vocab-table tbody tr:hover{filter:brightness(.97)}.cell-muted{color:var(--muted);font-size:.82rem}.cell-removed{text-decoration:line-through;opacity:.5}.cell-star{font-size:1rem;text-align:center;cursor:pointer;-webkit-user-select:none;user-select:none}.cell-star:hover{opacity:.7}.cell-remove{font-size:.9rem;text-align:center;cursor:pointer;color:var(--muted);-webkit-user-select:none;user-select:none}.cell-remove:hover{color:var(--forgot)}.pct-badge{display:inline-block;padding:.2rem .6rem;border-radius:999px;font-size:.75rem;font-weight:700;color:#fff}.pct-badge-new{background:#e5e7eb;color:#6b7280;padding:.2rem .6rem;border-radius:999px;font-size:.75rem;font-weight:600}tr.row-removed{opacity:.5}@media (max-width: 1120px){main{padding:1rem}#card-area{min-height:unset;padding-bottom:1rem}#sidebar{position:static;width:100%;margin-top:1rem}#done-list{max-height:200px}.scene{height:280px}.card__front-primary{font-size:1.8rem}.card__back-primary{font-size:2rem}}
