/* Konstellar PWA — app styles on top of shared.css tokens
   ("warme Tinte auf Nachtpapier"). Mobile-first, standalone-mode aware. */

.app-body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.app-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 18px 96px;
}

.app-noscript { color: var(--text-2); text-align: center; padding: 48px 0; }

/* ---------- header ---------- */

.app-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.app-header h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--text);
}

.app-date { color: var(--text-2); font-size: 14px; }

/* ---------- tabs ---------- */

.app-tabs {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px max(16px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--hairline);
  z-index: 10;
}

.app-tab {
  flex: 0 1 130px;
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-2);
  font: inherit;
  font-size: 14px;
  padding: 8px 12px;
  text-align: center;
  cursor: pointer;
}

.app-tab[aria-selected="true"] {
  color: var(--gold);
  border-color: var(--hairline);
  background: var(--card);
}

/* ---------- cards ---------- */

.k-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 14px 0;
}

.k-card h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  margin: 0 0 8px;
  color: var(--text);
}

.k-card h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-2);
  margin: 0 0 6px;
  font-weight: 600;
}

.k-headline {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  margin: 18px 0 10px;
}

.k-summary { color: var(--text); margin: 0 0 8px; }

.k-muted { color: var(--text-2); font-size: 14px; }

.k-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.k-chip {
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 10px;
  background: none;
  font-family: var(--mono);
}

.k-badge {
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 8px;
  vertical-align: 2px;
  border: 1px solid var(--hairline);
}

.k-badge.harmonious { color: #9fc4b8; }
.k-badge.challenging { color: var(--danger); }
.k-badge.intense { color: var(--gold); }

.k-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.k-list { list-style: none; margin: 0; padding: 0; }
.k-list li { padding: 3px 0; }
.k-list li::before { content: "· "; color: var(--gold); }

/* ---------- forms (onboarding) ---------- */

.k-field { margin: 14px 0; }
.k-field label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }

.k-field input[type="text"],
.k-field input[type="date"],
.k-field input[type="time"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
  color-scheme: dark;
}

.k-field input:focus { outline: none; border-color: var(--gold); }

.k-check { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 15px; }
.k-check input { accent-color: var(--gold); }

.k-btn {
  display: block;
  width: 100%;
  background: var(--gold);
  color: #201b10;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  padding: 13px;
  margin-top: 18px;
  cursor: pointer;
}

.k-btn:disabled { opacity: 0.45; cursor: default; }

.k-btn-ghost {
  background: none;
  border: 1px solid var(--hairline);
  color: var(--text-2);
  font-weight: 500;
}

.k-citylist { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; }
.k-citylist li { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--hairline); }
.k-citylist li:last-child { border-bottom: none; }
.k-citylist li:hover, .k-citylist li[aria-selected="true"] { background: var(--bg-2); }
.k-citylist .country { color: var(--ghost); font-size: 13px; margin-left: 6px; }

/* ---------- radix ---------- */

.k-wheel { display: block; margin: 0 auto; max-width: 100%; }

.k-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.k-table td { padding: 7px 4px; border-bottom: 1px solid var(--hairline); }
.k-table td:first-child { color: var(--text-2); }
.k-table tr:last-child td { border-bottom: none; }
.k-glyph { font-size: 17px; margin-right: 8px; }

/* ---------- misc ---------- */

.k-install {
  border-color: color-mix(in srgb, var(--gold) 45%, var(--hairline));
  font-size: 14px;
  color: var(--text-2);
}

.k-install strong { color: var(--gold); font-weight: 600; }

.k-footer { text-align: center; color: var(--ghost); font-size: 12.5px; margin-top: 28px; }
.k-footer a { color: var(--ghost); }

.k-tone { display: inline-flex; border: 1px solid var(--hairline); border-radius: 999px; overflow: hidden; }
.k-tone button {
  background: none; border: none; color: var(--text-2);
  font: inherit; font-size: 13px; padding: 4px 12px; cursor: pointer;
}
.k-tone button[aria-pressed="true"] { background: var(--card); color: var(--gold); }

@media (min-width: 640px) {
  .app-shell { padding-top: 36px; }
}
