body.d2c-page {
  background: #f6f7fb !important;
  overflow-x: hidden;
}

body.d2c-page .container,
body.d2c-page .main {
  background: #f6f7fb;
}

body.d2c-page .main {
  min-width: 0;
  padding: 12px;
}

body.d2c-study-active {
  overflow: hidden;
}

body.d2c-study-active #uz-support-launcher,
body.d2c-study-active #uz-support-panel,
body.d2c-study-active .uz-support-launcher,
body.d2c-study-active .uz-support-panel {
  display: none !important;
}

.d2c.content-section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 64px clamp(16px, 2.4vw, 32px) 28px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  color: #111827;
}

.d2c button,
.d2c input,
.d2c select {
  font: inherit;
}

.d2c-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: end;
  padding: 8px 0 22px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.d2c-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.d2c h1 {
  margin: 8px 0 10px;
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: 0;
}

.d2c-lead {
  max-width: 780px;
  margin: 0;
  color: #5b6475;
  font-size: 1rem;
  line-height: 1.65;
}

.d2c-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.d2c-stat {
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #f8fafc;
}

.d2c-stat strong {
  display: block;
  color: #111827;
  font-size: 1.3rem;
  line-height: 1;
}

.d2c-stat span {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
}

.d2c-shell {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.d2c-panel {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #fff;
}

.d2c-panel-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.d2c-panel-head h2,
.d2c-panel-head h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.d2c-panel-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.d2c-units {
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 96px);
  overflow: auto;
}

