:root{
  --cat-primary:#f59e0b;
  --cat-primary-dark:#d97706;
  --cat-primary-soft:#fff7ed;
  --cat-primary-border:#fed7aa;
  --cat-text:#0f172a;
  --cat-muted:#64748b;
  --cat-border:#e2e8f0;
  --cat-white:#ffffff;
  --cat-shadow:0 18px 45px rgba(15,23,42,.08);
}

*{margin:0;padding:0;box-sizing:border-box;}

body{
  font-family:'Inter',sans-serif;
  background:
    radial-gradient(circle at top left,rgba(245,158,11,.12),transparent 30rem),
    linear-gradient(180deg,#ffffff 0%,#f8fafc 48%,#eef2f7 100%);
  color:var(--cat-text);
  line-height:1.75;
  min-height:100vh;
}

img{max-width:100%;display:block;}

a{text-decoration:none;}

.topbar{
  width:100%;
  min-height:92px;
  padding:18px clamp(18px,5vw,58px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:rgba(255,255,255,.94);
  border-bottom:1px solid var(--cat-border);
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(12px);
}

.logo{
  color:var(--cat-primary);
  font-size:clamp(1.55rem,4vw,2.25rem);
  font-weight:800;
  letter-spacing:-.04em;
}

.back-btn,
.next-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:56px;
  padding:16px 24px;
  border-radius:18px;
  font-weight:800;
  text-decoration:none !important;
  transition:transform .2s ease, box-shadow .2s ease;
}

.back-btn{
  min-width:118px;
  background:var(--cat-primary-soft);
  color:#92400e;
  border:1px solid var(--cat-primary-border);
}

.next-btn{
  min-width:min(100%,320px);
  background:linear-gradient(135deg,var(--cat-primary),#fbbf24);
  color:#ffffff;
  box-shadow:0 18px 30px rgba(245,158,11,.25);
}

.back-btn:hover,
.next-btn:hover{transform:translateY(-2px);}

.course-header{
  max-width:1180px;
  margin:0 auto;
  padding:76px clamp(22px,5vw,42px) 44px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:34px;
  align-items:end;
}

.course-info{max-width:850px;}

.course-badge,
.lesson-number,
.section-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--cat-primary-soft);
  border:1px solid var(--cat-primary-border);
  color:#b45309;
  border-radius:999px;
  padding:10px 18px;
  font-size:.82rem;
  line-height:1;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.course-info h1{
  margin-top:26px;
  font-size:clamp(2.35rem,7vw,5.05rem);
  line-height:1.04;
  letter-spacing:-.07em;
  font-weight:800;
  color:var(--cat-text);
}

.course-info p{
  margin-top:24px;
  color:var(--cat-muted);
  font-size:clamp(1.04rem,2.2vw,1.22rem);
  max-width:780px;
}

.course-progress-box,
.lesson-card,
.card,
.gallery-section,
.setup-section,
.routine-section,
.table-section,
.environment-section,
.alert-section{
  background:rgba(255,255,255,.94);
  border:1px solid var(--cat-border);
  border-radius:34px;
  box-shadow:var(--cat-shadow);
}

.course-progress-box{
  padding:28px;
}

.progress-text{
  display:block;
  font-weight:700;
  color:#334155;
  margin-bottom:14px;
}

.progress-bar{
  width:100%;
  height:12px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
}

.progress-fill{
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(135deg,var(--cat-primary),#fbbf24);
  transition:width .45s ease;
}

.progress-percent{
  display:block;
  margin-top:14px;
  color:#92400e;
  font-weight:800;
}

.container{
  max-width:1180px;
  margin:0 auto;
  padding:0 clamp(22px,5vw,42px) 82px;
}

.lesson-card,
.card,
.gallery-section,
.setup-section,
.routine-section,
.table-section,
.environment-section,
.alert-section{
  padding:clamp(28px,5vw,52px);
  margin-bottom:36px;
}

.lesson-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:30px;
  flex-wrap:wrap;
}

.lesson-duration{color:#64748b;font-weight:800;}

.lesson-card h2,
.card h2,
.gallery-section h2,
.setup-section h2,
.routine-section h2,
.table-section h2,
.environment-section h2,
.alert-section h2{
  font-size:clamp(1.8rem,4vw,2.9rem);
  line-height:1.12;
  letter-spacing:-.05em;
  color:var(--cat-text);
  margin:18px 0 22px;
}

.card p,
.gallery-section p,
.setup-section p,
.routine-section p,
.table-section p,
.environment-section p,
.alert-section p,
.lesson-card p{
  color:#475569;
  font-size:1.04rem;
  margin-top:18px;
}

.objectives{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-top:28px;
}

.objective{
  background:linear-gradient(180deg,#ffffff 0%,#fff7ed 100%);
  border:1px solid var(--cat-primary-border);
  border-radius:22px;
  padding:22px;
  color:#92400e;
  font-weight:800;
  line-height:1.45;
}

.gallery-section{
  background:linear-gradient(135deg,#fff7ed 0%,#ffffff 78%);
  border-color:var(--cat-primary-border);
}

.gallery-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
  margin-top:28px;
}

.gallery-card{
  overflow:hidden;
  border-radius:28px;
  border:1px solid var(--cat-primary-border);
  background:#ffffff;
  box-shadow:0 12px 28px rgba(15,23,42,.06);
}

.gallery-card figure{
  aspect-ratio:16/10;
  overflow:hidden;
  background:#f8fafc;
}

.gallery-card img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.gallery-body{padding:24px;}

.gallery-body h3,
.setup-item h3,
.routine-card h3,
.environment-grid h3{
  font-size:1.35rem;
  line-height:1.2;
  color:#92400e;
  margin-bottom:10px;
}

.setup-grid,
.environment-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
  margin-top:28px;
}

.setup-item,
.environment-grid article{
  background:#ffffff;
  border:1px solid var(--cat-border);
  border-radius:24px;
  padding:24px;
}

.routine-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
  margin-top:28px;
}

.routine-card{
  border-radius:26px;
  padding:24px;
  border:1px solid var(--cat-border);
  background:#ffffff;
}

.routine-card.daily{border-color:#fed7aa;background:#fff7ed;}
.routine-card.weekly{border-color:#fde68a;background:#fffdf2;}
.routine-card.periodic{border-color:#e2e8f0;background:#f8fafc;}

.routine-note{
  margin-top:22px;
  padding:18px 20px;
  border-left:4px solid var(--cat-primary);
  background:#fff7ed;
  border-radius:14px;
}

.table-wrap{
  margin-top:24px;
  overflow:auto;
  border-radius:22px;
  border:1px solid var(--cat-border);
}

.table-wrap table{
  width:100%;
  min-width:760px;
  border-collapse:collapse;
  background:#ffffff;
}

.table-wrap th,
.table-wrap td{
  padding:18px 20px;
  text-align:left;
  vertical-align:top;
  border-bottom:1px solid var(--cat-border);
  color:#475569;
}

.table-wrap th{
  background:#fff7ed;
  color:#92400e;
  font-weight:800;
}

.issues-card{
  background:linear-gradient(135deg,#fffdfb 0%,#ffffff 100%);
}

.issues-table{
  display:grid;
  grid-template-columns:minmax(220px, 0.8fr) minmax(0,1.2fr);
  margin-top:26px;
  border:1px solid var(--cat-border);
  border-radius:24px;
  overflow:hidden;
}

.issues-table > div{
  padding:18px 20px;
  border-bottom:1px solid var(--cat-border);
  border-right:1px solid var(--cat-border);
  background:#ffffff;
  color:#475569;
}

.issues-table > div:nth-child(4n+3),
.issues-table > div:nth-child(4n+4){background:#fcfcfd;}

.issues-head{
  font-weight:800 !important;
  color:#92400e !important;
  background:#fff7ed !important;
}

.alert-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:26px;
}

.alert-item{
  background:#ffffff;
  border:1px solid var(--cat-primary-border);
  border-radius:20px;
  padding:18px 20px;
  color:#475569;
  font-weight:600;
}

.lesson-navigation{
  margin-top:8px;
  display:flex;
  justify-content:center;
}

@media (max-width:960px){
  .course-header{grid-template-columns:1fr;}
  .gallery-grid,
  .setup-grid,
  .environment-grid,
  .objectives,
  .alert-list,
  .routine-grid{grid-template-columns:1fr;}
  .issues-table{grid-template-columns:1fr;}
  .issues-table > div{border-right:none;}
}

@media (max-width:640px){
  .topbar{padding:16px 18px;min-height:84px;}
  .back-btn{min-width:104px;padding:14px 18px;}
  .course-header{padding-top:52px;}
  .gallery-card figure{aspect-ratio:4/3;}
}
