/* Sprachmut App: Rahmen für das echte Spiel. Die Design-Bausteine (tokens, decks, app, motion) sind aus dem Design-Paket,
   der Prototyp-Bildschirm hat dort feste 375 x 812 Pixel. Hier füllt er das Gerät. */

html, body { height: 100%; }
body { margin: 0; background: var(--surface); overscroll-behavior: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
input { user-select: text; -webkit-user-select: text; }
#app { position: relative; height: 100vh; height: 100dvh; max-width: 560px; margin: 0 auto; overflow: hidden; background: var(--surface); }
@media (min-width: 600px) { body { background: var(--surface-sunken); } #app { box-shadow: 0 0 0 2px var(--line); } }

#app .screen { width: 100%; height: 100%; padding-top: max(8px, env(safe-area-inset-top)); }
.status { display: none; }
.screen-body { overflow-y: auto; overflow-x: hidden; padding-bottom: max(24px, env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.spacer { flex: 1 1 0; min-height: 0; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-white { background: #fff; color: var(--ink); }

/* Eingabefeld */
.field input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: inherit; outline: none; padding: 0; }
.field input::placeholder { color: var(--text-muted); }
.field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--purple-10); }
.field .addbtn { width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: var(--brand); display: grid; place-items: center; border-radius: 50%; cursor: pointer; }
.field-err { color: var(--terracotta-shade); font: 600 14px var(--font-body); margin: -4px 0 0; }
.chip button { border: 0; background: none; color: inherit; display: grid; place-items: center; width: 28px; height: 28px; margin-right: -8px; cursor: pointer; padding: 0; }
.chip .ic { width: 18px; height: 18px; }

/* Karten */
.card-scene { position: relative; width: 300px; height: 420px; flex: none; }
.card-scene.small { width: 220px; height: 308px; }
.flip { width: 300px; height: 420px; cursor: pointer; z-index: 1; }
.flip.small { width: 220px; height: 308px; }
.card-scene > .holder { position: relative; z-index: 1; width: 100%; height: 100%; perspective: 1200px; }
.card-scene > .under { position: absolute; left: 0; top: 0; z-index: 0; }
.card-scene > .under.u1 { transform: rotate(-5deg) translate(-10px, 6px); }
.card-scene > .under.u2 { transform: rotate(4deg) translate(12px, 4px); }
.playcard .prompt > div { width: 100%; }
.playcard .ttl { display: block; font: 700 .72em/1.1 var(--font-display); letter-spacing: .02em; margin-bottom: 8px; opacity: .92; }
.playcard .hintp { position: relative; margin: 0 16px 10px; padding: 9px 12px; border-radius: 14px; background: var(--deck-fg); color: var(--deck-bg); font: 600 13.5px/1.35 var(--font-body); }
.playcard.small .hintp { margin: 0 12px 8px; padding: 7px 10px; font-size: 12.5px; }
.playcard:not(.small).fit-s .prompt { font-size: 23px; } .playcard:not(.small).fit-xs .prompt { font-size: 19px; }
.playcard.small.fit-s .prompt { font-size: 17px; } .playcard.small.fit-xs .prompt { font-size: 15px; }
.playcard .ab.long { grid-template-columns: 1fr; }
.playcard .ab.long div { font-size: 15px; padding: 8px 10px; }
.playcard.small .ab.long div { font-size: 13px; padding: 6px 8px; }
.playcard .ab small { display: inline; margin-right: 6px; }
.playcard.small .foot > span:last-child { display: none; }
.playcard .foot .mini .ic { width: 16px; height: 16px; }
.playcard .head .badge .ic { width: 24px; height: 24px; }
.cardback .seal .ic { stroke-width: 1.7; }

.acts { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.acts-in { animation: sc-in-u .36s ease-out both; }
.row2 { display: flex; gap: 10px; width: 100%; }
.row2 .btn-outline { flex: 1; } .row2 .btn-lime { flex: 1.4; }
.sheet .chip { min-height: 40px; }
.hint-line { margin: 0; text-align: center; color: var(--text-muted); font: 400 14px/1.4 var(--font-body); }
.welcome-hint { color: #fff; opacity: .92; text-align: center; font: 400 13.5px/1.4 var(--font-body); margin: 0; }
.welcome-hint .chip { background: rgba(255, 255, 255, .16); color: #fff; min-height: 36px; padding: 0 12px; font-size: 14px; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font: 400 16px/1.45 var(--font-body); }
.steps li b { font-family: var(--font-display); font-weight: 700; color: var(--brand); min-width: 62px; }
.sheet { max-height: 90%; overflow-y: auto; }

/* Auf kleinen Handys werden Karten und Ziege etwas kleiner */
@media (max-height: 760px) {
  .card-scene { zoom: .86; }
  .card-scene.small { zoom: .9; }
  .goat-300 { width: 220px; height: 220px; } .goat-240 { width: 180px; height: 180px; }
}
@media (max-height: 660px) { .card-scene { zoom: .72; } .card-scene.small { zoom: .78; } }
@media (min-width: 600px) and (min-height: 940px) { .card-scene { zoom: 1.2; } }

/* Weniger Bewegung per Schalter (das System-Signal steht schon in motion.css) */
@keyframes fade-only { from { opacity: 0; } to { opacity: 1; } }
html.calm .goat, html.calm .goat *, html.calm .confetti i, html.calm .deck-shuffle *, html.calm .tilt-hover { animation: none !important; }
html.calm .flip { transition: none; }
html.calm .card-draw, html.calm .card-reveal, html.calm .screen-enter-right, html.calm .screen-enter-up, html.calm .sheet-enter, html.calm .acts-in { animation: fade-only .2s linear both !important; }
html.calm .confetti { display: none; }
@media (prefers-reduced-motion: reduce) { .acts-in { animation: fade-only .2s linear both; } }

/* A oder B: die Möglichkeiten sind die Frage */
.playcard .opts { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.playcard .opt { display: block; font: 700 1.12em/1.12 var(--font-display); overflow-wrap: anywhere; }
.playcard .opt .num { display: inline-grid; place-items: center; width: 1.1em; height: 1.1em; margin-right: 8px; border-radius: 50%; background: var(--deck-fg); color: var(--deck-bg); font: 700 .62em var(--font-body); font-style: normal; vertical-align: .18em; }
.playcard .or { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--deck-fg); color: var(--deck-bg); font: 700 12px/1.3 var(--font-body); letter-spacing: .1em; text-transform: uppercase; }
.playcard .opts.long .opt { font-size: 19px; font-weight: 600; } .playcard .opts.xl .opt { font-size: 16px; }
.playcard.small .opts.long .opt { font-size: 15px; } .playcard.small .opts.xl .opt { font-size: 13px; }
.playcard .ttl { text-transform: none; }
.hint-line.rule { text-align: left; padding: 0 4px; color: var(--text); }
.acts .alts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.act.alt { flex-direction: column; align-items: flex-start; gap: 6px; min-height: 92px; padding: 12px 14px; }
.act.alt .ico { width: 36px; height: 36px; }
.act.alt .s { font-size: 13px; }

/* Mehr Luft unter den Karten und über den Knöpfen */
#after { margin-top: 22px; }
.card-scene { margin-bottom: 6px; }
.t-hand { padding-top: 4px; }
.row2 { margin-top: 6px; }
.dare-note { margin: 10px 0 0; }

/* Stapel-Auswahl: Ring nach außen, ohne Nachbarn zu berühren, und in einer Farbe, die kein Stapel als Rand hat */
.deck-grid { gap: 20px 18px; }
.deck-tile.sel { outline: 4px solid var(--text); outline-offset: 4px; }
.deck-tile.deck-mutprobe { border-color: #3A2A5C; }
.deck-tile .tick { width: 32px; height: 32px; }

/* Kleine Handys: Ziege unter der Karte weglassen, damit Karte und Knöpfe ohne Scrollen passen */
@media (max-height: 700px) { #after .goat { display: none; } }
@media (max-height: 700px) {
  .card-scene.small { zoom: .7; }
  .act { min-height: 56px; padding: 6px 16px 6px 10px; } .act .ico { width: 40px; height: 40px; }
  .act.alt { flex-direction: row; align-items: center; min-height: 56px; padding: 6px 12px 6px 10px; gap: 10px; }
  .act.alt .ico { width: 36px; height: 36px; } .act .t { font-size: 17px; } .act.alt .s { font-size: 12px; }
  .hint-line.rule { font-size: 13px; line-height: 1.35; }
  .goat-120 { width: 84px; height: 84px; }
  #after { margin-top: 14px; }
  .btn { min-height: 48px; }
}
@media (max-height: 620px) { .card-scene.small { zoom: .6; } .card-scene { zoom: .62; } }

/* Sprachwahl (Willkommen) */
.langs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-self: stretch; }
.langs button { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 2px solid rgba(255, 255, 255, .55); background: transparent; color: #fff; font: 600 15px var(--font-body); cursor: pointer; }
.langs button.on { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.segment button { padding: 0 6px; }

.card-scene.small.tall, .playcard.small.tall { height: 358px; }
.playcard.small .head .lab { font-size: 11px; letter-spacing: .08em; white-space: nowrap; }

/* Deck Anfänger: helles Lila mit Bögen (Farbe allein trägt nie die Information: Muster, Symbol und Name kommen dazu) */
.deck-anfaenger { --deck-bg: #A98BFF; --deck-fg: #1E1233; --deck-edge: #5A17E0; --deck-tile: 44px;
  --deck-pattern: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44' width='44' height='44'><path d='M6 32a16 16 0 0 1 32 0' fill='none' stroke='%231E1233' stroke-opacity='.18' stroke-width='4'/><path d='M14 32a8 8 0 0 1 16 0' fill='none' stroke='%231E1233' stroke-opacity='.18' stroke-width='4'/></svg>"); }
