/* ==========================================================================
   SUCCUBUS HELL — Design-System
   Sehr dunkles Anthrazit, Türkis als Hauptakzent, Gold für Regel- und
   Ranginformationen, Blau für Systeminfos, Rot ausschließlich für Warnung
   und Löschen. Dezente Rahmen, geringe Rundungen, hohe Informationsdichte.
   ========================================================================== */

:root {
    /* Flächen */
    --sh-bg: #0b0d10;
    --sh-bg-2: #101319;
    --sh-surface: #161a21;
    --sh-surface-2: #1c212a;
    --sh-surface-3: #232935;
    --sh-overlay: rgba(6, 8, 11, .78);

    /* Rahmen */
    --sh-border: #262d38;
    --sh-border-soft: #1e242d;
    --sh-border-strong: #36404f;

    /* Text */
    --sh-text: #dde3ec;
    --sh-text-dim: #97a1b1;
    --sh-text-faint: #6a7385;
    --sh-text-invert: #07090c;

    /* Akzente */
    --sh-accent: #2fd4c4;
    --sh-accent-dim: #1f9c91;
    --sh-accent-soft: rgba(47, 212, 196, .12);
    --sh-accent-line: rgba(47, 212, 196, .35);

    --sh-gold: #d9b45a;
    --sh-gold-dim: #a5863c;
    --sh-gold-soft: rgba(217, 180, 90, .12);

    --sh-blue: #5b9cf0;
    --sh-blue-soft: rgba(91, 156, 240, .12);

    --sh-danger: #e05561;
    --sh-danger-dim: #a63b45;
    --sh-danger-soft: rgba(224, 85, 97, .13);

    --sh-success: #4fbf7b;
    --sh-success-soft: rgba(79, 191, 123, .12);

    --sh-warn: #e0a23c;
    --sh-warn-soft: rgba(224, 162, 60, .12);

    --sh-purple: #a97bd6;
    --sh-purple-soft: rgba(169, 123, 214, .12);

    /* Maße */
    --sh-radius: 4px;
    --sh-radius-lg: 6px;
    --sh-nav-w: 232px;
    --sh-topbar-h: 52px;
    --sh-gap: 12px;

    --sh-shadow: 0 2px 10px rgba(0, 0, 0, .45);
    --sh-shadow-lg: 0 12px 40px rgba(0, 0, 0, .6);

    /* Typografie */
    --sh-font: "Segoe UI", "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --sh-font-mono: "Cascadia Mono", "JetBrains Mono", Consolas, "SF Mono", monospace;
    --sh-fs: 13.5px;
}

/* ------------------------------------------------------------------ Basis */

*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--sh-bg);
    color: var(--sh-text);
    font-family: var(--sh-font);
    font-size: var(--sh-fs);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--sh-text);
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
h4 { font-size: .93rem; }
h5, h6 { font-size: .86rem; }

p { margin: 0 0 .7em; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--sh-accent);
    text-decoration: none;
}
a:hover { color: #57e5d7; text-decoration: underline; }

hr {
    border: 0;
    border-top: 1px solid var(--sh-border);
    margin: 1rem 0;
}

code, kbd, pre, samp { font-family: var(--sh-font-mono); font-size: .92em; }

code {
    background: var(--sh-surface-2);
    border: 1px solid var(--sh-border-soft);
    border-radius: 3px;
    padding: .06em .34em;
    color: var(--sh-accent);
}

pre {
    background: var(--sh-bg-2);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    padding: .7rem .85rem;
    overflow-x: auto;
}
pre code { background: none; border: 0; padding: 0; color: var(--sh-text); }

blockquote {
    margin: 0 0 .8em;
    padding: .4rem .9rem;
    border-left: 2px solid var(--sh-accent-line);
    background: var(--sh-accent-soft);
    color: var(--sh-text-dim);
}

::selection { background: var(--sh-accent-dim); color: #04120f; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--sh-border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: var(--sh-border-strong);
    border-radius: 6px;
    border: 2px solid var(--sh-bg);
}
*::-webkit-scrollbar-thumb:hover { background: #47546a; }

/* --------------------------------------------------------------- Layout */

.sh-app {
    display: grid;
    grid-template-columns: var(--sh-nav-w) 1fr;
    grid-template-rows: var(--sh-topbar-h) 1fr;
    grid-template-areas: "brand top" "nav main";
    height: 100vh;
    overflow: hidden;
}

.sh-brand {
    grid-area: brand;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: 0 .8rem;
    background: var(--sh-bg-2);
    border-right: 1px solid var(--sh-border);
    border-bottom: 1px solid var(--sh-border);
    min-width: 0;
}

.sh-brand__mark {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: grid;
    place-items: center;
    border-radius: var(--sh-radius);
    background: linear-gradient(140deg, var(--sh-accent-dim), #124f4a);
    color: #04120f;
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: -.03em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
}

.sh-brand__text { min-width: 0; }
.sh-brand__title {
    font-size: .87rem;
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sh-brand__sub {
    font-size: .66rem;
    color: var(--sh-text-faint);
    text-transform: uppercase;
    letter-spacing: .08em;
    white-space: nowrap;
}

.sh-topbar {
    grid-area: top;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 0 .85rem;
    background: var(--sh-bg-2);
    border-bottom: 1px solid var(--sh-border);
    min-width: 0;
}

.sh-nav {
    grid-area: nav;
    background: var(--sh-bg-2);
    border-right: 1px solid var(--sh-border);
    overflow-y: auto;
    overflow-x: hidden;
    padding: .5rem 0 1.5rem;
}

.sh-main {
    grid-area: main;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--sh-bg);
    scroll-behavior: smooth;
}

.sh-main__inner {
    padding: 1rem 1.15rem 3rem;
    max-width: 1720px;
    margin: 0 auto;
}

/* Zweispaltige Detailansicht: Inhalt + rechte Kontextspalte */
.sh-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--sh-gap);
    align-items: start;
}
.sh-split--wide { grid-template-columns: minmax(0, 1fr) 380px; }
.sh-split__aside { position: sticky; top: 0; display: grid; gap: var(--sh-gap); }

/* --------------------------------------------------------- Navigation */

.sh-nav__group { margin-bottom: .35rem; }

.sh-nav__label {
    padding: .55rem .9rem .3rem;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--sh-text-faint);
}

.sh-nav__item {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    padding: .36rem .9rem .36rem .8rem;
    border: 0;
    border-left: 2px solid transparent;
    background: none;
    color: var(--sh-text-dim);
    font: inherit;
    font-size: .84rem;
    text-align: left;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}

