/* ==========================================================================
   nikolascormican.com - Ultra-Minimal Beige Stylesheet with Admin Editor
   ========================================================================== */

:root {
  --bg-canvas: #fbf8f3;
  --bg-surface: #f4efe6;
  --bg-hover: #efe9de;
  --border-line: #e6dfd3;
  --border-subtle: #eee8dc;

  --text-main: #221f1d;
  --text-muted: #746d63;
  --text-whisper: #a09789;
  --accent-warm: #8a4834;
  --danger-color: #991b1b;

  --font-serif: "Newsreader", "EB Garamond", "Iowan Old Style", "Apple Garamond", "Baskerville", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;

  --max-width: 700px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 1.5rem;
}

a {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: var(--border-line);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--accent-warm);
  text-decoration-color: var(--accent-warm);
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ==========================================================================
   Admin Top Bar
   ========================================================================== */

.admin-top-bar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-line);
  padding: 0.6rem 0;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
}

.admin-top-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  background-color: var(--text-main);
  color: var(--bg-canvas);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.admin-action-btn {
  padding: 0.25rem 0.65rem;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-line);
  border-radius: 3px;
  font-size: 0.8rem;
  transition: all 0.15s ease;
}

.admin-action-btn:hover {
  border-color: var(--text-main);
  background-color: var(--bg-hover);
}

/* ==========================================================================
   Header & Dropdown Menu
   ========================================================================== */

.site-header {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border-line);
  margin-bottom: 3rem;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.masthead-brand {
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text-main);
}

.masthead-brand:hover {
  text-decoration: none;
  color: var(--accent-warm);
}

/* Minimalist Folder Dropdown */
.folder-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.folder-label {
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.folder-select-wrap {
  position: relative;
  display: inline-block;
}

.folder-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 4px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.folder-select:hover,
.folder-select:focus {
  border-color: var(--text-muted);
  background-color: var(--bg-hover);
}

.select-arrow {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.65rem;
}

/* Profile Intro */
.profile-intro {
  margin-top: 1.25rem;
}

.profile-bio {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.profile-links {
  display: flex;
  gap: 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.profile-links a {
  text-decoration: none;
  color: var(--text-muted);
}

.profile-links a:hover {
  color: var(--text-main);
}

/* ==========================================================================
   Feed View
   ========================================================================== */

.active-folder-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.25rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-whisper);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.active-folder-name {
  color: var(--text-muted);
  font-weight: 500;
}

.folder-sort-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-whisper);
}

.sort-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-whisper);
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  font-family: inherit;
  font-size: inherit;
  transition: all 0.15s ease;
}

.sort-btn:hover {
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.sort-btn.active {
  color: var(--text-main);
  border-color: var(--border-line);
  background-color: rgba(0, 0, 0, 0.03);
  font-weight: 500;
}

.post-list {
  display: flex;
  flex-direction: column;
}

.post-entry {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: opacity 0.15s ease;
}

.post-entry:first-child {
  padding-top: 0;
}

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

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-whisper);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.post-meta-folder {
  color: var(--text-muted);
  font-weight: 600;
}

.post-ai-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  padding: 0.08rem 0.4rem;
  border-radius: 3px;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  display: inline-block;
  vertical-align: middle;
}

.post-admin-inline-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  text-transform: lowercase;
}

.post-admin-btn {
  color: var(--text-whisper);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-admin-btn:hover {
  color: var(--text-main);
}

.post-admin-btn.delete:hover {
  color: var(--danger-color);
}

.post-title-link {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.post-title-link:hover {
  color: var(--accent-warm);
  text-decoration: underline;
  text-decoration-color: var(--accent-warm);
}

.post-summary {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Empty State */
.empty-state {
  padding: 4rem 1rem;
  text-align: center;
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Single Post / Reading View
   ========================================================================== */

.post-view {
  display: none;
}

.post-view.active {
  display: block;
}

.post-back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.post-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.15s ease;
}

.post-back-btn:hover {
  color: var(--text-main);
  text-decoration: none;
}

.reading-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-line);
}

.reading-title {
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.reading-body {
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--text-main);
}

.reading-body p {
  margin-bottom: 1.6rem;
}

.reading-body h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2.5rem 0 0.75rem;
}

