:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --paper: #fff;
  --ink: #151c29;
  --muted: #647085;
  --line: #e9edf3;
  --blue: #0865ec;
  --blue-deep: #0756c8;
  --soft-blue: #eaf3ff;
  --cyan: #a6e9ff;
  --yellow: #fff0ad;
  --purple: #eae4ff;
  --mint: #daf7e9;
  --sidebar: 224px;
  font-family: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; }
button, a, summary, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #075ccc; outline-offset: 3px; }
p, h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(42px, 5vw, 58px); line-height: 1.04; letter-spacing: -.065em; font-weight: 780; overflow-wrap: anywhere; }
h2 { font-size: 25px; font-weight: 730; line-height: 1.12; letter-spacing: -.04em; }
small { font-size: 13px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell { min-height: 100dvh; }
.sidebar { width: var(--sidebar); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; background: var(--paper); border-right: 1px solid var(--line); padding: 30px 16px 22px; z-index: 4; }
.brand, .mobile-brand { display: flex; align-items: center; text-decoration: none; gap: 10px; color: #152138; font-size: 34px; line-height: 1; font-weight: 820; letter-spacing: -.085em; }
.brand { margin: 0 0 53px 12px; align-self: flex-start; }
.brand-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--blue); color: #fff; font-size: 23px; font-weight: 780; letter-spacing: -.12em; padding-right: 2px; transform: rotate(-5deg); }
.brand-period { color: var(--blue); }
.nav-caption { margin: 0 0 12px 13px; font-weight: 700; font-size: 10px; letter-spacing: .14em; color: #758094; }
.sidebar nav { display: grid; gap: 4px; }
.nav-link { display: flex; gap: 12px; align-items: center; width: 100%; border: 0; background: transparent; border-radius: 12px; padding: 13px; text-align: left; font-size: 14px; font-weight: 610; color: #596579; white-space: nowrap; }
.nav-link:hover { background: #f3f6fa; }
.nav-link.active { color: var(--blue-deep); background: var(--soft-blue); font-weight: 720; }
.side-bottom { margin: auto 0 0; display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-top: 1px solid var(--line); }
.side-bottom strong, .side-bottom small { display: block; }
.side-bottom strong { font-size: 14px; margin-bottom: 3px; }
.side-bottom small { font-size: 11px; color: var(--muted); }
.flag { display: block; flex: 0 0 35px; aspect-ratio: 1; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #eceef2; background: linear-gradient(#eb5264 0 27%, #ffd05a 27% 73%, #eb5264 73%); position: relative; }
.flag::after { content: ""; position: absolute; width: 6px; height: 7px; border: 1px solid #bc3e4a; border-radius: 1px 1px 4px 4px; left: 8px; top: 12px; }
.main { margin-left: var(--sidebar); }
.header { min-height: 77px; padding: 15px 38px; display: flex; justify-content: space-between; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); }
.crumb, .top-actions { display: flex; gap: 10px; align-items: center; }
.crumb { color: var(--muted); font-size: 13px; }
.crumb strong { font-weight: 680; color: var(--ink); }
.mobile-brand { display: none; }
.button { border: 1px solid transparent; padding: 10px 17px; min-height: 43px; display: inline-flex; justify-content: center; gap: 8px; align-items: center; border-radius: 12px; font-size: 14px; font-weight: 690; line-height: 1.25; text-align: center; transition: background .16s ease, transform .16s ease; }
.button:active { transform: translateY(1px); }
.primary { background: var(--blue); color: #fff; }
.primary:hover { background: var(--blue-deep); }
.soft { color: var(--blue-deep); background: var(--soft-blue); }
.soft:hover { background: #d9eaff; }
.danger { color: #a6283a; background: #ffedf0; }
.danger:hover { background: #ffe0e7; }
.icon-button { position: relative; display: inline-grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: #4d5b71; flex-shrink: 0; }
.icon-button:hover { background: #eef3fa; }
.bell i { position: absolute; top: 9px; right: 8px; width: 8px; height: 8px; background: #1ba865; border: 1px solid #fff; border-radius: 50%; }
.avatar { display: grid; place-items: center; border-radius: 50%; width: 39px; height: 39px; font-size: 15px; font-weight: 760; color: #6741a3; background: #e9defd; }
.content { max-width: 1330px; margin-inline: auto; padding: 32px 38px 50px; }
.greeting, .page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 24px; }
.greeting p, .page-head p { color: var(--muted); font-size: 16px; margin-top: 9px; line-height: 1.45; }
.date-chip { display: inline-flex; flex-shrink: 0; gap: 7px; align-items: center; padding: 8px 11px; color: #53647c; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; margin-bottom: 2px; }
.hero { position: relative; min-height: 265px; isolation: isolate; border-radius: 25px; overflow: hidden; display: flex; background: var(--cyan); }
.hero-copy { position: relative; z-index: 1; align-self: center; padding: 30px 32px 32px; }
.hero-label { display: inline-flex; gap: 7px; align-items: center; font-size: 10px; font-weight: 800; letter-spacing: .085em; color: #145475; border-radius: 8px; background: #ffffff84; padding: 7px 9px; }
.hero h2 { font-size: clamp(35px, 4.2vw, 55px); letter-spacing: -.06em; margin: 12px 0 8px; }
.hero p { font-size: 16px; color: #24475c; line-height: 1.4; }
.hero-button { background: #132133; color: #fff; margin-top: 21px; padding-inline: 16px; min-height: 45px; gap: 16px; }
.hero-button:hover { background: #263e58; }
.hero-art { pointer-events: none; position: absolute; width: 390px; height: 265px; right: clamp(8px, 6vw, 86px); top: 50%; transform: translateY(-50%); }
.orbit { border: 1px solid #effaffb0; border-radius: 50%; position: absolute; transform: rotate(-24deg); }
.orbit-one { width: 366px; height: 132px; left: 9px; top: 69px; }
.orbit-two { width: 331px; height: 168px; left: 23px; top: 47px; }
.paper { position: absolute; width: 188px; height: 138px; border-radius: 18px; box-shadow: 0 10px 20px #245e8b26; }
.paper-back { background: #0872ff; left: 146px; top: 62px; transform: rotate(20deg); }
.paper-middle { background: #ffe183; left: 96px; top: 61px; transform: rotate(-17deg); }
.paper-front { background: #fff; left: 113px; top: 60px; transform: rotate(-7deg); padding: 15px 19px; color: #152036; }
.paper-front strong { font-size: 45px; display: block; line-height: 1; letter-spacing: -.075em; }
.paper-lang { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: .1em; color: #53627a; margin-bottom: 8px; }
.paper-lang i { width: 14px; height: 8px; border-radius: 2px; background: linear-gradient(#e95964 30%, #ffda69 30% 70%, #e95964 70%); }
.paper-line { width: 99%; background: #e5ebf5; height: 1px; display: block; margin: 8px 0 6px; }
.paper-front small { color: #5b6880; font-weight: 650; font-size: 13px; }
.paper-star { position: absolute; right: 14px; top: 11px; color: #1378fe; font-size: 20px; }
.art-star { position: absolute; color: #fff; font-size: 29px; line-height: 1; }
.star-one { left: 55px; top: 49px; }
.star-two { right: 28px; top: 62px; color: #0768df; }
.star-three { left: 49px; bottom: 51px; font-size: 16px; color: #0872ff; }
.art-check { position: absolute; right: 53px; bottom: 33px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: #b9f4cb; color: #136743; transform: rotate(12deg); box-shadow: 0 5px 12px #16634e23; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 28px 22px; margin-top: 27px; align-items: start; }
.section-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: 28px; margin-bottom: 13px; }
.section-head h2 { font-size: 22px; }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-deep); padding: 3px 0; border: 0; background: transparent; font-size: 13px; font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link[hidden] { display: none; }
.practice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.practice-tile, .import-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; width: 100%; min-height: 145px; border: 0; border-radius: 19px; padding: 16px; transition: transform .18s ease, box-shadow .18s ease; }
.practice-tile:hover, .import-tile:hover { transform: translateY(-3px); box-shadow: 0 7px 14px #24375a0e; }
.yellow { background: var(--yellow); }
.purple { background: var(--purple); }
.import-tile { background: var(--mint); }
.tile-icon, .activity-icon { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: #ffffff80; margin-bottom: 12px; }
.yellow .tile-icon { color: #7f570a; }
.purple .tile-icon { color: #6948af; }
.import-tile .tile-icon { color: #137c61; }
.tile-arrow { position: absolute; right: 15px; top: 16px; color: #344155; }
.practice-tile strong, .import-tile strong { display: block; font-size: clamp(16px, 1.5vw, 20px); letter-spacing: -.04em; line-height: 1.15; margin-bottom: 5px; }
.practice-tile small, .import-tile small { font-size: 13px; line-height: 1.3; color: #454d62; }
.word-list, .rule-list, .activity, .surface, .empty, .stat { border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.word-list, .rule-list { overflow: hidden; }
.word-row, .rule-row { display: flex; width: 100%; text-align: left; gap: 12px; align-items: center; border: 0; background: #fff; padding: 11px 14px; }
.word-row + .word-row, .rule-row + .rule-row { border-top: 1px solid var(--line); }
.word-row:hover, .rule-row:hover { background: #f8fbff; }
.word-row:focus-visible, .rule-row:focus-visible { outline-offset: -4px; }
.word-row > svg, .rule-row > svg { flex-shrink: 0; color: #7c899a; }
.letter { display: inline-grid; place-items: center; flex-shrink: 0; width: 37px; height: 37px; border-radius: 11px; font-size: 17px; font-weight: 760; }
.blue { background: #e1efff; color: #125bbf; }
.peach { background: #ffe9db; color: #9d481c; }
.lilac { background: #efe5ff; color: #7041b6; }
.mint { background: #def6e7; color: #19764d; }
.word-label, .rule-row > span:nth-child(2) { min-width: 0; flex: 1; }
.word-label strong, .word-label small, .rule-row strong, .rule-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.word-label strong, .rule-row strong { font-size: 15px; font-weight: 750; }
.word-label small, .rule-row small { color: var(--muted); font-size: 12px; margin-top: 3px; }
.word-status { flex-shrink: 0; font-size: 11px; font-weight: 680; color: #53627a; background: #f1f4f8; padding: 5px 8px; border-radius: 7px; }
.stage-2, .stage-3, .stage-4, .stage-5 { color: #6942a7; background: #f0e9ff; }
.stage-6 { color: #1d714a; background: #e3f8eb; }
.mastery { display: inline-flex; gap: 3px; flex-shrink: 0; }
.mastery i { display: block; width: 6px; height: 6px; border-radius: 50%; background: #e5eaf2; }
.mastery i.filled { background: var(--blue); }
.activity { padding: 17px 17px 14px; }
.activity-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.activity-icon { background: var(--soft-blue); color: var(--blue); margin-bottom: 0; }
.big-stat { font-weight: 760; font-size: 32px; letter-spacing: -.06em; }
.activity-top .muted { font-size: 13px; }
.activity p { color: var(--muted); margin-top: 2px; font-size: 12px; }
.bar-chart { margin-top: 13px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.bar-cell { text-align: center; color: var(--muted); font-size: 11px; }
.bar-track { height: 60px; background: #edf4ff; border-radius: 6px; margin-bottom: 6px; display: flex; align-items: flex-end; }
.bar-track span { width: 100%; height: var(--height); background: #a7cbff; border-radius: 6px; }
.bar-track span.is-today { background: var(--blue); }
.page-head { margin-top: 8px; margin-bottom: 27px; }
.page-head h1 { font-size: clamp(36px, 5vw, 54px); }
.toolbar { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 15px; flex-wrap: wrap; }
.search { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; min-width: min(100%, 290px); padding: 0 11px; color: var(--muted); }
.search input { border: 0; padding: 10px 0; width: 100%; background: transparent; }
.search input:focus { outline: 0; }
.search:focus-within { outline: 2px solid var(--blue); }
.segmented { display: flex; background: #eaf0f7; padding: 3px; border-radius: 11px; gap: 2px; }
.segmented button { border: 0; background: transparent; border-radius: 8px; padding: 8px 10px; color: #53647a; font-size: 13px; font-weight: 650; }
.segmented button.selected { background: #fff; color: var(--blue-deep); }
.empty, .loading { display: grid; place-items: center; gap: 12px; text-align: center; min-height: 150px; padding: 22px; color: var(--muted); }
.empty svg { color: var(--blue); }
.surface { padding: 21px; }
.surface p, .modal-copy { line-height: 1.5; color: var(--muted); margin: 10px 0 15px; }
.stat-grid, .progress-grid, .import-layout { display: grid; gap: 16px; }
.stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 25px; }
.stat { padding: 18px; display: grid; gap: 5px; }
.stat strong { font-size: 37px; line-height: 1.2; letter-spacing: -.06em; }
.stat > span:last-child { color: var(--muted); font-size: 13px; }
.progress-grid, .import-layout { grid-template-columns: 1.2fr 1fr; }
.import-help h2 { margin-top: 13px; }
.import-surface form { margin-top: 12px; }
.import-foot { margin-top: 15px; font-size: 13px; line-height: 1.4; }
.review-list { display: grid; gap: 9px; margin-bottom: 16px; }
.review-list label { display: flex; align-items: flex-start; gap: 10px; padding: 10px; background: var(--bg); border-radius: 10px; }
.review-list input { width: auto; margin-top: 2px; accent-color: var(--blue); }
.review-list strong, .review-list small { display: block; overflow-wrap: anywhere; }
.review-list small { margin-top: 3px; color: var(--muted); white-space: pre-wrap; }
.exercise-shell { max-width: 720px; margin-inline: auto; }
.exercise-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); margin-bottom: 11px; }
.exercise-progress { height: 7px; border-radius: 10px; background: #e0e9f6; margin-bottom: 15px; overflow: hidden; }
.exercise-progress span { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.exercise { display: grid; justify-items: center; align-content: center; min-height: 370px; background: #e7f6ff; border: 1px solid #d2ebfc; border-radius: 24px; text-align: center; padding: 28px 16px; gap: 17px; }
.exercise h2 { font-size: clamp(35px, 6vw, 59px); overflow-wrap: anywhere; }
.exercise p { font-size: 18px; color: #455c76; }
.exercise mark { background: #d2e7ff; color: #104e9c; border-radius: 7px; padding: 0 .2em; }
.exercise input { max-width: 350px; }
.exercise-actions, .modal-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.exercise .correct { color: #176542; }
.exercise .incorrect { color: #a43139; }
dialog { color: var(--ink); border: 1px solid var(--line); background: #fff; border-radius: 22px; width: min(500px, calc(100% - 26px)); padding: 22px; max-height: calc(100dvh - 28px); box-shadow: 0 16px 70px #14233e2b; }
dialog::backdrop { background: #162a475f; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-head h2 { overflow-wrap: anywhere; }
.modal-head .icon-button { height: 36px; width: 36px; }
form { display: grid; gap: 12px; }
form label { display: grid; gap: 6px; color: #45536a; font-size: 13px; font-weight: 670; }
input, textarea { width: 100%; border: 1px solid #dbe3ee; background: #fff; border-radius: 10px; font-size: 16px; padding: 10px 11px; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #728196; }
details { padding: 10px; border-radius: 12px; background: #f4f7fc; }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 6px; color: var(--blue-deep); font-size: 13px; font-weight: 710; }
summary::-webkit-details-marker { display: none; }
details[open] > :not(summary) { margin-top: 11px; }
details[open] summary svg { transform: rotate(180deg); }
.input-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-error { color: #a62638; font-size: 13px; }
.form-error:empty { display: none; }
.full { width: 100%; }
.record-detail { display: grid; gap: 10px; overflow-wrap: anywhere; }
.record-detail h3 { font-size: 14px; }
.record-detail small { color: var(--muted); }
.record-detail blockquote { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); color: #304360; }
.rule-body { white-space: pre-wrap; line-height: 1.6; }
.tags, .detail-progress { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tags span, .status-pill { background: var(--soft-blue); color: var(--blue-deep); padding: 5px 8px; border-radius: 7px; font-size: 13px; }
.detail-progress .mastery i { width: 10px; height: 10px; }
.detail-progress strong { font-size: 13px; }
.modal-actions { margin-top: 8px; justify-content: flex-start; }
.toast { position: fixed; z-index: 10; max-width: min(430px, calc(100% - 28px)); left: 50%; transform: translateX(-50%); bottom: 22px; padding: 12px 17px; border-radius: 11px; background: #152138; color: #fff; font-size: 14px; box-shadow: 0 6px 18px #15213824; }
@media (max-width: 1100px) {
  :root { --sidebar: 192px; }
  .header { padding-inline: 25px; }
  .content { padding-inline: 25px; }
  .hero-art { right: 0; transform: translateY(-50%) scale(.86); transform-origin: right center; }
}
@media (max-width: 870px) {
  :root { --sidebar: 0px; }
  .sidebar { width: 100%; inset: auto 0 0; border-right: 0; border-top: 1px solid var(--line); padding: 5px 5px max(6px, env(safe-area-inset-bottom)); }
  .sidebar .brand, .nav-caption, .side-bottom, .crumb { display: none; }
  .sidebar nav { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; }
  .nav-link { min-height: 51px; justify-content: center; flex-direction: column; padding: 5px 0; gap: 4px; font-size: clamp(8px, 1.4vw, 11px); border-radius: 9px; }
  .nav-link svg { width: 19px; height: 19px; }
  .mobile-brand { display: flex; font-size: 26px; gap: 7px; }
  .mobile-brand .brand-mark { width: 30px; height: 30px; font-size: 19px; border-radius: 9px; }
  .mobile-brand .brand-period { margin-left: -7px; }
  .content { padding-bottom: calc(87px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(70px + env(safe-area-inset-bottom)); }
}
@media (max-width: 650px) {
  .header { min-height: 62px; padding: 9px 15px; }
  .top-actions { gap: 6px; }
  .top-actions .button { min-height: 37px; padding: 7px 9px; font-size: 12px; gap: 4px; }
  .top-actions .icon-button { width: 36px; height: 36px; }
  .avatar { display: none; }
  .content { padding: 22px 15px calc(83px + env(safe-area-inset-bottom)); }
  .greeting { align-items: flex-start; margin-bottom: 17px; }
  .greeting p, .page-head p { font-size: 14px; margin-top: 6px; }
  .date-chip { font-size: 11px; padding: 6px; margin-top: 4px; gap: 4px; }
  .date-chip svg { width: 13px; height: 13px; }
  .hero { border-radius: 20px; min-height: 220px; }
  .hero-copy { padding: 19px; max-width: min(100%, 320px); }
  .hero h2 { font-size: clamp(30px, 6vw, 42px); margin-block: 10px 6px; }
  .hero p { font-size: 13px; }
  .hero-label { font-size: 8px; gap: 4px; padding: 5px 6px; }
  .hero-label svg { width: 13px; height: 13px; }
  .hero-button { min-height: 39px; font-size: 12px; gap: 8px; margin-top: 15px; }
  .hero-art { right: 0; top: 65%; transform: translateY(-50%) scale(.50); }
  .dashboard-grid, .progress-grid, .import-layout { grid-template-columns: 1fr; gap: 20px; }
  .dashboard-grid { margin-top: 21px; }
  .section-head { margin-bottom: 8px; }
  .section-head h2 { font-size: 20px; }
  .practice-grid { gap: 9px; }
  .practice-tile, .import-tile { min-height: 125px; padding: 12px; border-radius: 15px; }
  .tile-icon { margin-bottom: 9px; width: 36px; height: 36px; }
  .tile-icon svg { width: 22px; height: 22px; }
  .tile-arrow { right: 10px; top: 11px; }
  .practice-tile small, .import-tile small { font-size: 12px; }
  .page-head { align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
  .stat-grid { gap: 7px; }
  .stat { padding: 11px; }
  .stat > span:last-child { font-size: 11px; }
  .word-row { padding-inline: 9px; gap: 8px; }
  .word-status { font-size: 10px; padding: 4px 5px; }
}
@media (max-width: 460px) {
  .hero-copy { max-width: 71%; }
  .hero-art { right: -2px; top: 68%; transform: translateY(-50%) scale(.37); }
  .hero h2 { max-width: 205px; }
  .hero p { max-width: 165px; }
  .word-row .mastery { display: none; }
}
@media (max-width: 355px) {
  .hero-art { right: -12px; transform: translateY(-50%) scale(.30); }
  .date-chip { display: none; }
  .input-pair { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
