:root{color-scheme:dark;font-family:Segoe UI,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;background:#0f141b;color:#e6edf3;text-rendering:optimizeLegibility}*{box-sizing:border-box}html,body,#root{width:100%;min-height:100%;margin:0}html,body{overflow-x:hidden}body{background:linear-gradient(180deg,rgba(88,166,255,.07),transparent 34rem),#0f141b}button,input,select,textarea{font:inherit}button,.secondaryButton{min-height:40px;border:1px solid #314258;border-radius:8px;padding:8px 12px;background:#1b2735;color:#e6edf3;text-decoration:none;cursor:pointer}button:hover,.secondaryButton:hover{background:#24364a;border-color:#3d5a78}button:disabled{cursor:not-allowed;opacity:.55}input,select,textarea{width:100%;border:1px solid #34465a;border-radius:8px;padding:9px 10px;background:#0d1620;color:#e6edf3}input:focus,select:focus,textarea:focus{border-color:#58a6ff;outline:none}label{display:grid;gap:6px;color:#b9c6d3;font-size:.88rem}.appShell{display:grid;width:100%;max-width:100vw;overflow:hidden;grid-template-columns:minmax(190px,280px) minmax(0,1fr) minmax(250px,330px);grid-template-rows:minmax(0,1fr) auto;gap:14px;height:100vh;min-height:0;padding:14px}.sidePanel,.workspace,.toolbarCard,.searchBar{border:1px solid #2a394a;background:#101820;box-shadow:0 16px 48px #0000002e}.mobileNav{display:none}.sidePanel{display:flex;min-width:0;min-height:0;flex-direction:column;gap:10px;border-radius:12px;padding:12px}.appShell>.cloudPanel{display:none}.workspace{display:flex;min-width:0;min-height:0;flex-direction:column;gap:12px;border-radius:14px;padding:14px}.panelHeader{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:10px}.panelHeaderActions{display:flex;gap:8px}.panelHeader h2{min-width:0;overflow:hidden;margin:0;color:#f0f6fc;font-size:1rem;text-overflow:ellipsis;white-space:nowrap}.panelHeader button{min-height:36px;white-space:nowrap}.toolbarCard{display:grid;min-width:0;grid-template-columns:minmax(110px,150px) minmax(0,1fr) auto auto;gap:10px;align-items:end;border-radius:12px;padding:12px}.titleField{min-width:0}.primaryButton{background:#2f81f7;border-color:#2f81f7;color:#fff;font-weight:700}.primaryButton:hover{background:#4493f8;border-color:#4493f8}.dangerButton{border-color:#6b2d3b;background:#321923;color:#ffccd5}.dangerButton:hover{background:#4a2030;border-color:#a33a50}.segmented{display:inline-flex;overflow:hidden;border:1px solid #314258;border-radius:9px;background:#0d1620}.segmented button{min-height:40px;border:none;border-radius:0;background:transparent}.segmented button.active{background:#17324f;color:#fff}.searchBar{display:grid;min-width:0;grid-template-columns:auto auto minmax(0,1fr) auto auto minmax(42px,auto);gap:8px;align-items:center;border-radius:12px;padding:10px}.mainEditor,.reader{width:100%;max-width:100%;min-width:0;min-height:0;flex:1;border:1px solid #40546b;border-radius:14px;background:#0b121a;color:#f0f6fc;font-family:Georgia,Cambria,Times New Roman,serif;font-size:1.18rem;line-height:1.65}.mainEditor{resize:none;padding:20px}.reader{overflow-wrap:anywhere;overflow:auto;padding:22px;white-space:pre-wrap;word-break:break-word}.textSegment.dictionary{border-radius:4px;color:#f8fbff;cursor:pointer;padding:1px 2px}.textSegment.tappableWord{border-radius:4px;cursor:pointer}.textSegment.tappableWord:active{background:#58a6ff38}.textSegment.search{border-radius:4px;background:#c8a951;color:#07111d}.textSegment.current-search{border-radius:4px;background:#f8f2a6;color:#07111d;outline:2px solid #fff7c2}.placeholderText,.muted{color:#8b9aaa}.emptyState{display:grid;min-height:120px;place-items:center;padding:18px;color:#8b9aaa;text-align:center}.listBox,.dictionaryList{min-height:0;overflow:auto;border:1px solid #263241;border-radius:10px;background:#0d1620}.listItem,.dictionaryRow{display:grid;width:100%;min-height:42px;grid-template-columns:auto 1fr;gap:8px;align-items:center;border:none;border-bottom:1px solid #1d2a38;border-radius:0;background:transparent;text-align:left}.listItem span{color:#91a4b8}.listItem.active,.dictionaryRow.active{background:#2f81f7;color:#fff}.dictionaryRow{grid-template-columns:minmax(0,1fr) auto}.dictionaryRow span{overflow:hidden;text-overflow:ellipsis}.knowledgeGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.knowledgeGrid button{min-height:34px;border:2px solid transparent;color:#07111d;font-size:.78rem;font-weight:800}.knowledgeGrid button.active{border-color:#f0f6fc}.notesPreview{min-height:110px;resize:vertical}.dictionaryActions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.dictionaryActions .dangerButton{grid-column:span 2}.cloudCard{display:grid;gap:8px;border:1px solid #314258;border-radius:12px;background:#0d1620;padding:10px}.cloudCard h3{margin:0 0 4px;color:#f0f6fc;font-size:.95rem}.cloudCard p{margin:0;color:#8b9aaa;font-size:.82rem;line-height:1.35}.cloudStatus{border:1px solid #263241;border-radius:8px;background:#58a6ff14;padding:8px 10px;color:#c8d3df!important}.cloudTokenField{font-size:.82rem}.cloudTokenField input{min-height:38px}.statusBar{grid-column:1 / -1;border-top:1px solid #263241;color:#9fb0c1;padding:4px 2px 0;font-size:.86rem}.modalBackdrop{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:18px;background:#04080db8;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.modal{display:grid;width:min(640px,100%);max-height:min(760px,92vh);gap:12px;overflow:auto;border:1px solid #3b526d;border-radius:16px;background:#101820;padding:18px;box-shadow:0 24px 80px #00000073}.modalHeader{display:flex;align-items:start;justify-content:space-between;gap:12px}.modal h2{margin:0;color:#fff;font-size:1.25rem}.eyebrow{margin:0 0 4px;color:#8b9aaa;font-size:.78rem;text-transform:uppercase}.iconButton{width:40px;min-height:40px;padding:0;border-radius:50%;font-size:1.4rem}.notesField textarea{min-height:180px;resize:vertical}.modalMeta,.modalActions{display:flex;align-items:center;justify-content:space-between;gap:10px}.modalMeta{color:#8b9aaa;font-size:.86rem}.modalActions{flex-wrap:wrap;justify-content:flex-end}.confirmModal{max-width:440px}.confirmCopy{margin:0;color:#c8d3df;line-height:1.5}@media(max-width:1120px){.appShell{grid-template-columns:minmax(200px,260px) minmax(0,1fr)}.dictionaryPanel{grid-column:1 / -1;max-height:45vh}}@media(max-width:760px){html,body,#root{min-height:100dvh}body{overflow:auto;overscroll-behavior-y:contain}.appShell{display:block;min-height:100dvh;padding:10px 10px calc(92px + env(safe-area-inset-bottom))}.appShell>.sidePanel,.appShell>.workspace{display:none}.appShell>.mobileActive{display:flex}.textsPanel .cloudCard{display:none}.sidePanel,.workspace{height:calc(100dvh - 112px - env(safe-area-inset-bottom));min-height:0;overflow:auto;overscroll-behavior:contain;border-radius:18px;padding:12px;scroll-padding-bottom:120px}.toolbarCard{grid-template-columns:1fr 1fr;gap:9px;padding:10px}.toolbarCard .titleField{grid-column:1 / -1}.toolbarCard>.primaryButton{width:100%}.segmented{width:100%}.segmented button{flex:1}.searchBar{grid-template-columns:1fr 1fr auto;gap:8px;padding:9px}.searchBar input{grid-column:1 / -1;order:-1}.searchBar .muted{justify-self:center;min-width:42px;text-align:center}.workspace{gap:10px;overflow:hidden}.appShell.keyboardFocus{padding-bottom:10px}.appShell.keyboardFocus .workspace{height:calc(100dvh - 20px)}.appShell.keyboardFocus .mobileNav,.appShell.keyboardFocus .statusBar,.appShell.keyboardFocus .toolbarCard,.appShell.keyboardFocus .searchBar{display:none}.mainEditor,.reader{min-height:0;height:auto;font-size:1.12rem;line-height:1.7}.reader{padding:18px}.mainEditor{padding:16px;flex:1;min-height:42dvh;scroll-margin-bottom:180px}.panelHeader{align-items:stretch;flex-direction:column}.panelHeaderActions{display:grid;grid-template-columns:1fr 1fr}.listBox,.dictionaryList{flex:1}.textsPanel .listBox{min-height:40dvh}.listItem,.dictionaryRow{min-height:48px}.appShell>.dictionaryPanel.mobileActive{display:flex;height:calc(100svh - 112px - env(safe-area-inset-bottom));max-height:none!important;min-height:620px;flex-direction:column;gap:9px;overflow-y:auto!important}.dictionaryPanel .panelHeader{display:grid;grid-template-columns:1fr;gap:8px}.dictionaryPanel .panelHeader button{width:100%;white-space:normal}.dictionaryPanel>select,.dictionaryPanel>input{flex:0 0 auto;height:46px;min-height:46px;padding:0 12px;font-size:.96rem;line-height:46px}.dictionaryPanel .dictionaryList{flex:1 1 auto;min-height:220px;overflow:auto}.knowledgeGrid{display:flex;flex:0 0 auto;gap:7px;overflow-x:auto;min-height:44px;padding:1px 0 3px;scrollbar-width:none}.knowledgeGrid::-webkit-scrollbar{display:none}.knowledgeGrid button{min-width:116px;min-height:40px;padding:7px 10px;font-size:.74rem;white-space:nowrap}.notesPreview{flex:0 0 auto;min-height:68px;max-height:12dvh;resize:none;padding:8px 10px}.dictionaryActions{flex:0 0 auto;grid-template-columns:1fr 1fr;gap:7px}.dictionaryActions .dangerButton{grid-column:span 2}.cloudCard{grid-template-columns:1fr}.cloudCardStandalone{margin-top:2px}.cloudCardStandalone button{min-height:48px}.statusBar{position:fixed;right:10px;bottom:calc(64px + env(safe-area-inset-bottom));left:10px;z-index:12;overflow:hidden;border:1px solid #263241;border-radius:12px;background:#111821f5;padding:8px 10px;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.mobileNav{position:fixed;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));left:10px;z-index:13;display:grid;grid-template-columns:repeat(4,1fr);gap:6px;border:1px solid #314258;border-radius:18px;background:#0d1620f5;padding:7px;box-shadow:0 18px 54px #0000006b;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.mobileNav button{min-height:44px;border:none;border-radius:13px;background:transparent;color:#9fb0c1;padding:7px 6px;font-size:.82rem;font-weight:700}.mobileNav button.active{background:#2f81f7;color:#fff}.modalBackdrop{align-items:end;padding:0}.modal{width:100%;max-height:88svh;border-right:none;border-bottom:none;border-left:none;border-radius:22px 22px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom))}.confirmModal{max-width:none}.modalActions{display:grid;grid-template-columns:1fr}}
