@import url('tokens.css');

/* -------------------------------------------------
   base.css – gemeinsame Bausteine für Website und App
   Designrichtung „A1 · Abendlicht“
   Wird vor der plattformspezifischen style.css geladen.
   ------------------------------------------------- */

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

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

body {
    margin: 0;
    background: var(--pf-bg);
    color: var(--pf-text);
    font-family: var(--pf-font-ui);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--pf-text);
}

p {
    margin: 0 0 12px;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--pf-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

img {
    max-width: 100%;
}

.hidden {
    display: none !important;
}

/* ---------- Tastaturfokus ---------- */

#question-box:focus-visible,
.archive-header:focus-visible,
.accordion-header:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid var(--pf-focus);
    outline-offset: 2px;
}

/* ---------- Frage-Karte ---------- */

.box {
    position: relative;
    padding: 28px 24px 26px;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-lg);
    background: var(--pf-surface);
    box-shadow: var(--pf-shadow-card);
    text-align: center;
    word-wrap: break-word;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#question-box {
    cursor: pointer;
}

#question-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 2px rgba(43, 38, 34, 0.04), 0 28px 54px -28px rgba(43, 38, 34, 0.55);
}

.box-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.box-logo {
    width: 64px;
    height: auto;
    max-width: 26vw;
    flex-shrink: 0;
}

.box .label {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    font-size: 13px;
    line-height: 1.55;
    color: var(--pf-muted);
}

/* Der Klick-Hinweis bleibt in einer angenehmen Lesebreite. */
.box .box-prompt {
    display: block;
    max-width: 34ch;
    margin: 0 auto;
}

/* Kategorie in einer Zeile – sie nutzt dieselbe Breite wie die Frage. */
.box .category-hint {
    display: block;
    max-width: 100%;
    margin-top: 10px;
    overflow: hidden;
    font-size: clamp(9px, 2.55vw, 10px);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--pf-faint);
}

.box .intensity-hint {
    display: inline-flex;
    margin-top: 12px;
}

.box .question {
    margin: 16px 0 0;
    font-family: var(--pf-font-question);
    font-size: clamp(25px, 5.4vw, 33px);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--pf-text);
}

.box[aria-expanded="true"] .box-header {
    margin-bottom: 0;
}

.box[aria-expanded="true"] .box-logo {
    width: 46px;
}

/* ---------- Bewertung ---------- */

#feedback-area {
    margin-top: 20px;
}

#rating-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
    text-align: center;
}

#rating-area > p {
    flex: 1 0 100%;
    margin: 0 0 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.rate {
    flex: 1 1 0;
    min-width: 78px;
    min-height: 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 6px;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-md);
    background: var(--pf-surface);
    color: var(--pf-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rate svg {
    display: block;
    width: 22px;
    height: 22px;
    color: var(--pf-neutral);
}

.rate[data-rating="good"] svg { color: var(--pf-good); }
.rate[data-rating="neutral"] svg { color: var(--pf-neutral); }
.rate[data-rating="bad"] svg { color: var(--pf-bad); }

.rate:hover {
    transform: translateY(-1px);
    border-color: var(--pf-border-strong);
    color: var(--pf-text);
}

.rate:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

/* ---------- Teilen (ruhiger Sekundär-Link) ---------- */

#share-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    margin-top: 16px;
}

