/* Wall — custom styles on top of Pico CSS */

/* --- Outfit font (self-hosted) --- */

/* latin-ext */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/outfit-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/outfit-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Override Pico's system font stack */
:root {
  --pico-font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}

/* --- Header --- */

.wall-header {
  text-align: center;
  padding: 2rem 0 0.75rem;
}

.wall-header h1 {
  margin-bottom: 0.25rem;
  font-size: 1.6rem;
  font-weight: 500;
}

.logged-out {
  font-weight: 300;
  opacity: 0.6;
}

.logged-in {
  font-weight: 300;
  opacity: 0.5;
  font-size: 0.85em;
}

.wordmark {
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--pico-primary), color-mix(in srgb, var(--pico-primary) 60%, #9333ea));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 1;
  padding-right: 0.15em;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--pico-muted-color);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 50%, transparent);
  border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  line-height: 1.2;
  white-space: nowrap;
}

.cta-link:hover {
  color: var(--pico-primary);
  border-color: color-mix(in srgb, var(--pico-primary) 50%, transparent);
  background: color-mix(in srgb, var(--pico-primary) 5%, transparent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--pico-primary) 10%, transparent);
}

.cta-link:active {
  transform: translateY(0);
  box-shadow: none;
}

.profile-pic {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.75rem;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  animation: profileGlow 2.5s ease-in-out;
}

.profile-pic-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--pico-primary-background), color-mix(in srgb, var(--pico-primary-background) 80%, #7c3aed));
  color: var(--pico-primary-inverse);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  animation: profileGlow 2.5s ease-in-out;
}

@keyframes profileGlow {
  0% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }
  50% { box-shadow: 0 4px 30px rgba(var(--pico-primary-rgb, 26, 95, 180), 0.2); }
  100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }
}

/* --- Wall navigation (tabs + toolbar) --- */

.wall-nav {
  max-width: 520px;
  margin: 0 auto 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}

.wall-tabs {
  display: flex;
  justify-content: center;
  gap: 0.15rem;
  background: none;
  padding: 0.2rem;
  font-size: 0.82rem;
}

.wall-tabs a,
.wall-tabs strong {
  padding: 0.4rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  line-height: 1.3;
}

.wall-tabs a {
  color: var(--pico-muted-color);
}

.wall-tabs a:hover {
  color: var(--pico-color);
  background: color-mix(in srgb, var(--pico-muted-color) 8%, transparent);
}

.wall-tabs strong {
  background: var(--pico-background-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.wall-toolbar {
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--pico-muted-border-color);
  background: color-mix(in srgb, var(--pico-muted-color) 4%, transparent);
  overflow: hidden;
}

.wall-toolbar:focus-within {
  border-color: var(--pico-primary);
}

.wall-toolbar .wall-search {
  appearance: none;
  -webkit-appearance: none;
  /* Neutralize Pico's calc()-based height/padding/margin via its own variables */
  --pico-form-element-spacing-vertical: 0;
  --pico-form-element-spacing-horizontal: 0.75rem;
  --pico-border-width: 0;
  --pico-spacing: 0;
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 0.75rem;
  padding-inline-start: 0.75rem;
  border: none;
  border-radius: 0;
  outline: none;
  background: transparent;
  background-image: none;
  box-shadow: none;
  font-size: 0.82rem;
  line-height: 1;
  font-family: inherit;
  color: var(--pico-color);
  transition: none;
}

.wall-toolbar .wall-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 28px;
  width: 28px;
  padding: 7px;
  background: var(--pico-muted-color);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  mask-size: 14px;
  -webkit-mask-size: 14px;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  border-radius: 4px;
  cursor: pointer;
}

.wall-toolbar .wall-search::-webkit-search-cancel-button:hover {
  background: var(--pico-color);
}

.wall-toolbar .wall-search:focus {
  border: none;
  box-shadow: none;
}

.wall-toolbar .wall-search::placeholder {
  color: var(--pico-muted-color);
  font-weight: 300;
}

.wall-toolbar .wall-toolbar-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 100%;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
  color: var(--pico-muted-color);
  cursor: pointer;
  border-left: 1px solid var(--pico-muted-border-color);
  transition: color 0.15s ease, background 0.15s ease;
  text-decoration: none;
}

