/* Digital Guestbook - Birthday style */
:root {
  --color-bg: #fef8f3;
  --color-card: #ffffff;
  --color-primary: #c45c3e;
  --color-primary-hover: #a84a30;
  --color-gold: #d4a84b;
  --color-gold-light: #f5e6c8;
  --color-text: #2d2a26;
  --color-text-muted: #6b6560;
  --color-border: #e8e4e0;
  --color-success: #2d7d46;
  --color-warning: #c9a227;
  --color-danger: #c53030;
  --font-sans: 'Quicksand', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

body.birthday-theme {
  background: linear-gradient(180deg, #fef8f3 0%, #fdf0e6 50%, #fef8f3 100%);
  background-attachment: fixed;
}

/* Decorations */
.decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.confetti {
  position: absolute;
  inset: 0;
}

.confetti span {
  position: absolute;
  animation: confetti-fall linear infinite;
  opacity: 0.8;
}

.confetti span.round {
  border-radius: 50%;
}

.confetti span.square {
  border-radius: 2px;
}

@keyframes confetti-fall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 0.8; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* Floating balloons & ribbons */
.balloons {
  position: absolute;
  inset: 0;
}

.balloons .balloon {
  position: absolute;
  font-size: 1.5rem;
  animation: balloon-float 8s ease-in-out infinite;
  opacity: 0.6;
}

.balloons .balloon:nth-child(1) { left: 8%; top: 20%; animation-delay: 0s; }
.balloons .balloon:nth-child(2) { left: 25%; top: 60%; animation-delay: 1.5s; }
.balloons .balloon:nth-child(3) { left: 85%; top: 30%; animation-delay: 0.5s; }
.balloons .balloon:nth-child(4) { left: 15%; top: 75%; animation-delay: 2s; }
.balloons .balloon:nth-child(5) { left: 70%; top: 15%; animation-delay: 1s; }
.balloons .balloon:nth-child(6) { left: 50%; top: 85%; animation-delay: 2.5s; }
.balloons .balloon:nth-child(7) { left: 92%; top: 70%; animation-delay: 0.8s; }

@keyframes balloon-float {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-15px) translateX(10px); }
  50% { transform: translateY(-5px) translateX(-8px); }
  75% { transform: translateY(-20px) translateX(5px); }
}

/* Header */
.header {
  background: linear-gradient(135deg, #c45c3e 0%, #8b3a2a 100%);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

.header-birthday {
  background: linear-gradient(135deg, #c45c3e 0%, #a84a30 50%, #8b3a2a 100%);
  box-shadow: 0 4px 20px rgba(196, 92, 62, 0.3);
  position: relative;
}

.header-profile-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.9);
  margin-bottom: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-display);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.header .description {
  margin: 0 0 1.5rem;
  opacity: 0.95;
  font-size: 1rem;
}

.header-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.header-small .header-actions { display: none; }

.back-link {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: white;
  color: var(--color-primary);
}

.btn-primary:hover {
  background: rgba(255,255,255,0.95);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.5);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.3);
}

.btn-slideshow {
  background: var(--color-primary);
  color: white;
}

.btn-slideshow:hover {
  background: var(--color-primary-hover);
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1.1rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Main */
.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  position: relative;
  z-index: 1;
}

.main-form {
  max-width: 500px;
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}

.search-input,
.filter-select,
.toolbar .btn-slideshow {
  height: 2.5rem;
  box-sizing: border-box;
}

.search-input {
  flex: 1;
  min-width: 120px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
}

.filter-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
}

.toolbar .btn-slideshow {
  padding: 0 1.2rem;
}

/* Posts grid - masonry layout */
.posts-grid {
  column-gap: 1.25rem;
  column-count: 1;
}

.post-card {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  border-left: 4px solid var(--color-gold);
}

.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.post-name {
  font-size: 1.1rem;
}

