/* ============ Leonie Dashboard – Farbthemen ============ */
/* Theme 1 (Standard): Schwarz · Burgund · Gold */
:root {
    --bg:        #0a0a0b;
    --bg-2:      #121013;
    --card:      #17131600;
    --card-bg:   #1a1518;
    --card-bg2:  #130e11;
    --card-line: #2a2024;
    --burgundy:  #611526;
    --burgundy-2:#7e1f31;
    --wine:      #400c18;
    --gold:      #b8912f;
    --gold-soft: #d8b85a;
    --gold-deep: #7c5f18;
    --gold-grad: linear-gradient(150deg, #e2c877 0%, #c39a34 42%, #916d1c 100%);
    --text:      #f4efe9;
    --muted:     #a1969a;
    --green:     #4caf7d;
    --red:       #e0637a;
    --radius:    18px;
    --shadow:    0 8px 30px rgba(0,0,0,.45);
    --tap:       44px;

    /* Semantische Flaechen/Akzente (fuer die Themen) */
    --glow-1:      rgba(109,26,44,.35);
    --glow-2:      rgba(74,15,28,.35);
    --bar-bg:      rgba(10,10,11,.7);
    --panel-1:     #1c161a;
    --panel-2:     #100b0e;
    --item-bg:     #171114;
    --accent-ink:  #2a2008;
    --accent-line: rgba(216,184,90,.4);
    --pill-bg:     rgba(10,10,11,.55);
    --skeleton-1:  #201a1e;
    --skeleton-2:  #2a2226;
    --poster-bg:   #241c20;
    --input-bg:    #120d10;
    --dot-neutral: #3a3035;
    --overlay:     rgba(6,5,6,.55);
}

/* Theme 2: Schwarz · Dunkles Navy · Cream */
[data-theme="navy"] {
    --bg:        #0a0a0b;
    --bg-2:      #0f1118;
    --card-bg:   #14161d;
    --card-bg2:  #0e1015;
    --card-line: #232833;
    --burgundy:  #1b3a5c;
    --burgundy-2:#244a72;
    --wine:      #132840;
    --gold:      #cdba8c;
    --gold-soft: #e4d8b7;
    --gold-deep: #8a7a52;
    --gold-grad: linear-gradient(150deg, #e6dcbf 0%, #cdba8c 45%, #a4936a 100%);
    --text:      #eef1f6;
    --muted:     #8d96a6;
    --green:     #4caf7d;
    --red:       #e0637a;
    --shadow:    0 8px 30px rgba(0,0,0,.45);

    --glow-1:      rgba(27,58,92,.38);
    --glow-2:      rgba(19,40,64,.32);
    --bar-bg:      rgba(10,10,11,.7);
    --panel-1:     #161a22;
    --panel-2:     #0c0e13;
    --item-bg:     #141821;
    --accent-ink:  #282210;
    --accent-line: rgba(205,186,140,.4);
    --pill-bg:     rgba(10,10,11,.55);
    --skeleton-1:  #1a1e27;
    --skeleton-2:  #232833;
    --poster-bg:   #1c2129;
    --input-bg:    #0e1116;
    --dot-neutral: #343b45;
    --overlay:     rgba(5,7,10,.55);
}

/* Theme 3: Schwarz · Blush · Mauve */
[data-theme="blush"] {
    --bg:        #0c0a0c;
    --bg-2:      #141016;
    --card-bg:   #191419;
    --card-bg2:  #120d13;
    --card-line: #2b2430;
    --burgundy:  #7d4a5a;
    --burgundy-2:#a56576;
    --wine:      #5a2f3d;
    --gold:      #c7c9ce;
    --gold-soft: #e2e4e8;
    --gold-deep: #83868c;
    --gold-grad: linear-gradient(150deg, #e8eaee 0%, #c7c9ce 45%, #9a9da3 100%);
    --text:      #f2eaf0;
    --muted:     #a396a1;
    --green:     #6db59a;
    --red:       #d98099;
    --shadow:    0 8px 30px rgba(0,0,0,.5);

    --glow-1:      rgba(190,120,140,.14);
    --glow-2:      rgba(150,120,160,.12);
    --bar-bg:      rgba(12,10,12,.7);
    --panel-1:     #1d1720;
    --panel-2:     #120d14;
    --item-bg:     #181319;
    --accent-ink:  #202226;
    --accent-line: rgba(199,201,206,.4);
    --pill-bg:     rgba(12,10,12,.5);
    --skeleton-1:  #221b26;
    --skeleton-2:  #2c2431;
    --poster-bg:   #241d28;
    --input-bg:    #140f16;
    --dot-neutral: #3a333c;
    --overlay:     rgba(8,5,9,.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(1200px 600px at 100% -10%, var(--glow-1), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, var(--glow-2), transparent 60%),
        var(--bg);
    color: var(--text);
    min-height: 100dvh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

a { color: var(--gold); text-decoration: none; }

/* ---------- Topbar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    background: var(--bar-bg);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--card-line);
}
.brand {
    display: flex; align-items: center; gap: 11px;
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600; letter-spacing: .6px; font-size: 1.28rem;
    color: var(--text);
}
.brand__mark {
    display: grid; place-items: center;
    width: 32px; height: 32px; border-radius: 10px;
    background: linear-gradient(150deg, var(--burgundy-2), var(--wine));
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700; font-size: 1.12rem;
    color: var(--gold-soft);
    text-shadow: 0 1px 1px rgba(0,0,0,.5);
    box-shadow: inset 0 0 0 1px var(--accent-line),
                inset 0 1px 0 var(--accent-line),
                0 2px 8px rgba(0,0,0,.25);
}
.topbar__lead { display: flex; align-items: center; gap: 12px; }
.topbar__actions { display: flex; align-items: center; gap: 14px; }
.logout {
    display: grid; place-items: center;
    width: var(--tap); height: 36px; min-width: 36px;
    border-radius: 10px; color: var(--gold); font-size: 1.1rem;
    border: 1px solid var(--card-line);
}

/* ---------- Burger ---------- */
.burger {
    display: grid; align-content: center; gap: 5px;
    width: 40px; height: 38px; padding: 0 9px;
    border-radius: 10px; cursor: pointer;
    border: 1px solid var(--card-line); background: var(--card-bg);
}
.burger span {
    display: block; height: 2px; border-radius: 2px;
    background: var(--gold-soft); transition: transform .2s, opacity .2s;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Design/Theme-Menü (Pinsel) ---------- */
.theme { position: relative; }
.iconbtn {
    display: grid; place-items: center;
    width: 40px; height: 38px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--card-line); background: var(--card-bg);
    color: var(--gold); font-size: 1.05rem;
}
.theme__menu {
    position: absolute; right: 0; top: 46px; z-index: 45;
    width: 230px; padding: 8px;
    background: var(--panel-1); border: 1px solid var(--card-line);
    border-radius: 14px; box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 6px;
    animation: slideDown .18s ease;
}
.theme__menu[hidden] { display: none; }
@keyframes slideDown { from { transform: translateY(-8px); opacity: .4; } }
.theme__row, .swatch {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--card-line); background: var(--item-bg);
    color: var(--text); font-size: .9rem; font-weight: 600; text-align: left;
}
.theme__row .acc__chev { margin-left: auto; color: var(--gold-soft); }
.theme__opts { display: flex; flex-direction: column; gap: 6px; }
.theme__opts[hidden] { display: none; }
.sw { width: 28px; height: 18px; border-radius: 5px; flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.15); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.sw--wine  { background: linear-gradient(120deg, #0a0a0b 0 38%, #611526 38% 68%, #c39a34 68%); }
.sw--navy  { background: linear-gradient(120deg, #0a0a0b 0 38%, #1b3a5c 38% 68%, #cdba8c 68%); }
.sw--blush { background: linear-gradient(120deg, #0c0a0c 0 38%, #a56576 38% 68%, #c7c9ce 68%); }
.swatch.is-sel { border-color: var(--gold); }
.swatch.is-sel::after { content: "✓"; margin-left: auto; color: var(--gold); font-weight: 800; }

/* ---------- Drawer (Kategorien) ---------- */
.drawer {
    position: fixed; inset: 0; z-index: 40;
    background: var(--overlay);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.drawer[hidden] { display: none; }
.drawer__panel {
    position: absolute; top: 0; left: 0; bottom: 0;
    width: min(78vw, 300px);
    background: linear-gradient(180deg, var(--panel-1), var(--panel-2));
    border-right: 1px solid var(--card-line);
    box-shadow: var(--shadow);
    padding: calc(18px + env(safe-area-inset-top)) 16px 18px;
    display: flex; flex-direction: column; gap: 8px;
    animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(-24px); opacity: .4; } }
.drawer__title {
    font-family: "Playfair Display", Georgia, serif;
    color: var(--gold-soft); font-size: .82rem; letter-spacing: .5px;
    text-transform: uppercase; margin: 2px 4px 8px;
}
.cat {
    text-align: left; cursor: pointer;
    padding: 14px 16px; border-radius: 12px;
    border: 1px solid var(--card-line); background: var(--item-bg);
    color: var(--text); font-size: 1rem; font-weight: 600;
    transition: .16s;
}
.cat:active { transform: scale(.98); }
.cat.is-active {
    color: var(--accent-ink); border-color: transparent;
    background: var(--gold-grad);
    box-shadow: 0 4px 14px var(--accent-line), inset 0 1px 0 rgba(255,255,255,.3);
}

/* ---------- Tabs (mobile horizontal scroll) ---------- */
.tabs {
    position: sticky; top: 57px; z-index: 15;
    display: flex; gap: 8px; overflow-x: auto;
    padding: 12px 14px;
    background: var(--bar-bg);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    flex: 0 0 auto;
    padding: 9px 15px; min-height: 38px;
    border-radius: 999px;
    border: 1px solid var(--card-line);
    background: var(--card-bg);
    color: var(--muted); font-size: .9rem; font-weight: 600;
    cursor: pointer; transition: .18s;
}
.tab.is-active {
    color: var(--accent-ink); border-color: transparent; font-weight: 700;
    background: var(--gold-grad);
    box-shadow: 0 4px 14px var(--accent-line),
                inset 0 1px 0 rgba(255,255,255,.35);
    text-shadow: 0 1px 0 rgba(255,255,255,.2);
}

/* ---------- Grid ---------- */
.grid {
    display: grid; grid-template-columns: 1fr; gap: 16px;
    padding: 16px 14px 90px;
    max-width: 1200px; margin: 0 auto;
}
.grid.is-filtered .card { display: none; }
.grid.is-filtered .card.is-shown { display: flex; }

/* ---------- Card ---------- */
.card {
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, var(--card-bg), var(--card-bg2));
    border: 1px solid var(--card-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden; position: relative;
}
.card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}
.card__head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 15px 16px 12px;
    border-bottom: 1px solid var(--card-line);
}
.card__head h2 {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.16rem; font-weight: 600; letter-spacing: .3px;
}
.card__head h2::after {
    content: ""; display: block; height: 2px; width: 38px; margin-top: 7px;
    background: var(--gold-grad); border-radius: 2px;
    box-shadow: 0 1px 3px var(--accent-line);
}
.meta { color: var(--muted); font-size: .72rem; text-align: right; }
.card__body { padding: 8px 14px 16px; }

/* ---------- Skeleton / states ---------- */
.skeleton {
    height: 120px; border-radius: 12px;
    background: linear-gradient(100deg, var(--skeleton-1) 30%, var(--skeleton-2) 50%, var(--skeleton-1) 70%);
    background-size: 200% 100%; animation: sh 1.2s infinite;
}
@keyframes sh { to { background-position: -200% 0; } }
.hint {
    padding: 18px 14px; color: var(--muted); font-size: .9rem;
    border: 1px dashed var(--card-line); border-radius: 12px; text-align: center;
}
.hint strong { color: var(--gold-soft); }

/* ---------- Genre-Gruppen (Bücher) ---------- */
.bookgroup + .bookgroup { margin-top: 12px; }
.subhead {
    display: flex; align-items: center; gap: 10px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: .98rem; font-weight: 600; letter-spacing: .3px;
    color: var(--gold-soft); margin: 4px 2px 2px;
}
.subhead::after {
    content: ""; flex: 1; height: 1px;
    background: linear-gradient(90deg, var(--accent-line), transparent);
}

/* ---------- Genre-Akkordeon (Bücher & Filme) ---------- */
.acc { display: flex; flex-direction: column; gap: 8px; }
.acc__item {
    border: 1px solid var(--card-line); border-radius: 14px;
    background: var(--item-bg); overflow: hidden;
}
.acc__head {
    width: 100%; cursor: pointer; text-align: left;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 15px; background: none; border: 0;
    color: var(--text);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1rem; font-weight: 600; letter-spacing: .3px;
}
.acc__genre { flex: 1; }
.acc__count {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: .7rem; font-weight: 800; color: var(--gold);
    padding: 1px 8px; border-radius: 999px;
    border: 1px solid var(--accent-line); background: var(--pill-bg);
}
.acc__chev { color: var(--gold-soft); transition: transform .2s; font-size: 1.1rem; }
.acc__head[aria-expanded="true"] { color: var(--gold-soft); }
.acc__head[aria-expanded="true"] .acc__chev { transform: rotate(180deg); }
.acc__body { padding: 0 12px 8px; }
.acc__body[hidden] { display: none; }
.subhead--up { margin-top: 18px; }

/* ---------- Fußball (Vereine im Akkordeon) ---------- */
.cl-clubs { gap: 6px; margin-top: 4px; }
.cl-club { gap: 10px; padding: 11px 13px; border-left: 3px solid transparent; }
.cl-club.q-top  { border-left-color: var(--green); }
.cl-club.q-play { border-left-color: var(--gold); }
.cl-club .acc__genre {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: .92rem; font-weight: 600;
}
.cl-pos {
    min-width: 22px; text-align: center;
    color: var(--gold); font-weight: 800; font-size: .82rem;
}
.cl-crest { width: 20px; height: 20px; object-fit: contain; flex: 0 0 auto; }
.cl-club .acc__count { color: var(--gold-soft); }

.cl-action {
    display: block; padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--card-line); background: var(--item-bg);
    color: var(--text); font-weight: 600; font-size: .92rem;
}

/* ---------- Spieler-Liste ---------- */
.players { list-style: none; display: flex; flex-direction: column; }
.player {
    display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px;
    padding: 9px 4px; border-top: 1px solid var(--card-line);
}
.player:first-child { border-top: 0; }
.player__num {
    text-align: center; font-weight: 800; font-size: .8rem; color: var(--gold);
    font-variant-numeric: tabular-nums;
}
.player__name { font-size: .9rem; font-weight: 600; }
.player__pos { color: var(--muted); font-size: .74rem; }

/* ---------- Bücher & Filme (Poster-Reihe) ---------- */
.rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: 42%;
    gap: 12px; overflow-x: auto; padding: 6px 2px 10px;
    scroll-snap-type: x mandatory; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.poster {
    scroll-snap-align: start;
    display: flex; flex-direction: column; gap: 6px;
}
.poster__img {
    aspect-ratio: 2/3; width: 100%; border-radius: 12px; object-fit: cover;
    background: var(--poster-bg); border: 1px solid var(--card-line);
}
.poster__rank {
    position: absolute; margin: 6px; padding: 1px 8px;
    background: var(--pill-bg); color: var(--gold);
    border-radius: 999px; font-size: .72rem; font-weight: 800;
    border: 1px solid var(--accent-line);
}
.poster__t { font-size: .82rem; font-weight: 600; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poster__s { font-size: .72rem; color: var(--muted); }
.badge-star { color: var(--gold); }

/* ---------- Champions League Tabelle ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.table th, .table td { padding: 8px 6px; text-align: center; }
.table th { color: var(--muted); font-weight: 600; font-size: .7rem; text-transform: uppercase; letter-spacing: .4px; }
.table td:nth-child(2), .table th:nth-child(2) { text-align: left; }
.table tbody tr { border-top: 1px solid var(--card-line); }
.table .pos { color: var(--gold); font-weight: 800; width: 26px; }
.table .club { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.table .club img { width: 18px; height: 18px; object-fit: contain; }
.table .pts { color: var(--gold-soft); font-weight: 800; }
.table tr.q-top td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.table tr.q-play td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

/* ---------- Aktien ---------- */
.stocks { display: flex; flex-direction: column; gap: 2px; }
.stock {
    display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
    padding: 11px 6px; border-top: 1px solid var(--card-line);
}
.stock:first-child { border-top: 0; }
.stock__sym { font-weight: 700; }
.stock__name { color: var(--muted); font-size: .72rem;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: 40vw; }
.stock__price { font-variant-numeric: tabular-nums; font-weight: 600; }
.chg { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .82rem;
    padding: 3px 8px; border-radius: 999px; min-width: 62px; text-align: center; }
.chg--up { color: var(--green); background: rgba(76,175,125,.12); }
.chg--dn { color: var(--red);   background: rgba(224,99,122,.12); }

/* ---------- Notizen ---------- */
.btn-add {
    width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--accent-line); color: var(--gold);
    background: var(--item-bg);
    font-size: 1.3rem; line-height: 1; display: grid; place-items: center;
}
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.note {
    text-align: left; cursor: pointer; color: var(--text);
    border: 1px solid var(--card-line); border-radius: 14px;
    background: var(--item-bg); padding: 12px; min-height: 92px;
    display: flex; flex-direction: column; gap: 6px; position: relative;
    transition: transform .12s, border-color .12s;
}
.note:active { transform: scale(.98); }
.note--red  { border-color: rgba(143,35,56,.65); background: linear-gradient(180deg, rgba(109,26,44,.35), var(--item-bg)); }
.note--gold { border-color: rgba(212,175,55,.5);  background: linear-gradient(180deg, rgba(212,175,55,.12), var(--item-bg)); }
.note__t { font-weight: 700; font-size: .9rem;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.note__b { color: var(--muted); font-size: .8rem;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.note__pin { position: absolute; top: 8px; right: 10px; font-size: .8rem; }
.notes-empty { grid-column: 1 / -1; }

/* ---------- Editor Overlay ---------- */
.editor {
    position: fixed; inset: 0; z-index: 50;
    background: var(--overlay); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: flex-end;
}
.editor[hidden] { display: none; }
.editor__panel {
    width: 100%; max-width: 640px; margin: 0 auto;
    background: linear-gradient(180deg, var(--panel-1), var(--panel-2));
    border: 1px solid var(--card-line); border-bottom: 0;
    border-radius: 20px 20px 0 0; box-shadow: var(--shadow);
    padding: 12px 16px calc(18px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; gap: 10px;
    max-height: 88dvh; animation: slideUp .22s ease;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: .6; } }
.editor__bar { display: flex; align-items: center; justify-content: space-between; }
.editor__back { background: none; border: 0; color: var(--gold); font-size: .95rem; cursor: pointer; padding: 8px 4px; }
.editor__tools { display: flex; align-items: center; gap: 10px; }
.dot { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; background: var(--dot-neutral); }
.dot--red { background: var(--burgundy-2); }
.dot--gold { background: var(--gold); }
.dot.is-sel { border-color: var(--text); }
.editor__pin, .editor__del {
    background: none; border: 0; cursor: pointer; font-size: 1.1rem; padding: 6px; border-radius: 8px;
}
.editor__pin[aria-pressed="true"] { filter: none; }
.editor__pin { filter: grayscale(1) opacity(.6); }
.editor__title {
    background: none; border: 0; outline: none; color: var(--text);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.35rem; font-weight: 600; padding: 4px 2px;
}
.editor__body {
    background: none; border: 0; outline: none; color: var(--text);
    font-size: 1rem; line-height: 1.6; resize: none; min-height: 40dvh; padding: 2px;
    font-family: inherit;
}
.editor__title::placeholder, .editor__body::placeholder { color: var(--muted); }

/* ---------- Spiele ---------- */
.games-grid { display: flex; flex-direction: column; gap: 10px; }
.gtile {
    position: relative; text-align: left; cursor: pointer;
    display: flex; flex-direction: column; gap: 4px;
    padding: 15px 16px; border-radius: 14px;
    border: 1px solid var(--card-line); background: var(--item-bg); color: var(--text);
}
.gtile:hover { border-color: var(--accent-line); }
.gtile__title { font-family: "Playfair Display", Georgia, serif; font-weight: 600; font-size: 1.12rem; }
.gtile__desc { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.gtile__go { color: var(--gold); font-size: .82rem; font-weight: 600; margin-top: 2px; }
.gtile__badge {
    position: absolute; top: 13px; right: 13px;
    font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--muted); background: var(--pill-bg); border: 1px solid var(--card-line);
    padding: 3px 8px; border-radius: 999px;
}
.gtile.is-soon { cursor: default; opacity: .72; }
.gtile.is-soon:hover { border-color: var(--card-line); }

/* Spiel-Overlay */
.game {
    position: fixed; inset: 0; z-index: 60;
    background: var(--overlay); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: stretch; justify-content: center;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.game[hidden] { display: none; }
body.game-open { overflow: hidden; }
.game__panel {
    width: 100%; max-width: 560px;
    background: linear-gradient(180deg, var(--panel-1), var(--panel-2));
    border-left: 1px solid var(--card-line); border-right: 1px solid var(--card-line);
    box-shadow: var(--shadow);
    padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; gap: 12px;
    overflow-y: auto;
}
.game__bar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; padding-top: 4px; }
.game__back { background: none; border: 0; color: var(--gold); font-size: .95rem; cursor: pointer; padding: 8px 4px; }
.game__hud { display: flex; align-items: center; gap: 12px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.game__hud[hidden] { display: none; }
.game__time {
    min-width: 34px; text-align: center; color: var(--text);
    background: var(--pill-bg); border: 1px solid var(--card-line); border-radius: 999px; padding: 3px 8px;
}
.game__time.is-low { color: var(--red); border-color: var(--red); }
.game__score { color: var(--gold); }
.game__stage { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.game__prompt { font-size: 1.05rem; color: var(--muted); }
.game__prompt strong { font-family: "Playfair Display", Georgia, serif; font-size: 1.5rem; color: var(--text); }
.draw-wrap { width: 100%; display: flex; justify-content: center; }
#draw-canvas {
    width: 100%; max-width: 360px; aspect-ratio: 1 / 1;
    background: #fff; border-radius: 16px; border: 1px solid var(--card-line);
    touch-action: none; cursor: crosshair; box-shadow: var(--shadow);
}
.draw-guess { font-size: .9rem; color: var(--muted); min-height: 1.2em; }
.draw-guess.is-hit { color: var(--green); font-weight: 700; }
.palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pcol {
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
    border: 2px solid var(--card-line); padding: 0;
}
.pcol.is-sel { border-color: var(--gold); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }
.draw-actions { display: flex; gap: 10px; justify-content: center; margin-top: 4px; }
.btn-ghost {
    padding: 10px 16px; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--card-line); background: var(--item-bg); color: var(--text);
    font-size: .9rem; font-weight: 600;
}
.btn-primary {
    padding: 11px 20px; border-radius: 12px; border: 0; cursor: pointer;
    background: var(--gold-grad); color: var(--accent-ink); font-weight: 700; font-size: .95rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

.game__load { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 20px; text-align: center; color: var(--muted); }
.game__hint { font-size: .8rem; color: var(--muted); }
.spinner {
    width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid var(--card-line); border-top-color: var(--gold); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.game__result { width: 100%; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.game__result h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 600; font-size: 1.6rem; }
.game__final { color: var(--gold); font-weight: 700; }
.rev-grid { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.rev { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rev img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--card-line); background: #fff; }
.rev__word { font-size: .78rem; color: var(--muted); }
.rev__mark { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff; }
.rev__mark.ok { background: var(--green); }
.rev__mark.no { background: var(--red); }

/* Spiel-Startkarte */
.game-start { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.game-start__desc { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.game-start__desc strong { color: var(--text); }

/* Fußball: Level-Übersicht */
.fb-levels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.fb-level {
    display: flex; align-items: center; gap: 10px; cursor: pointer; text-align: left;
    padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--card-line); background: var(--item-bg); color: var(--text);
}
.fb-level:hover { border-color: var(--accent-line); }
.fb-level__no {
    display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto;
    border-radius: 8px; background: var(--gold-grad); color: var(--accent-ink); font-weight: 800;
}
.fb-level__name { flex: 1; font-weight: 600; font-size: .9rem; }
.fb-level__tag { font-size: .74rem; color: var(--gold); font-weight: 600; }
.fb-level.is-locked { opacity: .55; cursor: default; }
.fb-level.is-locked .fb-level__no { background: var(--dot-neutral); color: var(--muted); }
.fb-level.is-locked .fb-level__tag { color: var(--muted); }

/* Fußball: Spielfeld */
.fb { width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.fb__top { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: .82rem; }
.fb__lv { font-weight: 700; color: var(--text); }
.fb__stat { color: var(--muted); font-weight: 600; }
.fb__wrap { position: relative; width: 100%; display: flex; justify-content: center; }
#fb-canvas {
    width: 100%; max-width: 360px; aspect-ratio: 360 / 440;
    border-radius: 16px; border: 1px solid var(--card-line); box-shadow: var(--shadow);
    touch-action: none; user-select: none; -webkit-user-select: none;
    -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.fb__msg {
    position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%) scale(.9);
    font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.9rem;
    color: #fff; text-shadow: 0 3px 12px rgba(0,0,0,.5); opacity: 0; pointer-events: none;
}
.fb__msg.is-show { opacity: 1; transform: translate(-50%, -50%) scale(1); transition: all .18s ease; }
.fb__msg.is-goal { color: #ffe27a; }
.fb__msg.is-save { color: #ff9aa8; }
.fb__controls { width: 100%; max-width: 360px; display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; }
.fb-btn {
    padding: 16px 0; border-radius: 14px; cursor: pointer;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    border: 1px solid var(--card-line); background: var(--item-bg); color: var(--text);
    font-size: 1.15rem; font-weight: 700;
}
.fb-btn:active { transform: translateY(1px); }
.fb-btn--shoot { background: var(--gold-grad); color: var(--accent-ink); border: 0; font-size: 1rem; }

/* ---------- Fliegen (Rakete) ---------- */
.fly { width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: center;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.fly__wrap { position: relative; width: 100%; display: flex; justify-content: center; }
#fly-canvas {
    width: 100%; max-width: 360px; aspect-ratio: 360 / 560;
    border-radius: 16px; border: 1px solid var(--card-line); box-shadow: var(--shadow);
    touch-action: none; user-select: none; -webkit-user-select: none;
    -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.fly__controls { width: 100%; max-width: 360px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Fußball: Kopfzeile mit Trophäen-/Flaggen-Buttons */
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.fb-head__goals { font-size: .82rem; font-weight: 700; color: var(--gold); }
.fb-head__btns { display: flex; gap: 8px; }
.fb-hbtn {
    display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
    padding: 8px 12px; border-radius: 12px; font-size: .95rem; font-weight: 700;
    border: 1px solid var(--card-line); background: var(--item-bg); color: var(--text);
}
.fb-hbtn:hover { border-color: var(--accent-line); }
.fb-hbtn__c {
    font-size: .74rem; font-weight: 800; color: var(--accent-ink);
    background: var(--gold-grad); border-radius: 999px; padding: 1px 7px;
}

/* Fußball: Panels (Trophäen / Flagge) */
.fb-panel { width: 100%; display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.fb-panel__title { font-family: "Playfair Display", Georgia, serif; font-weight: 600; font-size: 1.4rem; text-align: center; }
.fb-tr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fb-tr {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
    padding: 14px 10px; border-radius: 14px;
    border: 1px solid var(--card-line); background: var(--item-bg); opacity: .5;
}
.fb-tr.is-on { opacity: 1; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.fb-tr__icon { font-size: 1.9rem; line-height: 1; }
.fb-tr__cup { line-height: 0; }
.fb-tr__cup .fb-cup { width: 50px; height: 58px; display: block; }
.fb-tr__name { font-weight: 700; font-size: .88rem; }
.fb-tr__desc { font-size: .74rem; color: var(--muted); line-height: 1.35; }
.fb-tr__prog { font-size: .74rem; font-weight: 800; color: var(--text); margin-top: 2px; }
.fb-tr__prog.is-done { color: var(--gold); }
.fb-wm { font-size: 3.4rem; line-height: 1; animation: fb-pop .5s ease; }
@keyframes fb-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.fb-cup { display: block; }

/* Fußball: große Pokal-Feier mit Feuerwerk */
.fb-celebrate {
    position: fixed; inset: 0; z-index: 70; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    background: rgba(6,5,8,.55); opacity: 0; transition: opacity .3s ease;
}
.fb-celebrate.is-in { opacity: 1; }
.fb-celebrate__fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.fb-celebrate__cup { position: relative; z-index: 1; animation: fb-cup-pop .6s cubic-bezier(.2,1.3,.4,1); }
.fb-celebrate__cup .fb-cup { width: 148px; height: 168px; filter: drop-shadow(0 10px 26px rgba(0,0,0,.55)); }
.fb-celebrate__txt {
    position: relative; z-index: 1; font-family: "Playfair Display", Georgia, serif;
    font-weight: 700; font-size: 1.7rem; color: #fff; text-align: center; padding: 0 20px;
    text-shadow: 0 3px 14px rgba(0,0,0,.65);
}
@keyframes fb-cup-pop { from { transform: scale(.2) rotate(-12deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }

/* Fußball: Trophäen-Toast */
.fb-toast {
    position: absolute; left: 50%; top: 14px; transform: translate(-50%, -14px);
    display: flex; align-items: center; gap: 10px; z-index: 30;
    padding: 10px 14px; border-radius: 14px; max-width: 90%;
    background: rgba(20,16,24,.96); border: 1px solid var(--gold);
    box-shadow: 0 8px 26px rgba(0,0,0,.45); opacity: 0; transition: all .3s ease; pointer-events: none;
}
.fb-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.fb-toast__icon { font-size: 1.6rem; }
.fb-toast__txt { display: flex; flex-direction: column; font-size: .88rem; font-weight: 700; color: var(--text); }
.fb-toast__txt strong { font-size: .72rem; font-weight: 700; color: var(--gold); }

/* Fußball: Flaggen-Designer */
.fl-wrap { display: flex; justify-content: center; }
#fl-canvas {
    width: 100%; max-width: 300px; aspect-ratio: 3 / 2; touch-action: none; background: #fff;
    border-radius: 12px; border: 1px solid var(--card-line); box-shadow: var(--shadow);
}
.fl-cols { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.fl-col { width: 30px; height: 30px; border-radius: 8px; cursor: pointer; border: 2px solid var(--card-line); padding: 0; }
.fl-col.is-sel { border-color: var(--gold); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }

/* Fußball: Duell-Intro */
.fb-vs { width: 100%; display: flex; justify-content: center; position: relative; }
#fb-vs-canvas, #fb-parade-canvas {
    width: 100%; max-width: 360px; aspect-ratio: 360 / 440;
    border-radius: 16px; border: 1px solid var(--card-line); box-shadow: var(--shadow);
}
.fb-skip {
    position: absolute; right: 12px; bottom: 12px; z-index: 2;
    border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.42); color: #f6f0e2;
    font: 700 .78rem/1 -apple-system, Arial, sans-serif; padding: 8px 12px;
    border-radius: 999px; cursor: pointer; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.fb-skip:active { transform: scale(.96); }

/* ---------- World-Cup-Button ---------- */
.fb-wc-btn {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    margin: 10px 0 4px; padding: 12px 14px; cursor: pointer;
    border-radius: 16px; border: 1px solid var(--gold);
    background: linear-gradient(135deg, rgba(201,155,46,.18), rgba(122,20,32,.20));
    color: var(--text);
}
.fb-wc-btn:active { transform: scale(.99); }
.fb-wc-btn__ico { font-size: 1.9rem; line-height: 1; }
.fb-wc-btn__txt { display: flex; flex-direction: column; gap: 2px; font-size: .74rem; color: var(--muted); }
.fb-wc-btn__txt strong { font-size: .98rem; font-weight: 800; color: var(--gold); }

/* ---------- World-Cup: Game Over ---------- */
.fb-gameover { font-size: 3.4rem; line-height: 1; margin: 6px 0 2px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }

/* ---------- World-Cup: Siegerehrung ---------- */
.fb-ceremony-cup { display: flex; justify-content: center; margin: 6px 0 4px; }
.fb-ceremony-cup .fb-cup { width: 120px; height: 138px; filter: drop-shadow(0 8px 20px rgba(0,0,0,.5)); }
.fb-lb { display: flex; flex-direction: column; gap: 6px; margin: 12px auto; max-width: 320px; }
.fb-lb__row {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    border-radius: 12px; border: 1px solid var(--card-line); background: var(--card);
}
.fb-lb__row.is-you { border-color: var(--gold); background: linear-gradient(135deg, rgba(201,155,46,.16), transparent); }
.fb-lb__pos { min-width: 26px; font-size: 1.05rem; font-weight: 800; text-align: center; }
.fb-lb__name { flex: 1; font-size: .88rem; font-weight: 700; color: var(--text); }
.fb-lb__saves { font-size: .74rem; color: var(--muted); }

@media (min-width: 720px) {
    .game { align-items: center; padding: 20px; }
    .game__panel { border-radius: 20px; border: 1px solid var(--card-line); max-height: 92dvh; }
    .games-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
    .fb-levels { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Footer ---------- */
.foot { text-align: center; color: var(--muted); font-size: .74rem; padding: 18px 14px 26px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card {
    width: 100%; max-width: 360px; text-align: center;
    background: var(--card-bg); border: 1px solid var(--card-line);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px;
    display: flex; flex-direction: column; gap: 12px;
}
.brand--login { justify-content: center; font-size: 1.6rem; margin-bottom: 4px; }
.login-card h1 { font-family: "Playfair Display", Georgia, serif; font-weight: 600; font-size: 1.25rem; }
.login-card p { color: var(--muted); font-size: .88rem; }
.login-card input {
    padding: 13px 14px; border-radius: 12px; border: 1px solid var(--card-line);
    background: var(--input-bg); color: var(--text); font-size: 1rem; outline: none;
}
.login-card input:focus { border-color: var(--gold); }
.login-card button {
    padding: 13px; border-radius: 12px; border: 0; cursor: pointer;
    background: var(--gold-grad);
    color: var(--accent-ink); font-weight: 700; font-size: 1rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.login-error { color: var(--red); }

/* ---------- Tablet / Desktop ---------- */
@media (min-width: 720px) {
    .grid { grid-template-columns: 1fr 1fr; align-items: start; }
    .rail { grid-auto-columns: 30%; }
    .card--notes { grid-column: 1 / -1; }
    .notes-grid { grid-template-columns: repeat(4, 1fr); }
    .stock__name { max-width: 220px; }
}
@media (min-width: 1040px) {
    .rail { grid-auto-columns: 22%; }
}

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