.sh-nav__item:hover {
    background: var(--sh-surface);
    color: var(--sh-text);
    text-decoration: none;
}

.sh-nav__item.is-active {
    background: var(--sh-accent-soft);
    border-left-color: var(--sh-accent);
    color: var(--sh-accent);
    font-weight: 600;
}

.sh-nav__icon {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    opacity: .85;
}
.sh-nav__item.is-active .sh-nav__icon { opacity: 1; }

.sh-nav__count {
    margin-left: auto;
    font-size: .68rem;
    color: var(--sh-text-faint);
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ Karten */

.sh-card {
    background: var(--sh-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    overflow: hidden;
}

.sh-card__head {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--sh-border);
    background: var(--sh-surface-2);
    min-height: 38px;
}

.sh-card__title {
    margin: 0;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sh-text-dim);
}

.sh-card__actions { margin-left: auto; display: flex; gap: .35rem; align-items: center; }
.sh-card__body { padding: .75rem; }
.sh-card__body--flush { padding: 0; }
.sh-card__foot {
    padding: .5rem .75rem;
    border-top: 1px solid var(--sh-border);
    background: var(--sh-surface-2);
}

/* Akzentvarianten */
.sh-card--rule { border-color: rgba(217, 180, 90, .3); }
.sh-card--rule .sh-card__head { background: var(--sh-gold-soft); }
.sh-card--rule .sh-card__title { color: var(--sh-gold); }

.sh-card--system { border-color: rgba(91, 156, 240, .3); }
.sh-card--system .sh-card__head { background: var(--sh-blue-soft); }
.sh-card--system .sh-card__title { color: var(--sh-blue); }

.sh-card--danger { border-color: rgba(224, 85, 97, .35); }
.sh-card--danger .sh-card__head { background: var(--sh-danger-soft); }
.sh-card--danger .sh-card__title { color: var(--sh-danger); }

/* ------------------------------------------------------------- Raster */

.sh-grid { display: grid; gap: var(--sh-gap); }
.sh-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sh-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sh-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sh-grid--auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.sh-grid--cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sh-grid--tiles { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.sh-grid--gallery { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

.sh-stack { display: grid; gap: var(--sh-gap); }
.sh-stack--tight { gap: .5rem; }

.sh-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.sh-row--tight { gap: .3rem; }
.sh-row--between { justify-content: space-between; }
.sh-row--end { justify-content: flex-end; }
.sh-spacer { flex: 1 1 auto; }

/* ------------------------------------------------------- Seitenkopf */

.sh-page-head {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    margin-bottom: 1rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid var(--sh-border);
    flex-wrap: wrap;
}

.sh-page-head__text { min-width: 0; flex: 1 1 320px; }

.sh-page-head h1 {
    margin: 0;
    font-size: 1.32rem;
    letter-spacing: -.015em;
}

.sh-page-head__sub {
    margin: .18rem 0 0;
    color: var(--sh-text-dim);
    font-size: .84rem;
}

.sh-page-head__actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }

.sh-eyebrow {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--sh-accent);
    margin-bottom: .15rem;
}

/* ------------------------------------------------------------ Buttons */

.sh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    padding: .34rem .7rem;
    min-height: 30px;
    border: 1px solid var(--sh-border-strong);
    border-radius: var(--sh-radius);
    background: var(--sh-surface-2);
    color: var(--sh-text);
    font: inherit;
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s, border-color .12s, color .12s, opacity .12s;
    text-decoration: none;
}

.sh-btn:hover:not(:disabled) {
    background: var(--sh-surface-3);
    border-color: #465468;
    color: var(--sh-text);
    text-decoration: none;
}

.sh-btn:disabled, .sh-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

.sh-btn:focus-visible,
.sh-input:focus-visible,
.sh-nav__item:focus-visible,
.sh-tab:focus-visible,
a:focus-visible {
    outline: 2px solid var(--sh-accent);
    outline-offset: 1px;
}

.sh-btn--primary {
    background: var(--sh-accent-dim);
    border-color: var(--sh-accent-dim);
    color: #04120f;
    font-weight: 600;
}
.sh-btn--primary:hover:not(:disabled) { background: var(--sh-accent); border-color: var(--sh-accent); color: #04120f; }

.sh-btn--gold {
    background: transparent;
    border-color: var(--sh-gold-dim);
    color: var(--sh-gold);
}
.sh-btn--gold:hover:not(:disabled) { background: var(--sh-gold-soft); border-color: var(--sh-gold); color: var(--sh-gold); }

.sh-btn--ghost { background: transparent; border-color: transparent; color: var(--sh-text-dim); }
.sh-btn--ghost:hover:not(:disabled) { background: var(--sh-surface-2); color: var(--sh-text); }

.sh-btn--danger { background: transparent; border-color: var(--sh-danger-dim); color: var(--sh-danger); }
.sh-btn--danger:hover:not(:disabled) { background: var(--sh-danger-soft); border-color: var(--sh-danger); }

.sh-btn--sm { min-height: 25px; padding: .17rem .5rem; font-size: .76rem; }
.sh-btn--lg { min-height: 38px; padding: .5rem 1.1rem; font-size: .92rem; }
.sh-btn--block { width: 100%; }
.sh-btn--icon { padding: .3rem; min-width: 30px; }
.sh-btn--icon.sh-btn--sm { min-width: 25px; padding: .17rem; }

.sh-btn__icon { width: 15px; height: 15px; flex: 0 0 15px; }

/* Buttongruppe */
.sh-btn-group { display: inline-flex; }
.sh-btn-group .sh-btn { border-radius: 0; margin-left: -1px; }
.sh-btn-group .sh-btn:first-child { border-radius: var(--sh-radius) 0 0 var(--sh-radius); margin-left: 0; }
.sh-btn-group .sh-btn:last-child { border-radius: 0 var(--sh-radius) var(--sh-radius) 0; }
.sh-btn-group .sh-btn.is-active { background: var(--sh-accent-soft); border-color: var(--sh-accent-line); color: var(--sh-accent); z-index: 1; }

/* ----------------------------------------------------------- Formulare */

.sh-field { display: grid; gap: .22rem; min-width: 0; }

.sh-label {
    font-size: .73rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sh-text-faint);
}

.sh-hint { font-size: .74rem; color: var(--sh-text-faint); }
.sh-error { font-size: .76rem; color: var(--sh-danger); }

.sh-input, .sh-select, .sh-textarea {
    width: 100%;
    padding: .34rem .55rem;
    min-height: 30px;
    background: var(--sh-bg-2);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    color: var(--sh-text);
    font: inherit;
    font-size: .84rem;
    transition: border-color .12s, background .12s;
}

