:root {
  color-scheme: light;
  --bg: #f6f1ff;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --text: #24153f;
  --muted: #6d5e85;
  --line: rgba(119, 83, 180, 0.18);
  --accent: #8b5cf6;
  --accent-strong: #5b21b6;
  --accent-soft: #ede9fe;
  --shadow: rgba(74, 45, 120, 0.14);
  --soft-shadow: rgba(74, 45, 120, 0.12);
  --active-ring: rgba(109, 40, 217, 0.12);
  --active-bg: rgba(109, 40, 217, 0.08);
  --avatar-bg: linear-gradient(135deg, #7c3aed, #a78bfa);
  --ui-scale: 1;
  --layout-gap: 14px;
  --green: #16a34a;
  --amber: #d97706;
}

:root[data-size="small"] {
  --ui-scale: 0.94;
}

:root[data-size="large"] {
  --ui-scale: 1.08;
}

:root[data-density="compact"] {
  --layout-gap: 10px;
}

:root[data-density="wide"] {
  --layout-gap: 20px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: calc(16px * var(--ui-scale));
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.link-button {
  min-height: 0;
  border-radius: 0;
  padding: 8px 0;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
  text-align: left;
}

.link-button:hover {
  text-decoration: underline;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.field-error {
  display: block;
  margin-top: 6px;
  color: #b42318;
  font-size: 0.82rem;
  font-weight: 800;
}

.password-rules {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.password-rules li + li {
  margin-top: 4px;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.password-row button {
  min-height: 44px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 60px;
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 26px;
}

.site-nav a,
.nav-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--accent-strong);
  font-weight: 900;
}

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px);
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.hero h1 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.compact-hero h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.login-stage {
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 30px;
  align-items: center;
}

.login-stage h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: 0.92;
}

.login-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 70px rgba(74, 45, 120, 0.14);
}

.admin-app[hidden],
[hidden] {
  display: none !important;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace {
  display: grid;
  grid-template-columns: 1.15fr 1.6fr;
  gap: 16px;
  margin-bottom: 30px;
}

.friends-admin-column {
  display: grid;
  align-content: start;
  gap: 16px;
}

.panel,
.offer-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(74, 45, 120, 0.12);
}

.panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
}

.panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.section-title-block {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.section-title-block .eyebrow {
  justify-self: start;
  margin: 0;
}

.section-title-block h2 {
  margin: 0;
  color: var(--shop-text, var(--text));
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.my-offers-heading h2 {
  margin: 0;
}

.stack,
.list {
  display: grid;
  gap: 11px;
}

.notice,
.empty {
  color: var(--muted);
  line-height: 1.45;
}

.text-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  text-align: left;
}

.list-row {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.friends-chat-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
}

.friend-chat-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.friend-chat-row:last-child {
  border-bottom: 0;
}

.friend-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: white;
  font-size: 0.88rem;
  font-weight: 950;
}

.friend-chat-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.friend-chat-copy strong,
.friend-chat-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-result {
  display: grid;
  gap: 8px;
  word-break: break-word;
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.whatsapp-share {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 14px;
  background: #22c55e;
  color: white;
  font-weight: 900;
}

.list-row strong {
  font-size: 1rem;
}

.list-row span {
  color: var(--muted);
}

.badge {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.offer-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.wide {
  grid-column: 1 / -1;
}

.selected-friends {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.selected-friends-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.offer-photo-preview,
.offer-detail-gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scroll-snap-type: x mandatory;
}

.offer-photo-preview img,
.offer-detail-gallery img {
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: cover;
  scroll-snap-align: start;
}

.offer-photo-manager {
  flex-wrap: nowrap;
  align-items: center;
  padding: 6px 0;
}

.photo-manager-item {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
}

.photo-manager-item img {
  display: block;
  width: 76px;
  height: 76px;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: cover;
}

.photo-manager-item button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--surface-strong);
  border-radius: 999px;
  background: #ef4444;
  color: white;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.24);
}

.photo-manager-item button:hover,
.photo-manager-item button:focus-visible {
  transform: none;
  background: #dc2626;
}

.offer-detail-gallery img {
  width: 108px;
  height: 108px;
}

.friend-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: flex-start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font-weight: 800;
  line-height: 1.2;
}

.friend-chip input {
  width: auto;
  flex: 0 0 auto;
}

.market {
  display: grid;
  gap: 16px;
}

.market-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.market h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.search {
  width: min(370px, 100%);
}

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

.tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
}

.tab[aria-selected="true"] {
  background: var(--accent);
  color: white;
}

.exhibition {
  width: min(780px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 90px;
}

.login-home {
  width: min(620px, 100%);
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  padding: clamp(18px, 5vw, 48px) 0 70px;
}

.login-home h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.typewriter-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.18em);
  animation:
    typewriter-letter-fast 260ms ease var(--letter-delay, 0ms) forwards,
    typewriter-letter-slow 3200ms ease-in-out calc(var(--letter-delay, 0ms) + 360ms) infinite;
  will-change: transform, opacity;
}

@keyframes typewriter-letter-fast {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typewriter-letter-slow {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  35% {
    opacity: 1;
    transform: translateY(-0.08em);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-home p:not(.eyebrow) {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.5;
}

.feed-shell {
  display: grid;
  gap: 14px;
}

.feed-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--accent-strong);
}

.feed-taskbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 38px var(--shadow);
  backdrop-filter: blur(18px);
  transition: box-shadow 180ms ease, background 180ms ease;
}

.feed-taskbar button,
.feed-taskbar a {
  position: relative;
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  font-size: 0.88rem;
}

.feed-taskbar button::before,
.feed-taskbar a::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--active-ring);
  opacity: 0;
  transform: translate(-50%, -4px) scale(0.7);
  transition: opacity 160ms ease, transform 160ms ease;
}

.feed-taskbar button.is-active,
.feed-taskbar a.is-active {
  color: var(--accent-strong);
  background: var(--active-bg);
}

.feed-taskbar button.is-active::before,
.feed-taskbar a.is-active::before {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.message-badge {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  margin-left: 5px;
  border-radius: 999px;
  background: #ef4444;
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.section-action-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding-inline: 16px;
  background: var(--accent);
  color: white;
  white-space: nowrap;
  font-weight: 800;
}

.gallery-intro {
  display: grid;
  align-content: start;
  width: 100%;
}

.public-login {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  margin-top: 48px;
}

.login-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
  background: rgba(139, 92, 246, 0.08);
}

.login-mode-tabs.is-single-mode {
  grid-template-columns: 1fr;
}

.login-mode-tabs button {
  min-height: 38px;
  border-radius: 7px;
  background: transparent;
  color: var(--accent-strong);
}

.login-mode-tabs button[aria-selected="true"] {
  background: var(--accent);
  color: white;
}

.login-panel-section {
  display: grid;
  gap: 12px;
}

.login-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.reset-code-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(34px, 1fr));
  gap: 8px;
}

.reset-code-digit {
  min-height: 52px;
  padding: 0;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 900;
}

.public-login > .notice:empty {
  display: none;
}

.register-heading {
  display: grid;
  gap: 6px;
}

.register-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.4rem);
  line-height: 1;
}

.register-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
}

.mobile-publish {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.mobile-publish h2 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 3.2rem);
  line-height: 1;
}

.email-link-prompt {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr) auto;
  gap: 14px;
  align-items: end;
  margin: 0 0 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 8px;
  padding: 16px;
  background: color-mix(in srgb, var(--accent) 8%, #fff);
}

.email-link-prompt strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: clamp(1.35rem, 2.7vw, 2rem);
  line-height: 1;
}

.email-link-prompt p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.email-link-prompt .notice {
  grid-column: 1 / -1;
}

