 @font-face {
     font-display: swap;
     font-family: 'Playfair Display';
     font-style: normal;
     font-weight: 500;
     src: url('./fonts/playfair-display-v40-latin-500.woff2') format('woff2')
 }

 @font-face {
     font-display: swap;
     font-family: 'Playfair Display';
     font-style: normal;
     font-weight: 600;
     src: url('./fonts/playfair-display-v40-latin-600.woff2') format('woff2')
 }

 @font-face {
     font-display: swap;
     font-family: 'Playfair Display';
     font-style: normal;
     font-weight: 700;
     src: url('./fonts/playfair-display-v40-latin-700.woff2') format('woff2')
 }

 @font-face {
     font-display: swap;
     font-family: 'DM Sans';
     font-style: normal;
     font-weight: 400;
     src: url('./fonts/dm-sans-v17-latin-regular.woff2') format('woff2')
 }

 @font-face {
     font-display: swap;
     font-family: 'DM Sans';
     font-style: normal;
     font-weight: 500;
     src: url('./fonts/dm-sans-v17-latin-500.woff2') format('woff2')
 }

 @font-face {
     font-display: swap;
     font-family: 'DM Sans';
     font-style: normal;
     font-weight: 600;
     src: url('./fonts/dm-sans-v17-latin-600.woff2') format('woff2')
 }

 :root {
     --bg: #f7f8f3;
     --surface: #fff;
     --surface2: #f4f6ef;
     --text: #25342b;
     --muted: #748078;
     --line: #e5e9df;
     --green: #347653;
     --green2: #e7f1e8;
     --accent: #d8e9d9;
     --shadow: 0 18px 50px rgba(34, 59, 42, .07)
 }

 :root[data-theme="dark"] {
     --bg: #151d19;
     --surface: #202b24;
     --surface2: #29362d;
     --text: #edf4ee;
     --muted: #a6b5a9;
     --line: #39483d;
     --green: #a6d6b0;
     --green2: #2e4435;
     --accent: #354c3b;
     --shadow: 0 18px 50px rgba(0, 0, 0, .2)
 }

 * {
     box-sizing: border-box
 }

 body {
     margin: 0;
     background: var(--bg);
     color: var(--text);
     font-family: 'DM Sans', sans-serif;
     line-height: 1.6;
     min-height: 100vh
 }

 .ambient {
     position: fixed;
     inset: 0;
     pointer-events: none;
     background: radial-gradient(ellipse at 80% 8%, rgba(198, 222, 194, .22), transparent 34%), radial-gradient(ellipse at 0% 70%, rgba(232, 221, 187, .18), transparent 30%);
     z-index: -1
 }

 .shell {
     max-width: 1160px;
     margin: auto;
     padding: 28px 28px 64px
 }

 .topbar {
     max-width: 1160px;
     margin: auto;
     padding: 22px 28px;
     display: flex;
     justify-content: space-between;
     align-items: center;
     border-bottom: 1px solid var(--line)
 }

 .brand {
     display: flex;
     align-items: center;
     gap: 12px;
     text-decoration: none;
     color: var(--text);
     font-weight: 700;
     letter-spacing: -.02em
 }

 .brand-mark {
     display: grid;
     place-items: center;
     width: 38px;
     height: 38px;
     border-radius: 13px;
     background: var(--green2);
     color: var(--green);
     font-size: 23px
 }

 .brand-mark.large {
     width: 58px;
     height: 58px;
     font-size: 34px;
     margin-bottom: 20px
 }

 .top-actions {
     display: flex;
     align-items: center;
     gap: 10px
 }

 .icon-button {
     width: 40px;
     height: 40px;
     border: 1px solid var(--line);
     border-radius: 50%;
     background: var(--surface);
     color: var(--text);
     cursor: pointer;
     font-size: 18px
 }

 .hero {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 76px 5% 68px;
     background: linear-gradient(115deg, var(--surface), var(--surface2));
     border: 1px solid var(--line);
     border-radius: 28px;
     overflow: hidden;
     position: relative
 }

 .eyebrow {
     font-size: 11px;
     letter-spacing: .16em;
     font-weight: 700;
     color: var(--green);
     margin: 0 0 12px
 }

 .hero h1,
 h1 {
     font-family: 'Playfair Display', serif;
     font-size: clamp(38px, 5vw, 60px);
     line-height: 1.08;
     letter-spacing: -.035em;
     margin: 0 0 18px
 }

 .hero h1 span {
     color: var(--green)
 }

 .hero-copy {
     color: var(--muted);
     max-width: 510px;
     font-size: 16px
 }

 .hero-flower {
     font-size: clamp(120px, 20vw, 220px);
     line-height: 1;
     color: var(--accent);
     transform: rotate(-12deg);
     margin-right: 4%;
     text-shadow: 0 8px 40px rgba(52, 118, 83, .08)
 }

 .content-grid {
     display: grid;
     grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr);
     gap: 34px;
     margin-top: 42px;
     align-items: start
 }

 .section-heading,
 .admin-heading {
     display: flex;
     justify-content: space-between;
     align-items: end;
     gap: 18px;
     margin-bottom: 20px
 }

 .section-heading h2,
 .form-panel h2,
 .panel h2 {
     font-family: 'Playfair Display', serif;
     font-size: 25px;
     line-height: 1.2;
     margin: 0
 }

 .count-pill {
     border-radius: 30px;
     padding: 6px 12px;
     background: var(--green2);
     color: var(--green);
     font-size: 12px;
     font-weight: 700
 }

 .entry-list {
     display: grid;
     gap: 15px
 }

 .entry-card,
 .panel,
 .form-panel {
     background: var(--surface);
     border: 1px solid var(--line);
     border-radius: 20px;
     padding: 23px;
     box-shadow: var(--shadow)
 }

 .entry-top {
     display: flex;
     align-items: center;
     gap: 12px
 }

 .avatar {
     width: 42px;
     height: 42px;
     border-radius: 15px;
     display: grid;
     place-items: center;
     background: var(--green2);
     color: var(--green);
     font-weight: 700;
     font-size: 18px
 }

 .entry-meta {
     display: grid;
     line-height: 1.35
 }

 .entry-meta time {
     font-size: 12px;
     color: var(--muted);
     margin-top: 4px
 }

 .website-link {
     margin-left: auto;
     color: var(--green);
     font-size: 12px;
     text-decoration: none
 }

 .entry-message {
     white-space: normal;
     overflow-wrap: anywhere;
     margin: 18px 0 2px
 }

 .reply {
     background: var(--surface2);
     border-left: 3px solid var(--green);
     padding: 13px 16px;
     margin-top: 17px;
     border-radius: 0 12px 12px 0
 }

 .reply strong {
     font-size: 13px;
     color: var(--green)
 }

 .reply p {
     margin: 5px 0 0;
     white-space: pre-wrap
 }

 .form-panel {
     position: sticky;
     top: 20px;
     padding: 27px
 }

 .form-panel h2 {
     font-size: 28px
 }

 .muted,
 .form-note {
     color: var(--muted)
 }

 .form-stack {
     display: grid;
     gap: 16px;
     margin-top: 20px
 }

 .form-stack label {
     display: grid;
     gap: 7px;
     font-size: 13px;
     font-weight: 600
 }

 .form-stack input,
 .form-stack textarea,
 .form-stack select,
 .inline-form input,
 select {
     width: 100%;
     padding: 12px 13px;
     border: 1px solid var(--line);
     border-radius: 11px;
     background: var(--bg);
     color: var(--text);
     font: inherit;
     font-size: 14px;
     outline: none
 }

 .form-stack input:focus,
 .form-stack textarea:focus,
 .form-stack select:focus {
     border-color: var(--green);
     box-shadow: 0 0 0 3px var(--green2)
 }

 textarea {
     resize: vertical
 }

 .optional {
     font-weight: 400;
     color: var(--muted)
 }

 .emoji-row {
     display: flex;
     flex-wrap: wrap;
     align-items: center;
     gap: 7px;
     font-size: 12px;
     color: var(--muted)
 }

 .emoji-button {
     border: 1px solid var(--line);
     background: var(--surface2);
     border-radius: 9px;
     padding: 5px 8px;
     cursor: pointer;
     font-size: 17px
 }

 .emoji-button:hover {
     transform: translateY(-2px)
 }

 .form-note {
     font-size: 11px;
     margin: 0
 }

 .button {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     gap: 10px;
     padding: 11px 17px;
     border-radius: 11px;
     font: inherit;
     font-size: 13px;
     font-weight: 700;
     text-decoration: none;
     border: 1px solid transparent;
     cursor: pointer;
     transition: .15s
 }

 .button-primary {
     background: var(--green);
     color: #fff
 }

 .button-primary:hover {
     filter: brightness(1.08);
     transform: translateY(-1px)
 }

 .button-secondary {
     background: var(--green2);
     color: var(--green)
 }

 .button-ghost {
     border-color: var(--line);
     background: var(--surface);
     color: var(--text)
 }

 .button-wide {
     width: 100%
 }

 .alert {
     padding: 13px 16px;
     border-radius: 12px;
     margin: 18px 0;
     font-size: 13px
 }

 .alert.success {
     background: #e7f4e9;
     color: #23623b
 }

 .alert.error {
     background: #fff0ed;
     color: #9b3d30
 }

 .alert.warning {
     background: #fff7df;
     color: #80621c
 }

 .empty-state {
     text-align: center;
     padding: 50px 20px;
     border: 1px dashed var(--line);
     border-radius: 18px;
     color: var(--muted)
 }

 .empty-state span {
     font-size: 36px
 }

 .empty-state h3 {
     color: var(--text)
 }

 .pagination {
     display: flex;
     gap: 7px;
     margin-top: 22px
 }

 .pagination a {
     padding: 7px 12px;
     border: 1px solid var(--line);
     border-radius: 9px;
     color: var(--text);
     text-decoration: none
 }

 .pagination a.current {
     background: var(--green);
     color: white
 }

 .footer {
     text-align: center;
     color: var(--muted);
     font-size: 12px;
     padding: 0 20px 28px
 }

 .footer a,
 .text-link {
     color: var(--green);
     text-decoration: none
 }

 .admin-nav {
     display: flex;
     gap: 8px;
     flex-wrap: wrap;
     padding: 12px;
     background: var(--surface);
     border: 1px solid var(--line);
     border-radius: 14px;
     margin: 20px 0 34px
 }

 .admin-nav a {
     padding: 8px 12px;
     border-radius: 9px;
     text-decoration: none;
     color: var(--muted);
     font-size: 12px;
     font-weight: 600
 }

 .admin-nav a.active,
 .admin-nav a:hover {
     background: var(--green2);
     color: var(--green)
 }

 .admin-heading {
     margin: 12px 0 25px
 }

 .admin-heading h1 {
     font-size: 40px;
     margin-bottom: 7px
 }

 .stats-grid {
     display: grid;
     grid-template-columns: repeat(4, 1fr);
     gap: 14px;
     margin-bottom: 24px
 }

 .stat-card {
     background: var(--surface);
     border: 1px solid var(--line);
     border-radius: 17px;
     padding: 19px;
     box-shadow: var(--shadow)
 }

 .stat-card span {
     color: var(--green);
     font-size: 21px
 }

 .stat-card p {
     font-size: 12px;
     color: var(--muted);
     margin: 9px 0 2px
 }

 .stat-card strong {
     font-size: 30px
 }

 .table-wrap {
     overflow-x: auto;
     margin-top: 15px
 }

 table {
     width: 100%;
     border-collapse: collapse;
     font-size: 13px
 }

 th,
 td {
     text-align: left;
     padding: 13px 10px;
     border-bottom: 1px solid var(--line);
     vertical-align: top
 }

 th {
     color: var(--muted);
     font-size: 11px;
     text-transform: uppercase;
     letter-spacing: .08em
 }

 .table-message {
     margin: 3px 0;
     color: var(--muted);
     max-width: 360px
 }

 .status {
     font-size: 11px;
     padding: 4px 8px;
     border-radius: 20px;
     background: var(--surface2)
 }

 .status.approved {
     color: #287144;
     background: #e5f4e8
 }

 .status.pending {
     color: #8a6a19;
     background: #fff4d7
 }

 .status.rejected {
     color: #9b3d30;
     background: #fff0ed
 }

 .action-links {
     display: flex;
     gap: 12px;
     white-space: nowrap
 }

 .action-links a,
 .link-danger {
     font-size: 12px;
     color: var(--green);
     text-decoration: none;
     background: none;
     border: 0;
     padding: 0;
     cursor: pointer
 }

 .link-danger {
     color: #b64b3e
 }

 .settings-grid {
     column-count: 2;
     column-gap: 20px;
     padding-bottom: 84px
 }

 .settings-grid>.panel {
     break-inside: avoid;
     page-break-inside: avoid;
     margin-bottom: 20px
 }

 @media (max-width:1000px) {
     .settings-grid {
         column-count: 2
     }
 }

 @media (max-width:600px) {
     .settings-grid {
         column-count: 1;
         padding-bottom: 88px
     }

     .settings-save-bar {
         left: 15px;
         right: 15px;
         bottom: 14px
     }
 }

 .settings-grid .panel h2 {
     margin-bottom: 15px
 }

 .full-width {
     grid-column: 1/-1
 }

 .check-label {
     display: flex !important;
     grid-template-columns: auto 1fr !important;
     align-items: center;
     gap: 10px !important
 }

 .check-label input {
     width: auto !important;
     accent-color: var(--green)
 }

 .inline-form {
     display: flex;
     gap: 10px;
     align-items: center;
     flex-wrap: wrap;
     margin-top: 18px
 }

 .inline-form input {
     flex: 1;
     min-width: 170px
 }

 .filter-row,
 .button-row {
     display: flex;
     align-items: center;
     gap: 10px;
     flex-wrap: wrap;
     justify-content: space-between
 }

 .filter-row h2 {
     margin: 0
 }

 .narrow {
     max-width: 520px;
     margin: 0 auto
 }

 .install-shell {
     min-height: 85vh;
     display: grid;
     place-items: center
 }

 .install-shell .panel {
     width: 100%
 }

 .install-shell h1 {
     font-size: 42px
 }

 .honeypot {
     position: absolute !important;
     left: -10000px !important;
     width: 1px !important;
     height: 1px !important;
     overflow: hidden !important
 }

 .sr-only {
     position: absolute;
     width: 1px;
     height: 1px;
     padding: 0;
     margin: -1px;
     overflow: hidden;
     clip: rect(0, 0, 0, 0);
     white-space: nowrap;
     border: 0
 }

 @media(max-width:850px) {
     .content-grid {
         grid-template-columns: 1fr
     }

     .form-panel {
         position: static
     }

     .hero {
         padding: 55px 7%
     }

     .hero-flower {
         margin-right: 0
     }

     .stats-grid {
         grid-template-columns: repeat(2, 1fr)
     }
 }

 @media(max-width:600px) {
     .shell {
         padding: 18px 15px 45px
     }

     .topbar {
         padding: 16px 15px
     }

     .hero {
         padding: 38px 25px
     }

     .hero-flower {
         display: none
     }

     .section-heading {
         align-items: start;
         flex-direction: column
     }

     .settings-grid {
         grid-template-columns: 1fr
     }

     .full-width {
         grid-column: auto
     }

     .admin-heading h1 {
         font-size: 34px
     }

     .stats-grid {
         gap: 9px
     }

     .stat-card {
         padding: 13px
     }

     .stat-card strong {
         font-size: 25px
     }

     .entry-card,
     .panel,
     .form-panel {
         padding: 18px
     }

     .admin-nav {
         gap: 2px
     }

     .admin-nav a {
         padding: 7px 9px
     }

     .inline-form {
         align-items: stretch;
         flex-direction: column
     }

     .inline-form input {
         width: 100%
     }
 }

 .message-counter {
     display: flex;
     justify-content: space-between;
     gap: 12px;
     color: var(--muted);
     font-size: 11px
 }

 .message-counter .limit-reached {
     color: #b64b3e;
     font-weight: 700
 }

 .emoji-picker {
     border: 1px solid var(--line);
     border-radius: 11px;
     background: var(--surface2);
     padding: 9px 11px
 }

 .emoji-picker summary {
     cursor: pointer;
     color: var(--green);
     font-size: 12px;
     font-weight: 700
 }

 .emoji-picker-grid {
     display: grid;
     grid-template-columns: repeat(8, minmax(0, 1fr));
     gap: 5px;
     margin-top: 10px
 }

 .emoji-picker-grid .emoji-button {
     padding: 5px 2px
 }

 .entry-message a {
     color: var(--green);
     text-decoration: underline;
     text-underline-offset: 2px;
     overflow-wrap: anywhere
 }

 .brand-mark img {
     display: block;
     width: 75%;
     height: 75%;
     object-fit: contain
 }

 .hero-flower img {
     display: block;
     width: auto;
     height: clamp(120px, 20vw, 220px);
     max-width: 30vw;
     object-fit: contain
 }

 .settings-image-preview {
     display: block;
     object-fit: contain;
     border: 1px solid var(--line);
     border-radius: 12px;
     background: var(--surface2);
     padding: 10px
 }

 .brand-mark-image {
     width: 76px;
     height: 76px
 }

 .hero-image-preview {
     width: 180px;
     height: 150px;
     max-width: 100%
 }

 .settings-save-bar {
     position: fixed;
     right: 28px;
     bottom: 20px;
     z-index: 30;
     display: flex;
     justify-content: flex-end;
     padding: 10px 14px;
     border-radius: 14px;
     background: color-mix(in srgb, var(--surface) 88%, transparent);
     backdrop-filter: blur(10px);
     border: 1px solid var(--line);
     box-shadow: var(--shadow)
 }

 .social-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--green, currentColor);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

/* Standardmäßig etwas ausgegraut, solange kein Wert eingetragen ist */
.social-btn.is-muted {
  opacity: 0.45;
  color: var(--muted, #777);
}

.social-btn.is-muted:hover,
.social-btn.is-muted:focus-visible {
  opacity: 0.8;
}

/* Aktiv geöffneter Button */
.social-btn.is-open {
  opacity: 1;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 25%, transparent);
}

/* Häkchen unten rechts: nur sichtbar, wenn Feld Inhalt hat */
.social-btn .social-check {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: none;
  color: var(--green, #16a34a);
}

.social-btn.has-value .social-check {
  display: block;
}

.social-field[hidden] {
  display: none;
}

.entry-socials {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto; /* schiebt sie im Flex-Header direkt nach links an entry-meta */
}

.reply strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.reply strong svg {
    flex-shrink: 0;
}