.sh-input:hover, .sh-select:hover, .sh-textarea:hover { border-color: var(--sh-border-strong); }

.sh-input:focus, .sh-select:focus, .sh-textarea:focus {
    outline: none;
    border-color: var(--sh-accent);
    background: var(--sh-bg);
}

.sh-input::placeholder, .sh-textarea::placeholder { color: var(--sh-text-faint); }
.sh-input:disabled, .sh-select:disabled, .sh-textarea:disabled { opacity: .5; cursor: not-allowed; }
.sh-input.is-invalid, .sh-select.is-invalid, .sh-textarea.is-invalid { border-color: var(--sh-danger); }

.sh-textarea { min-height: 90px; resize: vertical; line-height: 1.55; }
.sh-textarea--tall { min-height: 220px; }

.sh-select {
    appearance: none;
    padding-right: 1.6rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2397a1b1'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .35rem center;
    background-size: 15px;
}
.sh-select option { background: var(--sh-surface); color: var(--sh-text); }

.sh-check {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    cursor: pointer;
    font-size: .84rem;
    user-select: none;
}
.sh-check input[type="checkbox"], .sh-check input[type="radio"] {
    width: 15px; height: 15px; margin: 0;
    accent-color: var(--sh-accent);
    cursor: pointer;
    flex: 0 0 15px;
}

.sh-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.sh-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sh-form-grid__full { grid-column: 1 / -1; }

.sh-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}
.sh-search .sh-input { padding-left: 1.85rem; }
.sh-search__icon {
    position: absolute;
    left: .5rem;
    width: 14px; height: 14px;
    color: var(--sh-text-faint);
    pointer-events: none;
}

/* Nummernfeld für Punktvergabe */
.sh-stepper { display: inline-flex; align-items: center; gap: 0; }
.sh-stepper__btn {
    width: 24px; height: 24px;
    display: grid; place-items: center;
    border: 1px solid var(--sh-border);
    background: var(--sh-surface-2);
    color: var(--sh-text-dim);
    cursor: pointer;
    font-size: .9rem;
    line-height: 1;
    padding: 0;
}
.sh-stepper__btn:hover:not(:disabled) { background: var(--sh-surface-3); color: var(--sh-text); }
.sh-stepper__btn:disabled { opacity: .35; cursor: not-allowed; }
.sh-stepper__btn:first-child { border-radius: var(--sh-radius) 0 0 var(--sh-radius); }
.sh-stepper__btn:last-child { border-radius: 0 var(--sh-radius) var(--sh-radius) 0; }
.sh-stepper__value {
    width: 34px; height: 24px;
    display: grid; place-items: center;
    border: 1px solid var(--sh-border);
    border-left: 0; border-right: 0;
    background: var(--sh-bg-2);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: .85rem;
}

/* --------------------------------------------------------------- Chips */

.sh-chip {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    padding: .1rem .42rem;
    border: 1px solid var(--sh-border);
    border-radius: 3px;
    background: var(--sh-surface-2);
    color: var(--sh-text-dim);
    font-size: .73rem;
    line-height: 1.5;
    white-space: nowrap;
    max-width: 100%;
    text-decoration: none;
}

a.sh-chip:hover, button.sh-chip:hover {
    border-color: var(--sh-accent-line);
    background: var(--sh-accent-soft);
    color: var(--sh-accent);
    text-decoration: none;
    cursor: pointer;
}

button.sh-chip { font-family: inherit; cursor: pointer; }

.sh-chip__text { overflow: hidden; text-overflow: ellipsis; }

.sh-chip--accent { border-color: var(--sh-accent-line); background: var(--sh-accent-soft); color: var(--sh-accent); }
.sh-chip--gold { border-color: rgba(217, 180, 90, .35); background: var(--sh-gold-soft); color: var(--sh-gold); }
.sh-chip--blue { border-color: rgba(91, 156, 240, .35); background: var(--sh-blue-soft); color: var(--sh-blue); }
.sh-chip--danger { border-color: rgba(224, 85, 97, .35); background: var(--sh-danger-soft); color: var(--sh-danger); }
.sh-chip--success { border-color: rgba(79, 191, 123, .35); background: var(--sh-success-soft); color: var(--sh-success); }
.sh-chip--warn { border-color: rgba(224, 162, 60, .35); background: var(--sh-warn-soft); color: var(--sh-warn); }
.sh-chip--purple { border-color: rgba(169, 123, 214, .35); background: var(--sh-purple-soft); color: var(--sh-purple); }
.sh-chip--muted { color: var(--sh-text-faint); }

.sh-chip__x {
    display: grid; place-items: center;
    width: 13px; height: 13px;
    border: 0; padding: 0; margin-left: .1rem;
    background: none; color: inherit;
    opacity: .6; cursor: pointer;
    font-size: .8rem; line-height: 1;
}
.sh-chip__x:hover { opacity: 1; }

/* Tier-Badge: Gold für Ranginformationen */
.sh-tier {
    display: inline-grid;
    place-items: center;
    min-width: 21px;
    height: 19px;
    padding: 0 .28rem;
    border: 1px solid var(--sh-gold-dim);
    border-radius: 3px;
    background: var(--sh-gold-soft);
    color: var(--sh-gold);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
}
.sh-tier--lg { min-width: 27px; height: 24px; font-size: .84rem; }

/* -------------------------------------------------------------- Tabs */

.sh-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--sh-border);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
.sh-tabs::-webkit-scrollbar { display: none; }

.sh-tab {
    padding: .45rem .75rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--sh-text-dim);
    font: inherit;
    font-size: .83rem;
    white-space: nowrap;
    cursor: pointer;
    transition: color .12s, border-color .12s;
}
.sh-tab:hover { color: var(--sh-text); }
.sh-tab.is-active { color: var(--sh-accent); border-bottom-color: var(--sh-accent); font-weight: 600; }
.sh-tab__count { margin-left: .3rem; font-size: .7rem; color: var(--sh-text-faint); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ Tabellen */

.sh-table-wrap { overflow-x: auto; }

.sh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

.sh-table th {
    padding: .4rem .6rem;
    text-align: left;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--sh-text-faint);
    background: var(--sh-surface-2);
    border-bottom: 1px solid var(--sh-border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.sh-table td {
    padding: .4rem .6rem;
    border-bottom: 1px solid var(--sh-border-soft);
    vertical-align: middle;
}

.sh-table tbody tr:hover td { background: var(--sh-surface-2); }
.sh-table tbody tr:last-child td { border-bottom: 0; }
.sh-table--clickable tbody tr { cursor: pointer; }
.sh-table__num { text-align: right; font-variant-numeric: tabular-nums; }
.sh-table__actions { text-align: right; white-space: nowrap; width: 1%; }

/* ------------------------------------------------- Definitionslisten */

.sh-dl {
    display: grid;
    grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
    gap: .28rem .7rem;
    margin: 0;
    font-size: .83rem;
}
.sh-dl dt { color: var(--sh-text-faint); font-size: .76rem; }
.sh-dl dd { margin: 0; min-width: 0; word-break: break-word; }
.sh-dl--wide { grid-template-columns: minmax(130px, auto) minmax(0, 1fr); }

/* ---------------------------------------------------------- Statistik */

.sh-stat {
    display: grid;
    gap: .12rem;
    padding: .55rem .7rem;
    background: var(--sh-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
}
.sh-stat__value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}
.sh-stat__label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sh-text-faint);
}
.sh-stat__hint { font-size: .73rem; color: var(--sh-text-dim); }
.sh-stat--accent .sh-stat__value { color: var(--sh-accent); }
.sh-stat--gold .sh-stat__value { color: var(--sh-gold); }
.sh-stat--blue .sh-stat__value { color: var(--sh-blue); }
.sh-stat--danger .sh-stat__value { color: var(--sh-danger); }

