.v11ExercisePage {
  --v11-surface: rgba(18, 22, 29, 0.88);
  --v11-surface-strong: #171b22;
  --v11-surface-soft: rgba(255, 255, 255, 0.035);
  --v11-line: rgba(255, 255, 255, 0.1);
  --v11-line-strong: rgba(252, 213, 53, 0.28);
  --v11-text: #f4f6f8;
  --v11-muted: #9aa4b2;
  --v11-yellow: #fcd535;
  --v11-yellow-strong: #f0b90b;
  --v11-green: #2fdb9b;
  --v11-red: #ff6b75;
  --v11-orange: #f8b84e;
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 30px clamp(18px, 3vw, 42px) 70px;
  color: var(--v11-text);
}

html[data-kg-theme="light"] .v11ExercisePage {
  --v11-surface: rgba(255, 255, 255, 0.92);
  --v11-surface-strong: #ffffff;
  --v11-surface-soft: rgba(22, 29, 37, 0.035);
  --v11-line: rgba(22, 29, 37, 0.12);
  --v11-line-strong: rgba(191, 138, 0, 0.28);
  --v11-text: #171a20;
  --v11-muted: #667080;
  --v11-yellow: #d9a500;
  --v11-yellow-strong: #b78600;
  --v11-green: #13885f;
  --v11-red: #c93e49;
  --v11-orange: #b36e00;
}

.v11ExercisePage *,
.v11ExercisePage *::before,
.v11ExercisePage *::after {
  box-sizing: border-box;
}

