/* Samt & Messing – Komponenten, Werte unverändert aus TrickCoach public/css/style.css (v1.16.0) plus Freigaben vom 5. 11. 2026 (Sora, Kapitälchen, Cards mit Schatten, Messing-Ring, Satzspiegel).
   Farben, Radien und Schatten kommen aus tokens.css. */
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 var(--font-sans); font-variant-numeric: tabular-nums;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 10px 12px; width: 100%;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons (App) */
.btn {
  border: 1px solid var(--border); background: var(--surface); padding: 10px 16px; border-radius: 14px; cursor: pointer;
  font-weight: 600;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn.good { background: var(--good); border-color: var(--good); color: var(--good-ink); }
.btn.link { background: none; border: none; color: var(--accent); padding: 6px 0; font-weight: 500; }
.btn.wide { width: 100%; }
.btn.big { padding: 16px; font-size: 1.05rem; }
.hero .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hero .btn.secondary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.icon-btn {
  width: 40px; height: 40px; flex: none; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 1.4rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}

/* Buttons (Landingpage) */
.lp-btn { display: inline-block; padding: 15px 22px; border-radius: 14px; font-weight: 800; font-size: 1rem; cursor: pointer; border: 1px solid var(--border); background: none; color: var(--text); text-decoration: none; }
.lp-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lp-btn.small { padding: 9px 14px; font-weight: 700; white-space: nowrap; }

/* Badges & Chips */
.badge { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.badge-ok { background: color-mix(in srgb, var(--good) 20%, transparent); color: var(--good); }
.badge-warn { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.badge-bad { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.badge-info { background: color-mix(in srgb, var(--info) 20%, transparent); color: var(--info); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: .9rem; }
.chip:disabled { opacity: .45; text-decoration: line-through; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip-active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 20%, var(--surface)); }

/* Panel (Hero der App) */
.hero {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-raised); border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.hero h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.3; }
.eyebrow { margin: 0; color: var(--accent); font-variant-caps: small-caps; letter-spacing: .05em; font-size: 15px; font-weight: 700; }
.hero-stats { display: flex; gap: 24px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; line-height: 1; }
.hero-stats span { color: var(--muted); font-size: .85rem; }
.section-title { margin: 12px 0 0; font-size: 19px; font-weight: 700; color: var(--muted); font-variant-caps: small-caps; letter-spacing: .05em; }

/* Kacheln */
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-raised); cursor: pointer; transition: transform .1s;
}
.tile:not(:disabled):active { transform: scale(.98); }
.tile:disabled { opacity: .5; cursor: default; }
.tile-icon { font-size: 1.6rem; width: 40px; text-align: center; }
.tile-text { flex: 1; display: flex; flex-direction: column; }
.tile-text small { color: var(--muted); }

/* Felder */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.hint { color: var(--muted); margin: 0; }
.small, .hint.small { font-size: .85rem; }

/* Fortschritt */
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .3s; }