/* Dashboard-Kachel */
.sh-tile {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: .3rem;
    padding: .7rem .8rem;
    background: var(--sh-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: border-color .12s, background .12s, transform .12s;
    min-height: 92px;
}
.sh-tile:hover {
    border-color: var(--sh-accent-line);
    background: var(--sh-surface-2);
    text-decoration: none;
    transform: translateY(-1px);
}
.sh-tile__head { display: flex; align-items: center; gap: .4rem; }
.sh-tile__icon { width: 15px; height: 15px; color: var(--sh-accent); flex: 0 0 15px; }
.sh-tile__title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--sh-text-dim);
}
.sh-tile__value {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}
.sh-tile__hint { font-size: .72rem; color: var(--sh-text-faint); }
.sh-tile--gold:hover { border-color: rgba(217, 180, 90, .45); }
.sh-tile--gold .sh-tile__icon { color: var(--sh-gold); }
.sh-tile--gold .sh-tile__value { color: var(--sh-gold); }
.sh-tile--blue .sh-tile__icon { color: var(--sh-blue); }

/* -------------------------------------------------------- Attributsbalken */

.sh-attr {
    display: grid;
    grid-template-columns: 40px 1fr 26px;
    align-items: center;
    gap: .45rem;
    font-size: .8rem;
}
.sh-attr__key {
    font-weight: 700;
    font-size: .74rem;
    letter-spacing: .04em;
    color: var(--sh-text-dim);
    cursor: help;
}
.sh-attr__track {
    display: flex;
    gap: 2px;
    height: 8px;
}
.sh-attr__pip {
    flex: 1 1 0;
    background: var(--sh-surface-3);
    border-radius: 1px;
}
.sh-attr__pip.is-on { background: var(--sh-accent); }
.sh-attr__pip.is-core { background: var(--sh-gold); }
.sh-attr__pip.is-bonus { background: var(--sh-purple); }
.sh-attr__value {
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: .85rem;
}
.sh-attr--zero .sh-attr__key,
.sh-attr--zero .sh-attr__value { color: var(--sh-text-faint); }

/* Punktebudget-Anzeige */
.sh-budget {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .6rem;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    background: var(--sh-surface-2);
    font-size: .8rem;
}
.sh-budget__value { font-weight: 700; font-variant-numeric: tabular-nums; }
.sh-budget.is-ok { border-color: rgba(79, 191, 123, .4); }
.sh-budget.is-ok .sh-budget__value { color: var(--sh-success); }
.sh-budget.is-over { border-color: rgba(224, 85, 97, .45); background: var(--sh-danger-soft); }
.sh-budget.is-over .sh-budget__value { color: var(--sh-danger); }
.sh-budget.is-left .sh-budget__value { color: var(--sh-warn); }

/* --------------------------------------------------------- Charakterkarte */

.sh-charcard {
    display: grid;
    grid-template-rows: auto 1fr;
    background: var(--sh-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    color: inherit;
    font: inherit;
    padding: 0;
    transition: border-color .12s, transform .12s;
}
.sh-charcard:hover { border-color: var(--sh-accent-line); transform: translateY(-1px); text-decoration: none; }

.sh-charcard__portrait {
    position: relative;
    aspect-ratio: 3 / 4;
    background: var(--sh-bg-2);
    overflow: hidden;
}
.sh-charcard__portrait img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.sh-charcard__placeholder {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    color: var(--sh-text-faint);
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(155deg, var(--sh-surface-2), var(--sh-bg-2));
}
.sh-charcard__kind {
    position: absolute;
    top: .35rem; left: .35rem;
    padding: .04rem .3rem;
    border-radius: 2px;
    background: rgba(6, 8, 11, .82);
    border: 1px solid var(--sh-border-strong);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--sh-text-dim);
}
.sh-charcard__tier {
    position: absolute;
    top: .35rem; right: .35rem;
    display: flex; gap: .18rem;
}
.sh-charcard__body { padding: .5rem .6rem .6rem; display: grid; gap: .3rem; min-width: 0; }
.sh-charcard__name {
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sh-charcard__meta {
    font-size: .74rem;
    color: var(--sh-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sh-charcard__tiers {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .7rem;
    color: var(--sh-text-faint);
    font-variant-numeric: tabular-nums;
}
.sh-charcard__chips { display: flex; gap: .22rem; flex-wrap: wrap; }

/* --------------------------------------------------------------- Galerie */

.sh-thumb {
    position: relative;
    display: block;
    aspect-ratio: 1;
    background: var(--sh-bg-2);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    transition: border-color .12s;
}
.sh-thumb:hover { border-color: var(--sh-accent-line); }
.sh-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-thumb__cap {
    position: absolute;
    inset: auto 0 0 0;
    padding: .5rem .4rem .28rem;
    background: linear-gradient(transparent, rgba(6, 8, 11, .93));
    font-size: .68rem;
    color: var(--sh-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}
.sh-thumb--wide { aspect-ratio: 4 / 3; }

/* ---------------------------------------------------------------- Baum */

.sh-tree { font-size: .84rem; }
.sh-tree__node { display: grid; }
.sh-tree__row {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .22rem .4rem;
    border-radius: 3px;
    cursor: pointer;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    width: 100%;
}
.sh-tree__row:hover { background: var(--sh-surface-2); }
.sh-tree__row.is-active { background: var(--sh-accent-soft); color: var(--sh-accent); }
.sh-tree__toggle {
    width: 14px; height: 14px;
    display: grid; place-items: center;
    flex: 0 0 14px;
    color: var(--sh-text-faint);
    font-size: .7rem;
    background: none; border: 0; padding: 0; cursor: pointer;
}
.sh-tree__children {
    margin-left: .55rem;
    padding-left: .55rem;
    border-left: 1px solid var(--sh-border);
}
.sh-tree__meta { margin-left: auto; font-size: .7rem; color: var(--sh-text-faint); }

/* ------------------------------------------------------------ Timeline */

.sh-timeline { position: relative; padding-left: 1.1rem; }
.sh-timeline::before {
    content: "";
    position: absolute;
    left: 4px; top: .4rem; bottom: .4rem;
    width: 1px;
    background: var(--sh-border);
}
.sh-timeline__item { position: relative; padding: 0 0 .9rem; }
.sh-timeline__dot {
    position: absolute;
    left: -1.1rem; top: .32rem;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--sh-accent);
    box-shadow: 0 0 0 3px var(--sh-bg);
}
.sh-timeline__date {
    font-size: .71rem;
    color: var(--sh-text-faint);
    font-variant-numeric: tabular-nums;
}
.sh-timeline__title { font-weight: 600; font-size: .88rem; }

/* --------------------------------------------------------------- Modal */

.sh-modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--sh-overlay);
    display: grid;
    place-items: center;
    padding: 1rem;
    z-index: 1000;
    animation: sh-fade .12s ease-out;
}

.sh-modal {
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 2rem);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: var(--sh-surface);
    border: 1px solid var(--sh-border-strong);
    border-radius: var(--sh-radius-lg);
    box-shadow: var(--sh-shadow-lg);
    animation: sh-pop .14s ease-out;
}
.sh-modal--wide { max-width: 900px; }
.sh-modal--full { max-width: 1300px; }

