:root{color-scheme:light;--bg:#f4f5f9;--surface:#fff;--ink:#19243c;--dim:#5d677a;--line:#dce1eb;--blue:#3558e6;--blue-dark:#2442bd;--soft:#edf1ff;--lime:#dff589;--green:#2c6745;--warn:#805215;--warn-bg:#fff5de;--radius:20px;--sans:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--shadow:0 12px 38px #24385e08}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.5 var(--sans)}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;min-height:44px;padding:10px 16px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-weight:650;display:inline-flex;align-items:center;justify-content:center;gap:8px}button:hover:not(:disabled){background:var(--soft);border-color:#a7b6ee}button:disabled{cursor:default;opacity:.55}.primary{background:var(--blue);border-color:var(--blue);color:white}.primary:hover:not(:disabled){background:var(--blue-dark);border-color:var(--blue-dark)}.quiet{background:transparent;border-color:transparent;color:var(--dim)}.small{font-size:13px;padding:8px 12px}.full{width:100%}a{color:var(--blue);overflow-wrap:anywhere}:focus-visible{outline:3px solid #7894ff;outline-offset:3px}input,textarea,select{display:block;width:100%;min-width:0;min-height:48px;border:1px solid #bbc4d5;border-radius:12px;padding:12px;color:var(--ink);background:#fff}textarea{resize:vertical;line-height:1.55}label{display:block;font-size:14px;font-weight:650}label input,label textarea,label select{margin-top:7px}h1,h2,h3,p{margin:0}h1{font-size:clamp(30px,5vw,58px);line-height:1.08;letter-spacing:-.055em}h2{font-size:22px;line-height:1.25;letter-spacing:-.025em}h3{font-size:16px}p,span,strong{overflow-wrap:anywhere}svg{width:20px;height:20px;flex:none}.muted{color:var(--dim)}.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:800;color:var(--blue)}.pill{font-size:12px;font-weight:650;padding:5px 10px;border-radius:20px;display:inline-flex;align-items:center;gap:6px;background:var(--soft);color:var(--blue-dark)}.pill.good{background:#e9f5ed;color:var(--green)}.pill.warn{background:var(--warn-bg);color:var(--warn)}.dot{width:6px;height:6px;border-radius:50%;background:currentColor}.brand{display:flex;align-items:center;gap:10px;font-size:16px;font-weight:800;letter-spacing:-.025em}.brandmark{background:var(--blue);color:white;border-radius:12px;width:38px;height:38px;display:grid;place-items:center;font-size:24px}.topbar{max-width:1440px;margin:auto;padding:19px 28px;display:flex;align-items:center;justify-content:space-between;gap:14px}.topbar-end{display:flex;gap:12px;align-items:center}.caption{font-size:12px;color:var(--dim)}.loading{min-height:80dvh;display:grid;place-content:center;justify-items:center;gap:20px}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);min-width:0}.notice{padding:12px 16px;border-radius:12px;background:var(--warn-bg);color:var(--warn);font-size:13px}.notice.neutral{background:var(--soft);color:var(--blue-dark)}.error{color:#a22d39;font-size:14px}.stack{display:grid;gap:16px}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.entry{max-width:1100px;margin:5vh auto;padding:28px;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:70px;align-items:center}.entry-copy{display:grid;gap:24px}.entry-copy>p{font-size:18px;max-width:440px;color:var(--dim)}.entry-card{padding:32px;display:grid;gap:22px}.entry-card h2{font-size:26px}.entry-card form{display:grid;gap:18px}.entry-footer{font-size:12px;color:var(--dim);border-top:1px solid var(--line);padding-top:18px}.steps{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}.step{padding:10px 14px;border:1px solid var(--line);border-radius:12px;font-size:13px;background:#fff}.step b{color:var(--blue);margin-right:7px}.art-grid{position:relative;height:170px;max-width:350px;margin-top:12px}.art-piece{position:absolute;border-radius:24px;display:grid;place-items:center;font-size:38px;border:1px solid #24385e12;box-shadow:0 12px 25px #24385e0d}.art-piece.one{background:var(--lime);width:118px;height:118px;left:0;top:12px;transform:rotate(-9deg)}.art-piece.two{background:var(--blue);color:white;width:130px;height:130px;left:100px;top:35px;transform:rotate(6deg)}.art-piece.three{background:#fff;width:95px;height:95px;left:220px;top:0;transform:rotate(11deg)}.workspace{max-width:1440px;margin:auto;padding:0 28px 24px;display:grid;grid-template-columns:238px minmax(0,1fr);gap:20px;min-height:0}.sidebar{padding:23px 18px;display:flex;flex-direction:column;gap:22px;align-self:start}.identity{display:flex;gap:11px;align-items:center}.avatar{width:42px;height:42px;border-radius:14px;background:var(--lime);display:grid;place-items:center;font-weight:800;font-size:18px;flex:none}.nav{display:grid;gap:7px}.nav button{justify-content:flex-start;border-color:transparent;background:transparent;font-weight:600;text-align:left}.nav button.active{background:var(--soft);color:var(--blue-dark)}.sidebar-info{border-top:1px solid var(--line);padding-top:18px;display:grid;gap:9px;font-size:13px;color:var(--dim)}.team-members{display:flex;flex-wrap:wrap;gap:6px}.member{background:var(--bg);border-radius:8px;padding:4px 8px;font-size:12px;color:var(--ink)}.sidebar-foot{font-size:12px;color:var(--dim);line-height:1.6}.mainpanel{min-width:0}.chat-panel{height:calc(100dvh - 104px);min-height:410px;display:flex;flex-direction:column;overflow:hidden}.panel-head{padding:20px 25px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:14px;flex:none}.panel-head h1{font-size:22px;letter-spacing:-.025em;line-height:1.2}.panel-head p{font-size:12px;color:var(--dim);margin-top:4px}.chat-log{overflow-y:auto;overscroll-behavior:contain;padding:26px;display:flex;flex-direction:column;gap:20px;flex:1;min-height:0;scroll-behavior:smooth}.chat-empty{margin:auto;width:100%;max-width:600px;padding:18px 0}.chat-empty h2{font-size:28px;margin:12px 0}.chat-empty>p{color:var(--dim);font-size:15px;max-width:490px}.prompt-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:24px}.prompt-options button{text-align:left;justify-content:flex-start;align-items:flex-start;padding:14px;font-size:13px;line-height:1.5;font-weight:550}.prompt-options button span:first-child{font-size:20px}.message{max-width:90%;align-self:flex-start;min-width:0}.message.user{align-self:flex-end;max-width:85%}.message-label{font-size:11px;color:var(--dim);margin:0 0 6px 3px;font-weight:650;display:flex;gap:8px;align-items:center}.message-body{padding:15px 18px;border:1px solid var(--line);border-radius:4px 18px 18px 18px;white-space:pre-wrap;font-size:15px;line-height:1.65;overflow-wrap:anywhere;background:#fff}.message.user .message-body{background:var(--soft);border-color:var(--soft);border-radius:18px 4px 18px 18px}.message.teacher .message-body{background:#f2f8df;border-color:#e2edc2}.message .share{margin-top:5px;font-size:12px;min-height:44px;padding:6px 10px}.composer{padding:14px 22px 16px;border-top:1px solid var(--line);background:#fff;flex:none}.composer-box{display:flex;align-items:flex-end;gap:10px;border:1px solid #bcc6da;border-radius:15px;padding:8px;background:#fff}.composer textarea{border:0;min-height:48px;max-height:150px;resize:none;padding:10px;box-shadow:none;border-radius:8px}.composer textarea:focus{outline:none}.composer-box:focus-within{outline:2px solid #839afb;outline-offset:2px}.composer button{width:48px;padding:10px;flex:none;border-radius:11px}.composer-foot{display:flex;justify-content:space-between;gap:10px;margin-top:8px;font-size:11px;color:var(--dim)}.chat-status{padding:9px 22px;background:var(--warn-bg);color:var(--warn);font-size:12px;border-bottom:1px solid #f0e2bd;flex:none}.project-panel{padding:26px;display:grid;gap:24px}.project-intro{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.project-intro h1{font-size:29px;letter-spacing:-.035em}.project-intro p{color:var(--dim);margin-top:7px;font-size:14px}.project-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.project-field{padding:20px;border:1px solid var(--line);border-radius:16px;display:grid;gap:12px}.project-field-title{display:flex;align-items:center;gap:10px}.number{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:var(--soft);color:var(--blue);font-size:13px;font-weight:800;flex:none}.project-field p{font-size:12px;color:var(--dim)}.project-field textarea{min-height:130px;font-size:14px}.project-field .row{justify-content:flex-end}.shared-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.shared-item{padding:16px;border-radius:14px;background:var(--bg);font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}.shared-item small{display:block;color:var(--dim);margin-bottom:6px}.defense-box{background:var(--ink);color:white;border-radius:16px;padding:22px;display:grid;gap:9px}.defense-box p{font-size:14px;color:#d7dfed}.host-home{max-width:1100px;margin:25px auto;padding:0 28px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}.host-home>.card{padding:28px}.session-item{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--line);padding-top:16px}.host-workspace{max-width:1440px;margin:auto;padding:0 28px 28px;display:grid;gap:20px}.host-overview{padding:22px 26px;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}.host-overview h1{font-size:28px;letter-spacing:-.03em}.host-overview .caption{margin-top:5px}.host-columns{display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px;align-items:start}.roster{padding:18px;display:grid;gap:18px}.team-roster{display:grid;gap:6px}.team-roster h3{padding:0 8px 6px;font-size:13px}.roster-person{width:100%;justify-content:flex-start;text-align:left;background:transparent;border-color:transparent;padding:10px;gap:10px}.roster-person.active{background:var(--soft);border-color:#d5dfff}.roster-person .avatar{width:34px;height:34px;border-radius:10px;font-size:13px}.roster-person .details{flex:1;min-width:0;font-size:13px}.roster-person .details span{display:block;font-size:11px;color:var(--dim);font-weight:400}.count{font-size:12px;color:var(--blue);background:white;border:1px solid var(--line);padding:3px 8px;border-radius:8px}.inspect{min-height:450px}.inspect-head{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:20px 24px;border-bottom:1px solid var(--line);flex-wrap:wrap}.inspect .chat-log{max-height:500px;min-height:200px}.teacher-note{padding:18px 24px;border-top:1px solid var(--line)}.teacher-note form{display:flex;align-items:flex-end;gap:12px}.teacher-note label{flex:1;min-width:0}.teacher-note textarea{font-size:14px;min-height:75px}.qr-panel{display:grid;grid-template-columns:200px minmax(0,1fr);gap:28px;align-items:center;padding:25px}.qr-panel img{width:200px;height:200px;max-width:100%;background:white}.qr-panel h2{font-size:25px}.qr-panel .code{font:800 32px/1.2 ui-monospace,monospace;letter-spacing:.15em;margin:14px 0}.qr-panel a{font-size:13px}.qr-panel p{font-size:14px;color:var(--dim);margin-top:8px}.empty-section{padding:40px 24px;text-align:center;display:grid;gap:12px;color:var(--dim)}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:13px 20px;border-radius:12px;box-shadow:0 8px 30px #19243c20;background:var(--ink);color:#fff;font-size:14px;max-width:calc(100% - 32px);width:max-content;z-index:50;opacity:0;pointer-events:none;transition:opacity .2s}.toast.show{opacity:1}.team-project-preview{padding:24px;display:grid;gap:18px}.preview-field{border-bottom:1px solid var(--line);padding-bottom:16px}.preview-field p{white-space:pre-wrap;font-size:14px;margin-top:8px;color:var(--dim)}.hint-toggle{font-weight:500;font-size:12px}.hint-content{font-size:13px;padding:12px 0;color:var(--dim)}
@media(min-width:1500px){.chat-panel{height:calc(100dvh - 130px)}}
@media(max-width:900px){.workspace{grid-template-columns:190px minmax(0,1fr);padding:0 18px 18px;gap:14px}.sidebar{padding:18px 13px}.topbar{padding:16px 18px}.host-workspace{padding:0 18px 18px}.host-columns{grid-template-columns:240px minmax(0,1fr)}.entry{gap:30px}.project-fields{grid-template-columns:1fr}.shared-grid{grid-template-columns:1fr}}
@media(max-width:640px){.topbar{padding:12px 16px;min-height:62px}.brand{font-size:14px}.brandmark{width:32px;height:32px;border-radius:10px;font-size:21px}.topbar-end .caption{display:none}.topbar-end{gap:6px}.topbar-end button{padding:7px 10px}.entry{grid-template-columns:1fr;margin:15px auto;padding:16px;gap:25px}.entry-copy{gap:14px}.entry-copy h1{font-size:38px;max-width:350px}.entry-copy>p{font-size:16px}.art-grid{display:none}.steps{gap:6px;margin-top:0}.step{font-size:11px;padding:8px 10px}.entry-card{padding:24px;gap:18px}.workspace{display:block;padding:0 10px 10px}.sidebar{display:block;padding:0;background:transparent;border:0;box-shadow:none;margin-bottom:10px}.sidebar .identity,.sidebar-info,.sidebar-foot{display:none}.nav{display:grid;grid-template-columns:1fr 1fr;gap:6px;background:#e8ecf4;padding:4px;border-radius:14px}.nav button{justify-content:center;font-size:13px;min-height:44px;padding:8px}.nav button.active{background:white;box-shadow:0 2px 5px #19243c08}.chat-panel{height:calc(100dvh - 134px);min-height:330px;border-radius:17px}.panel-head{padding:14px 16px}.panel-head h1{font-size:18px}.panel-head p{font-size:11px}.panel-head .pill{font-size:10px;padding:4px 7px}.chat-log{padding:18px 14px;gap:17px}.chat-empty{padding:5px 0}.chat-empty h2{font-size:24px}.chat-empty>p{font-size:14px}.prompt-options{gap:8px;margin-top:18px}.prompt-options button{font-size:12px;padding:11px;display:block}.prompt-options button span:first-child{display:block;font-size:20px;margin-bottom:5px}.message{max-width:98%}.message.user{max-width:90%}.message-body{font-size:14px;padding:12px 14px}.composer{padding:10px 11px max(10px,env(safe-area-inset-bottom))}.composer-box{gap:4px;padding:5px}.composer textarea{font-size:16px;padding:8px;min-height:46px}.composer button{width:44px;min-height:44px}.composer-foot{font-size:10px;margin-top:7px}.chat-status{padding:8px 14px;font-size:11px}.project-panel{padding:20px 15px;border-radius:17px;gap:20px}.project-intro{display:block}.project-intro h1{font-size:25px}.project-intro .pill{margin-top:12px}.project-field{padding:15px}.project-fields{gap:12px}.host-home{grid-template-columns:1fr;padding:0 16px;margin:12px auto;gap:16px}.host-home>.card{padding:22px}.host-workspace{padding:0 10px 20px;gap:12px}.host-overview{padding:18px}.host-overview h1{font-size:24px}.host-overview>.row{width:100%}.host-overview>.row button{flex:1;font-size:12px;padding:9px}.host-columns{grid-template-columns:1fr;gap:12px}.roster{padding:13px;max-height:300px;overflow:auto;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.team-roster{align-content:start}.team-roster h3{font-size:12px;padding-left:4px}.roster-person{padding:7px;gap:7px}.roster-person .avatar{display:none}.roster-person .details{font-size:12px}.count{font-size:11px;padding:2px 6px}.inspect-head{padding:16px}.inspect-head h2{font-size:19px}.teacher-note{padding:15px}.teacher-note form{display:grid;gap:10px}.qr-panel{grid-template-columns:1fr;padding:22px;gap:15px;justify-items:center;text-align:center}.qr-panel img{width:180px;height:180px}.qr-panel h2{font-size:22px}.qr-panel .code{font-size:26px}.topbar .host-label{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.home-title{font-size:32px}
/* Искра: собственная мастерская и ИИ-персонажи */
:root{--bg:#f6f4fb;--ink:#28233e;--dim:#696479;--line:#e5e0ee;--blue:#6750de;--blue-dark:#5039c0;--soft:#efebff;--lime:#e5efa5;--radius:24px;--shadow:0 12px 40px #4a386506}
body{background:radial-gradient(ellipse at 95% 0%,#ece6ff80,transparent 48%),var(--bg)}button{transition:background .15s,border-color .15s,transform .15s}button:active:not(:disabled){transform:translateY(1px)}.brand{font-size:24px;letter-spacing:-.055em;line-height:1}.brandmark{background:var(--blue);border-radius:13px;transform:rotate(-6deg);font-size:30px;box-shadow:0 4px 0 #dfd5ff}.brand-tag{display:block;font-size:10px;letter-spacing:.03em;color:var(--dim);font-weight:500;margin-top:6px}.topbar{padding-top:18px;padding-bottom:20px}.card{box-shadow:var(--shadow)}.identity-pill{font-size:13px;background:#fff;border:1px solid var(--line);padding:6px 12px 6px 6px;border-radius:30px;display:flex;align-items:center;gap:8px;font-weight:650}.identity-dot{width:28px;height:28px;border-radius:50%;background:var(--lime);color:#465123;display:grid;place-items:center}.title-accent{display:block;color:var(--blue)}.entry{max-width:1160px;margin:3vh auto;gap:90px}.entry h1{font-size:clamp(42px,5.5vw,74px);letter-spacing:-.065em}.entry-card{padding:35px;background:#fffdfb;border-color:#e5e0ee;border-radius:30px}.entry-pets{display:flex;height:175px;position:relative;max-width:380px}.entry-pets .pet-art{width:200px;height:200px;position:relative;margin-top:-10px}.entry-pets .pet-art+svg{margin-left:-35px;transform:rotate(8deg)}.steps{margin-top:0}.step{background:transparent;border:0;padding:0 14px 0 0;color:var(--dim)}.step b{background:#e8e0ff;border-radius:50%;display:inline-grid;place-items:center;width:25px;height:25px;font-size:11px}.workspace{grid-template-columns:235px minmax(0,1fr);gap:24px;max-width:1360px}.sidebar{background:#eeebf6;border-color:transparent;box-shadow:none;gap:22px;padding:18px 14px 22px}.pet-sidebar{text-align:center;display:grid;justify-items:center}.pet-halo{width:174px;height:155px;position:relative;background:radial-gradient(ellipse,#fff9e8 0%,#fff9e880 62%,transparent 63%)}.pet-art{width:100%;height:100%;max-width:100%;flex:none;overflow:visible}.pet-halo .pet-art{width:174px;height:174px;position:relative;top:-13px}.pet-sidebar .eyebrow{font-size:9px;letter-spacing:.12em;margin-top:4px}.pet-sidebar-name{font-size:25px;line-height:1.25;letter-spacing:-.035em;margin:4px 0}.pet-sidebar .quiet{font-size:11px;padding:5px 8px;min-height:36px}.sidebar .nav{gap:8px}.sidebar .nav button{padding:13px 14px;border-radius:14px;font-size:14px;color:#655c79}.sidebar .nav button.active{background:#fff;color:var(--blue);box-shadow:0 3px 8px #2a224005}.sidebar-info{padding:18px 8px 0;border-color:#dcd5e8;font-size:12px}.member{background:#fff9;border-radius:20px;padding:5px 10px}.sidebar-foot{padding:0 8px;display:flex;gap:8px;align-items:flex-start;font-size:11px}.tiny-spark{font-size:24px;color:var(--blue);line-height:1}.chat-panel{height:calc(100dvh - 110px);min-height:450px;border-radius:26px;background:#fffdfb;border-color:#e8e3ee}.panel-head{padding:13px 24px;min-height:82px;background:#fffdfb}.pet-heading{padding:0;gap:11px;justify-content:flex-start;text-align:left;min-width:0}.pet-heading:hover:not(:disabled){background:transparent;border-color:transparent}.pet-heading-avatar{width:52px;height:52px;display:block;border-radius:18px;background:#f2edff;overflow:hidden}.pet-heading-avatar .pet-art{width:66px;height:66px;max-width:none;position:relative;top:-5px;left:-6px}.pet-heading h1{font-size:20px;letter-spacing:-.025em}.pet-subtitle{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--dim);margin-top:3px}.online-dot{width:5px;height:5px;display:inline-block;background:#64a580;border-radius:50%}.panel-head .pill{background:#f2f7e7;color:#4d6634;font-size:10px;font-weight:600}.chat-log{padding:24px 7%;gap:24px;background:#fffdfb}.chat-empty{max-width:640px;text-align:center;padding:4px 0 15px}.welcome-art{height:150px;width:200px;position:relative;margin:0 auto 10px}.welcome-art .pet-art{height:172px;width:172px;position:absolute;left:8px;top:-12px}.welcome-sticker{position:absolute;top:28px;right:-36px;border:1px solid #e3deeb;background:#fff;box-shadow:3px 4px 0 #eee9f8;transform:rotate(7deg);border-radius:10px 10px 10px 0;padding:8px 12px;font-size:12px;color:#766889;font-weight:600}.chat-empty h2{font-size:32px;line-height:1.16;letter-spacing:-.04em;margin:11px 0 12px}.chat-empty>p{max-width:450px;margin:auto;font-size:14px;color:var(--dim)}.chat-empty .eyebrow{font-size:10px;color:var(--blue)}.prompt-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:24px;text-align:left}.prompt-options button{background:#f5f2fb;border:1px solid #e9e3f1;flex-direction:column;gap:11px;font-size:12px;padding:15px;font-weight:550;position:relative;line-height:1.35;color:#544967}.prompt-options button>span:first-child{font-size:23px;line-height:1;color:var(--blue)}.prompt-options button>svg{position:absolute;right:10px;top:16px;width:14px;height:14px;color:#a99cc4}.prompt-options button:hover:not(:disabled){background:#eeebfa}.message{width:100%;max-width:100%}.message.user{width:auto;max-width:82%}.message-label{font-size:11px;gap:7px;color:#8a8296;min-height:24px;margin:0 0 9px}.message-label strong{font-weight:600;color:#51485f}.message-label svg{width:17px;height:17px}.message-pet{display:block;width:31px;height:31px;background:#eee7fb;border-radius:11px;overflow:hidden;margin-left:-4px}.message-pet .pet-art{width:40px;height:40px;max-width:none;position:relative;top:-3px;left:-4px}.ai-label{font-size:9px;letter-spacing:.04em;background:#f0ecf6;color:#7f728c;padding:1px 5px;border-radius:4px}.message-body{font-size:15px;border:0;background:transparent;border-radius:0;padding:0;white-space:normal;line-height:1.72;color:#3c344b}.message.user .message-body{padding:13px 17px;background:#eee7fb;border:0;border-radius:20px 20px 5px 20px;white-space:pre-wrap}.message.teacher .message-body{background:#f1f5df;border:1px solid #e1e8c6;border-radius:16px;padding:14px 17px}.rich-paragraph{margin:0 0 13px}.rich-paragraph:last-child{margin-bottom:0}.rich-paragraph h3{font-size:16px;line-height:1.5;margin:14px 0 4px}.rich-paragraph h3:first-child{margin-top:0}.rich-paragraph code{background:#eee9f6;border:1px solid #e4ddee;border-radius:5px;padding:1px 5px;font:13px/1.6 ui-monospace,SFMono-Regular,monospace;overflow-wrap:anywhere}.rich-bullet{display:flex;gap:9px;margin:5px 0}.rich-bullet>span:first-child{color:var(--blue)}.message-actions{display:flex;flex-wrap:wrap;gap:2px;margin-top:9px}.message-actions button{font-size:10px;min-height:36px;padding:7px 9px;color:#81758f;font-weight:500;gap:5px}.message-actions svg{width:14px;height:14px}.message-actions .share{margin:0}.message-error{font-size:12px;color:#a64248;margin-top:10px}.code-card{border:1px solid #dfd8e9;border-radius:14px;overflow:hidden;margin:12px 0;background:#f6f3fa}.code-toolbar{display:flex;justify-content:space-between;align-items:center;padding:4px 8px 4px 15px;background:#eee9f5;font-size:11px;color:#726480;gap:8px}.code-toolbar>div{display:flex;gap:2px}.code-toolbar button{font-size:10px;min-height:36px;padding:4px 8px;background:transparent;border:0;color:#665479}.code-card pre{white-space:pre;overflow:auto;max-width:100%;font:12px/1.7 ui-monospace,SFMono-Regular,monospace;margin:0;padding:18px;color:#3c3153}.generated-image{margin:14px 0 6px;width:100%;max-width:520px;border:1px solid #e6dfed;border-radius:18px;overflow:hidden;background:#f6f1fb}.generated-image img{display:block;width:100%;height:auto;min-height:160px;object-fit:contain;color:var(--dim);font-size:12px}.generated-image figcaption{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 12px;font-size:10px;color:var(--dim)}.generated-image figcaption button{font-size:10px;min-height:36px;padding:6px}.composer{background:#fffdfb;border-top:1px solid #eee9f2;padding:12px 6% 13px;flex:none}.compose-tools{display:flex;gap:5px;margin-bottom:8px}.compose-tools button{min-height:35px;border:0;background:transparent;padding:7px 11px;border-radius:10px;font-size:11px;color:#82758e;font-weight:550;gap:6px}.compose-tools button.active{background:#eee8fb;color:var(--blue)}.compose-tools svg{width:15px;height:15px}.image-count{border:1px solid #dcd1ef;min-width:18px;height:18px;padding:0 4px;border-radius:5px;font-size:9px;display:grid;place-items:center;line-height:1;color:#7c6c94}.composer-box{border:1px solid #dcd3e8;box-shadow:0 3px 7px #57436a04;background:#fff;border-radius:19px;padding:7px 8px 7px 14px;display:flex;align-items:flex-end;gap:8px}.composer-box:focus-within{border-color:#9a84d7;box-shadow:0 0 0 3px #ede7fb}.composer textarea{background:transparent;border:0;box-shadow:none;outline:0;min-height:49px;max-height:170px;padding:5px 0;resize:none;line-height:1.55;font-size:14px;color:var(--ink)}.composer textarea:focus-visible{outline:0}.send-button{width:43px;height:43px;min-height:43px;padding:10px;border-radius:14px;flex:none;box-shadow:0 3px 0 #4433aa}.send-button:disabled{box-shadow:none}.composer-foot{display:flex;justify-content:space-between;gap:10px;font-size:9px;color:#8a8293;margin-top:8px;padding:0 2px}.compose-mode-hint{font-size:11px;color:#7b6b90;margin:0 0 10px;padding:0 2px}.thinking{display:flex;align-items:center;gap:12px;color:var(--dim);font-size:12px}.thinking-pet{width:42px;height:42px;flex:none;display:block;background:#eee8f7;border-radius:14px}.thinking-dots{display:inline-block;letter-spacing:3px;margin-left:5px;animation:blink 1s infinite alternate}.send-spinner{width:17px;height:17px;border:2px solid #ffffff70;border-top-color:white;border-radius:50%;animation:spin .7s linear infinite}.pet-overlay{position:fixed;inset:0;background:#30234445;backdrop-filter:blur(9px);z-index:70;display:grid;place-items:center;padding:28px;overflow-y:auto}.pet-dialog{width:100%;max-width:830px;padding:30px 38px;background:#fffdfb;box-shadow:0 25px 120px #30234426;max-height:calc(100dvh - 56px);overflow:auto}.pet-dialog h1{font-size:39px;letter-spacing:-.045em;line-height:1.13;margin:12px 0 14px}.pet-dialog>.muted{max-width:590px;font-size:14px;line-height:1.6}.pet-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:24px 0}.pet-option{position:relative;display:flex;flex-direction:column;gap:4px;padding:8px 8px 15px;background:#f4f0f8;border:2px solid transparent;border-radius:19px;min-width:0}.pet-option.selected{border-color:#9274dc;background:#f0e9ff;box-shadow:0 0 0 3px #f0e9ff}.pet-option .pet-art{width:140px;height:130px;max-width:100%;margin-top:-5px}.pet-option strong{font-size:14px}.pet-option>span:not(.pet-check){font-size:9px;font-weight:400;color:var(--dim)}.pet-check{position:absolute;right:9px;top:9px;background:var(--blue);color:white;border-radius:50%;height:21px;width:21px;font-size:11px;display:grid;place-items:center}.pet-dialog form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:end}.pet-dialog form button{height:49px;min-height:49px;border-radius:13px;font-size:13px}.pet-dialog input{font-size:16px;height:49px}.pet-disclosure{margin-top:19px;font-size:11px;max-width:600px}.project-panel{background:#fffdfb}.project-panel h1{font-size:35px;letter-spacing:-.045em}.project-field{background:#f6f2fc;border-color:#e6deef}.defense-box{background:#3d315e}.shared-item{background:#f3eef8}.host-overview,.roster,.inspect,.qr-panel,.host-home>.card{background:#fffdfb}.host-overview h1{font-size:27px}.host-overview .pill.good{background:#edf3df}.roster-person.active{background:#eee8f9;border-color:#e0d4f3}.roster-person .avatar{background:#e1e9b6;color:#54662b}.inspect .chat-log{padding:22px 28px}.inspect .message.user{max-width:80%}.host-home .home-title{font-size:36px}.teacher-note textarea{background:#fff}.host-workspace .qr-panel img{border-radius:15px}.toast{background:#35294b}.message-body .code-card button{color:#665479}@keyframes blink{to{opacity:.35}}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:1000px){.workspace{grid-template-columns:190px minmax(0,1fr);gap:16px}.pet-halo{width:150px;height:140px}.pet-halo .pet-art{width:160px;height:160px;left:-5px}.sidebar{padding:15px 10px}.sidebar .nav button{font-size:12px;padding:12px}.chat-log{padding:22px 5%}.entry{gap:40px}.entry h1{font-size:55px}.pet-sidebar-name{font-size:22px}.pet-option .pet-art{height:115px}}
@media(max-width:640px){.topbar{height:64px;padding:11px 17px}.brand{font-size:22px}.brand-tag{font-size:8px;margin-top:4px}.brandmark{width:33px;height:33px;font-size:27px}.identity-pill{font-size:11px;padding:4px 8px 4px 4px;max-width:170px;gap:6px}.identity-dot{width:24px;height:24px}.entry{margin:0 auto;padding:22px 20px 30px;gap:22px}.entry-copy{gap:12px}.entry h1{font-size:45px;line-height:1.05}.entry-copy>p{font-size:14px;line-height:1.6;max-width:320px}.entry .eyebrow{font-size:9px}.entry-pets{position:absolute;right:12px;top:105px;width:105px;height:140px;opacity:.95;pointer-events:none}.entry-pets .pet-art{width:130px;height:130px;max-width:none;transform:rotate(8deg);margin:0}.entry-pets .pet-art+svg{display:none}.entry-copy h1{max-width:245px}.entry .steps{display:none}.entry-card{padding:24px 22px;border-radius:25px}.entry-card h2{font-size:25px}.entry-card .eyebrow{font-size:9px}.entry-footer{font-size:11px;line-height:1.7}.workspace{display:block;padding:0 8px 8px}.sidebar{background:transparent;border:0;margin-bottom:8px;padding:0}.pet-sidebar,.sidebar-info,.sidebar-foot{display:none}.sidebar .nav{grid-template-columns:1fr 1fr;padding:4px;background:#eae5f3;border-radius:15px;gap:4px}.sidebar .nav button{min-height:40px;padding:8px;font-size:12px;border-radius:11px}.sidebar .nav button.active{background:#fffdfb}.sidebar .nav svg{width:17px;height:17px}.chat-panel{height:calc(100dvh - 128px);min-height:350px;border-radius:22px}.panel-head{padding:10px 14px;min-height:71px}.pet-heading{gap:9px}.pet-heading-avatar{height:44px;width:44px;border-radius:14px}.pet-heading-avatar .pet-art{height:57px;width:57px;left:-5px;top:-4px}.pet-heading h1{font-size:18px}.pet-subtitle{font-size:10px}.panel-head .pill{font-size:9px;padding:5px 8px}.chat-log{padding:18px 17px;gap:21px}.chat-empty{padding:0 0 10px}.welcome-art{height:110px;width:160px;margin-bottom:8px}.welcome-art .pet-art{height:128px;width:128px;left:10px;top:-9px}.welcome-sticker{font-size:10px;top:15px;right:-20px;padding:6px 8px}.chat-empty h2{font-size:25px;line-height:1.2;margin:9px 0 10px}.chat-empty>p{font-size:12px;max-width:290px;line-height:1.6}.chat-empty .eyebrow{font-size:9px}.prompt-options{grid-template-columns:1fr;gap:7px;margin-top:17px}.prompt-options button{flex-direction:row;display:flex;align-items:center;font-size:11px;min-height:44px;padding:10px 12px;gap:10px;border-radius:12px}.prompt-options button>span:first-child{font-size:20px;margin:0;width:20px;text-align:center}.prompt-options button>svg{top:14px;right:11px}.message-body{font-size:14px;line-height:1.7}.message.user{max-width:90%}.message.user .message-body{padding:12px 15px;border-radius:17px 17px 5px 17px}.message-label{font-size:10px;gap:6px}.message-actions{gap:0;margin-left:-4px}.message-actions button{min-height:44px;padding:7px;font-size:10px}.message-actions svg{width:13px}.composer{padding:8px 11px max(9px,env(safe-area-inset-bottom))}.compose-tools{gap:4px;margin-bottom:7px}.compose-tools button{font-size:10px;min-height:36px;padding:6px 9px}.composer-box{padding:6px 6px 6px 12px;border-radius:17px}.composer textarea{font-size:16px;min-height:46px;max-height:130px;padding:4px 0;line-height:1.45}.composer .send-button{width:40px;min-height:40px;height:40px;padding:9px;border-radius:12px}.composer-foot{font-size:8px;margin-top:7px}.compose-mode-hint{font-size:10px;line-height:1.5;margin-bottom:8px}.chat-status{padding:8px 14px;font-size:10px}.pet-overlay{padding:12px;align-items:center}.pet-dialog{padding:20px 18px;max-height:calc(100dvh - 24px);border-radius:24px}.pet-dialog h1{font-size:29px;margin:12px 0}.pet-dialog .eyebrow{font-size:9px}.pet-dialog>.muted{font-size:12px;line-height:1.55}.pet-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:18px 0}.pet-option{padding:5px 7px 10px;gap:1px;border-radius:16px}.pet-option .pet-art{height:100px;width:116px;margin-top:-5px}.pet-option strong{font-size:12px}.pet-option>span:not(.pet-check){font-size:9px}.pet-check{width:18px;height:18px;top:7px;right:7px;font-size:10px}.pet-dialog form{grid-template-columns:1fr;gap:12px}.pet-dialog label{font-size:12px}.pet-disclosure{font-size:9px;line-height:1.6;margin-top:14px}.pet-dialog .row>button{min-height:32px;padding:4px 8px}.code-toolbar{padding:4px 5px 4px 10px}.code-toolbar button{min-height:44px;font-size:9px;padding:5px}.code-card pre{padding:13px;font-size:11px}.generated-image figcaption{font-size:9px;padding:4px 10px}.generated-image figcaption button{min-height:44px}.project-panel h1{font-size:27px}.project-field{border-radius:16px}.inspect .chat-log{padding:18px 15px}.host-overview h1{font-size:23px}}
@media(max-width:350px){.identity-pill{max-width:140px;font-size:10px}.entry h1{font-size:39px}.entry-pets{right:6px;top:109px;width:88px}.entry-pets .pet-art{width:103px;height:103px}.chat-log{padding:15px 12px}.chat-empty h2{font-size:23px}.welcome-sticker{right:-9px}.pet-options{gap:7px}.pet-option .pet-art{height:83px;width:100px}.pet-option>span:not(.pet-check){font-size:8px}.pet-dialog{padding:18px 14px}.pet-dialog h1{font-size:26px}.pet-dialog>.muted{font-size:11px}}
@media(prefers-reduced-motion:reduce){.thinking-dots,.send-spinner{animation:none}}
.pet-dialog{max-width:930px}.pet-options{grid-template-columns:repeat(5,minmax(0,1fr));max-height:330px;overflow-y:auto;padding:4px;margin:9px -4px 20px;scrollbar-width:thin;scrollbar-color:#baa7dd #f4eef9}.pet-list-caption{font-size:11px;color:var(--dim);margin-top:18px}.pet-option .pet-art{height:113px}.pet-character{animation:pet-breathe 5s ease-in-out infinite;transform-origin:50% 90%;transform-box:fill-box}.pet-eyes{animation:pet-blink 6.8s infinite;transform-box:fill-box;transform-origin:center}.pet-option:nth-child(2n) .pet-character{animation-delay:-2s}.pet-option:nth-child(3n) .pet-eyes{animation-delay:-3.2s}.pet-option:hover .pet-art{transform:rotate(-3deg);transition:transform .2s}.pet-option.selected .pet-art{transform:rotate(2deg)}.message-pet .pet-character,.message-pet .pet-eyes{animation:none}@keyframes pet-breathe{0%,100%{transform:translateY(0) rotate(-.5deg)}50%{transform:translateY(-3px) rotate(.5deg)}}@keyframes pet-blink{0%,42%,46%,100%{transform:scaleY(1)}44%{transform:scaleY(.12)}}@media(max-width:640px){.pet-options{grid-template-columns:repeat(2,minmax(0,1fr));max-height:min(37dvh,310px);margin-top:7px;margin-bottom:15px}.pet-option .pet-art{height:97px}.pet-list-caption{font-size:10px;margin-top:13px}.pet-dialog{max-width:440px}.pet-dialog h1{font-size:27px;margin:9px 0}.pet-dialog>.muted{font-size:11px}.pet-dialog form{gap:10px}.pet-disclosure{margin-top:11px}}@media(max-width:350px){.pet-option .pet-art{height:81px}.pet-dialog h1{font-size:24px}}@media(prefers-reduced-motion:reduce){.pet-character,.pet-eyes{animation:none}.pet-option:hover .pet-art,.pet-option.selected .pet-art{transform:none;transition:none}}
/* Выбор персонажа: прокручивается только каталог, имя и кнопка всегда рядом. */
.pet-dialog{display:flex;flex-direction:column;height:min(760px,calc(100dvh - 56px));overflow:hidden;min-height:0}.pet-dialog>.row,.pet-dialog>h1,.pet-dialog>.muted,.pet-list-caption,.pet-dialog>form,.pet-disclosure{flex-shrink:0}.pet-options{flex:1;min-height:80px;max-height:none;align-content:start;overflow-y:auto}.pet-option{min-height:156px}.pet-dialog form{margin-top:auto}.compose-tools button,.sidebar .nav button,.composer .send-button{min-height:44px}.composer .send-button{height:44px;width:44px}.pet-sidebar .quiet,.code-toolbar button,.generated-image figcaption button,.message-actions button{min-height:44px}.pet-dialog .row>button{min-height:44px;min-width:44px}.pet-overlay{overscroll-behavior:contain}.pet-options{overscroll-behavior:contain}
@media(max-width:640px){.pet-dialog{height:min(760px,calc(100dvh - 24px))}.pet-options{max-height:none;min-height:80px}.pet-option{min-height:137px}.pet-dialog form{padding-top:2px}.chat-panel{height:calc(100dvh - 132px)}}
@media(max-height:600px){.pet-overlay{padding:10px}.pet-dialog{height:calc(100dvh - 20px);max-height:calc(100dvh - 20px);padding:12px 18px}.pet-dialog>.row{min-height:22px}.pet-dialog>.row>button{min-height:32px;height:32px}.pet-dialog h1{font-size:23px;margin:5px 0;line-height:1.15}.pet-dialog h1 br{display:none}.pet-dialog>.muted,.pet-disclosure{display:none}.pet-list-caption{margin-top:5px;font-size:10px}.pet-options{margin:5px -4px 10px;min-height:65px}.pet-option{min-height:117px}.pet-option .pet-art{height:79px}.pet-dialog form{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.pet-dialog form label{font-size:10px}.pet-dialog input{height:44px;min-height:44px;margin-top:3px;padding:9px}.pet-dialog form button{height:44px;min-height:44px;font-size:11px}.pet-dialog .pet-options{grid-template-columns:repeat(5,minmax(0,1fr))}.pet-option>span:not(.pet-check){display:none}}
@media(max-height:600px) and (max-width:640px){.pet-dialog .pet-options{grid-template-columns:repeat(2,minmax(0,1fr))}.pet-dialog form{grid-template-columns:1fr;gap:7px}.pet-dialog h1{font-size:21px}}
/* Кнопки режима имеют ширину по тексту; размер send не распространяется на них. */
.composer .compose-tools{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.composer .compose-tools button{width:auto;min-width:0;min-height:44px;height:auto;flex:0 0 auto;padding:8px 11px;white-space:nowrap;position:static;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.composer .compose-tools button svg{flex:0 0 15px;width:15px;height:15px}
.composer .compose-tools .image-count{flex:none}
@media(max-width:640px){.composer .compose-tools button{padding:8px 10px;font-size:11px}}
/* Личный кабинет: вход, сохранённые беседы и мобильный список. */
.auth-tabs{display:flex;background:#eee9f7;padding:4px;border-radius:14px;gap:4px}.auth-tabs button{flex:1;min-height:44px;border:0;background:transparent}.auth-tabs button.active{background:#fff;box-shadow:0 2px 7px #39255e12;color:var(--blue)}.teacher-entry{font-size:12px;text-align:center;color:var(--dim)}.desktop-chats{display:grid;gap:12px;margin-top:18px;min-width:0}.saved-chats{display:grid;gap:5px;max-height:270px;overflow:auto;min-width:0}.saved-chat{display:flex;gap:9px;text-align:left;align-items:center;min-height:44px;padding:10px;border:0;background:transparent;min-width:0;width:100%}.saved-chat>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.saved-chat svg{width:17px;height:17px;display:block}.saved-chat.active{background:#eee7ff;color:var(--blue)}.chat-memory-note{font-size:11px;line-height:1.5}.chat-titlebar{display:flex;align-items:center;gap:9px;border-bottom:1px solid var(--line,#e8e2ef);padding:4px 18px;min-height:48px;flex-shrink:0}.chat-titlebar>strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.chat-titlebar button{min-height:44px;font-size:11px;padding:7px 10px}.mobile-chats{display:none}.rename-chat{display:flex;align-items:end;gap:8px;padding:12px 18px;background:#f7f4fc}.rename-chat label{flex:1;min-width:0;font-size:12px}.rename-chat input{width:100%;min-width:0;margin-top:4px}.rename-chat button{min-height:44px;font-size:12px;padding:8px}.chats-overlay{position:fixed;inset:0;z-index:80;background:#20173780;display:flex;align-items:center;justify-content:center;padding:16px;backdrop-filter:blur(6px)}.chats-dialog{width:min(420px,100%);max-height:calc(100dvh - 32px);padding:20px;display:flex;flex-direction:column;gap:16px;min-width:0}.chats-dialog .saved-chats{max-height:none;overflow:auto;min-height:0}.chats-dialog h2{font-size:24px;margin:0}.chats-dialog .row button{min-width:44px;min-height:44px}.account-exit{min-height:44px}.entry-card form input{min-width:0}.entry-card .error{line-height:1.5}.entry-card{min-width:0}
@media(max-width:640px){.desktop-chats{display:none}.mobile-chats{display:inline-flex;align-items:center;justify-content:center;min-width:44px}.chat-titlebar{padding:2px 8px;gap:4px}.chat-titlebar>strong{font-size:12px}.account-exit{font-size:11px;padding:7px}.topbar-end{gap:5px}.identity-pill{max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rename-chat{flex-wrap:wrap;padding:10px}.rename-chat label{flex-basis:100%}.rename-chat button{flex:1}.chats-dialog{border-radius:23px;padding:18px}.chats-dialog .primary{flex-shrink:0}.entry-card{padding:22px}.entry-copy h1{font-size:38px}.auth-tabs button{font-size:13px}.entry-footer{margin-top:8px}}