.quick-publish {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.quick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.publish-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.photo-pick {
  position: relative;
  min-height: 118px;
  align-content: center;
  border: 1px dashed rgba(91, 33, 182, 0.34);
  border-radius: 8px;
  padding: 16px;
  background: rgba(237, 233, 254, 0.72);
}

.photo-pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-pick input[hidden] {
  display: none;
}

.photo-pick strong {
  color: var(--accent-strong);
  font-size: 1.05rem;
}

.media-picker-button {
  width: 100%;
  min-height: 44px;
  justify-content: flex-start;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.media-picker-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% - 8px);
  left: 14px;
  min-width: min(230px, calc(100% - 28px));
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 7px;
  background: color-mix(in srgb, var(--surface-strong) 94%, white);
  box-shadow: 0 18px 42px var(--shadow);
}

.media-picker-menu[hidden] {
  display: none;
}

.media-picker-menu button {
  min-height: 38px;
  justify-content: flex-start;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
}

.media-picker-menu button:hover {
  background: var(--active-bg);
}

.gallery-tools {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding-top: 6px;
}

.gallery-tools h2 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  line-height: 1;
}

.feed-list {
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 4px 0 40px;
}

.feed-card {
  overflow: hidden;
  border: 1px solid rgba(119, 83, 180, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.feed-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 10px;
}

.avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 900;
}

.feed-card-head div:last-child {
  display: grid;
  gap: 3px;
}

.feed-card-head span,
.feed-card-foot span {
  color: var(--muted);
  font-size: 0.9rem;
}

.feed-card-copy {
  display: grid;
  gap: 8px;
  padding: 0 14px 12px;
}

.feed-card-copy h3 {
  margin: 0;
  font-size: 1.14rem;
}

.feed-card-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.offer-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.offer-meta-row span,
.feed-photo-count {
  border-radius: 999px;
  padding: 4px 7px;
  background: var(--active-bg);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 900;
}

.feed-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 14px;
}

.feed-card-foot strong {
  color: var(--accent-strong);
}

.feed-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
}

.feed-card-actions button {
  min-height: 38px;
}

.settings-panel {
  display: grid;
  gap: var(--layout-gap);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--layout-gap);
  max-width: 920px;
}

.settings-form button,
.settings-form .notice {
  grid-column: 1 / -1;
}

.settings-form input[type="color"] {
  min-height: 46px;
  padding: 4px;
}

.friends-panel {
  min-height: min(900px, 78vh);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 22px 50px rgba(74, 45, 120, 0.12);
}

.friends-chat-app {
  min-height: min(900px, 78vh);
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.7fr);
  background: rgba(255, 255, 255, 0.6);
}