.post-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.post-message {
  margin: 0 0 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Audio-only card: stesso respiro di single-media */
.post-card--audio-only .post-header {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}

.post-card--audio-only .post-message {
  margin-bottom: 0.5rem;
}

.post-card--audio-only .post-media {
  margin-top: 0.5rem;
}

.post-media {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

/* Single media (audio or video): layout compatto ma con respiro */
.post-card--single-media .post-header {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}

.post-card--single-media .post-message {
  margin-bottom: 0.5rem;
}

.post-card--single-media .post-media {
  margin-top: 0.5rem;
}

.post-card--single-media .post-media .media-item {
  line-height: 0;
}

/* Player singolo: altezza compatta (override default browser ~150px) */
.post-media--count-1 .media-item video,
.post-media--count-1 .media-item audio {
  height: 54px !important;
  min-height: 54px !important;
  max-height: none !important;
  display: block;
}

/* Audio-only: player full width, compact spacing */
.post-media--audio-only {
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
  gap: 0;
}

.post-media--audio-only .media-item,
.post-media--audio-only .media-item.media-audio {
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
}

/* Same compact layout for single video (e.g. audio saved as webm) */
.post-media--count-1 .media-item {
  min-height: 0;
  padding: 0;
}

.post-media--count-1 {
  gap: 0;
}

.post-media--audio-only audio {
  width: 100% !important;
  max-width: 100%;
  margin: 0;
  display: block;
}

/* Multiple media: ordered grid layout */
.post-media--count-1:not(.post-media--audio-only) {
  grid-template-columns: 1fr;
}

.post-media--count-2 {
  grid-template-columns: repeat(2, 1fr);
}

.post-media--count-3,
.post-media--count-4,
.post-media--count-5 {
  grid-template-columns: repeat(2, 1fr);
}

.media-item {
  border-radius: 8px;
  overflow: hidden;
}

.media-item .media-link {
  display: block;
  height: 100%;
}

.media-item img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  max-height: 220px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* Video min-height solo per griglie con più media (immagini/video) */
.post-media--count-2 .media-item video,
.post-media--count-3 .media-item video,
.post-media--count-4 .media-item video,
.post-media--count-5 .media-item video {
  width: 100%;
  height: 100%;
  min-height: 120px;
  max-height: 220px;
  object-fit: cover;
}

.media-item video {
  width: 100%;
  display: block;
}

.media-item audio {
  width: 100%;
  min-width: 0;
  display: block;
}

.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 3rem 1rem;
}

.empty-state a {
  color: var(--color-primary);
}

/* Add form */
.add-form .form-group {
  margin-bottom: 1.25rem;
  overflow-x: hidden;
}

.add-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.add-form input[type="text"],
.add-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.add-form textarea {
  resize: vertical;
  min-height: 100px;
}

.upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--color-primary);
  background: rgba(196, 92, 62, 0.05);
}

.upload-hint {
  margin: 0 0 0.5rem;
  color: var(--color-text-muted);
}

.upload-browse {
  color: var(--color-primary);
  font-weight: 600;
}

