/* ================= Luna platform — «Живе бенто» on the Luna design system ================= */
:root{
  --ink:#000000; --ink-soft:#333333; --muted:#5c5c5c; --line:#dfdfdf; --line-2:#ececec;
  --white:#ffffff; --paper:#fafafa; --chip:#f4f4f4;
  --yellow:#ffee00; --yellow-soft:#fff680; --yellow-wash:#fffad4;
  --blue:#a3d8ff; --blue-wash:#eaf6ff; --mist:#eef1ea;
  --success:#006400; --error:#8b0000;
  --r-tile:24px; --r-card:18px; --r-btn:14px; --r-field:6px; --r-pill:100px;
  --shadow-btn:0 2px 3px rgba(0,0,0,.2);
  --font:"Onest",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --cjk:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0}
body{font-family:var(--font);color:var(--ink);background:var(--white);-webkit-font-smoothing:antialiased;font-size:14px;line-height:1.5}
button,input,select,textarea{font:inherit;color:inherit}
a{color:inherit}
h1,h2,h3,h4{margin:0;letter-spacing:-.01em}
.hidden{display:none !important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:1.5px solid var(--ink);outline-offset:.2em}
.mark{box-shadow:inset 0 -.3em 0 var(--yellow)}
.mark-blue{box-shadow:inset 0 -.3em 0 var(--blue)}
.cjk{font-family:var(--cjk);font-weight:700}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 20px;border-radius:var(--r-btn);
  border:1px solid transparent;font-size:14px;font-weight:600;cursor:pointer;text-decoration:none;white-space:nowrap;
  transition:transform .12s ease,background .15s,border-color .15s,box-shadow .15s;background:none}
.btn:active{transform:scale(.97)}
.btn:disabled{opacity:.45;cursor:not-allowed;transform:none}
.btn svg{width:18px;height:18px;flex-shrink:0}
.btn-primary{background:var(--ink);color:var(--white);box-shadow:var(--shadow-btn)}
.btn-primary:hover{background:#222}
.btn-line{border-color:var(--ink);color:var(--ink);background:var(--white)}
.btn-line:hover{background:var(--chip)}
.btn-ghost{border-color:var(--line);background:var(--white)}
.btn-ghost:hover{border-color:#bdbdbd}
.btn-soft{background:var(--chip)}
.btn-soft:hover{background:#e9e9e9}
.btn-yellow{background:var(--yellow);color:var(--ink)}
.btn-danger{border-color:var(--error);color:var(--error);background:var(--white)}
.btn-sm{min-height:36px;padding:0 14px;font-size:13px;border-radius:12px}
.btn-lg{min-height:52px;padding:0 24px;font-size:15px}
.btn-block{width:100%}
.icon-btn{width:40px;height:40px;border-radius:12px;border:1px solid var(--line);background:var(--white);display:inline-grid;place-items:center;cursor:pointer;color:var(--ink);transition:border-color .15s,background .15s}
.icon-btn:hover{border-color:var(--ink)}
.icon-btn svg{width:18px;height:18px}
.icon-btn.on{background:var(--ink);border-color:var(--ink);color:var(--white)}

/* ---------- fields ---------- */
.field{display:flex;flex-direction:column;gap:6px;margin-top:14px}
.field>span,.label{font-size:14px;font-weight:500}
.input,select.input,textarea.input{width:100%;min-height:44px;padding:11px 13px;border:1px solid var(--line);border-radius:var(--r-field);background:var(--white);font-size:15px;outline:none;transition:border-color .15s}
.input:focus{border-color:var(--ink)}
textarea.input{min-height:84px;resize:vertical;line-height:1.5}
.hint{font-size:12.5px;color:var(--muted)}
.err{color:var(--error);font-size:13px;font-weight:600;min-height:18px}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.check{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer}
.check input{width:18px;height:18px;accent-color:#000}

/* ---------- shell ---------- */
.topbar{position:sticky;top:0;z-index:40;background:rgba(255,255,255,.94);backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--line)}
.topbar-in{max-width:1280px;margin:0 auto;padding:12px 32px;display:flex;align-items:center;gap:20px}
.brand{font-weight:800;font-size:19px;text-decoration:none;display:flex;align-items:center;gap:8px;flex-shrink:0}
.brand small{font-size:12px;font-weight:600;padding:3px 8px;border-radius:var(--r-pill);background:var(--chip)}
.nav{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;flex:1;min-width:0}
.nav::-webkit-scrollbar{display:none}
.nav a{text-decoration:none;font-size:14px;font-weight:500;padding:9px 14px;border-radius:var(--r-pill);white-space:nowrap;display:flex;align-items:center;gap:6px}
.nav a:hover{background:var(--chip)}
.nav a.active{background:var(--ink);color:var(--white);font-weight:600}
.nav .dot{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--yellow);color:var(--ink);font-size:11px;font-weight:700;display:inline-grid;place-items:center}
.top-right{display:flex;align-items:center;gap:10px;flex-shrink:0}
.coins-pill{font-size:13px;font-weight:700;padding:7px 12px;border-radius:var(--r-pill);border:1px solid var(--line);text-decoration:none;white-space:nowrap}
.avatar{width:40px;height:40px;border-radius:50%;display:inline-grid;place-items:center;font-weight:700;font-size:13px;flex-shrink:0;border:2px solid var(--yellow);background:var(--yellow-wash);color:var(--ink)}
.avatar.sm{width:32px;height:32px;font-size:12px;border-width:1.5px}
.avatar.lg{width:56px;height:56px;font-size:18px}
.avatar.blue{border-color:var(--blue);background:var(--blue-wash)}
.menu-btn{border:0;background:none;cursor:pointer;padding:0;border-radius:50%}
.role-switch{display:flex;gap:4px;padding:3px;border-radius:var(--r-pill);background:var(--chip)}
.role-switch a{font-size:12px;font-weight:600;text-decoration:none;padding:6px 10px;border-radius:var(--r-pill)}
.role-switch a.on{background:var(--white);box-shadow:0 1px 2px rgba(0,0,0,.12)}

.main{max-width:1280px;margin:0 auto;padding:28px 32px 96px}
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:22px}
.page-head h1{font-size:34px;font-weight:800;letter-spacing:-.02em;line-height:1.1}
.page-head p{margin:6px 0 0;color:var(--ink-soft);font-size:15px;max-width:640px}
.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:34px 0 14px}
.section-title h2{font-size:20px;font-weight:700}

