:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;color-scheme:light dark;--border: #ffd6a5;--muted: #7c6f64;--text: #3f2f29;--accent: #f97316;--accent-strong: #ea580c;--surface: #fffbf5;--surface-strong: #ffffff;--mint: #0f766e;--pink: #fb7185;--shadow: 0 10px 28px rgba(124, 45, 18, .1)}*{box-sizing:border-box}body{margin:0;color:var(--text);background:linear-gradient(90deg,rgba(251,113,133,.1) 1px,transparent 1px),linear-gradient(rgba(45,212,191,.11) 1px,transparent 1px),linear-gradient(135deg,#fff7ed,#ecfeff 48%,#fff1f2);background-size:28px 28px,28px 28px,auto}body[data-theme=white]{--border: #e5e7eb;--muted: #64748b;--text: #111827;--accent: #2563eb;--accent-strong: #1d4ed8;background:#f8fafc}body[data-theme=black]{--border: #334155;--muted: #94a3b8;--text: #e2e8f0;--accent: #38bdf8;--accent-strong: #0ea5e9;background:#020617}body[data-theme=mint]{background:linear-gradient(135deg,#ecfdf5,#ccfbf1 55%,#f0fdfa)}body[data-theme=rose]{background:linear-gradient(135deg,#fff1f2,#ffe4e6,#fff7ed)}body[data-theme=sky]{background:linear-gradient(135deg,#eff6ff,#e0f2fe 52%,#f0f9ff)}body[data-theme=grid]{background:linear-gradient(90deg,rgba(100,116,139,.16) 1px,transparent 1px),linear-gradient(rgba(100,116,139,.16) 1px,transparent 1px),#f8fafc;background-size:24px 24px,24px 24px,auto}#app{max-width:1600px;margin:0 auto;min-height:100vh;padding:28px 48px;padding-bottom:calc(16px + var(--keyboard-height, 0px));padding-top:calc(16px + env(safe-area-inset-top,0px))}.app-loading,.app-error{width:min(620px,100%);margin:12vh auto 0;padding:24px;border:1px solid rgba(249,115,22,.2);border-radius:8px;background:#ffffffe6;box-shadow:var(--shadow);color:#7c2d12}.app-loading{text-align:center;font-size:18px;font-weight:800}.app-error{display:grid;gap:12px}.app-error h1{margin:0;color:#111827;font-size:24px}.app-error p{margin:0;color:#4b5563;line-height:1.55}.home-hero{position:relative;display:grid;grid-template-columns:minmax(420px,1fr) minmax(260px,.75fr) auto;gap:22px;align-items:center;min-height:300px;margin-bottom:28px;padding:30px 42px;border:1px solid rgba(15,23,42,.07);border-radius:18px;background:linear-gradient(90deg,#fffffff0,#ffffffdb 38%,#ffffff61),url(/hanzinote-banner.png) center / cover no-repeat;box-shadow:0 16px 42px #7c2d1217;overflow:hidden}.home-hero:after{content:none}.home-hero-copy,.home-auth-actions,.home-hero-art{position:relative;z-index:1}.home-logo{width:260px;height:74px;object-fit:cover;object-position:50% 50%;display:block;margin:0 0 34px -10px;mix-blend-mode:multiply}.home-hero h1{margin:0;max-width:820px;color:#111827;font-size:42px;line-height:1.16;font-weight:850;letter-spacing:0}.home-hero h1 span{color:#ff3d24}.home-hero.is-signed-in h1{font-size:38px}.home-hero.is-signed-in p{max-width:720px}.home-profile-hero{display:flex;align-items:center;gap:22px;min-width:0}.home-profile-hero-avatar{display:grid;place-items:center;flex:0 0 auto;width:112px;height:112px;border:3px solid rgba(255,255,255,.86);border-radius:16px;background:linear-gradient(135deg,#ffedd5,#ecfeff) center / cover no-repeat;color:#c2410c;cursor:pointer;font-size:34px;font-weight:850;box-shadow:0 14px 30px #0f172a1f}.home-profile-hero-avatar:hover{transform:translateY(-1px)}.home-profile-hero-avatar:focus-visible{outline:3px solid rgba(249,115,22,.28);outline-offset:3px}.home-profile-hero-copy{min-width:0}.home-hero p{max-width:620px;margin:14px 0 0;color:#4b5563;font-size:17px;line-height:1.6}.home-hero-art{min-height:190px}.hero-sun,.hero-pagoda{display:none}.home-auth-actions{display:flex;align-items:center;justify-content:flex-end;gap:14px}.home-hero.is-signed-in .home-auth-actions{position:absolute;top:18px;right:18px;z-index:2;gap:8px}.home-login,.home-register,.home-profile-button{min-width:112px;min-height:42px;border-radius:10px;padding:0 13px;cursor:pointer;font-size:14px;font-weight:760}.home-login{border:1px solid #ff3d24;background:#ffffffd1;color:#ff3d24}.home-register{border:none;background:linear-gradient(135deg,#ff553d,#ff2f1f);color:#fff;box-shadow:0 10px 24px #ff3d2438}.home-profile-button{display:inline-flex;align-items:center;gap:8px;max-width:190px;border:none;background:linear-gradient(135deg,#ff553d,#ff2f1f);color:#fff;box-shadow:0 10px 24px #ff3d2438}.home-profile-avatar{display:grid;place-items:center;flex:0 0 auto;width:28px;height:28px;border-radius:7px;background:#ffffff3d center / cover no-repeat;color:#fff;font-size:11px;font-weight:850}.home-profile-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.note-list.is-guest .home-hero{min-height:360px;margin-bottom:34px}.note-list.is-guest .home-hero h1{max-width:720px;font-size:48px}.note-list.is-guest .home-hero p{max-width:680px;font-size:18px}.guest-landing{display:grid;gap:30px}.guest-features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.guest-feature{min-height:178px;padding:24px;border:1px solid rgba(15,23,42,.08);border-radius:8px;background:#ffffffe6;box-shadow:0 10px 26px #0f172a12}.guest-feature-icon{display:grid;place-items:center;width:48px;height:48px;margin-bottom:18px;border-radius:8px;background:#ecfeff;color:#0f766e;font-weight:850}.guest-feature h2,.guest-showcase h2{margin:0;color:#111827;letter-spacing:0}.guest-feature h2{font-size:22px}.guest-feature p,.guest-showcase p{color:#4b5563;line-height:1.62}.guest-feature p{margin:10px 0 0;font-size:15px}.guest-showcase{display:grid;grid-template-columns:minmax(320px,.8fr) minmax(420px,1.2fr);gap:30px;align-items:center;padding:34px;border-radius:8px;background:#ffffffb8;border:1px solid rgba(15,23,42,.08)}.guest-showcase h2{max-width:540px;font-size:34px;line-height:1.18}.guest-showcase p{max-width:560px;margin:14px 0 22px;font-size:17px}.guest-cta{min-height:50px;border:none;border-radius:8px;padding:0 20px;background:linear-gradient(135deg,#ff553d,#ff2f1f);color:#fff;font-size:16px;font-weight:800;cursor:pointer;box-shadow:0 10px 24px #ff3d2438}.note-mockup{position:relative;min-height:350px;padding:44px 40px 28px;border:1px solid rgba(249,115,22,.18);border-radius:8px;background:linear-gradient(90deg,rgba(239,68,68,.18) 0 1px,transparent 1px 100%),repeating-linear-gradient(180deg,transparent 0 36px,rgba(14,165,233,.16) 37px 38px),#fffdf8;background-position:34px 0,0 22px,0 0;background-size:1px 100%,100% 38px,auto;box-shadow:0 18px 42px #0f172a1a;overflow:hidden}.note-mockup-title{position:relative;z-index:1;margin:0 0 32px;color:#7c2d12;font-size:26px;font-weight:850}.note-mockup-body{position:relative;z-index:1;min-height:142px;color:#111827;font-size:32px;line-height:2.05}.note-mockup-body p{margin:0}.note-mockup-body ruby{margin-right:8px;padding:0 1px}.note-mockup-body ruby[data-hsk="1"]{color:#16a34a}.note-mockup-body ruby[data-hsk="2"]{color:#65a30d}.note-mockup-body ruby[data-hsk="3"]{color:#ca8a04}.note-mockup-body ruby[data-hsk="4"]{color:#ea580c}.note-mockup-body ruby[data-hsk="5"]{color:#dc2626}.note-mockup-body ruby[data-hsk="6"]{color:#9333ea}.note-mockup-body rt{font-size:.42em;color:currentColor}.note-mockup-translation{display:block;margin-top:12px;color:#64748b;font-size:17px;line-height:1.5}.note-mockup-tools{position:relative;z-index:1;display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.note-mockup-tools span{border:1px solid rgba(15,23,42,.08);border-radius:999px;padding:7px 13px;background:#f8fafc;color:#374151;font-size:14px;font-weight:700}.note-mockup-patterns,.note-pattern{position:absolute;pointer-events:none}.note-mockup-patterns{inset:0}.note-pattern{opacity:.72}.note-pattern-arc{top:28px;right:34px;width:92px;height:54px;border-top:3px solid #fb7185;border-radius:50%;transform:rotate(-12deg)}.note-pattern-spark{top:92px;right:72px;width:44px;height:44px}.note-pattern-spark:before,.note-pattern-spark:after{content:"";position:absolute;left:21px;top:4px;width:3px;height:34px;border-radius:999px;background:#f59e0b}.note-pattern-spark:after{transform:rotate(90deg)}.note-pattern-circle{right:48px;bottom:70px;width:54px;height:54px;border:3px solid #22c55e;border-radius:45% 55% 48% 52%;transform:rotate(16deg)}.note-pattern-underline{left:118px;bottom:110px;width:210px;height:18px;border-bottom:4px solid #38bdf8;border-radius:50%;transform:rotate(-2deg)}.note-pattern-leaf{left:48px;top:74px;width:44px;height:26px;border:3px solid #0f766e;border-left:none;border-bottom:none;border-radius:50%;transform:rotate(-26deg)}.note-pattern-leaf:after{content:"";position:absolute;left:16px;top:18px;width:34px;height:3px;border-radius:999px;background:#0f766e;transform:rotate(32deg)}.note-library{display:grid;gap:18px}.library-header{display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center}.library-title-wrap{display:flex;align-items:center;gap:18px}.library-title-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:8px;color:#fff;background:#ff4b32;font-size:22px;box-shadow:0 8px 18px #ff4b323d}.library-header h1{font-size:34px;margin:0;letter-spacing:0;color:#111827}.list-actions{display:flex;align-items:center;gap:14px}.btn-icon{position:relative;border:1px solid rgba(15,23,42,.08);background:#ffffffeb;border-radius:8px;width:52px;height:52px;font-size:21px;cursor:pointer;color:#111827;box-shadow:0 8px 22px #0f172a14;transition:transform .12s ease,border-color .12s ease,background .12s ease}.btn-icon:hover{border-color:var(--accent);background:#fff7ed;transform:translateY(-1px)}.search-wrap{position:relative;width:min(620px,100%)}.search-icon{position:absolute;left:15px;top:50%;transform:translateY(-50%);color:#6b7280;font-size:20px;pointer-events:none}.search-input{width:100%;border:1px solid rgba(15,23,42,.08);border-radius:8px;padding:13px 16px 13px 44px;font-size:16px;background:#fffffff0;color:inherit;box-shadow:0 8px 24px #0f172a0f}.search-input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px #f9731624}.btn-add,.btn-back{border:1px solid rgba(249,115,22,.28);background:#fff7ed;border-radius:8px;padding:10px 16px;font-size:15px;min-height:44px;cursor:pointer;color:var(--accent);font-weight:650;box-shadow:0 5px 14px #7c2d1212;transition:transform .12s ease,border-color .12s ease}.btn-add{min-width:160px;min-height:52px;font-size:18px;background:linear-gradient(135deg,#ff553d,#ff2f1f);border-color:transparent;color:#fff;box-shadow:0 10px 24px #ff3d2438}.btn-add:hover,.btn-back:hover{transform:translateY(-1px);border-color:var(--accent)}.share-permission-badge{border:1px solid rgba(37,99,235,.18);border-radius:999px;padding:6px 10px;background:#dbeafec7;color:#1d4ed8;font-size:13px;font-weight:800}.empty-state{color:var(--muted);text-align:center;padding:44px 18px;background:#ffffffb8;border:1px dashed rgba(249,115,22,.34);border-radius:8px}.note-list ul{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(2,minmax(300px,1fr));gap:26px}.note-card{position:relative;border:1px solid rgba(15,23,42,.07);border-radius:8px;padding:28px 92px 20px 28px;min-height:176px;cursor:pointer;background:#ffffffe6;box-shadow:0 10px 26px #0f172a12;transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease}.note-card:hover{border-color:#ff4b32;transform:translateY(-1px);box-shadow:var(--shadow)}.note-title{font-size:28px;font-weight:850;margin-bottom:14px;color:#111827}.note-preview{color:#374151;font-size:18px;line-height:1.55;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.note-chips{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.note-chips span{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid rgba(15,23,42,.08);border-radius:999px;padding:7px 16px;background:#ffffffb8;color:#374151;font-size:15px}.note-card-menu{position:absolute;top:26px;right:22px;z-index:8}.btn-more{width:36px;height:36px;border:none;border-radius:8px;background:transparent;color:#4b5563;cursor:pointer;font-size:24px}.btn-more:hover{background:#f9fafb}.note-card-menu-panel{position:absolute;top:42px;right:0;width:188px;padding:6px;border:1px solid rgba(15,23,42,.1);border-radius:8px;background:#fffffffa;box-shadow:0 18px 42px #0f172a29;color:#111827}.note-card-menu-panel button{display:block;width:100%;border:none;border-radius:6px;padding:7px 9px;background:transparent;color:#111827;cursor:pointer;font:inherit;font-size:14px;text-align:left}.note-card-menu-panel button:hover{background:#f9fafb}.note-card-menu-panel button.is-danger{color:#dc2626}.note-card-menu-panel button.is-danger:hover{background:#fff1f2}.note-card-menu-section{padding:7px 9px 3px;color:#6b7280;font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.editor-bar{display:flex;align-items:center;gap:10px;margin-bottom:14px;flex-wrap:wrap;background:#ffffffbd;border:1px solid rgba(249,115,22,.2);border-radius:8px;padding:10px;box-shadow:0 7px 18px #7c2d1212}.title-input{flex:1;min-width:180px;border:none;border-bottom:1px solid rgba(249,115,22,.28);font-size:18px;font-weight:600;padding:8px 4px;background:transparent;color:inherit}.title-input:focus{outline:none;border-bottom-color:var(--accent)}#editor{position:relative;min-height:240px;line-height:var(--note-line-height, 2.35);color:var(--note-text-color, inherit);font-family:var(--note-font-family, inherit);max-width:var(--page-width, 794px);margin:0 auto;background:transparent}.page-overlay-root{position:absolute;inset:0;z-index:20;pointer-events:none}#editor.page-portrait{--page-width: 794px;--page-min-height: 1123px}#editor.page-landscape{--page-width: 1123px;--page-min-height: 794px}#editor .ProseMirror{outline:none;font-size:var(--note-font-size, 20px);line-height:var(--note-line-height, 2.35);color:var(--note-text-color, inherit);font-family:var(--note-font-family, inherit);width:100%;display:flex;flex-direction:column;gap:28px;background:#eef2f7}#editor .ProseMirror table{width:100%;margin:14px 0 20px;border-collapse:collapse;table-layout:fixed}#editor .ProseMirror th,#editor .ProseMirror td{position:relative;min-width:88px;border:1px solid rgba(100,116,139,.32);padding:8px 10px;vertical-align:top;background:#ffffffb8}#editor .ProseMirror th{background:#f973161a;color:#7c2d12;font-weight:800}#editor .ProseMirror td>*,#editor .ProseMirror th>*{margin:0}#editor .ProseMirror .selectedCell:after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;background:#38bdf82e}#editor .ProseMirror .column-resize-handle{position:absolute;top:0;right:-2px;bottom:-2px;width:4px;background:var(--accent);pointer-events:none}#editor .ProseMirror.resize-cursor{cursor:col-resize}#editor:not(.page-paper):not(.page-lined):not(.page-grid):not(.page-dot){background:#ffffffb3;border:1px solid rgba(249,115,22,.16);border-radius:8px;padding:20px 22px;box-shadow:0 8px 22px #7c2d1212}#editor.page-paper,#editor.page-lined,#editor.page-grid,#editor.page-dot{width:min(100%,var(--page-width, 794px));min-height:0;aspect-ratio:var(--page-aspect-ratio, 210 / 297);border:none;border-radius:0;background:transparent;padding:0}#editor.page-portrait{--page-aspect-ratio: 210 / 297}#editor.page-landscape{--page-aspect-ratio: 297 / 210}#editor.page-paper{box-shadow:none}#editor .note-page{position:relative;width:100%;min-height:auto;aspect-ratio:var(--page-aspect-ratio, 210 / 297);border:1px solid rgba(249,115,22,.22);border-radius:8px;background:var(--page-bg, #fffef8);padding:48px 56px;box-shadow:0 12px 32px #7c2d121a}.note-page-content{position:relative;z-index:2;min-height:100%}.drawing-layer{position:absolute;z-index:5;pointer-events:none;touch-action:none}#editor.drawing-active .drawing-layer{pointer-events:auto}#editor.drawing-active .note-page{cursor:crosshair}.note-image{position:absolute;z-index:8;border:none;background:transparent;box-shadow:none;cursor:move;user-select:none;pointer-events:auto}.note-image.is-dragging,.note-image.is-selected{outline:2px solid var(--accent)}.note-image img{display:block;width:100%;height:auto;pointer-events:none}.note-image-resize{position:absolute;right:-7px;bottom:-7px;width:14px;height:14px;border:1px solid rgba(249,115,22,.32);border-radius:3px;background:var(--accent);cursor:nwse-resize;opacity:0;pointer-events:none}.note-image:hover .note-image-resize,.note-image.is-selected .note-image-resize,.note-image.is-dragging .note-image-resize{opacity:1;pointer-events:auto}#editor.drawing-active .note-image{pointer-events:none;z-index:4}#editor.page-lined .note-page{background-image:linear-gradient(rgba(100,116,139,.24) 1px,transparent 1px);background-color:var(--page-bg, #fffef8);background-size:100% 34px;background-position:0 32px}#editor.page-grid .note-page{background-image:linear-gradient(90deg,rgba(100,116,139,.2) 1px,transparent 1px),linear-gradient(rgba(100,116,139,.2) 1px,transparent 1px);background-color:var(--page-bg, #fffef8);background-size:28px 28px}#editor.page-dot .note-page{background-image:radial-gradient(rgba(100,116,139,.38) 1.4px,transparent 1.4px);background-color:var(--page-bg, #fffef8);background-size:22px 22px;background-position:11px 11px}.editor-tools{display:flex;align-items:center;gap:5px;flex-wrap:wrap;width:100%;padding-top:8px;border-top:1px solid rgba(249,115,22,.16)}.btn-editor-tool{border:1px solid rgba(249,115,22,.26);background:#fff;color:#9a3412;border-radius:8px;padding:8px 10px;min-height:38px;min-width:38px;font-size:13px;cursor:pointer;font-weight:650}.btn-editor-tool:hover{border-color:var(--accent);background:#fff7ed;color:var(--accent-strong)}.btn-editor-tool.is-active{border-color:var(--accent);background:var(--accent);color:#fff}.table-context-menu{position:fixed;z-index:1000;width:190px;padding:6px;border:1px solid rgba(15,23,42,.1);border-radius:8px;background:#fffffffa;box-shadow:0 18px 42px #0f172a29;color:#111827}.table-context-menu button{display:block;width:100%;border:none;border-radius:6px;padding:8px 9px;background:transparent;color:#111827;cursor:pointer;font:inherit;font-size:14px;text-align:left}.table-context-menu button:hover{background:#f9fafb}.table-context-menu button.is-danger{color:#dc2626}.table-context-menu button.is-danger:hover{background:#fff1f2}.table-context-separator{height:1px;margin:5px 4px;background:#0f172a14}.pdf-render-frame{position:fixed;left:-12000px;top:0;width:1100px;height:1600px;border:0;opacity:0;pointer-events:none}.ink-color{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:38px;min-height:38px;border:1px solid rgba(249,115,22,.26);border-radius:8px;background:#fff;cursor:pointer}.ink-color-swatch{width:18px;height:18px;border:1px solid rgba(15,23,42,.2);border-radius:999px}.ink-color input{position:absolute;inset:0;opacity:0;cursor:pointer}.editor-select{display:inline-flex;align-items:center;gap:4px;min-height:38px;border:1px solid rgba(249,115,22,.22);border-radius:8px;padding:4px 5px 4px 8px;background:#fff;color:#9a3412;font-size:13px;font-weight:650}.editor-select-icon{min-width:18px;text-align:center;font-weight:750;color:#7c2d12}.editor-select select{border:none;background:transparent;color:inherit;font:inherit;outline:none;width:auto;max-width:94px;cursor:pointer}.editor-number input{width:52px;border:none;background:transparent;color:inherit;font:inherit;outline:none}.export-menu{position:relative}.export-trigger{list-style:none;border:1px solid rgba(249,115,22,.26);background:#fff;color:#9a3412;border-radius:8px;padding:8px 10px;min-height:38px;min-width:38px;font-size:13px;cursor:pointer;font-weight:650}.export-trigger:hover{border-color:var(--accent);background:#fff7ed;color:var(--accent-strong)}.export-menu-panel{position:fixed;top:0;left:0;right:auto;z-index:40;min-width:148px;max-width:calc(100vw - 24px);display:grid;gap:4px;padding:6px;border:1px solid rgba(249,115,22,.22);border-radius:8px;background:#fffdf8;box-shadow:0 12px 32px #7c2d1224}.share-menu .export-menu-panel{min-width:172px}.export-menu-panel[hidden]{display:none}.export-menu-panel button{border:none;border-radius:6px;background:transparent;color:inherit;padding:7px 9px;text-align:left;cursor:pointer;font-size:14px}.export-menu-panel button,.note-card-menu-panel button{line-height:1.25}.menu-button-title,.menu-button-subtitle{display:block;white-space:nowrap}.menu-button-title{font-weight:750}.menu-button-subtitle{margin-top:1px;color:#6b7280;font-size:11px;font-weight:500}.export-menu-panel button:hover{background:#fff7ed;color:var(--accent-strong)}.export-menu-panel button:hover .menu-button-subtitle,.note-card-menu-panel button:hover .menu-button-subtitle{color:inherit}.hsk-legend{width:min(100%,calc(var(--page-width, 794px) + 40px));margin:0 auto 10px;display:flex;align-items:center;justify-content:flex-start;gap:clamp(10px,2.4vw,30px);flex-wrap:wrap;padding:10px 14px;border:1px solid rgba(249,115,22,.14);border-radius:10px;background:#ffffffe0;box-shadow:0 6px 16px #7c2d120d}.hsk-legend-item{display:inline-flex;align-items:center;gap:7px;color:#6f5f58;font-size:13px;font-weight:760;white-space:nowrap}.hsk-legend-swatch{width:11px;height:11px;border-radius:3px;box-shadow:0 2px 5px #0f172a1f}.hsk-legend-item[data-hsk="1"] .hsk-legend-swatch{background:#16a34a}.hsk-legend-item[data-hsk="2"] .hsk-legend-swatch{background:#65a30d}.hsk-legend-item[data-hsk="3"] .hsk-legend-swatch{background:#ca8a04}.hsk-legend-item[data-hsk="4"] .hsk-legend-swatch{background:#ea580c}.hsk-legend-item[data-hsk="5"] .hsk-legend-swatch{background:#dc2626}.hsk-legend-item[data-hsk="6"] .hsk-legend-swatch{background:#9333ea}#editor ruby{ruby-position:over;margin:0 1px}#editor ruby rt{font-size:var(--reading-size, .5em);color:var(--reading-color, var(--mint));user-select:none}#editor.hide-reading ruby rt{display:none}.settings-title{font-size:18px;margin:0;color:#7c2d12}.settings-row{display:flex;align-items:center;justify-content:space-between;padding:14px 10px;border-bottom:1px solid rgba(249,115,22,.18);font-size:16px;background:#ffffffb8}.settings-row select{border:1px solid rgba(249,115,22,.28);border-radius:8px;padding:8px 10px;background:#fffdf8;color:inherit;font-size:15px}.settings-row input[type=checkbox]{width:22px;height:22px}.account-view{min-height:calc(100vh - 36px)}.account-panel{width:min(720px,100%);margin:0 auto;display:grid;gap:16px;padding:20px;border:1px solid rgba(249,115,22,.2);border-radius:8px;background:#ffffffe0;box-shadow:0 10px 28px #7c2d1214}.account-status{padding:10px 12px;border:1px solid rgba(15,118,110,.22);border-radius:8px;background:#f0fdfad1;color:var(--mint);font-weight:650}.account-info{padding:12px;border:1px dashed rgba(249,115,22,.28);border-radius:8px;background:#fff7ed;color:var(--muted);line-height:1.5}.google-login{min-height:44px}.account-auth-card{display:grid;gap:8px}.account-auth-card h3{margin:0;color:#111827;font-size:24px;letter-spacing:0}.account-auth-card p{margin:0;color:#4b5563;line-height:1.55}.account-auth-tabs{display:inline-flex;width:fit-content;gap:6px;padding:4px;border:1px solid rgba(249,115,22,.2);border-radius:8px;background:#fff7ed}.account-auth-tabs .account-button{min-height:34px;border-color:transparent;background:transparent;padding:6px 12px}.account-auth-tabs .account-button.is-active{background:#fff;color:#111827;box-shadow:0 5px 14px #7c2d1214}.account-summary{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid rgba(249,115,22,.18);border-radius:8px;background:#fffdf8}.account-summary-avatar,.account-avatar-preview{display:grid;place-items:center;flex:0 0 auto;border-radius:8px;background:#ffedd5 center / cover no-repeat;color:#c2410c;font-weight:850}.account-summary-avatar{width:58px;height:58px;font-size:18px}.account-summary-copy{min-width:0}.account-name{font-size:20px;font-weight:750;color:#7c2d12}.account-email,.account-id{color:var(--muted);overflow-wrap:anywhere}.account-id{font-size:13px}.account-profile{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}.account-avatar-card,.account-field{min-width:0}.account-avatar-card{grid-column:1 / -1;display:flex;align-items:center;gap:16px;padding:14px;border:1px solid rgba(249,115,22,.18);border-radius:8px;background:#fffbf5db}.account-avatar-preview{width:88px;height:88px;font-size:24px}.account-avatar-tools{display:grid;gap:6px;align-content:center}.account-avatar-tools strong{color:#7c2d12;font-size:18px}.account-avatar-tools span{color:var(--muted);line-height:1.45}.account-avatar-file{display:none}.account-field{display:grid;gap:6px;color:#7c2d12;font-weight:650}.account-privacy{grid-column:1 / -1;display:grid;grid-template-columns:auto 1fr;align-items:flex-start;gap:12px;padding:14px;border:1px solid rgba(15,118,110,.18);border-radius:8px;background:#f0fdfab8;color:#0f766e}.account-privacy input{width:22px;height:22px;margin-top:2px}.account-privacy span{display:grid;gap:4px;min-width:0}.account-privacy strong{color:#134e4a;font-size:16px}.account-privacy small{color:#475569;font-size:13px;line-height:1.45}.account-profile input:not([type=checkbox]):not([type=file]),.account-profile textarea{width:100%;border:1px solid rgba(249,115,22,.28);border-radius:8px;padding:10px 12px;background:#fff;color:inherit;font-size:16px;font-family:inherit}.account-profile textarea{resize:vertical;min-height:88px;grid-column:1 / -1}.account-profile input:not([type=checkbox]):not([type=file]):focus,.account-profile textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px #f9731624}.account-privacy input:focus-visible{outline:3px solid rgba(15,118,110,.22);outline-offset:2px}.account-profile .account-button{justify-self:end;grid-column:1 / -1}.account-actions{display:flex;flex-wrap:wrap;gap:8px}.account-button{min-height:42px;border:1px solid rgba(249,115,22,.28);border-radius:8px;background:#fff7ed;color:var(--accent-strong);padding:9px 13px;cursor:pointer;font-size:15px;font-weight:700}.account-button:hover{border-color:var(--accent);background:#ffedd5}.account-button.is-secondary{width:fit-content;min-height:38px;padding:7px 11px}.account-button.is-danger{border-color:#e11d4847;background:#fff1f2;color:#be123c}.account-button.is-danger:hover{border-color:#e11d48;background:#ffe4e6}.account-button.is-dev{border-color:#0f766e47;background:#ecfdf5;color:#0f766e}.account-button.is-dev:hover{border-color:#0f766e;background:#d1fae5}.public-profile{display:grid;gap:22px}.public-profile-hero{display:grid;grid-template-columns:auto 1fr auto;gap:18px;align-items:center;padding:24px;border:1px solid rgba(249,115,22,.18);border-radius:8px;background:linear-gradient(90deg,#fffffff0,#ffffffb8),url(/hanzinote-banner.png) center / cover no-repeat;box-shadow:var(--shadow)}.public-profile-avatar{width:72px;height:72px;border-radius:12px;object-fit:cover;border:2px solid rgba(255,255,255,.9)}.public-profile h1{margin:0;color:#111827;font-size:32px;letter-spacing:0}.public-profile p{max-width:760px;margin:8px 0 0;color:#4b5563;line-height:1.55}.public-note-grid{display:grid;grid-template-columns:repeat(2,minmax(320px,1fr));gap:18px}.public-note-card{padding:16px;border:1px solid rgba(15,23,42,.08);border-radius:8px;background:#ffffffe0;box-shadow:0 10px 26px #0f172a12}.public-note-card h2{margin:0 0 12px;color:#111827;font-size:22px}.public-note-frame{width:100%;min-height:520px;border:1px solid rgba(15,23,42,.08);border-radius:8px;background:#fff}.shared-note-view{display:grid;gap:14px}.shared-note-frame{min-height:calc(100vh - 160px)}.define-popup{position:fixed;bottom:calc(24px + env(safe-area-inset-bottom,0px));left:50%;transform:translate(-50%);width:min(420px,calc(100% - 32px));background:#fffdf8;border:1px solid rgba(249,115,22,.24);border-radius:8px;padding:14px 16px;box-shadow:0 12px 32px #7c2d1224;z-index:50}.define-head{display:flex;align-items:baseline;gap:10px}.define-word{font-size:22px;font-weight:600;color:#7c2d12}.define-reading{color:var(--muted)}.define-speak{margin-left:auto;border:1px solid rgba(249,115,22,.24);border-radius:8px;width:40px;height:40px;font-size:18px;cursor:pointer;background:#fff}.define-defs{margin-top:8px;font-size:15px}.override-popup{position:fixed;bottom:calc(24px + env(safe-area-inset-bottom,0px));left:50%;transform:translate(-50%);display:flex;gap:8px;flex-wrap:wrap;justify-content:center;max-width:calc(100% - 32px);background:#fffdf8;border:1px solid rgba(249,115,22,.24);border-radius:8px;padding:10px 12px;box-shadow:0 12px 32px #7c2d1224;z-index:50}.override-option{border:1px solid rgba(249,115,22,.26);border-radius:8px;padding:8px 14px;font-size:16px;cursor:pointer;background:#fff;color:inherit;min-height:40px}.override-option.is-current{border-color:var(--accent);color:var(--accent);font-weight:600;background:#fff7ed}.override-custom{display:flex;gap:6px;width:100%}.override-custom input{flex:1;min-width:130px;border:1px solid rgba(249,115,22,.26);border-radius:8px;padding:8px 10px;background:#fff;color:inherit;font-size:16px}.override-custom button{border:1px solid var(--accent);border-radius:8px;background:transparent;color:var(--accent);padding:8px 12px;cursor:pointer}.handwriting-modal{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:18px;background:#0f172a47}.handwriting-panel{width:min(420px,100%);display:grid;gap:10px;border:1px solid rgba(249,115,22,.24);border-radius:8px;padding:14px;background:#fffdf8;box-shadow:0 16px 42px #0f172a33}.handwriting-head{display:flex;align-items:center;justify-content:space-between}.handwriting-title{color:#7c2d12;font-size:18px;font-weight:800}.handwriting-close{width:38px;height:38px;border:1px solid rgba(249,115,22,.24);border-radius:8px;background:#fff;color:var(--accent-strong);cursor:pointer;font-size:24px;line-height:1}.handwriting-canvas{width:100%;aspect-ratio:1 / 1;border:1px solid rgba(249,115,22,.28);border-radius:8px;background:linear-gradient(90deg,rgba(100,116,139,.14) 1px,transparent 1px),linear-gradient(rgba(100,116,139,.14) 1px,transparent 1px),#fff;background-size:36px 36px;touch-action:none;cursor:crosshair}.handwriting-status{min-height:22px;color:var(--muted);font-size:14px;line-height:1.45}.handwriting-candidates{display:flex;flex-wrap:wrap;gap:8px;min-height:48px}.handwriting-candidates button{min-width:48px;min-height:48px;border:1px solid rgba(249,115,22,.26);border-radius:8px;background:#fff;color:#7c2d12;cursor:pointer;font-size:24px;font-weight:750}.handwriting-candidates button:hover{border-color:var(--accent);background:#fff7ed}.handwriting-actions{display:flex;gap:8px;justify-content:flex-end}.handwriting-actions button{min-height:40px;border:1px solid rgba(249,115,22,.28);border-radius:8px;background:#fff7ed;color:var(--accent-strong);padding:8px 12px;cursor:pointer;font-weight:700}.handwriting-actions button:hover{border-color:var(--accent);background:#ffedd5}@media (max-width: 900px){#app{padding-left:14px;padding-right:14px}.home-hero{grid-template-columns:1fr;min-height:auto;padding:22px;gap:18px;background:linear-gradient(180deg,#fffffff0,#ffffffb3 58%,#ffffff6b),url(/hanzinote-banner.png) center / cover no-repeat}.home-logo{width:min(220px,100%);height:64px;margin:0 0 20px -8px}.home-hero h1{font-size:28px}.home-profile-hero{align-items:flex-start;gap:14px}.home-profile-hero-avatar{width:72px;height:72px;border-radius:12px;font-size:22px}.home-hero p{font-size:15px}.home-hero-art{min-height:72px}.home-auth-actions{justify-content:stretch;gap:10px}.home-hero.is-signed-in .home-auth-actions{position:static;justify-content:flex-start}.home-login,.home-register,.home-profile-button{flex:1;min-width:0;min-height:44px;font-size:15px}.home-profile-button{max-width:100%;justify-content:center}.note-list.is-guest .home-hero{min-height:auto}.note-list.is-guest .home-hero h1{font-size:30px}.guest-features,.guest-showcase{grid-template-columns:1fr}.guest-feature{min-height:0;padding:20px}.guest-showcase{padding:22px;gap:22px}.guest-showcase h2{font-size:26px}.note-mockup{min-height:260px}.note-mockup-body{font-size:24px}.library-header{grid-template-columns:1fr}.library-header h1{font-size:26px}.library-title-icon{width:36px;height:36px}.list-actions{gap:8px;flex-wrap:wrap;justify-content:stretch}.btn-icon{width:46px;height:46px;font-size:18px}.btn-add{flex:1;min-width:140px;min-height:46px;font-size:17px}.search-wrap{width:100%}.search-input{font-size:16px;padding:13px 14px 13px 42px}.note-list ul{grid-template-columns:1fr;gap:14px}.note-card{min-height:150px;padding:20px 76px 18px 20px}.note-title{font-size:24px}.note-preview{font-size:16px;white-space:normal}.hsk-legend{gap:8px 14px;justify-content:flex-start;padding:9px 10px}.hsk-legend-item{font-size:12px;gap:6px}.hsk-legend-swatch{width:10px;height:10px}#editor .ProseMirror{font-size:18px}#editor.page-paper,#editor.page-lined,#editor.page-grid,#editor.page-dot{padding:20px 18px}.editor-bar{align-items:stretch}.title-input{flex-basis:100%}.editor-tools{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}.editor-select,.btn-editor-tool,.export-menu summary{flex:0 0 auto}.account-panel{padding:14px}.account-profile{grid-template-columns:1fr}.account-avatar-card,.account-summary{align-items:flex-start}.account-avatar-card{flex-direction:column}.account-avatar-preview{width:76px;height:76px}.account-actions,.account-button{width:100%}.account-auth-tabs .account-button{width:auto}.public-profile-hero,.public-note-grid{grid-template-columns:1fr}.public-note-frame{min-height:420px}.handwriting-modal{align-items:end;padding:10px}.handwriting-panel{width:100%}.handwriting-actions{flex-direction:column}.vocab-book-head{align-items:stretch;flex-direction:column}.vocab-list,.vocab-card{grid-template-columns:1fr}.vocab-actions{justify-content:flex-start}}@media (max-width: 360px){.list-actions{width:100%}}.storage-warning{background:#fef3c7;color:#92400e;font-size:14px;line-height:1.4;padding:10px 14px;text-align:center}.define-trad{margin-top:6px;font-size:14px;color:var(--muted)}.define-hsk{display:inline-block;margin-top:8px;padding:2px 8px;border-radius:6px;background:linear-gradient(135deg,var(--mint),var(--accent));color:#fff;font-size:12px;font-weight:600}.define-save{margin-top:10px;width:100%;min-height:40px;padding:9px 14px;border-radius:8px;font-size:15px;font-weight:750}.btn-icon.has-due{border-color:var(--accent);color:var(--accent);font-weight:750}.btn-icon-badge{position:absolute;top:-7px;right:-7px;min-width:20px;height:20px;border-radius:999px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;background:var(--accent);color:#fff;font-size:12px;font-weight:850;line-height:1;box-shadow:0 4px 10px #ea580c47}.flashcard-counter{text-align:center;color:var(--muted);font-size:14px;margin-bottom:12px}.flashcard{border:1px solid rgba(249,115,22,.22);border-radius:8px;padding:32px 20px;text-align:center;min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:#ffffffd6;box-shadow:var(--shadow)}.flashcard-base{position:relative;font-size:56px;line-height:1.2}.flashcard-base .define-speak{position:absolute;top:0;right:-52px}.flashcard-reading{font-size:24px;color:var(--mint)}.flashcard-defs{font-size:16px;margin-top:6px}.vocab-book{display:grid;gap:12px}.vocab-book-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border:1px solid rgba(249,115,22,.18);border-radius:8px;background:#ffffffd1}.vocab-book-summary{color:#7c2d12;font-size:15px;font-weight:800}.vocab-practice{min-width:104px;min-height:36px;padding:8px 12px;font-size:13px}.vocab-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}.vocab-card{display:grid;grid-template-columns:1fr auto;gap:5px 10px;align-items:start;padding:12px;border:1px solid rgba(15,23,42,.08);border-radius:8px;background:#ffffffe6;box-shadow:0 5px 14px #0f172a0b}.vocab-base{color:#111827;font-size:20px;font-weight:850}.vocab-reading{color:var(--mint);font-size:13px;font-weight:700}.vocab-defs{grid-column:1 / -1;color:#4b5563;font-size:13px;line-height:1.42;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.vocab-actions{display:flex;gap:6px;align-items:center}.vocab-actions .define-speak{width:32px;height:32px;font-size:15px}.vocab-actions .account-button{min-height:32px;padding:6px 10px;font-size:12px}.flashcard-grades{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.grade{border:1px solid rgba(249,115,22,.24);border-radius:8px;padding:10px 16px;font-size:15px;min-height:44px;min-width:64px;cursor:pointer;background:#fff;color:inherit}.grade-again{border-color:#ef4444;color:#ef4444}.grade-easy{border-color:#16a34a;color:#16a34a}#editor.highlight-hsk ruby[data-hsk]{border-radius:3px;padding:0 1px;font-weight:650}#editor.highlight-hsk ruby[data-hsk="1"]{color:#16a34a}#editor.highlight-hsk ruby[data-hsk="2"]{color:#65a30d}#editor.highlight-hsk ruby[data-hsk="3"]{color:#ca8a04}#editor.highlight-hsk ruby[data-hsk="4"]{color:#ea580c}#editor.highlight-hsk ruby[data-hsk="5"]{color:#dc2626}#editor.highlight-hsk ruby[data-hsk="6"],#editor.highlight-hsk ruby[data-hsk="7"],#editor.highlight-hsk ruby[data-hsk="8"],#editor.highlight-hsk ruby[data-hsk="9"]{color:#9333ea}.stroke-popup{position:fixed;bottom:calc(24px + env(safe-area-inset-bottom,0px));left:50%;transform:translate(-50%);width:min(480px,calc(100% - 32px));max-height:70vh;overflow-y:auto;background:#fffdf8;border:1px solid rgba(249,115,22,.24);border-radius:8px;padding:12px 16px;box-shadow:0 6px 24px #0000002e;z-index:60}.stroke-head{display:flex;align-items:center;justify-content:space-between;font-weight:600;margin-bottom:10px}.stroke-grid{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}.stroke-cell{display:flex;flex-direction:column;align-items:center;gap:6px}.stroke-target{width:120px;height:120px;border:1px dashed var(--border);border-radius:8px}.stroke-target.stroke-fallback{display:flex;align-items:center;justify-content:center;font-size:72px}.stroke-controls{display:flex;gap:6px}.stroke-note{font-size:12px;color:var(--muted)}.define-examples{margin-top:12px;border-top:1px solid var(--border);padding-top:10px}.define-examples-title{font-size:13px;font-weight:600;color:var(--muted);margin-bottom:8px}.define-example{position:relative;padding:6px 36px 6px 0;border-bottom:1px solid var(--border)}.define-example:last-child{border-bottom:none}.define-example-zh{font-size:16px}.define-example-py{font-size:13px;color:var(--accent)}.define-example-tr{font-size:13px;color:var(--muted)}.define-example-insert{position:absolute;top:50%;right:0;transform:translateY(-50%);width:32px;height:32px}