.upload-record {
  margin: 0.75rem 0 0.5rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-record {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: rgba(196, 92, 62, 0.15);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  cursor: pointer;
}

.btn-record:hover {
  background: rgba(196, 92, 62, 0.25);
}

.btn-record.recording {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
  animation: pulse-rec 1.5s infinite;
}

@keyframes pulse-rec {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.record-preview {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--color-bg);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.record-preview #recordPreviewContent {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.record-preview video,
.record-preview audio {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.record-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.record-ready-hint {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.35em;
}

.btn-start-rec {
  background: var(--color-success);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.btn-start-rec:hover {
  background: #248a3d;
}

.btn-stop {
  background: var(--color-danger);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-use {
  background: var(--color-success);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-use:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-discard {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-discard:hover {
  background: var(--color-bg);
}

.upload-limits {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.file-list {
  margin-top: 0.75rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--color-bg);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.file-item .progress-bar {
  flex: 1;
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.file-item .progress-fill {
  height: 100%;
  background: var(--color-primary);
  width: 0%;
  transition: width 0.2s;
}

.file-item .remove-file {
  background: none;
  border: none;
  color: var(--color-danger);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.form-actions {
  margin-top: 1.5rem;
}

.success-message {
  text-align: center;
  padding: 2rem;
}

.success-message h2 {
  color: var(--color-success);
  margin-bottom: 0.5rem;
}

/* Slideshow */
.slideshow-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #2d1f1f 0%, #3d2a2a 40%, #2d1a1a 100%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-overlay[hidden] {
  display: none !important;
}

.slideshow-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
}

.slideshow-close:hover {
  background: rgba(255,255,255,0.3);
}

.slideshow-prev,
.slideshow-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
}

.slideshow-prev { left: 1rem; }
.slideshow-next { right: 1rem; }

.slideshow-prev:hover,
.slideshow-next:hover {
  background: rgba(255,255,255,0.3);
}

.slideshow-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4rem 1rem 4rem;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}

.slideshow-content::-webkit-scrollbar {
  width: 6px;
}

.slideshow-content::-webkit-scrollbar-track {
  background: transparent;
}

.slideshow-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
}

.slideshow-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.4);
}

.slideshow-content img {
  max-width: 100%;
  max-height: 45vh;
  object-fit: contain;
  flex-shrink: 0;
}

.slideshow-content video {
  max-width: 100%;
  max-height: 45vh;
  flex-shrink: 0;
}

.slideshow-content audio {
  width: 100%;
  max-width: 400px;
  flex-shrink: 0;
}

.slideshow-content .slide-media-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
  flex-shrink: 0;
}

.slideshow-content .slide-media-prev,
.slideshow-content .slide-media-next {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.25);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}


.slideshow-content .slide-media-prev:hover,
.slideshow-content .slide-media-next:hover {
  background: rgba(255,255,255,0.4);
}

.slideshow-content .slide-media-counter {
  font-size: 0.95rem;
  color: white;
  opacity: 0.95;
  min-width: 3.5em;
  text-align: center;
}

.slideshow-content .slide-name {
  color: white;
  font-size: 1.25rem;
  margin: 0.5rem 0 0.25rem;
  flex-shrink: 0;
  max-width: 550px;
  width: 100%;
  text-align: left;
}

.slideshow-content .slide-message {
  color: rgba(255,255,255,0.92);
  font-size: 1rem;
  margin: 0;
  max-width: 550px;
  width: 100%;
  line-height: 1.6;
  text-align: left;
}

.slideshow-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.slideshow-playpause {
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.25);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.slideshow-playpause:hover {
  background: rgba(255,255,255,0.4);
}

.slideshow-playpause.paused {
  background: rgba(45, 125, 70, 0.8);
}

.slideshow-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255,255,255,0.2);
}

.slideshow-progress .fill {
  height: 100%;
  background: var(--color-primary);
  width: 0%;
  transition: width 0.1s linear;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

/* Admin */
.admin-body {
  background: #f0edeb;
}

.admin-header {
  background: var(--color-text);
  color: white;
  padding: 1.5rem;
}

.admin-header h1 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.admin-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.link-box label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.link-row {
  display: flex;
  gap: 0.5rem;
}

.link-row input {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
}

.btn-copy {
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-copy:hover {
  background: var(--color-primary-hover);
}

.admin-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-tabs .tab {
  padding: 0.5rem 1rem;
  background: white;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}

.admin-tabs .tab:hover {
  background: var(--color-bg);
}

.admin-tabs .tab.active {
  background: var(--color-primary);
  color: white;
}

.admin-posts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-post {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.admin-post-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.status-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-hidden { background: #e5e7eb; color: #4b5563; }

.admin-post-header time {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.admin-post-message {
  margin: 0 0 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-post-media {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-media-item img {
  max-width: 120px;
  max-height: 120px;
  object-fit: cover;
  border-radius: 6px;
}

.admin-media-item video {
  max-width: 200px;
}

.admin-media-item audio {
  width: 100%;
  min-width: 200px;
}

.admin-post-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-approve {
  background: var(--color-success) !important;
  color: white !important;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-hide {
  background: var(--color-warning) !important;
  color: white !important;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-delete {
  background: var(--color-danger) !important;
  color: white !important;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.admin-denied {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2rem;
  text-align: center;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Responsive */
@media (min-width: 600px) {
  .header h1 { font-size: 2rem; }
  .posts-grid { column-count: 2; }
}

@media (min-width: 900px) {
  .posts-grid { column-count: 3; }
}

@media (min-width: 1024px) {
  .main { max-width: 1200px; }
}

@media (max-width: 480px) {
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-form { flex-direction: column; }
}
