:root{--bg:#081426;--card:#132742;--card2:#183457;--text:#eef4ff;--muted:#aebfd8;--primary:#4aa3ff;--border:rgba(255,255,255,.08)}*{box-sizing:border-box}html,body{min-height:100%;overscroll-behavior:none;background:linear-gradient(180deg,#06101d 0%,#0a1a30 55%,#10284a 100%);background-attachment:fixed}html{height:100%;background-color:#06101d}body{margin:0;font-family:Inter,system-ui,sans-serif;background:linear-gradient(180deg,#06101d 0%,#0a1a30 55%,#10284a 100%);background-attachment:fixed;color:var(--text);min-height:100dvh;position:relative}body::before{content:'';position:fixed;inset:-35vh 0 -35vh 0;z-index:-1;background:linear-gradient(180deg,#06101d 0%,#0a1a30 55%,#10284a 100%)}button,input,select,textarea,a{font:inherit}a{color:inherit;text-decoration:none}button,.button-link{cursor:pointer;border:0;border-radius:14px;padding:11px 14px;background:var(--primary);color:#fff;display:inline-flex;align-items:center;justify-content:center}.muted-btn,.ghost,.tab-btn,.nav-btn{background:transparent;border:1px solid var(--border)}input,select,textarea{width:100%;padding:11px 14px;border-radius:14px;border:1px solid var(--border);background:#0b1a2f;color:var(--text)}textarea{min-height:140px}.app-shell{display:flex;min-height:100dvh}.sidebar{width:250px;padding:16px;background:rgba(8,20,38,.96);border-right:1px solid var(--border);position:sticky;top:0;height:100vh;overflow:auto}.brand{font-size:22px;font-weight:700;margin-bottom:18px}.nav-stack{display:flex;flex-direction:column;gap:8px}.nav-btn{text-align:left;padding:12px;border-radius:14px}.nav-btn.active{background:var(--card2)}.main{flex:1;padding:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom, 0px))}.topbar{display:flex;align-items:center;gap:12px;margin-bottom:12px}.topbar-user{display:flex;align-items:center;gap:10px}.burger{display:none;background:var(--card2)}.title{font-size:22px;font-weight:700}.subtitle,.small{font-size:13px;color:var(--muted)}.card{background:rgba(19,39,66,.96);border:1px solid var(--border);border-radius:20px;padding:14px}.stack-gap{display:flex;flex-direction:column;gap:14px}.page-grid{display:grid;gap:14px}.two-columns-home,.progress-grid{grid-template-columns:1.1fr .9fr}.hero-card h1,.card h1{font-size:28px;margin:6px 0 8px}.card h2{margin:0 0 8px;font-size:22px}.card h3{margin:0 0 8px;font-size:18px}.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.row-between{display:flex;justify-content:space-between;align-items:center;gap:10px}.align-start{align-items:flex-start}.wrap{flex-wrap:wrap}.inline-actions{display:flex;gap:8px;flex-wrap:wrap}.metric-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.compact-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.metric{background:var(--card2);border-radius:16px;padding:10px 12px}.small-value{font-size:21px;font-weight:700}.goal-pill{background:rgba(255,255,255,.08);border-radius:999px;padding:8px 12px;font-size:13px}.daily-cards,.word-list,.pack-list,.reading-list,.reward-grid{display:flex;flex-direction:column;gap:10px}.daily-word-card,.word-item,.reading-row,.question-block,.pack-card,.reward-card{background:rgba(255,255,255,.04);border:1px solid var(--border);border-radius:14px;padding:12px}.reward-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.reward-card.completed{outline:1px solid rgba(74,163,255,.8)}.reward-icon{font-size:28px}.reward-ring{height:10px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden;margin-top:8px}.reward-ring span{display:block;height:100%;background:linear-gradient(90deg,#4aa3ff,#7dd3fc)}.daily-word-title{font-size:16px}.muted-line{margin-top:6px}.status-badge{font-size:12px;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.08)}.status-badge.learned{background:rgba(54,199,130,.18);color:#9ff1c6}.link-toggle{background:transparent;border:none;color:#9ec7ff;padding:0;cursor:pointer}.sentence-box{background:rgba(255,255,255,.03);border:1px solid var(--border);border-radius:14px;padding:10px 12px}.hidden{display:none!important}.tabs{display:flex;gap:8px;flex-wrap:wrap}.tab-btn.active{background:var(--card2)}.trainer-card{display:flex;flex-direction:column;gap:14px}.option-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.option-btn{background:var(--card2);border:1px solid var(--border);text-align:left}.success-box,.error-box{border-radius:14px;padding:12px;border:1px solid var(--border)}.success-box{background:rgba(54,199,130,.12)}.error-box{background:rgba(255,122,122,.12)}.token.highlight{display:inline-block;padding:1px 4px;border-radius:8px;background:rgba(74,163,255,.18);border:1px solid rgba(125,211,252,.25);cursor:pointer}.reading-done{outline:1px solid rgba(54,199,130,.5)}.heatmap{display:flex;flex-wrap:wrap;gap:6px}.heatmap-day{position:relative;width:20px;height:20px;border-radius:6px;background:rgba(255,255,255,.07)}.heatmap-day.active{background:rgba(74,163,255,.85)}.heatmap-tooltip{display:none;position:absolute;left:50%;bottom:calc(100% + 6px);transform:translateX(-50%);background:#081726;border:1px solid var(--border);border-radius:10px;padding:8px 10px;font-size:12px;white-space:nowrap;z-index:5;pointer-events:none}.heatmap-day:hover .heatmap-tooltip,.heatmap-day.show-tooltip .heatmap-tooltip{display:block}.avatar-sm,.avatar-lg{border-radius:50%;object-fit:cover;display:flex;align-items:center;justify-content:center;background:rgba(74,163,255,.18);border:1px solid rgba(125,211,252,.24);font-weight:700}.avatar-sm{width:38px;height:38px}.avatar-lg{width:72px;height:72px}.profile-preview{display:flex;align-items:center;gap:14px}.avatar-upload-tile{display:inline-flex;align-items:center;justify-content:center;min-height:52px;border-radius:16px;border:1px dashed rgba(125,211,252,.5);background:rgba(74,163,255,.08);padding:14px 16px;cursor:pointer}.toggle-pill,.toggle-inline{display:flex;align-items:center;gap:12px}.toggle-pill{background:rgba(255,255,255,.05);border:1px solid var(--border);border-radius:18px;padding:16px}.toggle-pill input{width:26px;height:26px;accent-color:#4aa3ff}.pack-word-form{display:flex;flex-direction:column;gap:10px}.translation-suggest-row{display:flex;gap:8px}.progress-track{height:10px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden;margin:12px 0}.progress-track span{display:block;height:100%;background:linear-gradient(90deg,#4aa3ff,#7dd3fc)}.auth-body{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:20px;padding-bottom:calc(20px + env(safe-area-inset-bottom, 0px))}.auth-layout{width:min(1040px,100%);display:grid;grid-template-columns:1.1fr .9fr;gap:16px}.single-col{grid-template-columns:1fr;max-width:520px}.auth-panel{background:rgba(19,39,66,.96);border:1px solid var(--border);border-radius:22px;padding:22px}.auth-panel-brand{background:linear-gradient(180deg,rgba(19,39,66,.98),rgba(11,26,47,.98))}.brand-chip{display:inline-block;padding:8px 12px;border-radius:999px;background:rgba(74,163,255,.18);margin-bottom:18px}.flash-box{margin-bottom:14px;background:rgba(255,122,122,.12);color:#ffd8d8;border-radius:14px;padding:12px}.top-gap-sm{margin-top:8px}.top-gap-md{margin-top:14px}.admin-main{padding:24px}.danger-btn{background:transparent;border:1px solid rgba(255,122,122,.35);color:#ffd5d5}.full-width{width:100%}.text-left{text-align:left}.leader-row{display:grid;grid-template-columns:40px 1fr auto;gap:10px;padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.04);margin-top:8px}.leader-row-self{outline:1px solid rgba(74,163,255,.6)}@media(max-width:980px){.two-columns-home,.progress-grid,.auth-layout{grid-template-columns:1fr}}@media(max-width:900px){.sidebar{position:fixed;z-index:20;inset:0 auto 0 0;transform:translateX(-100%);transition:transform .2s ease}.sidebar.open{transform:translateX(0)}.burger{display:inline-flex}}@media(max-width:560px){.metric-row,.compact-metrics,.option-grid,.reward-grid{grid-template-columns:1fr 1fr}.translation-suggest-row{flex-direction:column}.heatmap-tooltip{left:0;transform:none;white-space:normal;min-width:120px}}

.form-stack{display:flex;flex-direction:column;gap:10px}
.narrow-page{max-width:980px}
.reading-text{line-height:1.8;font-size:16px;padding:12px 0}
.export-panel{border-top:1px solid var(--border);padding-top:12px}
.label{font-size:12px;color:var(--muted);margin-bottom:4px}

.switch-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--border);border-radius:16px;background:rgba(255,255,255,.04)}
.switch-row input{width:44px;height:24px;accent-color:#4aa3ff}
.mobile-stack{display:flex;flex-wrap:wrap;gap:8px}
.pack-cover{width:100%;max-width:120px;display:block;border-radius:14px;margin-bottom:8px;object-fit:cover}
.pack-cover-lg{width:100%;max-width:240px;display:block;border-radius:18px;margin-bottom:12px;object-fit:cover}
.compact-upload{min-height:auto;padding:10px 12px}
@media(max-width:560px){.mobile-stack{flex-direction:column}.mobile-stack > *{width:100%}.leader-row{grid-template-columns:32px 1fr auto}.two-columns-home .card:first-child{order:2}.two-columns-home .card:last-child{order:1}}

.auth-panel-centered{max-width:720px;margin:0 auto;text-align:center}.auth-logo-wrap{display:flex;justify-content:center;margin-bottom:18px}.auth-logo{width:140px;height:140px;object-fit:cover;border-radius:28px;border:1px solid var(--border);box-shadow:0 12px 32px rgba(0,0,0,.24)}.auth-header{margin-bottom:18px}.auth-tabs-top{justify-content:center;margin-bottom:14px}.tab-link{padding:11px 18px;border-radius:14px;border:1px solid var(--border);background:transparent}.tab-link.active{background:var(--card2)}.auth-footer-links,.auth-footer-note{margin-top:18px}.brand-with-logo{display:flex;align-items:center;gap:12px}.sidebar-logo{width:44px;height:44px;border-radius:14px;object-fit:cover;border:1px solid var(--border)}.topbar{position:sticky;top:0;z-index:10;background:linear-gradient(180deg,#07111f,#0a1a30);padding-bottom:12px}.report-box{margin-top:16px;padding:14px;border:1px solid var(--border);border-radius:16px;background:rgba(255,255,255,.03)}.report-box textarea{min-height:100px}.status-open{background:rgba(255,183,77,.16)}.status-resolved{background:rgba(54,199,130,.18);color:#9ff1c6}@media(max-width:900px){.sidebar{position:fixed;z-index:20;inset:0 auto 0 0;transform:translateX(-100%);transition:transform .2s ease;height:100vh}.sidebar.open{transform:translateX(0)}.burger{display:inline-flex}}



.password-field{position:relative}.password-field input{padding-right:52px}.password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);padding:8px 10px;min-width:40px;border-radius:12px;background:transparent;border:1px solid var(--border)}
.pack-card-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:150px}.pack-stat{display:inline-block;margin-top:6px}.category-tabs{display:flex;gap:8px;flex-wrap:wrap}.category-chip{padding:10px 14px;border-radius:999px;border:1px solid var(--border);background:transparent}.category-chip.active{background:var(--card2)}