.reading-body ul,
.reading-body ol {
  margin: 1.25rem 0 1.75rem 1.5rem;
}

.reading-body li {
  margin-bottom: 0.5rem;
}

.reading-body blockquote {
  border-left: 2px solid var(--border-line);
  padding-left: 1.25rem;
  margin: 2rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.reading-body pre {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  border-radius: 4px;
  margin: 1.75rem 0;
}

.reading-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: var(--bg-surface);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
}

.reading-body pre code {
  background: transparent;
  padding: 0;
  border: none;
}

.reading-body img,
.comment-body img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  display: block;
}

/* ==========================================================================
   Comments Section & Writing Formatting
   ========================================================================== */

.comments-section {
  margin-top: 4.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-line);
}

.comments-header {
  margin-bottom: 2rem;
}

.comments-title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.comments-title span:first-child {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-whisper);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-bottom: 3.5rem;
}

.comment-item {
  padding: 1.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 4px;
}

.comment-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed var(--border-line);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-author {
  font-weight: 600;
  color: var(--text-main);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.comment-date {
  color: var(--text-muted);
}

.comment-admin-delete {
  color: var(--danger-color);
  cursor: pointer;
  margin-left: 0.5rem;
}

.comment-admin-delete:hover {
  text-decoration: underline;
}

.comments-empty {
  padding: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95rem;
}

.comment-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-main);
  word-break: break-word;
}

.comment-body p,
.reading-body p {
  margin-bottom: 1.5rem;
}

.comment-body p:last-child {
  margin-bottom: 0;
}

.comment-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.75rem 0 0.6rem;
}

.comment-body blockquote {
  border-left: 2px solid var(--border-line);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.comment-body ul,
.comment-body ol {
  margin: 1rem 0 1.5rem 1.25rem;
}

.comment-body li {
  margin-bottom: 0.4rem;
}

.comment-body pre {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-x: auto;
  border-radius: 4px;
  margin: 1.25rem 0;
}

.comment-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: var(--bg-surface);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
}

.comment-body pre code {
  background: transparent;
  padding: 0;
  border: none;
}

/* ==========================================================================
   Collapsible Threaded Comments & Inline Replies
   ========================================================================== */

.comment-thread {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border-line);
  font-family: var(--font-sans);
  font-size: 0.8rem;
}

.comment-footer-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.comment-footer-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-reply-btn,
.thread-toggle-btn {
  background: none;
  border: 1px solid var(--border-line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  line-height: 1.4;
  transition: all 0.15s ease;
  user-select: none;
}

.comment-reply-btn:hover,
.thread-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
  background-color: var(--bg-hover);
}

.thread-toggle-btn {
  font-weight: 500;
  color: var(--text-main);
  background-color: var(--bg-canvas);
}

.comment-replies {
  margin-left: 1.5rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--border-line);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: border-color 0.2s ease;
}

.comment-replies:hover {
  border-left-color: var(--accent-warm);
}

.comment-thread.collapsed .comment-replies {
  display: none !important;
}

.comment-reply-item {
  padding: 1.25rem;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-line);
  border-radius: 4px;
}

.replying-to-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  margin-left: 0.4rem;
}

/* Inline Reply Composer Box */
.inline-reply-composer {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-line);
  border-radius: 4px;
  padding: 1.1rem;
  margin-top: 0.75rem;
  box-shadow: 0 2px 8px rgba(34, 31, 29, 0.04);
}

.inline-reply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.inline-reply-input {
  width: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 3px;
  padding: 0.4rem 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-main);
  outline: none;
  margin-bottom: 0.5rem;
}