.sh-modal__head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem .85rem;
    border-bottom: 1px solid var(--sh-border);
}
.sh-modal__title { margin: 0; font-size: .95rem; font-weight: 700; }
.sh-modal__body { padding: .85rem; overflow-y: auto; }
.sh-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: .4rem;
    padding: .65rem .85rem;
    border-top: 1px solid var(--sh-border);
    background: var(--sh-surface-2);
}

@keyframes sh-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sh-pop { from { opacity: 0; transform: translateY(6px) scale(.99); } to { opacity: 1; transform: none; } }

/* Bild-Lightbox */
.sh-lightbox {
    max-width: min(94vw, 1400px);
    max-height: 94vh;
    display: grid;
    gap: .4rem;
}
.sh-lightbox img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: var(--sh-radius);
    background: var(--sh-bg-2);
}

/* --------------------------------------------------------------- Toasts */

.sh-toasts {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: grid;
    gap: .4rem;
    z-index: 1100;
    max-width: min(370px, calc(100vw - 2rem));
}

.sh-toast {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .5rem .65rem;
    background: var(--sh-surface-2);
    border: 1px solid var(--sh-border-strong);
    border-left-width: 3px;
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow);
    animation: sh-slide .16s ease-out;
}
@keyframes sh-slide { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.sh-toast--success { border-left-color: var(--sh-success); }
.sh-toast--error { border-left-color: var(--sh-danger); }
.sh-toast--warn { border-left-color: var(--sh-warn); }
.sh-toast--info { border-left-color: var(--sh-blue); }

.sh-toast__icon { width: 15px; height: 15px; flex: 0 0 15px; margin-top: .12rem; }
.sh-toast--success .sh-toast__icon { color: var(--sh-success); }
.sh-toast--error .sh-toast__icon { color: var(--sh-danger); }
.sh-toast--warn .sh-toast__icon { color: var(--sh-warn); }
.sh-toast--info .sh-toast__icon { color: var(--sh-blue); }

.sh-toast__body { min-width: 0; flex: 1; }
.sh-toast__title { font-size: .84rem; font-weight: 600; }
.sh-toast__text { font-size: .78rem; color: var(--sh-text-dim); word-break: break-word; }
.sh-toast__x {
    background: none; border: 0; padding: 0;
    color: var(--sh-text-faint); cursor: pointer;
    font-size: 1rem; line-height: 1;
}
.sh-toast__x:hover { color: var(--sh-text); }

/* ------------------------------------------------------------- Zustände */

.sh-empty {
    display: grid;
    place-items: center;
    gap: .4rem;
    padding: 2.2rem 1rem;
    text-align: center;
    color: var(--sh-text-faint);
}
.sh-empty__icon { width: 30px; height: 30px; opacity: .4; }
.sh-empty__title { font-size: .92rem; font-weight: 600; color: var(--sh-text-dim); }
.sh-empty__text { font-size: .82rem; max-width: 420px; }

.sh-loading {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 1.4rem;
    justify-content: center;
    color: var(--sh-text-faint);
    font-size: .84rem;
}

.sh-spinner {
    width: 15px; height: 15px;
    border: 2px solid var(--sh-border-strong);
    border-top-color: var(--sh-accent);
    border-radius: 50%;
    animation: sh-spin .7s linear infinite;
    flex: 0 0 15px;
}
@keyframes sh-spin { to { transform: rotate(360deg); } }

.sh-skeleton {
    background: linear-gradient(90deg, var(--sh-surface-2) 25%, var(--sh-surface-3) 50%, var(--sh-surface-2) 75%);
    background-size: 200% 100%;
    animation: sh-shimmer 1.3s infinite;
    border-radius: 3px;
}
@keyframes sh-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.sh-alert {
    display: flex;
    gap: .5rem;
    padding: .55rem .7rem;
    border: 1px solid var(--sh-border);
    border-left-width: 3px;
    border-radius: var(--sh-radius);
    background: var(--sh-surface-2);
    font-size: .83rem;
}
.sh-alert--info { border-left-color: var(--sh-blue); background: var(--sh-blue-soft); }
.sh-alert--success { border-left-color: var(--sh-success); background: var(--sh-success-soft); }
.sh-alert--warn { border-left-color: var(--sh-warn); background: var(--sh-warn-soft); }
.sh-alert--danger { border-left-color: var(--sh-danger); background: var(--sh-danger-soft); }
.sh-alert--rule { border-left-color: var(--sh-gold); background: var(--sh-gold-soft); }
.sh-alert__icon { width: 15px; height: 15px; flex: 0 0 15px; margin-top: .12rem; }

/* ------------------------------------------------------------- Tooltip */

.sh-tip { position: relative; display: inline-flex; cursor: help; }
.sh-tip__bubble {
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 150px;
    max-width: 290px;
    padding: .4rem .55rem;
    background: #05070a;
    border: 1px solid var(--sh-border-strong);
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow);
    font-size: .76rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--sh-text);
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity .12s;
    z-index: 900;
    pointer-events: none;
}
.sh-tip:hover .sh-tip__bubble,
.sh-tip:focus-within .sh-tip__bubble { opacity: 1; visibility: visible; }
.sh-tip__title { font-weight: 700; color: var(--sh-accent); display: block; margin-bottom: .1rem; }