.friends-contact-pane {
  display: grid;
  align-content: start;
  gap: 12px;
  border-right: 1px solid var(--line);
  padding: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.friends-contact-list {
  display: grid;
  gap: 6px;
}

.friend-add-window {
  min-height: calc(var(--app-height, 100vh) - 94px);
  display: block;
  padding: 0;
  background: transparent;
}

.friend-add-window[hidden] {
  display: none;
}

.friend-add-sheet {
  width: min(100%, 420px);
  margin: 0 auto;
  display: grid;
  gap: 10px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.friend-add-sheet > header {
  display: flex;
  justify-content: flex-end;
}

.friend-add-sheet > header .secondary-button {
  min-width: 34px;
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.friend-add-sheet h2,
.friend-add-group h3 {
  margin: 0;
}

.friend-add-sheet h2 {
  justify-self: end;
  text-align: right;
  font-size: clamp(1.25rem, 6vw, 2rem);
  line-height: 1;
  max-width: 100%;
}

.friend-add-group.is-primary-suggestions h3 {
  font-size: clamp(1.45rem, 7vw, 2rem);
  line-height: 0.95;
}

.friend-add-content {
  display: grid;
  gap: 16px;
}

.friend-add-group {
  display: grid;
  gap: 10px;
}

.friend-add-grid {
  display: grid;
  gap: 8px;
}

.friend-add-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 11px;
  padding: 8px;
  background: #ffffff;
}

.friend-add-card .friend-avatar {
  width: 38px;
  height: 38px;
  font-size: 0.78rem;
}

.friend-add-card span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.friend-add-card strong {
  font-size: 0.92rem;
}

.friend-add-card small,
.friend-add-notice {
  color: var(--muted);
}

.friend-add-card strong,
.friend-add-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .friend-add-sheet {
    padding: 8px 0;
  }

  .friend-add-sheet > header {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .friend-add-card {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 7px;
  }

  .friend-add-card .friend-avatar {
    width: 34px;
    height: 34px;
  }

  .friend-add-card button {
    grid-column: auto;
    min-height: 30px;
    padding: 0 9px;
    font-size: 0.78rem;
  }

}

@media (max-width: 380px) {
  .friend-add-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .friend-add-card button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.inline-more-button {
  min-height: auto;
  display: inline;
  margin-left: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 900;
  vertical-align: baseline;
}

.expandable-text {
  overflow-wrap: anywhere;
}

.friend-purchase-inbox {
  display: grid;
}

.purchase-inbox {
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.92), rgba(255, 255, 255, 0.88));
  box-shadow: 0 14px 34px rgba(74, 45, 120, 0.1);
}

.purchase-inbox header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.purchase-inbox header span {
  color: var(--text);
  font-weight: 900;
}

.purchase-inbox header strong {
  min-width: 28px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.85rem;
}

.purchase-inbox-group {
  display: grid;
  gap: 7px;
}

.purchase-inbox-group p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.purchase-inbox-row {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 13px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.purchase-inbox-row > button {
  display: grid;
  gap: 3px;
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.purchase-inbox-row > button strong,
.purchase-inbox-row > button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-inbox-row > button span {
  color: var(--muted);
  font-size: 0.84rem;
}

.purchase-inbox-row-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.friend-invite-form {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 14px;
}

.friend-invite-form button {
  width: 100%;
}

.friend-invite-result {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.friend-invite-result .invite-actions {
  gap: 8px;
}

.friend-invite-result .whatsapp-share {
  min-height: 30px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.friend-contact {
  min-height: 68px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.friend-contact.is-active,
.friend-contact:hover {
  border-color: rgba(139, 92, 246, 0.22);
  background: rgba(237, 233, 254, 0.78);
}

.friend-contact-copy,
.friend-contact-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.friend-contact-copy small,
.friend-contact-meta time {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-contact-meta {
  justify-items: end;
}

.friend-chat-pane {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding: 16px;
}

.friend-chat-empty {
  align-self: center;
  justify-self: center;
  max-width: 360px;
  padding: 22px;
  border: 1px dashed rgba(139, 92, 246, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
  text-align: center;
}

.friend-chat-detail {
  min-height: min(620px, 68vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.friend-chat-detail.is-short-thread {
  align-self: start;
  min-height: 0;
  grid-template-rows: auto minmax(120px, auto) auto;
}

.friend-chat-detail.is-empty-thread {
  grid-template-rows: auto minmax(72px, auto) auto;
}

.friend-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.friend-chat-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.friend-chat-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-back-button {
  min-height: 40px;
  padding: 0 12px;
  flex: 0 0 auto;
}

.friend-chat-messages {
  min-height: 220px;
  max-height: 58vh;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 4px;
}

.friend-chat-detail.is-short-thread .friend-chat-messages {
  min-height: 0;
  max-height: 320px;
}

.friend-chat-detail.is-empty-thread .friend-chat-messages {
  place-items: center;
  padding: 18px 4px;
}

.compact-empty {
  width: fit-content;
  border: 1px dashed rgba(139, 92, 246, 0.22);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.58);
}

.chat-bubble {
  max-width: min(620px, 86%);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  justify-self: start;
}

.chat-bubble.is-own {
  grid-template-columns: minmax(0, 1fr) 34px;
  justify-self: end;
}

.chat-bubble.is-own .friend-avatar {
  grid-column: 2;
  grid-row: 1;
}

.chat-bubble.is-own .chat-bubble-copy {
  grid-column: 1;
  grid-row: 1;
  background: rgba(139, 92, 246, 0.15);
}

.chat-bubble .friend-avatar {
  width: 34px;
  height: 34px;
  font-size: 0.72rem;
}

.chat-bubble-copy {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.86);
}

.chat-bubble-copy header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-bubble-copy time,
.chat-bubble-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-bubble-copy p {
  margin: 0;
}

.friend-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.friend-chat-form textarea {
  resize: none;
}

.embedded-admin body {
  background: transparent;
}

.embedded-admin .site-nav {
  display: none;
}

.embedded-admin .shell {
  width: min(1180px, 100%);
  padding: 22px;
}

.embedded-admin .workspace {
  grid-template-columns: minmax(0, 1fr);
}

.embedded-admin .offer-form-panel,
.embedded-admin .market {
  display: none;
}

.embedded-admin .login-stage {
  min-height: auto;
}

.my-offers-panel {
  display: grid;
  gap: var(--layout-gap);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.my-offers-heading h2 {
  color: #080808;
}

.my-offers-heading h2,
.profile-shop-heading h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em;
  align-items: baseline;
}

.my-offers-heading h2 span,
.profile-shop-heading h3 span {
  color: #080808;
}

.my-offers-list {
  display: grid;
  gap: var(--layout-gap);
}

.purchase-overview {
  display: grid;
  gap: 12px;
  order: -1;
  border: 1px solid color-mix(in srgb, var(--shop-accent, var(--accent)) 22%, var(--line));
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--shop-accent, var(--accent)) 9%, transparent), transparent 44%),
    color-mix(in srgb, var(--surface-strong) 94%, transparent);
}

.purchase-overview-head {
  display: flex;
  width: 100%;
  min-height: 0;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  text-align: left;
}

.purchase-overview-head > strong {
  display: inline-grid;
  min-width: 36px;
  min-height: 36px;
  place-items: center;
  border-radius: 999px;
  background: var(--shop-accent, var(--accent));
  color: #fff;
}

.purchase-overview-head > span:last-child {
  color: var(--shop-accent, var(--accent));
  font-weight: 900;
}

.purchase-overview-head .eyebrow,
.purchase-overview-head h3 {
  margin: 0;
}

.purchase-overview-head h3 {
  color: var(--shop-text, var(--text));
  font-size: 1.35rem;
}

.purchase-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.purchase-tabs button {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--surface-strong);
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.purchase-tabs button.is-active {
  border-color: color-mix(in srgb, var(--shop-accent, var(--accent)) 48%, var(--line));
  background: color-mix(in srgb, var(--shop-accent, var(--accent)) 10%, var(--surface-strong));
}

.purchase-tabs button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.purchase-tabs span {
  font-size: 0.92rem;
  font-weight: 900;
}

.purchase-tabs strong {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--shop-accent, var(--accent)) 16%, white);
  color: var(--shop-accent, var(--accent));
  font-size: 1rem;
}

.purchase-detail-list {
  display: grid;
  gap: 8px;
}

.purchase-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
}

.purchase-card-main {
  display: grid;
  min-height: auto;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  box-shadow: none;
}

.chat-purchase-card {
  margin: 10px 0;
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: color-mix(in srgb, var(--active-bg) 74%, var(--surface-strong));
  box-shadow: 0 14px 32px rgba(124, 58, 237, 0.1);
}

.chat-purchase-card strong {
  color: var(--text);
}

.purchase-card > div:first-child,
.purchase-card-main {
  display: grid;
  gap: 4px;
}

.purchase-card span,
.purchase-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.purchase-card-meta,
.purchase-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.purchase-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.purchase-status {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--active-bg);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
}

.purchase-status.is-accepted,
.purchase-status.is-done {
  background: #dcfce7;
  color: #166534;
}

.purchase-status.is-declined {
  background: #fee2e2;
  color: #991b1b;
}

.purchase-status.is-cancelled {
  background: #f3f4f6;
  color: #4b5563;
}

.purchase-sheet {
  gap: 16px;
}

.purchase-panel {
  place-items: center;
  padding-top: max(16px, var(--safe-top));
  padding-bottom: max(16px, var(--safe-bottom));
  overscroll-behavior: none;
}

.purchase-panel .purchase-sheet {
  width: min(560px, 100%);
  min-height: min(560px, calc(var(--app-height, 100dvh) - 96px));
  max-height: calc(var(--app-height, 100dvh) - max(32px, var(--safe-top)) - max(20px, var(--safe-bottom)));
  overscroll-behavior: contain;
}

.purchase-sheet h2,
.purchase-sheet p {
  margin: 0;
}

.purchase-price {
  margin-top: 5px !important;
  color: var(--accent-strong);
  font-size: 1.1rem;
  font-weight: 900;
}

.my-offer-editor {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.my-offer-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.my-offer-card-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.my-offer-card .photo-frame {
  min-height: 118px;
}

.my-offer-photo {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.my-offer-summary {
  display: grid;
  gap: 6px;
}

.my-offer-summary strong {
  font-size: 1.1rem;
}

.my-offer-summary span,
.my-offer-summary p {
  margin: 0;
  color: var(--muted);
}

.my-offer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.compact-photo-pick {
  min-height: 88px;
}

.photo-frame {
  min-height: 310px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(180deg, transparent 50%, rgba(36, 21, 63, 0.2)),
    url("assets/marketplace-photos.png");
  background-position: center, var(--photo-x) var(--photo-y);
  background-size: cover, 400% 300%;
  box-shadow: none;
}

.photo-frame-real {
  background-position: center;
  background-size: cover;
}

.superadmin-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}

.admin-users-panel {
  max-width: 920px;
}

.admin-row {
  gap: 12px;
  padding: 14px;
}

.admin-user-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-user-summary > div {
  display: grid;
  gap: 4px;
}

.admin-user-summary button {
  min-width: 116px;
}

.admin-user-editor {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.row-actions button {
  min-height: 36px;
  padding: 0 11px;
}

.danger-button {
  border-color: rgba(185, 28, 28, 0.24);
  color: #9f1239;
}

.reset-password-field {
  gap: 5px;
}

.reset-password-field input {
  min-height: 38px;
  padding: 8px 10px;
}

@media (prefers-reduced-motion: reduce) {
  .typewriter-title span {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

@media (max-width: 980px) {
  .hero,
  .login-stage,
  .login-home,
  .email-link-prompt,
  .mobile-publish,
  .workspace {
    grid-template-columns: 1fr;
  }

  .superadmin-grid {
    grid-template-columns: 1fr;
  }

  .market-head,
  .gallery-tools {
    align-items: start;
    flex-direction: column;
  }

  .feed-actions {
    display: none;
  }

  .feed-taskbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    bottom: 10px;
    top: auto;
    position: fixed;
    left: 12px;
    right: 12px;
  }

  .friends-chat-app {
    grid-template-columns: 1fr;
  }

  .friends-contact-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .friend-chat-form {
    grid-template-columns: 1fr;
  }

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

  .chat-bubble {
    max-width: 96%;
  }

  .offer-form {
    grid-template-columns: 1fr;
  }

  .public-login {
    margin-top: 0;
  }

  .quick-row {
    grid-template-columns: 1fr;
  }

  .my-offer-card,
  .my-offer-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .login-home h1 {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .feed-card .photo-frame {
    min-height: 220px;
  }
}

/* Modern Kaufreund app shell */
body {
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 34rem),
    linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 82%, white));
}

.exhibition {
  width: min(1120px, calc(100% - 28px));
  padding: 18px 0 110px;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 48px;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 18px;
  padding: 6px 0;
}

.site-nav a {
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
  box-shadow: 0 12px 32px var(--soft-shadow);
  backdrop-filter: blur(16px);
}

.login-home {
  width: min(620px, 100%);
  min-height: auto;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.login-home h1 {
  max-width: 760px;
  font-size: clamp(3rem, 7.5vw, 6.9rem);
  line-height: 0.9;
}

.login-home p:not(.eyebrow) {
  max-width: 620px;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
}

.login-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.login-benefits span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: color-mix(in srgb, var(--surface-strong) 64%, transparent);
  color: var(--accent-strong);
  font-weight: 900;
}

.public-login {
  position: relative;
  margin-top: 0;
  padding: 18px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
  box-shadow: 0 24px 64px var(--shadow);
  backdrop-filter: blur(18px);
}

.login-mode-tabs {
  border-radius: 13px;
}

.login-mode-tabs button,
.password-row button,
button,
.secondary-button {
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px var(--soft-shadow);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
}

.feed-shell {
  gap: 18px;
}

.feed-actions {
  align-items: center;
}

.feed-taskbar {
  top: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: 18px;
  padding: 8px;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
}

.feed-taskbar button {
  min-height: 46px;
  border-radius: 13px;
}

.feed-brand-simple h1 {
  margin: 0;
  color: #050505;
  font-size: clamp(2.8rem, 8vw, 6.8rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.9;
}

.feed-brand-simple {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #050505;
}

.feed-brand-simple .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.gallery-tools {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin: 0;
  padding: 14px;
  background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
}

.gallery-tools h2 {
  font-size: clamp(1.25rem, 2.4vw, 2rem);
}

.search {
  width: 100%;
}

.search-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.filter-toggle {
  min-width: 50px;
  min-height: 50px;
  display: inline-grid;
  place-items: center;
  gap: 3px;
  border-radius: 14px;
  padding: 8px 10px;
}

.filter-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
}

.filter-toggle span:nth-child(2) {
  width: 13px;
}

.filter-toggle span:nth-child(3) {
  width: 8px;
}

.filter-toggle strong {
  display: none;
}

.filter-toggle.is-active {
  background: var(--accent);
  color: white;
}

.filter-toggle.has-filters:not(.is-active) {
  color: var(--accent-strong);
  background: var(--active-bg);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.filter-panel[hidden] {
  display: none;
}

.tabs {
  position: static;
  z-index: 15;
  padding: 5px 0;
}

.tab {
  min-height: 38px;
  border-radius: 999px;
}

.feed-list {
  gap: 14px;
  padding-bottom: 56px;
}

.feed-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  grid-template-areas:
    "head image"
    "copy image"
    "foot image"
    "actions image";
  gap: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--line));
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  box-shadow: 0 18px 46px color-mix(in srgb, var(--shadow) 78%, transparent);
}