.inline-reply-input:focus,
.inline-reply-textarea:focus {
  border-color: var(--text-muted);
}

.inline-reply-textarea {
  width: 100%;
  min-height: 85px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 3px;
  padding: 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-main);
  outline: none;
  resize: vertical;
}

.inline-reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* ==========================================================================
   Emoji Reactions Component (Posts & Comments)
   ========================================================================== */

.reactions-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  position: relative;
}

.reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-line);
  border-radius: 12px;
  padding: 0.15rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.reaction-pill:hover {
  border-color: var(--text-muted);
  color: var(--text-main);
  transform: translateY(-1px);
}

.reaction-pill.active {
  background-color: #f7eee2;
  border-color: var(--accent-warm);
  color: var(--accent-warm);
  font-weight: 500;
}

.reaction-pill-emoji {
  font-size: 0.85rem;
}

.reaction-pill-count {
  font-size: 0.68rem;
}

.reaction-picker-trigger {
  background: none;
  border: 1px dashed var(--border-line);
  border-radius: 12px;
  padding: 0.15rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-whisper);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  line-height: 1.3;
  transition: all 0.15s ease;
  user-select: none;
}

.reaction-picker-trigger:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
  background-color: var(--bg-hover);
}

.reaction-picker-popover {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  display: none;
  align-items: center;
  gap: 0.2rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 20px;
  padding: 0.25rem 0.45rem;
  box-shadow: 0 4px 14px rgba(34, 31, 29, 0.08);
  z-index: 50;
  animation: popoverFadeIn 0.15s ease-out;
}

.reaction-picker-popover.active {
  display: flex;
}

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

.reaction-option-btn {
  background: none;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  line-height: 1;
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.reaction-option-btn:hover {
  transform: scale(1.3);
  background-color: var(--bg-hover);
}

/* Post Level Reactions Bar (Reader View) */
.post-reactions-section {
  margin: 2.5rem 0 3rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-line);
  border-bottom: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.post-reactions-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

@media (max-width: 600px) {
  .comment-replies {
    margin-left: 0.65rem;
    padding-left: 0.65rem;
  }
  .post-reactions-section {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Comment Composer */
.comment-composer-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 4px;
  padding: 1.75rem;
}

.comment-composer-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-line);
}

.composer-title {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.comment-author-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.comment-author-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-input {
  flex: 1;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-line);
  border-radius: 3px;
  padding: 0.45rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-main);
  outline: none;
}

.comment-input:focus {
  border-color: var(--text-muted);
}

.comment-dropzone-box {
  padding: 1rem;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  background-color: var(--bg-canvas);
}

.comment-textarea {
  min-height: 120px;
  background-color: var(--bg-canvas);
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.comment-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* ==========================================================================
   Modals (Editor, Folder, Export)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(34, 31, 29, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-line);
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

.modal-close-x {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-line);
  border-radius: 4px;
  background-color: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1;
  transition: all 0.15s ease;
  z-index: 10;
}

.modal-close-x:hover {
  color: var(--text-main);
  border-color: var(--text-main);
  background-color: var(--bg-hover);
}

.draft-status-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-whisper);
  letter-spacing: 0.02em;
}

.btn-discard-draft {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--danger-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-discard-draft:hover {
  color: var(--text-main);
}

/* Drag & Drop Zone */
.dropzone-box {
  border: 2px dashed var(--border-line);
  border-radius: 6px;
  background-color: var(--bg-surface);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.dropzone-box:hover,
.dropzone-box.drag-active {
  border-color: var(--accent-warm);
  background-color: var(--bg-hover);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dropzone-icon {
  font-size: 1.5rem;
}

.dropzone-browse-btn {
  color: var(--text-main);
  text-decoration: underline;
  font-weight: 600;
}

.dropzone-browse-btn:hover {
  color: var(--accent-warm);
}

.editor-textarea.drag-active {
  border-color: var(--accent-warm) !important;
  background-color: var(--bg-hover) !important;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-line);
}

.editor-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.editor-input,
.editor-select,
.editor-textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 4px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease;
}

.editor-input:focus,
.editor-select:focus,
.editor-textarea:focus {
  border-color: var(--text-main);
}

.editor-textarea {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
}

.formatting-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.35rem 0.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.format-btn {
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-line);
  color: var(--text-muted);
}

