/* Moderner Look (v2.5.0): liegt ueber style.css. Zum Abschalten die Zeile mit modern.css in lib.php (page_head) entfernen. */
:root {
    --bg: #0c0f13; --panel: #171b22; --panel2: #202632; --line: rgba(255, 255, 255, .08);
    --text: #e8ebf1; --muted: #98a1b3; --accent: #2fb5a3; --accent2: #62dccb;
    --glass: linear-gradient(180deg, rgba(36, 42, 54, .78), rgba(20, 24, 31, .80));
    --glass-line: rgba(255, 255, 255, .075);
    --shadow: 0 10px 28px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .045);
    --radius: 14px;
}
html { color-scheme: dark; scrollbar-color: #39414f #0c0f13; }
body {
    font-family: Inter, "Segoe UI Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background:
        radial-gradient(1100px 520px at 15% -8%, rgba(47, 181, 163, .11), transparent 62%),
        radial-gradient(800px 460px at 100% 0%, rgba(98, 220, 203, .05), transparent 58%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .013) 0 1px, transparent 1px 3px),
        linear-gradient(180deg, #151a21 0%, #0b0d11 100%);
    background-attachment: fixed;
}
h1 { font-size: 1.65rem; letter-spacing: -.01em; }
h2 { letter-spacing: .01em; }
a { transition: color .15s ease; }

/* Kopfzeile: durchscheinend mit Unschaerfe */
.top { background: rgba(14, 17, 22, .72); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--glass-line); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.brand { background: linear-gradient(90deg, #62dccb, #2fb5a3 60%, #8de9dd); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .01em; }
.top nav a { border-radius: 9px; color: #cfd5e1; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.top nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.top nav a.on { background: rgba(47, 181, 163, .16); color: var(--accent2); box-shadow: inset 0 0 0 1px rgba(98, 220, 203, .28); }
.who a { color: var(--text); font-weight: 600; }
.who a:hover { color: var(--accent2); text-decoration: none; }

/* Karten und Kacheln: Glas mit weichem Schatten */
.tile, .panel, .filters, .card, .detail .oracle, .login {
    background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.tile { padding: 1rem 1.1rem; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.tile:hover { transform: translateY(-2px); border-color: rgba(98, 220, 203, .28); box-shadow: 0 14px 30px rgba(0, 0, 0, .42), 0 0 0 1px rgba(98, 220, 203, .08), inset 0 1px 0 rgba(255, 255, 255, .05); }
.tile .v { font-size: clamp(1.35rem, 1.1vw + .95rem, 1.75rem); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.panel { padding: 1.1rem 1.15rem; }
.panel h2 { font-size: 1rem; }
.card { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-3px); border-color: rgba(98, 220, 203, .45); box-shadow: 0 16px 34px rgba(0, 0, 0, .5), 0 0 22px rgba(47, 181, 163, .16); }
.card .img { border-radius: 0; }
.tiles { gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); }
.grid2 { gap: 1.1rem; }

/* Tabellen */
table.list tbody tr, .tbl tbody tr { transition: background .12s ease; }
.tbl tbody tr:hover, table.list tbody tr:hover { background: rgba(255, 255, 255, .03); }
th, td { border-bottom-color: rgba(255, 255, 255, .06); }
th { text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; }

/* Eingabefelder und Knoepfe */
input, select, textarea { background: rgba(10, 13, 18, .6); border: 1px solid rgba(255, 255, 255, .1); border-radius: 9px; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 181, 163, .22); }
button, .btn { background: linear-gradient(180deg, #3cc7b4, #27a291); color: #041a17; border-radius: 9px; box-shadow: 0 4px 14px rgba(47, 181, 163, .25); transition: filter .15s ease, transform .1s ease, box-shadow .15s ease; }
button:hover, .btn:hover { background: linear-gradient(180deg, #4ad6c2, #2fb5a3); filter: brightness(1.04); box-shadow: 0 6px 18px rgba(47, 181, 163, .35); }
button:active { transform: translateY(1px); }
button:disabled { filter: grayscale(.7) brightness(.7); box-shadow: none; cursor: not-allowed; }
button.ghost { background: rgba(255, 255, 255, .06); color: var(--text); box-shadow: none; border: 1px solid rgba(255, 255, 255, .1); }
button.ghost:hover { background: rgba(255, 255, 255, .11); box-shadow: none; }
button.danger { background: rgba(211, 32, 42, .18); color: #ff9a9a; box-shadow: none; border: 1px solid rgba(211, 32, 42, .5); }
button.danger:hover { background: rgba(211, 32, 42, .3); }

/* Kleinteile */
.pill { border-radius: 999px; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
.chip { border-radius: 999px; }
.pager a, .pager span { border-radius: 9px; background: var(--glass); border-color: var(--glass-line); }
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.warn, .ok, .err { border-radius: 10px; }
.subnav { border-radius: var(--radius); }
.badge { box-shadow: 0 0 10px rgba(245, 158, 66, .5); }

/* Login */
.login { padding: 1.9rem; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #0c0f13; }
::-webkit-scrollbar-thumb { background: #2d3441; border-radius: 8px; border: 2px solid #0c0f13; }
::-webkit-scrollbar-thumb:hover { background: #3b4454; }

@media (max-width: 720px) {
    h1 { font-size: 1.4rem; }
    .tile .v { font-size: 1.45rem; }
    .top { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
    .tile:hover, .card:hover { transform: none; }
}

/* Profilfoto (v2.6.0): rund, oder Kreis mit Anfangsbuchstaben */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; vertical-align: middle;
    margin-right: .5rem; color: #fff; font-weight: 600; flex: none; border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.who .avatar { margin-right: .45rem; }
.avatarbox { display: flex; gap: 1.2rem; align-items: center; max-width: 720px; margin-bottom: 1rem; }
.avatarbox .avatar { margin-right: 0; border-width: 2px; border-color: rgba(98, 220, 203, .45); box-shadow: 0 0 0 4px rgba(47, 181, 163, .12), 0 6px 18px rgba(0, 0, 0, .4); }
@media (max-width: 720px) { .avatarbox { flex-direction: column; align-items: flex-start; } }

/* Manakurve als Ringe (v2.7.0) */
.phead { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .6rem; }
.phead h2 { margin: 0; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.seg button, .seg button:hover, .seg button:active { width: auto; padding: .2rem .8rem; font-size: .8rem; background: transparent; box-shadow: none; filter: none; color: var(--muted); border: 0; border-radius: 999px; transform: none; }
.seg button:hover { color: var(--text); }
.seg button.on, .seg button.on:hover { background: rgba(47, 181, 163, .22); color: var(--accent2); box-shadow: inset 0 0 0 1px rgba(98, 220, 203, .35); }
.ringwrap { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; justify-content: center; }
.ringcanvas { position: relative; width: min(100%, 270px); aspect-ratio: 1; flex: none; }
.ringcanvas canvas { max-height: none !important; }
.ringlegend { list-style: none; margin: 0; padding: 0; flex: 1 1 170px; min-width: 170px; }
.ringlegend li { display: grid; grid-template-columns: 12px 1fr auto 3.2rem; align-items: center; gap: .55rem; padding: .28rem 0; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: .88rem; font-variant-numeric: tabular-nums; }
.ringlegend li:last-child { border-bottom: 0; }
.ringlegend .dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.ringlegend .nm { color: var(--muted); }
.ringlegend .pc { text-align: right; color: var(--muted); font-size: .8rem; }

/* Menue mit Aufklappmenues (v2.8.0) */
.top { gap: .6rem 1rem; }
.top nav { display: flex; align-items: center; gap: .2rem; flex: 1; overflow: visible; white-space: nowrap; }
.top nav .navlink, .ddbtn { padding: .42rem .85rem; border-radius: 9px; color: #cfd5e1; font-weight: 500; }
.dd { position: relative; }
.ddbtn { display: inline-flex; align-items: center; gap: .4rem; width: auto; background: transparent; border: 0; box-shadow: none; cursor: pointer; font-size: inherit; }
.ddbtn:hover, .dd.open > .ddbtn { background: rgba(255, 255, 255, .07); color: #fff; box-shadow: none; filter: none; }
.dd.on > .ddbtn { background: rgba(47, 181, 163, .16); color: var(--accent2); box-shadow: inset 0 0 0 1px rgba(98, 220, 203, .28); }
.ddbtn:focus-visible, .navlink:focus-visible, .ddmenu a:focus-visible, .navtoggle:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.car { width: .42rem; height: .42rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .18s ease; opacity: .8; }
.dd.open .car { transform: translateY(1px) rotate(225deg); }
.ddmenu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; padding: .4rem; border-radius: 14px; z-index: 30;
    background: linear-gradient(180deg, #171c25, #11151c);   /* deckend: der Hintergrund darunter (Kopfzeile mit Unschaerfe) blendet sonst nicht sauber */
    border: 1px solid var(--glass-line); box-shadow: 0 20px 44px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05); animation: ddin .15s ease-out; }
.ddmenu.right { left: auto; right: 0; }
.dd.open .ddmenu { display: block; }
html:not(.js) .dd:hover .ddmenu, html:not(.js) .dd:focus-within .ddmenu { display: block; }
.top nav .ddmenu a, .ddmenu a { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding: .5rem .75rem; border-radius: 9px; color: var(--text); white-space: nowrap; transition: background .12s ease; }
.ddmenu a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.ddmenu a.on { background: rgba(47, 181, 163, .16); color: var(--accent2); }
.ddmenu .v { color: var(--muted); }
.ddhead { display: flex; flex-direction: column; padding: .45rem .75rem .55rem; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: .3rem; }
.ddhead small { color: var(--muted); }
.ddsep { height: 1px; background: rgba(255, 255, 255, .08); margin: .35rem .4rem; }
.usermenu .ddbtn { padding: .22rem .65rem .22rem .3rem; }
.usermenu .avatar { margin-right: .1rem; }
.uname { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.top .hsearch { min-width: 190px; }
.navtoggle { display: none; }
@keyframes ddin { from { opacity: 0; transform: translateY(-5px); } }

@media (max-width: 900px) {
    .top { flex-wrap: wrap; }
    .brand { order: 1; }
    .navtoggle { display: inline-flex; order: 3; width: auto; padding: .35rem .75rem; font-size: 1.15rem; line-height: 1; }
    .usermenu { order: 2; margin-left: auto; }
    .top .hsearch { order: 4; flex: 1 0 100%; }
    .top nav { order: 5; flex: 1 0 100%; display: none; flex-direction: column; align-items: stretch; gap: .15rem; overflow: visible; white-space: normal; padding-bottom: .2rem; }
    .top nav.open { display: flex; }
    .top nav .navlink, .top nav .ddbtn { width: 100%; justify-content: space-between; padding: .65rem .8rem; }
    .top nav .ddmenu { position: static; min-width: 0; box-shadow: none; animation: none; background: rgba(255, 255, 255, .035); backdrop-filter: none; margin: .15rem 0 .35rem .8rem; }
    .top nav .ddmenu a { padding: .65rem .8rem; }
    .usermenu .ddmenu { position: absolute; }
}
@media (max-width: 600px) { .uname { display: none; } .usermenu .ddbtn { padding-right: .4rem; } }

/* Systemstatus (v3.0.0) */
.statust td { vertical-align: top; padding: .5rem .5rem; }
.statust .lv { width: 5.2rem; white-space: nowrap; }
.statust .lb { font-weight: 600; width: 32%; }
.statust .dt { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.statusgrid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); }

/* Preisentwicklung (v2.11.0) */
.gain { color: #6fe39c; } .loss { color: #ff8a8a; }
.tile .v.gain, .tile .v.loss { text-shadow: 0 0 16px currentColor; }
a.pill.on { background: rgba(47, 181, 163, .22); border-color: rgba(98, 220, 203, .45); color: var(--accent2); }
.modebar a.pill { padding: .25rem .8rem; }

/* Sets (v2.11.0) */
.bar { display: inline-block; vertical-align: middle; width: 150px; max-width: 100%; height: 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2fb5a3, #62dccb); box-shadow: 0 0 10px rgba(47, 181, 163, .5); }
.bar.full i { background: linear-gradient(90deg, #4bd87f, #9be7a8); }
.tile .bar { width: 100%; }
.seticon { width: 22px; height: 22px; vertical-align: middle; margin-right: .5rem; filter: invert(1) opacity(.85); }
.seticon.big { width: 34px; height: 34px; }
.card.missing { opacity: .42; filter: grayscale(.85); } .card.missing:hover { opacity: .9; filter: none; }
.card.alt { opacity: .7; }
.card .flag { position: absolute; left: 6px; bottom: 6px; padding: .1rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; background: rgba(12, 15, 19, .85); border: 1px solid rgba(255, 255, 255, .2); color: var(--text); }
.card .flag.miss { background: rgba(211, 32, 42, .8); border-color: rgba(255, 130, 130, .6); color: #fff; }
.pricelist { font-size: .9rem; } .pricelist td, .pricelist th { padding: .35rem .4rem; } .pricelist td:first-child { min-width: 190px; white-space: normal; }

/* Logo (v2.13.0) */
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand span { background: linear-gradient(90deg, #62dccb, #2fb5a3 60%, #8de9dd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brandlogo { width: 38px; height: 38px; border-radius: 50%; flex: none; filter: drop-shadow(0 0 8px rgba(47, 181, 163, .45)); transition: transform .3s ease, filter .3s ease; }
.brand:hover .brandlogo { transform: rotate(-8deg) scale(1.06); filter: drop-shadow(0 0 12px rgba(98, 220, 203, .7)); }
.brand { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: inherit; }
.loginlogo { display: block; width: 200px; height: 200px; margin: -4.2rem auto .4rem; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .6)) drop-shadow(0 0 22px rgba(47, 181, 163, .25)); }
.login { margin-top: 20vh; }
.login h1 { text-align: center; }
@media (max-width: 720px) { .brandlogo { width: 32px; height: 32px; } .loginlogo { width: 160px; height: 160px; margin-top: -3.4rem; } }

/* Ideenliste */
.idea.doing { border-color: rgba(245, 158, 66, .55); box-shadow: 0 0 0 1px rgba(245, 158, 66, .2), var(--shadow); }
.idea.done, .idea.dropped { opacity: .75; }

/* Funktionsuebersicht (v2.18.0) */
.loginwrap { position: relative; max-width: 360px; margin: 20vh auto 0; }
.loginwrap .login { margin: 0 auto; }
.infobtn { position: absolute; left: calc(100% + 1.6rem); top: 4.2rem; display: flex; align-items: center; gap: .8rem; width: auto; white-space: nowrap; text-align: left;
    padding: .7rem 1.1rem .7rem .8rem; border-radius: 999px; color: var(--text); cursor: pointer;
    background: linear-gradient(180deg, rgba(36, 42, 54, .85), rgba(20, 24, 31, .88)); border: 1px solid rgba(98, 220, 203, .35);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 0 rgba(47, 181, 163, .5); animation: infopulse 3.2s ease-out infinite; transition: transform .18s ease, border-color .18s ease; }
.infobtn:hover { background: linear-gradient(180deg, rgba(44, 52, 66, .9), rgba(24, 29, 38, .92)); border-color: var(--accent2); transform: translateY(-2px); filter: none; box-shadow: 0 14px 34px rgba(0, 0, 0, .5), 0 0 22px rgba(47, 181, 163, .35); }
.infobtn .ii { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; flex: none; font: italic 700 1.3rem Georgia, serif; color: #041a17; background: linear-gradient(180deg, #62dccb, #2fb5a3); box-shadow: 0 0 14px rgba(47, 181, 163, .6); }
.infobtn .it { display: flex; flex-direction: column; line-height: 1.25; }
.infobtn .it b { font-size: .98rem; } .infobtn .it small { color: var(--muted); font-size: .78rem; }
@keyframes infopulse { 0% { box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 0 rgba(47, 181, 163, .45); } 70% { box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 16px rgba(47, 181, 163, 0); } 100% { box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 0 rgba(47, 181, 163, 0); } }
@media (max-width: 1000px) { .infobtn { position: static; margin: 1.1rem auto 0; } }
@media (prefers-reduced-motion: reduce) { .infobtn { animation: none; } }

.featdlg { border: 1px solid var(--glass-line); border-radius: 18px; padding: 0; width: min(1100px, 94vw); max-height: 90vh; color: var(--text); overflow: hidden;
    background: linear-gradient(180deg, #171c25, #0f131a); box-shadow: 0 30px 90px rgba(0, 0, 0, .7); }
.featdlg[open] { display: flex; flex-direction: column; animation: ddin .18s ease-out; }
.featdlg::backdrop { background: rgba(6, 8, 11, .74); backdrop-filter: blur(6px); }
.fhead { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--glass-line); flex-wrap: wrap; }
.fhead img { border-radius: 50%; filter: drop-shadow(0 0 8px rgba(47, 181, 163, .45)); }
.fhead h2 { margin: 0; font-size: 1.25rem; color: var(--text); } .fhead small { color: var(--muted); }
.fhead #featq { flex: 1; min-width: 180px; max-width: 320px; margin-left: auto; }
.fclose { width: 2.3rem; height: 2.3rem; padding: 0; border-radius: 50%; flex: none; background: rgba(255, 255, 255, .08); color: var(--text); box-shadow: none; font-size: 1rem; }
.fclose:hover { background: rgba(255, 255, 255, .16); }
.fbody { overflow: auto; padding: 1.2rem 1.4rem 1.6rem; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 1rem; align-items: start; }
.fgroup { border: 1px solid var(--glass-line); border-top: 3px solid var(--fc); border-radius: 14px; padding: 1rem 1.1rem .5rem; background: rgba(255, 255, 255, .03); }
.fgroup header h3 { margin: 0; font-size: 1.05rem; color: var(--fc); } .fgroup header span { color: var(--muted); font-size: .82rem; }
.fgroup ul { list-style: none; margin: .7rem 0 0; padding: 0; }
.fgroup li { padding: .55rem 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.fgroup li b { display: block; } .fgroup li p { margin: .15rem 0 0; color: var(--muted); font-size: .88rem; }
.fgroup li a { color: var(--text); } .fgroup li a:hover { color: var(--accent2); }
.fsince { font-style: normal; font-weight: 600; font-size: .68rem; padding: .05rem .5rem; border-radius: 999px; margin-left: .4rem; background: rgba(47, 181, 163, .18); color: var(--accent2); vertical-align: middle; }
.fnone { color: var(--muted); text-align: center; padding: 1.5rem 0; }
.funkbar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; } .funkbar input { max-width: 340px; }

/* Sammlungs-Battle (v2.19.0) */
.battle-form { max-width: 720px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.battle { max-width: 980px; }
.bhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.bside { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; min-width: 0; overflow-wrap: anywhere; }
.bside .avatar { border: 2px solid var(--glass-line); box-shadow: 0 0 22px rgba(47, 181, 163, .25); }
.bscore { display: flex; align-items: center; gap: .6rem; font-size: 3rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.bscore i { font-style: normal; color: var(--muted); font-weight: 400; }
.bscore span { min-width: 1.2ch; text-align: center; text-shadow: 0 0 18px rgba(47, 181, 163, .45); }
.bverdict { text-align: center; margin: .7rem 0 1.1rem; font-weight: 700; color: var(--accent2); letter-spacing: .02em; }
.brounds { display: flex; flex-direction: column; gap: .5rem; }
.bround { display: grid; grid-template-columns: 1fr minmax(150px, 1.1fr) 1fr; grid-template-areas: "num num num" "a mid b"; gap: .2rem .8rem; align-items: center;
    padding: .55rem .8rem; border: 1px solid var(--glass-line); border-radius: 12px; background: rgba(255, 255, 255, .03); transition: opacity .35s, transform .35s, border-color .35s, box-shadow .35s; }
.bnum { grid-area: num; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.bmid { grid-area: mid; text-align: center; display: flex; flex-direction: column; min-width: 0; }
.bmid small { color: var(--muted); font-size: .74rem; }
.bmid em { font-style: normal; font-size: .78rem; color: var(--accent2); margin-top: .1rem; }
.bcell.a { grid-area: a; } .bcell.b { grid-area: b; }
.bcell { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.bcell.a { align-items: flex-end; text-align: right; } .bcell.b { align-items: flex-start; }
.bv { font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; display: flex; flex-direction: column; }
.bv small { font-weight: 400; color: var(--muted); font-size: .72rem; }
.bbar { display: block; width: 100%; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bbar i { display: block; height: 100%; border-radius: 999px; background: var(--muted); opacity: .55; transition: width .6s ease .1s; }
.bcell.a .bbar i { margin-left: auto; }
.bcell.won .bbar i { background: linear-gradient(90deg, #2fb5a3, #62dccb); opacity: 1; box-shadow: 0 0 10px rgba(47, 181, 163, .6); }
.bcell.won .bv { color: var(--accent2); }
.bround.pending { opacity: .18; transform: scale(.985); }
.bround.pending .bbar i { width: 0 !important; }
.bround.live { border-color: var(--accent2); box-shadow: 0 0 22px rgba(47, 181, 163, .3); }
.playing .bverdict { visibility: hidden; }
.bactions { margin-top: 1rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.bactions .ghost { background: rgba(255, 255, 255, .08); color: var(--text); }
.bactions .ghost:hover { background: rgba(255, 255, 255, .16); }
@media (max-width: 640px) {
    .bscore { font-size: 2.2rem; }
    .bround { grid-template-columns: 1fr 1fr; grid-template-areas: "num num" "mid mid" "a b"; }
    .bcell.a { align-items: flex-start; text-align: left; }
    .bcell.a .bbar i { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .bround, .bbar i { transition: none; } }
.battle.playing .bstick { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 4.2rem); z-index: 3; padding: .5rem 0 .3rem; margin: -.5rem 0 .3rem; background: #181c25; box-shadow: 0 10px 14px -6px rgba(0, 0, 0, .55); border-radius: 0 0 12px 12px; }
.bstick .bactions { justify-content: center; margin: 0 0 .6rem; }
.battle.playing .bverdict { display: none; }
.battle.playing .bside .avatar { width: 40px !important; height: 40px !important; }

/* Battle beginnt von selbst: vor dem Start und waehrend des Spiels nichts verraten (nur mit JavaScript) */
.js .battle:not(.finished):not(.playing) .bscore span, .js .battle:not(.finished) .bverdict { visibility: hidden; }
.js .battle:not(.finished):not(.playing) .bround { opacity: 0; }
.bround.pending { opacity: 0; transform: translateY(10px) scale(.98); }
.bround.live { animation: bpop .5s ease-out; }
@keyframes bpop { 0% { transform: translateY(12px) scale(.97); } 60% { transform: translateY(-2px) scale(1.01); } 100% { transform: none; } }
.battle.finished .bverdict { animation: bpop .6s ease-out; }
.battle.playing .bverdict { visibility: hidden; }

/* Tauschbar-Kennzeichen auf Kartenkacheln */
.card .img .tflag { position: absolute; left: .4rem; bottom: .4rem; backdrop-filter: blur(4px); background: rgba(12, 15, 19, .75); }
/* Zeilen ohne Tabelle (Tauschbar-Seite), brechen auf schmalen Bildschirmen um */
.rowlist > div { display: flex; gap: .4rem .8rem; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.rowlist > div > :first-child { flex: 1 1 220px; min-width: 0; }

/* Anleitung */
.guidebar { display: flex; gap: .8rem 1rem; flex-wrap: wrap; align-items: center; margin: .8rem 0 1rem; }
.guidebar .gmodes { display: flex; gap: .4rem; }
.guidebar .gmodes .pill { cursor: pointer; border: 1px solid var(--glass-line, var(--line)); background: transparent; color: var(--text); }
.guidebar .gmodes .pill.on { background: var(--accent); color: #06231f; border-color: transparent; }
.guidebar input[type=search] { flex: 1 1 240px; max-width: 420px; }
.gprog { color: var(--muted); font-size: .85rem; }
.guide { display: grid; grid-template-columns: minmax(200px, 270px) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.gtoc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 4.6rem); max-height: calc(100vh - 6rem); overflow: auto; padding-right: .3rem; }
.gtocgroup { margin-bottom: .9rem; }
.gtocgroup h3 { margin: 0 0 .25rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--fc); }
.gtocgroup a { display: flex; gap: .5rem; align-items: baseline; padding: .28rem .5rem; border-radius: 8px; color: var(--text); font-size: .9rem; line-height: 1.3; }
.gtocgroup a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.gtocgroup a.on { background: rgba(255, 255, 255, .1); box-shadow: inset 3px 0 0 var(--fc); }
.gdone { flex: none; width: .9rem; height: .9rem; border-radius: 50%; border: 1.5px solid var(--muted); align-self: center; }
.gtocgroup a.read .gdone { background: var(--fc); border-color: var(--fc); box-shadow: inset 0 0 0 2px #0c0f13; }
.gchap { border: 1px solid var(--glass-line, var(--line)); border-top: 3px solid var(--fc); border-radius: 14px; padding: 1.1rem 1.3rem 1rem; background: rgba(255, 255, 255, .03); margin-bottom: 1rem; }
.gchap[hidden] { display: none; }
.gchap h2 { margin: .2rem 0 .4rem; font-size: 1.35rem; }
.gchap h3 { margin: 1.1rem 0 .3rem; font-size: .95rem; color: var(--fc); }
.gkicker { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.glead { font-size: 1.02rem; margin: 0; }
.gsteps { margin: .3rem 0 0; padding-left: 1.4rem; }
.gsteps li { margin: .45rem 0; padding-left: .2rem; }
.gsteps li::marker { color: var(--fc); font-weight: 700; }
.gtips { margin: .3rem 0 0; padding-left: 1.2rem; color: var(--text); }
.gtips li { margin: .3rem 0; }
.gtips li::marker { color: var(--fc); }
.gactions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 1.1rem; }
.gopen { padding: .45rem 1rem; border-radius: 9px; display: inline-block; }
.gread { color: var(--muted); font-size: .88rem; display: flex; gap: .4rem; align-items: center; }
.gread input { width: auto; margin: 0; }
.gsee { color: var(--muted); font-size: .88rem; margin: .8rem 0 0; }
.gsee a { margin-right: .7rem; }
.gnav { display: flex; gap: 1rem; align-items: center; justify-content: space-between; margin: 1rem 0 2rem; }
.gnav button { width: auto; }
.gnav button:disabled { opacity: .4; cursor: default; }
.gnav[hidden], .gnone[hidden] { display: none; }
.gnav span { color: var(--muted); font-size: .9rem; }
@media (max-width: 860px) {
    .guide { grid-template-columns: minmax(0, 1fr); }
    .gtoc { position: static; max-height: none; display: none; }
    .guide:not(.js) .gtoc { display: block; }
}
/* Hilfe-Knopf "?" unten rechts auf jeder Seite */
.helpfab { position: fixed; right: max(1rem, env(safe-area-inset-right, 0px)); bottom: max(1rem, env(safe-area-inset-bottom, 0px)); z-index: 6; width: 2.6rem; height: 2.6rem; border-radius: 50%;
    display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; background: var(--accent); color: #06231f; box-shadow: 0 6px 20px rgba(0, 0, 0, .45); text-decoration: none; }
.helpfab:hover { text-decoration: none; filter: brightness(1.1); }
@media print { .helpfab { display: none; } }

.gselwrap { display: none; margin-bottom: .8rem; }
.gsellabel { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .2rem; }
.gselwrap select { width: 100%; }
.guidebar .gmodes .pill { white-space: nowrap; }
@media (max-width: 860px) { .gselwrap { display: block; } }
.guide, .gchap { scroll-margin-top: 7.5rem; }

/* Daumen hoch bei Ideen */
.thumb { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--glass-line, var(--line)); background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; cursor: pointer; width: auto; }
.thumb b { font-weight: 700; }
.thumb:hover { background: rgba(255, 255, 255, .1); }
.thumb.on { background: var(--accent); color: #06231f; border-color: transparent; }
.thumb.ro { cursor: default; color: var(--muted); }
.thumbico { vertical-align: -.15em; }

/* Menue v2.38.0: Punkte mit Symbol und kurzer Erklaerung, Zwischenueberschriften */
.ddmenu.mega { min-width: 300px; }
.top nav .ddmenu a.mi, .ddmenu a.mi { display: grid; grid-template-columns: 1.9rem 1fr; grid-template-rows: auto auto; column-gap: .55rem; row-gap: 0;
    align-items: center; justify-content: stretch; padding: .45rem .7rem; white-space: normal; }
.mi .mic { grid-row: 1 / span 2; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 9px; font-size: 1.05rem;
    background: rgba(255, 255, 255, .05); border: 1px solid var(--glass-line); }
.mi .mit { font-weight: 600; display: flex; align-items: center; gap: .45rem; }
.mi .mid { color: var(--muted); font-size: .78rem; line-height: 1.25; }
.ddmenu a.mi.on .mic { background: rgba(47, 181, 163, .2); border-color: rgba(98, 220, 203, .35); }
.ddmenu a.mi:hover .mic { border-color: rgba(98, 220, 203, .35); }
.ddsec { padding: .55rem .75rem .2rem; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ddsec:not(:first-child) { margin-top: .25rem; border-top: 1px solid var(--glass-line); padding-top: .6rem; }
@media (max-width: 900px) {
    .ddmenu.mega { min-width: 0; }
    .top nav .ddmenu a.mi { padding: .5rem .7rem; }
    .mi .mid { font-size: .75rem; }
}