.d2c-unit-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.d2c-unit-btn {
  width: 100%;
  min-height: 76px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #111827;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.d2c-unit-btn:hover,
.d2c-unit-btn.is-active {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.d2c-unit-btn.is-active {
  background: #ecfdf5;
}

.d2c-unit-btn strong,
.d2c-unit-btn span {
  display: block;
}

.d2c-unit-btn strong {
  font-size: 0.92rem;
  line-height: 1.3;
}

.d2c-unit-btn span {
  margin-top: 5px;
  color: #64748b;
  font-size: 0.8rem;
}

.d2c-workspace {
  min-width: 0;
}

.d2c-player {
  overflow: hidden;
}

.d2c-stage {
  position: relative;
  min-height: 252px;
  padding: 20px;
  background: #f3f6f8;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.d2c-timer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(37, 99, 235, 0.12);
  overflow: hidden;
}

.d2c-timer-fill {
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #0f766e, #2563eb, #d97706);
}

.d2c-timer-fill.is-running {
  animation: d2cTimer var(--d2c-delay, 3000ms) linear forwards;
}

.d2c-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.d2c-counter,
.d2c-status {
  margin: 0;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.d2c-counter {
  color: #0f766e;
}

.d2c-status {
  color: #475569;
}

.d2c-status.is-playing {
  border-color: rgba(15, 118, 110, 0.35);
  background: #ecfdf5;
  color: #0f766e;
}

.d2c-status.is-paused {
  border-color: rgba(217, 119, 6, 0.35);
  background: #fffbeb;
  color: #b45309;
}

.d2c-current-group {
  margin: 18px 0 8px;
  color: #2563eb;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.d2c-current-term {
  margin: 0;
  max-width: 920px;
  font-size: 3.8rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.d2c-current-meaning {
  margin: 14px 0 0;
  max-width: 820px;
  color: #334155;
  font-size: 1.25rem;
  line-height: 1.55;
}

.d2c-unit-label {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.d2c-controls {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.d2c-main-controls,
.d2c-delay-controls,
.d2c-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.d2c-btn,
.d2c-chip,
.d2c-select {
  min-height: 42px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: #fff;
  color: #111827;
}

.d2c-btn,
.d2c-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  font-weight: 820;
  cursor: pointer;
}

.d2c-btn.is-primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.d2c-btn:hover,
.d2c-chip:hover,
.d2c-chip.is-active {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.d2c-chip.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}

.d2c-option {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 750;
}

.d2c-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.d2c-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 260px) minmax(220px, 360px);
  gap: 10px;
  padding: 14px 0;
}

.d2c-search,
.d2c-select {
  width: 100%;
  padding: 0 12px;
}

.d2c-voice-row {
  display: grid;
  gap: 6px;
}

.d2c-voice-status {
  color: #64748b;
  font-size: 0.82rem;
}

.d2c-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.d2c-card {
  min-height: 170px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.d2c-card:hover,
.d2c-card.is-current {
  border-color: rgba(15, 118, 110, 0.48);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.d2c-card.is-current {
  background: #f0fdfa;
}

.d2c-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.d2c-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.d2c-card p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.5;
}

.d2c-card-actions {
  display: flex;
  justify-content: flex-end;
}

.d2c-empty {
  display: none;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 750;
}

.d2c-empty.is-visible {
  display: block;
}

.d2c-study-overlay[hidden] {
  display: none;
}

.d2c-study-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 64px;
  background: #f8fafc;
  color: #0f172a;
}

.d2c-study-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #f8fafc;
  pointer-events: none;
}

.d2c-study-card {
  position: relative;
  width: min(1120px, 100%);
  text-align: center;
}

.d2c-study-card h2 {
  margin: 0;
  color: #0f172a;
  font-size: 5.5rem;
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.d2c-study-card p {
  max-width: 920px;
  margin: 32px auto 0;
  color: #334155;
  font-size: 2rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.d2c-study-progress,
.d2c-study-exit {
  position: fixed;
  z-index: 1;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.d2c-study-progress {
  top: 22px;
  right: 24px;
  min-width: 132px;
  padding: 10px 14px;
  text-align: right;
}

.d2c-study-progress strong,
.d2c-study-progress span {
  display: block;
}

.d2c-study-progress strong {
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
}

.d2c-study-progress span {
  margin-top: 5px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.d2c-study-exit {
  top: 22px;
  left: 24px;
  min-height: 42px;
  padding: 0 16px;
  color: #111827;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.d2c-study-exit:hover {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12), 0 12px 28px rgba(15, 23, 42, 0.08);
}

@keyframes d2cTimer {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 980px) {
  .d2c-hero,
  .d2c-shell,
  .d2c-toolbar {
    grid-template-columns: 1fr;
  }

  .d2c-units {
    position: static;
    max-height: none;
    overflow: hidden;
  }

  .d2c-unit-list {
    display: flex;
    overflow-x: auto;
    grid-template-columns: none;
    scroll-snap-type: x proximity;
  }

  .d2c-unit-btn {
    flex: 0 0 min(76vw, 270px);
    scroll-snap-align: start;
  }

  .d2c-study-overlay {
    padding: 54px 26px;
  }

  .d2c-study-card h2 {
    font-size: 4rem;
  }

  .d2c-study-card p {
    font-size: 1.55rem;
  }
}

@media (max-width: 640px) {
  body.d2c-page .main {
    padding: 8px;
  }

  .d2c.content-section {
    padding: 58px 12px 22px;
  }

  .d2c h1 {
    font-size: 2.2rem;
  }

  .d2c-hero-stats,
  .d2c-list {
    grid-template-columns: 1fr;
  }

  .d2c-stage {
    min-height: 230px;
    padding: 18px 14px;
  }

  .d2c-current-term {
    font-size: 2.3rem;
  }

  .d2c-current-meaning {
    font-size: 1rem;
  }

  .d2c-main-controls .d2c-btn,
  .d2c-delay-controls .d2c-chip {
    flex: 1 1 calc(50% - 8px);
  }

  .d2c-study-overlay {
    padding: 78px 18px 42px;
    place-items: center;
  }

  .d2c-study-card h2 {
    font-size: 3rem;
    line-height: 1.08;
  }

  .d2c-study-card p {
    margin-top: 24px;
    font-size: 1.25rem;
    line-height: 1.5;
  }

  .d2c-study-progress {
    top: 16px;
    right: 14px;
    min-width: 112px;
  }

  .d2c-study-progress strong {
    font-size: 1.05rem;
  }

  .d2c-study-exit {
    top: 16px;
    left: 14px;
    min-height: 38px;
    padding: 0 13px;
  }
}
