/* ---- palette (swap this block to recolor everything) ---- */
:root {
  --bg:        #fffdf8;   /* page background */
  --surface:   #ffffff;   /* card */
  --ink:       #1b2a25;   /* main text */
  --muted:     #849089;   /* labels / secondary */
  --line:      #eae7de;   /* hairlines */
  --accent:    #0e6e5c;   /* primary action */
  --accent-ink:#ffffff;   /* text on accent */
  --ok:        #2fa36b;   /* gilt */
  --no:        #d9614b;   /* gilt nicht */

  --radius:    24px;
  --gap:       18px;
  --font: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.screen {
  min-height: 100vh;      /* fallback */
  min-height: 100dvh;     /* true height under iOS Safari chrome */
  max-width: 460px;
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top)    + 22px)
    calc(env(safe-area-inset-right)  + 20px)
    calc(env(safe-area-inset-bottom) + 26px)
    calc(env(safe-area-inset-left)   + 20px);
  display: flex;
  flex-direction: column;
}

/* ---- profile header (avatar + name) ---- */
.profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-ink);
  background-color: var(--accent);

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  flex-shrink: 0;
  overflow: hidden;
}
.logout {
  margin-left: auto;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.logout:hover {
  color: var(--accent);
}

.name {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .1px;
}

/* ---- card ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 26px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 12px 34px rgba(0,0,0,.05);
}

.eyebrow {
  margin: 0 0 26px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- play button (outline pill) ---- */
.play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s ease, transform .05s ease;
}
.play:hover { border-color: var(--accent); }
.play:active { transform: scale(.98); }

.tri {
  width: 0; height: 0;
  border-left: 11px solid var(--accent);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

/* ---- guess form ---- */
.guess-form {
  width: 100%;
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.field {
  width: 100%;
  padding: 15px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  transition: border-color .15s ease;
}
.field::placeholder { color: var(--muted); }
.field:focus { border-color: var(--accent); }

/* ---- filled buttons ---- */
.primary, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: filter .15s ease, transform .05s ease;
}
.primary:active, .btn:active { transform: scale(.985); }
.primary:hover, .btn:hover { filter: brightness(.97); }

.primary { background: var(--accent); color: var(--accent-ink); }

/* ---- reveal ---- */
.label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.guess {
  margin: 0 0 22px;
  font-size: 24px;
  font-weight: 600;
}
.answer-title {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 600;
}
.answer-artist {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.verdict {
  width: 100%;
  margin-top: 28px;
  display: flex;
  gap: 12px;
}
.verdict .btn { flex: 1; color: #fff; }
.btn.ok { background: var(--ok); }
.btn.no { background: var(--no); }

/* ---- quality floor ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- hub ---- */
.hub { width: 100%; display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.hub-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 22px 24px; text-decoration: none; color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 24px rgba(0,0,0,.04);
  transition: border-color .15s ease, transform .05s ease;
}
.hub-card:hover { border-color: var(--accent); }
.hub-card:active { transform: scale(.99); }
.hub-card h2 { margin: 0 0 4px; font-size: 19px; }
.hub-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---- back link + saved note ---- */
.back { display: inline-block; margin-bottom: 14px; color: var(--muted);
        text-decoration: none; font-size: 15px; font-weight: 600; }
.back:hover { color: var(--ink); }
.saved { width: 100%; margin: 0 0 16px; padding: 11px 14px; font-size: 14px;
         color: #1f6d4e; background: #e7f4ec; border: 1px solid #bfe3cd; border-radius: 12px; }

/* ---- remaining count (game) ---- */
.remaining { margin: -18px 0 22px; font-size: 13px; color: var(--muted); }

/* ---- service toggle (profile) ---- */
.service-toggle { display: flex; gap: 10px; width: 100%; margin-bottom: 4px; }
.service-toggle label {
  flex: 1; text-align: center; padding: 12px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--line); color: var(--muted); font-size: 15px; font-weight: 600;
}
.service-toggle label.on { border-color: var(--accent); color: var(--accent); }
.service-toggle input { display: none; }

/* ---- playlist search + results ---- */
.search { width: 100%; display: flex; gap: 10px; margin-bottom: 8px; }
.search .field { flex: 1; margin: 0; }
.search .primary { padding: 15px 18px; }

.results { width: 100%; margin-top: 12px; }
.list-card { margin-top: 16px; }
.result {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  width: 100%;
  border-top: 1px solid var(--line);
}
.result:first-of-type { border-top: none; }
.track { flex: 1; display: flex; flex-direction: column; text-align: left; min-width: 0; }
.t-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.t-artist { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.add {
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}
.open {
  padding: 9px 14px; border-radius: 999px; background: var(--accent); color: #fff;
  text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.del {
  width: 30px; height: 30px; border: none; background: transparent;
  color: var(--muted); font-size: 20px; cursor: pointer;
}
.del:hover { color: var(--no); }

/* ---- playlist: cover, play button, adder ---- */
.cover {
  width: 46px; height: 46px; border-radius: 10px; object-fit: cover;
  flex: none; background: var(--line);
}
.play-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; flex: none;
}
.play-btn:active { filter: brightness(.95); }
.tri-sm {
  width: 0; height: 0; margin-left: 3px;
  border-left: 12px solid #fff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.adder {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex: none;
  background: var(--accent) center/cover no-repeat;
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
}

.list-card .t-title { cursor: pointer; }

/* ---- game: topbar, players, streak flame, kasse button ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; }
.topbar .back { margin-bottom: 0; }
.players { display: flex; justify-content: center; margin-bottom: 14px; }
.player-av {
  width: 56px; height: 56px; border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--accent) center/cover no-repeat; color: var(--accent-ink);
  display: grid; place-items: center; font-size: 20px; font-weight: 600;
}
.player-av:not(:first-child) { margin-left: -16px; }
.streak-flame { position: relative; width: 48px; height: 48px; margin: 0 auto 12px; }
.streak-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding-top: 8px; color: #fff; font-size: 14px; font-weight: 700;
}
.kasse-btn {
  display: inline-block;
  margin: 20px auto 20px;
  padding: 8px 16px;

  border-radius: 999px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.kasse-btn:hover { border-color: var(--accent); }
/* ---- kasse page ---- */
.kasse-total { font-size: 40px; font-weight: 700; margin: 4px 0 24px; }
.kasse-list { width: 100%; }
.kasse-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--line);
}
.kasse-row:first-child { border-top: none; }
.kasse-name { flex: 1; text-align: left; font-weight: 600; }
.kasse-amount { font-weight: 600; }

.players-big {
    margin-top: 0px;
    margin-bottom: 0px;
}

.players-big .player-av {
    width: 130px;
    height: 130px;
    font-size: 30px;
}

.players-big .player-av:not(:first-child) {
    margin-left: -26px;
}
.game-card {
  position: relative;
  overflow: visible;
}

.game-notification-avatar {
  position: absolute;
  top: -15px;
  right: -15px;

  width: 42px;
  height: 42px;

  border-radius: 50%;

  background-color: var(--accent);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  border: 4px solid var(--bg);

  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.game-notification-initial {
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 700;
}
.kasse-emojis {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;

  margin: -6px 0 22px;

  font-size: 30px;
  line-height: 1;
}

.invite-list {
  width: 100%;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
}

.invite-code {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
}