.wall-toolbar-btn:hover {
  color: var(--pico-color);
  background: color-mix(in srgb, var(--pico-muted-color) 8%, transparent);
}

.wall-toolbar-btn.active {
  color: var(--pico-primary);
  background: color-mix(in srgb, var(--pico-primary) 6%, transparent);
}

.wall-toolbar-rss:hover {
  color: #ee802f;
  background: color-mix(in srgb, #ee802f 6%, transparent);
}

.wall-toolbar .wall-toolbar-logout {
  width: auto;
  padding: 0 0.75rem;
  font-family: 'Outfit', system-ui, sans-serif;
  font-style: italic;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--pico-primary), color-mix(in srgb, var(--pico-primary) 60%, #9333ea));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoutGlow 3s ease-in-out infinite;
}

.wall-toolbar-logout em {
  font-style: italic;
}

.wall-toolbar .wall-toolbar-logout:hover {
  filter: brightness(1.2);
  background: linear-gradient(135deg, var(--pico-primary), color-mix(in srgb, var(--pico-primary) 60%, #9333ea));
  -webkit-background-clip: text;
  background-clip: text;
}

@keyframes logoutGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

.wall-toolbar-btn svg {
  display: block;
}

.user-nav a {
  color: var(--pico-muted-color);
}

.user-nav a:hover {
  color: var(--pico-color);
  background: color-mix(in srgb, var(--pico-muted-color) 8%, transparent);
}

.user-nav strong {
  background: var(--pico-background-color);
  color: var(--pico-color);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* --- Date separators --- */

.date-separator {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1rem;
  color: var(--pico-muted-color);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.date-separator::before,
.date-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--pico-muted-border-color);
  animation: lineGrow 0.6s ease-out both;
}

.date-separator::before {
  transform-origin: right;
}

.date-separator::after {
  transform-origin: left;
}

@keyframes lineGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* --- Feed layout --- */

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

/* --- Posts --- */

.post {
  animation: postFadeIn 0.4s ease-out both;
  margin-bottom: 1.5rem;
  overflow: hidden;
  padding: 0;
  box-shadow: none;
  border: 1px solid var(--pico-muted-border-color);
}

.post > footer {
  margin: 0;
  padding: 0.5rem 0.75rem;
  background-color: transparent;
  border-top: none;
  border-radius: 0;
}

.post-text,
.post-link {
  padding: 0.75rem;
}

.post-text > footer,
.post-link > footer {
  padding: 0.5rem 0 0;
}

.post-photo > .post-content,
.post-video > .post-content {
  padding: 0.5rem 0.75rem 0;
}

.post-photo > footer,
.post-video > footer {
  padding: 0.5rem 0.75rem;
}

.post-time {
  color: var(--pico-muted-color);
}

@keyframes postFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger post animations */
.date-group .post:nth-child(2) { animation-delay: 0.05s; }
.date-group .post:nth-child(3) { animation-delay: 0.1s; }
.date-group .post:nth-child(4) { animation-delay: 0.15s; }
.date-group .post:nth-child(5) { animation-delay: 0.2s; }

/* --- Text posts --- */

.post-text .post-content {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.6;
  margin-bottom: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* --- Link cards --- */

.link-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.link-card-image {
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
  display: block;
}

.link-card-body {
  padding: 0.75rem 1rem;
}

.link-card-body strong {
  display: block;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-card-body p {
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-card-domain {
  color: var(--pico-muted-color);
}

/* --- Photos --- */

.post-photo img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--pico-border-radius);
  display: block;
  margin-bottom: 0.5rem;
  cursor: pointer;
  background: color-mix(in srgb, var(--pico-muted-color) 5%, transparent);
}

/* --- Videos --- */

.post-video video {
  width: 100%;
  max-height: 400px;
  border-radius: var(--pico-border-radius);
  display: block;
  margin-bottom: 0.5rem;
  background: #000;
}

/* --- Lightbox (fullscreen image view) --- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: lightboxIn 0.25s ease-out;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox-overlay img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  animation: lightboxImgIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lightboxIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lightboxImgIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-overlay.closing {
  animation: lightboxOut 0.2s ease-in forwards;
}

.lightbox-overlay.closing img {
  animation: lightboxImgOut 0.2s ease-in forwards;
}

@keyframes lightboxOut {
  to { opacity: 0; }
}

@keyframes lightboxImgOut {
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* --- Infinite scroll --- */

.load-more {
  text-align: center;
  padding: 2rem 0;
}

.load-more-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
}

.feed-end {
  text-align: center;
  padding: 1.5rem 0;
  color: var(--pico-muted-color);
}

/* --- Empty state --- */

.empty-wall {
  text-align: center;
  padding: 4rem 0;
  color: var(--pico-muted-color);
  font-size: 1.1rem;
}

/* --- Grid / Collage feed --- */

.feed-grid {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  columns: var(--feed-columns, 2);
  column-gap: 0.75rem;
}

.feed-grid .post {
  break-inside: avoid;
  margin-bottom: 0.75rem;
}

.feed-grid .date-group {
  break-inside: avoid;
}

.feed-grid .post-photo img {
  max-height: 300px;
}

.feed-grid .post-video video {
  max-height: 300px;
}

.feed-collage .post-photo img,
.feed-collage .post-video video {
  max-height: 350px;
}

/* Limit columns on small screens */
@media (max-width: 576px) {
  .feed-grid { columns: min(var(--feed-columns, 2), 2) !important; }
}
@media (max-width: 400px) {
  .feed-grid { columns: 1 !important; }
}

/* --- Inline composer (owner view) --- */

.inline-composer,
.owner-toolbar {
  margin-bottom: 1.25rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.inline-composer {
  border: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 40%, transparent);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  background: color-mix(in srgb, var(--pico-muted-color) 3%, transparent);
}

.owner-toolbar {
  border: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 40%, transparent);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  background: color-mix(in srgb, var(--pico-muted-color) 3%, transparent);
}

/* Compact form overrides — tame Pico's bulky defaults inside panels */
.owner-toolbar input,
.owner-toolbar select,
.owner-toolbar textarea,
.inline-composer input:not([type="file"]):not([type="hidden"]),
.inline-composer select,
.inline-composer textarea {
  font-size: 0.82rem !important;
  padding: 0.4rem 0.6rem !important;
  margin-bottom: 0.5rem !important;
  border-radius: 6px;
}

.owner-toolbar label,
.inline-composer label {
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
}

.owner-toolbar fieldset {
  padding: 0.75rem 1rem !important;
  margin-bottom: 0.75rem !important;
}

.owner-toolbar legend {
  font-size: 0.7rem !important;
}

.owner-toolbar button[type="submit"] {
  font-size: 0.78rem !important;
  padding: 0.4rem 1rem !important;
}

.settings-form {
  max-width: 480px;
  margin: 0 auto;
}

.settings-form fieldset {
  margin-bottom: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 40%, transparent);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.settings-form legend {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pico-muted-color);
  padding: 0 0.35rem;
}

.settings-form label {
  font-size: 0.8rem;
  font-weight: 400;
  margin-bottom: 0.6rem;
  display: block;
  overflow: visible;
}

.settings-form button[type="submit"] {
  width: auto;
  padding: 0.4rem 1.2rem;
  font-size: 0.78rem;
  border-radius: 8px;
}

.settings-link {
  display: block;
  text-align: center;
  margin-top: 0.5rem;
  color: var(--pico-muted-color);
}

/* --- Manage posts list --- */

.manage-posts-list {
  max-height: 300px;
  overflow-y: auto;
}

.manage-post {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 30%, transparent);
  gap: 0.5rem;
}