.feed-card-head {
  grid-area: head;
  padding: 16px 18px 10px;
}

.feed-card-copy {
  grid-area: copy;
  padding: 0 18px 14px;
}

.feed-card-copy h3 {
  font-size: clamp(1.18rem, 2.4vw, 1.6rem);
  line-height: 1.08;
}

.feed-card .photo-frame {
  grid-area: image;
  min-height: 100%;
  border-width: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.feed-card-image {
  grid-area: image;
  position: relative;
  min-height: 220px;
  max-height: 280px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.photo-open-button {
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.feed-card-image .photo-frame {
  height: 100%;
  min-height: 100%;
  background-size: cover;
  background-position: center;
}

.feed-card-image:hover .photo-frame,
.feed-card-image:focus-visible .photo-frame {
  transform: scale(1.025);
}

.feed-card-image .photo-frame {
  transition: transform 180ms ease;
}

.feed-photo-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 7px;
  background: rgba(16, 12, 27, 0.42);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.68rem;
  opacity: 0.76;
}

.photo-nav {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 32px;
  height: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
  background: rgba(16, 12, 27, 0.38);
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(16, 12, 27, 0.18);
  opacity: 0.72;
  transition:
    opacity 160ms ease,
    background 160ms ease;
}

.photo-nav:hover,
.photo-nav:focus-visible,
.photo-nav:active {
  background: rgba(16, 12, 27, 0.58);
  opacity: 1;
  transform: translateY(-50%);
}

.photo-nav-prev {
  left: 8px;
}

.photo-nav-next {
  right: 8px;
}

.feed-card-foot {
  grid-area: foot;
  align-items: center;
  padding: 6px 18px 14px;
}

.offer-type-chip {
  background: color-mix(in srgb, var(--accent) 18%, white) !important;
  color: var(--accent-strong) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.condition-chip {
  display: inline-grid;
  justify-self: start;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.condition-chip.is-wie_neu {
  background: #ecfdf5;
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(4, 120, 87, 0.16);
}

.condition-chip.is-gut {
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.14);
}

.condition-chip.is-stark_gebraucht {
  background: #fff7ed;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px rgba(194, 65, 12, 0.14);
}

.condition-chip.is-defekt {
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.16);
}

.feed-card-actions {
  grid-area: actions;
  padding: 0 18px 18px;
}

.feed-card-actions button {
  min-width: 112px;
}

.feed-empty {
  display: grid;
  justify-items: start;
  gap: 10px;
  border: 1px dashed color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 18px;
  padding: 26px;
  background: color-mix(in srgb, var(--surface-strong) 64%, transparent);
}

.register-intro {
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--text) !important;
  font-weight: 800;
}

.feed-empty h3 {
  margin: 0;
  font-size: 1.5rem;
}

.my-offers-panel,
.settings-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
}

.my-offers-panel {
  background: var(--shop-background, color-mix(in srgb, var(--surface-strong) 72%, transparent));
  color: var(--shop-text, var(--text));
}

.my-offers-panel .eyebrow,
.profile-shop-surface .eyebrow {
  border-color: color-mix(in srgb, var(--shop-accent, var(--accent)) 38%, var(--line));
  color: var(--shop-accent, var(--accent));
}

.my-offer-editor {
  border-radius: 16px;
  padding: 14px;
}

.my-offer-card {
  grid-template-columns: 128px minmax(0, 1fr) auto;
}

.my-offer-card .photo-frame {
  min-height: 96px;
  border-radius: 12px;
}

.my-offer-fields,
.quick-publish,
.settings-form {
  border-radius: 14px;
}

.mobile-publish {
  grid-template-columns: minmax(0, 0.75fr) minmax(320px, 1.25fr);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: color-mix(in srgb, var(--surface-strong) 64%, transparent);
}

.friends-panel {
  position: relative;
  border-radius: 18px;
}

.friends-panel.is-refreshing::after {
  content: "Lädt…";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  box-shadow: 0 8px 24px var(--soft-shadow);
  font-size: 0.78rem;
  font-weight: 800;
}

.friends-contact-pane .panel-head {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
}

.friends-contact-pane .panel-head button {
  min-width: max-content;
  padding-inline: 12px;
}

.friends-panel.is-friend-add-mode .friends-contact-pane .panel-head {
  grid-template-columns: minmax(52px, auto) minmax(0, 1fr);
  column-gap: 6px;
}

.friends-panel.is-friend-add-mode .section-title-block {
  grid-column: 2;
  grid-row: 1;
  justify-items: start;
  text-align: left;
  min-width: 0;
}

