.profile-header {
  align-items: flex-start;
  display: flex;
  justify-content: center;
}

/* The profile picture (inc/avatar-helpers.php, js/avatar.js). */
.avatar-editor {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.avatar-editor-photo {
  background: #d6dbe0;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: var(--book-shadow);
  cursor: pointer;
  height: 124px;
  padding: 0;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  width: 124px;
}

.avatar-editor-photo img {
  border-radius: 50%;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

/* With a mouse: "Change photo" over the picture. */
.avatar-editor-hover {
  align-items: center;
  background: rgba(23,25,29,0.5);
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
  inset: 0;
  justify-content: center;
  opacity: 0;
  position: absolute;
  transition: opacity 0.2s ease;
}

.avatar-editor-hover i {
  font-size: 20px;
}

@media (hover: hover) {
  .avatar-editor-photo:hover .avatar-editor-hover {
    opacity: 1;
  }
}

.avatar-editor-photo:focus-visible {
  outline: 3px solid var(--book-teal);
  outline-offset: 3px;
}

/* A photo dragged over the picture. */
.avatar-editor-photo.is-dragover {
  box-shadow: 0 0 0 4px var(--book-teal), var(--book-shadow);
  transform: scale(1.04);
}

.avatar-editor-photo.is-dragover .avatar-editor-hover {
  opacity: 1;
}

.avatar-editor-badge {
  align-items: center;
  background: var(--book-teal);
  border: 3px solid #fff;
  border-radius: 50%;
  bottom: -2px;
  box-shadow: 0 4px 10px rgba(30,105,104,0.35);
  color: #fff;
  display: flex;
  font-size: 13px;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: -2px;
  width: 36px;
}

.avatar-editor-busy {
  align-items: center;
  background: rgba(255,255,255,0.75);
  border-radius: 50%;
  color: var(--book-teal);
  display: none;
  font-size: 26px;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.avatar-editor.is-busy .avatar-editor-busy {
  display: flex;
}

/* The menu under the picture. */
.avatar-editor-menu {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(23,25,29,0.18);
  display: grid;
  left: 50%;
  min-width: 220px;
  padding: 6px;
  position: absolute;
  top: 136px;
  transform: translateX(-50%);
  z-index: 30;
}

.avatar-editor-menu[hidden] {
  display: none;
}

.avatar-editor-menu-item {
  align-items: center;
  justify-content: flex-start;
  background: none;
  border: 0;
  border-radius: 10px;
  color: var(--book-ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  position: relative;
  text-align: left;
  width: 100%;
}

.avatar-editor-menu-item:hover,
.avatar-editor-menu-item:focus-within {
  background: rgba(30,105,104,0.08);
}

.avatar-editor-menu-item i {
  color: var(--book-teal);
  width: 18px;
}

.avatar-editor-menu-item input[type="file"] {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.avatar-editor-menu-item.is-danger,
.avatar-editor-menu-item.is-danger i {
  color: var(--book-danger);
}

.avatar-editor-menu-item.is-danger:hover {
  background: rgba(181,73,91,0.08);
}

/* "Remove" only with a picture of one's own; the camera only on phones. */
.avatar-editor:not(.has-image) .avatar-editor-remove {
  display: none;
}

@media (hover: hover) {
  .avatar-editor-camera {
    display: none;
  }
}

.avatar-editor-hint {
  color: var(--book-muted);
  font-size: 12px;
  margin: 2px 0 0;
  text-align: center;
}

.avatar-editor-status {
  color: var(--book-teal);
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}

.avatar-editor-status.is-error {
  color: var(--book-error);
}

.avatar-editor-status[hidden] {
  display: none;
}

/* The cropping dialog. */
html.avatar-crop-open,
html.avatar-crop-open body {
  overflow: hidden;
}

html.avatar-crop-open .bottom-nav {
  display: none;
}

.avatar-crop {
  align-items: center;
  background: rgba(23,25,29,0.6);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 16px;
  position: fixed;
  z-index: 10060;
}

.avatar-crop[hidden] {
  display: none;
}

.avatar-crop-box {
  background: var(--book-bg);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(23,25,29,0.35);
  display: grid;
  gap: 14px;
  max-width: 420px;
  padding: 22px;
  width: 100%;
}

.avatar-crop-box h2 {
  font-size: 20px;
  font-weight: 900;
  margin: 0;
}

.avatar-crop-help {
  color: var(--book-muted);
  font-size: 13px;
  margin: -8px 0 0;
}

.avatar-crop-stage {
  aspect-ratio: 1;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
}

.avatar-crop-canvas {
  cursor: grab;
  display: block;
  height: 100%;
  touch-action: none;
  width: 100%;
}

.avatar-crop-canvas:active {
  cursor: grabbing;
}

.avatar-crop-canvas:focus-visible {
  outline: 3px solid var(--book-teal);
  outline-offset: -3px;
}

.avatar-crop-tools {
  align-items: center;
  display: flex;
  gap: 10px;
}

.avatar-crop-tools > i {
  color: var(--book-muted);
}

.avatar-crop-zoom-small {
  font-size: 11px;
}

.avatar-crop-zoom-large {
  font-size: 17px;
}

.avatar-crop-zoom {
  accent-color: var(--book-teal);
  flex: 1;
  min-width: 0;
}

.avatar-crop-rotate {
  align-items: center;
  background: rgba(23,25,29,0.06);
  border: 0;
  border-radius: 50%;
  color: var(--book-ink);
  cursor: pointer;
  display: flex;
  flex-shrink: 0;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.avatar-crop-rotate:hover {
  background: rgba(23,25,29,0.12);
}

.avatar-crop-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.avatar-crop-actions .btn {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.avatar-crop-actions .avatar-crop-cancel {
  background: transparent;
  border: 1px solid var(--book-line);
  box-shadow: none;
  color: var(--book-ink);
}

.avatar-crop-actions .avatar-crop-cancel:hover {
  background: rgba(23,25,29,0.05);
}

@media (max-width: 640px) {
  .avatar-crop {
    align-items: flex-end;
    padding: 0;
  }

  .avatar-crop-box {
    border-radius: 22px 22px 0 0;
    max-width: none;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  .avatar-crop-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

.profile-rating-row {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}

.profile-rating-count {
  color: var(--book-muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-info-textarea {
  height: 140px;
  margin-bottom: 6px;
  resize: none;
}

.profile-info-counter {
  color: var(--book-muted);
  font-size: 12px;
  margin: 0;
  text-align: right;
}

.profile-info-counter.is-near-limit .profile-info-counter-count {
  color: var(--book-orange);
  font-weight: 800;
}

.profile-field-box {
  background: var(--book-panel-strong);
  border: 1px solid var(--book-line);
  border-radius: 16px;
  box-shadow: var(--book-shadow);
  margin-bottom: 14px;
  padding: 14px 16px;
}

.profile-section {
  margin-top: 32px;
}

.profile-section h2 {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 14px;
}

.profile-section-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.profile-section-head h2 {
  margin: 0;
}

.profile-favorites-link {
  align-items: center;
  background: rgba(224,48,63,0.1);
  border-radius: 999px;
  color: var(--book-red);
  display: flex;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  margin-bottom: 14px;
  padding: 9px 16px;
  transition: background 0.15s ease;
}

.profile-favorites-link:hover {
  background: rgba(224,48,63,0.18);
}

.profile-section .empty {
  color: var(--book-muted);
}

.help-contact-box {
  line-height: 1.6;
}

.help-page h2 i {
  color: var(--book-muted);
  margin-right: 8px;
}

.help-impressum-box {
  border-left: 3px solid var(--book-line);
  border-radius: 4px 16px 16px 4px;
  color: var(--book-muted);
  font-size: 14px;
  line-height: 1.7;
}

.help-feedback-form {
  background: var(--book-panel-strong);
  border: 1px solid var(--book-line);
  border-radius: 16px;
  box-shadow: var(--book-shadow);
  padding: 16px;
}

.help-feedback-input {
  border: 1px solid var(--book-line);
  border-radius: 10px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  resize: vertical;
  width: 100%;
}

.help-feedback-submit {
  margin-top: 12px;
}

.help-faq-question {
  font-size: 17px;
  font-weight: 900;
  margin: 0 0 8px;
}

.help-faq-answer {
  color: var(--book-muted);
  line-height: 1.6;
  margin: 0;
}

.my-book-card.is-search-hidden {
  display: none;
}

/* Long lists, 16 at a time (js/profile.js) — the first 16 already before
   the script runs, so a long list never flashes up in full. */
ul[data-paged]:not(.is-paged) > li:nth-child(n+17),
ul[data-paged] > li.is-paged-out {
  display: none !important;
}

.list-paging {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.list-paging[hidden],
.list-paging [hidden] {
  display: none;
}

.list-paging .my-books-show-more-btn {
  margin-top: 0;
}

.my-books-search {
  align-items: center;
  background: var(--book-panel-strong);
  border: 1px solid var(--book-line);
  border-radius: 999px;
  box-shadow: var(--book-shadow);
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 8px 0 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.my-books-search:focus-within {
  border-color: var(--book-teal);
  box-shadow: 0 0 0 3px rgba(30,105,104,0.16);
}

.my-books-search i.fa-search {
  color: var(--book-muted);
  transition: color 0.18s ease;
}

.my-books-search:focus-within i.fa-search {
  color: var(--book-teal);
}

.my-books-search .my-books-search-input,
.my-books-search .my-books-search-input:focus {
  background: transparent;
  border: 0;
  border-radius: 0;
  flex: 1;
  font: inherit;
  margin: 0;
  min-height: 46px;
  outline: 0;
  padding: 0;
  text-align: center;
}

.my-books-search-clear {
  align-items: center;
  background: var(--book-line);
  border: 0;
  border-radius: 50%;
  color: var(--book-ink);
  cursor: pointer;
  display: flex;
  flex-shrink: 0;
  font-size: 11px;
  height: 24px;
  justify-content: center;
  min-height: 0;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  width: 24px;
}

.my-books-search-clear:hover {
  background: var(--book-teal);
  color: #fff;
  transform: scale(1.08);
}

.my-books-search-empty {
  color: var(--book-muted);
}

.my-books-show-more-btn {
  background: var(--book-panel-strong);
  border: 1px solid var(--book-line);
  border-radius: 999px;
  color: var(--book-ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  margin-top: 14px;
  padding: 11px 22px;
  transition: background 0.15s ease;
}

.my-books-show-more-btn:hover {
  background: var(--book-line);
}

.my-books-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.my-book-card {
  align-items: center;
  background: var(--book-panel-strong);
  border: 1px solid var(--book-line);
  border-radius: 16px;
  box-shadow: var(--book-shadow);
  cursor: pointer;
  display: flex;
  gap: 14px;
  padding: 12px;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Same lift as the category tiles (.book-category-tile:hover) and the
   search-result listing cards (.listing-card:hover). */
.my-book-card:hover {
  box-shadow: 0 18px 36px rgba(42,38,34,0.14);
  transform: translateY(-3px);
}

.my-book-thumb {
  display: block;
  position: relative;
}

.my-book-thumb img {
  border-radius: 10px;
  height: 68px;
  background-color: #f1ede7;
  object-fit: contain;
  width: 68px;
}

.my-book-card.is-sold {
  background: var(--book-panel);
}

.my-book-card.is-sold .my-book-thumb img {
  filter: grayscale(0.5);
  opacity: 0.75;
}

/* Collapsible <details> section header (e.g. "Sold" and "Blocked users" on the profile). */
.profile-collapsible summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
}

.profile-collapsible summary::-webkit-details-marker {
  display: none;
}

.profile-collapsible summary::marker {
  display: none;
}

.profile-collapsible summary h2 {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 0;
}

.profile-collapsible summary h2 i {
  color: var(--book-muted);
}

.profile-collapsible-count {
  background: var(--book-line);
  border-radius: 999px;
  color: var(--book-ink);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 10px;
}

.profile-collapsible-chevron {
  color: var(--book-muted);
  font-size: 13px;
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.profile-collapsible[open] .profile-collapsible-chevron {
  transform: rotate(180deg);
}

/*
 * Delete action for a card in "My Books" — reuses .item-post-delete-btn's
 * pill look (same red pill/icon/label as the delete button on the item's
 * own edit page), just anchored to the top-right corner of the card here
 * instead of sitting inline next to a heading.
 */
.my-book-delete-btn {
  position: absolute;
  right: 10px;
  top: 10px;
}

.my-book-delete-btn:hover {
  background: var(--book-danger);
  color: #fff;
}

.my-book-delete-btn:active {
  transform: scale(0.92);
}

.favorite-books h2 {
  align-items: center;
  display: flex;
  gap: 10px;
}

.favorite-books h2 i,
.favorite-books.profile-collapsible summary h2 i {
  color: var(--book-red);
}

.my-book-unfavorite-btn {
  align-items: center;
  background: rgba(224,48,63,0.1);
  border: 1px solid rgba(224,48,63,0.24);
  border-radius: 999px;
  color: var(--book-red);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  padding: 9px 16px;
  position: absolute;
  right: 10px;
  top: 10px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.my-book-unfavorite-btn:hover {
  background: var(--book-red);
  border-color: var(--book-red);
  color: #fff;
}

.my-book-unfavorite-btn:active {
  transform: scale(0.92);
}

.my-book-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.my-book-title {
  color: var(--book-ink);
  font-weight: 800;
}

.my-book-meta {
  color: var(--book-muted);
  font-size: 13px;
}

.my-book-desc {
  color: var(--book-muted);
  font-size: 13px;
  margin: 4px 0;
}

.my-book-price {
  color: var(--book-teal);
  font-weight: 900;
}

.my-book-price-drop-badge {
  align-items: center;
  background: rgba(43,153,89,0.12);
  border-radius: 999px;
  color: #2b9959;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  margin-left: 6px;
  padding: 3px 9px;
  vertical-align: middle;
}

.seller-reviews .reviews-summary {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.reviews-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.review-card {
  border-top: 1px solid var(--book-line);
  padding: 12px 0;
}

.review-head {
  align-items: center;
  display: flex;
  gap: 10px;
}

.review-author {
  font-weight: 900;
}

.review-author-anonymous {
  color: var(--book-muted);
  font-style: italic;
}

.review-author-anonymous i {
  margin-right: 2px;
}

.review-date {
  color: var(--book-muted);
  font-size: 12px;
}

.review-comment {
  margin: 6px 0 0;
}

.leave-review-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.star-picker i {
  color: var(--book-teal);
  cursor: pointer;
  font-size: 20px;
  margin-right: 4px;
}

.leave-review-form textarea {
  border: 1px solid var(--book-line);
  border-radius: 14px;
  font-family: inherit;
  font-size: 14px;
  min-height: 90px;
  padding: 12px 14px;
  resize: vertical;
}

.leave-review-form .btn {
  align-self: flex-start;
}

.profile-page-settings h1 {
  font-size: 32px;
  font-weight: 900;
  margin: 0 0 8px;
}

.settings-language-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-language-list .btn {
  background: transparent;
  border: 1px solid var(--book-line);
  color: var(--book-ink);
}

.settings-language-list .btn.settings-language-active {
  background: var(--book-teal);
  border-color: var(--book-teal);
  color: #fff;
}

.settings-notify-list {
  background: var(--book-panel-strong);
  border: 1px solid var(--book-line);
  border-radius: 16px;
  box-shadow: var(--book-shadow);
  overflow: hidden;
}

.settings-notify-row {
  align-items: center;
  border-bottom: 1px solid var(--book-line);
  cursor: pointer;
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.settings-notify-row:last-child {
  border-bottom: 0;
}

.settings-notify-row:hover {
  background: rgba(30,105,104,0.06);
}

.settings-notify-row.is-saving {
  opacity: 0.65;
}

.settings-notify-row.is-saved {
  background: rgba(30,105,104,0.1);
  box-shadow: inset 3px 0 0 var(--book-teal);
}

.settings-notify-icon {
  align-items: center;
  border-radius: 10px;
  display: flex;
  flex-shrink: 0;
  font-size: 15px;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.settings-notify-icon-teal {
  background: rgba(30,105,104,0.12);
  color: var(--book-teal);
}

.settings-notify-icon-purple {
  background: rgba(145,89,229,0.12);
  color: var(--book-purple);
}

.settings-notify-icon-blue {
  background: rgba(61,114,196,0.12);
  color: var(--book-blue);
}

.settings-notify-icon-orange {
  background: rgba(215,111,53,0.12);
  color: var(--book-orange);
}

.settings-notify-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settings-notify-title {
  font-weight: 800;
}

.settings-notify-desc {
  color: var(--book-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Custom pill switch — the native checkbox stays present (and clickable,
   since .settings-notify-row is itself a <label>) but is visually hidden;
   .settings-toggle-track/-thumb do the drawing, driven purely by :checked. */
.settings-toggle {
  flex-shrink: 0;
  position: relative;
}

.settings-toggle input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.settings-toggle-track {
  background: var(--book-line);
  border-radius: 999px;
  display: block;
  height: 26px;
  position: relative;
  transition: background 0.2s ease;
  width: 44px;
}

.settings-toggle-thumb {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(23,25,29,0.25);
  height: 20px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform 0.2s ease;
  width: 20px;
}

.settings-toggle input:checked ~ .settings-toggle-track {
  background: var(--book-teal);
}

.settings-toggle input:checked ~ .settings-toggle-track .settings-toggle-thumb {
  transform: translateX(18px);
}

.settings-toggle input:focus-visible ~ .settings-toggle-track {
  box-shadow: 0 0 0 3px rgba(30,105,104,0.3);
}

.settings-account-list {
  background: var(--book-panel-strong);
  border: 1px solid var(--book-line);
  border-radius: 16px;
  box-shadow: var(--book-shadow);
  overflow: hidden;
}

.settings-account-row {
  align-items: center;
  border-bottom: 1px solid var(--book-line);
  color: var(--book-ink);
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  transition: background 0.15s ease;
}

.settings-account-row:last-child {
  border-bottom: 0;
}

.settings-account-row:hover {
  background: rgba(30,105,104,0.08);
}

.settings-account-icon {
  align-items: center;
  background: rgba(30,105,104,0.12);
  border-radius: 10px;
  color: var(--book-teal);
  display: flex;
  flex-shrink: 0;
  font-size: 15px;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.settings-account-label {
  flex: 1;
  font-weight: 800;
}

.settings-account-chevron {
  color: var(--book-muted);
  font-size: 13px;
}

.settings-account-row-logout {
  color: var(--book-error);
}

.settings-account-row-logout .settings-account-icon {
  background: rgba(192,57,43,0.12);
  color: var(--book-error);
}

.public-profile-card {
  align-items: center;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.public-profile-avatar-wrap {
  background: #d6dbe0;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  box-shadow: var(--book-shadow);
  height: 140px;
  overflow: hidden;
  width: 140px;
}

.public-profile-avatar-wrap img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.public-profile-blocked-banner {
  align-items: center;
  background: rgba(224,48,63,0.08);
  border: 1px solid rgba(224,48,63,0.24);
  border-radius: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding: 16px 18px;
  text-align: left;
  width: 100%;
}

.public-profile-blocked-banner > i {
  color: var(--book-red);
  font-size: 22px;
}

.public-profile-blocked-banner-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 200px;
}

.public-profile-blocked-banner-text strong {
  color: var(--book-ink);
  font-size: 15px;
}

.public-profile-blocked-banner-text span {
  color: var(--book-muted);
  font-size: 13px;
}

.public-profile-unblock-btn {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(224,48,63,0.4);
  border-radius: 999px;
  color: var(--book-red);
  cursor: pointer;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  transition: background 0.15s ease, color 0.15s ease;
}

.public-profile-unblock-btn:hover {
  background: var(--book-red);
  color: #fff;
}

.public-profile-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.public-profile-block-btn {
  align-items: center;
  background: rgba(224,48,63,0.1);
  border: 1px solid rgba(224,48,63,0.24);
  border-radius: 999px;
  color: var(--book-red);
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  transition: background 0.15s ease, color 0.15s ease;
}

.public-profile-block-btn:hover {
  background: var(--book-red);
  color: #fff;
}

.public-profile-block-btn.is-active {
  background: var(--book-red);
  color: #fff;
}

.profile-blocked-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Each blocked user is a card, same look and hover lift as .my-book-card
   in the "Sold" section of the profile. */
.profile-blocked-row {
  align-items: center;
  background: var(--book-panel-strong);
  border: 1px solid var(--book-line);
  border-radius: 16px;
  box-shadow: var(--book-shadow);
  display: flex;
  gap: 14px;
  padding: 12px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.profile-blocked-row:hover {
  box-shadow: 0 18px 36px rgba(42,38,34,0.14);
  transform: translateY(-3px);
}

.profile-blocked .profile-blocked-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.profile-blocked-link {
  align-items: center;
  color: inherit;
  display: flex;
  flex: 1;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.profile-blocked-avatar {
  background: var(--book-line);
  border-radius: 50%;
  flex-shrink: 0;
  height: 48px;
  object-fit: cover;
  width: 48px;
}

.profile-blocked-name {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-profile-name {
  font-size: 26px;
  font-weight: 900;
  margin: 16px 0 4px;
}

.public-profile-age {
  color: var(--book-muted);
  font-size: 14px;
  margin: 0 0 12px;
}

.public-profile-description {
  color: var(--book-ink);
  max-width: 480px;
  margin: 0 0 8px;
}

.public-profile-shipping {
  align-items: center;
  color: var(--book-muted);
  display: flex;
  font-size: 13px;
  gap: 7px;
  justify-content: center;
  margin: 0 0 8px;
  max-width: 320px;
  text-align: center;
}

.public-profile-shipping i {
  color: var(--book-teal);
}

/* Settings: "Delete account" danger zone + its confirmation dialog. */
.settings-danger h2 {
  color: var(--book-red);
}

.settings-danger-card {
  align-items: center;
  background: var(--book-panel-strong);
  border: 1px solid rgba(224,48,63,0.25);
  border-radius: 16px;
  display: flex;
  gap: 14px;
  padding: 16px;
}

.settings-danger-icon {
  align-items: center;
  background: rgba(224,48,63,0.1);
  border-radius: 50%;
  color: var(--book-red);
  display: flex;
  flex-shrink: 0;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.settings-danger-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.settings-danger-text span {
  color: var(--book-muted);
  font-size: 13px;
}

.settings-danger-btn {
  background: transparent;
  border: 1px solid var(--book-red);
  border-radius: 999px;
  color: var(--book-red);
  cursor: pointer;
  flex-shrink: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 16px;
  transition: background 0.15s ease, color 0.15s ease;
}

.settings-danger-btn:hover {
  background: var(--book-red);
  color: #fff;
}

.settings-delete-box {
  max-width: 440px;
  text-align: left;
}

.settings-delete-icon {
  align-items: center;
  background: rgba(224,48,63,0.12);
  border-radius: 50%;
  color: var(--book-red);
  display: flex;
  font-size: 20px;
  height: 52px;
  justify-content: center;
  margin-bottom: 12px;
  width: 52px;
}

.settings-delete-box h3 {
  font-size: 19px;
  font-weight: 900;
  margin: 0 0 6px;
}

.settings-delete-box p {
  color: var(--book-muted);
  font-size: 14px;
  margin: 0 0 8px;
}

.settings-delete-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.settings-delete-list li {
  align-items: center;
  display: flex;
  font-size: 14px;
  gap: 10px;
}

.settings-delete-list i {
  color: var(--book-red);
  text-align: center;
  width: 16px;
}

.settings-delete-box label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.settings-delete-box input[type="text"] {
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.settings-delete-go {
  align-items: center;
  background: var(--book-red);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  padding: 10px 18px;
  transition: opacity 0.15s ease;
}

.settings-delete-go:hover {
  color: #fff;
  filter: brightness(0.92);
}

.settings-delete-go.is-disabled {
  cursor: not-allowed;
  filter: none;
  opacity: 0.4;
}

@media (max-width: 640px) {
  .settings-danger-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .settings-danger-btn {
    width: 100%;
  }
}

/* Public profile: the member's own pickup place, private to them. */
.public-profile-place {
  flex-wrap: wrap;
}

.public-profile-private {
  background: var(--book-panel-strong);
  border-radius: 999px;
  font-size: 11px;
  padding: 2px 8px;
}

.public-profile-shipping .public-profile-private i {
  color: var(--book-muted);
  font-size: 10px;
}

/* Save (heart) on someone else's book card — the same pill as "Saved",
   outlined until the book is saved. */
.my-book-save-btn {
  align-items: center;
  background: transparent;
  border: 1px solid var(--book-line);
  border-radius: 999px;
  color: var(--book-muted);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  padding: 9px 16px;
  position: absolute;
  right: 10px;
  top: 10px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.my-book-save-btn:hover,
.my-book-save-btn.is-active {
  background: rgba(224,48,63,0.1);
  border-color: rgba(224,48,63,0.24);
  color: var(--book-red);
}

.my-book-save-btn:active {
  transform: scale(0.92);
}

/* Settings → My listings: edit / mark sold / renew under the price. */
.my-book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 6px;
}

.my-book-actions a {
  color: var(--book-teal);
  font-size: 13px;
  font-weight: 700;
}

.my-book-actions a:hover {
  text-decoration: underline;
}

.user-items .my-books-list,
.user-public-profile-items .my-books-list {
  margin-top: 16px;
}

/* The title never runs under the card's corner button. */
.my-book-card .my-book-title {
  padding-right: 120px;
}

/* Phones: the corner button shrinks to its icon. */
@media (max-width: 640px) {
  .my-book-card .my-book-title {
    padding-right: 40px;
  }

  .my-book-card .my-book-delete-btn,
  .my-book-card .my-book-unfavorite-btn,
  .my-book-card .my-book-save-btn {
    font-size: 0;
    gap: 0;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
  }

  .my-book-card .my-book-delete-btn i,
  .my-book-card .my-book-unfavorite-btn i,
  .my-book-card .my-book-save-btn i {
    font-size: 14px;
  }

  .my-book-card .my-book-save-btn .item-detail-favorite-label {
    display: none;
  }
}

.field-hint-private i {
  color: var(--book-muted);
  font-size: 11px;
  margin-right: 3px;
}

/* ------------------------------------------------------------------ */
/* "Public / Private" in the section headers (profile-section-helpers) */
/* ------------------------------------------------------------------ */

.profile-collapsible summary .section-visibility {
  margin-left: auto;
}

.section-visibility {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  flex-shrink: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  line-height: 1;
  padding: 5px 6px 5px 10px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.section-visibility.is-public {
  background: rgba(30,105,104,0.1);
  border-color: rgba(30,105,104,0.28);
  color: var(--book-teal);
}

.section-visibility.is-private {
  background: rgba(23,25,29,0.05);
  border-color: var(--book-line);
  color: var(--book-muted);
}

button.section-visibility {
  cursor: pointer;
}

button.section-visibility:hover {
  border-color: currentColor;
}

button.section-visibility:focus-visible {
  outline: 2px solid var(--book-teal);
  outline-offset: 2px;
}

/* A fixed one: no switch, just the label. */
.section-visibility.is-fixed {
  cursor: help;
  padding-right: 10px;
}

/* The mini switch at the end of the chip. */
.section-visibility-switch {
  background: rgba(23,25,29,0.18);
  border-radius: 999px;
  display: inline-block;
  height: 16px;
  position: relative;
  transition: background 0.2s ease;
  width: 28px;
}

.section-visibility-switch span {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  height: 12px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: transform 0.2s cubic-bezier(.3,1.4,.6,1);
  width: 12px;
}

.section-visibility.is-public .section-visibility-switch {
  background: var(--book-teal);
}

.section-visibility.is-public .section-visibility-switch span {
  transform: translateX(12px);
}

.section-visibility.is-flipping > i {
  animation: section-visibility-pop 0.4s ease;
}

@keyframes section-visibility-pop {
  40% { transform: scale(1.35); }
}

@media (max-width: 420px) {
  .section-visibility .section-visibility-label {
    display: none;
  }
}

/* Public profile: sold books as a plain record (their pages are gone). */
.my-book-card.is-static {
  cursor: default;
}

.my-book-card.is-static:hover {
  box-shadow: var(--book-shadow);
  transform: none;
}

.my-book-sold-chip {
  background: rgba(23,25,29,0.07);
  color: var(--book-muted);
  justify-self: start;
}

.my-book-card.is-static .my-book-info {
  align-items: flex-start;
}

.public-swap-row {
  align-items: center;
  display: flex;
  gap: 12px;
}

.public-swap-row .swap-list-title i {
  color: var(--book-muted);
  font-size: 0.85em;
  margin: 0 3px;
}

/* Owner only: how often the book was viewed. */
.item-views-badge {
  align-items: center;
  align-self: flex-start;
  background: rgba(23,25,29,0.05);
  border-radius: 999px;
  color: var(--book-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  width: fit-content;
}

.item-views-badge i {
  color: var(--book-teal);
}

/* The form's error list only takes room when there's something in it. */
#error_list:empty {
  display: none;
}

/* The profile saves itself: a small note at the bottom while it does. */
.profile-autosave-status {
  align-items: center;
  background: var(--book-ink);
  border-radius: 999px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 12px 30px rgba(23,25,29,0.25);
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  left: 50%;
  margin: 0;
  max-width: calc(100vw - 32px);
  padding: 9px 16px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 90;
}

.profile-autosave-status[hidden] {
  display: none;
}

.profile-autosave-status.is-saved i {
  color: #7fd6b6;
}

.profile-autosave-status.is-error {
  background: var(--book-error);
}

@media (max-width: 980px) {
  .profile-autosave-status {
    bottom: calc(100px + env(safe-area-inset-bottom));
  }
}

/* At the end of the profile: on to the settings. */
.profile-settings-link {
  align-items: center;
  background: #fff;
  border: 1px solid var(--book-line);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(40,36,31,0.08);
  color: var(--book-ink);
  display: flex;
  gap: 14px;
  /* Set apart from the profile's sections: well below them, a line in
     between — the last thing before the footer. */
  margin: 72px 0 12px;
  padding: 14px 16px;
  position: relative;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.profile-settings-link::before {
  background: var(--book-line);
  content: '';
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
  top: -36px;
}

.profile-settings-link:hover {
  border-color: var(--book-teal);
  transform: translateY(-1px);
}

.profile-settings-link-icon {
  align-items: center;
  background: rgba(30,105,104,0.1);
  border-radius: 12px;
  color: var(--book-teal);
  display: flex;
  flex-shrink: 0;
  font-size: 18px;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.profile-settings-link-text {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.profile-settings-link-text strong {
  font-size: 16px;
  font-weight: 900;
}

.profile-settings-link-text small {
  color: var(--book-muted);
  font-size: 13px;
}

.profile-settings-link > .fa-chevron-right {
  color: var(--book-muted);
}

/* Long section titles ("Verkäufer-/Kundenbewertungen") wrap instead of
   pushing the page wider than the screen. */
.profile-collapsible summary h2 {
  flex: 1;
  flex-wrap: wrap;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Settings → Language: a row like the account rows, the picker on the right. */
.settings-language-row {
  cursor: pointer;
  margin: 0;
}

.settings-language-row .settings-account-label {
  flex: 1;
}

.settings-language-row select {
  background-color: transparent;
  border: 1px solid var(--book-line);
  border-radius: 10px;
  color: var(--book-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  max-width: 55%;
  min-height: 0;
  padding: 8px 34px 8px 12px;
  width: auto;
}
