.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  background:
    radial-gradient(circle at 10% -8%, rgb(59 87 151 / 28%), transparent 34rem),
    linear-gradient(180deg, #202a3d 0, #111821 22rem, #0d141c 100%);
}

.app-header,
.app-main,
.app-footer {
  width: min(100%, var(--content-max));
  margin-inline: auto;
}

.app-header {
  min-height: 72px;
  padding: max(12px, env(safe-area-inset-top)) 10px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 950;
  letter-spacing: -.025em;
}

.brand__logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(135deg, #6577ff, #2523bf);
  box-shadow: 0 10px 24px rgb(31 47 165 / 36%);
  font-size: 19px;
}

.brand__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.16rem;
}

.version {
  flex: 0 1 auto;
  max-width: 46%;
  border: 1px solid rgb(76 176 88 / 46%);
  border-radius: 999px;
  background: rgb(33 80 47 / 46%);
  color: #bfeec8;
  padding: 9px 12px;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.app-main {
  flex: 1;
  padding: 6px 10px 44px;
}

.screen {
  min-width: 0;
  scroll-margin-top: 8px;
  animation: screen-in 160ms ease-out;
}

.screen-topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.app-footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 7px 14px;
  border-top: 1px solid #2e3947;
  background: rgb(21 29 40 / 88%);
  color: var(--color-soft);
  padding: 13px 11px max(16px, env(safe-area-inset-bottom));
  font-size: .68rem;
  line-height: 1.45;
}

@media (min-width: 900px) {
  .app-header { padding-top: max(18px, env(safe-area-inset-top)); }
}

@media (max-width: 430px) {
  .app-header { min-height: 66px; padding-inline: 10px; }
  .brand__name { max-width: 112px; white-space: normal; line-height: 1.08; font-size: 1.12rem; }
  .version { max-width: 54%; padding: 8px 10px; font-size: .68rem; }
  .app-main { padding-inline: 10px; }
}

@media (max-width: 340px) {
  .app-header { padding-inline: 7px; gap: 8px; }
  .app-main { padding-inline: 7px; }
  .brand { gap: 8px; }
  .brand__logo { width: 34px; height: 34px; }
  .brand__name { max-width: 92px; font-size: 1rem; }
  .version { font-size: .62rem; padding-inline: 8px; }
}

@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;
  }
}


/* Arbeitsblock 22A Korrektur 03 – AppShell07: historische 530-px-Proportionen ohne breiten Zoommodus. */
.app-shell {
  background:
    radial-gradient(circle at 12% -5%, rgb(58 95 180 / 20%), transparent 35%),
    linear-gradient(180deg, #1d232d 0%, #14191f 100%);
}
.app-header, .app-main, .app-footer { width: min(100%, 530px); }
.app-header {
  min-height: 36px;
  padding: max(18px, env(safe-area-inset-top)) 15px 0;
  margin-bottom: 16px;
}
.brand { gap: 10px; font-size: 20px; }
.brand__logo { width: 36px; height: 36px; border-radius: 12px; font-size: 18px; }
.brand__name { max-width: none; white-space: nowrap; font-size: 20px; line-height: 1.1; }
.version { max-width: 58%; padding: 7px 10px; font-size: 12px; line-height: 1.1; }
.app-main { padding: 0 15px 44px; }
.app-footer { padding-inline: 15px; }
@media (max-width: 430px) {
  .app-header { min-height: 36px; padding: max(10px, env(safe-area-inset-top)) 10px 0; margin-bottom: 12px; }
  .brand__name { max-width: none; white-space: nowrap; font-size: 17px; line-height: 1.1; }
  .version { max-width: 54%; padding: 6px 8px; font-size: 10px; }
  .app-main { padding: 0 10px 32px; }
  .app-footer { padding-inline: 10px; }
}
@media (max-width: 340px) {
  .app-header { padding-inline: 8px; gap: 7px; }
  .app-main { padding-inline: 8px; }
  .brand { gap: 7px; }
  .brand__logo { width: 34px; height: 34px; }
  .brand__name { font-size: 15px; }
  .version { max-width: 50%; font-size: 9px; padding-inline: 7px; }
}
