/* Reset, Grundlayout, Typografie, Tab-Leiste. Alle Maße in px. */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 22px;
}

body.modal-open {
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.app {
  display: flex;
  flex-direction: column;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
}

.screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  padding: 28px 20px 24px;
}

/* Beschriftungen im Mono-Stil */
.label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.label--accent {
  color: var(--accent);
  letter-spacing: var(--label-spacing);
}

/* Kopfzeile */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  border-bottom: 1px solid var(--line);
}

.topbar__rank {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.topbar__rank .icon {
  color: var(--accent);
}

.topbar__back {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.icon {
  display: inline-flex;
}

/* Tab-Leiste */
.tabbar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  min-height: 72px;
  padding: 0 8px env(safe-area-inset-bottom);
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
  min-height: 56px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--nav-idle);
}

.tab[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}