.share-btn,
.share-text-btn,
.archive-share-btn,
.archive-text-share-btn,
.archive-favorite-btn,
.archive-hide-btn,
.archive-show-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: auto;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--pf-radius-pill);
    background: transparent;
    color: var(--pf-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.share-btn:hover,
.share-text-btn:hover,
.archive-share-btn:hover,
.archive-text-share-btn:hover,
.archive-favorite-btn:hover,
.archive-hide-btn:hover,
.archive-show-btn:hover {
    color: var(--pf-accent);
    background: var(--pf-accent-soft);
}

.share-btn svg,
.share-text-btn svg,
.archive-share-btn svg,
.archive-text-share-btn svg {
    width: 15px;
    height: 15px;
}

.archive-favorite-btn[aria-pressed="true"] {
    color: var(--pf-accent);
    background: var(--pf-accent-soft);
}

/* Kleine Aktions-Icons in den Archiv-Zeilen */
.action-icon {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: center / contain no-repeat;
    mask: center / contain no-repeat;
}

.action-icon-image {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V4'/%3E%3Cpath d='m8 8 4-4 4 4'/%3E%3Cpath d='M5 14v3a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V4'/%3E%3Cpath d='m8 8 4-4 4 4'/%3E%3Cpath d='M5 14v3a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
}

.action-icon-text {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M4 17h9'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M4 17h9'/%3E%3C/svg%3E");
}

.action-icon-hide {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18'/%3E%3Cpath d='M10.6 10.6a2 2 0 0 0 2.8 2.8'/%3E%3Cpath d='M9.9 5.2A10.5 10.5 0 0 1 12 5c5 0 9 4.5 9 7a11.7 11.7 0 0 1-2.2 3.3'/%3E%3Cpath d='M6.1 6.1A12.4 12.4 0 0 0 3 12c0 2.5 4 7 9 7a10 10 0 0 0 4.2-.9'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18'/%3E%3Cpath d='M10.6 10.6a2 2 0 0 0 2.8 2.8'/%3E%3Cpath d='M9.9 5.2A10.5 10.5 0 0 1 12 5c5 0 9 4.5 9 7a11.7 11.7 0 0 1-2.2 3.3'/%3E%3Cpath d='M6.1 6.1A12.4 12.4 0 0 0 3 12c0 2.5 4 7 9 7a10 10 0 0 0 4.2-.9'/%3E%3C/svg%3E");
}

.action-icon-show {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12c0-2.5 4-7 9-7s9 4.5 9 7-4 7-9 7-9-4.5-9-7Z'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12c0-2.5 4-7 9-7s9 4.5 9 7-4 7-9 7-9-4.5-9-7Z'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3C/svg%3E");
}

/* ---------- Accordion ---------- */

#accordion-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 28px 0 8px;
}

.accordion-item {
    overflow: hidden;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-md);
    background: var(--pf-surface);
    box-shadow: var(--pf-shadow-soft);
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border: 0;
    background: transparent;
    color: var(--pf-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.accordion-header:hover {
    background: var(--pf-surface-sunken);
}

.accordion-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    font-size: 0;
    color: var(--pf-faint);
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.2s ease;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 16px 18px 18px;
    border-top: 1px solid var(--pf-border);
    color: var(--pf-muted);
    font-size: 14px;
    line-height: 1.6;
}

.accordion-content p {
    margin: 0 0 12px;
}

.accordion-content p:last-child {
    margin-bottom: 0;
}

.accordion-content hr {
    border: 0;
    border-top: 1px solid var(--pf-border);
    margin: 16px 0;
}

.accordion-content strong {
    color: var(--pf-text);
    font-weight: 600;
}

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

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="email"],
input[type="search"],
textarea,
select {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pf-border);
    border-radius: 10px;
    background: var(--pf-surface);
    color: var(--pf-text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--pf-accent);
    box-shadow: 0 0 0 3px var(--pf-accent-soft);
}

input::placeholder,
textarea::placeholder {
    color: var(--pf-faint);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    accent-color: var(--pf-accent);
}

textarea {
    min-height: 84px;
    resize: vertical;
}

label {
    color: var(--pf-muted);
    font-size: 13px;
}

/* Primärbutton innerhalb von Formularen und Dialogen */
.accordion-content button[type="submit"],
.share-modal-actions button {
    width: auto;
    max-width: 100%;
    padding: 11px 18px;
    border: 1px solid var(--pf-accent);
    border-radius: var(--pf-radius-pill);
    background: var(--pf-accent);
    color: var(--pf-accent-contrast);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.accordion-content button[type="submit"]:hover,
.share-modal-actions button:hover {
    background: var(--pf-accent-strong);
    border-color: var(--pf-accent-strong);
}

.accordion-content button[type="submit"]:disabled {
    opacity: 0.55;
    cursor: default;
}

/* ---------- Intensität ---------- */

.intensity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pf-accent);
    vertical-align: middle;
}