.format-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.image-tools-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.image-tools-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-line);
}

.btn-editor-submit {
  background-color: var(--text-main);
  color: var(--bg-canvas);
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-editor-submit:hover {
  background-color: var(--accent-warm);
}

.btn-editor-cancel {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-editor-cancel:hover {
  color: var(--text-main);
}

/* ==========================================================================
   Footer & Bottom Admin Bar
   ========================================================================== */

.site-footer {
  margin-top: auto;
  padding: 4rem 0 3rem;
  border-top: 1px solid var(--border-line);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-whisper);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-domain {
  color: var(--text-muted);
}

.footer-log-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
  margin-left: 0.2rem;
}

.footer-log-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.admin-footer-bar {
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-whisper);
}

.admin-login-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.admin-input {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 3px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  color: var(--text-main);
  outline: none;
  width: 140px;
}

.admin-btn,
.btn-secondary {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 3px;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-btn:hover,
.btn-secondary:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.admin-text-btn {
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
}

.admin-text-btn:hover {
  color: var(--text-main);
}

.admin-error-msg {
  color: var(--danger-color);
  font-size: 0.75rem;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */

.site-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  background-color: var(--text-main);
  color: var(--bg-canvas);
  padding: 0.8rem 1.4rem;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  box-shadow: 0 6px 18px rgba(34, 31, 29, 0.2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  max-width: 380px;
  line-height: 1.4;
}

.site-toast.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ==========================================================================
   Clean GIF Picker Drawer & Attached Media Tray
   ========================================================================== */

.btn-gif-pill {
  font-weight: 500 !important;
  color: var(--text-main) !important;
  border-color: var(--border-line) !important;
  background-color: var(--bg-surface) !important;
  transition: all 0.2s ease;
}

.btn-gif-pill:hover,
.btn-gif-pill.active {
  background-color: var(--text-main) !important;
  color: var(--bg-canvas) !important;
  border-color: var(--text-main) !important;
}

/* GIF Picker Drawer */
.gif-picker-drawer {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-line);
  border-radius: 4px;
  padding: 1rem;
  margin: 0.75rem 0 1rem 0;
  box-shadow: inset 0 1px 3px rgba(34, 31, 29, 0.04);
  animation: drawerSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gif-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.gif-drawer-title {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.gif-drawer-close {
  background: none;
  border: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.3rem;
  line-height: 1;
}

.gif-drawer-close:hover {
  color: var(--text-main);
}

.gif-drawer-url-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.gif-url-input {
  font-size: 0.8rem !important;
  padding: 0.45rem 0.65rem !important;
}

.gif-categories {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.gif-cat-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.gif-cat-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.gif-cat-btn.active {
  background-color: var(--text-main);
  color: var(--bg-canvas);
  border-color: var(--text-main);
}

.gif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.gif-grid-item {
  position: relative;
  height: 90px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.gif-grid-item:hover {
  transform: scale(1.02);
  border-color: var(--text-main);
  box-shadow: 0 4px 10px rgba(34, 31, 29, 0.12);
}

.gif-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gif-grid-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(34, 31, 29, 0.75);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(2px);
}

/* Attached Media Tray */
.media-tray {
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-line);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0 1rem 0;
}

.media-tray-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.media-tray-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-main);
}

.media-tray-help {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.media-tray-help code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  background: var(--bg-canvas);
  padding: 0.1rem 0.3rem;
  border: 1px solid var(--border-line);
  border-radius: 2px;
}

.media-tray-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.media-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border-line);
  border-radius: 4px;
  padding: 0.3rem 0.6rem 0.3rem 0.35rem;
  box-shadow: 0 1px 3px rgba(34, 31, 29, 0.04);
  transition: border-color 0.15s ease;
}

