:root {
  color-scheme: dark;
  --black: #111111;
  --sidebar-bg: #191919;
  --main-bg: #202020;
  --divider: #2b2b2b;
  --panel: #2b2b2b;
  --panel-2: #242424;
  --line: rgba(242,242,242,.16);
  --line-soft: rgba(242,242,242,.105);
  --text: #f2f2f2;
  --muted: #aaa7a0;
  --muted-2: #817e77;
  --white: #e8e6e1;
  --matte-control: #343434;
  --matte-control-2: #3b3b3b;
  --matte-control-soft: #2f2f2f;
  --icon-muted: #c8c4bb;
  --icon-size-sm: 16px;
  --icon-size-md: 20px;
  --icon-size-lg: 24px;
  --icon-stroke: 1.9;
  --graphic-soft: rgba(232,230,225,.68);
  --graphic-line: rgba(232,230,225,.16);
  --soft-shadow: 0 16px 44px rgba(0,0,0,.22);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--black); color: var(--text); }
body { font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.app { min-height: 100vh; min-height: 100dvh; background: var(--black); }
.interaction-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 120; max-width: min(420px, calc(100vw - 28px)); transform: translate(-50%, 16px); border: 1px solid rgba(232,230,225,.14); border-radius: 18px; background: rgba(26,26,26,.94); color: rgba(242,242,242,.9); padding: 12px 15px; font-size: 14px; line-height: 1.35; box-shadow: 0 18px 50px rgba(0,0,0,.34), inset 0 0 0 1px rgba(255,255,255,.035); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.interaction-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.composer-record.is-recording, .notes-audio-button.is-recording { color: #fff; box-shadow: 0 0 0 1px rgba(232,230,225,.24), 0 0 0 6px rgba(232,230,225,.055); }
.note-card.is-favorite .note-favorite, .note-favorite.is-active { opacity: 1; color: #f2f2f2; background: rgba(232,230,225,.08); }
.screen { display: none; width: 100%; min-height: 100vh; min-height: 100dvh; padding: 0; }
.screen.is-active { display: block; }
.editorial-title { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -0.045em; line-height: 1.04; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.login-screen { min-height: 100vh; display: none; place-items: center; background: radial-gradient(circle at 50% 15%, #252525, #171717 48%, #111111 100%); }
.login-screen.is-active { display: grid; }
.login-card { position: relative; width: min(100vw - 32px, 420px); min-height: min(760px, 100vh - 32px); display: grid; grid-template-rows: 1fr auto; align-items: end; }
.language-switcher { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid rgba(232,230,225,.11); border-radius: 14px; background: rgba(31,31,31,.86); box-shadow: 0 10px 28px rgba(0,0,0,.24); }
.language-option { min-width: 86px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: rgba(232,230,225,.62); font-size: 13px; font-weight: 650; }
.language-option.is-active { background: #efede8; color: #151515; }
.login-hero-mark { align-self: center; justify-self: center; width: min(88%, 350px); min-height: 230px; display: grid; place-items: center; opacity: 1; transform: translateY(18px); }
.login-logo { color: #fff; font-size: clamp(18px, 5.8vw, 22px); font-weight: 780; letter-spacing: .18em; text-transform: uppercase; text-align: center; white-space: nowrap; text-shadow: 0 0 26px rgba(255,255,255,.12); }
.login-hero-mark p { position: static; margin: 24px 0 0; max-width: 330px; color: rgba(232,230,225,.74); font-size: 20px; line-height: 1.2; letter-spacing: -0.035em; font-family: Georgia, "Times New Roman", serif; text-align: center; text-wrap: balance; }
.login-auth { width: 100%; padding: 0 0 34px; display: grid; gap: 12px; }
.auth-button { position: relative; width: 100%; min-height: 54px; border: 0; border-radius: 16px; background: var(--white); color: #191919; display: flex; align-items: center; justify-content: center; gap: 11px; box-shadow: 0 0 0 1px rgba(232,230,225,.26), 0 12px 30px rgba(0,0,0,.22); }
.auth-button strong { font-size: 16px; font-weight: 690; letter-spacing: -0.02em; }
.google-g { position: absolute; left: 23px; font-weight: 800; font-size: 19px; font-family: Arial, sans-serif; background: conic-gradient(from -35deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 74%, #ea4335 0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.apple-logo { position: absolute; left: 23px; width: 22px; height: 22px; color: #191919; display: grid; place-items: center; }
.apple-logo svg { width: 22px; height: 22px; fill: currentColor; display: block; }
.login-divider { height: 33px; display: flex; align-items: center; gap: 14px; color: rgba(255,255,255,.5); font-size: 11px; font-weight: 650; letter-spacing: .08em; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.22); }
.login-email { width: 100%; min-height: 54px; border-radius: 16px; border: 1px solid rgba(232,230,225,.15); background: #242424; color: var(--text); text-align: center; font-size: 16px; outline: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.login-email::placeholder { color: rgba(255,255,255,.42); opacity: 1; }
.login-email:focus { border-color: rgba(255,255,255,.34); box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.auth-status { min-height: 32px; border: 1px solid rgba(232,230,225,.10); border-radius: 14px; background: rgba(36,36,36,.68); color: rgba(232,230,225,.58); padding: 8px 11px; font-size: 12px; line-height: 1.3; text-align: center; }
.auth-status[data-auth-status="ready"], .auth-status[data-auth-status="signed-in"] { color: rgba(232,230,225,.82); border-color: rgba(232,230,225,.16); background: rgba(48,48,48,.82); }
.auth-status[data-auth-status="fallback"] { color: rgba(232,230,225,.64); }
.clerk-user-mount { display: flex; justify-content: center; min-height: 0; }
.login-terms { margin: 8px auto 0; max-width: 360px; color: rgba(255,255,255,.52); font-size: 12px; line-height: 1.48; text-align: center; }
.login-terms a { color: rgba(255,255,255,.78); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal-page { min-height: 100vh; background: #111111; color: var(--text); }
.legal-document { width: min(760px, calc(100vw - 36px)); margin: 0 auto; padding: 58px 0 80px; }
.legal-back { color: rgba(232,230,225,.72); text-decoration: none; font-size: 13px; letter-spacing: .18em; font-weight: 700; }
.legal-kicker { margin: 44px 0 14px; color: rgba(232,230,225,.58); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.legal-document h1 { margin: 0 0 24px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 7vw, 64px); line-height: 1; letter-spacing: -0.055em; font-weight: 500; }
.legal-document h2 { margin: 34px 0 10px; font-size: 18px; }
.legal-document p { color: rgba(232,230,225,.72); font-size: 16px; line-height: 1.68; }

.chat-screen { min-height: 100vh; min-height: 100dvh; background: var(--main-bg); }
.chat-screen.settings-open::before { content: ""; position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.58); backdrop-filter: blur(6px); pointer-events: none; }
.desktop-app { width: 100%; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 312px 1fr; background: var(--main-bg); color: var(--text); }
.desktop-sidebar { position: relative; min-height: 100vh; overflow: hidden; background: var(--sidebar-bg); border-right: 1px solid var(--divider); padding: 18px 16px 88px; }
.sidebar-scroll { height: calc(100vh - 18px); height: calc(100dvh - 18px); overflow: hidden; padding-bottom: 88px; }
.desktop-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 0; }
.desktop-nav-item { min-height: 36px; border: 0; border-radius: 10px; background: transparent; padding: 0 6px; display: flex; align-items: center; gap: 10px; color: #f2f2f2; text-align: left; }
.desktop-nav-item:hover, .desktop-nav-item.is-active { background: rgba(232,230,225,.055); color: #fff; }
.app-icon { view-transition-name: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .86; }
.desktop-icon { width: 20px; height: 20px; flex: 0 0 20px; color: var(--graphic-soft); opacity: .84; }
.desktop-nav-label { font-size: 15px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; }
.desktop-section { margin-top: 18px; }
.recents-section { margin-top: 18px; }
.desktop-section-title { margin: 0 0 8px; padding: 0 6px; font-size: 12px; line-height: 1.25; font-weight: 650; color: #8f8f8f; letter-spacing: .02em; }
.desktop-thread-list { display: flex; flex-direction: column; gap: 2px; }
.desktop-thread { width: 100%; min-height: 32px; border: 0; border-radius: 10px; background: transparent; padding: 0 6px; color: rgba(242,242,242,.86); font-size: 14px; line-height: 1.25; font-weight: 450; letter-spacing: -0.01em; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.desktop-thread:hover { background: rgba(232,230,225,.055); color: #fff; }
.desktop-thread span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inline-chat-icon { display: inline-block; width: 16px; height: 16px; margin-right: 7px; color: var(--graphic-soft); vertical-align: -3px; opacity: .64; }
.service-panel { margin: 16px 0 0; padding: 13px 12px; display: grid; gap: 6px; border: 1px solid rgba(232,230,225,.12); border-radius: 16px; background: rgba(43,43,43,.58); box-shadow: inset 0 0 0 1px rgba(255,255,255,.018); }
.service-kicker { margin: 0 0 2px; color: rgba(232,230,225,.52); font-size: 10px; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; }
.service-panel strong { color: #f2f2f2; font-size: 14px; line-height: 1.25; font-weight: 650; }
.service-panel span { color: rgba(232,230,225,.68); font-size: 12px; line-height: 1.25; }
.service-panel[data-telegram="linked"] { border-color: rgba(232,230,225,.24); background: rgba(52,52,52,.68); }
.service-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 6px; }
.service-action { min-height: 32px; border: 1px solid rgba(232,230,225,.16); border-radius: 10px; background: rgba(52,52,52,.74); color: rgba(242,242,242,.86); font-size: 11px; font-weight: 650; }
.service-action:hover { background: rgba(232,230,225,.09); color: #fff; }
.sidebar-badge { position: absolute; left: 16px; bottom: 18px; height: 46px; border: 0; border-radius: 14px; background: #2b2b2b; color: #ededed; display: flex; align-items: center; gap: 9px; padding: 7px 12px 7px 7px; }
.sidebar-badge span { width: 32px; height: 32px; border-radius: 10px; background: #111111; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; }
.sidebar-badge b { font-size: 12px; font-weight: 650; letter-spacing: .045em; }
.sidebar-fab { position: absolute; right: 16px; bottom: 18px; width: 46px; height: 46px; border: 1px solid var(--graphic-line); border-radius: 16px; background: rgba(52,52,52,.74); color: var(--graphic-soft); display: grid; place-items: center; box-shadow: var(--soft-shadow), inset 0 0 0 1px rgba(255,255,255,.025); }
.fab-icon { width: 22px; height: 22px; stroke-width: var(--icon-stroke); opacity: .82; }

.desktop-main { position: relative; min-width: 0; min-height: 100vh; min-height: 100dvh; background: var(--main-bg); overflow: hidden; }
.app-topbar { position: fixed; z-index: 15; top: 14px; left: calc(312px + 16px); right: 16px; height: 44px; display: flex; align-items: center; justify-content: flex-start; pointer-events: none; }
.app-topbar > * { pointer-events: auto; }
.round-button { width: 38px; height: 38px; border: 1px solid var(--graphic-line); border-radius: 14px; background: rgba(52,52,52,.82); display: grid; place-items: center; color: var(--graphic-soft); box-shadow: inset 0 0 0 1px rgba(255,255,255,.018), var(--soft-shadow); }
.hamburger { position: absolute; left: 0; width: 42px; height: 36px; border: 0; border-radius: 0; background: transparent; box-shadow: none; gap: 5px; align-content: center; justify-items: start; padding: 0; }
.hamburger span { width: 30px; height: 2.8px; border-radius: 8px; background: #d9d6ce; display: block; opacity: .9; }
.hamburger span:nth-child(3) { width: 16px; }

.side-menu { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(88vw, 430px); padding: calc(18px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom)); background: #111111; transform: translateX(-112%); transition: transform .22s ease, opacity .22s ease; border-right: 1px solid var(--divider); box-shadow: 24px 0 80px rgba(0,0,0,.54); opacity: 0; pointer-events: none; overflow-y: auto; }
.side-menu:not(.is-open) { box-shadow: none; border-right-color: transparent; }
.chat-screen.menu-open .side-menu { transform: translateX(0); opacity: 1; pointer-events: auto; }
.chat-screen.menu-open .sidebar-badge, .chat-screen.menu-open .sidebar-fab { display: none; }
.drawer-account { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 9px; min-height: 58px; margin-bottom: 14px; }
.drawer-avatar { width: 50px; height: 50px; border: 0; border-radius: 0; background: transparent; color: var(--graphic-soft); display: grid; place-items: center; font-size: 22px; box-shadow: none; }
.profile-icon { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; opacity: .86; overflow: visible; }
.profile-head { stroke-width: var(--icon-stroke); }
.drawer-person { min-width: 0; height: 38px; border: 0; background: transparent; color: #e8e6e1; text-align: left; font-size: 16px; font-weight: 560; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-logo { min-height: 34px; display: flex; align-items: center; justify-content: center; text-align: center; color: rgba(232,230,225,.84); font-size: 12px; font-weight: 650; letter-spacing: .24em; text-transform: uppercase; margin-bottom: 16px; }
.drawer-close { width: 50px; height: 50px; border: 0; border-radius: 0; background: transparent; color: var(--graphic-soft); font-size: 24px; box-shadow: none; }
.control-icon { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; opacity: .82; }
.drawer-primary { width: 100%; min-height: 43px; border: 0; border-radius: 15px; background: var(--white); color: #181818; font-size: 15px; font-weight: 700; text-align: center; box-shadow: 0 0 0 1px rgba(232,230,225,.2), 0 12px 28px rgba(0,0,0,.2); margin-bottom: 15px; }
.drawer-session-list { display: grid; gap: 2px; padding-bottom: 10px; max-height: min(15dvh, 104px); overflow-y: auto; scrollbar-width: thin; }
.drawer-session { width: 100%; min-height: 42px; border: 0; border-radius: 13px; background: transparent; color: #e8e6e1; padding: 0 8px; text-align: left; font-size: 15px; font-weight: 450; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-session:hover, .drawer-session.is-starred { background: rgba(232,230,225,.055); }
.drawer-session-star { width: 14px; height: 14px; margin-left: 5px; color: var(--graphic-soft); vertical-align: -2px; opacity: .58; }
.drawer-recent-section { margin: 2px 0 12px; display: grid; gap: 7px; }
.drawer-recent-title { margin: 0 0 1px; padding: 0 8px; color: rgba(232,230,225,.46); font-size: 11px; line-height: 1.2; font-weight: 720; letter-spacing: .12em; text-transform: uppercase; }
.drawer-recent-row { width: 100%; min-height: 38px; border: 1px solid rgba(232,230,225,.10); border-radius: 13px; background: rgba(232,230,225,.035); color: rgba(232,230,225,.82); padding: 7px 9px; display: grid; gap: 2px; text-align: left; box-shadow: inset 0 0 0 1px rgba(255,255,255,.012); }
.drawer-recent-row span { min-width: 0; color: #e8e6e1; font-size: 13px; line-height: 1.15; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-recent-row small { color: rgba(232,230,225,.46); font-size: 11px; line-height: 1.15; font-weight: 520; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-bottom { position: relative; margin-top: 14px; padding: 2px 0 calc(10px + env(safe-area-inset-bottom)); background: transparent; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drawer-bottom-button { min-height: 62px; border: 1px solid rgba(232,230,225,.13); border-radius: 22px; background: linear-gradient(180deg, rgba(38,38,38,.92), rgba(25,25,25,.98)); color: var(--text); display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px; font-size: 13px; box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 10px 28px rgba(0,0,0,.24); transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.drawer-bottom-button:hover { border-color: rgba(232,230,225,.22); background: linear-gradient(180deg, rgba(44,44,44,.95), rgba(29,29,29,.99)); transform: translateY(-1px); }
.drawer-bottom-button:active { transform: translateY(0) scale(.99); }
.drawer-icon { width: 36px; height: 36px; flex: 0 0 36px; color: rgba(232,230,225,.78); fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; opacity: .94; overflow: visible; }
.drawer-icon [data-icon-part="brain-cloud"] { fill: rgba(232,230,225,.12); }
.drawer-bottom-button b { font-weight: 640; letter-spacing: -0.02em; }
.desktop-panel { display: none; min-height: 100vh; min-height: 100dvh; height: 100vh; height: 100dvh; position: relative; }
.desktop-panel.is-active { display: grid; place-items: center; }
.chat-empty { width: 100%; max-width: 680px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 70px 24px 150px; }
.chat-thread { width: min(720px, calc(100% - 44px)); max-height: calc(100dvh - 150px); align-self: stretch; justify-self: center; display: none; align-content: end; gap: 12px; overflow-y: auto; padding: 86px 0 122px; scrollbar-width: thin; }
.chat-thread.has-messages { display: grid; }
.desktop-panel.has-thread { place-items: stretch center; }
.desktop-panel.has-thread .chat-empty { display: none; }
.chat-message { max-width: min(560px, 86%); border: 1px solid rgba(232,230,225,.10); border-radius: 20px; padding: 12px 14px; color: rgba(242,240,234,.9); background: rgba(41,41,41,.88); box-shadow: inset 0 0 0 1px rgba(255,255,255,.018); }
.chat-message.is-user { justify-self: end; background: rgba(232,230,225,.10); }
.chat-message.is-assistant { justify-self: start; }
.chat-message span { display: block; margin-bottom: 5px; color: rgba(232,230,225,.54); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.chat-message p { margin: 0; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.prakti-sigil { width: 36px; height: 36px; margin-bottom: 18px; display: grid; place-items: center; color: rgba(232,230,225,.56); filter: drop-shadow(0 0 14px rgba(255,255,255,.045)); }
.prakti-sigil .app-icon { width: 36px; height: 36px; stroke-width: 1.45; opacity: .72; }
.welcome-copy { width: 100%; display: grid; justify-items: center; }
.welcome-kicker { margin: 0 0 12px; color: rgba(232,230,225,.78); font-size: 17px; line-height: 1.35; letter-spacing: -0.015em; }
.desktop-main-title { margin: 0; max-width: 640px; text-align: center; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.08; font-weight: 500; letter-spacing: -0.052em; color: #e7e3dc; text-wrap: balance; }
.mobile-prompt { display: none; margin: 0; max-width: 340px; font-size: clamp(30px, 8vw, 40px); line-height: 1.09; color: #efefec; text-wrap: balance; }
.welcome-subtitle { margin: 16px 0 0; color: rgba(232,230,225,.58); font-size: 15px; line-height: 1.4; }
.start-options { width: min(100%, 620px); margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.start-options button:nth-child(5) { grid-column: 1 / -1; }
.start-options button { min-height: 48px; border: 1px solid var(--graphic-line); border-radius: 17px; background: rgba(40,40,40,.9); color: rgba(232,230,225,.78); padding: 10px 12px; font-size: 13px; line-height: 1.22; text-align: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.018); }
.start-options button:hover { background: #303030; color: #f2f2f2; }
.composer-shell, .desktop-composer { position: absolute; left: 22px; right: 22px; bottom: 22px; min-height: 60px; border: 0; border-radius: 0; padding: 0; background: transparent; color: #aaa7a0; font-size: 16px; display: grid; grid-template-columns: minmax(0, 1fr) 54px; align-items: center; column-gap: 10px; box-shadow: none; }
.composer-input-frame { position: relative; min-width: 0; min-height: 60px; border-radius: 24px; background: #303030; padding: 0 64px 0 18px; border: 1px solid rgba(232,230,225,.13); display: flex; align-items: center; box-shadow: 0 0 0 1px rgba(232,230,225,.035), inset 0 0 0 1px rgba(255,255,255,.018); }
.composer-placeholder { color: #aaa7a0; display: inline-flex; align-items: center; gap: 9px; min-width: 0; pointer-events: none; }
.composer-input-frame:focus-within .composer-placeholder, .composer-input-frame.has-text .composer-placeholder { opacity: 0; }
.composer-textarea { position: absolute; inset: 0 58px 0 14px; min-height: 58px; height: 58px; border: 0; outline: 0; resize: none; background: transparent; color: #f2f0ea; font: inherit; line-height: 1.35; padding: 18px 0 12px; overflow-y: hidden; caret-color: #f2f0ea; }
.composer-textarea::placeholder { color: transparent; }
.composer-caret { width: 2px; height: 22px; border-radius: 4px; background: rgba(242,240,234,.92); flex: 0 0 auto; animation: composer-caret-blink 1s steps(1, end) infinite; }
@keyframes composer-caret-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.composer-actions, .desktop-composer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0; }
.composer-spacer { display: none; }
.composer-send { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 16px; background: transparent; color: var(--graphic-soft); display: grid; place-items: center; box-shadow: none; }
.composer-record { width: 54px; height: 54px; border: 1px solid var(--graphic-line); border-radius: 18px; background: rgba(59,59,59,.84); color: var(--graphic-soft); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), var(--soft-shadow); }
.composer-record svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.composer-send svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.tools-panel { position: relative; padding: 8px 18px 0; align-content: stretch; justify-items: stretch; overflow: hidden; scrollbar-width: none; background: #151515; }
.tools-workspace { width: min(920px, 100%); min-height: 0; height: 100%; justify-self: center; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 18px; padding-bottom: 16px; }
.tools-head { position: sticky; top: 0; z-index: 8; background: #151515; padding: 6px 0 12px; display: grid; justify-items: center; }
.notes-head h1, .tools-head h1 { width: 100%; margin: 0; color: #f2f2f2; font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial, sans-serif; text-align: center; letter-spacing: .18em; text-indent: .18em; font-size: 18px; line-height: 1; font-weight: 760; text-transform: uppercase; }
.tools-accordion { min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 14px; padding-bottom: 24px; scrollbar-width: thin; scrollbar-color: rgba(242,242,242,.22) transparent; }
.tool-accordion-card { border-radius: 22px; background: rgba(41,41,41,.92); border: 1px solid var(--graphic-line); color: var(--text); padding: 16px; display: grid; gap: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.14), inset 0 0 0 1px rgba(255,255,255,.018); }
.tool-accordion-card header { display: grid; grid-template-columns: 38px 1fr; gap: 11px; align-items: center; }
.tool-accordion-card header > .app-icon { width: 30px; height: 30px; color: var(--graphic-soft); stroke-width: var(--icon-stroke); justify-self: center; opacity: .78; }
.tool-accordion-card b { display: block; font-size: 20px; letter-spacing: -0.02em; }
.tool-accordion-card span { display: block; color: var(--muted); font-size: 13px; line-height: 1.36; margin-top: 3px; }
.tool-accordion-card p { margin: 0; color: rgba(232,230,225,.75); font-size: 14px; line-height: 1.4; }
.tool-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tool-actions button { min-height: 40px; border-radius: 16px; border: 1px solid var(--graphic-line); background: rgba(52,52,52,.84); color: #f2f0eb; font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255,255,255,.018); }
.tool-actions button:first-child { border: 0; background: #f2f0eb; color: #111; }
.tool-detail-view { position: absolute; inset: 0; z-index: 6; display: none; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; background: #151515; color: var(--text); padding: 8px 0 calc(18px + env(safe-area-inset-bottom)); }
.tool-detail-view.is-open { display: grid; }
.tools-panel.tool-open .tools-head { display: none; }
.tools-panel.tool-open .tools-accordion { display: none; }
.tool-detail-head { min-height: 74px; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: start; gap: 12px; padding: 0 0 8px; }
.tool-detail-head .round-button { width: 44px; height: 44px; color: var(--graphic-soft); background: rgba(52,52,52,.38); border-color: rgba(232,230,225,.10); }
.tool-detail-head h1 { margin: 0; color: #f2f2f2; font-size: clamp(24px, 4vw, 34px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 720; }
.tool-detail-head p { margin: 8px 0 0; max-width: 720px; color: rgba(232,230,225,.68); font-size: 14px; line-height: 1.38; }
.tool-chat-window { min-height: 0; overflow-y: auto; border: 1px solid rgba(232,230,225,.10); border-radius: 24px; background: rgba(24,24,24,.78); padding: 16px; display: grid; align-content: end; scrollbar-width: thin; scrollbar-color: rgba(242,242,242,.18) transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.014); }
.tool-chat-message { max-width: min(640px, 92%); border: 1px solid rgba(232,230,225,.10); border-radius: 20px; background: rgba(41,41,41,.88); padding: 13px 15px; box-shadow: 0 8px 22px rgba(0,0,0,.14); }
.tool-chat-message span { display: block; margin: 0 0 6px; color: rgba(232,230,225,.58); font-size: 12px; line-height: 1.2; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
.tool-chat-message p { margin: 0; color: rgba(242,240,235,.86); font-size: 15px; line-height: 1.46; }
.tool-chat-composer.composer-shell { position: relative; left: auto; right: auto; bottom: auto; min-height: 60px; grid-template-columns: minmax(0, 1fr) 54px; }
.tool-history-state { margin-top: 8px; border: 1px solid rgba(232,230,225,.09); border-radius: 18px; background: rgba(31,31,31,.62); padding: 12px; color: rgba(232,230,225,.66); font-size: 13px; display: grid; gap: 8px; }
.tool-history-state button { width: 100%; min-height: 46px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; text-align: left; border: 1px solid rgba(232,230,225,.08); border-radius: 14px; background: rgba(45,45,45,.72); color: #f2f0eb; padding: 10px 12px; }
.tool-history-state button span { grid-column: 1 / -1; color: rgba(232,230,225,.62); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-history-state button time { color: rgba(232,230,225,.48); font-size: 12px; }
.notes-panel { position: relative; padding: 8px 18px 0; align-content: stretch; justify-items: stretch; overflow: hidden; background: #151515; }
.notes-workspace { position: relative; min-height: 0; height: 100%; width: min(920px, 100%); justify-self: center; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; row-gap: 14px; }
.notes-head { position: sticky; top: 0; z-index: 8; background: #151515; padding: 6px 0 12px; display: grid; justify-items: center; }
.notes-filter-row, .tools-filter-row { margin-top: 10px; display: flex; justify-content: center; gap: 24px; }
.notes-filter-row button, .tools-filter-row button { min-height: 22px; border: 0; border-radius: 0; background: transparent; color: #77777a; padding: 0 1px 5px; font-size: 14px; line-height: 1.1; font-weight: 700; box-shadow: none; }
.notes-filter-row button.is-active, .tools-filter-row button.is-active { background: transparent; color: #f2f2f2; border-color: transparent; box-shadow: inset 0 -1px 0 currentColor; }
.core-note-list-state { margin: -6px 0 0; color: rgba(232,230,225,.54); font-size: 12px; line-height: 1.3; text-align: center; }
.core-note-list-state[data-core-note-list-state="ready"] { color: rgba(232,230,225,.62); }
.core-note-list-state[data-core-note-list-state="fallback"] { color: rgba(232,230,225,.72); }
.notes-list { min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 12px; padding: 0; padding-bottom: 96px; scrollbar-width: thin; scrollbar-color: rgba(242,242,242,.22) transparent; }
.note-card { position: relative; width: 100%; border: 1px solid var(--graphic-line); border-radius: 18px; background: rgba(41,41,41,.92); color: var(--text); text-align: left; padding: 0; box-shadow: 0 8px 20px rgba(0,0,0,.12), inset 0 0 0 1px rgba(255,255,255,.018); display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: start; }
.note-open { min-width: 0; border: 0; background: transparent; color: inherit; text-align: left; padding: 14px 4px 15px 18px; }
.note-card time, .note-detail-body time { display: block; color: #8d8d8d; font-size: 12px; line-height: 1.25; margin-bottom: 5px; }
.note-card b { display: block; color: #f5f5f5; font-size: 18px; line-height: 1.13; font-weight: 720; margin-bottom: 6px; letter-spacing: -0.02em; }
.note-card span { color: #b9b9b9; font-size: 14px; line-height: 1.32; }
.note-favorite { width: 38px; height: 38px; margin: 12px 10px 0 0; border: 0; border-radius: 14px; background: transparent; color: var(--graphic-soft); display: grid; place-items: center; box-shadow: none; opacity: .66; }
.note-favorite:hover { color: #f2f2f2; background: rgba(232,230,225,.06); }
.note-favorite .app-icon { width: 21px; height: 21px; stroke-width: var(--icon-stroke); }
.notes-composer { position: relative; margin-top: 0; margin-bottom: calc(22px + env(safe-area-inset-bottom)); min-height: 72px; border: 1px solid var(--graphic-line); border-radius: 24px; background: rgba(38,38,38,.98); padding: 9px; display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 10px; align-items: center; box-shadow: 0 0 0 1px rgba(232,230,225,.035), inset 0 0 0 1px rgba(255,255,255,.025); }
.notes-text-frame { position: relative; min-width: 0; min-height: 54px; max-height: 132px; border: 1px solid var(--graphic-line); border-radius: 20px; background: rgba(48,48,48,.9); box-shadow: inset 0 0 0 1px rgba(255,255,255,.018); }
.notes-composer textarea, .note-detail-add textarea { width: 100%; min-height: 54px; max-height: 132px; resize: none; border: 0; outline: 0; border-radius: 18px; background: transparent; color: var(--text); padding: 13px 58px 13px 15px; font: inherit; font-size: 15px; line-height: 1.32; white-space: pre-wrap; overflow-y: auto; }
.note-detail-add textarea { min-height: 94px; background: #303030; white-space: normal; padding: 17px 18px; }
.notes-composer textarea::placeholder, .note-detail-add textarea::placeholder { color: rgba(232,230,225,.48); }
.notes-send-button { position: absolute; right: 7px; bottom: 6px; width: 42px; min-width: 42px; height: 42px; min-height: 42px; border: 0; border-radius: 15px; background: transparent; color: var(--graphic-soft); display: grid; place-items: center; box-shadow: none; }
.notes-composer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0; }
.notes-audio-button { width: 54px; min-width: 54px; height: 54px; min-height: 54px; border: 1px solid var(--graphic-line); border-radius: 18px; background: rgba(52,52,52,.82); color: var(--graphic-soft); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
.notes-send-button .app-icon { width: 23px; height: 23px; stroke-width: var(--icon-stroke); }
.notes-audio-button svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.note-detail-view { position: absolute; inset: 0; z-index: 5; display: none; grid-template-rows: auto auto auto auto; overflow-y: auto; background: var(--main-bg); color: var(--text); padding: 0 0 calc(20px + env(safe-area-inset-bottom)); }
.note-detail-view.is-open { display: grid; }
.notes-panel.detail-open .notes-list, .notes-panel.detail-open .notes-composer, .notes-panel.detail-open .notes-filter-row { display: none; }
.note-detail-head { min-height: 58px; display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 0 4px 12px; }
.note-detail-head h1 { flex: 1; min-width: 0; margin: 0; color: var(--text); font-size: clamp(30px, 5vw, 48px); line-height: 1; letter-spacing: -0.055em; }
.note-detail-head .round-button { width: 44px; height: 44px; }
.note-detail-body { border: 1px solid rgba(232,230,225,.12); border-radius: 26px; background: rgba(47,47,47,.95); padding: 20px; line-height: 1.62; color: rgba(242,240,235,.86); }
.note-detail-add { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 10px; align-items: center; margin: 14px 0; }
.note-detail-start { width: 100%; min-height: 56px; border: 0; border-radius: 18px; background: #f2f0eb; color: #111; font-size: 16px; font-weight: 750; }

.settings-sheet { position: fixed; z-index: 80; top: 50%; left: 50%; width: min(520px, calc(100vw - 24px)); max-height: min(720px, calc(100vh - 72px)); padding: 8px 14px 18px; background: #1e1e1f; transform: translate(-50%, -48%) scale(.985); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; overflow-y: auto; border-radius: 24px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 26px 76px rgba(0,0,0,.62); }
.settings-sheet.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.settings-head { height: 56px; position: relative; display: flex; align-items: center; justify-content: center; }
.settings-head strong { font-size: 18px; font-weight: 650; color: #f5f5f5; }
.settings-head .round-button { position: absolute; top: 8px; width: 38px; height: 38px; background: rgba(36,36,36,.86); border-color: var(--graphic-line); font-size: 18px; }
.settings-head .round-button:first-child { left: 2px; } .settings-head .round-button:last-child { right: 2px; font-size: 18px; font-weight: 650; }
.account-field { margin: 6px 0 12px; height: 48px; padding: 0 14px; border-radius: 15px; background: #1d1d1e; border: 1px solid #303030; color: #f5f5f5; font-size: 15px; font-weight: 600; display: flex; align-items: center; }
.settings-list { display: grid; }
.settings-list hr { width: 100%; border: 0; border-top: 1px solid #333333; margin: 6px 0; }
.settings-row { min-height: 48px; width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left; padding: 0 8px; border-radius: 12px; }
.row-icon { width: 20px; height: 20px; color: var(--graphic-soft); flex: 0 0 20px; stroke-width: var(--icon-stroke); opacity: .78; }
.settings-row b { flex: 1; font-size: 15px; font-weight: 450; color: #f1f1f1; }
.settings-language-options { display: inline-flex; gap: 5px; margin-right: 8px; }
.settings-language-options button { min-width: 38px; height: 28px; border: 1px solid rgba(232,230,225,.12); border-radius: 9px; background: #2d2d2d; color: #e8e6e1; font-size: 12px; font-weight: 700; }
.settings-row em { color: #c7c7c7; font-style: normal; font-size: 13px; margin-right: 4px; }
.row-chevron { width: 16px; height: 16px; color: var(--graphic-soft); flex: 0 0 16px; stroke-width: var(--icon-stroke); opacity: .52; }
.toggle { width: 48px; height: 28px; border-radius: 10px; padding: 3px; background: #333; display: flex; justify-content: flex-start; flex: 0 0 48px; box-shadow: inset 0 0 0 1px var(--graphic-line); }
.toggle u { width: 22px; height: 22px; border-radius: 8px; background: var(--white); display: block; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.28); }
.toggle.is-on { justify-content: flex-end; background: var(--matte-control-2); }

@media (max-width: 860px) {
  .desktop-app { grid-template-columns: 1fr; }
  .desktop-sidebar { display: none; }
  .app-topbar { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 14px; right: 14px; justify-content: flex-start; }
  .desktop-main-title { display: none; }
  .mobile-prompt { display: block; }
  .chat-empty { max-width: 100%; padding: 54px 20px 172px; }
  .chat-thread { width: calc(100% - 28px); max-height: calc(100dvh - 128px); padding: 76px 0 118px; }
  .prakti-sigil { width: 28px; height: 28px; margin-bottom: 14px; font-size: 22px; }
  .welcome-kicker { font-size: 15px; margin-bottom: 10px; }
  .welcome-subtitle { margin-top: 12px; font-size: 14px; }
  .start-options { width: 100%; max-width: 340px; margin-top: 18px; grid-template-columns: 1fr; gap: 8px; }
  .start-options button { min-height: 38px; border-radius: 13px; font-size: 13px; }
  .tools-panel { padding: 8px 18px 0; }
  .tools-workspace { gap: 18px; }
  .tool-accordion-card { border-radius: 18px; padding: 16px; }
  .tool-accordion-card b { font-size: 20px; }
  .tool-actions button { min-height: 40px; }
  .composer-shell, .desktop-composer { left: 14px; right: 14px; bottom: calc(26px + env(safe-area-inset-bottom)); min-height: 54px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) 52px; align-items: center; column-gap: 8px; }
  .composer-input-frame { min-height: 54px; border-radius: 20px; padding: 0 58px 0 14px; }
  .composer-actions { width: auto; margin-top: 0; justify-self: end; align-self: center; gap: 0; }
  .composer-spacer { display: none; }
  .composer-send { width: 42px; height: 42px; border-radius: 15px; right: 6px; }
  .composer-record { width: 52px; height: 52px; border-radius: 18px; align-self: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
  .composer-record svg { width: 29px; height: 29px; }
  .composer-send svg { width: 24px; height: 24px; }
  .side-menu { width: min(88vw, 430px); }
  .settings-sheet { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
}
@media (max-width: 520px) { .login-card { width: calc(100vw - 54px); min-height: 100vh; } .settings-sheet { padding-left: 24px; padding-right: 24px; } .settings-row b, .settings-row em { font-size: 21px; } .account-field { font-size: 20px; } }