.intensity-prefix {
    font-weight: 600;
}

.intensity-meter {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
}

.intensity-seg {
    width: 4px;
    height: 13px;
    border-radius: 2px;
    background: currentColor;
    opacity: 0.22;
}

.intensity-seg.is-on {
    opacity: 1;
}

.intensity-compact {
    gap: 2px;
    font-size: 10px;
}

.intensity-compact .intensity-prefix {
    display: none;
}

.intensity-compact .intensity-seg {
    width: 3px;
    height: 10px;
}

.intensity-hint {
    display: inline-flex;
    margin-top: 6px;
}

/* ---------- Archiv ---------- */

#archive-heading {
    margin: 0 0 14px;
    font-family: var(--pf-font-question);
    font-size: 27px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

#archive-list {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

#archive-list li {
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-md);
    background: var(--pf-surface);
    box-shadow: var(--pf-shadow-soft);
}

.archive-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.archive-header:hover {
    background: var(--pf-surface-sunken);
}

.archive-head-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.archive-summary {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.archive-question {
    display: block;
    overflow-wrap: anywhere;
    font-family: var(--pf-font-question);
    font-size: 17px;
    line-height: 1.35;
    color: var(--pf-text);
}

.archive-question-full {
    display: none;
}

.archive-header[aria-expanded="true"] .archive-question-preview {
    display: none;
}

.archive-header[aria-expanded="true"] .archive-question-full {
    display: inline;
}

.archive-intensity-badge {
    flex: 0 0 auto;
    align-self: flex-start;
    padding: 3px 7px;
    border-radius: var(--pf-radius-pill);
    background: var(--pf-accent-soft);
    color: var(--pf-accent);
}

.archive-intensity-badge .intensity {
    font-size: 10px;
    gap: 5px;
}

.archive-toggle {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    font-size: 0;
    color: var(--pf-faint);
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.2s ease;
}

.archive-header[aria-expanded="true"] .archive-toggle {
    transform: rotate(180deg);
}

.archive-details {
    display: none;
    padding: 0 18px 18px;
    border-top: 1px solid var(--pf-border);
    color: var(--pf-muted);
    font-size: 13px;
}

.archive-details.open {
    display: block;
    padding-top: 16px;
}

.archive-details p {
    margin: 0 0 10px;
}

.archive-details strong {
    font-family: var(--pf-font-question);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--pf-text);
}

.archive-meta,
.archive-result-info {
    color: var(--pf-faint);
    font-size: 12px;
}

.archive-result-info {
    margin: 14px 0 0;
}

.archive-intensity-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 10px 0;
}

.archive-rating {
    margin-top: 14px;
}

.archive-rating-question {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.archive-rating-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.archive-rate-btn {
    width: auto;
    padding: 8px 13px;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-pill);
    background: var(--pf-surface);
    color: var(--pf-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.archive-rate-btn:hover {
    border-color: var(--pf-border-strong);
    color: var(--pf-text);
}

.archive-rate-btn[data-rating="good"]:hover { color: var(--pf-good); border-color: var(--pf-good); }
.archive-rate-btn[data-rating="neutral"]:hover { color: var(--pf-neutral); border-color: var(--pf-neutral); }
.archive-rate-btn[data-rating="bad"]:hover { color: var(--pf-bad); border-color: var(--pf-bad); }

.archive-rate-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.archive-rating .success-message {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--pf-accent-soft);
    color: var(--pf-accent-strong);
    font-size: 13px;
    font-weight: 600;
}

.archive-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--pf-border);
}

#archive-list li.archive-hidden-item {
    opacity: 0.6;
}