.v11PageHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.v11PageHeader h1 {
  margin: 7px 0 10px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.v11PageHeader p,
.v11FormIntro p,
.v11SectionTitle p,
.v11SectionHead p {
  max-width: 820px;
  margin: 0;
  color: var(--v11-muted);
  line-height: 1.6;
}

.v11Eyebrow {
  color: var(--v11-yellow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.v11HeaderDrive {
  min-width: 290px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--v11-line);
  border-radius: 14px;
  background: var(--v11-surface);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

.v11HeaderDrive > span {
  color: var(--v11-red);
}

.v11HeaderDrive.connected > span {
  color: var(--v11-green);
  filter: drop-shadow(0 0 7px currentColor);
}

.v11HeaderDrive b,
.v11HeaderDrive small {
  display: block;
}

.v11HeaderDrive small {
  margin-top: 2px;
  color: var(--v11-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.v11HeaderDrive button,
.v11GhostButton,
.v11MiniButton {
  color: var(--v11-text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--v11-line);
  border-radius: 8px;
  background: var(--v11-surface-soft);
  cursor: pointer;
}

.v11HeaderDrive button {
  padding: 8px 10px;
}

.v11Tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  padding: 5px;
  border: 1px solid var(--v11-line);
  border-radius: 14px;
  background: var(--v11-surface-soft);
  width: fit-content;
}

.v11Tabs button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  color: var(--v11-muted);
  font: inherit;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.v11Tabs button.active {
  color: #171a20;
  border-color: rgba(252, 213, 53, 0.5);
  background: linear-gradient(135deg, #fff0a1, #fcd535 55%, #f0b90b);
  box-shadow: 0 10px 25px rgba(240, 185, 11, 0.2);
}

.v11Tabs button b {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  padding: 0 5px;
  color: inherit;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 11px;
}

.v11ExerciseForm,
.v11SourcePanel,
.v11FormResult {
  border: 1px solid var(--v11-line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 0, rgba(252, 213, 53, 0.07), transparent 27rem),
    var(--v11-surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
}

.v11ExerciseForm {
  overflow: hidden;
}

.v11FormIntro {
  padding: 28px 30px;
  border-bottom: 1px solid var(--v11-line);
}

.v11FormIntro h2,
.v11SectionHead h2,
.v11FormResult > h2 {
  margin: 7px 0 8px;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.035em;
}

.v11FormSection {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 30px;
  border-bottom: 1px solid var(--v11-line);
}

.v11SectionNumber {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--v11-yellow);
  font-size: 13px;
  font-weight: 800;
  border: 1px solid var(--v11-line-strong);
  border-radius: 12px;
  background: rgba(252, 213, 53, 0.07);
}

.v11SectionBody {
  display: grid;
  gap: 19px;
}

.v11SectionTitle h3 {
  margin: 0 0 5px;
  font-size: 19px;
}

.v11Fields {
  display: grid;
  gap: 15px;
}

.v11Fields.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v11Fields.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v11ExercisePage label {
  display: grid;
  gap: 7px;
  color: var(--v11-text);
  font-size: 13px;
  font-weight: 700;
}

.v11ExercisePage input,
.v11ExercisePage textarea,
.v11ExercisePage select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--v11-text);
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--v11-line);
  border-radius: 10px;
  outline: none;
  background: var(--v11-surface-strong);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.v11ExercisePage textarea {
  line-height: 1.55;
  resize: vertical;
}

.v11ExercisePage input:focus,
.v11ExercisePage textarea:focus,
.v11ExercisePage select:focus {
  border-color: var(--v11-yellow);
  box-shadow: 0 0 0 3px rgba(252, 213, 53, 0.12);
}

.v11TagPicker {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.v11TagPicker legend {
  padding: 0;
  font-size: 13px;
  font-weight: 800;
}

.v11TagPicker > small {
  margin-top: -5px;
  color: var(--v11-muted);
}

.v11TagOptions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v11TagOptions button {
  min-height: 36px;
  padding: 7px 11px;
  color: var(--v11-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--v11-line);
  border-radius: 9px;
  background: var(--v11-surface-soft);
  cursor: pointer;
}

.v11TagOptions button:hover {
  color: var(--v11-text);
  border-color: var(--v11-line-strong);
}

.v11TagOptions button.selected {
  color: #191c21;
  border-color: var(--v11-yellow);
  background: var(--v11-yellow);
}

.v11TagOptions button.add {
  color: var(--v11-yellow);
  border-style: dashed;
}

.v11TagColumns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.v11FormFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 30px;
}

.v11FormFooter b,
.v11FormFooter small {
  display: block;
}

.v11FormFooter small {
  margin-top: 4px;
  color: var(--v11-muted);
}

.v11FormFooter button,
.v11ActionRow > button {
  min-height: 46px;
  padding: 0 22px;
  color: #171a20;
  font: inherit;
  font-weight: 800;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff0a1, #fcd535 55%, #f0b90b);
  box-shadow: 0 11px 26px rgba(240, 185, 11, 0.2);
  cursor: pointer;
}

.v11ExercisePage button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.v11Notice {
  margin: 16px 30px;
  padding: 12px 14px;
  line-height: 1.5;
  border: 1px solid var(--v11-line);
  border-radius: 10px;
}

.v11Notice.page {
  margin: 0 0 18px;
}

.v11Notice.error {
  color: var(--v11-red);
  border-color: color-mix(in srgb, var(--v11-red) 35%, transparent);
  background: color-mix(in srgb, var(--v11-red) 8%, transparent);
}

.v11Notice.success {
  color: var(--v11-green);
  border-color: color-mix(in srgb, var(--v11-green) 35%, transparent);
  background: color-mix(in srgb, var(--v11-green) 8%, transparent);
}

.v11FormResult {
  display: grid;
  justify-items: center;
  padding: 34px;
  text-align: center;
}

.v11FormResult > p {
  max-width: 720px;
  margin: 0;
  color: var(--v11-muted);
  line-height: 1.6;
}

.v11SuccessMark {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 13px;
  place-items: center;
  color: #111b17;
  font-size: 25px;
  font-weight: 900;
  border-radius: 50%;
  background: var(--v11-green);
}

.v11FormResult .v11SourcePanel {
  width: 100%;
  margin-top: 22px;
  text-align: left;
}

.v11SourcePanel {
  margin-bottom: 22px;
  padding: 24px;
}

.v11SectionHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.v11GhostButton {
  min-height: 40px;
  padding: 0 13px;
}

.v11DriveBanner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--v11-line);
  border-radius: 11px;
  background: var(--v11-surface-soft);
}

.v11DriveBanner.connected {
  border-color: color-mix(in srgb, var(--v11-green) 36%, transparent);
}

.v11DriveBanner.blocked {
  border-color: color-mix(in srgb, var(--v11-red) 32%, transparent);
}

.v11DriveBanner > span {
  color: var(--v11-red);
}

.v11DriveBanner.connected > span {
  color: var(--v11-green);
}

.v11DriveBanner b,
.v11DriveBanner small {
  display: block;
}

.v11DriveBanner small {
  margin-top: 3px;
  color: var(--v11-muted);
}

.v11SourceGrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.v11FileDrop {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px !important;
  min-height: 112px;
  margin-top: 16px;
  padding: 18px;
  border: 1px dashed var(--v11-line-strong);
  border-radius: 14px;
  background: var(--v11-surface-soft);
  cursor: pointer;
}

.v11FileDrop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.v11FileDrop > span {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: var(--v11-yellow);
  font-size: 25px;
  border: 1px solid var(--v11-line-strong);
  border-radius: 12px;
  background: rgba(252, 213, 53, 0.06);
}

.v11FileDrop b,
.v11FileDrop small {
  display: block;
}

.v11FileDrop small {
  margin-top: 5px;
  color: var(--v11-muted);
}

.v11ResumeNotice {
  margin-top: 12px;
  padding: 11px 13px;
  color: var(--v11-orange);
  border: 1px solid color-mix(in srgb, var(--v11-orange) 35%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--v11-orange) 7%, transparent);
}

