/*
 * Live-Katalog fürs Handy (docs/PLAN_ausstellung_gui_umbau.md, G8): schmaler Kopf, drei Reiter.
 * Hell als Standard, dunkel nach Geräteeinstellung.
 */
:root {
    --wine: #6c1d24;
    --wine-dark: #4d1015;
    --red-hi: #c42b39;
    --gold: #bb9457;
    --bg: #f6f1ec;
    --card: #ffffff;
    --soft: #efe8e2;
    --line: #e7ddd5;
    --fg: #2f2522;
    --muted: #6f635d;
    --ok: #2f6b3f;
    --ok-bg: #e3f0e5;
    --gold-soft: #f3e8d6;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #121010;
    --card: #1d1a19;
    --soft: #2a2524;
    --line: #332c2a;
    --fg: #f3ece6;
    --muted: #b1a59e;
    --ok: #8fcf9d;
    --ok-bg: #1f3525;
    --gold-soft: #3a2f1f;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font: 15px/1.45 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Kopf */
.lc-top {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 0;
    background: var(--wine-dark);
    color: #fbf5ef;
}

.lc-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lc-club {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.75;
}

.lc-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.72rem;
    font-weight: 800;
}

.lc-live::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff6b5b;
    box-shadow: 0 0 0 3px rgba(255, 107, 91, 0.25);
}

.lc-title {
    margin: 6px 0 2px;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.35rem;
    line-height: 1.15;
}

.lc-meta {
    margin: 0 0 12px;
    font-size: 0.8rem;
    opacity: 0.82;
}

.lc-tabs {
    display: flex;
}

.lc-tabs button {
    flex: 1;
    padding: 10px 0 11px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    opacity: 0.7;
    cursor: pointer;
}

.lc-tabs button[aria-selected="true"] {
    opacity: 1;
    border-color: var(--gold);
}

.lc-tabs button:focus-visible,
.lc-seg button:focus-visible,
.lc-search:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* Reiter */
body:not([data-tab="ring"]) [data-panel="ring"],
body:not([data-tab="katalog"]) [data-panel="katalog"],
body:not([data-tab="ergebnisse"]) [data-panel="ergebnisse"],
body:not([data-tab="katalog"]) [data-only-tab="katalog"] {
    display: none;
}

.lc-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 640px;
    margin: 0 auto;
    padding: 14px 16px 0;
}

.lc-search {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    color: var(--fg);
    font: inherit;
}

.lc-seg {
    display: flex;
    gap: 6px;
}

.lc-seg button {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--fg);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.lc-seg button.is-on {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--bg);
}

.lc-body {
    max-width: 640px;
    margin: 0 auto;
    padding: 14px 16px 24px;
}

.lc-scene,
.lc-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Karten */
.lc-card {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
}

.lc-card h2 {
    margin: 4px 0 6px;
    font-size: 1.2rem;
    line-height: 1.2;
}

.lc-card p {
    margin: 0;
    color: var(--muted);
}

.lc-now {
    border: 2px solid var(--wine);
}

.lc-kicker {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wine);
}

:root[data-theme="dark"] .lc-kicker {
    color: var(--gold);
}

:root[data-theme="dark"] .lc-now {
    border-color: var(--red-hi);
}

.lc-small {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
}

.lc-bar {
    height: 6px;
    margin: 8px 0 4px;
    border-radius: 9px;
    background: var(--soft);
    overflow: hidden;
}

.lc-bar b {
    display: block;
    height: 100%;
    background: var(--ok);
    transition: width 0.8s ease;
}

.lc-inring {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.lc-li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--soft);
}

.lc-li:last-child {
    border-bottom: 0;
}

.lc-li > div {
    flex: 1;
    min-width: 0;
}

.lc-li strong {
    display: block;
    overflow: hidden;
    font-size: 0.92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lc-num {
    display: inline-grid;
    place-items: center;
    flex: none;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--soft);
    font-weight: 800;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.lc-num.is-now {
    background: var(--wine);
    color: #fff;
}

.lc-chip {
    flex: none;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.lc-chip.is-now {
    background: var(--wine);
    color: #fff;
}

.lc-chip.is-rated,
.lc-chip.is-done {
    background: var(--ok-bg);
    color: var(--ok);
}

.lc-unit-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}

.lc-result {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--soft);
}

.lc-result:last-child {
    border-bottom: 0;
}