/* -------------------------------------------------------- Fortschritt */

.sh-progress {
    height: 4px;
    background: var(--sh-surface-3);
    border-radius: 2px;
    overflow: hidden;
}
.sh-progress__bar { height: 100%; background: var(--sh-accent); transition: width .2s; }
.sh-progress__bar--gold { background: var(--sh-gold); }
.sh-progress__bar--danger { background: var(--sh-danger); }

/* Wizard-Schrittleiste */
.sh-steps {
    display: flex;
    gap: .18rem;
    overflow-x: auto;
    padding-bottom: .28rem;
    scrollbar-width: thin;
}
.sh-step {
    display: flex;
    align-items: center;
    gap: .32rem;
    padding: .28rem .5rem;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    background: var(--sh-surface);
    color: var(--sh-text-faint);
    font-size: .74rem;
    white-space: nowrap;
    cursor: pointer;
    flex: 0 0 auto;
    font-family: inherit;
}
.sh-step:hover { border-color: var(--sh-border-strong); color: var(--sh-text-dim); }
.sh-step.is-active {
    border-color: var(--sh-accent);
    background: var(--sh-accent-soft);
    color: var(--sh-accent);
    font-weight: 600;
}
.sh-step.is-done { color: var(--sh-success); border-color: rgba(79, 191, 123, .3); }
.sh-step.is-error { color: var(--sh-danger); border-color: rgba(224, 85, 97, .4); }
.sh-step__num {
    display: grid; place-items: center;
    width: 15px; height: 15px;
    border-radius: 50%;
    background: var(--sh-surface-3);
    font-size: .62rem;
    font-weight: 700;
    flex: 0 0 15px;
}
.sh-step.is-active .sh-step__num { background: var(--sh-accent); color: #04120f; }
.sh-step.is-done .sh-step__num { background: var(--sh-success); color: #04120f; }

/* Autosave-Status */
.sh-autosave {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .74rem;
    color: var(--sh-text-faint);
}
.sh-autosave--saving { color: var(--sh-blue); }
.sh-autosave--dirty { color: var(--sh-warn); }
.sh-autosave--saved { color: var(--sh-success); }
.sh-autosave--error { color: var(--sh-danger); }

/* --------------------------------------------------------- Würfeltisch */

.sh-die {
    display: grid;
    place-items: center;
    width: 96px; height: 96px;
    margin: 0 auto;
    border: 2px solid var(--sh-accent-line);
    border-radius: var(--sh-radius-lg);
    background: var(--sh-surface-2);
    font-size: 2.7rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--sh-accent);
    letter-spacing: -.03em;
}
.sh-die--crit-success { border-color: var(--sh-success); color: var(--sh-success); background: var(--sh-success-soft); }
.sh-die--crit-fail { border-color: var(--sh-danger); color: var(--sh-danger); background: var(--sh-danger-soft); }
.sh-die--rolling { animation: sh-shake .28s ease-in-out; }
@keyframes sh-shake {
    0%, 100% { transform: none; }
    25% { transform: translateX(-4px) rotate(-3deg); }
    75% { transform: translateX(4px) rotate(3deg); }
}

.sh-console {
    font-family: var(--sh-font-mono);
    font-size: .77rem;
    background: var(--sh-bg-2);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    max-height: 320px;
    overflow-y: auto;
}
.sh-console__line {
    display: flex;
    gap: .5rem;
    padding: .22rem .55rem;
    border-bottom: 1px solid var(--sh-border-soft);
    align-items: baseline;
}
.sh-console__line:last-child { border-bottom: 0; }
.sh-console__time { color: var(--sh-text-faint); flex: 0 0 auto; font-size: .72rem; }
.sh-console__text { min-width: 0; flex: 1; word-break: break-word; }
.sh-console__result { font-weight: 700; flex: 0 0 auto; }
.sh-console__result--success { color: var(--sh-success); }
.sh-console__result--fail { color: var(--sh-danger); }

/* -------------------------------------------------- Beziehungsgraph */

.sh-graph { width: 100%; background: var(--sh-bg-2); border-radius: var(--sh-radius); display: block; }
.sh-graph__edge { stroke: var(--sh-border-strong); stroke-width: 1; }
.sh-graph__edge--family { stroke: var(--sh-gold-dim); }
.sh-graph__edge--love { stroke: #c56a8f; }
.sh-graph__edge--friendship { stroke: var(--sh-success); }
.sh-graph__edge--enmity { stroke: var(--sh-danger-dim); }
.sh-graph__edge--master { stroke: var(--sh-purple); }
.sh-graph__edge--politics { stroke: var(--sh-blue); }
.sh-graph__edge--secret { stroke-dasharray: 3 3; }
.sh-graph__node { fill: var(--sh-surface-3); stroke: var(--sh-border-strong); cursor: pointer; }
.sh-graph__node:hover { fill: var(--sh-accent-dim); }
.sh-graph__node.is-focus { fill: var(--sh-accent); stroke: var(--sh-accent); }
.sh-graph__label { fill: var(--sh-text-dim); font-size: 9px; pointer-events: none; text-anchor: middle; }

/* Familienbaum */
.sh-tree-chart { display: grid; gap: 1rem; justify-items: center; overflow-x: auto; padding: .5rem; }
.sh-tree-chart__row { display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; }
.sh-tree-chart__label {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--sh-text-faint);
    text-align: center;
}
.sh-person {
    display: grid;
    gap: .18rem;
    justify-items: center;
    padding: .4rem .55rem;
    min-width: 118px;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    background: var(--sh-surface);
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: center;
}
.sh-person:hover { border-color: var(--sh-accent-line); text-decoration: none; }
.sh-person.is-focus { border-color: var(--sh-accent); background: var(--sh-accent-soft); }
.sh-person__avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--sh-surface-3);
    display: grid; place-items: center;
    font-size: .78rem; font-weight: 700;
    color: var(--sh-text-faint);
    overflow: hidden;
}
.sh-person__avatar img { width: 100%; height: 100%; object-fit: cover; }
.sh-person__name { font-size: .78rem; font-weight: 600; }
.sh-person__meta { font-size: .68rem; color: var(--sh-text-faint); }

/* ------------------------------------------------------- Regelwerk */