/* ---------- bento ---------- */
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes flicker{0%,100%{transform:scale(1) rotate(-3deg)}50%{transform:scale(1.08) rotate(3deg)}}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255,238,0,.9)}100%{box-shadow:0 0 0 16px rgba(255,238,0,0)}}
@keyframes pop{0%{transform:scale(.9);opacity:0}60%{transform:scale(1.04)}100%{transform:scale(1);opacity:1}}
.bento{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(186px,auto);gap:20px}
.tile{border:1px solid var(--line);border-radius:var(--r-tile);padding:24px;background:var(--white);display:flex;flex-direction:column;gap:12px;
  animation:rise .5s ease both;transition:transform .2s ease,border-color .2s ease;min-width:0;position:relative}
.tile:hover{border-color:var(--ink)}
.tile.lift:hover{transform:translateY(-2px)}
.tile.c2{grid-column:span 2}.tile.c3{grid-column:span 3}.tile.c4{grid-column:span 4}.tile.r2{grid-row:span 2}
.tile .k{font-size:14px;font-weight:600;display:flex;justify-content:space-between;align-items:center;gap:8px}
.tile .big{font-size:60px;line-height:1;font-weight:800;letter-spacing:-.03em}
.tile .sub{font-size:13px;color:var(--ink-soft)}
.tile.wash{background:var(--yellow-wash);border-color:transparent}
.tile.blue{background:var(--blue-wash);border-color:transparent}
.tile.dark{background:var(--ink);color:var(--white);border-color:var(--ink)}
.tile.dark .sub{color:#d6d6d6}
.hero h1{font-size:54px;line-height:1.02;font-weight:800;letter-spacing:-.025em}
.hero p{margin:0;font-size:16px;color:var(--ink-soft);max-width:520px;line-height:1.6}
.flame{animation:flicker 1.6s ease-in-out infinite;transform-origin:50% 90%}
.week{display:flex;gap:6px}
.week span{flex:1;height:8px;border-radius:var(--r-pill);background:var(--chip)}
.week span.on{background:var(--ink)}
.week span.today{background:var(--yellow);border:1px solid var(--ink)}
.meter{height:10px;border-radius:var(--r-pill);background:var(--chip);overflow:hidden}
.meter>div{height:100%;background:var(--yellow);border-right:2px solid var(--ink);transition:width .8s ease}
.meter.ink>div{background:var(--ink);border:0}
.chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:4px 10px;border-radius:var(--r-pill);background:var(--chip);white-space:nowrap}
.chip.y{background:var(--yellow)}.chip.yw{background:var(--yellow-wash)}.chip.b{background:var(--blue)}.chip.bw{background:var(--blue-wash)}
.chip.ink{background:var(--ink);color:var(--white)}.chip.line{background:var(--white);border:1px solid var(--line)}
.chip.ok{background:#e4f2e4;color:var(--success)}.chip.bad{background:#f8e5e5;color:var(--error)}

/* mission */
.mission{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.mstep{all:unset;cursor:pointer;box-sizing:border-box;display:flex;flex-direction:column;gap:6px;min-height:104px;padding:16px;border-radius:16px;border:1px solid var(--ink);background:var(--white);transition:background .2s,transform .12s}
.mstep:active{transform:scale(.98)}
.mstep.done{background:var(--yellow-wash);border-color:var(--yellow)}
.mstep small{font-size:12.5px;color:var(--ink-soft)}
.mstep b{font-size:15px}
.mstep em{font-style:normal;font-size:13px;font-weight:600;margin-top:auto}

/* word of the day */
.wotd{all:unset;cursor:pointer;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;gap:10px;width:100%;height:100%;min-height:150px}
.wotd .w{font-size:28px;line-height:1.1;font-weight:800;word-break:break-word}

/* route (course map) */
.route{position:relative;margin:26px 10px 8px;height:2px;background:var(--line)}
.route .done{position:absolute;left:0;top:0;height:2px;background:var(--ink);transition:width .8s ease}
.route .stops{position:absolute;inset:-9px 0 auto 0;display:flex;justify-content:space-between}
.route .stop{width:20px;height:20px;border-radius:50%;background:var(--white);border:2px solid var(--line);box-sizing:border-box}
.route .stop.ok{background:var(--ink);border-color:var(--ink)}
.route .stop.here{background:var(--yellow);border:3px solid var(--ink);animation:pulse 1.8s ease-out infinite}
.route-labels{display:flex;justify-content:space-between;font-size:12px;color:var(--ink-soft);margin-top:14px;gap:6px}

/* club date */
.cal{width:80px;flex-shrink:0;border-radius:16px;background:var(--blue);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px 0}
.cal b{font-size:30px;line-height:1;font-weight:800}
.cal span{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.cal small{font-size:12px;margin-top:3px}
.cal.past{background:var(--chip)}

/* ---------- cards / lists ---------- */
.card{border:1px solid var(--line);border-radius:var(--r-card);padding:20px;background:var(--white)}
.grid{display:grid;gap:16px}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}.g3{grid-template-columns:repeat(3,minmax(0,1fr))}.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.list{display:flex;flex-direction:column}
.li{display:flex;align-items:center;gap:14px;padding:14px 4px;border-bottom:1px solid var(--line-2)}
.li:last-child{border-bottom:0}
.li .grow{flex:1;min-width:0}
.li .t{font-weight:700;font-size:15px}
.li .s{font-size:13px;color:var(--ink-soft)}
.li .acts{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.num{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-weight:700;background:var(--chip);flex-shrink:0}
.num.ok{background:var(--ink);color:var(--white)}
.num svg{width:16px;height:16px}

/* courses */
.chips{display:flex;gap:8px;flex-wrap:wrap}
.fchip{border:1px solid var(--line);background:var(--white);border-radius:var(--r-pill);padding:8px 14px;font-size:13px;font-weight:600;cursor:pointer}
.fchip.on{background:var(--ink);color:var(--white);border-color:var(--ink)}
.ccard{border:1px solid var(--line);border-radius:var(--r-tile);overflow:hidden;display:flex;flex-direction:column;cursor:pointer;background:var(--white);transition:transform .18s,border-color .18s;text-align:left;padding:0}
.ccard:hover{transform:translateY(-3px);border-color:var(--ink)}
.ccard .cover{height:96px;display:flex;align-items:flex-end;justify-content:space-between;padding:0 20px 14px;position:relative}
.ccard .cover .lvl{font-size:30px;font-weight:800;letter-spacing:-.02em}
.ccard .body{padding:18px 20px 20px;display:flex;flex-direction:column;gap:8px;flex:1}
.ccard h3{font-size:17px;font-weight:700}
.ccard p{margin:0;font-size:13.5px;color:var(--ink-soft);flex:1}
.ccard.locked .cover{background:var(--chip) !important}
.ccard.locked .lvl{color:#8a8a8a !important}
.cv-y{background:var(--yellow)}.cv-yw{background:var(--yellow-wash)}.cv-b{background:var(--blue)}.cv-bw{background:var(--blue-wash)}.cv-ink{background:var(--ink);color:var(--white)}

/* tables */
.tbl-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r-card)}
table.tbl{width:100%;border-collapse:collapse;font-size:14px;min-width:640px}
.tbl th{text-align:left;font-size:12.5px;font-weight:600;color:var(--ink-soft);padding:12px 14px;border-bottom:1px solid var(--line);background:var(--paper);white-space:nowrap}
.tbl td{padding:12px 14px;border-bottom:1px solid var(--line-2);vertical-align:middle}
.tbl tr:last-child td{border-bottom:0}
.tbl tr.click{cursor:pointer}
.tbl tr.click:hover td{background:var(--paper)}
.tbl .r{text-align:right}

/* words / flashcards */
.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:16px}
.search{position:relative;flex:1;min-width:220px}
.search svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--muted)}
.search .input{padding-left:40px}
.word{display:flex;align-items:center;gap:12px;padding:14px 4px;border-bottom:1px solid var(--line-2)}
.word:last-child{border-bottom:0}
.word .w-main{flex:1;min-width:0}
.word .w-term{font-weight:700;font-size:15.5px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.word .w-tr{font-size:14px;color:var(--ink-soft);margin-top:2px}
.word .w-ex{font-size:13px;color:var(--muted);font-style:italic;margin-top:4px}
.word .w-acts{display:flex;gap:6px}
.tip{display:flex;gap:12px;align-items:flex-start;background:var(--yellow-wash);border-radius:16px;padding:14px 16px;font-size:14px;line-height:1.55;margin-bottom:16px}
.tip svg{width:20px;height:20px;flex-shrink:0;margin-top:1px}
.fc-wrap{max-width:640px;margin:0 auto}
.fc-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:center;margin-bottom:18px}
.fc-controls select{width:auto;min-width:200px}
.seg{display:inline-flex;border:1px solid var(--line);border-radius:12px;padding:3px;background:var(--white)}
.seg button{border:0;background:none;padding:8px 12px;border-radius:9px;font-weight:600;font-size:13px;cursor:pointer}
.seg button.on{background:var(--ink);color:var(--white)}
.fc-progress{display:flex;align-items:center;gap:12px;margin-bottom:16px;font-size:13px;font-weight:600;color:var(--ink-soft)}
.fc-progress .meter{flex:1}
.scene{perspective:1400px;height:340px;margin-bottom:20px}
.flashcard{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform .6s cubic-bezier(.2,.8,.2,1);cursor:pointer}
.flashcard.flipped{transform:rotateY(180deg)}
.flashcard.swipe-left{animation:swipeL .35s ease forwards}
.flashcard.swipe-right{animation:swipeR .35s ease forwards}
@keyframes swipeL{to{transform:translateX(-120%) rotate(-10deg);opacity:0}}
@keyframes swipeR{to{transform:translateX(120%) rotate(10deg);opacity:0}}
.face{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;border-radius:28px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px;text-align:center;border:1px solid var(--line);background:var(--white);overflow:hidden}
.face.front::after{content:"";position:absolute;left:32px;right:32px;bottom:76px;height:0}
.face.back{background:var(--ink);color:var(--white);border-color:var(--ink);transform:rotateY(180deg)}
.face .bigw{font-size:42px;font-weight:800;letter-spacing:-.02em;line-height:1.15;word-break:break-word}
.face .ex{font-size:15px;margin-top:14px;opacity:.8;font-style:italic;max-width:460px}
.face .hint{position:absolute;bottom:20px;font-size:12px;font-weight:600;color:var(--muted);letter-spacing:.04em}
.face.back .hint{color:#bdbdbd}
.face .src{position:absolute;top:22px;left:22px}
.face .spk{position:absolute;top:18px;right:18px}
.face.back .icon-btn{background:transparent;border-color:#555;color:var(--white)}
.fc-actions{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center}
.btn-again{border:1px solid var(--ink);background:var(--white)}
.btn-know{background:var(--yellow);border:1px solid var(--ink)}
.kbd{font-size:11px;font-weight:700;border:1px solid currentColor;border-radius:6px;padding:0 5px;opacity:.6}

/* availability grid */
.avail{display:grid;grid-template-columns:56px repeat(7,minmax(36px,1fr));gap:4px;user-select:none;-webkit-user-select:none;min-width:420px}
.avail .h{font-size:12px;color:var(--ink-soft);display:flex;align-items:center;justify-content:flex-end;padding-right:6px}
.avail .d{font-size:12px;font-weight:700;text-align:center;padding:6px 0}
.avail .slot{height:28px;border-radius:6px;background:var(--chip);cursor:pointer;border:0;padding:0}
.avail .slot.on{background:var(--yellow);box-shadow:inset 0 0 0 1.5px var(--ink)}
.avail .slot .n{font-size:11px;font-weight:700}

/* lesson viewer + select-to-add */
.lesson-frame{display:block;width:100%;height:calc(100vh - 250px);min-height:560px;border:1px solid var(--line);border-radius:var(--r-tile);background:var(--white)}
.sel-pop{position:fixed;z-index:150;display:inline-flex;align-items:center;gap:8px;max-width:340px;background:var(--ink);color:var(--white);font-size:13.5px;font-weight:600;padding:10px 14px;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.3);cursor:pointer;animation:pop .18s ease;user-select:none;-webkit-user-select:none;border:0}
.sel-pop b{color:var(--yellow)}
.sel-pop::after{content:"";position:absolute;left:50%;bottom:-6px;width:12px;height:12px;background:var(--ink);transform:translateX(-50%) rotate(45deg);border-radius:2px}
.sel-pop.mobile{left:16px !important;right:16px;top:auto !important;bottom:calc(20px + env(safe-area-inset-bottom));max-width:none;justify-content:center;padding:16px;font-size:15px;border-radius:16px}
.sel-pop.mobile::after{display:none}

/* modal / toast / fab / loader */
.modal-back{position:fixed;inset:0;background:rgba(0,0,0,.42);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:20px;z-index:100;animation:fadeIn .15s ease}
.modal{background:var(--white);border-radius:24px;max-width:520px;width:100%;padding:28px;max-height:92vh;overflow:auto;animation:pop .2s ease}
.modal.wide{max-width:760px}
.modal h3{font-size:22px;font-weight:800}
.modal .acts{display:flex;gap:10px;justify-content:flex-end;margin-top:24px;flex-wrap:wrap}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:200;background:var(--ink);color:var(--white);font-weight:600;font-size:14px;padding:12px 18px;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.3);animation:pop .2s ease;max-width:calc(100vw - 32px)}
.toast.coin::before{content:"+";display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--yellow);color:var(--ink);font-weight:800;margin-right:8px}
.fab{position:fixed;right:28px;bottom:28px;z-index:50;min-height:56px;padding:0 22px 0 18px;border-radius:var(--r-pill);border:1px solid var(--ink);background:var(--yellow);color:var(--ink);font-weight:700;font-size:15px;display:flex;align-items:center;gap:8px;cursor:pointer;box-shadow:var(--shadow-btn);transition:transform .15s}
.fab:hover{transform:translateY(-2px)}
.fab svg{width:20px;height:20px}
.sel-open .fab{display:none}
.loader{display:grid;place-items:center;min-height:100vh}
.spinner{width:34px;height:34px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--ink);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.empty{text-align:center;padding:40px 20px;color:var(--ink-soft)}
.empty b{display:block;color:var(--ink);font-size:16px;margin-bottom:6px}
.empty svg{width:40px;height:40px;margin-bottom:8px;opacity:.5}
.confetti{position:fixed;inset:0;pointer-events:none;z-index:300}