.app-shell{overflow-x:hidden}
.pack-cover{height:120px;overflow:hidden}
.pack-cover-lg{height:220px;overflow:hidden}
.avatar-xl{width:96px;height:96px;border-radius:50%;object-fit:cover;display:flex;align-items:center;justify-content:center;background:rgba(74,163,255,.18);border:1px solid rgba(125,211,252,.24);font-weight:700}
.cabinet-hero{padding:18px}
.cabinet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.cabinet-tile{min-height:100%}
.profile-badges{display:flex;gap:8px;flex-wrap:wrap}
.friend-request-banner{padding:10px 12px;border-radius:14px;background:rgba(74,163,255,.12);border:1px solid var(--border)}
.reading-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.reading-search-input{flex:1;min-width:220px}.reading-filters{margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}
.modal-page{position:relative;min-height:calc(100dvh - 70px)}.modal-backdrop{position:fixed;inset:0;background:rgba(3,10,20,.55);backdrop-filter:blur(6px)}.modal-sheet{position:relative;max-width:760px;margin:10px auto 24px;z-index:1}
#friend-search-results{display:flex;flex-direction:column;gap:8px}
@media(max-width:900px){.cabinet-grid{grid-template-columns:1fr}.modal-sheet{margin-top:0}}

body[data-theme='dark']{--bg:#081426;--card:#132742;--card2:#183457;--text:#eef4ff;--muted:#aebfd8;--primary:#4aa3ff;--border:rgba(255,255,255,.08)}
body[data-theme='light']{--bg:#f3efe8;--card:#fffdf8;--card2:#f2ece3;--text:#2b2116;--muted:#7e6f5d;--primary:#2f7a5f;--border:rgba(43,33,22,.10)}
body[data-theme='light'],body[data-theme='light']::before,body[data-theme='light'] html{background:linear-gradient(180deg,#f5f1ea 0%,#efe7dc 55%,#e6dccf 100%)}
body[data-theme='light'] .sidebar{background:rgba(250,246,239,.96)}
body[data-theme='light'] input,body[data-theme='light'] select,body[data-theme='light'] textarea{background:#fffdf9}
body[data-theme='light'] .muted-btn,body[data-theme='light'] .ghost,body[data-theme='light'] .tab-btn,body[data-theme='light'] .nav-btn{background:rgba(255,251,245,.85)}
body[data-theme='light'] .goal-pill,body[data-theme='light'] .switch-row,body[data-theme='light'] .word-item,body[data-theme='light'] .pack-card,body[data-theme='light'] .reading-row,body[data-theme='light'] .reward-card,body[data-theme='light'] .daily-word-card{background:rgba(126,111,93,.06)}

.page-fade-in{animation:pageFade .22s ease}
@keyframes pageFade{from{opacity:.45;transform:translateY(8px)}to{opacity:1;transform:none}}
.skeleton-card{overflow:hidden;position:relative}.skeleton-card::after{content:'';position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.08),transparent);animation:sheen 1.2s infinite}.skeleton-line{height:14px;border-radius:999px;background:rgba(255,255,255,.08);margin:12px 0}.w-30{width:30%}.w-35{width:35%}.w-40{width:40%}.w-45{width:45%}.w-70{width:70%}.w-80{width:80%}.w-85{width:85%}.w-90{width:90%}.w-95{width:95%}.w-100{width:100%}@keyframes sheen{to{transform:translateX(100%)}}
body[data-theme='light'] .skeleton-line{background:rgba(19,39,66,.08)}

.clickable-word{border-bottom:2px dashed rgba(122,180,255,.8);cursor:pointer;padding-bottom:1px}.clickable-word:hover{opacity:.9}.token{display:inline}
.word-sheet-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:flex-end;justify-content:center;padding:16px;z-index:1000}.word-sheet{width:min(100%,560px);border-radius:24px 24px 18px 18px}
.pack-create-list{display:flex;flex-direction:column;gap:12px}.pack-create-row{padding:14px;border:1px solid var(--border);border-radius:18px;background:rgba(255,255,255,.04)}
.invite-box{padding:12px;border:1px dashed var(--border);border-radius:16px;background:rgba(255,255,255,.03)}
.pack-card,.card,.option-btn,.muted-btn,button,input,textarea,select{transition:background-color .18s ease,border-color .18s ease,transform .18s ease,opacity .18s ease,color .18s ease,box-shadow .18s ease}
body[data-theme='light'] .word-sheet-backdrop{background:rgba(17,32,54,.25)}

.toast-stack{position:fixed;top:18px;right:18px;z-index:1200;display:flex;flex-direction:column;gap:10px}.toast-item{min-width:220px;max-width:320px;padding:12px 14px;border-radius:14px;border:1px solid var(--border);background:var(--card);box-shadow:0 12px 30px rgba(0,0,0,.18);opacity:0;transform:translateY(-8px)}.toast-item.show{opacity:1;transform:none}.toast-item.success{border-color:rgba(54,199,130,.35)}.toast-item.error{border-color:rgba(255,122,122,.35)}.pack-card-actions.row-mode{flex-direction:row;flex-wrap:wrap;min-width:0}.pack-card-actions .compact{padding:8px 12px;border-radius:12px}.trainer-side-actions{display:flex;align-items:center;gap:8px;margin-left:auto}.favorite-star{margin-left:32px;min-width:44px;background:transparent;border:1px solid var(--border);color:var(--muted);font-size:24px;line-height:1}.favorite-star.active{color:#f7c948;border-color:rgba(247,201,72,.4);background:rgba(247,201,72,.12)}.pack-detail-sheet{max-width:860px}.vk-profile-button,.vk-nav-item{width:100%;display:flex;align-items:center;gap:14px;justify-content:flex-start;background:transparent;border:0;padding:0;color:inherit}.vk-profile-button{padding:2px 0}.cabinet-nav-list{padding:6px 0}.vk-nav-item{padding:16px 4px;border-radius:0;border-bottom:1px solid var(--border);font-size:20px}.vk-nav-item:last-child{border-bottom:0}.vk-arrow{margin-left:auto;font-size:30px;color:var(--muted)}.vk-profile-card h2{margin:0 0 4px}.password-rules{font-size:12px;color:var(--muted);margin-top:-4px}.pack-cover,.pack-cover-lg{background:rgba(255,255,255,.04)}
/* Light theme polish: remove remaining dark-blue surfaces */
body[data-theme='light']{
  background:linear-gradient(180deg,#f7f2ea 0%,#efe6da 52%,#e7dccd 100%);
}
body[data-theme='light']::before{
  background:linear-gradient(180deg,#f7f2ea 0%,#efe6da 52%,#e7dccd 100%);
}
body[data-theme='light'] .topbar{
  background:linear-gradient(180deg,rgba(247,242,234,.98),rgba(239,230,218,.96));
}
body[data-theme='light'] .card,
body[data-theme='light'] .auth-panel,
body[data-theme='light'] .modal-sheet,
body[data-theme='light'] .word-sheet,
body[data-theme='light'] .daily-word-card,
body[data-theme='light'] .word-item,
body[data-theme='light'] .reading-row,
body[data-theme='light'] .question-block,
body[data-theme='light'] .pack-card,
body[data-theme='light'] .reward-card,
body[data-theme='light'] .report-box,
body[data-theme='light'] .pack-create-row,
body[data-theme='light'] .invite-box,
body[data-theme='light'] .sentence-box,
body[data-theme='light'] .toggle-pill,
body[data-theme='light'] .switch-row,
body[data-theme='light'] .leader-row,
body[data-theme='light'] .metric,
body[data-theme='light'] .goal-pill,
body[data-theme='light'] .status-badge,
body[data-theme='light'] .option-btn,
body[data-theme='light'] .category-chip,
body[data-theme='light'] .tab-link,
body[data-theme='light'] .nav-btn.active,
body[data-theme='light'] .tab-btn.active,
body[data-theme='light'] .burger,
body[data-theme='light'] .favorite-star,
body[data-theme='light'] .pack-cover,
body[data-theme='light'] .pack-cover-lg{
  background:#fffaf3;
  color:var(--text);
  border-color:rgba(61,45,28,.10);
  box-shadow:none;
}
body[data-theme='light'] .sidebar{
  background:rgba(248,242,233,.98);
  border-right:1px solid rgba(61,45,28,.10);
}
body[data-theme='light'] input,
body[data-theme='light'] select,
body[data-theme='light'] textarea{
  background:#fffdf9;
  border-color:rgba(61,45,28,.12);
}
body[data-theme='light'] .goal-pill,
body[data-theme='light'] .status-badge,
body[data-theme='light'] .avatar-upload-tile,
body[data-theme='light'] .friend-request-banner,
body[data-theme='light'] .token.highlight,
body[data-theme='light'] .clickable-word,
body[data-theme='light'] .brand-chip{
  background:#efe6d7;
  border-color:rgba(61,45,28,.10);
  color:#5b4630;
}
body[data-theme='light'] .reward-ring,
body[data-theme='light'] .progress-track,
body[data-theme='light'] .heatmap-day{
  background:#e9dfd2;
}
body[data-theme='light'] .heatmap-tooltip{
  background:#fffaf3;
  color:var(--text);
}
body[data-theme='light'] .modal-backdrop,
body[data-theme='light'] .word-sheet-backdrop{
  background:rgba(73,57,40,.18);
}
body[data-theme='light'] .auth-panel-brand{
  background:linear-gradient(180deg,#fffaf3,#f5ede2);
}
body[data-theme='light'] .flash-box.error,
body[data-theme='light'] .error-box{
  background:#fff1ee;
  color:#7a302b;
}
body[data-theme='light'] .success-box{
  background:#eef8f1;
  color:#29583a;
}


/* Unified back-button layout */
.back-row{display:flex;justify-content:flex-start;align-items:center;margin-bottom:10px}
.back-btn{justify-content:flex-start;gap:8px;padding-left:12px;padding-right:14px}
.back-btn::before{content:'←';font-size:16px;line-height:1}
.header-stack{display:flex;flex-direction:column;gap:6px;min-width:0}

/* Full light theme redesign */
body[data-theme='light']{
  --bg:#f4f4f7;
  --card:#ffffff;
  --card2:#edf5fd;
  --text:#18222d;
  --muted:#7d8b99;
  --primary:#3390ec;
  --border:rgba(24,34,45,.10);
  background:linear-gradient(180deg,#f7f9fc 0%,#f2f5f9 48%,#edf2f7 100%);
}
body[data-theme='light']::before{
  background:
    radial-gradient(circle at top left, rgba(51,144,236,.12), transparent 34%),
    radial-gradient(circle at top right, rgba(80,170,255,.08), transparent 28%),
    linear-gradient(180deg,#f7f9fc 0%,#f2f5f9 48%,#edf2f7 100%);
}
body[data-theme='light'] .topbar{
  background:linear-gradient(180deg,rgba(247,249,252,.96),rgba(239,244,249,.92));
  border-bottom:1px solid rgba(24,34,45,.06);
}
body[data-theme='light'] .sidebar{
  background:rgba(245,248,252,.96);
  border-right:1px solid rgba(24,34,45,.08);
}
body[data-theme='light'] .card,
body[data-theme='light'] .auth-panel,
body[data-theme='light'] .modal-sheet,
body[data-theme='light'] .word-sheet,
body[data-theme='light'] .daily-word-card,
body[data-theme='light'] .word-item,
body[data-theme='light'] .reading-row,
body[data-theme='light'] .question-block,
body[data-theme='light'] .pack-card,
body[data-theme='light'] .reward-card,
body[data-theme='light'] .report-box,
body[data-theme='light'] .pack-create-row,
body[data-theme='light'] .invite-box,
body[data-theme='light'] .sentence-box,
body[data-theme='light'] .toggle-pill,
body[data-theme='light'] .switch-row,
body[data-theme='light'] .leader-row,
body[data-theme='light'] .metric,
body[data-theme='light'] .goal-pill,
body[data-theme='light'] .status-badge,
body[data-theme='light'] .option-btn,
body[data-theme='light'] .category-chip,
body[data-theme='light'] .tab-link,
body[data-theme='light'] .nav-btn,
body[data-theme='light'] .burger,
body[data-theme='light'] .favorite-star,
body[data-theme='light'] .pack-cover,
body[data-theme='light'] .pack-cover-lg,
body[data-theme='light'] .toast-item{
  background:rgba(255,255,255,.96);
  color:var(--text);
  border-color:rgba(24,34,45,.08);
  box-shadow:0 10px 28px rgba(24,34,45,.06);
}
body[data-theme='light'] .nav-btn.active,
body[data-theme='light'] .tab-btn.active,
body[data-theme='light'] .category-chip.active,
body[data-theme='light'] .option-btn:hover,
body[data-theme='light'] .muted-btn:hover,
body[data-theme='light'] .favorite-star:hover{
  background:#edf5fd;
}
body[data-theme='light'] button,
body[data-theme='light'] .button-link{
  box-shadow:0 10px 24px rgba(51,144,236,.18);
}
body[data-theme='light'] .muted-btn,
body[data-theme='light'] .ghost,
body[data-theme='light'] .tab-btn,
body[data-theme='light'] .nav-btn{
  color:var(--text);
}
body[data-theme='light'] input,
body[data-theme='light'] select,
body[data-theme='light'] textarea{
  background:#ffffff;
  color:var(--text);
  border-color:rgba(24,34,45,.10);
}
body[data-theme='light'] input::placeholder,
body[data-theme='light'] textarea::placeholder{color:#96a2ae}
body[data-theme='light'] .goal-pill,
body[data-theme='light'] .status-badge,
body[data-theme='light'] .avatar-upload-tile,
body[data-theme='light'] .friend-request-banner,
body[data-theme='light'] .token.highlight,
body[data-theme='light'] .clickable-word,
body[data-theme='light'] .brand-chip,
body[data-theme='light'] .switch-row,
body[data-theme='light'] .toggle-pill,
body[data-theme='light'] .leader-row{
  background:#f3f8fe;
  color:#3d5368;
  border-color:rgba(51,144,236,.16);
}
body[data-theme='light'] .reward-ring,
body[data-theme='light'] .progress-track,
body[data-theme='light'] .heatmap-day{
  background:#dfeaf7;
}
body[data-theme='light'] .reward-ring span,
body[data-theme='light'] .progress-track span{
  background:linear-gradient(90deg,#3390ec,#5fb1ff);
}
body[data-theme='light'] .heatmap-day.active{background:#3390ec}
body[data-theme='light'] .heatmap-tooltip{
  background:#ffffff;
  color:var(--text);
  border-color:rgba(24,34,45,.08);
}
body[data-theme='light'] .modal-backdrop,
body[data-theme='light'] .word-sheet-backdrop{background:rgba(24,34,45,.18)}
body[data-theme='light'] .auth-panel-brand{background:linear-gradient(180deg,#ffffff,#f2f7fd)}
body[data-theme='light'] .flash-box.error,
body[data-theme='light'] .error-box{
  background:#fff1f1;
  color:#9f3d3d;
  border-color:rgba(201,79,79,.18);
}
body[data-theme='light'] .success-box{
  background:#eef8f1;
  color:#2f7250;
  border-color:rgba(47,114,80,.16);
}
body[data-theme='light'] .status-badge.learned{
  background:#e8f6ee;
  color:#2f7250;
}
body[data-theme='light'] .link-toggle{color:#3390ec}
body[data-theme='light'] .avatar-sm,
body[data-theme='light'] .avatar-lg,
body[data-theme='light'] .avatar-xl{
  background:#edf5fd;
  border-color:rgba(51,144,236,.18);
  color:#2475c7;
}
body[data-theme='light'] .favorite-star{color:#8b98a5}
body[data-theme='light'] .favorite-star.active{
  color:#f4b400;
  background:#fff8dc;
  border-color:rgba(244,180,0,.28);
  box-shadow:0 0 0 1px rgba(244,180,0,.05), 0 10px 24px rgba(244,180,0,.12);
}
body[data-theme='light'] .pack-cover,
body[data-theme='light'] .pack-cover-lg{
  background:#eef5fc;
}
body[data-theme='light'] .skeleton-line{background:rgba(24,34,45,.08)}
body[data-theme='light'] .clickable-word{border-bottom-color:rgba(51,144,236,.45)}

/* Light theme final polish: flatter Telegram-like mobile surfaces */
body[data-theme='light']{
  --bg:#f4f5f7;
  --card:#ffffff;
  --card2:#f4f6f8;
  --text:#18222d;
  --muted:#7f8b97;
  --primary:#3390ec;
  --border:rgba(24,34,45,.09);
  background:#f4f5f7;
}
body[data-theme='light']::before{
  background:#f4f5f7;
}
body[data-theme='light'] .topbar,
body[data-theme='light'] .sidebar{
  background:#f4f5f7;
}
body[data-theme='light'] .card,
body[data-theme='light'] .auth-panel,
body[data-theme='light'] .modal-sheet,
body[data-theme='light'] .word-sheet,
body[data-theme='light'] .daily-word-card,
body[data-theme='light'] .word-item,
body[data-theme='light'] .reading-row,
body[data-theme='light'] .question-block,
body[data-theme='light'] .pack-card,
body[data-theme='light'] .reward-card,
body[data-theme='light'] .report-box,
body[data-theme='light'] .pack-create-row,
body[data-theme='light'] .invite-box,
body[data-theme='light'] .sentence-box,
body[data-theme='light'] .toggle-pill,
body[data-theme='light'] .switch-row,
body[data-theme='light'] .leader-row,
body[data-theme='light'] .metric,
body[data-theme='light'] .goal-pill,
body[data-theme='light'] .status-badge,
body[data-theme='light'] .option-btn,
body[data-theme='light'] .category-chip,
body[data-theme='light'] .tab-link,
body[data-theme='light'] .nav-btn,
body[data-theme='light'] .burger,
body[data-theme='light'] .favorite-star,
body[data-theme='light'] .pack-cover,
body[data-theme='light'] .pack-cover-lg,
body[data-theme='light'] .toast-item,
body[data-theme='light'] input,
body[data-theme='light'] select,
body[data-theme='light'] textarea,
body[data-theme='light'] button,
body[data-theme='light'] .button-link{
  box-shadow:none;
}
body[data-theme='light'] .card,
body[data-theme='light'] .auth-panel,
body[data-theme='light'] .modal-sheet,
body[data-theme='light'] .word-sheet,
body[data-theme='light'] .daily-word-card,
body[data-theme='light'] .word-item,
body[data-theme='light'] .reading-row,
body[data-theme='light'] .question-block,
body[data-theme='light'] .pack-card,
body[data-theme='light'] .reward-card,
body[data-theme='light'] .report-box,
body[data-theme='light'] .pack-create-row,
body[data-theme='light'] .invite-box{
  background:#ffffff;
  border-color:rgba(24,34,45,.08);
}
body[data-theme='light'] .option-btn,
body[data-theme='light'] .goal-pill,
body[data-theme='light'] .status-badge,
body[data-theme='light'] .toggle-pill,
body[data-theme='light'] .switch-row,
body[data-theme='light'] .leader-row,
body[data-theme='light'] .metric,
body[data-theme='light'] .sentence-box,
body[data-theme='light'] .pack-cover,
body[data-theme='light'] .pack-cover-lg,
body[data-theme='light'] .favorite-star,
body[data-theme='light'] .burger,
body[data-theme='light'] .nav-btn,
body[data-theme='light'] .tab-link,
body[data-theme='light'] .toast-item{
  background:#f8f9fb;
  border-color:rgba(24,34,45,.08);
}
body[data-theme='light'] .nav-btn.active,
body[data-theme='light'] .tab-btn.active,
body[data-theme='light'] .category-chip.active,
body[data-theme='light'] .option-btn:hover,
body[data-theme='light'] .muted-btn:hover,
body[data-theme='light'] .favorite-star:hover{
  background:#eef5fc;
}
body[data-theme='light'] .favorite-star.active{
  background:#fff5cc;
  box-shadow:none;
}
body[data-theme='light'] .goal-pill,
body[data-theme='light'] .status-badge,
body[data-theme='light'] .avatar-upload-tile,
body[data-theme='light'] .friend-request-banner,
body[data-theme='light'] .token.highlight,
body[data-theme='light'] .clickable-word,
body[data-theme='light'] .brand-chip,
body[data-theme='light'] .switch-row,
body[data-theme='light'] .toggle-pill,
body[data-theme='light'] .leader-row{
  background:#f5f8fc;
  color:#4f6172;
}
body[data-theme='light'] .reward-ring,
body[data-theme='light'] .progress-track,
body[data-theme='light'] .heatmap-day{
  background:#e7edf4;
}
body[data-theme='light'] .auth-panel-brand{
  background:#ffffff;
}
@media (max-width: 900px){
  body[data-theme='light'] .topbar{
    background:#f4f5f7;
    border-bottom:1px solid rgba(24,34,45,.05);
  }
}


/* Final light-theme cleanup */
html[data-theme="light"]{background:#f4f5f7;color-scheme:light}
html[data-theme="dark"]{background:#06101d;color-scheme:dark}
body[data-theme='light']{
  background:#f4f5f7;
}
body[data-theme='light']::before{
  background:#f4f5f7;
}
body[data-theme='light'] .topbar,
body[data-theme='light'] .sidebar{
  background:#f4f5f7;
}
body[data-theme='light'] .card,
body[data-theme='light'] .auth-panel,
body[data-theme='light'] .modal-sheet,
body[data-theme='light'] .word-sheet,
body[data-theme='light'] .daily-word-card,
body[data-theme='light'] .word-item,
body[data-theme='light'] .reading-row,
body[data-theme='light'] .question-block,
body[data-theme='light'] .pack-card,
body[data-theme='light'] .reward-card,
body[data-theme='light'] .report-box,
body[data-theme='light'] .pack-create-row,
body[data-theme='light'] .invite-box,
body[data-theme='light'] .auth-panel-brand{
  background:#fff;
  border-color:rgba(24,34,45,.08);
  box-shadow:none;
}
body[data-theme='light'] .muted-btn,
body[data-theme='light'] .ghost,
body[data-theme='light'] .tab-btn,
body[data-theme='light'] .nav-btn,
body[data-theme='light'] .option-btn,
body[data-theme='light'] .tab-link,
body[data-theme='light'] .burger,
body[data-theme='light'] .favorite-star,
body[data-theme='light'] .goal-pill,
body[data-theme='light'] .status-badge,
body[data-theme='light'] .toggle-pill,
body[data-theme='light'] .switch-row,
body[data-theme='light'] .leader-row,
body[data-theme='light'] .metric,
body[data-theme='light'] .sentence-box,
body[data-theme='light'] .pack-cover,
body[data-theme='light'] .pack-cover-lg,
body[data-theme='light'] .toast-item{
  background:#fff;
  border-color:rgba(24,34,45,.10);
  color:var(--text);
  box-shadow:none;
}
body[data-theme='light'] button:not(.muted-btn):not(.ghost):not(.tab-btn):not(.nav-btn):not(.option-btn):not(.tab-link):not(.burger):not(.favorite-star):not(.danger-btn):not(.vk-profile-button):not(.vk-nav-item),
body[data-theme='light'] .button-link:not(.muted-btn):not(.ghost):not(.tab-btn):not(.nav-btn):not(.option-btn):not(.tab-link):not(.danger-btn){
  background:#3390ec;
  border:1px solid #3390ec;
  color:#fff;
  box-shadow:none;
}
body[data-theme='light'] .muted-btn:hover,
body[data-theme='light'] .ghost:hover,
body[data-theme='light'] .tab-btn:hover,
body[data-theme='light'] .nav-btn:hover,
body[data-theme='light'] .option-btn:hover,
body[data-theme='light'] .tab-link:hover,
body[data-theme='light'] .burger:hover,
body[data-theme='light'] .favorite-star:hover{
  background:#f2f7fd;
}
body[data-theme='light'] .nav-btn.active,
body[data-theme='light'] .tab-btn.active,
body[data-theme='light'] .category-chip.active,
body[data-theme='light'] .option-btn.active,
body[data-theme='light'] .switch-row.active{
  background:#e8f2fd;
  border-color:rgba(51,144,236,.20);
  color:#2475c7;
}
body[data-theme='light'] .danger-btn{
  background:#fff1f1;
  border:1px solid rgba(231,76,60,.42);
  color:#d93025;
  box-shadow:none;
}
body[data-theme='light'] .danger-btn:hover{
  background:#ffe7e5;
  border-color:rgba(217,48,37,.60);
  color:#bf251b;
}
body[data-theme='light'] input,
body[data-theme='light'] select,
body[data-theme='light'] textarea{
  background:#fff;
  border-color:rgba(24,34,45,.12);
  color:var(--text);
  box-shadow:none;
}
body[data-theme='light'] .switch-row input[type="checkbox"],
body[data-theme='light'] .toggle-pill input[type="checkbox"]{
  accent-color:#3390ec;
}
body[data-theme='light'] .favorite-star.active{
  background:#fff4cc;
  border-color:rgba(244,180,0,.34);
  color:#f4b400;
}
body[data-theme='light'] .flash-box.error,
body[data-theme='light'] .error-box{
  background:#fff1f1;
  border-color:rgba(217,48,37,.28);
  color:#bf251b;
}
body[data-theme='light'] .toast-item.error{
  border-color:rgba(217,48,37,.32);
}
body[data-theme='light'] .toast-item.success{
  border-color:rgba(34,139,84,.26);
}
body[data-theme='light'] .modal-backdrop,
body[data-theme='light'] .word-sheet-backdrop{
  background:rgba(24,34,45,.10);
}


/* v18 light theme final polish */
body[data-theme='light'] .category-chip,
body[data-theme='light'] .tab-btn,
body[data-theme='light'] .option-btn,
body[data-theme='light'] .switch-row,
body[data-theme='light'] .toggle-pill{
  background:#ffffff;
  border-color:rgba(24,34,45,.12);
  color:#1f2d3d;
}
body[data-theme='light'] .category-chip:hover,
body[data-theme='light'] .tab-btn:hover,
body[data-theme='light'] .option-btn:hover,
body[data-theme='light'] .switch-row:hover,
body[data-theme='light'] .toggle-pill:hover{
  background:#f6fafe;
  border-color:rgba(51,144,236,.22);
}
body[data-theme='light'] .category-chip.active,
body[data-theme='light'] .tab-btn.active,
body[data-theme='light'] .option-btn.active,
body[data-theme='light'] .switch-row.active{
  background:#3390ec;
  border-color:#3390ec;
  color:#ffffff;
}
body[data-theme='light'] .reading-row{
  background:#3390ec;
  border-color:#3390ec;
  color:#ffffff;
}
body[data-theme='light'] .reading-row strong,
body[data-theme='light'] .reading-row > .row-between > span{
  color:#ffffff;
}
body[data-theme='light'] .reading-row .small{
  color:rgba(255,255,255,.80);
}
body[data-theme='light'] .reading-row.reading-done strong,
body[data-theme='light'] .reading-row.reading-done > .row-between > span,
body[data-theme='light'] .reading-row.reading-done .small{
  color:#d8ffe2;
}
body[data-theme='light'] .reading-row.reading-done{
  outline:none;
  box-shadow:inset 0 0 0 1px rgba(113,221,151,.7);
}


/* v19 light theme: secondary actions stay white, selected states blue */
body[data-theme='light'] .reading-row{
  background:#ffffff;
  border-color:rgba(24,34,45,.10);
  color:var(--text);
}
body[data-theme='light'] .reading-row strong,
body[data-theme='light'] .reading-row > .row-between > span,
body[data-theme='light'] .reading-row .small{
  color:inherit;
}
body[data-theme='light'] .reading-row .small{
  color:var(--muted);
}
body[data-theme='light'] .reading-row.reading-done{
  background:#ffffff;
  border-color:rgba(123,214,153,.55);
  box-shadow:none;
}
body[data-theme='light'] .reading-row.reading-done strong,
body[data-theme='light'] .reading-row.reading-done > .row-between > span,
body[data-theme='light'] .reading-row.reading-done .small{
  color:#71c98b;
}
body[data-theme='light'] .link-toggle,
body[data-theme='light'] .muted-btn,
body[data-theme='light'] .ghost,
body[data-theme='light'] .tab-btn,
body[data-theme='light'] .category-chip,
body[data-theme='light'] .option-btn,
body[data-theme='light'] .tab-link,
body[data-theme='light'] .burger,
body[data-theme='light'] .favorite-star,
body[data-theme='light'] .goal-pill,
body[data-theme='light'] .status-badge,
body[data-theme='light'] .toggle-pill,
body[data-theme='light'] .switch-row,
body[data-theme='light'] .leader-row,
body[data-theme='light'] .metric,
body[data-theme='light'] .sentence-box,
body[data-theme='light'] .pack-cover,
body[data-theme='light'] .pack-cover-lg,
body[data-theme='light'] .toast-item{
  background:#ffffff;
  border:1px solid rgba(24,34,45,.10);
  color:var(--text);
  box-shadow:none;
}
body[data-theme='light'] .link-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:11px 14px;
  border-radius:14px;
  text-decoration:none;
}
body[data-theme='light'] .link-toggle:hover,
body[data-theme='light'] .muted-btn:hover,
body[data-theme='light'] .ghost:hover,
body[data-theme='light'] .tab-btn:hover,
body[data-theme='light'] .category-chip:hover,
body[data-theme='light'] .option-btn:hover,
body[data-theme='light'] .tab-link:hover,
body[data-theme='light'] .burger:hover,
body[data-theme='light'] .favorite-star:hover{
  background:#f5f9fe;
  border-color:rgba(51,144,236,.20);
}
body[data-theme='light'] .tab-btn.active,
body[data-theme='light'] .category-chip.active,
body[data-theme='light'] .option-btn.active,
body[data-theme='light'] .tab-link.active,
body[data-theme='light'] .switch-row.active{
  background:#3390ec;
  border-color:#3390ec;
  color:#ffffff;
}
body[data-theme='light'] .tab-btn.active:hover,
body[data-theme='light'] .category-chip.active:hover,
body[data-theme='light'] .option-btn.active:hover,
body[data-theme='light'] .tab-link.active:hover,
body[data-theme='light'] .switch-row.active:hover{
  background:#3390ec;
  border-color:#3390ec;
  color:#ffffff;
}


/* Requested light-theme button/state fixes */
body[data-theme='light'] .muted-btn,
body[data-theme='light'] .ghost,
body[data-theme='light'] .tab-btn,
body[data-theme='light'] .nav-btn,
body[data-theme='light'] .category-chip,
body[data-theme='light'] .option-btn,
body[data-theme='light'] .tab-link,
body[data-theme='light'] .link-toggle,
body[data-theme='light'] button[data-send-sentence]{
  background:#ffffff !important;
  color:var(--text) !important;
  border:1px solid rgba(24,34,45,.10) !important;
  box-shadow:none !important;
}

body[data-theme='light'] .muted-btn:hover,
body[data-theme='light'] .ghost:hover,
body[data-theme='light'] .tab-btn:hover,
body[data-theme='light'] .nav-btn:hover,
body[data-theme='light'] .category-chip:hover,
body[data-theme='light'] .option-btn:hover,
body[data-theme='light'] .tab-link:hover,
body[data-theme='light'] .link-toggle:hover,
body[data-theme='light'] button[data-send-sentence]:hover{
  background:#f4f8ff !important;
  border-color:rgba(51,144,236,.22) !important;
}

body[data-theme='light'] .tab-btn.active,
body[data-theme='light'] .nav-btn.active,
body[data-theme='light'] .category-chip.active,
body[data-theme='light'] .tab-link.active,
body[data-theme='light'] .option-btn.active,
body[data-theme='light'] .option-btn.is-selected{
  background:#3390ec !important;
  color:#ffffff !important;
  border-color:#3390ec !important;
}

body[data-theme='light'] .link-toggle,
body[data-theme='light'] button[data-send-sentence]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  padding:11px 14px;
  text-decoration:none;
}

body[data-theme='light'] .daily-word-card,
body[data-theme='light'] .reading-row{
  background:#ffffff !important;
  border:1px solid rgba(24,34,45,.08) !important;
  box-shadow:0 6px 16px rgba(24,34,45,.04) !important;
}

body[data-theme='light'] .reading-row:hover{
  background:#fcfdff !important;
  border-color:rgba(51,144,236,.14) !important;
  box-shadow:0 8px 20px rgba(51,144,236,.06) !important;
}

body[data-theme='light'] .reading-row strong{
  color:#223142 !important;
}

body[data-theme='light'] .reading-row > .row-between > span{
  color:#4c6884 !important;
}

body[data-theme='light'] .reading-row .small{
  color:#73879c !important;
}

body[data-theme='light'] .daily-word-card:has(.status-badge.learned){
  background:#eef9f1 !important;
  border-color:rgba(92,187,120,.26) !important;
}

body[data-theme='light'] .reading-row.reading-done{
  background:#eef9f1 !important;
  border-color:rgba(92,187,120,.26) !important;
  box-shadow:0 6px 16px rgba(79,154,104,.06) !important;
  outline:none !important;
}

body[data-theme='light'] .reading-row.reading-done span,
body[data-theme='light'] .reading-row.reading-done strong,
body[data-theme='light'] .reading-row.reading-done .small,
body[data-theme='light'] .daily-word-card:has(.status-badge.learned) .daily-word-title,
body[data-theme='light'] .daily-word-card:has(.status-badge.learned) .muted-line{
  color:#4f9a68 !important;
}

body[data-theme='light'] .status-badge.learned{
  background:#e8f6ec !important;
  color:#4f9a68 !important;
  border:1px solid rgba(92,187,120,.24) !important;
}

/* Final project fixes */
.auth-body{min-height:100dvh!important;align-items:center!important;padding-top:20px!important;padding-bottom:20px!important}
.password-toggle{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;padding:0;min-width:42px;color:var(--muted)}
.password-toggle svg{width:20px;height:20px;display:block}
.password-checklist{display:grid;gap:6px;margin-top:-2px;margin-bottom:2px;text-align:left}
.password-check{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:8px}
.password-check::before{content:'•';font-size:16px;line-height:1;color:var(--muted)}
.password-check.ok{color:#36c782}
.password-check.ok::before{content:'✓';color:#36c782;font-size:14px}
.training-head{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:start}
.training-prompt-wrap{min-width:0}
.training-sound-btn{justify-self:start}
.trainer-side-actions{margin-left:0}
.favorite-star{margin-left:0}
.switch-row input[type="checkbox"],
.toggle-pill input[type="checkbox"]{-webkit-appearance:none;appearance:none;width:22px;height:22px;border-radius:6px;border:1px solid rgba(24,34,45,.18);background:#fff;display:inline-grid;place-content:center;cursor:pointer;position:relative;flex:0 0 auto}
.switch-row input[type="checkbox"]::after,
.toggle-pill input[type="checkbox"]::after{content:'';width:6px;height:12px;border-right:2px solid transparent;border-bottom:2px solid transparent;transform:rotate(45deg) scale(0);transition:transform .15s ease}
.switch-row input[type="checkbox"]:checked::after,
.toggle-pill input[type="checkbox"]:checked::after{border-color:#3390ec;transform:rotate(45deg) scale(1)}
body[data-theme='dark'] .switch-row input[type="checkbox"],
body[data-theme='dark'] .toggle-pill input[type="checkbox"],
body[data-theme='light'] .switch-row input[type="checkbox"],
body[data-theme='light'] .toggle-pill input[type="checkbox"]{background:#fff!important}
.reading-row.reading-done,
body[data-theme='light'] .reading-row.reading-done{border-color:rgba(54,199,130,.45)!important;background:rgba(54,199,130,.12)!important}
.reading-row.reading-done strong,
.reading-row.reading-done span,
.reading-row.reading-done .small,
body[data-theme='light'] .reading-row.reading-done strong,
body[data-theme='light'] .reading-row.reading-done span,
body[data-theme='light'] .reading-row.reading-done .small{color:#2ca768!important}
.toast-item{transition:opacity .22s ease,transform .22s ease}
.ptr-loading{cursor:progress}
@media(max-width:640px){.training-head{grid-template-columns:auto 1fr auto;align-items:center}.favorite-star{min-width:42px}}


/* Native-like pull to refresh */
:root{--ptr-shift:0px;--ptr-page-shift:0px;--ptr-progress:0}
.app-shell,
.auth-layout{transform:translate3d(0,var(--ptr-page-shift),0);transition:transform .22s cubic-bezier(.22,.61,.36,1);will-change:transform}
body.ptr-loading .app-shell,
body.ptr-loading .auth-layout{transition:none}
#pull-refresh-indicator{position:fixed;top:12px;left:50%;transform:translate3d(-50%, calc(-130% + var(--ptr-shift)), 0);z-index:1600;pointer-events:none;opacity:0;transition:opacity .2s ease,transform .22s cubic-bezier(.22,.61,.36,1);will-change:transform,opacity}
#pull-refresh-indicator.visible{opacity:1}
#pull-refresh-indicator.loading{opacity:1}
.ptr-ring{width:34px;height:34px;border-radius:50%;background:conic-gradient(#3390ec calc(var(--ptr-progress,0) * 1turn), rgba(51,144,236,.18) 0);display:grid;place-items:center;box-shadow:0 6px 16px rgba(0,0,0,.12)}
.ptr-hole{width:24px;height:24px;border-radius:50%;background:rgba(255,255,255,.96);box-shadow:inset 0 0 0 1px rgba(122,140,162,.16)}
[data-theme="dark"] .ptr-hole,
body[data-theme="dark"] .ptr-hole{background:#06101d;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
#pull-refresh-indicator.ready .ptr-ring{box-shadow:0 8px 18px rgba(51,144,236,.2)}
#pull-refresh-indicator.loading .ptr-ring{animation:ptr-spin .85s linear infinite}
@keyframes ptr-spin{to{transform:rotate(360deg)}}

/* Round checkboxes */
.switch-row input[type="checkbox"],
.toggle-pill input[type="checkbox"]{width:18px!important;height:18px!important;border-radius:50%!important;border:1.5px solid rgba(24,34,45,.2)!important;background:#fff!important;box-shadow:none!important}
.switch-row input[type="checkbox"]::after,
.toggle-pill input[type="checkbox"]::after{content:'✓'!important;width:auto!important;height:auto!important;border:0!important;color:#111!important;font-size:11px!important;font-weight:700;line-height:1;transform:scale(0)!important}
.switch-row input[type="checkbox"]:checked,
.toggle-pill input[type="checkbox"]:checked{background:#3390ec!important;border-color:#3390ec!important}
.switch-row input[type="checkbox"]:checked::after,
.toggle-pill input[type="checkbox"]:checked::after{transform:scale(1)!important}
.toggle-pill{gap:10px}

/* Small visual tuning */
.training-head{grid-template-columns:auto 1fr auto!important;align-items:center!important}
.training-sound-btn{order:0}
.training-prompt-wrap{order:1}
.favorite-star{order:2;justify-self:end}