.media-chip:hover {
  border-color: var(--text-muted);
}

.media-chip-thumb {
  width: 32px;
  height: 32px;
  border-radius: 2px;
  object-fit: cover;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.media-chip-info {
  display: flex;
  flex-direction: column;
}

.media-chip-name {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-chip-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.media-chip-btn-insert {
  background: none;
  border: 1px solid var(--border-line);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 0.15rem 0.35rem;
  border-radius: 2px;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.media-chip-btn-insert:hover {
  background-color: var(--text-main);
  color: var(--bg-canvas);
}

.media-chip-del {
  background: none;
  border: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.15rem;
  line-height: 1;
}

.media-chip-del:hover {
  color: #b03a2e;
}

/* Responsive Post Media Figures & Captions */
.post-media-figure {
  margin: 1.75rem 0;
  border: 1px solid var(--border-line);
  border-radius: 3px;
  overflow: hidden;
  background-color: var(--bg-surface);
}

.post-media-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 540px;
  background-color: var(--bg-canvas);
}

.post-media-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.5rem 0.85rem;
  border-top: 1px solid var(--border-line);
  background-color: var(--bg-surface);
  line-height: 1.4;
}

/* ==========================================================================
   Folder Deletion & Management
   ========================================================================== */
.folder-admin-actions {
  display: inline-flex;
  align-items: center;
}

.folder-delete-btn {
  background: none;
  border: 1px solid var(--border-line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--danger-color);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.folder-delete-btn:hover {
  background-color: var(--danger-color);
  color: #ffffff;
  border-color: var(--danger-color);
}

/* ==========================================================================
   Backup & Disaster Recovery Vault
   ========================================================================== */
.backup-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .backup-tools-grid {
    grid-template-columns: 1fr;
  }
}

.backup-tool-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 4px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.backup-card-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.backup-card-desc {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
  flex: 1;
}

.snapshot-history-section {
  border-top: 1px solid var(--border-line);
  padding-top: 1.25rem;
}

.snapshot-history-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.85rem;
}

.snapshot-section-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-main);
}

.snapshot-section-subtitle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.snapshot-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border-line);
  border-radius: 4px;
  background-color: var(--bg-surface);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.snapshot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-line);
  border-radius: 3px;
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  transition: border-color 0.15s ease;
}

.snapshot-card:hover {
  border-color: var(--text-muted);
}

.snapshot-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.snapshot-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-main);
}

.snapshot-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.snapshot-restore-btn {
  background: none;
  border: 1px solid var(--border-line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.snapshot-restore-btn:hover {
  background-color: var(--text-main);
  color: var(--bg-canvas);
}

.snapshot-empty {
  padding: 1.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Chewy the Black Labradoodle Companion (In-Page Playground)
   ========================================================================== */

.chewy-pet-section {
  margin-top: 4rem;
  margin-bottom: 2rem;
  padding-top: 1.5rem;
  position: relative;
  background: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.chewy-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-sans);
}

.chewy-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.chewy-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.chewy-breed {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-whisper);
  letter-spacing: 0.02em;
}

.chewy-controls-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.chewy-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-whisper);
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chewy-btn:hover {
  color: var(--text-main);
  border-color: var(--border-subtle);
  background-color: rgba(0, 0, 0, 0.02);
}

.chewy-btn:active {
  transform: translateY(1px);
}

.chewy-canvas-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: visible;
  touch-action: none;
}

#chewyPetCanvas {
  display: block;
  width: 100%;
  height: 180px;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.chewy-footer-stats {
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-whisper);
  letter-spacing: 0.02em;
  text-align: right;
}

@media (max-width: 600px) {
  .chewy-footer-stats {
    text-align: left;
  }
}