.sh-prose { font-size: .88rem; line-height: 1.68; max-width: 78ch; }
.sh-prose h2 {
    margin-top: 1.6rem;
    padding-bottom: .3rem;
    border-bottom: 1px solid var(--sh-border);
    color: var(--sh-gold);
    font-size: 1.12rem;
}
.sh-prose h3 { margin-top: 1.2rem; color: var(--sh-text); font-size: .98rem; }
.sh-prose h4 { margin-top: 1rem; color: var(--sh-text-dim); }
.sh-prose ul, .sh-prose ol { margin: 0 0 .8em; padding-left: 1.3rem; }
.sh-prose li { margin-bottom: .22em; }
.sh-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .84rem; }
.sh-prose th, .sh-prose td { padding: .32rem .55rem; border: 1px solid var(--sh-border); text-align: left; }
.sh-prose th { background: var(--sh-surface-2); color: var(--sh-text-dim); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.sh-prose img { max-width: 100%; height: auto; border-radius: var(--sh-radius); }
.sh-prose strong { color: var(--sh-text); font-weight: 650; }
.sh-prose > :first-child { margin-top: 0; }

.sh-toc { font-size: .82rem; display: grid; gap: .06rem; }
.sh-toc__item {
    display: block;
    padding: .18rem .45rem;
    border-radius: 3px;
    color: var(--sh-text-dim);
    border: 0; background: none; font: inherit;
    text-align: left; width: 100%; cursor: pointer;
}
.sh-toc__item:hover { background: var(--sh-surface-2); color: var(--sh-text); text-decoration: none; }
.sh-toc__item.is-active { background: var(--sh-gold-soft); color: var(--sh-gold); font-weight: 600; }
.sh-toc__item--l2 { padding-left: 1.1rem; font-size: .79rem; }
.sh-toc__item--l3 { padding-left: 1.8rem; font-size: .76rem; }

/* ----------------------------------------------------------- Dropzone */

.sh-drop {
    display: grid;
    place-items: center;
    gap: .35rem;
    padding: 1.5rem 1rem;
    border: 1px dashed var(--sh-border-strong);
    border-radius: var(--sh-radius);
    background: var(--sh-surface);
    text-align: center;
    color: var(--sh-text-dim);
    transition: border-color .12s, background .12s;
    position: relative;
}
.sh-drop.is-over { border-color: var(--sh-accent); background: var(--sh-accent-soft); }
.sh-drop input[type="file"] {
    position: absolute; inset: 0;
    opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.sh-drop__icon { width: 26px; height: 26px; opacity: .5; }
.sh-drop__title { font-size: .86rem; font-weight: 600; color: var(--sh-text); }
.sh-drop__hint { font-size: .76rem; color: var(--sh-text-faint); }

/* ---------------------------------------------------------- Gastbanner */

.sh-guest {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .4rem .7rem;
    border: 1px solid rgba(91, 156, 240, .3);
    border-radius: var(--sh-radius);
    background: var(--sh-blue-soft);
    font-size: .82rem;
    flex-wrap: wrap;
    margin-bottom: var(--sh-gap);
}
.sh-guest__text { color: var(--sh-text-dim); }
.sh-guest__text strong { color: var(--sh-blue); }

/* -------------------------------------------------------- Benutzermenü */

.sh-user {
    display: flex;
    align-items: center;
    gap: .42rem;
    padding: .22rem .45rem;
    border: 1px solid transparent;
    border-radius: var(--sh-radius);
    background: none;
    color: var(--sh-text-dim);
    font: inherit;
    font-size: .82rem;
    cursor: pointer;
}
.sh-user:hover { background: var(--sh-surface-2); border-color: var(--sh-border); color: var(--sh-text); }
.sh-user__avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--sh-accent-dim);
    color: #04120f;
    display: grid; place-items: center;
    font-size: .68rem; font-weight: 700;
    flex: 0 0 22px;
    overflow: hidden;
}
.sh-user__avatar img { width: 100%; height: 100%; object-fit: cover; }
.sh-user__role { font-size: .68rem; color: var(--sh-text-faint); }

.sh-menu {
    position: absolute;
    top: calc(100% + 3px);
    right: 0;
    min-width: 205px;
    padding: .22rem;
    background: var(--sh-surface);
    border: 1px solid var(--sh-border-strong);
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow-lg);
    z-index: 800;
    display: grid;
    gap: 1px;
}
.sh-menu__item {
    display: flex;
    align-items: center;
    gap: .45rem;
    width: 100%;
    padding: .35rem .5rem;
    border: 0; border-radius: 3px;
    background: none;
    color: var(--sh-text-dim);
    font: inherit; font-size: .82rem;
    text-align: left; cursor: pointer;
}
.sh-menu__item:hover { background: var(--sh-surface-2); color: var(--sh-text); text-decoration: none; }
.sh-menu__item--danger { color: var(--sh-danger); }
.sh-menu__item--danger:hover { background: var(--sh-danger-soft); color: var(--sh-danger); }
.sh-menu__sep { height: 1px; background: var(--sh-border); margin: .18rem 0; }
.sh-menu__label {
    padding: .3rem .5rem .15rem;
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--sh-text-faint);
}
.sh-dropdown { position: relative; }

/* ---------------------------------------------------- Globale Suche */

.sh-omnibox { position: relative; flex: 1 1 260px; max-width: 460px; min-width: 0; }
.sh-omnibox__results {
    position: absolute;
    top: calc(100% + 3px);
    left: 0; right: 0;
    max-height: 65vh;
    overflow-y: auto;
    background: var(--sh-surface);
    border: 1px solid var(--sh-border-strong);
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow-lg);
    z-index: 850;
}
.sh-omnibox__group {
    padding: .3rem .55rem .12rem;
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--sh-text-faint);
    background: var(--sh-surface-2);
    border-bottom: 1px solid var(--sh-border-soft);
    position: sticky; top: 0;
}
.sh-omnibox__item {
    display: flex;
    align-items: center;
    gap: .45rem;
    width: 100%;
    padding: .32rem .55rem;
    border: 0; background: none;
    color: var(--sh-text-dim);
    font: inherit; font-size: .82rem;
    text-align: left; cursor: pointer;
}
.sh-omnibox__item:hover, .sh-omnibox__item.is-active { background: var(--sh-accent-soft); color: var(--sh-accent); }
.sh-omnibox__meta { margin-left: auto; font-size: .7rem; color: var(--sh-text-faint); }

/* -------------------------------------------------------- Paginierung */