#archive-list li.archive-hidden-item .archive-header {
    border-left: 3px dashed var(--pf-border-strong);
}

.archive-empty {
    color: var(--pf-faint);
    font-style: italic;
    box-shadow: none !important;
    border-style: dashed !important;
    background: transparent !important;
    padding: 18px !important;
}

/* ---------- Archiv-Filter ---------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-md);
    background: var(--pf-surface-sunken);
}

.filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.filter-bar label:has(input[type="checkbox"]) {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--pf-muted);
}

.filter-bar select,
.filter-bar input[type="search"] {
    min-width: 0;
    margin-bottom: 0;
    padding: 8px 10px;
    font-size: 13px;
}

.filter-bar input[type="search"] {
    min-width: 190px;
}

.intensity-filter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.intensity-filter select {
    width: auto;
    min-width: 62px;
}

.filter-bar button,
#archive-random {
    width: auto;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: var(--pf-radius-pill);
    background: var(--pf-accent-soft);
    color: var(--pf-accent-strong);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.filter-bar button:hover,
#archive-random:hover {
    background: var(--pf-accent);
    color: var(--pf-accent-contrast);
}

/* ---------- Pagination ---------- */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.pagination button {
    width: auto;
    padding: 8px 16px;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-pill);
    background: var(--pf-surface);
    color: var(--pf-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--pf-accent);
    color: var(--pf-accent);
}

.pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#page-info,
#archive-page-info {
    color: var(--pf-faint);
    font-size: 12px;
    min-width: 110px;
    text-align: center;
}

/* ---------- Toast ---------- */

#toast-notification {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1001;
    max-width: min(380px, calc(100vw - 32px));
    padding: 12px 18px;
    border-radius: var(--pf-radius-pill);
    background: var(--pf-text);
    color: var(--pf-surface);
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.45);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

#toast-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

#toast-notification.error {
    background: #8E3A2C;
    color: #FFF7F3;
}

/* ---------- Teilen-Dialog ---------- */

.share-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(23, 19, 15, 0.62);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.share-modal.hidden {
    display: none !important;
}

.share-modal-content {
    width: 100%;
    max-width: 540px;
    max-height: 92vh;
    overflow: auto;
    padding: 20px;
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-lg);
    background: var(--pf-surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.share-modal-header h2 {
    font-family: var(--pf-font-question);
    font-size: 20px;
    font-weight: 500;
}

.share-modal-close {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--pf-muted);
    font-family: inherit;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.share-modal-close:hover {
    background: var(--pf-surface-sunken);
    color: var(--pf-text);
}

.share-preview {
    display: block;
    width: 100%;
    max-height: 62vh;
    object-fit: contain;
    border: 1px solid var(--pf-border);
    border-radius: 12px;
    background: var(--pf-surface-sunken);
}

.share-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.share-modal-actions button {
    flex: 1 1 180px;
}

.share-modal-actions .secondary {
    border-color: var(--pf-border);
    background: var(--pf-surface);
    color: var(--pf-muted);
}

.share-modal-actions .secondary:hover {
    border-color: var(--pf-border-strong);
    background: var(--pf-surface-sunken);
    color: var(--pf-text);
}

/* ---------- Zustandsmeldungen ---------- */

.action-note {
    color: var(--pf-muted);
}

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

@media (max-width: 480px) {
    .box {
        padding: 24px 20px 22px;
    }

    .rate {
        min-height: 58px;
        padding: 9px 4px;
        font-size: 10px;
    }

    .filter-bar {
        gap: 10px;
        padding: 12px;
    }

    .filter-bar label:not(:has(input[type="checkbox"])),
    .filter-bar label:has(input[type="checkbox"]) {
        flex: 1 1 100%;
    }

    .filter-bar input[type="search"],
    .filter-bar select {
        width: 100%;
        min-width: 0;
    }

    .share-modal-actions button {
        flex-basis: 100%;
    }
}

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