.v11Progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.v11Progress > div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--v11-surface-soft);
}

.v11Progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--v11-yellow-strong), var(--v11-yellow));
}

.v11ActionRow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 17px;
}

.v11ActionRow small {
  color: var(--v11-muted);
}

.v11StatGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.v11StatGrid > div {
  min-height: 130px;
  padding: 17px;
  border: 1px solid var(--v11-line);
  border-radius: 14px;
  background: var(--v11-surface);
}

.v11StatGrid span,
.v11StatGrid small,
.v11StatGrid b {
  display: block;
}

.v11StatGrid span {
  color: var(--v11-muted);
  font-size: 12px;
  font-weight: 700;
}

.v11StatGrid b {
  margin: 8px 0 3px;
  color: var(--v11-yellow);
  font-size: 35px;
  letter-spacing: -0.04em;
}

.v11StatGrid small {
  color: var(--v11-muted);
}

.v11LibraryToolbar {
  display: grid;
  grid-template-columns: minmax(250px, 1.4fr) repeat(4, minmax(145px, 0.7fr)) auto;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--v11-line);
  border-radius: 14px;
  background: var(--v11-surface);
}

.v11LibraryToolbar select,
.v11LibraryToolbar input {
  min-height: 42px;
  font-size: 12px;
}

.v11Search {
  position: relative;
}

.v11Search > span {
  position: absolute;
  z-index: 1;
  left: 12px;
  top: 50%;
  color: var(--v11-muted);
  transform: translateY(-50%);
}

.v11Search input {
  padding-left: 34px;
}

.v11ResultsMeta {
  margin: 14px 2px;
  color: var(--v11-muted);
  font-size: 13px;
}

.v11ResultsMeta b {
  color: var(--v11-text);
}

.v11CardGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.v11ExerciseCard {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--v11-line);
  border-radius: 15px;
  background: var(--v11-surface);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.v11ExerciseCard:hover {
  border-color: var(--v11-line-strong);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.17);
  transform: translateY(-2px);
}

.v11Preview,
.v11EmptyPreview {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(252, 213, 53, 0.1), transparent 45%),
    var(--v11-surface-soft);
}

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

.v11Preview > span {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 4px 6px;
  color: #171a20;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.11em;
  border-radius: 5px;
  background: var(--v11-yellow);
}