.sh-pager {
    display: flex;
    align-items: center;
    gap: .35rem;
    justify-content: center;
    padding: .6rem 0 .2rem;
    flex-wrap: wrap;
}
.sh-pager__info { font-size: .78rem; color: var(--sh-text-faint); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------- F-List-Vorschau */

.sh-bbcode {
    font-family: var(--sh-font-mono);
    font-size: .77rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--sh-bg-2);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    padding: .7rem;
    max-height: 620px;
    overflow-y: auto;
    color: var(--sh-text-dim);
}

.sh-flist { font-size: .85rem; line-height: 1.62; }
.sh-flist__center { text-align: center; }
.sh-flist__big { font-size: 1.18em; font-weight: 600; }
.sh-flist__hr { border: 0; border-top: 1px solid var(--sh-border); margin: .6rem 0; }
.sh-flist__collapse {
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    margin: .35rem 0;
    background: var(--sh-surface-2);
}
.sh-flist__collapse > summary {
    padding: .35rem .6rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--sh-gold);
    font-size: .83rem;
    list-style: none;
}
.sh-flist__collapse > summary::-webkit-details-marker { display: none; }
.sh-flist__collapse > summary::before { content: "▸ "; color: var(--sh-text-faint); }
.sh-flist__collapse[open] > summary::before { content: "▾ "; }
.sh-flist__collapse > div { padding: .1rem .6rem .55rem; }

/* ----------------------------------------------------------- Hilfsklassen */

.sh-muted { color: var(--sh-text-dim); }
.sh-faint { color: var(--sh-text-faint); }
.sh-accent { color: var(--sh-accent); }
.sh-gold { color: var(--sh-gold); }
.sh-blue { color: var(--sh-blue); }
.sh-danger { color: var(--sh-danger); }
.sh-success { color: var(--sh-success); }
.sh-warn { color: var(--sh-warn); }

.sh-xs { font-size: .73rem; }
.sh-sm { font-size: .8rem; }
.sh-lg { font-size: 1rem; }
.sh-bold { font-weight: 650; }
.sh-mono { font-family: var(--sh-font-mono); font-variant-numeric: tabular-nums; }
.sh-nowrap { white-space: nowrap; }
.sh-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sh-break { word-break: break-word; }
.sh-center { text-align: center; }
.sh-right { text-align: right; }

.sh-mt-0 { margin-top: 0; }
.sh-mt { margin-top: var(--sh-gap); }
.sh-mb-0 { margin-bottom: 0; }
.sh-mb { margin-bottom: var(--sh-gap); }
.sh-hidden { display: none !important; }

/* Blazor-Fehleranzeige */
#blazor-error-ui {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    display: none;
    padding: .6rem 1.1rem;
    background: var(--sh-danger-dim);
    color: #fff;
    font-size: .84rem;
    z-index: 1200;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .5);
}
#blazor-error-ui .dismiss {
    position: absolute;
    top: .4rem; right: .8rem;
    cursor: pointer;
    font-size: 1.1rem;
}

.validation-message { font-size: .76rem; color: var(--sh-danger); }
.invalid { border-color: var(--sh-danger) !important; }

/* ---------------------------------------------------------- Responsive */

.sh-nav-toggle { display: none; }
.sh-nav__backdrop { display: none; }

@media (max-width: 1200px) {
    .sh-split { grid-template-columns: minmax(0, 1fr); }
    .sh-split--wide { grid-template-columns: minmax(0, 1fr); }
    .sh-split__aside { position: static; }
    .sh-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    :root { --sh-nav-w: 0px; }

    .sh-app {
        grid-template-columns: 1fr;
        grid-template-areas: "top" "main";
    }

    .sh-brand { display: none; }

    .sh-nav {
        position: fixed;
        top: 0; bottom: 0; left: 0;
        width: 262px;
        z-index: 950;
        transform: translateX(-100%);
        transition: transform .18s ease-out;
        box-shadow: var(--sh-shadow-lg);
        padding-top: .5rem;
    }
    .sh-nav.is-open { transform: none; }

    .sh-nav__backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: var(--sh-overlay);
        z-index: 940;
        border: 0;
    }

    .sh-nav-toggle { display: inline-flex; }

    .sh-main__inner { padding: .8rem .7rem 3rem; }
    .sh-grid--3, .sh-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sh-form-grid, .sh-form-grid--3 { grid-template-columns: minmax(0, 1fr); }
    .sh-omnibox { max-width: none; }
    .sh-page-head h1 { font-size: 1.15rem; }
}

@media (max-width: 560px) {
    .sh-grid--2, .sh-grid--3, .sh-grid--4 { grid-template-columns: minmax(0, 1fr); }
    .sh-grid--cards { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
    .sh-grid--gallery { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .sh-dl { grid-template-columns: minmax(0, 1fr); gap: .1rem .5rem; }
    .sh-dl dt { margin-top: .35rem; }
    .sh-toasts { left: .6rem; right: .6rem; bottom: .6rem; max-width: none; }
    .sh-modal { max-height: calc(100vh - 1rem); }
}

/* ------------------------------------------------------------- Druck */

@media print {
    :root {
        --sh-bg: #fff; --sh-bg-2: #fff;
        --sh-surface: #fff; --sh-surface-2: #fff; --sh-surface-3: #f2f2f2;
        --sh-text: #000; --sh-text-dim: #333; --sh-text-faint: #666;
        --sh-border: #bbb; --sh-border-soft: #ddd; --sh-border-strong: #999;
        --sh-accent: #0a6f66; --sh-gold: #8a6d1f; --sh-blue: #1d4f9c;
    }

    body { background: #fff; color: #000; font-size: 10.5pt; }

    .sh-app {
        display: block;
        height: auto;
        overflow: visible;
    }
    .sh-nav, .sh-brand, .sh-topbar, .sh-toasts, .sh-nav__backdrop,
    .sh-page-head__actions, .sh-card__actions, .sh-tabs, .sh-guest,
    .sh-btn, .sh-pager, #blazor-error-ui { display: none !important; }

    .sh-main { overflow: visible; }
    .sh-main__inner { padding: 0; max-width: none; }

    .sh-card { border: 1px solid #bbb; break-inside: avoid; page-break-inside: avoid; }
    .sh-split { display: block; }
    .sh-split__aside { margin-top: 1rem; }

    .sh-attr__pip { border: 1px solid #999; }
    .sh-attr__pip.is-on { background: #333; }
    .sh-attr__pip.is-core { background: #8a6d1f; }

    a { color: #000; text-decoration: none; }
    .sh-print-only { display: block !important; }
    .sh-no-print { display: none !important; }
}

.sh-print-only { display: none; }

/* ------------------------------------------------- Bewegungsreduktion */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
