:root {
  --auremio-content: 1120px;
  --auremio-header-height: 88px;
  --auremio-nav-height: 76px;
  --auremio-safe-bottom: max(12px, env(safe-area-inset-bottom));
}

html {
  overflow-x: hidden;
  scroll-padding-top: calc(var(--auremio-header-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  overflow-x: clip !important;
  line-height: 1.5;
  padding-top: calc(var(--auremio-header-height) + 18px) !important;
}

body.has-top-nav {
  padding-top: calc(var(--auremio-header-height) + 18px) !important;
}

body:has(.bottom-nav) {
  padding-bottom: calc(var(--auremio-nav-height) + 46px + env(safe-area-inset-bottom)) !important;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  max-width: 100%;
  font: inherit;
}

button,
[role="button"],
input:not([type="checkbox"]):not([type="radio"]),
select {
  min-height: 44px;
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(184, 149, 88, 0.9) !important;
  outline-offset: 3px;
}

.global-header {
  height: var(--auremio-header-height) !important;
  overflow: visible !important;
}

.global-header__inner {
  width: 100%;
  max-width: var(--auremio-content) !important;
  min-width: 0;
  padding: 0 24px !important;
}

.global-brand-link,
.global-header__right {
  min-width: 0;
}

.global-brand-copy h1 {
  white-space: nowrap;
}

.global-header__right {
  flex: 0 1 auto;
}

.wrap,
.shell,
.card,
.panel,
.row,
.layout,
.grid {
  min-width: 0;
}

.bottom-nav {
  top: auto !important;
  right: auto !important;
  bottom: var(--auremio-safe-bottom) !important;
  left: 50% !important;
  width: min(560px, calc(100% - 32px)) !important;
  min-width: 0 !important;
  height: var(--auremio-nav-height) !important;
  padding: 9px !important;
  gap: 6px !important;
  transform: translateX(-50%) !important;
  border-radius: 24px !important;
  z-index: 2200 !important;
}

.bottom-nav .nav-item {
  min-width: 0;
  min-height: 56px;
  padding: 7px 4px !important;
  gap: 4px !important;
  border-radius: 16px !important;
  line-height: 1.1;
}

.bottom-nav .nav-item span:last-child {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legal-links {
  position: static !important;
  width: min(680px, calc(100% - 32px)) !important;
  margin: 38px auto 0 !important;
  transform: none !important;
}

/* Landingpage: nutzt Desktopfläche, bleibt auf Tablets kompakt. */
.shell {
  width: min(var(--auremio-content), calc(100% - 40px));
  max-width: var(--auremio-content) !important;
  margin: 0 auto;
  padding: 34px 0 20px !important;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

.shell > .hero,
.shell > .preview-block {
  margin: 0 !important;
  height: 100%;
}

.shell > .hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 58px) !important;
}

.shell > .hero .title {
  font-size: clamp(42px, 5vw, 68px) !important;
  max-width: 11ch;
}

.shell > .hero .copy {
  max-width: 58ch;
  font-size: 17px;
}

.shell > .preview-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px !important;
}

.shell .preview-row {
  grid-auto-flow: row !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-columns: auto !important;
  overflow: visible !important;
}

.shell .preview-card {
  min-width: 0;
}

.shell .preview-card img {
  height: 150px;
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
    width: min(640px, calc(100% - 28px));
    padding-top: 20px !important;
  }

  .shell > .hero .title {
    font-size: clamp(36px, 9vw, 52px) !important;
  }

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

@media (max-width: 520px) {
  :root {
    --auremio-header-height: 78px;
    --auremio-nav-height: 72px;
  }

  body,
  body.has-top-nav {
    padding-top: calc(var(--auremio-header-height) + 12px) !important;
  }

  body:has(.bottom-nav) {
    padding-bottom: calc(var(--auremio-nav-height) + 38px + env(safe-area-inset-bottom)) !important;
  }

  .global-header__inner {
    padding: 0 12px !important;
    gap: 8px !important;
  }

  .global-brand-link {
    gap: 9px !important;
  }

  .global-brand-mark,
  .global-brand-logo {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px;
    border-radius: 12px !important;
  }

  .global-brand-copy h1 {
    font-size: 28px !important;
    line-height: 0.92 !important;
  }

  .global-brand-copy p {
    font-size: 8px !important;
    letter-spacing: 0.09em !important;
    line-height: 1.08 !important;
  }

  .global-header__right {
    gap: 6px !important;
  }

  .auth-link,
  .user-pill,
  .notif-btn,
  .global-header__right .btn {
    min-height: 40px !important;
    height: 40px !important;
    padding-inline: 10px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
  }

  .global-header__right > :nth-child(n + 3) {
    display: none !important;
  }

  .bottom-nav {
    width: calc(100% - 20px) !important;
    padding: 7px !important;
    gap: 3px !important;
    border-radius: 22px !important;
  }

  .bottom-nav .nav-item {
    min-height: 56px;
    padding-inline: 2px !important;
    font-size: 10px !important;
  }

  .bottom-nav .nav-item span:first-child {
    font-size: 18px !important;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .shell {
    width: calc(100% - 24px);
    gap: 16px;
    padding-top: 14px !important;
  }

  .shell > .hero {
    padding: 24px 20px !important;
    border-radius: 26px !important;
  }

  .shell > .hero .title {
    font-size: 36px !important;
  }

  .shell > .hero .copy {
    font-size: 15px;
  }

  .shell .preview-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .shell .preview-card img {
    height: 104px;
  }

  .legal-links {
    flex-wrap: wrap;
    gap: 7px !important;
    margin-top: 24px !important;
    padding: 10px !important;
  }
}

@media (max-width: 360px) {
  .global-header__right > :nth-child(n + 2) {
    display: none !important;
  }

  .global-brand-copy h1 {
    font-size: 26px !important;
  }

  .bottom-nav .nav-item {
    font-size: 9px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