.manage-post:last-child {
  border-bottom: none;
}

.manage-post-type {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pico-muted-color);
  background: color-mix(in srgb, var(--pico-muted-color) 10%, transparent);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  flex-shrink: 0;
}

.manage-post-text {
  font-size: 0.8rem;
  color: var(--pico-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.manage-post-date {
  color: var(--pico-muted-color);
  font-size: 0.7rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.manage-post-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.manage-post-actions button {
  background: none;
  border: none;
  color: var(--pico-muted-color);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.manage-post-actions button:hover {
  color: var(--pico-primary);
  background: color-mix(in srgb, var(--pico-primary) 8%, transparent);
}

.manage-post-actions .delete-post-btn:hover {
  color: var(--pico-del-color, #c62828);
  background: color-mix(in srgb, var(--pico-del-color, #c62828) 8%, transparent);
}

/* --- Settings sections --- */

.settings-sections {
  padding-top: 0.25rem;
  overflow: visible;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.settings-divider {
  height: 1px;
  background: color-mix(in srgb, var(--pico-muted-border-color) 50%, transparent);
  margin: 1.5rem 0;
}

.settings-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pico-muted-color);
  margin-bottom: 0.85rem;
}

/* --- Import CTA --- */

.import-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  color: var(--pico-muted-color);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.import-cta:hover {
  color: var(--pico-primary);
  border-color: var(--pico-primary);
  background: color-mix(in srgb, var(--pico-primary) 4%, transparent);
}

.import-cta svg {
  flex-shrink: 0;
}

/* --- Feed management --- */

/* Reset Pico defaults inside feed section */
.feed-list input,
.feed-list select,
.feed-list button,
.feed-add-row input,
.feed-add-row button {
  margin-bottom: 0 !important;
  width: auto !important;
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.feed-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 40%, transparent);
  border-radius: 10px;
  background: var(--pico-background-color);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
  flex-direction: column;
}

.feed-item.dragging { opacity: 0.4; }
.feed-item.drag-over {
  border-color: var(--pico-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pico-primary) 12%, transparent);
}

.feed-drag-handle {
  cursor: grab;
  color: var(--pico-muted-color);
  font-size: 0.75rem;
  user-select: none;
  flex-shrink: 0;
  line-height: 1;
  opacity: 0.5;
}
.feed-drag-handle:active { cursor: grabbing; }

.feed-item-all {
  background: color-mix(in srgb, var(--pico-primary) 4%, transparent);
  border-color: color-mix(in srgb, var(--pico-primary) 15%, transparent);
  flex-direction: row;
  align-items: center;
  padding: 0.65rem 0.85rem;
  gap: 0.5rem;
}

.feed-item-label {
  font-size: 0.82rem;
  font-weight: 500;
  flex: 1;
}

.feed-item-meta {
  color: var(--pico-muted-color);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 300;
}

/* Feed card — stacked layout for clarity */
.feed-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-width: 0;
}

.feed-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
}

.feed-card-name {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.25rem 0.4rem !important;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  flex: 1;
  min-width: 80px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.feed-card-name:hover {
  border-color: color-mix(in srgb, var(--pico-muted-border-color) 50%, transparent);
  background: color-mix(in srgb, var(--pico-muted-color) 4%, transparent);
}

.feed-card-name:focus {
  border-color: var(--pico-primary);
  background: color-mix(in srgb, var(--pico-primary) 4%, transparent);
  outline: none;
}

.feed-card-bottom {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 25%, transparent);
  background: color-mix(in srgb, var(--pico-muted-color) 3%, transparent);
  flex-wrap: wrap;
}

.feed-card-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.73rem;
  color: var(--pico-muted-color);
  flex-shrink: 0;
}

.feed-card-toggle input[type="checkbox"] {
  height: 1.2rem !important;
}

.feed-card-sel {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.73rem;
  color: var(--pico-muted-color);
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.feed-card-sel select {
  font-size: 0.73rem !important;
  padding: 0.2rem 0.35rem !important;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 40%, transparent);
  background: var(--pico-background-color);
}

.feed-card-save {
  font-size: 0.7rem;
  padding: 0.3rem 0.7rem !important;
  background: var(--pico-primary-background);
  color: var(--pico-primary-inverse);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.feed-card-save:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.feed-card-del {
  background: none;
  border: none;
  color: var(--pico-muted-color);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  transition: color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.feed-card-del:hover {
  color: #e53935;
  background: color-mix(in srgb, #e53935 6%, transparent);
}

/* Feed selector in composer */
.feed-select {
  all: unset;
  font-size: 0.78rem;
  font-family: inherit;
  padding: 0.3rem 0.5rem;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 40%, transparent);
  border-radius: 6px;
  color: var(--pico-color);
  background: var(--pico-background-color);
  cursor: pointer;
  flex-shrink: 0;
}

/* Add feed row */
.feed-add-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.25rem;
}

.feed-add-form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
}

.feed-add-input {
  font-size: 0.82rem !important;
  padding: 0.4rem 0.65rem !important;
  flex: 1;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 40%, transparent) !important;
}