.v11EmptyPreview {
  color: var(--v11-muted);
}

.v11EmptyPreview > span {
  font-size: 32px;
}

.v11EmptyPreview small {
  margin-top: -22px;
}

.v11CardBody {
  padding: 15px;
}

.v11CardTopline,
.v11CardFooter,
.v11SourceSummary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.v11CardTopline code {
  color: var(--v11-yellow);
  font-size: 11px;
  font-weight: 800;
}

.v11Badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  border: 1px solid var(--v11-line);
  border-radius: 7px;
  background: var(--v11-surface-soft);
}

.v11Badge-success {
  color: var(--v11-green);
  border-color: color-mix(in srgb, var(--v11-green) 32%, transparent);
}

.v11Badge-warning {
  color: var(--v11-orange);
  border-color: color-mix(in srgb, var(--v11-orange) 32%, transparent);
}

.v11Badge-danger {
  color: var(--v11-red);
  border-color: color-mix(in srgb, var(--v11-red) 32%, transparent);
}

.v11CardBody h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 12px 0 3px;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.v11EnglishName {
  display: block;
  min-height: 18px;
  overflow: hidden;
  color: var(--v11-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v11CardBody > p {
  display: -webkit-box;
  min-height: 58px;
  margin: 10px 0;
  overflow: hidden;
  color: var(--v11-muted);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.v11CardTags {
  display: flex;
  min-height: 29px;
  gap: 5px;
  overflow: hidden;
}

.v11CardTags span {
  flex: 0 0 auto;
  padding: 5px 7px;
  color: var(--v11-muted);
  font-size: 9px;
  font-weight: 700;
  border-radius: 6px;
  background: var(--v11-surface-soft);
}

.v11SourceSummary {
  margin: 12px 0;
  padding: 10px 0;
  border-top: 1px solid var(--v11-line);
  border-bottom: 1px solid var(--v11-line);
}

.v11SourceSummary span {
  color: var(--v11-muted);
  font-size: 9px;
}

.v11SourceSummary b {
  display: block;
  color: var(--v11-text);
  font-size: 12px;
}

.v11MiniButton {
  min-height: 29px;
  padding: 0 9px;
  color: var(--v11-yellow);
}

.v11Loading,
.v11EmptyState {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--v11-muted);
  text-align: center;
  border: 1px dashed var(--v11-line);
  border-radius: 15px;
}

.v11EmptyState > span {
  color: var(--v11-yellow);
  font-size: 40px;
}

.v11EmptyState h3,
.v11EmptyState p {
  margin: 0;
}

@media (max-width: 1380px) {
  .v11CardGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .v11LibraryToolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .v11Search {
    grid-column: span 2;
  }

  .v11SourceGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .v11PageHeader {
    display: grid;
  }

  .v11HeaderDrive {
    width: min(100%, 430px);
  }

  .v11StatGrid,
  .v11CardGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v11Fields.three,
  .v11TagColumns {
    grid-template-columns: 1fr;
  }

  .v11SourceGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .v11ExercisePage {
    padding: 20px 14px 50px;
  }

  .v11Tabs {
    width: 100%;
  }

  .v11Tabs button {
    flex: 1;
    justify-content: center;
    padding: 0 10px;
  }

  .v11FormSection {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .v11SectionNumber {
    width: 40px;
    height: 40px;
  }

  .v11Fields.two,
  .v11StatGrid,
  .v11CardGrid,
  .v11LibraryToolbar,
  .v11SourceGrid {
    grid-template-columns: 1fr;
  }

  .v11Search {
    grid-column: auto;
  }

  .v11FormFooter,
  .v11SectionHead,
  .v11ActionRow {
    align-items: stretch;
    flex-direction: column;
  }

  .v11FormFooter button,
  .v11ActionRow > button {
    width: 100%;
  }

  .v11SourcePanel,
  .v11FormResult {
    padding: 18px;
  }
}