.friends-panel.is-friend-add-mode .section-title-block h2 {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(0.92rem, 4.25vw, 1.35rem);
  line-height: 1;
  white-space: nowrap;
}

.friends-panel.is-friend-add-mode .friends-contact-pane .panel-head button {
  grid-column: 1;
  grid-row: 1;
  min-height: 36px;
  padding-inline: 7px;
  font-size: 0.78rem;
}

.friends-chat-app {
  min-height: min(760px, 74vh);
}

.friend-contact {
  border-radius: 15px;
}

.friend-chat-form {
  align-items: end;
}

.friend-chat-form button {
  min-width: 104px;
}

@media (max-width: 900px) {
  .exhibition {
    width: min(100% - 20px, 720px);
    padding-bottom: 96px;
  }

  .login-home,
  .mobile-publish,
  .friends-chat-app {
    grid-template-columns: 1fr;
  }

  .login-home {
    align-items: start;
    padding-top: 22px;
  }

  .feed-actions {
    display: flex;
    justify-content: space-between;
  }

  .feed-taskbar {
    position: fixed;
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .feed-taskbar button {
    min-height: 48px;
    padding: 0 4px;
    font-size: 0.76rem;
  }

  .feed-taskbar button::before {
    top: -3px;
  }

  .feed-brand-simple {
    align-items: flex-start;
    flex-direction: column;
  }

  .feed-actions {
    justify-content: flex-start;
  }

  .tabs {
    top: 0;
  }

  .gallery-tools {
    display: grid;
  }

  .feed-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "copy"
      "image"
      "foot"
      "actions";
  }

  .feed-card .photo-frame {
    min-height: 230px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .my-offer-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .my-offer-card button {
    grid-column: 1 / -1;
  }

  .my-offer-fields,
  .quick-row,
  .settings-form {
    grid-template-columns: 1fr;
  }

  .friends-contact-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .exhibition {
    padding-bottom: 72px;
  }

  .feed-taskbar {
    position: sticky;
    top: 8px;
    bottom: auto;
    left: auto;
    right: auto;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  .feed-taskbar {
    position: fixed;
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 10px;
  }
}

@media (max-width: 560px) {
  .login-home h1 {
    font-size: clamp(2.55rem, 15vw, 4.8rem);
  }

  .public-login,
  .gallery-tools,
  .my-offers-panel,
  .settings-panel {
    border-radius: 14px;
    padding: 14px;
  }

  .feed-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .feed-card-actions .notice {
    grid-column: 1 / -1;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .publish-actions {
    grid-template-columns: 1fr;
  }

  .my-offers-panel {
    gap: 18px;
    padding: 16px;
  }

  .my-offers-panel .panel-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--shop-accent, var(--accent)) 24%, var(--line));
  }

  .my-offers-heading h2 {
    overflow-wrap: anywhere;
  }

  .my-offers-panel .panel-actions {
    grid-template-columns: 1fr;
    width: auto;
  }

  .my-offers-panel .panel-actions button {
    min-height: 48px;
  }

}

/* Profile and layout settings */
.settings-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.settings-section + .settings-section {
  margin-top: 12px;
}

.settings-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-size: calc(1rem * var(--ui-scale));
  font-weight: 950;
}

.settings-section summary::-webkit-details-marker {
  display: none;
}

.settings-section summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--active-bg);
  color: var(--accent);
  font-weight: 950;
}

.settings-section[open] summary {
  border-bottom: 1px solid var(--line);
}

.settings-section[open] summary::after {
  content: "-";
}

.settings-section .settings-form,
.settings-section .settings-footer-actions {
  padding: 14px;
}

.settings-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settings-help {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.settings-form .settings-form-actions button {
  grid-column: auto;
}

.profile-preview {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-strong) 70%, transparent);
}

.profile-preview-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent);
  background-position: center;
  background-size: cover;
  color: white;
  font-weight: 950;
}

.profile-preview-avatar.has-photo {
  color: transparent;
}

.profile-preview div:last-child {
  display: grid;
  gap: 4px;
}

.profile-preview span,
.settings-form small {
  color: var(--muted);
  font-weight: 700;
}

.settings-form input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}

.settings-footer-actions {
  display: grid;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.settings-footer-actions .secondary-button {
  width: 100%;
}

/* First login guide */
.first-run-guide {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  box-shadow: 0 18px 42px var(--soft-shadow);
}

.first-run-guide h2 {
  margin: 0;
}

.first-run-guide ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.first-run-guide li strong {
  color: var(--text);
}

@media (max-width: 900px) {
  .first-run-guide {
    grid-template-columns: 1fr;
  }
}

/* Delight polish */
.login-home .gallery-intro h1 {
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  white-space: nowrap;
  text-wrap: nowrap;
}

.login-subtitle {
  display: none;
  color: var(--text) !important;
  font-size: clamp(1.35rem, 3vw, 2.2rem) !important;
  font-weight: 900;
  line-height: 1.12 !important;
}

.login-home.is-registering {
  width: min(620px, 100%);
  min-height: auto;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  padding-top: clamp(18px, 5vw, 48px);
}

.login-home.is-registering .gallery-intro h1 {
  font-size: clamp(2.35rem, 11vw, 4.7rem);
}

.login-home.is-registering .login-subtitle {
  display: none;
}

.login-home.is-registering .public-login {
  margin-top: 0;
}

.app-toast {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 80;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--green) 35%, var(--line));
  border-radius: 999px;
  padding: 0 18px;
  background: color-mix(in srgb, white 88%, var(--green));
  color: #14532d;
  box-shadow: 0 18px 44px rgba(22, 163, 74, 0.18);
  font-weight: 950;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 180ms ease, transform 180ms ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.feed-taskbar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.friend-chat-empty {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
  color: var(--muted);
}

.friend-chat-empty h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.friends-panel.is-chat-open .friends-chat-app {
  grid-template-columns: 1fr;
}

.friends-panel.is-chat-open .friends-contact-pane {
  display: none;
}

.friends-panel.is-chat-open .friend-chat-detail {
  min-height: min(760px, 76vh);
}

.friends-panel.is-chat-open .friend-chat-messages {
  max-height: 66vh;
}

@media (max-width: 900px) {
  .app-toast {
    left: 12px;
    right: 12px;
    bottom: 74px;
    justify-content: center;
  }

  .friends-panel.is-chat-open .friends-chat-app {
    grid-template-columns: 1fr;
  }
}

.friend-avatar {
  background-position: center;
  background-size: cover;
}

.friend-avatar.has-photo {
  color: transparent;
}

/* Feed header polish */
.feed-brand-simple {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 22px;
  padding: 18px;
  background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
  box-shadow: 0 20px 52px var(--soft-shadow);
}

.feed-brand-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.feed-brand-simple h1 {
  margin: 0;
  color: #050505;
  font-size: clamp(2.45rem, 6.4vw, 5.8rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.9;
}

.feed-brand-simple p {
  max-width: 660px;
  margin: 0;
  color: color-mix(in srgb, #050505 70%, var(--muted));
  font-size: clamp(0.98rem, 1.7vw, 1.18rem);
  font-weight: 850;
  line-height: 1.35;
}

.feed-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.feed-brand-simple .secondary-button {
  min-height: 48px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, white 74%, var(--surface-strong));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--shadow) 72%, transparent);
}

.feed-brand-simple .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: var(--accent-strong);
  text-decoration: none;
}

.feed-brand-simple .secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--shadow) 82%, transparent);
}

