:root{
  --bg:#0d0d0c;
  --surface:#151514;
  --surface-2:#1a1918;
  --surface-3:#211f1d;
  --surface-raised:#252321;
  --line:#2b2926;
  --line-strong:#403d38;
  --text:#f1efe9;
  --muted:#aaa69d;
  --muted-2:#7b776f;
  --accent:#7d8fb7;
  --accent-hover:#8d9dc1;
  --success:#7d9d7c;
  --warning:#b39a62;
  --danger:#b96f68;
  --radius-sm:8px;
  --radius:12px;
  --radius-lg:16px;
  --shadow:0 18px 46px rgba(0,0,0,.34);
  --shadow-soft:0 8px 24px rgba(0,0,0,.18);
  --font:'Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  min-height:100vh;
  color:var(--text);
  font-family:var(--font);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  background-color:var(--bg);
  background-image:radial-gradient(circle at 1px 1px,#171614 1px,transparent 1px);
  background-size:6px 6px;
}
button,input,textarea,select{font:inherit}
button,a{-webkit-tap-highlight-color:transparent}
a{color:inherit}
button{color:inherit}
svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
[hidden]{display:none!important}

.topbar{
  position:sticky;top:0;z-index:50;
  border-bottom:1px solid var(--line);
  background:#10100f;
}
.topbar__inner{
  max-width:1500px;margin:auto;min-height:76px;padding:11px 24px;
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px;
}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;min-width:0;width:max-content}
.brand__logo{width:42px;height:42px;border-radius:10px;object-fit:cover;border:1px solid var(--line)}
.brand strong,.brand span{display:block}
.brand strong{font-size:.98rem;font-weight:700;letter-spacing:-.02em}
.brand span{font-size:.72rem;color:var(--muted);margin-top:2px}
.week-switcher{
  display:flex;align-items:center;gap:5px;padding:4px;
  border:1px solid var(--line);background:var(--surface);border-radius:10px;
}
.week-switcher__label{min-width:176px;text-align:center;padding:2px 10px}
.week-switcher__label span,.week-switcher__label strong{display:block}
.week-switcher__label span{font-size:.61rem;text-transform:uppercase;letter-spacing:.09em;color:var(--muted-2);font-weight:700}
.week-switcher__label strong{font-size:.82rem;margin-top:2px}
.icon-btn{
  border:0;background:transparent;width:34px;height:34px;border-radius:7px;
  display:grid;place-items:center;cursor:pointer;color:var(--muted);transition:.16s ease;
}
.icon-btn:hover{background:var(--surface-3);color:var(--text)}
.icon-btn--menu{font-size:1rem;letter-spacing:2px}
.top-actions{display:flex;justify-content:flex-end;align-items:center;gap:7px;min-width:0}
.action{
  height:39px;padding:0 13px;border:1px solid var(--line);border-radius:8px;
  background:var(--surface);display:inline-flex;align-items:center;gap:8px;
  text-decoration:none;cursor:pointer;font-size:.77rem;font-weight:650;white-space:nowrap;
  transition:.16s ease;
}
.action:hover{background:var(--surface-3);border-color:var(--line-strong)}
.action--primary{background:var(--accent);border-color:var(--accent);color:#0d0d0c}
.action--primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
.action--ghost{background:var(--surface)}
.more-wrap{position:relative}
.more-menu{
  position:absolute;right:0;top:46px;width:205px;padding:7px;
  border:1px solid var(--line);background:var(--surface-2);border-radius:10px;box-shadow:var(--shadow);
}
.more-menu button,.more-menu a{
  display:block;width:100%;border:0;background:transparent;text-align:left;
  padding:9px 10px;border-radius:7px;text-decoration:none;color:var(--muted);font-size:.78rem;cursor:pointer;
}
.more-menu button:hover,.more-menu a:hover{background:var(--surface-3);color:var(--text)}

.page-shell{max-width:1480px;margin:0 auto;padding:34px 24px 78px}
.eyebrow{
  font-size:.67rem;line-height:1;font-weight:750;text-transform:uppercase;letter-spacing:.1em;color:var(--accent);
}
.intro-card{
  position:relative;
  display:grid;grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr);gap:42px;
  padding:36px;border:1px solid var(--line);border-radius:var(--radius-lg);
  background:var(--surface);box-shadow:var(--shadow-soft);
}
.intro-card__copy{align-self:center;max-width:690px}
.intro-card__copy h1{
  font-size:clamp(2rem,4vw,3.45rem);line-height:1.04;letter-spacing:-.04em;
  max-width:690px;margin:14px 0 16px;font-weight:750;
}
.intro-card__copy p{max-width:610px;color:var(--muted);font-size:.98rem}
.intro-card__actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:24px}
.intro-collapse{
  position:absolute;top:18px;right:18px;width:40px;height:40px;
  border:1px solid var(--line);border-radius:9px;background:var(--surface-2);
  color:var(--muted);display:grid;place-items:center;cursor:pointer;z-index:4;transition:.16s ease;
}
.intro-collapse:hover{background:var(--surface-3);border-color:var(--line-strong);color:var(--text)}
.intro-collapse svg{width:18px;height:18px}
.intro-restore{
  margin:0 0 14px auto;min-height:38px;padding:0 12px;border:1px solid var(--line);
  border-radius:8px;background:var(--surface);color:var(--muted);display:inline-flex;align-items:center;gap:7px;
  cursor:pointer;font-size:.72rem;font-weight:650;transition:.16s ease;
}
.intro-restore:hover{color:var(--text);border-color:var(--line-strong);background:var(--surface-2)}
.intro-restore svg{width:16px;height:16px}