.feed-add-btn {
  font-size: 1rem !important;
  padding: 0.3rem 0.65rem !important;
  background: var(--pico-primary-background);
  color: var(--pico-primary-inverse);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.2;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.feed-add-btn:hover { opacity: 0.85; }

.feed-import-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--pico-muted-color);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.feed-import-link:hover {
  color: var(--pico-primary);
}

/* --- Import banner (sticky top) --- */

.import-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  background: var(--pico-primary-background);
  color: var(--pico-primary-inverse);
  animation: bannerSlide 0.3s ease-out;
}

.import-banner.done {
  background: #2e7d32;
}

.import-banner.error {
  background: #c62828;
}

@keyframes bannerSlide {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* --- Login prompt --- */

.login-prompt {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.login-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  color: var(--pico-muted-color);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 50%, transparent);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.login-pill:hover {
  color: var(--pico-primary);
  border-color: color-mix(in srgb, var(--pico-primary) 40%, transparent);
  background: color-mix(in srgb, var(--pico-primary) 5%, transparent);
  transform: translateY(-1px);
}

.login-pill svg {
  display: block;
  flex-shrink: 0;
}

/* --- Post footer --- */

.post footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
  padding-top: 0.4rem;
}

.post-footer-right {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.post-permalink {
  color: var(--pico-muted-color);
  text-decoration: none;
  font-size: 0.75rem;
}

.post-permalink:hover {
  color: var(--pico-color);
}

.share-post-btn,
.post-delete-inline {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--pico-muted-color);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.share-post-btn svg,
.post-delete-inline svg {
  display: block;
}

.share-post-btn:hover {
  color: var(--pico-primary);
  background: color-mix(in srgb, var(--pico-primary) 10%, transparent);
}

.share-post-btn:active {
  transform: scale(0.9);
}

.post-delete-inline {
  opacity: 0.5;
}

.post:hover .post-delete-inline,
.post-delete-inline:focus {
  opacity: 1;
}

.post-delete-inline:hover {
  color: #c62828;
  background: color-mix(in srgb, #c62828 8%, transparent);
}

/* Highlight targeted post from permalink */
.post:target {
  animation: highlightPost 2s ease-out;
}

@keyframes highlightPost {
  0% { box-shadow: 0 0 0 3px var(--pico-primary); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* --- Unclaimed page --- */

.unclaimed-actions {
  text-align: center;
  margin-top: 1.5rem;
}

.unclaimed-actions form {
  display: inline;
}

.unclaimed-actions .claim-link {
  display: inline-block;
  background: var(--pico-primary);
  color: var(--pico-primary-inverse) !important;
  border: none !important;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.6rem 2rem;
  border-radius: 2rem;
  cursor: pointer;
}

.unclaimed-actions .claim-link:hover {
  opacity: 0.85;
}

.unclaimed-actions .secondary-actions {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 1rem;
}

.unclaimed-actions .secondary-actions .cta-link {
  color: #555;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  background: none;
  border: none;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.unclaimed-actions .secondary-actions .cta-link:hover {
  color: #111;
}

.unclaimed-actions .secondary-actions .separator {
  color: #ccc;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0.4rem 0;
  user-select: none;
}

/* --- Directory (root page) --- */

.dir-header {
  text-align: center;
  padding: 3rem 0 0.25rem;
}

.dir-header h1 {
  font-size: 2.25rem;
  font-weight: 400;
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em;
}

.dir-subtitle {
  color: var(--pico-muted-color);
  font-size: 0.8rem;
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 400;
}

.dir-search-wrap {
  max-width: 400px;
  margin: 1.75rem auto 2rem;
}

.dir-search {
  width: 100%;
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 60%, transparent);
  background: color-mix(in srgb, var(--pico-muted-color) 4%, var(--pico-background-color));
  color: var(--pico-color);
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dir-search:focus {
  outline: none;
  border-color: var(--pico-primary);
  background: var(--pico-background-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pico-primary) 10%, transparent);
}

.dir-search::placeholder {
  color: var(--pico-muted-color);
  font-weight: 300;
}

.dir-list {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dir-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--pico-color);
  border: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 35%, transparent);
  background: var(--pico-background-color);
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

.dir-card:hover {
  border-color: color-mix(in srgb, var(--pico-primary) 40%, transparent);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--pico-primary) 8%, transparent),
              0 1px 3px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.dir-card:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.dir-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dir-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--pico-primary-background), color-mix(in srgb, var(--pico-primary-background) 80%, #7c3aed));
  color: var(--pico-primary-inverse);
}

.dir-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dir-card-name {
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.3;
}

.dir-card-meta {
  font-size: 0.73rem;
  color: var(--pico-muted-color);
  font-weight: 300;
}

.dir-card-arrow {
  flex-shrink: 0;
  color: color-mix(in srgb, var(--pico-muted-color) 40%, transparent);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.dir-card:hover .dir-card-arrow {
  color: var(--pico-primary);
  transform: translateX(3px);
}

.dir-empty {
  text-align: center;
  padding: 3.5rem 0;
  color: var(--pico-muted-color);
  font-size: 0.95rem;
  font-weight: 300;
}

.dir-footer {
  text-align: center;
  padding: 2rem 0 1rem;
}

.dir-claim-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--pico-muted-color);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--pico-muted-border-color) 50%, transparent);
  border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  line-height: 1.2;
}