/* ---------- login ---------- */
.auth{display:grid;grid-template-columns:1.1fr 1fr;min-height:100vh}
.auth-art{padding:48px;display:flex;flex-direction:column;justify-content:space-between;background:var(--yellow-wash);position:relative;overflow:hidden}
.auth-art h1{font-size:52px;font-weight:800;line-height:1.04;letter-spacing:-.03em;max-width:520px}
.auth-art .feats{display:grid;gap:10px;margin-top:28px;max-width:420px}
.auth-art .feat{display:flex;gap:12px;align-items:center;background:var(--white);padding:12px 14px;border-radius:14px;font-weight:600;font-size:14px}
.auth-art .feat i{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:var(--ink);color:var(--white);font-style:normal;font-size:13px;font-weight:700}
.auth-form{display:flex;align-items:center;justify-content:center;padding:40px 24px;position:relative}
.auth-form .box{width:100%;max-width:380px}
.auth-form h2{font-size:30px;font-weight:800}

/* ---------- responsive ---------- */
@media (max-width:1080px){
  .bento{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tile.c3,.tile.c4{grid-column:span 2}
  .g4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .g3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:760px){
  .topbar-in{padding:10px 16px;gap:10px;flex-wrap:wrap}
  .nav{order:3;flex-basis:100%}
  .main{padding:20px 16px 110px}
  .bento,.g2,.g3,.g4{grid-template-columns:minmax(0,1fr)}
  .tile.c2,.tile.c3,.tile.c4{grid-column:auto}
  .tile.r2{grid-row:auto}
  .hero h1{font-size:38px}
  .page-head h1{font-size:28px}
  .mission{grid-template-columns:minmax(0,1fr)}
  .mstep{min-height:auto}
  .row2{grid-template-columns:1fr}
  .auth{grid-template-columns:1fr}
  .auth-art{padding:28px}
  .auth-art h1{font-size:34px}
  .auth-art .feats{display:none}
  .fab{right:16px;bottom:16px;min-height:52px;padding:0 16px}
  .fab span{display:none}
  .face .bigw{font-size:32px}
  .scene{height:300px}
  .lesson-frame{height:calc(100vh - 230px);min-height:460px}
  .coins-pill{display:none}
}

/* calendar */
.cal-wrap{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:16px;align-items:start}
.cal-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.cal-head h2{font-size:22px;font-weight:800;min-width:170px;text-align:center}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.cal-grid .wd{font-size:12px;font-weight:700;color:var(--ink-soft);text-align:center;padding:4px 0}
.cday{all:unset;box-sizing:border-box;cursor:pointer;min-height:92px;border-radius:12px;background:var(--paper);padding:8px;display:flex;flex-direction:column;gap:4px;transition:transform .12s,box-shadow .12s}
.cday:hover{box-shadow:inset 0 0 0 1.5px var(--ink)}
.cday:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.cday .n{font-size:13px;font-weight:700}
.cday.out{opacity:.4}
.cday.today .n{background:var(--yellow);border:1px solid var(--ink);border-radius:999px;width:24px;height:24px;display:grid;place-items:center;margin:-3px 0 0 -3px}
.cday.sel{background:var(--white);box-shadow:inset 0 0 0 2px var(--ink)}
.cday .evs{display:flex;flex-direction:column;gap:3px;min-width:0}
.cday .ev{display:flex;align-items:center;gap:4px;font-size:11px;font-weight:600;min-width:0}
.cday .ev i{flex:none;width:8px;height:8px;border-radius:50%}
.cday .ev em{font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cday .more{font-size:11px;color:var(--ink-soft)}
.ev.done i,.evdot.done{background:var(--ink)}
.ev.plan i,.evdot.plan{background:var(--yellow);box-shadow:inset 0 0 0 1.5px var(--ink)}
.ev.club i,.evdot.club{background:var(--blue)}
.ev.missed i,.evdot.missed{background:#e9a3a3}
.evdot{display:inline-block;flex:none;width:12px;height:12px;border-radius:50%}
.cal-legend{display:flex;gap:16px;flex-wrap:wrap;margin-top:14px;font-size:13px;color:var(--ink-soft)}
.cal-legend>span{display:inline-flex;align-items:center;gap:6px}
@media (max-width:1080px){.cal-wrap{grid-template-columns:minmax(0,1fr)}}
@media (max-width:760px){.cday{min-height:52px;padding:6px}.cday .ev em{display:none}.cday .evs{flex-direction:row;flex-wrap:wrap}.cal-head h2{font-size:18px;min-width:0}}

/* chat */
.chat{display:grid;grid-template-columns:320px minmax(0,1fr);border:1px solid var(--line);border-radius:24px;overflow:hidden;background:var(--white);height:calc(100vh - 230px);min-height:460px}
.chat-list{border-right:1px solid var(--line);overflow-y:auto}
.chat-item{display:flex;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line-2);text-decoration:none;color:inherit}
.chat-item:hover{background:var(--paper)}.chat-item.on{background:var(--yellow-wash)}
.chat-item .t{font-weight:700;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-prev{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-ava{width:40px;height:40px;display:grid;place-items:center;font-size:20px;flex-shrink:0;border-radius:50%;background:var(--paper)}
.chat-badge{min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--yellow);border:1px solid var(--ink);font-size:12px;font-weight:800;display:grid;place-items:center}
.chat-pane{display:flex;flex-direction:column;min-width:0;min-height:0}
.chat-head{display:flex;gap:10px;align-items:center;padding:12px 16px;border-bottom:1px solid var(--line)}
.chat-back{display:none}
.chat-msgs{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:4px;background:var(--paper)}
.chat-day{align-self:center;font-size:12px;color:var(--muted);margin:10px 0 4px;background:var(--white);border:1px solid var(--line);border-radius:999px;padding:2px 10px}
.msg{max-width:78%;align-self:flex-start;display:flex;flex-direction:column;gap:2px;margin-top:4px}
.msg.mine{align-self:flex-end;align-items:flex-end}
.msg-who{font-size:12px;font-weight:700;color:var(--ink-soft);padding:0 4px}
.msg-b{background:var(--white);border:1px solid var(--line);border-radius:18px 18px 18px 6px;padding:9px 13px;font-size:15px;line-height:1.45;overflow-wrap:anywhere}
.msg.mine .msg-b{background:var(--yellow);border-color:var(--ink);border-radius:18px 18px 6px 18px}
.msg-b a{color:inherit}
.msg-t{font-size:11px;color:var(--muted);padding:0 4px}
.chat-stickers{display:grid;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:6px;padding:10px;border-top:1px solid var(--line);max-height:180px;overflow-y:auto;background:var(--white)}
.chat-stickers button{background:none;border:0;border-radius:14px;padding:4px;cursor:pointer;display:grid;place-items:center}
.chat-stickers button:hover{background:var(--yellow-wash)}
.chat-form{display:flex;gap:8px;align-items:flex-end;padding:10px;border-top:1px solid var(--line);background:var(--white)}
.chat-form textarea{resize:none;min-height:44px;max-height:140px}
.chat-stbtn{font-size:20px;padding:0 10px}
.stk-row{display:flex;gap:8px;flex-wrap:wrap}
.stk-row button{background:var(--white);border:1px solid var(--line);border-radius:18px;padding:8px 6px 6px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:4px;width:92px;font-size:12px;font-weight:600}
.stk-row button:hover,.stk-row button.on{border-color:var(--ink);background:var(--yellow-wash)}
@media (max-width:760px){
  .chat{grid-template-columns:1fr;height:calc(100vh - 190px)}
  .chat.has-sel .chat-list{display:none}
  .chat:not(.has-sel) .chat-pane{display:none}
  .chat-back{display:inline-flex}
  .msg{max-width:88%}
}

/* ---------- заявки (leads) ---------- */
.lead-seg{max-width:100%;overflow-x:auto;scrollbar-width:none}
.lead-seg::-webkit-scrollbar{display:none}
.lead-seg button{white-space:nowrap;flex-shrink:0}
@media (max-width:640px){
  .lead-stats{grid-template-columns:1fr 1fr !important;gap:10px}
  .lead-stats .tile{padding:16px}
  .lead-stats .big{font-size:36px}
}

.chat-embed{height:520px;border:1px solid var(--line);border-radius:var(--r-card);overflow:hidden;display:flex;flex-direction:column}
.chat-embed .chat-msgs{flex:1}
@media (max-width:640px){.chat-embed{height:70vh}}

#topBusy{position:fixed;top:0;left:0;height:3px;width:0;background:var(--ink);z-index:9999;opacity:0;transition:opacity .2s}
#topBusy.on{opacity:1;width:100%;animation:busy 1.1s ease-in-out infinite;background:linear-gradient(90deg,transparent,var(--ink),transparent);background-size:40% 100%;background-repeat:no-repeat}
@keyframes busy{0%{background-position:-40% 0}100%{background-position:140% 0}}

.preview-bar{position:sticky;top:0;z-index:200;display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap;background:var(--yellow);color:var(--ink);padding:8px 14px;font-size:14px;font-weight:500}
.preview-bar .btn{background:var(--ink);color:#fff;min-height:32px}

.as-panel{margin-top:12px;border:1.5px solid var(--ink);border-radius:var(--r-card);padding:16px;background:#fff}
.as-panel h3{font-size:18px;font-weight:800}
.as-panel .acts{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}

/* ---------- графік викладача (schedule.js) ---------- */
.sch { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.sch-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sch-month { font-size: 17px; min-width: 130px; text-align: center; }
.sch-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sch-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.sch-nav { display: flex; align-items: center; gap: 8px; }
.sch-tool { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line, #e5e1d8); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sch-tool.on { border-color: var(--ink, #1f1d1a); box-shadow: 0 0 0 2px rgba(0,0,0,.06); }
.sch-who { max-width: 240px; padding: 6px 10px; font-size: 13px; }
.sch-rep { font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.sch-sw { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 11px; font-style: normal; font-weight: 800; }
.sch-sw.free { background: #dcf3e2; color: #1d7a3d; } .sch-sw.busy { background: #e6e4e0; color: #6b6760; } .sch-sw.lesson { background: #fff1b8; }
.sch-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line, #e5e1d8); border-radius: 12px; background: #fff; }
.sch-grid { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.sch-grid th { font-weight: 700; padding: 4px 2px; text-align: center; color: #6b6760; background: #fff; position: sticky; top: 0; z-index: 1; }
.sch-grid thead th span { display: block; font-size: 10px; font-weight: 600; }
.sch-grid thead th.we { color: #b0aaa0; } .sch-grid thead th.today { color: #fff; background: var(--ink, #1f1d1a); border-radius: 8px; }
.sch-grid th.sch-h { position: sticky; left: 0; z-index: 2; padding: 0 8px; white-space: nowrap; border-right: 1px solid var(--line, #e5e1d8); }
.sch-grid td { padding: 1px; }
.sch-c { display: grid; place-items: center; width: 44px; height: 28px; border: 0; border-radius: 6px; background: #f7f5f0; font: inherit; font-size: 10.5px; font-weight: 700; color: #3a3732; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 2px; }
div.sch-c { cursor: default; }
.sch-c.we { background: #f0ede6; } .sch-c.past { opacity: .72; }
button.sch-c:hover { outline: 2px solid var(--ink, #1f1d1a); outline-offset: -2px; }
.sch-c.free { background: #dcf3e2; color: #1d7a3d; } .sch-c.busy { background: #e6e4e0; color: #6b6760; } .sch-c.lesson { background: #fff1b8; color: #5c4a00; }
.sch-load { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.6); }
.sch-legend { display: flex; gap: 14px; font-size: 12px; color: #6b6760; } .sch-legend span { display: inline-flex; gap: 5px; align-items: center; }
/* телефон / майбутній застосунок: тиждень на всю ширину */
.sch.wk { gap: 8px; }
.sch.wk .sch-head { flex-wrap: nowrap; }
.sch.wk .sch-nav { gap: 4px; }
.sch.wk .sch-month { font-size: 15px; min-width: 0; flex: 1; white-space: nowrap; }
.sch.wk .sch-count { font-size: 11.5px; text-align: right; line-height: 1.25; }
.sch.wk .sch-tools { gap: 6px; }
.sch.wk .sch-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 100%; background: #f3f1ec; border-radius: 12px; padding: 3px; }
.sch.wk .sch-tool { justify-content: center; border: 0; border-radius: 9px; padding: 8px 2px; font-size: 12px; gap: 4px; background: transparent; }
.sch.wk .sch-tool.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.sch.wk .sch-sw { width: 15px; height: 15px; font-size: 10px; }
.sch.wk .sch-who { max-width: none; width: 100%; padding: 9px 10px; font-size: 14px; }
.sch.wk .sch-rep { font-size: 12.5px; }
.sch.wk .sch-scroll { overflow: visible; border-radius: 10px; }
.sch.wk .sch-grid { width: 100%; table-layout: fixed; }
.sch.wk .sch-grid th.sch-h { width: 40px; padding: 0 4px 0 2px; font-size: 10.5px; font-weight: 600; }
.sch.wk .sch-grid thead th { font-size: 13px; padding: 5px 0; z-index: 3; box-shadow: 0 1px 0 var(--line, #e5e1d8); }
.sch.wk .sch-grid thead th.today { border-radius: 10px; }
.sch.wk .sch-c { width: 100%; height: 36px; border-radius: 7px; font-size: 9px; line-height: 1.05; white-space: normal; word-break: break-word; }
.sch.wk .sch-c.free, .sch.wk .sch-c.busy { font-size: 13px; }
.sch.wk .sch-legend { font-size: 11px; gap: 10px; flex-wrap: wrap; }
@media (hover: none) { button.sch-c:hover { outline: 0; } button.sch-c:active { transform: scale(.94); } }
@media (max-width: 639px) { .sch-intro { display: none; } }

/* ---------- табло занять (bridge.board) ---------- */
.lboard { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; }
.lboard > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; }
.lboard > summary::-webkit-details-marker { display: none; }
.lb-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--yellow-wash, #fff6cc); font-size: 18px; }
.lb-sum { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lb-chev { font-size: 18px; transition: transform .2s; } .lboard[open] .lb-chev { transform: rotate(180deg); }
.lb-body { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 14px; max-height: 60vh; overflow: auto; }
.lb-mh { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 6px; font-size: 14px; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.lb-t { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--paper, #f7f5f0); text-decoration: none; color: inherit; font-size: 12.5px; line-height: 1.25; min-height: 52px; border: 1.5px solid transparent; }
.lb-t b { font-size: 12px; } .lb-t span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #4a463f; }
a.lb-t:hover { border-color: var(--ink, #1f1d1a); }
.lb-t.done { background: #e6f5ea; } .lb-t.next { background: var(--yellow-wash, #fff6cc); }
.lb-t.cur { border-color: var(--ink, #1f1d1a); background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.lb-t.off { opacity: .45; cursor: not-allowed; }
.lb-ok { position: absolute; top: 6px; right: 8px; font-style: normal; color: #1d7a3d; font-weight: 800; }
.lb-mat { position: absolute; bottom: 5px; right: 7px; font-style: normal; font-size: 11px; }
@media (max-width: 639px) {
  .lboard > summary { padding: 10px 12px; } .lb-body { padding: 0 10px 12px; max-height: 55vh; }
  .lb-grid { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 5px; }
  .lb-t { min-height: 44px; padding: 6px; align-items: center; justify-content: center; text-align: center; } .lb-t span { display: none; } .lb-t b { font-size: 13px; }
  .lb-ok { top: 2px; right: 4px; font-size: 10px; } .lb-mat { bottom: 1px; right: 3px; font-size: 9px; }
}
/* ---------- викладачі й курси учня ---------- */
.lk-box { display: flex; flex-direction: column; gap: 6px; }
.lk-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: center; }
@media (max-width: 520px) { .lk-row { grid-template-columns: 1fr auto; } .lk-row [data-lk-c] { grid-column: 1; grid-row: 2; } .lk-row [data-lk-del] { grid-row: 1 / span 2; grid-column: 2; } }
.lang-chips { margin: 0 0 10px; }
.as-row.on { background: var(--yellow-wash, #fff6cc); border-radius: 10px; padding-left: 8px !important; padding-right: 8px !important; }
.as-course { max-width: 260px; padding: 6px 10px; font-size: 13px; margin-left: 32px; }
@media (max-width: 520px) { .as-course { max-width: none; width: calc(100% - 32px); } }

/* ---------- сцена заняття (L.stage): курс на весь екран ---------- */
.stage { position: relative; margin: -8px 0 16px; }
.stage-bar { display: flex; align-items: center; gap: 6px; padding: 6px 0 8px; }
.stage-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.stage-t small { font-size: 12px; color: var(--ink-soft, #6b6760); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-t b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: inherit; text-decoration: none; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; }
.stage-btn:hover { border-color: var(--ink, #1f1d1a); } .stage-btn.on { background: var(--ink, #1f1d1a); color: #fff; }
.stage-btn.off { opacity: .3; cursor: default; } .stage-btn.off:hover { border-color: var(--line); }
.stage-btn.primary { background: var(--ink, #1f1d1a); color: #fff; border-color: var(--ink, #1f1d1a); } .stage-btn.soft { background: #e6f5ea; border-color: #e6f5ea; color: #1d7a3d; }
.stage-lbl { font-size: 13px; }
.stage-board { position: absolute; z-index: 30; left: 0; right: 0; top: 52px; box-shadow: 0 16px 40px rgba(0,0,0,.18); border-radius: 16px; }
.stage-board .lboard { margin: 0; } .stage-board .lboard > summary { display: none; } .stage-board .lb-body { padding-top: 14px; max-height: 70vh; }
.stage-frame { height: calc(100vh - 140px); min-height: 420px; border-radius: 16px; }
.stage.full { position: fixed; inset: 0; z-index: 400; margin: 0; background: #fff; display: flex; flex-direction: column; }
.stage.full .stage-bar { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.stage.full .stage-frame { flex: 1; height: auto; min-height: 0; border: 0; border-radius: 0; }
.stage.full .stage-board { top: 52px; left: 10px; right: 10px; }
.stage.full [data-stage-full] { background: var(--ink, #1f1d1a); color: #fff; }
body.stage-lock { overflow: hidden; }
@media (max-width: 760px) {
  .stage { margin: -12px -4px 12px; } .stage-lbl { display: none; } .stage-btn { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px; }
  .stage-t b { font-size: 15px; } .stage-frame { height: calc(100vh - 150px); border-radius: 12px; }
}

/* ---------- окремі заняття (вибір) ---------- */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.pl-t { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 8px 34px; border-radius: 12px; background: var(--paper, #f7f5f0); font-size: 12.5px; cursor: pointer; border: 1.5px solid transparent; }
.pl-t input { position: absolute; left: 10px; top: 10px; width: 17px; height: 17px; } .pl-t span { color: #4a463f; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-t.on { background: var(--yellow-wash, #fff6cc); border-color: var(--ink, #1f1d1a); }

/* ---------- фінальні тести ---------- */
.ft-card { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; }
.ft-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.ft-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: linear-gradient(135deg,#f6d365,#fda085); flex-shrink: 0; }
.ft { display: flex; flex-direction: column; gap: 14px; }
.ft-mod { display: flex; flex-direction: column; gap: 10px; } .ft-mh { font-weight: 800; font-size: 15px; margin-top: 6px; }
.ft-q { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.ft-q.right { border-color: #9ad6ad; background: #f3fbf5; } .ft-q.wrong { border-color: #f1b4ae; background: #fff6f5; }
.ft-qt { margin-bottom: 10px; line-height: 1.45; }
.ft-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; }
.ft-o { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.ft-o:hover:not([disabled]) { border-color: var(--ink, #1f1d1a); } .ft-o.on { background: var(--ink, #1f1d1a); color: #fff; border-color: var(--ink, #1f1d1a); }
.ft-o.ok { background: #dcf3e2; border-color: #1d7a3d; color: #134d27; font-weight: 700; } .ft-o.bad { background: #fde2df; border-color: #c0392b; color: #7a1d14; text-decoration: line-through; }
.ft-foot { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: rgba(255,255,255,.95); padding: 12px 0; border-top: 1px solid var(--line); }
.ft-res { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 18px; flex-wrap: wrap; } .ft-res.ok { background: #dcf3e2; } .ft-res.no { background: #fff1b8; }
.ft-big { font-size: 34px; font-weight: 800; } .ft-res > div:nth-child(2) { flex: 1; }

/* ---------- передбачення на день ---------- */
.fort-wrap { margin-bottom: 18px; }
.fort-card { position: relative; display: flex; gap: 18px; align-items: center; padding: 20px 22px; border-radius: 24px; color: #1b1530; overflow: hidden; box-shadow: 0 10px 30px rgba(120,70,160,.18); }
.fort-stars { position: absolute; right: 70px; top: 10px; color: rgba(255,255,255,.8); letter-spacing: 8px; font-size: 13px; }
.fort-emoji { font-size: 54px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.15)); } .fort-emoji.big { font-size: 72px; }
.fort-txt { flex: 1; min-width: 0; }
.fort-k { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.fort-en { font-size: 21px; font-weight: 800; line-height: 1.25; margin-top: 4px; }
.fort-uk { font-size: 14.5px; margin-top: 4px; opacity: .85; }
.fort-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.fort-meta span { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.45); padding: 4px 10px; border-radius: 999px; }
.fort-meta i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px #fff; }
.fort-again { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.6); font-size: 20px; cursor: pointer; flex-shrink: 0; }
.fort-again:hover { background: #fff; transform: rotate(20deg); }
.fort-ov { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: radial-gradient(circle at 20% 15%, #fff6bf 0%, #ffd1dc 38%, #c7d2fe 75%, #a5f3fc 100%); animation: fortIn .4s ease; padding: 20px; }
.fort-ov.bye { animation: fortOut .35s ease forwards; }
@keyframes fortIn { from { opacity: 0; } } @keyframes fortOut { to { opacity: 0; transform: scale(1.04); } }
.fort-sky i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .35; animation: twinkle 2.6s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: 1; transform: scale(1.8); } }
.fort-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; width: min(440px, 100%); }
.fort-hello { color: #1b1530; font-size: 24px; font-weight: 800; }
.fort-flip { position: relative; width: 100%; height: 400px; perspective: 1200px; cursor: pointer; outline: none; }
.fort-face { position: absolute; inset: 0; border-radius: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .8s cubic-bezier(.2,.8,.2,1); box-shadow: 0 24px 60px rgba(120,60,140,.28); }
.fort-front { background: linear-gradient(160deg,#ff9a62,#ff6fb5 55%,#8b7bff); color: #fff; border: 3px solid rgba(255,255,255,.6); }
.fort-front b { font-size: 22px; } .fort-front span { opacity: .75; font-size: 14px; animation: pulseT 1.6s ease-in-out infinite; }
@keyframes pulseT { 50% { opacity: .35; } }
.fort-ball { font-size: 96px; animation: floatB 3s ease-in-out infinite; filter: drop-shadow(0 0 26px rgba(255,255,255,.9)); }
@keyframes floatB { 50% { transform: translateY(-10px) scale(1.04); } }
.fort-back { transform: rotateY(180deg); color: #1b1530; } .fort-back .fort-en { font-size: 24px; }
.fort-flip.open .fort-front { transform: rotateY(-180deg); } .fort-flip.open .fort-back { transform: rotateY(0); }
.fort-flip:focus-visible .fort-front { box-shadow: 0 0 0 4px #ffd23f, 0 30px 80px rgba(0,0,0,.45); }
.fort-go { font-size: 17px; padding: 14px 26px; animation: fortIn .5s ease; }
.fort-skip { background: none; border: 0; color: rgba(27,21,48,.55); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.fort-conf { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fort-conf i { position: absolute; top: 55%; width: 9px; height: 14px; border-radius: 2px; animation: conf 1.6s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes conf { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
@media (max-width: 640px) { .fort-card { padding: 16px; gap: 12px; border-radius: 20px; align-items: flex-start; } .fort-emoji { font-size: 40px; } .fort-en { font-size: 17px; } .fort-uk { font-size: 13.5px; } .fort-stars { display: none; } .fort-again { width: 38px; height: 38px; } .fort-flip { height: 360px; } }
@media (prefers-reduced-motion: reduce) { .fort-face, .fort-ball, .fort-sky i, .fort-conf i, .fort-front span { animation: none !important; transition: none !important; } }