/* ==========================================================================
   📬 Feature 7: Interactive Postcard Guestbook & Corkboard
   ========================================================================== */

.guestbook-wrapper {
  margin: 1.5rem 0 2.5rem;
}

.guestbook-header {
  margin-bottom: 1.25rem;
}

.guestbook-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.guestbook-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.guestbook-toggle-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-warm);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  transition: opacity 0.15s ease;
}

.guestbook-toggle-btn:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.guestbook-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Postcard Studio Creator Container */
.postcard-studio-container {
  background: #fdfbf7;
  border: 1px solid var(--border-line);
  border-radius: 4px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  animation: fadeIn 0.2s ease-out;
}

.postcard-canvas-sheet {
  display: flex;
  gap: 1.5rem;
}

@media (max-width: 720px) {
  .postcard-canvas-sheet {
    flex-direction: column;
    gap: 1.25rem;
  }
}

.postcard-divider {
  width: 1px;
  border-left: 1.5px dashed var(--border-line);
  margin: 0 0.25rem;
}

@media (max-width: 720px) {
  .postcard-divider {
    width: 100%;
    height: 1px;
    border-left: none;
    border-top: 1.5px dashed var(--border-line);
    margin: 0.25rem 0;
  }
}

.postcard-half {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.postcard-section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: lowercase;
  color: var(--text-whisper);
  margin-bottom: 0.4rem;
  display: block;
}

/* Drawing Header & Tools */
.postcard-drawing-header {
  margin-bottom: 0.6rem;
}

.drawing-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.color-palette {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.active {
  box-shadow: 0 0 0 2px var(--accent-warm);
  transform: scale(1.15);
}

.eraser-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f4efe6 !important;
  font-size: 0.65rem;
  border-radius: 3px;
  width: 22px;
  height: 20px;
}

.brush-sizes {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.brush-size-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 3px 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brush-size-btn:hover,
.brush-size-btn.active {
  background: var(--bg-hover);
  border-color: var(--border-line);
}

.brush-dot {
  background-color: var(--text-main);
  border-radius: 50%;
  display: block;
}

.brush-dot.fine { width: 3px; height: 3px; }
.brush-dot.med { width: 6px; height: 6px; }
.brush-dot.bold { width: 9px; height: 9px; }

.canvas-actions {
  display: inline-flex;
  gap: 0.25rem;
}

.canvas-action-btn {
  background: none;
  border: 1px solid var(--border-line);
  background: #fff;
  border-radius: 3px;
  font-size: 0.75rem;
  padding: 2px 6px;
  cursor: pointer;
  color: var(--text-muted);
}

.canvas-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

/* Canvas Viewport */
.canvas-viewport-wrapper {
  position: relative;
  border: 1px solid var(--border-line);
  border-radius: 3px;
  overflow: hidden;
  background-color: #fdfbf7;
  width: 100%;
  aspect-ratio: 28 / 18;
  touch-action: none;
}

#postcardDrawCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.canvas-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-whisper);
  opacity: 0.55;
  transition: opacity 0.2s ease;
  user-select: none;
}

/* Stamp & Postal Mark */
.stamp-and-postmark {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.wavy-postmark-svg {
  width: 75px;
  height: 45px;
  color: var(--text-whisper);
  display: block;
}

.vintage-stamp {
  width: 46px;
  height: 54px;
  background: #fffdfa;
  border: 2px dashed #cfc5b4;
  box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border-radius: 2px;
  position: relative;
}

.vintage-stamp:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 2px 4px 9px rgba(0, 0, 0, 0.12);
}

.stamp-custom-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1px;
}

/* Stamp Picker Tray */
.stamp-picker-tray {
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 4px;
  padding: 0.6rem;
  margin-bottom: 0.8rem;
  animation: fadeIn 0.15s ease-out;
}

.stamp-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.stamp-choice-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 1.25rem;
  padding: 3px 5px;
  cursor: pointer;
  transition: background 0.1s ease;
}