.dir-claim-link:hover {
  color: var(--pico-primary);
  border-color: color-mix(in srgb, var(--pico-primary) 50%, transparent);
  transform: translateY(-1px);
}

/* --- Responsive --- */

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

/* --- Tablet+ (768px) --- */
@media (min-width: 768px) {
  .wall-feed {
    max-width: 520px;
  }

  .wall-feed.feed-grid {
    max-width: 800px;
  }

  .post-text .post-content {
    font-size: 1.15rem;
  }

  .link-card-image {
    max-height: 200px;
  }

  .inline-composer,
  .owner-toolbar {
    max-width: 520px;
  }

  /* Composer footer spreads out */
  .composer-footer {
    gap: 1rem;
  }
}

/* --- Desktop (1024px) --- */
@media (min-width: 1024px) {
  .wall-feed {
    max-width: 560px;
  }

  .wall-feed.feed-grid {
    max-width: 800px;
  }

  .wall-header h1 {
    font-size: 1.8rem;
  }

  .profile-pic {
    width: 84px;
    height: 84px;
  }

  .profile-pic-placeholder {
    width: 84px;
    height: 84px;
    font-size: 2.2rem;
  }

  .inline-composer,
  .owner-toolbar {
    max-width: 560px;
  }

  .settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .settings-grid fieldset {
    margin-bottom: 0;
  }

  .settings-form {
    max-width: 100%;
  }

  .feed-card-bottom {
    flex-wrap: nowrap;
    gap: 0.75rem;
  }

  /* Horizontal link cards on large screens */
  .link-card {
    display: flex;
  }

  .link-card-image {
    width: 200px;
    min-width: 200px;
    max-height: none;
    aspect-ratio: auto;
  }

  .link-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .manage-posts-list {
    max-height: 400px;
  }
}

