:root {
  --app-primary: #184b3e;
  --app-primary-dark: #10382e;
  --app-green: #4f9d69;
  --app-green-soft: #eaf3ed;
  --app-white: #fff;
  --app-bg: #f6f8f7;
  --app-line: #dce5df;
  --app-ink: #17231f;
  --app-muted: #5e6d67;
  --app-gold: #d2a72c;
  --app-gold-soft: #fbf4dd;
  --app-red: #b3402e;
  --app-radius-sm: 13px;
  --app-radius: 20px;
  --app-radius-lg: 28px;
  --app-shadow-sm: 0 7px 22px rgba(24, 75, 62, .07);
  --app-shadow: 0 18px 50px rgba(24, 75, 62, .11);
  --app-shadow-lg: 0 32px 80px rgba(24, 75, 62, .16);
}

html {
  background: var(--app-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--app-ink);
  background: var(--app-bg);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.higio-page {
  min-height: 100vh !important;
  min-height: 100dvh !important;
  padding: 0 !important;
  overflow: visible !important;
  background:
    radial-gradient(circle at 8% 5%, rgba(79, 157, 105, .13), transparent 31%),
    linear-gradient(180deg, #fff 0, var(--app-bg) 42%, #eef4f1 100%) !important;
}

.higio-shell {
  width: 100% !important;
  margin: 0 auto !important;
}

.higio-card-wrap {
  width: 100% !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
  background: transparent !important;
}

.higio-app {
  width: 100%;
  max-width: none !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  display: flex;
  flex-direction: column;
  overflow: clip;
  color: var(--app-ink) !important;
  background:
    radial-gradient(circle at 96% 2%, rgba(79, 157, 105, .08), transparent 25%),
    var(--app-bg) !important;
}

.higio-screen {
  flex: 1 0 auto;
  animation: app-enter .38s cubic-bezier(.2, .75, .25, 1) both !important;
}

.higio-content {
  width: min(100%, 780px);
  margin-inline: auto;
  padding: 34px !important;
}

.higio-app h1,
.higio-app h2,
.higio-app h3 {
  color: var(--app-primary) !important;
  letter-spacing: -.035em !important;
  text-wrap: balance;
}

.higio-app p {
  text-wrap: pretty;
}

.higio-card {
  border: 1px solid var(--app-line) !important;
  border-radius: var(--app-radius) !important;
  background: rgba(255, 255, 255, .97) !important;
  box-shadow: var(--app-shadow-sm) !important;
}

.higio-btn {
  min-height: 54px !important;
  border-radius: var(--app-radius-sm) !important;
  font-family: inherit !important;
  font-size: 15px !important;
  letter-spacing: -.01em;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease !important;
}

.higio-btn-primary:not(:disabled) {
  color: #fff !important;
  background: var(--app-primary) !important;
  box-shadow: 0 11px 26px rgba(24, 75, 62, .23) !important;
}

.higio-btn-primary:not(:disabled):hover {
  transform: translateY(-2px);
  background: var(--app-primary-dark) !important;
  box-shadow: 0 16px 34px rgba(24, 75, 62, .28) !important;
}

.higio-btn-ghost:not(:disabled) {
  color: var(--app-primary) !important;
  border: 1px solid var(--app-line) !important;
  background: #fff !important;
}

.higio-btn-ghost:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: #a8c8b4 !important;
  background: #fbfdfc !important;
  box-shadow: var(--app-shadow-sm) !important;
}

.higio-btn:not(:disabled):active {
  transform: translateY(0) scale(.985);
}

.higio-app input:not([type="checkbox"]) {
  min-width: 0;
  min-height: 52px !important;
  border: 1px solid var(--app-line) !important;
  border-radius: var(--app-radius-sm) !important;
  color: var(--app-ink) !important;
  background: #fff !important;
  box-shadow: 0 5px 16px rgba(24, 75, 62, .035) !important;
  transition: border-color .18s ease, box-shadow .18s ease !important;
}

.higio-app input:not([type="checkbox"]):focus {
  border-color: var(--app-green) !important;
  box-shadow: 0 0 0 4px rgba(79, 157, 105, .13) !important;
  outline: none;
}

.higio-topbar {
  min-height: 72px !important;
  padding: 12px clamp(18px, 3vw, 34px) !important;
  border-bottom: 1px solid rgba(220, 229, 223, .9) !important;
  background: rgba(255, 255, 255, .93) !important;
  box-shadow: 0 7px 22px rgba(24, 75, 62, .055) !important;
  backdrop-filter: blur(16px) !important;
}

.higio-topbar > button {
  width: 46px !important;
  height: 46px !important;
  border: 1px solid var(--app-line) !important;
  border-radius: 13px !important;
  color: var(--app-primary) !important;
  background: var(--app-green-soft) !important;
  transition: transform .18s ease, background-color .18s ease;
}

.higio-topbar > button:hover {
  transform: translateX(-2px);
  background: #dcece2 !important;
}

.higio-topbar-brand {
  color: var(--app-green) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.higio-footer {
  margin-top: auto !important;
  padding: 28px 28px 14px !important;
  gap: 10px 22px !important;
  border-top: 0 !important;
  color: rgba(255, 255, 255, .76) !important;
  background: var(--app-primary-dark) !important;
}

.higio-footer button {
  min-height: 32px;
  color: rgba(255, 255, 255, .78) !important;
  text-underline-offset: 3px;
}

.higio-footer button:hover {
  color: #fff !important;
}

.higio-copyright {
  padding: 6px 20px 25px !important;
  color: rgba(255, 255, 255, .52) !important;
  background: var(--app-primary-dark) !important;
}

/* Sprachwahl */
.higio-screen-language .higio-mobile-hero {
  background: linear-gradient(145deg, var(--app-primary), #246653) !important;
}

.higio-screen-language .higio-content > div:first-of-type {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: none !important;
  grid-auto-flow: row !important;
  gap: 12px !important;
}

.higio-language-card {
  min-height: 70px !important;
  padding: 14px 16px !important;
  border: 1px solid var(--app-line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 5px 16px rgba(24, 75, 62, .035) !important;
}

.higio-language-card:hover {
  transform: translateY(-3px) !important;
  border-color: #a8c8b4 !important;
  background: #fbfdfc !important;
  box-shadow: 0 14px 30px rgba(24, 75, 62, .11) !important;
}

.higio-language-arrow {
  color: var(--app-green) !important;
  font-size: 23px !important;
}

/* Einstieg */
.higio-screen-start > .higio-screen.higio-content {
  width: min(100%, 640px);
  padding-block: 46px !important;
}

.higio-screen-start > .higio-screen.higio-content::before {
  content: "";
  display: block;
  width: 86px;
  height: 5px;
  margin: -14px auto 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--app-green), var(--app-gold));
}

.higio-screen-start label {
  color: var(--app-primary) !important;
}

/* Shop */
.higio-screen-shop .higio-content {
  width: min(100%, 860px);
}

.higio-screen-shop .higio-content > .higio-card {
  overflow: hidden !important;
  border-radius: 24px !important;
  box-shadow: var(--app-shadow) !important;
}

.higio-screen-shop .higio-content > .higio-card > div:first-child {
  padding: 24px 28px !important;
  background:
    radial-gradient(circle at 92% 20%, rgba(255,255,255,.13), transparent 28%),
    linear-gradient(135deg, var(--app-primary), #246653) !important;
}

.higio-screen-shop .higio-content > .higio-card > div:nth-child(2) {
  padding: 28px !important;
}

.higio-screen-shop label {
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.higio-screen-shop label:hover {
  transform: translateY(-1px);
  box-shadow: var(--app-shadow-sm);
}

/* Zahlung, Einlösen und Erfolg */
.higio-screen-pay .higio-content,
.higio-screen-redeem .higio-content,
.higio-screen-cert .higio-content {
  width: min(100%, 650px);
}

.higio-screen-pay .higio-content {
  min-height: 360px;
  display: grid;
  align-content: center;
}

.higio-screen-redeem .higio-content {
  padding-top: 42px !important;
}

.higio-screen-redeem .higio-content > div {
  border-radius: 16px !important;
  background: var(--app-green-soft) !important;
}

.higio-screen-paid > .higio-screen.higio-content,
.higio-screen-result > .higio-screen.higio-content {
  width: min(100%, 680px);
  padding-block: 64px !important;
}

.higio-screen-paid .higio-card,
.higio-screen-result .higio-card {
  padding: 20px !important;
  border-radius: 18px !important;
}

/* Module */
.higio-screen-modules .higio-content {
  width: min(100%, 860px);
}

.higio-screen-modules .higio-content > .higio-card:first-child {
  padding: 17px 20px !important;
  border-left: 4px solid var(--app-green) !important;
}

.higio-module-card,
.higio-option-card {
  min-height: 72px !important;
  border-radius: 17px !important;
  box-shadow: 0 5px 16px rgba(24, 75, 62, .035);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}

.higio-module-card:hover,
.higio-option-card:hover {
  transform: translateY(-2px);
  border-color: #a8c8b4 !important;
  box-shadow: 0 13px 28px rgba(24, 75, 62, .1);
}

/* Lektionen */
.higio-screen-lesson .higio-content {
  width: min(100%, 900px);
}

.higio-screen-lesson .higio-card {
  min-height: 340px !important;
  padding: 28px !important;
  border-radius: 24px !important;
  box-shadow: var(--app-shadow) !important;
}

.higio-screen-lesson .higio-card > svg {
  height: auto !important;
  min-height: 180px;
  border-radius: 18px !important;
}

.higio-screen-lesson .higio-content > div:first-child > div {
  height: 7px !important;
  border-radius: 999px !important;
}

/* Quiz, Ergebnis und Zertifikat */
.higio-screen-quiz .higio-content {
  width: min(100%, 760px);
  padding-top: 42px !important;
}

.higio-screen-quiz h2 {
  font-size: clamp(22px, 2.5vw, 30px) !important;
  margin-bottom: 26px !important;
}

.higio-option-card {
  padding: 18px 20px !important;
  margin-bottom: 12px !important;
  font-size: 15.5px !important;
  background: #fff !important;
}

.higio-screen-cert .higio-card {
  padding: 32px 26px !important;
  border-top: 5px solid var(--app-green) !important;
  box-shadow: var(--app-shadow) !important;
}

.higio-screen-cert .higio-content > div:not(.higio-card) {
  overflow-wrap: anywhere;
}

/* Rechtstexte, FAQ und Ablauf */
.higio-screen-impressum .higio-content,
.higio-screen-kontakt .higio-content,
.higio-screen-agb .higio-content,
.higio-screen-widerruf .higio-content,
.higio-screen-datenschutz .higio-content,
.higio-screen-faq .higio-content,
.higio-screen-howto .higio-content {
  width: min(100%, 780px);
  padding: 42px !important;
  font-size: 15px !important;
  line-height: 1.75 !important;
}

.higio-screen-agb .higio-content > p,
.higio-screen-widerruf .higio-content > p,
.higio-screen-datenschutz .higio-content > p,
.higio-screen-faq .higio-content > div,
.higio-screen-howto .higio-content > div {
  padding: 18px 20px;
  border: 1px solid var(--app-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 16px rgba(24, 75, 62, .035);
}

.higio-screen-howto .higio-content > div {
  margin-bottom: 13px !important;
}

/* RTL */
[dir="rtl"] .higio-topbar > button {
  transform: rotate(180deg);
}

[dir="rtl"] .higio-topbar > button:hover {
  transform: rotate(180deg) translateX(-2px);
}

[dir="rtl"] .higio-language-card {
  text-align: right !important;
}

[dir="rtl"] .higio-language-arrow {
  transform: rotate(180deg);
}

@keyframes app-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Laptop und Desktop */
@media (min-width: 1021px) {
  .higio-page {
    padding: 28px !important;
  }

  .higio-shell {
    width: min(1180px, 100%) !important;
    max-width: 1180px !important;
    display: grid !important;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    align-items: start !important;
    overflow: visible !important;
    border: 1px solid rgba(24, 75, 62, .1);
    border-radius: var(--app-radius-lg) !important;
    background: var(--app-bg);
    box-shadow: var(--app-shadow-lg) !important;
  }

  .higio-brand-panel {
    position: sticky;
    top: 28px;
    width: auto !important;
    min-width: 0;
    height: calc(100vh - 56px) !important;
    height: calc(100dvh - 56px) !important;
    min-height: 0 !important;
    max-height: calc(100vh - 56px) !important;
    max-height: calc(100dvh - 56px) !important;
    align-self: start !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: clamp(20px, 3.2vh, 38px) !important;
    border-radius: 27px 0 0 27px;
    background:
      radial-gradient(circle at 85% 8%, rgba(255,255,255,.1), transparent 28%),
      linear-gradient(145deg, var(--app-primary), #246653) !important;
  }

  .higio-brand-photo {
    width: 100% !important;
    height: clamp(96px, 32dvh, 320px) !important;
    flex: 0 1 clamp(96px, 32dvh, 320px) !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-bottom: clamp(12px, 2vh, 24px) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
  }

  .higio-brand-photo img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  @media (max-height: 820px) {
    .higio-brand-photo {
      height: clamp(80px, 26dvh, 220px) !important;
      flex-basis: clamp(80px, 26dvh, 220px) !important;
    }
  }

  @media (max-height: 700px) {
    .higio-brand-photo {
      height: clamp(64px, 20dvh, 160px) !important;
      flex-basis: clamp(64px, 20dvh, 160px) !important;
    }
  }

  .higio-card-wrap {
    min-width: 0;
    border-radius: 0 27px 27px 0;
  }

  .higio-app {
    min-height: calc(100vh - 56px) !important;
    min-height: calc(100dvh - 56px) !important;
    border-radius: 0 27px 27px 0;
  }

  .higio-screen-language .higio-content > div:first-of-type {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .higio-screen-lesson .higio-card:has(> svg) {
    display: grid;
    grid-template-columns: minmax(250px, .9fr) minmax(0, 1.1fr);
    column-gap: 30px;
    align-items: center;
  }

  .higio-screen-lesson .higio-card:has(> svg) > svg {
    grid-row: 1 / 4;
    margin-bottom: 0 !important;
  }
}

/* Tablet und kleiner Laptop */
@media (max-width: 1020px) {
  .higio-page {
    padding: 24px !important;
  }

  .higio-shell {
    width: min(100%, 860px) !important;
    overflow: hidden;
    border: 1px solid rgba(24, 75, 62, .1);
    border-radius: 26px;
    background: var(--app-bg);
    box-shadow: var(--app-shadow);
  }

  .higio-brand-panel {
    display: none !important;
  }

  .higio-card-wrap,
  .higio-app {
    border-radius: 26px;
  }

  .higio-mobile-hero {
    display: block !important;
  }

  .higio-desktop-seal {
    display: none !important;
  }

  .higio-mobile-usps {
    display: block !important;
  }
}

/* Tablet Hochformat */
@media (max-width: 820px) {
  .higio-page {
    padding: 0 !important;
  }

  .higio-shell,
  .higio-card-wrap,
  .higio-app {
    width: 100% !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .higio-content {
    width: min(100%, 720px);
    padding: 28px 24px !important;
  }

  .higio-screen-shop .higio-content,
  .higio-screen-modules .higio-content,
  .higio-screen-lesson .higio-content {
    width: min(100%, 760px);
  }
}

/* Handy */
@media (max-width: 600px) {
  .higio-content,
  .higio-screen-agb .higio-content,
  .higio-screen-widerruf .higio-content,
  .higio-screen-datenschutz .higio-content,
  .higio-screen-impressum .higio-content,
  .higio-screen-kontakt .higio-content,
  .higio-screen-faq .higio-content,
  .higio-screen-howto .higio-content {
    padding: 24px 16px !important;
  }

  .higio-topbar {
    min-height: 66px !important;
    padding: 10px 14px !important;
  }

  .higio-screen-language .higio-content > div:first-of-type {
    grid-template-columns: 1fr !important;
  }

  .higio-language-card {
    min-height: 62px !important;
  }

  .higio-screen-start > .higio-screen.higio-content {
    padding-block: 30px !important;
  }

  .higio-screen-shop .higio-content > .higio-card > div:first-child,
  .higio-screen-shop .higio-content > .higio-card > div:nth-child(2) {
    padding: 20px 17px !important;
  }

  .higio-screen-shop .higio-content div[style*="display: flex"][style*="gap: 8px"] {
    flex-wrap: wrap;
  }

  .higio-screen-shop .higio-content div[style*="display: flex"][style*="gap: 8px"] > input {
    flex-basis: 100% !important;
  }

  .higio-screen-lesson .higio-card {
    min-height: 0 !important;
    padding: 20px 17px !important;
    border-radius: 18px !important;
  }

  .higio-screen-lesson .higio-card > svg {
    min-height: 150px;
  }

  .higio-screen-lesson .higio-content > div:last-child {
    position: sticky;
    bottom: 10px;
    z-index: 5;
    padding: 8px;
    border: 1px solid var(--app-line);
    border-radius: 16px;
    background: rgba(246, 248, 247, .94);
    box-shadow: var(--app-shadow-sm);
    backdrop-filter: blur(12px);
  }

  .higio-screen-paid > .higio-screen.higio-content,
  .higio-screen-result > .higio-screen.higio-content {
    padding-block: 42px !important;
  }

  .higio-footer {
    padding-inline: 16px !important;
  }
}

@media (max-width: 380px) {
  .higio-content {
    padding-inline: 13px !important;
  }

  .higio-screen-shop .higio-content div[style*="display: flex"][style*="gap: 8px"] {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .higio-screen-lesson .higio-content > div:last-child {
    gap: 6px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
