:root{color-scheme:light;font-family:Segoe UI,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;color:#17352d;background:#dfe9e3;font-synthesis:none;text-rendering:optimizeLegibility;--ink: #17352d;--ink-soft: #526c62;--forest: #245347;--forest-deep: #102b24;--mist: #dfe9e3;--paper: #fffaf0;--paper-deep: #f5edde;--line: #d9d8ca;--apricot: #e8ad83;--apricot-soft: #f7dfca;--danger: #8d352c;--shadow: 0 24px 80px rgba(20, 54, 44, .16)}*{box-sizing:border-box}html,body,#root{width:100%;height:100%;margin:0}body{min-width:320px;overflow:hidden;background:radial-gradient(circle at 16% 0%,rgba(255,250,240,.92),transparent 34rem),linear-gradient(145deg,#eef3ef,var(--mist))}button,input,select{font:inherit}.auth-loading{display:grid;width:100%;min-height:100vh;min-height:100dvh;place-items:center;color:var(--forest);font-family:Georgia,Times New Roman,serif;font-size:1.1rem}.auth-shell{display:grid;width:100%;height:100vh;height:100dvh;padding:max(22px,env(safe-area-inset-top)) 16px max(22px,env(safe-area-inset-bottom));place-items:center;overflow-y:auto}.auth-card{width:min(100%,460px);padding:clamp(25px,7vw,42px);border:1px solid rgba(23,53,45,.12);border-radius:28px;background:#fffaf0f7;box-shadow:var(--shadow)}.auth-card__eyebrow{margin:0 0 8px;color:#8a5d45;font-size:.7rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.auth-card h1{margin:0;color:var(--forest-deep);font-family:Georgia,Times New Roman,serif;font-size:clamp(2rem,9vw,3rem);font-weight:500;line-height:1.05;letter-spacing:-.035em}.auth-card__intro{margin:13px 0 24px;color:var(--ink-soft);font-size:.9rem;line-height:1.55}.auth-form{display:grid;gap:14px}.auth-form__field{display:grid;gap:7px;color:var(--forest-deep);font-size:.75rem;font-weight:750;letter-spacing:.025em}.auth-form__field input{width:100%;min-height:49px;padding:0 14px;border:1px solid rgba(23,53,45,.23);border-radius:13px;color:var(--forest-deep);background:#fffef9;font-size:1rem}.auth-form__field input:focus{border-color:var(--forest)}.auth-form__error,.auth-form__progress{min-height:1.25rem;margin:0;font-size:.78rem;line-height:1.45}.auth-form__error{color:var(--danger)}.auth-form__progress{color:var(--ink-soft)}.auth-form__submit{min-height:50px;border:0;border-radius:14px;color:var(--paper);background:var(--forest);font-weight:800}.auth-form__submit:hover:not(:disabled){background:var(--forest-deep)}.auth-card__switch{width:100%;min-height:44px;margin-top:10px;border:0;color:#8a5d45;background:transparent;font-size:.82rem;font-weight:750}.auth-privacy{margin-top:17px;padding-top:15px;border-top:1px solid rgba(23,53,45,.12);color:var(--ink-soft);font-size:.74rem;line-height:1.5}.auth-privacy summary{min-height:44px;color:var(--forest);font-weight:750;line-height:44px;cursor:pointer}.auth-privacy p{margin:7px 0}button,select{cursor:pointer}button:disabled,input:disabled,select:disabled{cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid rgba(232,173,131,.82);outline-offset:3px}.app-shell.chat-shell{position:relative;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:100%;height:100vh;height:100dvh;overflow:hidden;background:linear-gradient(90deg,rgba(232,173,131,.11) 1px,transparent 1px) 39px 0 / 1px 100%,var(--paper)}.app-shell.chat-shell--offline,.app-shell.chat-shell--notice{grid-template-rows:auto auto minmax(0,1fr) auto}.app-shell.chat-shell--offline.chat-shell--notice{grid-template-rows:auto auto auto minmax(0,1fr) auto}.chat-shell__header{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:114px;padding:max(16px,env(safe-area-inset-top)) 18px 16px;border-bottom:1px solid rgba(23,53,45,.11);background:#fffaf0f5}.chat-shell__identity{display:flex;align-items:center;min-width:0;gap:13px}.companion-mark{position:relative;display:grid;flex:0 0 auto;width:52px;height:52px;place-items:center;border:1px solid rgba(255,255,255,.3);border-radius:50%;background:radial-gradient(circle at 30% 23%,rgba(255,255,255,.25),transparent 24%),var(--forest);box-shadow:0 9px 24px #17352d33}.companion-mark__portrait{display:block;width:100%;height:100%;border-radius:inherit;object-fit:cover;image-rendering:pixelated}.companion-mark__status{position:absolute;right:-1px;bottom:2px;width:13px;height:13px;border:3px solid var(--paper);border-radius:50%;background:var(--apricot)}.chat-shell__title-group{min-width:0}.ai-label{margin:0 0 3px;color:var(--ink-soft);font-size:.65rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.chat-shell h1{overflow:hidden;margin:0;color:var(--ink);font-family:Georgia,Times New Roman,serif;font-size:clamp(1.72rem,8vw,2.2rem);font-weight:500;line-height:1;letter-spacing:-.025em;text-overflow:ellipsis;white-space:nowrap}.chat-shell__promise{margin:5px 0 0;color:#8a5d45;font-family:Georgia,Times New Roman,serif;font-size:.77rem;font-style:italic;letter-spacing:.01em}.chat-shell__account{display:flex;flex-wrap:wrap;gap:3px 10px;margin:5px 0 0;color:var(--ink-soft);font-size:.68rem;font-weight:700}.chat-shell__account span:last-child{color:#8a5d45}.chat-shell__settings{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;gap:7px;min-width:70px;min-height:44px;padding:0 13px;border:1px solid rgba(23,53,45,.22);border-radius:14px;color:var(--forest-deep);background:transparent;font-size:.79rem;font-weight:750;letter-spacing:.025em;transition:border-color .16s ease,background-color .16s ease,transform .16s ease}.chat-shell__settings:hover{border-color:#17352d80;background:var(--apricot-soft)}.chat-shell__settings:active{transform:translateY(1px)}.chat-shell__settings-icon{display:inline-block;transform:rotate(90deg);color:#aa6f4f;font-size:.77rem;letter-spacing:-.05em}.chat-shell__conversation{min-height:0;padding:16px 16px 26px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:rgba(36,83,71,.28) transparent;background:radial-gradient(circle at 100% 18%,rgba(232,173,131,.09),transparent 15rem),linear-gradient(#fffaf09e,#fffaf09e)}.chat-shell__hint{width:fit-content;max-width:94%;margin:0 auto 25px;padding:7px 13px;border:1px solid rgba(23,53,45,.11);border-radius:999px;color:var(--ink-soft);background:#ffffff8c;font-size:.7rem;line-height:1.45;text-align:center}.chat-shell__messages{display:flex;flex-direction:column;gap:20px;width:100%;max-width:680px;margin:0 auto}.message{position:relative;width:fit-content;max-width:min(88%,590px);animation:message-arrive .24s ease-out both}.message__text{font-size:1rem;line-height:1.63;letter-spacing:.004em}.chat-shell__actions{display:flex;flex:0 0 auto;flex-direction:column;align-items:stretch;gap:6px}.chat-shell__actions>a,.chat-shell__account-button{min-height:32px;padding:6px 10px;border:0;border-radius:10px;color:var(--forest);background:transparent;font-size:.72rem;font-weight:750;text-align:center;text-decoration:none}.chat-shell__actions>a:hover,.chat-shell__account-button:hover{background:var(--apricot-soft)}.message__source{display:block;width:fit-content;margin-top:8px;color:var(--ink-soft);font-size:.62rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.message__source--online{color:var(--forest)}.message__source--human{color:#8a5d45}.message--assistant{align-self:flex-start;padding:14px 17px 14px 19px;border:1px solid rgba(23,53,45,.1);border-left:3px solid var(--apricot);border-radius:3px 20px 20px 3px;color:var(--forest-deep);background:#ffffffad;box-shadow:0 9px 30px #17352d0f}.message--user{align-self:flex-end;padding:13px 17px;border-radius:20px 4px 20px 20px;color:#18342c;background:var(--apricot-soft);box-shadow:inset 0 0 0 1px #8a5d451f}.message__gloss-trigger{position:relative;display:inline;margin:0;padding:0;border:0;border-bottom:2px dotted #a76f4f;border-radius:1px;color:inherit;background:transparent;font-weight:700}.message__gloss-trigger:after{position:absolute;inset:-9px -5px;content:""}.message__gloss-trigger:hover{color:#8a4f31;background:#e8ad832e}.message__gloss{position:relative;margin-top:13px;padding:15px 42px 15px 16px;border-radius:14px;color:#fef8ec;background:var(--forest-deep);box-shadow:0 14px 34px #102b2438}.message__gloss-close{position:absolute;top:7px;right:7px;display:grid;width:36px;height:36px;padding:0;place-items:center;border:0;border-radius:50%;color:#fff8ec;background:#ffffff14;font-size:1.35rem}.message__gloss-meaning{color:#ffd3b4;font-size:1rem;font-weight:750}.message__gloss-pronunciation{margin-top:5px;color:#d5e2dc;font-family:Georgia,Times New Roman,serif;font-size:.82rem}.message__gloss-simple{margin-top:9px;color:#fffaf0;font-size:.82rem;line-height:1.45}.chat-shell__thinking{align-self:flex-start;margin:-5px 0 0 17px;color:var(--ink-soft);font-family:Georgia,Times New Roman,serif;font-size:.82rem;font-style:italic}.network-note{position:relative;z-index:1;padding:9px 18px;border-bottom:1px solid rgba(166,111,55,.22);color:#68491f;background:#fff3d8;font-size:.78rem;font-weight:650;line-height:1.45;text-align:center}.chat-shell__notice{display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 16px;border-bottom:1px solid rgba(36,83,71,.14);color:var(--forest-deep);background:#edf5f0;font-size:.74rem;line-height:1.4}.chat-shell__notice button{min-height:36px;border:0;color:var(--forest);background:transparent;font-weight:800}.chat-shell__error{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;max-width:680px;margin:18px auto 0;padding:12px 12px 12px 15px;border:1px solid rgba(141,53,44,.25);border-radius:14px;color:#6e2c25;background:#fff0e9;font-size:.8rem;line-height:1.4}.chat-shell__error button{flex:0 0 auto;min-height:44px;padding:0 12px;border:1px solid rgba(141,53,44,.28);border-radius:11px;color:var(--danger);background:#fffaf5;font-weight:750}.chat-shell__error-actions{display:flex;flex:0 0 auto;flex-wrap:wrap;gap:8px;margin-left:auto}@media(max-width:420px){.chat-shell__error{align-items:flex-start;flex-wrap:wrap}.chat-shell__error-actions{width:100%;margin-left:0}.chat-shell__error-actions button{flex:1 1 0}}.composer{position:sticky;z-index:3;bottom:0;min-width:0;padding:12px 16px max(14px,env(safe-area-inset-bottom));border-top:1px solid rgba(23,53,45,.12);background:#fffaf0f5;box-shadow:0 -15px 36px #17352d0f;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.composer__caption{display:flex;align-items:baseline;justify-content:space-between;width:100%;max-width:680px;margin:0 auto 8px;color:var(--ink-soft);font-size:.65rem;font-weight:650;letter-spacing:.035em}.composer__caption span:first-child{color:#8a5d45;font-family:Georgia,Times New Roman,serif;font-size:.78rem;font-style:italic;font-weight:600}.composer__suggestions{display:flex;width:100%;max-width:680px;margin:0 auto 10px;padding:2px 1px 5px;gap:8px;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:none}.composer__suggestions::-webkit-scrollbar{display:none}.composer__suggestion{flex:0 0 auto;min-height:44px;padding:0 14px;border:1px solid rgba(23,53,45,.17);border-radius:13px 13px 13px 3px;color:var(--forest);background:#ffffffa8;font-size:.82rem;font-weight:650;white-space:nowrap;transition:border-color .16s ease,background-color .16s ease,transform .16s ease}.composer__suggestion:hover:not(:disabled){border-color:#24534780;background:var(--apricot-soft);transform:translateY(-1px)}.composer__suggestion:disabled{opacity:.5}.composer__form{width:100%;max-width:680px;margin:0 auto}.composer__label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.composer__input-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;min-height:54px;padding:5px;border:1px solid rgba(23,53,45,.24);border-radius:17px;background:#fffef9;box-shadow:0 7px 24px #17352d12;transition:border-color .16s ease,box-shadow .16s ease}.composer__input-row:focus-within{border-color:var(--forest);box-shadow:0 0 0 3px #2453471a,0 7px 24px #17352d12}.composer__input{width:100%;min-width:0;height:44px;padding:0 11px;border:0;outline:0;color:var(--forest-deep);background:transparent;font-size:.95rem}.composer__input::placeholder{color:#81938b}.composer__send{min-width:66px;min-height:44px;padding:0 14px;border:0;border-radius:12px;color:#fffaf0;background:var(--forest);font-size:.82rem;font-weight:800;letter-spacing:.025em;box-shadow:0 5px 13px #24534733;transition:background-color .16s ease,transform .16s ease}.composer__send:hover:not(:disabled){background:var(--forest-deep);transform:translateY(-1px)}.composer__send:disabled{color:#6e8279;background:#dfe7e2;box-shadow:none}.control-sheet__backdrop{position:fixed;z-index:20;inset:0;display:flex;align-items:flex-end;justify-content:center;padding-top:max(18px,env(safe-area-inset-top));background:#102b2480;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:backdrop-enter .18s ease-out both}.control-sheet{width:100%;max-height:calc(100dvh - 26px);padding:21px 19px max(24px,env(safe-area-inset-bottom));overflow-y:auto;border:1px solid rgba(255,255,255,.62);border-radius:25px 25px 0 0;color:var(--forest-deep);background:var(--paper);box-shadow:0 -24px 70px #102b243d;animation:sheet-enter .22s ease-out both}.control-sheet:before{display:block;width:42px;height:4px;margin:-7px auto 17px;border-radius:99px;background:#c6c7bb;content:""}.control-sheet__header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:22px}.control-sheet__header h2{margin:0;font-family:Georgia,Times New Roman,serif;font-size:1.45rem;font-weight:500}.control-sheet__header p{margin:5px 0 0;color:#8a5d45;font-size:.73rem;font-weight:700;letter-spacing:.035em}.control-sheet__header button{min-height:44px;padding:0 12px;border:1px solid rgba(23,53,45,.18);border-radius:12px;color:var(--forest);background:transparent;font-size:.78rem;font-weight:750}.control-sheet__field{display:grid;grid-template-columns:1fr;gap:7px;margin-top:15px;color:var(--ink-soft);font-size:.72rem;font-weight:750;letter-spacing:.025em}.control-sheet__field select{width:100%;min-height:48px;padding:0 40px 0 13px;border:1px solid rgba(23,53,45,.2);border-radius:13px;color:var(--forest-deep);background:#fffef9;font-size:.9rem;font-weight:600}.control-sheet__note{margin:20px 0 0;padding:13px 14px;border-left:3px solid var(--apricot);color:var(--ink-soft);background:var(--apricot-soft);font-size:.75rem;line-height:1.5}.account-sheet__backdrop{position:fixed;z-index:30;inset:0;display:flex;align-items:flex-end;justify-content:center;background:#102b248a;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.account-sheet{width:min(100%,720px);max-height:calc(100dvh - 20px);padding:21px 18px max(24px,env(safe-area-inset-bottom));overflow-y:auto;border-radius:24px 24px 0 0;color:var(--forest-deep);background:var(--paper);box-shadow:var(--shadow)}.account-sheet>header,.admin-screen__header,.admin-section__heading,.handoff-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.account-sheet h2,.account-sheet h3,.admin-screen h1,.admin-screen h2{margin:0;font-family:Georgia,Times New Roman,serif;font-weight:500}.eyebrow{margin:0 0 5px;color:#8a5d45;font-size:.67rem;font-weight:800;letter-spacing:.11em;text-transform:uppercase}.account-sheet button,.admin-screen button,.admin-screen a{min-height:42px;padding:0 13px;border:1px solid rgba(23,53,45,.2);border-radius:11px;color:var(--forest-deep);background:#fffef9;font-weight:700}.account-sheet__grid{display:grid;gap:14px;margin-top:18px}.account-sheet__grid>section,.admin-section,.handoff-panel,.admin-overview>div{padding:16px;border:1px solid rgba(23,53,45,.12);border-radius:16px;background:#ffffff8a}.account-sheet label,.admin-screen label,.handoff-card label{display:grid;gap:6px;margin-top:12px;color:var(--ink-soft);font-size:.75rem;font-weight:700}.account-sheet input,.account-sheet select,.admin-screen input,.admin-screen select,.handoff-card textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid rgba(23,53,45,.2);border-radius:11px;color:var(--forest-deep);background:#fffef9}.check-row,.switch-row{display:flex!important;align-items:center;gap:9px}.check-row input,.switch-row input{width:20px;min-height:20px}.account-sheet__danger{border-color:#8d352c47!important}.danger-button{color:var(--danger)!important}.account-sheet__status,.admin-screen__status,.handoff-panel>[role=status]{min-height:1.4rem;color:var(--ink-soft);font-size:.78rem}.admin-screen,.admin-denied{width:100%;min-height:100dvh;padding:20px clamp(15px,4vw,44px) 44px;overflow-y:auto;color:var(--forest-deep);background:var(--paper)}.admin-screen__header nav{display:flex;flex-wrap:wrap;gap:8px}.admin-screen__header p:last-child{max-width:620px;color:var(--ink-soft)}.admin-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:20px 0}.admin-overview strong,.admin-overview span{display:block}.admin-overview strong{font-family:Georgia,Times New Roman,serif;font-size:1.55rem}.admin-overview span{color:var(--ink-soft);font-size:.72rem}.admin-section,.handoff-panel{margin-top:14px}.admin-code-list,.handoff-panel__queue{display:grid;gap:10px;padding:0;list-style:none}.admin-code-list li,.handoff-card{padding:13px;border:1px solid rgba(23,53,45,.12);border-radius:13px;background:var(--paper)}.admin-code-list li,.handoff-card__actions,.handoff-card__composer>div,.admin-adjustment{display:flex;flex-wrap:wrap;gap:9px}.handoff-card__actions button,.handoff-card__composer button{flex:1 1 130px}.handoff-card textarea{min-height:110px;resize:vertical}.admin-adjustment>label{flex:1 1 180px}.generated-code{position:sticky;z-index:4;bottom:12px;margin-top:16px;padding:16px;border:2px solid var(--apricot);border-radius:16px;background:var(--paper);box-shadow:var(--shadow)}.generated-code code{display:block;margin:10px 0;overflow-wrap:anywhere;font-size:1.05rem}@keyframes message-arrive{0%{opacity:0;transform:translateY(5px)}}@keyframes backdrop-enter{0%{opacity:0}}@keyframes sheet-enter{0%{opacity:0;transform:translateY(24px)}}@media(min-width:620px){.chat-shell__header{min-height:130px;padding:22px 28px}.companion-mark{width:58px;height:58px;font-size:1.7rem}.chat-shell h1{font-size:2.45rem}.chat-shell__promise{font-size:.82rem}.chat-shell__settings{min-width:84px}.chat-shell__actions{flex-direction:row;align-items:center}.account-sheet__backdrop{align-items:center;padding:24px}.account-sheet{border-radius:24px}.account-sheet__grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-overview{grid-template-columns:repeat(4,minmax(0,1fr))}.chat-shell__conversation{padding:21px 34px 34px}.message__text{font-size:1.05rem}.composer{padding:14px 34px 20px}.control-sheet__backdrop{align-items:center;padding:24px}.control-sheet{width:min(100%,440px);padding:27px 28px 30px;border-radius:25px;box-shadow:var(--shadow)}.control-sheet:before{display:none}}@media(min-width:760px){#root{display:grid;place-items:center;padding:24px}.auth-shell,.auth-loading{height:100%;min-height:0}.auth-shell{padding:0}.app-shell.chat-shell{width:min(100%,820px);height:min(880px,calc(100dvh - 48px));min-height:620px;border:1px solid rgba(23,53,45,.12);border-radius:28px;box-shadow:var(--shadow)}.chat-shell__header{border-radius:28px 28px 0 0}.composer{border-radius:0 0 28px 28px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
