.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--amber-600);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.page-title {
  margin-bottom: 7px;
  color: var(--forest-900);
  font-size: clamp(27px, 8vw, 38px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.page-copy {
  max-width: 580px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 2px 12px;
}

.section-heading h2 {
  margin: 0;
  color: var(--forest-900);
  font-size: 17px;
}

.section-heading span {
  color: var(--muted);
  font-size: 11px;
}

.card {
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(47, 70, 51, .1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.button-primary {
  color: var(--cream-50);
  background: var(--forest-800);
  box-shadow: 0 7px 18px rgba(47, 70, 51, .18);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--forest-700);
}

.button-secondary {
  color: var(--forest-800);
  background: var(--forest-100);
  border-color: rgba(47, 70, 51, .12);
}

/* Phasenwechsel: Senfbraun, dunkle Schrift und zusätzliches Richtungssymbol.
   Zustandsänderungen werden im Text genannt, nie allein durch Farbe vermittelt. */
.button-transition {
  color: var(--forest-950);
  background: var(--amber-500);
  border-color: rgba(22, 36, 27, .3);
  box-shadow: 0 7px 18px rgba(189, 116, 27, .15);
  text-align: center;
}

.button-transition::after {
  content: '→';
  flex-shrink: 0;
  font-size: 1.2em;
}

.button-transition:hover,
.button-transition:focus-visible {
  background: #dfa34b;
}

.button-transition:focus-visible {
  outline: 3px solid var(--forest-950);
  outline-offset: 3px;
}

.button-danger {
  color: var(--white);
  background: var(--danger);
  box-shadow: 0 7px 18px rgba(184, 66, 53, .18);
}

.backup-reminder {
  width: min(calc(100% - 32px), calc(var(--content-width) - 32px));
  margin: 16px auto 0;
  padding: 16px;
  border-left: 4px solid var(--amber-500);
}
.backup-reminder[hidden] { display: none; }
.backup-reminder strong { color: var(--forest-900); font-size: 17px; }
.backup-reminder p { margin: 8px 0 14px; font-size: 14px; line-height: 1.5; }
.backup-reminder-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.backup-reminder-actions .button { flex: 1 1 190px; min-height: 48px; }

.button-danger:hover,
.button-danger:focus-visible {
  background: #97362c;
}

.button-quiet {
  color: var(--muted);
  background: transparent;
}

.button-large {
  min-height: 50px;
  padding: 13px 18px;
  border-radius: 13px;
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--forest-800);
  background: var(--cream-200);
  border: 0;
  border-radius: 50%;
  font-size: 25px;
  line-height: 1;
}

.button:focus-visible,
.icon-button:focus-visible,
.access-banner:focus-visible,
.bottom-nav a:focus-visible,
.brand:focus-visible {
  outline: 3px solid rgba(210, 142, 46, .55);
  outline-offset: 2px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 9px;
  color: var(--muted);
  background: var(--cream-200);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
}

.status-chip::before {
  width: 7px;
  height: 7px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.status-chip[data-tone="active"] { color: var(--success); background: #e2efe4; }
.status-chip[data-tone="amber"] { color: var(--amber-600); background: var(--amber-100); }
.status-chip[data-tone="info"] { color: var(--info); background: #e2ebf0; }
.status-chip[data-tone="muted"] { color: var(--muted); }

.access-banner {
  position: relative;
  z-index: 15;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 51px;
  padding: 8px 16px;
  color: var(--forest-900);
  text-align: left;
  background: var(--amber-100);
  border: 0;
  border-bottom: 1px solid rgba(189, 116, 27, .2);
}

.access-banner[hidden] {
  display: none;
}

.access-banner[data-tone="archive"] {
  color: var(--cream-50);
  background: var(--forest-800);
  border-bottom-color: rgba(255, 255, 255, .08);
}

.access-banner[data-tone="licensed"] {
  background: var(--forest-100);
  border-bottom-color: rgba(47, 70, 51, .13);
}

.access-banner > span:first-child {
  display: grid;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, .52);
  border-radius: 10px;
  place-items: center;
  font-size: 15px;
}

.access-banner strong,
.access-banner small {
  display: block;
}

.access-banner strong {
  font-size: 11px;
}

.access-banner small {
  margin-top: 2px;
  color: currentColor;
  font-size: 9px;
  line-height: 1.3;
  opacity: .76;
}

.access-banner-arrow {
  font-size: 22px;
}

.pwa-update-banner {
  position: fixed;
  z-index: 45;
  right: 12px;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 10px);
  left: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(calc(100% - 24px), 696px);
  margin: 0 auto;
  padding: 11px 12px;
  color: var(--cream-50);
  background: var(--forest-900);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 15px;
  box-shadow: 0 16px 38px rgba(22, 36, 27, .28);
}

.pwa-update-banner[hidden] {
  display: none;
}

.pwa-update-banner > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  color: var(--amber-500);
  background: rgba(255, 255, 255, .08);
  border-radius: 11px;
  place-items: center;
  font-size: 20px;
}

.pwa-update-banner strong,
.pwa-update-banner small {
  display: block;
}

.pwa-update-banner strong {
  font-size: 11px;
}

.pwa-update-banner small {
  margin-top: 2px;
  color: rgba(255, 255, 255, .72);
  font-size: 8px;
}

.pwa-update-banner .button {
  min-height: 38px;
  padding: 8px 11px;
  color: var(--forest-950);
  background: var(--amber-500);
  font-size: 10px;
}

@media (max-width: 420px) {
  .pwa-update-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .pwa-update-banner .button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.progress-track {
  display: flex;
  overflow: hidden;
  height: 7px;
  background: var(--cream-300);
  border-radius: 999px;
}

.progress-track span {
  min-width: 0;
  background: var(--amber-500);
  border-radius: inherit;
  transition: width .25s ease;
}

.text-input {
  width: 100%;
  min-height: 49px;
  padding: 12px 13px;
  color: var(--text);
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: var(--radius-sm);
  outline: none;
}

.text-input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(210, 142, 46, .14);
}

.field-label {
  display: flex;
  justify-content: space-between;
  margin: 18px 2px 7px;
  color: var(--forest-900);
  font-size: 12px;
  font-weight: 800;
}

.field-label span {
  color: var(--muted-light);
  font-weight: 650;
}

.field-help {
  margin: 6px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.sheet-dialog {
  width: min(100% - 20px, 560px);
  max-height: calc(100vh - 20px);
  margin: auto auto 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 24px 24px 0 0;
  overflow: visible;
}

.sheet-dialog::backdrop {
  background: rgba(22, 36, 27, .52);
  backdrop-filter: blur(3px);
}

.sheet-card {
  max-height: calc(100vh - 20px);
  padding: 9px 20px calc(20px + env(safe-area-inset-bottom));
  background: var(--cream-100);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 13px;
  background: var(--cream-300);
  border-radius: 999px;
}

.sheet-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.sheet-heading h2 {
  margin: 0;
  color: var(--forest-900);
  font-size: 24px;
}

.sheet-actions {
  display: grid;
  gap: 5px;
  margin-top: 24px;
}

.license-dialog {
  width: min(100% - 20px, 640px);
}

.license-sheet {
  display: grid;
  gap: 14px;
}

.license-summary {
  padding: 13px;
  background: var(--cream-200);
  border-radius: 13px;
}

.license-summary p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.license-section {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  padding-top: 15px;
  border-top: 1px solid var(--cream-300);
}

.license-step {
  display: grid;
  width: 28px;
  height: 28px;
  color: var(--cream-50);
  background: var(--forest-800);
  border-radius: 50%;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}

.license-section h3,
.payment-card h4 {
  margin: 3px 0 5px;
  color: var(--forest-900);
}

.license-section h3 { font-size: 15px; }
.payment-card h4 { font-size: 13px; }

.license-section p,
.payment-card p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  color: var(--forest-800);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.legal-links a:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 3px; }
.legal-online-note,
.license-section .legal-online-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.license-legal-links { margin: 12px 0; }
#license-signed-period { font-size: 13px; }
.license-section .license-order-summary { white-space: pre-line; font-size: 13px; }
.license-order-choices p,
.license-request-preview p,
.license-section .license-request-status { font-size: 13px; line-height: 1.6; }
.license-order-choices h4 { margin: 16px 0 8px; font-size: 14px; }
.license-order-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0;
  font-size: 14px;
  line-height: 1.6;
  cursor: pointer;
}
.license-order-choice input { flex: 0 0 22px; width: 22px; height: 22px; margin: 0; accent-color: var(--forest-800); }
.license-order-choice:focus-within { outline: 2px solid var(--amber-500); outline-offset: 3px; }
.license-request-preview { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--cream-300); }
.license-request-preview textarea { width: 100%; min-height: 220px; font-size: 16px; line-height: 1.5; }
.license-request-preview label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.license-request-preview .button { width: 100%; margin-top: 8px; }
#license-request-envelope { white-space: pre-wrap; overflow-wrap: anywhere; }
.license-request-status:empty { display: none; }

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 6px;
}