.stamp-choice-btn:hover,
.stamp-choice-btn.active {
  background: #ffffff;
  border-color: var(--border-line);
}

.custom-stamp-input-row {
  display: flex;
  gap: 0.35rem;
}

.custom-stamp-input-row input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border-line);
  background: #ffffff;
  border-radius: 3px;
}

.btn-subtle {
  background: none;
  border: 1px solid var(--border-line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-main);
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  border-radius: 3px;
}

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

/* Note Textarea */
.postcard-note-section {
  margin-bottom: 0.75rem;
}

.postcard-note-section textarea {
  width: 100%;
  border: 1px solid var(--border-line);
  background: #fffdfa;
  border-radius: 3px;
  padding: 0.55rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-main);
  resize: vertical;
  min-height: 72px;
}

.postcard-note-section textarea:focus {
  outline: none;
  border-color: var(--accent-warm);
}

.note-char-counter {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-whisper);
  text-align: right;
  margin-top: 0.2rem;
}

/* Attribution Section */
.postcard-attribution-section {
  margin-bottom: 0.85rem;
}

.attribution-inputs {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 500px) {
  .attribution-inputs {
    flex-direction: column;
  }
}

.attribution-inputs input {
  flex: 1;
  border: 1px solid var(--border-line);
  background: #fffdfa;
  border-radius: 3px;
  padding: 0.35rem 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-main);
}

.attribution-inputs input:focus {
  outline: none;
  border-color: var(--accent-warm);
}

/* Submit Row */
.postcard-submit-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
}

.pin-postcard-btn {
  background: var(--text-main);
  color: var(--bg-canvas);
  border: 1px solid var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pin-postcard-btn:hover {
  background: var(--accent-warm);
  border-color: var(--accent-warm);
  color: #ffffff;
  transform: translateY(-1px);
}

.pin-postcard-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.postcard-status-msg {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.postcard-status-msg.success {
  color: #15803d;
}

.postcard-status-msg.error {
  color: var(--danger-color);
}

/* ==========================================================================
   Tactile Corkboard Bulletin Grid
   ========================================================================== */

.corkboard-container {
  margin: 2rem 0 3rem;
  background: #f7f1e5 url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e6dac7' fill-opacity='0.55' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='1'/%3E%3Ccircle cx='23' cy='17' r='1.2'/%3E%3Ccircle cx='12' cy='32' r='0.8'/%3E%3Ccircle cx='35' cy='28' r='1'/%3E%3Ccircle cx='18' cy='8' r='0.9'/%3E%3C/g%3E%3C/svg%3E");
  border: 1px solid #dfd4c0;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04), 0 2px 10px rgba(0, 0, 0, 0.03);
}

.corkboard-pin-shelf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #d8cca9;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.corkboard-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-warm);
}

.corkboard-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.corkboard-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
}

.corkboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.8rem 1.4rem;
}

/* Corkboard Postcard Cards */
.corkboard-card {
  position: relative;
  background: #fffdfa;
  border: 1px solid #ebd9c5;
  border-radius: 3px;
  padding: 1.1rem 1rem 0.85rem;
  box-shadow: 0 4px 14px rgba(60, 45, 30, 0.08), 0 1px 3px rgba(60, 45, 30, 0.04);
  transform: rotate(var(--card-tilt, 0deg));
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
  z-index: 1;
}

.corkboard-card:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.02);
  box-shadow: 0 10px 24px rgba(60, 45, 30, 0.14), 0 2px 6px rgba(60, 45, 30, 0.06);
  z-index: 10;
}

/* Pushpin */
.corkboard-pushpin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 10%, var(--pin-color, #b91c1c) 70%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 -1px 2px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.corkboard-pushpin::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 5px;
  width: 4px;
  height: 3px;
  background: #78716c;
  border-radius: 1px;
}

.corkboard-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.corkboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.mini-postmark-svg {
  width: 40px;
  height: 24px;
  color: var(--text-whisper);
}