/* Spielkarten */
.pcard {
  position: relative; background: var(--card-bg); border-radius: 10px; box-shadow: var(--shadow-card);
  border: 1px solid var(--card-edge); display: inline-grid; place-items: center; flex: none; font-family: var(--font-card);
}
.pcard.red { color: var(--red-suit); }
.pcard.black { color: var(--black-suit); }
.pcard-sm { width: 38px; height: 54px; border-radius: 6px; }
.pcard-md { width: 70px; height: 100px; }
.pcard-lg { width: 110px; height: 156px; border-radius: 14px; }
.pcard-corner { position: absolute; top: 4px; left: 6px; font-size: .8rem; line-height: 1; text-align: center; font-weight: 700; }
.pcard-sm .pcard-corner { display: none; }
.pcard-center { font-size: 2.2rem; line-height: 1; }
.pcard-lg .pcard-center { font-size: 3.6rem; }
.pcard-sm { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pcard-sm .pcard-center { font-size: 1rem; order: 2; }
.pcard-value { display: none; }
.pcard-sm .pcard-value { display: block; order: 1; font-size: .95rem; font-weight: 700; line-height: 1; }
.pcard-corner.flip { top: auto; left: auto; bottom: 4px; right: 6px; transform: rotate(180deg); }

/* Wortmarke */
.wordmark { display: inline-flex; align-items: center; gap: 8px; color: var(--text); min-width: 0; }
.wm-text { font-family: var(--font-display); white-space: nowrap; letter-spacing: -.01em; line-height: 1; }
.wm-text b { font-weight: 800; }
.wm-text span { font-weight: 600; color: var(--accent); }
.wordmark.stacked { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.wm-caps { font-family: var(--font-display); font-weight: 700; letter-spacing: .14em; line-height: 1; font-size: clamp(1.9rem, 7vw, 2.8rem); padding-left: .16em; }
.wm-caps span { color: var(--accent); }
.wm-claim { font-family: var(--font-display); display: flex; align-items: center; gap: 12px; width: 100%; max-width: 30rem; color: var(--muted); font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; }
.wm-claim i { flex: 1; height: 1px; background: var(--accent); min-width: 16px; }
.wm-claim span { white-space: normal; }

/* Landingpage */
.lp { font-size: 17px; line-height: 1.6; }
.lp-eyebrow { margin: 0; color: var(--accent); font-weight: 800; letter-spacing: .05em; font-variant-caps: small-caps; font-size: 1rem; }
.lp-soft { color: color-mix(in srgb, var(--text) 78%, var(--bg)); margin: 0; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-hero { padding-top: 44px; padding-bottom: 36px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
@media (min-width: 760px) { .lp-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.lp-hero-brand { grid-column: 1 / -1; display: flex; justify-content: center; }
.lp-hero-text { display: flex; flex-direction: column; gap: 18px; }
.lp-hero h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.04; letter-spacing: -.025em; }
.lp-hero h1 span { display: block; white-space: nowrap; }
.lp-sec h2 { margin: 0 0 20px; font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 6vw, 42px); line-height: 1.12; letter-spacing: -.02em; }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.lp-steps li { border-top: 2px solid var(--accent); padding-top: 14px; }
.lp-steps span { font-size: .9rem; font-weight: 800; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.lp-steps h3 { margin: 6px 0; font-size: 1.3rem; font-weight: 800; }

/* Kopfzeile (App) */
.page { max-width: 720px; margin: 0 auto; padding: 0 16px 48px; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 10px) 0 10px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.topbar h1 { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.2; font-weight: 700; margin: 0; overflow-wrap: anywhere; hyphens: auto; }
.topbar-actions { display: flex; gap: 6px; }
.credit-badge { flex: none; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); font-weight: 800; font-size: .85rem; text-decoration: none; white-space: nowrap; }

/* Tab-Leiste (App, unten) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--tab); border-top: 1px solid var(--border); padding: 4px max(4px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)); }
.tab-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 54px; justify-content: center; border: 0; background: none;
  color: var(--muted); font-size: .75rem; font-weight: 600; cursor: pointer; }
.tab-btn.on { color: var(--accent); font-weight: 800; }

/* Sheet (Menü über der Tab-Leiste) */
.sheet-scrim { position: fixed; inset: 0; bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom)); z-index: 28; background: var(--scrim); }
.sheet { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom)); z-index: 29; max-width: 720px; margin: 0 auto;
  max-height: calc(100dvh - var(--tabbar-height) - 40px); overflow-y: auto; box-sizing: border-box; background: var(--sheet); color: var(--text);
  border: 1px solid var(--border); border-bottom: 0; border-radius: 14px 14px 0 0; padding: 8px 18px 16px;
  display: flex; flex-direction: column; gap: 10px; animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(30px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-grip { align-self: center; width: 40px; height: 5px; border-radius: 999px; background: var(--border); }
.sheet-head { display: flex; align-items: center; }
.sheet-head h2 { flex: 1; margin: 0; font-size: 1.25rem; font-weight: 800; }
.sheet-close { width: 44px; height: 44px; border: 0; background: none; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.sheet-cta { text-align: left; background: var(--accent) !important; border-color: var(--accent) !important; color: var(--accent-ink) !important; font-weight: 800; padding: 14px; }
.sheet-list { list-style: none; margin: 0; padding: 0; }
.sheet-list li + li { border-top: 1px solid var(--border); }
.sheet-list button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 2px; border: 0; background: none; color: var(--text);
  font-size: 1rem; text-align: left; cursor: pointer; }
.sheet-list b { flex: 1; }
.sheet-list small { color: var(--muted); font-weight: 600; }
.sheet-icon { width: 30px; display: grid; place-items: center; color: var(--accent); }

/* Karteikasten-Frage */
.question { display: flex; flex-direction: column; gap: 14px; }
.q { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; }
.q p { margin: 0; font-size: 1.05rem; }
.q h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; }
.big-num { font-family: var(--font-display); font-size: 3.6rem; font-weight: 800; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.picker { display: flex; flex-direction: column; gap: 10px; }
.picker-suits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.suit-btn {
  display: flex; flex-direction: column; align-items: center; padding: 8px 0 6px; font-size: 1.8rem; line-height: 1.1; min-height: 64px;
  background: var(--card-bg); border: 2px solid transparent; border-radius: 14px; cursor: pointer;
}
.suit-btn small { font-size: .7rem; color: #555; font-family: system-ui; }
.suit-btn.red { color: var(--red-suit); }
.suit-btn.black { color: var(--black-suit); }
.suit-btn.active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); }
.picker-values { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.value-btn {
  padding: 12px 0; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-weight: 700;
  min-height: 54px; font-size: 1.35rem; cursor: pointer;
}
.value-btn.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.feedback { border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; border: 2px solid var(--border); }
.feedback h3 { margin: 0; font-size: 1.1rem; line-height: 1.25; }
.feedback p { margin: 0; }
.feedback-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feedback-head .btn { flex: none; min-width: 110px; min-height: 48px; }
.feedback.correct { border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.feedback.slow, .feedback.hinted { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.feedback.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }

/* Farbwelt wählen (App) */
.theme-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.theme-opt { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface);
  color: var(--text); text-align: left; cursor: pointer; font-size: .9rem; }
.theme-opt.on { border-color: var(--accent); }
.theme-opt b { display: block; line-height: 1.2; }
.theme-opt small { color: var(--muted); font-size: .75rem; }
.theme-swatch { display: flex; flex: none; }
.theme-swatch i { width: 14px; height: 28px; display: block; }
.theme-swatch i:first-child { border-radius: 8px 0 0 8px; } .theme-swatch i:last-child { border-radius: 0 8px 8px 0; }
/* Farbwelt wählen (Landingpage) */
.lp-theme-row { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); font-weight: 700; }
.lp-themes { display: flex; gap: 6px; }
.lp-theme { display: flex; width: 30px; height: 30px; padding: 0; border-radius: 50%; overflow: hidden; border: 2px solid var(--border); cursor: pointer; background: none; }
.lp-theme i { flex: 1; height: 100%; display: block; }
.lp-theme.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