.button{
  min-height:41px;padding:0 14px;border-radius:8px;border:1px solid var(--line);
  background:var(--surface-2);color:var(--text);display:inline-flex;align-items:center;justify-content:center;gap:8px;
  text-decoration:none;font-size:.78rem;font-weight:650;cursor:pointer;transition:.16s ease;
}
.button:hover{border-color:var(--line-strong);background:var(--surface-3)}
.button--primary{background:var(--accent);border-color:var(--accent);color:#0d0d0c}
.button--primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
.button--secondary{background:var(--surface-2)}
.button--small{min-height:35px;padding:0 11px;font-size:.72rem}
.button--danger-ghost{color:#d18a83;background:transparent;border-color:#684845}

.flow{display:flex;flex-direction:column;justify-content:center;padding-top:28px}
.flow-step{
  display:grid;grid-template-columns:42px 1fr;gap:14px;padding:16px 0;position:relative;
  border-top:1px solid var(--line);
}
.flow-step__number{
  width:34px;height:34px;border-radius:8px;background:var(--surface-3);border:1px solid var(--line);
  display:grid;place-items:center;color:var(--accent);font-weight:750;font-size:.72rem;
}
.flow-step strong{display:block;font-size:.88rem;margin-bottom:3px}
.flow-step p{font-size:.77rem;color:var(--muted);max-width:430px}

.import-hint{
  margin-top:18px;border:1px solid #4b5671;background:#171b23;border-radius:12px;
  padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:18px;
  box-shadow:var(--shadow-soft);
}
.import-hint>div{display:flex;align-items:center;gap:12px}
.import-hint__icon{
  width:34px;height:34px;border-radius:8px;background:#273148;color:#c3cce0;
  display:grid;place-items:center;font-weight:800;
}
.import-hint strong{font-size:.83rem}
.import-hint p{font-size:.75rem;color:var(--muted);margin-top:2px}

.enem-countdown{
  margin-top:18px;min-height:102px;padding:17px 19px;
  border:1px solid var(--line);border-radius:12px;background:var(--surface);
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:15px;
}
.enem-countdown__icon{
  width:44px;height:44px;border-radius:10px;display:grid;place-items:center;color:#d1c29f;
  background:#2a251b;border:1px solid #50462f;
}
.enem-countdown__icon svg{width:20px;height:20px}
.enem-countdown__copy strong{display:block;font-size:.96rem;letter-spacing:-.015em;margin:6px 0 2px}
.enem-countdown__copy p{font-size:.71rem;color:var(--muted)}
.enem-countdown__time{display:flex;align-items:center;gap:14px}
.count-unit{min-width:72px;text-align:center}
.count-unit strong{display:block;font-size:1.72rem;line-height:1;letter-spacing:-.045em}
.count-unit span{display:block;margin-top:5px;font-size:.6rem;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.count-separator{color:var(--muted-2);font-weight:700}
.enem-countdown__waiting{font-size:.9rem;font-weight:650;color:var(--text);text-align:right}

.overview{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin-top:22px;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
.metric{
  min-height:122px;padding:18px 19px;background:var(--surface);
  display:flex;flex-direction:column;justify-content:space-between;border-right:1px solid var(--line);
}
.metric:last-child{border-right:0}
.metric--success{background:#171a16}
.metric__label{font-size:.65rem;text-transform:uppercase;letter-spacing:.08em;font-weight:750;color:var(--muted-2)}
.metric>strong{font-size:1.55rem;letter-spacing:-.035em}
.metric__compact{font-size:1rem!important;line-height:1.3;max-width:220px}
.metric small{color:var(--muted);font-size:.69rem}
.metric__progress-head{display:flex;justify-content:space-between;align-items:center}
.metric__progress-head strong{font-size:.98rem}
.progress-track{height:6px;border-radius:999px;background:#292825;overflow:hidden;margin:12px 0 7px}
.progress-track span{display:block;width:0;height:100%;background:var(--success);border-radius:inherit;transition:width .35s ease}

.planner-section{margin-top:50px}
.section-heading{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin-bottom:16px}
.section-heading h2{font-size:1.45rem;letter-spacing:-.025em;margin:7px 0 5px;font-weight:700}
.section-heading p{color:var(--muted);font-size:.81rem;max-width:690px}
.section-heading__tools{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.subject-legend{display:flex;gap:6px;flex-wrap:wrap;margin:16px 0}
.legend-item{
  display:inline-flex;align-items:center;gap:7px;padding:5px 8px;
  border:1px solid var(--line);background:var(--surface);border-radius:7px;font-size:.65rem;color:var(--muted);
}
.legend-dot,.subject-dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:0 0 auto}

.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(180px,1fr));gap:8px;overflow-x:auto;padding-bottom:8px}
.day-card{
  min-width:180px;border:1px solid var(--line);border-radius:10px;background:#131312;overflow:hidden;
  transition:border-color .16s ease;
}
.day-card:hover{border-color:var(--line-strong)}
.day-card.today{border-color:#66759a;box-shadow:inset 0 0 0 1px #66759a}
.day-header{
  height:61px;padding:11px 12px;border-bottom:1px solid var(--line);
  display:flex;align-items:center;justify-content:space-between;background:#171716;
}
.day-header-left{display:flex;align-items:baseline;gap:7px}
.day-name{font-size:.7rem;color:var(--muted);font-weight:650}
.day-date{font-size:1.18rem;font-weight:750;letter-spacing:-.035em}
.day-progress{font-size:.61rem;font-weight:750;color:#bfd0be;background:#263126;padding:3px 6px;border-radius:6px}
.day-blocks{padding:7px;display:flex;flex-direction:column;gap:6px}
.study-block{
  min-height:112px;padding:10px;border:1px solid var(--line);border-radius:8px;cursor:pointer;
  position:relative;overflow:hidden;transition:.16s ease;background:#181716;
}
.study-block::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--block-color,var(--line));
}
.study-block:hover{background:#1e1d1b;border-color:var(--line-strong)}
.study-block.block-empty{
  display:flex;align-items:center;justify-content:center;min-height:90px;background:#141413;
  border-style:dashed;color:var(--muted-2);
}
.study-block.block-empty::before{display:none}
.study-block.is-studied{background:#151714}
.study-block.is-studied .block-subject,.study-block.is-studied .block-note-preview{text-decoration:line-through;text-decoration-thickness:1px;color:var(--muted-2)}
.block-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.block-time{font-size:.6rem;color:var(--muted-2);font-weight:650;letter-spacing:.015em}
.study-checkbox{width:15px;height:15px;accent-color:var(--success);cursor:pointer}
.block-subject{font-size:.7rem;color:var(--block-color);font-weight:750;margin-bottom:5px}
.block-note-preview{font-size:.72rem;line-height:1.38;color:#d6d2ca;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.empty-copy{text-align:center;font-size:.68rem;color:var(--muted-2)}
.empty-copy strong{display:block;color:var(--muted);font-size:.71rem;margin-bottom:3px}

.creator-section{margin-top:58px;padding-top:24px;border-top:1px solid var(--line)}
.creator-card{
  display:flex;align-items:center;gap:18px;max-width:660px;padding:16px;
  border:1px solid var(--line);border-radius:12px;background:var(--surface);
}
.creator-photo{
  width:88px;height:108px;flex:0 0 auto;object-fit:cover;object-position:center 28%;
  border-radius:9px;border:1px solid var(--line);
}
.creator-copy h2{font-size:1.08rem;letter-spacing:-.02em;margin:7px 0 4px}
.creator-copy p{color:var(--muted);font-size:.75rem;max-width:470px}
.creator-link{display:inline-flex;align-items:center;gap:6px;margin-top:9px;color:#c3cce0;text-decoration:none;font-size:.74rem;font-weight:650}
.creator-link:hover{color:var(--text)}

.site-footer{
  max-width:1480px;margin:0 auto;padding:21px 24px 38px;border-top:1px solid var(--line);
  display:flex;justify-content:space-between;gap:15px;color:var(--muted-2);font-size:.69rem;
}
.site-footer span:first-child{color:var(--muted);font-weight:700}

.toast{
  position:fixed;right:20px;bottom:20px;z-index:120;max-width:min(420px,calc(100vw - 40px));
  padding:11px 14px;border:1px solid var(--line);border-radius:9px;background:var(--surface-raised);
  box-shadow:var(--shadow);font-size:.77rem;font-weight:650;opacity:0;transform:translateY(12px);
  pointer-events:none;transition:.2s ease;
}
.toast.show{opacity:1;transform:none}
.toast--success{border-color:#526953}
.toast--error{border-color:#754b47}

.overlay{
  position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.68);
  display:none;align-items:center;justify-content:center;padding:20px;
}
.overlay.open{display:flex}
.modal{
  width:min(660px,100%);max-height:min(88vh,860px);overflow:hidden;border:1px solid var(--line-strong);
  border-radius:14px;background:var(--surface);box-shadow:var(--shadow);display:flex;flex-direction:column;
}
.modal--compact{width:min(560px,100%)}
.modal--wide{width:min(900px,100%)}
.modal--guide{width:min(720px,100%)}
.modal__head,.modal__foot{padding:17px 19px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.modal__head{border-bottom:1px solid var(--line)}
.modal__head h2{font-size:1.06rem;margin-top:5px;letter-spacing:-.02em}
.modal__body{padding:19px;overflow:auto}
.modal__foot{border-top:1px solid var(--line);justify-content:flex-end}
.modal-close{
  width:34px;height:34px;border:0;border-radius:7px;background:transparent;color:var(--muted);
  font-size:1.3rem;cursor:pointer;
}
.modal-close:hover{background:var(--surface-3);color:var(--text)}
.field-label{display:block;font-size:.64rem;text-transform:uppercase;letter-spacing:.08em;font-weight:750;color:var(--muted-2);margin-bottom:8px}
.subject-picker{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin-bottom:20px}
.subject-btn{
  min-height:41px;padding:0 11px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);
  color:var(--muted);display:flex;align-items:center;gap:9px;cursor:pointer;font-size:.74rem;font-weight:650;text-align:left;
}
.subject-btn:hover,.subject-btn.selected{border-color:var(--subject-color);color:var(--text);background:var(--surface-3)}
.textarea,.dist-item input,.dist-item textarea,.dist-item select{
  width:100%;border:1px solid var(--line);border-radius:8px;background:#111110;color:var(--text);
  outline:none;padding:10px 11px;font-size:.77rem;resize:vertical;
}
.textarea:focus,.dist-item input:focus,.dist-item textarea:focus,.dist-item select:focus{border-color:var(--accent)}
.details-head__subject{display:flex;align-items:center;gap:8px;font-size:.71rem;font-weight:700;color:var(--muted)}
.details-title{font-size:1.38rem;line-height:1.2;letter-spacing:-.025em;margin-bottom:12px}
.details-meta{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:18px}
.details-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border:1px solid var(--line);border-radius:7px;color:var(--muted);font-size:.66rem}
.details-section{padding:14px 0;border-top:1px solid var(--line)}
.details-section p,.details-section pre{color:#d1cec7;font-size:.8rem;white-space:pre-wrap;font-family:inherit;line-height:1.6}
.guide-body{display:flex;flex-direction:column;gap:4px}
.guide-row{display:grid;grid-template-columns:38px 1fr;gap:13px;padding:12px 0}
.guide-row>span{
  width:32px;height:32px;border-radius:8px;background:#262b36;color:#c3cce0;
  display:grid;place-items:center;font-size:.73rem;font-weight:750;
}
.guide-row strong{font-size:.82rem}
.guide-row p{font-size:.75rem;color:var(--muted);margin-top:3px}
.guide-note{margin-top:8px;padding:10px 11px;border:1px solid #5a5039;border-radius:8px;background:#242016;color:#d2c29d;font-size:.71rem}
.modal-lead{color:var(--muted);font-size:.79rem;margin-bottom:14px}
.dist-toolbar{display:flex;gap:8px;margin-bottom:14px}
.dist-list{display:flex;flex-direction:column;gap:9px}
.dist-item{
  position:relative;display:grid;grid-template-columns:1fr 140px;gap:10px;padding:13px;
  border:1px solid var(--line);border-radius:9px;background:#121211;
}
.dist-item-row.full{grid-column:1/-1}
.dist-item label{display:block;font-size:.61rem;color:var(--muted-2);font-weight:750;text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px}
.dist-item-remove{
  position:absolute;right:8px;top:8px;width:25px;height:25px;border:0;border-radius:6px;
  background:var(--surface-3);color:var(--muted);cursor:pointer;z-index:2;
}
.dist-subject-indicator{display:flex;align-items:center;gap:8px}
.dist-dot-preview{width:8px;height:8px;border-radius:50%;flex:0 0 auto}
.dist-result{margin-top:12px;padding:11px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);color:var(--muted);font-size:.74rem;white-space:pre-wrap}
.dist-result.success{border-color:#526953;color:#bdd1bd;background:#171a16}
.pulse-import{animation:pulseImport 1.2s ease 2}
@keyframes pulseImport{0%,100%{outline:0 solid var(--accent)}50%{outline:4px solid #3f485d}}

@media(max-width:1180px){
  .topbar__inner{grid-template-columns:1fr auto}
  .week-switcher{order:3;grid-column:1/-1;justify-self:center}
  .top-actions{justify-self:end}
  .intro-card{grid-template-columns:1fr}
  .flow{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding-top:0}
  .flow-step{display:block;padding:13px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2)}
  .flow-step__number{margin-bottom:10px}
  .overview{grid-template-columns:repeat(2,1fr)}
  .metric:nth-child(2){border-right:0}
  .metric:nth-child(-n+2){border-bottom:1px solid var(--line)}
}
@media(max-width:760px){
  .topbar__inner{padding:10px 14px;display:flex;flex-wrap:wrap}
  .brand{flex:1}
  .brand span{display:none}
  .top-actions{order:2;gap:6px}
  .week-switcher{order:3;width:100%;justify-content:space-between}
  .week-switcher__label{min-width:0}
  .action{padding:0 10px}
  .action span{display:none}
  .action--primary span,.action:nth-child(2) span{display:inline}
  .page-shell{padding:20px 14px 58px}
  .intro-card{padding:23px;gap:24px}
  .intro-card__copy{padding-top:20px}
  .intro-card__copy h1{font-size:2.15rem}
  .intro-collapse{top:13px;right:13px;width:37px;height:37px}
  .flow{grid-template-columns:1fr}
  .overview{grid-template-columns:1fr 1fr}
  .section-heading{align-items:flex-start;flex-direction:column}
  .section-heading__tools{justify-content:flex-start}
  .calendar-grid{grid-template-columns:repeat(7,82vw);scroll-snap-type:x proximity}
  .day-card{scroll-snap-align:start}
  .site-footer{padding:20px 14px 30px;flex-direction:column}
  .subject-picker{grid-template-columns:1fr}
  .dist-item{grid-template-columns:1fr}
  .import-hint{align-items:flex-start;flex-direction:column}
  .modal__foot{flex-wrap:wrap}
  .modal__foot .button{flex:1}
  .enem-countdown{grid-template-columns:auto 1fr;gap:12px}
  .enem-countdown__time{grid-column:1/-1;justify-content:flex-start;padding-left:57px}
  .enem-countdown__waiting{grid-column:1/-1;text-align:left;padding-left:57px}
}
@media(max-width:480px){
  .action--primary span,.action:nth-child(2) span{display:none}
  .overview{grid-template-columns:1fr;border-radius:10px}
  .metric{border-right:0;border-bottom:1px solid var(--line)}
  .metric:last-child{border-bottom:0}
  .intro-card__copy h1{font-size:1.9rem}
  .intro-card__actions{flex-direction:column}
  .intro-card__actions .button{width:100%}
  .metric__compact{max-width:none}
  .section-heading__tools{width:100%}
  .section-heading__tools .button{flex:1}
  .dist-toolbar{flex-direction:column}
  .enem-countdown{padding:15px}
  .enem-countdown__icon{width:40px;height:40px}
  .enem-countdown__time{padding-left:0;justify-content:space-between}
  .enem-countdown__waiting{padding-left:0}
  .count-unit{text-align:left;min-width:auto}
  .creator-card{align-items:flex-start;gap:13px;padding:13px}
  .creator-photo{width:72px;height:88px}
}