.corkboard-card-stamp {
  width: 32px;
  height: 38px;
  background: #fcf8f0;
  border: 1.5px dashed #cfc5b4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border-radius: 1px;
}

.corkboard-stamp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.corkboard-stamp-emoji {
  line-height: 1;
}

/* Postcard Card Drawing */
.corkboard-card-drawing {
  position: relative;
  margin: 0.4rem 0 0.6rem;
  border: 1px solid var(--border-line);
  border-radius: 2px;
  overflow: hidden;
  cursor: zoom-in;
  background: #fdfbf7;
}

.corkboard-card-drawing img {
  width: 100%;
  height: auto;
  display: block;
}

.drawing-inspect-hint {
  position: absolute;
  bottom: 4px;
  right: 6px;
  background: rgba(255, 255, 255, 0.85);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 2px;
  color: var(--text-main);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.corkboard-card-drawing:hover .drawing-inspect-hint {
  opacity: 1;
}

/* Postcard Card Note */
.corkboard-card-note {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-main);
  margin-bottom: 0.6rem;
  word-break: break-word;
}

/* Postcard Footer */
.corkboard-card-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid #f3ebe0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.postcard-meta-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.postcard-author-name {
  font-weight: 500;
  color: var(--text-main);
}

.postcard-author-link {
  font-weight: 500;
  color: var(--accent-warm);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.postcard-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-whisper);
}

.postcard-interactions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.2rem;
}

.postcard-like-btn {
  background: none;
  border: 1px solid var(--border-line);
  background: #ffffff;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.postcard-like-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.postcard-like-btn.liked {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

.corkboard-shelf-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.corkboard-shelf-right {
  display: flex;
  align-items: center;
}

.corkboard-admin-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: lowercase;
}

.postcard-admin-clear-btn {
  background: none;
  border: 1px solid var(--border-line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--danger-color);
  padding: 1px 6px;
  border-radius: 3px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.15s ease;
}

.postcard-admin-clear-btn:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.postcard-delete-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--danger-color);
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.65;
  transition: opacity 0.15s ease, text-decoration 0.15s ease;
}

.postcard-delete-btn:hover {
  opacity: 1;
  text-decoration: underline;
}

.postcard-delete-btn.admin-visible {
  opacity: 0.85;
  font-weight: 500;
}

/* ==========================================================================
   Postcard Lightbox Modal
   ========================================================================== */

.postcard-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 27, 24, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox-dialog {
  position: relative;
  background: #fdfbf7;
  border: 1px solid var(--border-line);
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  z-index: 10;
  animation: fadeIn 0.2s ease-out;
}

.lightbox-close-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.lightbox-close-btn:hover {
  color: var(--text-main);
}

.lightbox-stamp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.lightbox-stamp {
  width: 48px;
  height: 56px;
  background: #fdfbf7;
  border: 2px dashed #cfc5b4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-whisper);
}

.lightbox-drawing-wrap {
  border: 1px solid var(--border-line);
  border-radius: 3px;
  overflow: hidden;
  background: #fdfbf7;
  margin-bottom: 1rem;
}

.lightbox-drawing-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.lightbox-note {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--text-main);
  margin-bottom: 1rem;
  border-left: 2px solid var(--accent-warm);
  padding-left: 1rem;
}

.lightbox-footer {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-line);
}

.lightbox-delete-btn {
  background: none;
  border: 1px solid var(--border-line);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--danger-color);
  padding: 3px 8px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.15s ease;
}

.lightbox-delete-btn:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

/* ==========================================================================
   Print Stylesheet
   ========================================================================== */

@media print {
  @page {
    margin: 15mm;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .admin-top-bar,
  .folder-nav,
  .post-back-bar,
  .site-footer,
  .modal-backdrop,
  .post-admin-inline-actions {
    display: none !important;
  }
  .site-header {
    border-bottom: 1px solid #000000;
  }
}