/* --- Wide desktop (1440px) --- */
@media (min-width: 1440px) {
  .wall-feed {
    max-width: 600px;
  }

  .wall-feed.feed-grid {
    max-width: 900px;
  }
}

/* --- Mobile (576px) --- */
@media (max-width: 576px) {
  .wall-header h1 {
    font-size: 1.25rem;
  }

  .profile-pic,
  .profile-pic-placeholder {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  .post {
    margin-bottom: 1rem;
    border-radius: 0;
  }

  .post-photo img {
    border-radius: 0;
    margin-left: calc(-1 * var(--pico-block-spacing-horizontal, 1rem));
    margin-right: calc(-1 * var(--pico-block-spacing-horizontal, 1rem));
    width: calc(100% + 2 * var(--pico-block-spacing-horizontal, 1rem));
    max-width: none;
  }

  .post-video video {
    border-radius: 0;
    margin-left: calc(-1 * var(--pico-block-spacing-horizontal, 1rem));
    margin-right: calc(-1 * var(--pico-block-spacing-horizontal, 1rem));
    width: calc(100% + 2 * var(--pico-block-spacing-horizontal, 1rem));
    max-width: none;
  }

  .link-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-left: calc(-1 * var(--pico-block-spacing-horizontal, 1rem));
    margin-right: calc(-1 * var(--pico-block-spacing-horizontal, 1rem));
    width: calc(100% + 2 * var(--pico-block-spacing-horizontal, 1rem));
  }

  .date-separator {
    margin: 1.5rem 0 0.75rem;
  }

  .composer-footer {
    gap: 0.3rem;
  }

  .wall-tabs {
    font-size: 0.78rem;
  }

  .wall-tabs a,
  .wall-tabs strong {
    padding: 0.35rem 0.75rem;
  }

  .wall-toolbar {
    max-width: 100%;
    height: 38px;
  }

  .wall-toolbar-btn {
    width: 38px;
  }

  .feed-card-bottom {
    gap: 0.4rem;
    padding: 0.4rem 0.65rem;
  }

  .feed-card-top {
    padding: 0.5rem 0.65rem;
  }

  .feed-add-row {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-form fieldset {
    padding: 0.65rem 0.85rem;
  }

  .cta-link {
    padding: 0.45rem 0.9rem;
    font-size: 0.68rem;
  }

  .dir-header {
    padding-top: 2rem;
  }

  .dir-header h1 {
    font-size: 1.75rem;
  }

  .dir-card {
    padding: 0.7rem 0.85rem;
    gap: 0.75rem;
    border-radius: 12px;
  }

  .dir-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
  }

  .dir-card-name {
    font-size: 0.92rem;
  }

  .unclaimed-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
}