.lc-result em {
    min-width: 2.6em;
    font-style: normal;
    font-weight: 800;
    color: var(--red-hi);
}

.lc-result b {
    min-width: 2.2em;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.lc-result small {
    display: block;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--wine);
}

:root[data-theme="dark"] .lc-result small {
    color: var(--gold);
}

.lc-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--soft);
}

.lc-title-row:last-child {
    border-bottom: 0;
}

.lc-title-row span {
    font-size: 0.8rem;
    color: var(--muted);
}

.lc-title-row strong {
    font-size: 0.9rem;
    text-align: right;
}

.lc-ann {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--gold-soft);
    font-weight: 700;
}

.lc-ann span {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a5a22;
}

.lc-pause {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px;
    border-radius: 16px;
    background: var(--wine-dark);
    color: #fff;
    text-align: center;
}

.lc-pause span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
}

.lc-pause strong {
    font-size: 2rem;
    line-height: 1.1;
}

.lc-before h2 {
    font-family: "Fraunces", Georgia, serif;
}

.lc-button {
    display: block;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    color: var(--fg);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.lc-foot {
    padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 20px);
    color: var(--muted);
    font-size: 0.75rem;
    text-align: center;
}

.lc-stale {
    display: none;
    color: var(--red-hi);
    font-weight: 700;
}

html.is-stale .lc-stale {
    display: inline;
}

html.is-stale .lc-ok {
    display: none;
}

[hidden] {
    display: none !important;
}

/* Änderungs-Effekte (live.js) */
@keyframes fx-flip {
    0% { transform: rotateX(-80deg); opacity: 0.3; }
    100% { transform: none; opacity: 1; }
}

@keyframes fx-in {
    0% { transform: translateY(8px); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

@keyframes fx-mark {
    0% { background-color: rgba(196, 43, 57, 0.14); }
    100% { background-color: transparent; }
}

@keyframes fx-roll {
    0% { transform: translateY(60%); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

@keyframes fx-scene {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.fx-flip {
    animation: fx-flip 0.6s ease, fx-mark 2.5s ease-out;
}

.fx-in {
    animation: fx-in 0.6s ease, fx-mark 3s ease-out;
}

.fx-roll {
    display: block;
    animation: fx-roll 0.5s ease;
}

.fx-scene {
    animation: fx-scene 0.7s ease;
}

@media (prefers-reduced-motion: reduce) {
    .fx-flip,
    .fx-in,
    .fx-roll,
    .fx-scene {
        animation: none;
    }
}

/* Rüden-/Hündinnen-Symbol statt Wort */
.lc-class {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
}

.lc-sex {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 1.55em;
    height: 1.55em;
    border-radius: 999px;
}

.lc-sex svg {
    width: 62%;
    height: 62%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lc-sex-ruede {
    color: #1f5398;
    background: rgba(38, 107, 196, 0.12);
}

.lc-sex-huendin {
    color: #a03357;
    background: rgba(178, 72, 111, 0.12);
}

:root[data-theme="dark"] .lc-sex-ruede {
    color: #8fb8ee;
    background: rgba(143, 184, 238, 0.14);
}

:root[data-theme="dark"] .lc-sex-huendin {
    color: #eea2bd;
    background: rgba(238, 162, 189, 0.14);
}

.lc-seg button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lc-seg button .lc-sex {
    width: 1.35em;
    height: 1.35em;
}

.lc-seg button.is-on .lc-sex {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
}

/* Hell/Dunkel-Knopf im Kopf (Standard hell) */
.lc-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lc-theme {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fbf5ef;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.lc-theme:hover {
    background: rgba(255, 255, 255, 0.18);
}

.lc-theme:active {
    transform: scale(0.94);
}

.lc-theme:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.lc-theme svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lc-theme-sun,
:root[data-theme="dark"] .lc-theme-moon {
    display: none;
}

:root[data-theme="dark"] .lc-theme-sun {
    display: block;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

:root[data-theme="dark"] .lc-ann span {
    color: var(--gold);
}

/* Herzchen-Bewertung (Snoopy-/Welpenklasse) statt „vv“/„v“ */
.live-hearts {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
}

.live-hearts svg {
    width: 1em;
    height: 1em;
    fill: var(--red-hi);
}

.lc-chip .live-hearts svg {
    width: 12px;
    height: 12px;
}