@media (max-width: 760px) {
  .feed-brand-simple {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 16px;
  }

  .feed-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

/* Mobile app shell */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html {
  min-height: 100%;
  scroll-padding-top: 14px;
  scroll-padding-bottom: calc(96px + var(--safe-bottom));
}

body {
  min-height: var(--app-height, 100dvh);
}

input,
select,
textarea,
button {
  font-size: max(16px, 1rem);
}

@media (hover: none) and (pointer: coarse) {
  button,
  input,
  select,
  textarea,
  .text-button,
  .secondary-button,
  .tab,
  .feed-taskbar button {
    min-height: 46px;
  }

  .feed-card,
  .my-offer-editor,
  .friend-contact,
  .public-login,
  .mobile-publish,
  .settings-panel,
  .my-offers-panel,
  .friends-panel {
    -webkit-tap-highlight-color: transparent;
  }
}

@media (max-width: 760px) {
  .exhibition {
    width: 100%;
    padding:
      max(12px, var(--safe-top))
      max(12px, var(--safe-right))
      calc(104px + var(--safe-bottom))
      max(12px, var(--safe-left));
  }

  .login-home {
    width: 100%;
    min-height: calc(var(--app-height, 100dvh) - 24px - var(--safe-top));
    justify-content: start;
    padding: 10px 0 calc(24px + var(--safe-bottom));
  }

  .login-home h1,
  .login-home.is-registering .gallery-intro h1 {
    font-size: clamp(2.2rem, 10.8vw, 3.85rem);
  }

  .public-login {
    width: 100%;
    border-radius: 18px;
    padding: 18px;
  }

  .feed-shell {
    gap: 12px;
  }

  .feed-taskbar {
    position: fixed;
    top: auto;
    right: max(10px, var(--safe-right));
    bottom: max(8px, var(--safe-bottom));
    left: max(10px, var(--safe-left));
    z-index: 90;
    min-height: 64px;
    border-radius: 22px;
    padding: 8px;
    box-shadow: 0 16px 46px color-mix(in srgb, var(--shadow) 92%, transparent);
  }

  .feed-taskbar button {
    min-width: 0;
    min-height: 48px;
    border-radius: 16px;
    padding: 0 6px;
    font-size: 0.78rem;
  }

  .feed-brand-simple {
    border-radius: 18px;
    padding: 14px;
  }

  .feed-brand-simple h1 {
    font-size: clamp(2.45rem, 13.5vw, 4.35rem);
    line-height: 0.9;
    overflow-wrap: anywhere;
  }

  .feed-brand-simple p {
    font-size: 0.98rem;
  }

  .feed-actions {
    display: flex;
    gap: 8px;
  }

  .gallery-tools {
    position: relative;
    top: auto;
    z-index: 18;
    grid-template-columns: 1fr;
    gap: 8px;
    border-radius: 18px;
    padding: 10px;
    backdrop-filter: blur(18px);
  }

  .gallery-tools h2,
  .gallery-tools .eyebrow {
    display: none;
  }

  .search,
  .search input {
    width: 100%;
  }

  .filter-toggle {
    min-width: 48px;
    min-height: 48px;
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .filter-panel .secondary-button {
    grid-column: 1 / -1;
  }

  .tab {
    flex: 0 0 auto;
    padding: 0 14px;
  }

  .feed-card,
  .my-offer-card {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .feed-card {
    grid-template-areas:
      "image"
      "head"
      "copy"
      "foot"
      "actions";
  }

  .feed-card .photo-frame,
  .my-offer-card .photo-frame {
    min-height: min(48vw, 260px);
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .feed-card-image {
    min-height: min(50vw, 270px);
    max-height: 280px;
  }

  .feed-card-head,
  .feed-card-copy,
  .feed-card-foot,
  .feed-card-actions {
    padding-right: 16px;
    padding-left: 16px;
  }

  .feed-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .my-offers-panel,
  .settings-panel,
  .friends-panel,
  .mobile-publish {
    border-radius: 20px;
    padding: 14px;
  }

  .panel-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .my-offers-panel .panel-head,
  .friends-contact-pane .panel-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .section-title-block h2 {
    font-size: clamp(1.7rem, 8vw, 2.25rem);
    overflow-wrap: anywhere;
  }

  .panel-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .my-offers-panel .panel-actions {
    width: auto;
  }

  .friends-contact-pane .panel-head button {
    min-height: 42px;
    padding-inline: 10px;
    font-size: 0.86rem;
  }

  .mobile-publish {
    grid-template-columns: 1fr;
  }

  .quick-row,
  .my-offer-fields,
  .settings-form,
  .layout-form {
    grid-template-columns: 1fr;
  }

  .photo-pick {
    min-height: 150px;
  }

  .friends-chat-app {
    min-height: calc(var(--app-height, 100dvh) - 142px - var(--safe-bottom));
    border-radius: 18px;
  }

  .friends-panel.is-chat-open .friend-chat-detail {
    min-height: calc(var(--app-height, 100dvh) - 142px - var(--safe-bottom));
  }

  .friends-panel.is-chat-open .friend-chat-messages,
  .friend-chat-messages {
    max-height: calc(var(--app-height, 100dvh) - 292px - var(--safe-bottom));
  }

  .friend-chat-form {
    position: sticky;
    bottom: calc(78px + var(--safe-bottom));
    grid-template-columns: 1fr auto;
    padding-top: 8px;
    background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .exhibition {
    padding-right: calc(max(12px, var(--safe-right)) + 84px);
    padding-bottom: 16px;
  }

  .feed-taskbar {
    position: fixed;
    top: max(10px, var(--safe-top));
    right: max(8px, var(--safe-right));
    bottom: max(10px, var(--safe-bottom));
    left: auto;
    width: 72px;
    grid-template-columns: 1fr;
    align-content: center;
    border-radius: 22px;
  }

  .feed-taskbar button {
    min-height: 52px;
    font-size: 0.7rem;
  }
}

@media (max-width: 390px) {
  .feed-brand-simple h1 {
    font-size: clamp(2.2rem, 12vw, 3.25rem);
  }

  .feed-brand-simple p {
    font-size: 0.9rem;
  }
}

/* Login spacing polish */
.login-home,
.login-home.is-registering {
  gap: 14px;
  padding-top: clamp(44px, 11vh, 96px);
}

.login-home .public-login,
.login-home.is-registering .public-login {
  margin-top: 0;
}

@media (max-width: 760px) {
  .login-home,
  .login-home.is-registering {
    gap: 14px;
    min-height: auto;
    padding-top: calc(max(34px, var(--safe-top)) + 22px);
  }
}

/* Final navigation placement: Kaufreund taskbar always stays at the bottom. */
.feed-shell {
  padding-bottom: calc(92px + var(--safe-bottom));
}

.feed-taskbar {
  position: fixed !important;
  top: auto !important;
  right: max(10px, var(--safe-right)) !important;
  bottom: max(8px, var(--safe-bottom)) !important;
  left: max(10px, var(--safe-left)) !important;
  width: auto !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-content: initial !important;
  z-index: 90;
}

.my-offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.friends-panel {
  min-height: calc(var(--app-height, 100dvh) - 126px);
}

.friends-chat-app {
  min-height: calc(var(--app-height, 100dvh) - 150px);
}

.friend-chat-pane,
.friend-chat-detail {
  min-height: 0;
}

.friend-chat-detail {
  min-height: calc(var(--app-height, 100dvh) - 184px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.friend-chat-detail.is-short-thread,
.friend-chat-detail.is-empty-thread {
  min-height: calc(var(--app-height, 100dvh) - 184px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.friend-chat-messages,
.friend-chat-detail.is-short-thread .friend-chat-messages,
.friend-chat-detail.is-empty-thread .friend-chat-messages {
  min-height: 0;
  max-height: none;
  align-content: end;
  place-items: stretch;
}

.friend-chat-head {
  cursor: pointer;
}

.friend-chat-form {
  position: sticky;
  bottom: calc(82px + var(--safe-bottom));
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
}

.chat-attach {
  position: relative;
}

.chat-attach-button {
  width: 42px;
  min-height: 42px;
  border-radius: 999px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
}

.chat-attachment-preview {
  grid-column: 1 / -1;
  margin: -2px 0 0 52px;
  color: var(--muted);
  font-size: 0.85rem;
}

.chat-attachment {
  display: grid;
  gap: 6px;
  color: var(--accent-strong);
  font-weight: 800;
}

.chat-attachment img,
.chat-attachment video {
  max-width: min(260px, 72vw);
  max-height: 260px;
  border-radius: 12px;
  object-fit: cover;
}

.offer-profile-button,
.offer-owner-button {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.offer-profile-button {
  display: inline-grid;
}

.offer-owner-button {
  display: grid;
  gap: 4px;
}

.profile-panel {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: max(18px, var(--safe-top)) max(14px, var(--safe-right)) max(92px, var(--safe-bottom)) max(14px, var(--safe-left));
  background: rgba(20, 15, 30, 0.34);
  backdrop-filter: blur(12px);
}

.profile-sheet {
  width: min(720px, 100%);
  max-height: calc(var(--app-height, 100dvh) - 120px);
  overflow: auto;
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: var(--surface-strong);
  box-shadow: 0 24px 74px var(--shadow);
}

.profile-close-button {
  justify-self: end;
}

.profile-sheet-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.profile-contact-text {
  margin: 5px 0 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.profile-offers-list {
  display: grid;
  gap: 10px;
}

.profile-offer-card {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.profile-offer-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-offer-card p {
  margin: 0;
}

.profile-offer-card small {
  margin-top: 4px;
  color: var(--accent);
  font-weight: 800;
}

.profile-offer-card:hover,
.profile-offer-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.profile-shop-heading {
  display: grid;
  gap: 5px;
  padding-top: 4px;
}

.profile-shop-heading .eyebrow {
  margin: 0;
}

.profile-shop-heading h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: #080808;
}

.profile-shop-surface {
  display: grid;
  gap: 16px;
  border: 1px solid color-mix(in srgb, var(--shop-accent, var(--accent)) 30%, var(--line));
  border-radius: 14px;
  padding: 14px;
  background: var(--shop-background, var(--surface));
  color: var(--shop-text, var(--text));
}

.profile-shop-surface .profile-shop-heading h3,
.profile-shop-surface .profile-offer-card {
  color: var(--shop-text, var(--text));
}

.profile-shop-surface .profile-offer-card {
  border-color: color-mix(in srgb, var(--shop-accent, var(--accent)) 24%, var(--line));
  background: color-mix(in srgb, var(--shop-background, var(--surface)) 82%, white);
}

.profile-shop-surface .profile-offer-card small {
  color: var(--shop-accent, var(--accent));
}

.offer-detail-sheet {
  gap: 16px;
}

.offer-detail-head .offer-owner-button {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  text-align: left;
}

.offer-detail-head .offer-owner-button span {
  display: grid;
  gap: 2px;
}

.offer-detail-head .offer-owner-button small {
  color: var(--muted);
}

.offer-detail-gallery-main {
  position: relative;
}

.offer-detail-open-photo {
  display: block;
  border-radius: 14px;
  overflow: hidden;
}

.offer-detail-image {
  min-height: 220px;
  max-height: 360px;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
}

.photo-viewer-panel {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: grid;
  place-items: center;
  padding: max(18px, var(--safe-top)) max(12px, var(--safe-right)) max(18px, var(--safe-bottom)) max(12px, var(--safe-left));
  background: rgba(9, 8, 13, 0.9);
  backdrop-filter: blur(16px);
}

.photo-viewer-close {
  position: fixed;
  top: max(14px, var(--safe-top));
  right: max(14px, var(--safe-right));
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.photo-viewer-content {
  width: min(1120px, 100%);
}

.photo-viewer-frame {
  position: relative;
  display: grid;
  gap: 12px;
  place-items: center;
  margin: 0;
}

.photo-viewer-frame img {
  width: auto;
  max-width: min(100%, 1120px);
  max-height: calc(var(--app-height, 100dvh) - 140px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

.photo-viewer-frame figcaption {
  display: flex;
  max-width: min(100%, 820px);
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
}

.photo-viewer-frame figcaption span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
}

.photo-viewer-frame .photo-nav {
  width: 42px;
  height: 42px;
  min-height: 42px;
  background: rgba(255, 255, 255, 0.16);
  opacity: 0.84;
}

body.is-photo-viewer-open {
  overflow: hidden;
}

body.is-purchase-open {
  position: fixed;
  top: var(--purchase-body-top, 0);
  right: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

body.is-purchase-open .purchase-panel {
  background: var(--bg);
  backdrop-filter: none;
}

body.is-purchase-open .exhibition,
body.is-purchase-open #shopView {
  background: var(--bg);
}

body.is-purchase-open #shopView > :not(#purchasePanel) {
  visibility: hidden;
}

.offer-detail-copy {
  display: grid;
  gap: 12px;
}

.offer-detail-copy .eyebrow,
.offer-detail-copy h2,
.offer-detail-copy p {
  margin: 0;
}

.offer-detail-copy h2 {
  color: #080808;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.offer-detail-copy > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.offer-detail-copy dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.offer-detail-copy dl div {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.offer-detail-copy dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.offer-detail-copy dd {
  margin: 0;
  font-weight: 800;
}

.offer-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.offer-sale-reason {
  display: grid;
  gap: 5px;
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 12px;
}

.offer-sale-reason p {
  color: var(--muted);
}

/* iPhone-first chat polish */
.friends-panel.is-chat-open {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: block;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
}

.friends-panel.is-chat-open .friends-chat-app {
  height: 100svh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  border: 0;
  border-radius: 0;
  background: var(--surface-strong);
}

.friends-panel.is-chat-open .friends-contact-pane,
.friends-panel.is-chat-open .friend-chat-empty {
  display: none;
}

.friends-panel.is-chat-open .friend-chat-pane {
  height: 100svh;
  padding: max(8px, var(--safe-top)) max(10px, var(--safe-right)) max(8px, var(--safe-bottom)) max(10px, var(--safe-left));
  overflow: hidden;
}

.friends-panel.is-chat-open .friend-chat-detail,
.friends-panel.is-chat-open .friend-chat-detail.is-short-thread,
.friends-panel.is-chat-open .friend-chat-detail.is-empty-thread {
  height: calc(100svh - max(8px, var(--safe-top)) - max(8px, var(--safe-bottom)));
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
}

.friends-panel.is-chat-open .friend-chat-head {
  flex: 0 0 auto;
  padding-bottom: 8px;
}

.friends-panel.is-chat-open .friend-chat-messages,
.friends-panel.is-chat-open .friend-chat-detail.is-short-thread .friend-chat-messages,
.friends-panel.is-chat-open .friend-chat-detail.is-empty-thread .friend-chat-messages {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px;
}

.friends-panel.is-chat-open .friend-chat-form {
  position: relative;
  bottom: auto;
  grid-template-columns: 42px minmax(0, 1fr) 58px;
  gap: 6px;
  align-items: end;
  overflow: hidden;
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
  background: var(--surface-strong);
}

.friends-panel.is-chat-open .chat-attach-button {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  padding: 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.friends-panel.is-chat-open .friend-chat-form textarea {
  height: 42px;
  min-height: 42px;
  max-height: 112px;
  padding: 9px 12px;
  border-radius: 16px;
  font-size: 16px;
  line-height: 1.35;
}

.friends-panel.is-chat-open .friend-chat-form > button[type="submit"] {
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.friends-panel.is-chat-open .chat-attachment-preview {
  margin-left: 39px;
  font-size: 0.78rem;
}

.friends-panel.is-chat-open .friend-chat-form .chat-attach {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
}

.friends-panel.is-chat-open .friend-chat-form textarea {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.friends-panel.is-chat-open .friend-chat-form > button[type="submit"] {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  white-space: nowrap;
}

.friends-panel.is-chat-open .chat-attachment-preview {
  grid-column: 2 / 4;
  grid-row: 2;
}

.friend-suggestion-rail {
  overflow: hidden;
  border: 1px solid rgba(119, 83, 180, 0.13);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.friend-suggestion-head {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.friend-suggestion-head span,
.friend-suggestion-card small,
.friend-request-row small {
  color: var(--muted);
  font-size: 0.84rem;
}

.friend-suggestion-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(142px, 42%);
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 3px;
}

.friend-suggestion-card {
  scroll-snap-align: start;
  display: grid;
  justify-items: start;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
}

.friend-suggestion-card button,
.friend-request-row button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.78rem;
}

.friend-request-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.friend-request-row.is-outgoing {
  border-left-color: rgba(119, 83, 180, 0.34);
  background: rgba(255, 255, 255, 0.7);
}

.friend-request-row .friend-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.76rem;
}

.friend-request-row span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.friend-request-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.friend-request-row .friend-request-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}

@media (max-width: 560px) {
  .friend-request-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 7px;
  }

  .friend-request-row .friend-avatar {
    width: 34px;
    height: 34px;
  }

  .friend-request-row .friend-request-actions {
    grid-column: auto;
    justify-content: end;
  }

  .friend-request-row .friend-request-actions button {
    flex: 0 0 auto;
    min-width: 0;
  }
}

@media (max-width: 380px) {
  .friend-request-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .friend-request-row .friend-request-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .friend-request-row.is-outgoing .friend-request-actions {
    grid-template-columns: 1fr;
  }
}

.app-loading {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  justify-items: center;
  background: var(--bg);
  color: var(--text);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.app-loading strong {
  font-size: clamp(3rem, 13vw, 7rem);
  line-height: 0.92;
  color: var(--accent-strong);
  letter-spacing: 0;
}

.app-loading[hidden] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 560px) {
  .feed-card-image {
    min-height: min(64vw, 340px);
  }

  .feed-card-image .photo-frame {
    min-height: min(64vw, 340px);
  }

  .purchase-card {
    grid-template-columns: 1fr;
  }

  .purchase-card-meta,
  .purchase-actions {
    justify-content: flex-start;
  }

  .offer-detail-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Final mobile pass: these rules live after the profile styles on purpose. */
@media (max-width: 560px) {
  .profile-sheet {
    gap: 14px;
    padding: 14px;
  }

  .purchase-panel {
    inset: var(--visual-offset-top, 0px) 0 auto;
    height: var(--app-height, 100dvh);
    place-items: start center;
    padding-top: max(24px, var(--safe-top));
    padding-bottom: max(14px, var(--safe-bottom));
    padding-inline: max(16px, var(--safe-left)) max(16px, var(--safe-right));
  }

  .purchase-panel .purchase-sheet {
    position: relative;
    width: min(500px, 100%);
    min-height: 0;
    max-height: calc(var(--app-height, 100dvh) - 28px);
    padding: 14px;
    padding-bottom: max(14px, var(--safe-bottom));
    scroll-padding-block: 72px;
  }

  .purchase-panel .profile-close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    min-height: 38px;
    padding-inline: 12px;
  }

  .purchase-panel .purchase-sheet > div {
    padding-right: 94px;
  }

  .purchase-panel .purchase-sheet label {
    gap: 6px;
  }

  .purchase-panel .purchase-sheet label > span {
    font-size: 0.9rem;
  }

  .purchase-panel .purchase-sheet input,
  .purchase-panel .purchase-sheet textarea {
    min-height: 48px;
    padding: 11px 12px;
    font-size: 16px;
    line-height: 1.3;
  }

  .purchase-panel .purchase-sheet textarea {
    min-height: 84px;
    max-height: 112px;
  }

  .purchase-panel #purchaseSubmitButton {
    position: sticky;
    bottom: 0;
    z-index: 3;
    box-shadow: 0 -8px 18px var(--surface-strong);
  }

  .profile-sheet-head {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .profile-sheet-head .profile-preview-avatar {
    width: 54px;
    height: 54px;
  }

  .profile-sheet-head h2 {
    margin: 2px 0 0;
    font-size: 1.4rem;
    line-height: 1.1;
  }

  .profile-contact-text {
    margin-top: 6px;
    font-size: 0.9rem;
  }

  .profile-shop-surface {
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
  }

  .profile-shop-heading {
    gap: 8px;
  }

  .profile-shop-heading h3 {
    font-size: clamp(1.65rem, 8vw, 2.2rem);
    line-height: 0.98;
    overflow-wrap: anywhere;
  }
}

/* Compact "Meine Angebote" list. Keep this late to override older card/mobile rules. */
.my-offers-list {
  gap: 8px;
}

.my-offer-editor {
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
}

.my-offer-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.my-offer-photo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.my-offer-card .photo-frame {
  width: 64px;
  height: 64px;
  min-height: 64px;
  border: 0;
  border-radius: 12px;
}

.my-offer-summary {
  min-width: 0;
  gap: 2px;
}

.my-offer-summary strong,
.my-offer-summary p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-offer-summary strong {
  font-size: 0.98rem;
}

.my-offer-summary p {
  max-width: 100%;
  color: var(--muted);
  font-size: 0.9rem;
}

.my-offer-card-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.my-offer-card-actions button {
  min-height: 36px;
  padding: 0 10px;
}

@media (max-width: 560px) {
  .my-offer-card {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 8px;
    border-radius: 14px;
  }

  .my-offer-photo,
  .my-offer-card .photo-frame {
    width: 54px;
    height: 54px;
    min-height: 54px;
  }

  .my-offer-card-actions {
    flex-direction: column;
    gap: 4px;
  }

  .my-offer-card-actions button {
    min-height: 31px;
    padding: 0 8px;
    font-size: 0.78rem;
  }
}

/* Quiet, single-line feed masthead. */
.feed-brand-simple {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 72px;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 2px 14px;
  background: transparent;
  box-shadow: none;
}

.feed-brand-simple h1 {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 40px;
  min-width: 0;
  margin: 0;
  border: 1px solid #d7d7df;
  border-radius: 8px;
  padding: 0 14px;
  background: #ffffff;
  color: #111111;
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  overflow-wrap: normal;
}

.feed-brand-simple h1 span {
  color: #111111;
}

.feed-brand-simple .feed-admin-link {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface-strong);
  box-shadow: none;
  color: var(--text);
  font-size: 0.86rem;
}

@media (max-width: 560px) {
  .feed-brand-simple {
    min-height: 64px;
    gap: 10px;
    padding: 8px 0 12px;
  }

  .feed-brand-simple h1 {
    min-height: 36px;
    padding: 0 11px;
    font-size: 1.2rem;
  }

  .feed-brand-simple .feed-admin-link {
    min-height: 36px;
    padding: 0 11px;
    font-size: 0.8rem;
  }
}

.feed-loading-state {
  min-height: 42vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
}

.feed-loading-state span {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: feed-loading-spin 0.7s linear infinite;
}

.feed-taskbar button:disabled {
  opacity: 0.55;
  cursor: default;
}

@keyframes feed-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .feed-loading-state span {
    animation: none;
  }
}