/* =============================================================================
   ADMIN STYLES
   ============================================================================= */

.admin-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.admin-composer {
  margin-bottom: 2rem;
}

.post-field {
  margin-bottom: 0.5rem;
}

/* --- Composer footer --- */

.composer-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.composer-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 6px;
  color: var(--pico-muted-color);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
  margin: 0;
  flex-shrink: 0;
}

.composer-tool-btn:hover {
  color: var(--pico-primary);
  background: color-mix(in srgb, var(--pico-primary) 8%, transparent);
}

.composer-tool-btn svg {
  display: block;
  flex-shrink: 0;
}

.tool-label {
  font-size: 0.75rem;
}

.composer-footer button[type="submit"] {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  border-radius: 8px;
  background: var(--pico-primary-background);
  color: var(--pico-primary-inverse);
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.composer-footer button[type="submit"]:hover {
  opacity: 0.9;
}

.backdate-picker {
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
  max-width: 200px;
  margin-bottom: 0;
  flex-shrink: 1;
}

.remove-media {
  background: none;
  border: none;
  color: var(--pico-del-color, #c62828);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 0.3rem;
  vertical-align: middle;
}

/* (nav-pill-icon and nav-pill-search removed — replaced by wall-tool-btn and wall-search) */

/* Hidden summary for settings panel */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Edit input in manage list --- */

.edit-input {
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  width: 100%;
  margin: 0;
}

/* Admin post list */

.admin-post {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
}

.admin-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.admin-post-meta button {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

.admin-message {
  padding: 0.75rem 1rem;
  border-radius: var(--pico-border-radius);
  margin-bottom: 1rem;
}

.admin-message.success {
  background: color-mix(in srgb, green 10%, transparent);
  border: 1px solid green;
}

.admin-message.error {
  background: color-mix(in srgb, red 10%, transparent);
  border: 1px solid red;
}

.import-link {
  font-weight: 500;
}

.edit-area {
  width: 100%;
  font-family: inherit;
  font-size: inherit;
}