/* Kartenfächer (Landingpage) – --fan 0…1 setzt das Scrollen */
.lp-fan { --fan: 0; position: relative; height: 300px; }
.lp-card { position: absolute; top: 30px; left: calc(50% - 75px); width: 150px; height: 212px; border-radius: 14px; background: var(--card-bg); color: #1b1b22;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .3); border: 1px solid rgba(0, 0, 0, .08); font-weight: 800; transform-origin: 50% 120%; will-change: transform; }
.lp-card.red { color: var(--red-suit); }
.lp-card .corner { position: absolute; top: 10px; left: 12px; font-size: 20px; line-height: 1.05; }
.lp-card .pip { position: absolute; inset: 0; display: grid; place-items: center; font-size: 60px; }
.lp-card.l { transform: rotate(calc(-9deg - 11deg * var(--fan))) translate(calc(-62px - 14px * var(--fan)), calc(10px * var(--fan))); }
.lp-card.m { top: 10px; transform: translateY(calc(-22px * var(--fan))); }
.lp-card.r { transform: rotate(calc(9deg + 11deg * var(--fan))) translate(calc(62px + 14px * var(--fan)), calc(10px * var(--fan))); }
@media (prefers-reduced-motion: reduce) { .lp-card { transition: none; } .lp-fan { --fan: 0 !important; } }

/* Kartenrückseite „Samt & Messing“ */
.pcard-back { background: var(--primary); border: 3px solid var(--card-bg); color: var(--accent); }
.pcard-back::before { content: ""; position: absolute; inset: 4px; border: 1px solid var(--accent); border-radius: 5px; }
.pcard-back::after { content: "\2660\FE0E"; font-size: 1.4rem; line-height: 1; }

/* Cards (Kästen laut Nr. 5): Fläche, 1px-Rahmen, Schatten – für Trainingsmodule, Lernkärtchen, Kennzahlen */
.card-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-raised); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; box-shadow: var(--shadow-raised); display: flex; flex-direction: column; align-items: center; }
.stat strong { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; line-height: 1; }
.stat span { color: var(--muted); font-size: .85rem; }

/* Satzspiegel: Lesestoff direkt auf bg, gegliedert über Überschriften und Abstand */
.prose { max-width: 65ch; font-size: 16px; line-height: 1.6; }
.prose > * { margin: 0; }
.prose .eyebrow + h2, .prose h2 { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.015em; margin: 4px 0 10px; }
.prose h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.25; margin: 28px 0 8px; }
.prose h4 { font-size: 17px; font-weight: 700; line-height: 1.3; margin: 16px 0 4px; }
.prose p + p { margin-top: 12px; }

/* Messing-Ring: zeichnet aus (höchstens einmal pro Bildschirm) – nächste Aktion, Verdientes, heute, gezogene Karte */
.ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.card-box.ring, .tile.ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent), var(--shadow-raised); }
.ring:focus-visible { outline-offset: 6px; }

/* Gedankenblase: Fläche hell Kartenweiß, dunkel Fläche der Welt */
:root { --blase-fill: var(--card-bg); }
[data-theme="messing"], [data-theme="nacht"] { --blase-fill: var(--surface); }

/* AppFamilie: großer Verweis auf die Übersicht + kleine Links auf die anderen Zauber-Apps */
.app-familie { display: flex; flex-direction: column; gap: 14px; }
.lp-alle { display: flex; flex-direction: column; gap: 8px; padding: 22px; color: var(--text); text-decoration: none; transition: border-color .15s; }
.lp-alle:hover { border-color: var(--accent); }
.lp-alle h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.15; letter-spacing: -.015em; }
.lp-alle p { margin: 0; }
.lp-alle .eyebrow { margin: 0; }
.lp-alle-cta { color: var(--accent); font-weight: 800; }
.lp-geschwister { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.lp-geschwister a { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-size: 1rem; }
.lp-geschwister a:hover .wm-text b { text-decoration: underline; text-underline-offset: 3px; }
.lp-geschwister small { color: var(--muted); font-size: .8rem; }