.copy-row code {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  color: var(--forest-900);
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: 9px;
  font-size: 10px;
  line-height: 1.45;
}

.copy-row .button {
  min-height: 42px;
  padding: 8px 10px;
  font-size: 9px;
}

.payment-card {
  margin-top: 10px;
  padding: 13px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--cream-300);
  border-radius: 13px;
}

.license-detail {
  margin-top: 9px;
}

.license-detail > small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.bank-details-more {
  margin-top: 11px;
  color: var(--muted);
  font-size: 10px;
}

.bank-details-more summary {
  color: var(--forest-700);
  font-weight: 800;
  cursor: pointer;
}

.bank-details-more dl {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.bank-details-more dt {
  color: var(--muted-light);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.bank-details-more dd {
  margin: 2px 0 0;
  color: var(--text);
  line-height: 1.4;
}

.license-request-button,
.license-activate-button {
  width: 100%;
  margin-top: 12px;
}

.license-code-input {
  min-height: 104px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.45;
}

.license-code-message {
  margin: 7px 2px 0 !important;
  padding: 8px 10px;
  color: var(--info) !important;
  background: #e2ebf0;
  border-radius: 9px;
}

.license-code-message[data-tone="error"] {
  color: var(--danger) !important;
  background: #f7e2df;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 16px;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 14px);
  left: 16px;
  max-width: 520px;
  margin: auto;
  padding: 12px 14px;
  color: var(--cream-50);
  background: var(--forest-950);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.empty-card,
.error-card {
  padding: 24px;
  text-align: center;
}

.empty-card h2,
.error-card h2 {
  margin-bottom: 8px;
  color: var(--forest-900);
  font-size: 19px;
}

.empty-card p,
.error-card p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (min-width: 620px) {
  .access-banner {
    padding-right: max(24px, calc((100vw - var(--content-width)) / 2));
    padding-left: max(24px, calc((100vw - var(--content-width)) / 2));
  }

  .sheet-dialog {
    margin-bottom: auto;
    border-radius: var(--radius-lg);
  }

  .sheet-card {
    border-radius: var(--radius-lg);
  }

  .sheet-handle {
    display: none;
  }
}
