:root {
  --page-bg: #f6efe8;
  --page-bg-accent: #ead8c4;
  --surface: rgba(255, 252, 247, 0.88);
  --surface-strong: #fffaf5;
  --surface-muted: #f0e7dc;
  --text: #1f1b17;
  --muted: #6f645a;
  --accent: #b45b22;
  --accent-deep: #8b4314;
  --accent-soft: rgba(180, 91, 34, 0.12);
  --border: rgba(91, 59, 35, 0.14);
  --shadow-lg: 0 24px 60px rgba(44, 25, 11, 0.12);
  --shadow-md: 0 14px 32px rgba(44, 25, 11, 0.1);
  --shadow-sm: 0 8px 18px rgba(44, 25, 11, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --content-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 40%),
    radial-gradient(circle at top right, rgba(255, 242, 226, 0.72), transparent 38%),
    linear-gradient(180deg, var(--page-bg) 0%, #f3ede6 100%);
}

body::-webkit-scrollbar {
  width: 12px;
}

body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(111, 100, 90, 0.3);
}

body::-webkit-scrollbar-track {
  background: transparent;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 14px 0;
  backdrop-filter: blur(18px);
  background: rgba(246, 239, 232, 0.86);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  flex-shrink: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.menu-toggle-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.menu-toggle-bars {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.menu-toggle-bars::before {
  top: -6px;
}

.menu-toggle-bars::after {
  top: 6px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.site-nav-link:hover,
.site-nav-link.is-active {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--border);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-search-input {
  width: min(280px, 48vw);
  min-height: 48px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.site-search-input:focus {
  outline: 2px solid rgba(180, 91, 34, 0.22);
  outline-offset: 2px;
}

.site-search-button,
.button-link,
.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #fff9f3;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.site-search-button:hover,
.button-link:hover,
.pagination-link:hover {
  transform: translateY(-1px);
  background: var(--accent-deep);
  box-shadow: var(--shadow-md);
}

.site-search-button:disabled {
  cursor: wait;
  opacity: 0.8;
}

.button-link-secondary,
.pagination-link.is-disabled {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
  box-shadow: none;
}

.pagination-link.is-disabled {
  pointer-events: none;
}

.site-content {
  padding: 32px 0 72px;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.primary-column,
.sidebar {
  display: grid;
  gap: 22px;
}

.hero-panel,
.content-panel,
.sidebar-panel {
  padding: clamp(22px, 3vw, 34px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.hero-panel {
  background:
    linear-gradient(135deg, rgba(255, 248, 240, 0.98), rgba(255, 255, 255, 0.82)),
    linear-gradient(180deg, rgba(234, 216, 196, 0.5), transparent);
}

.hero-kicker,
.section-kicker {
  margin: 0;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-title,
.section-title,
.empty-title {
  margin: 10px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.hero-lede,
.empty-copy,
.error-copy,
.site-footer-copy {
  margin: 14px 0 0;
  max-width: 64ch;
  color: var(--muted);
  line-height: 1.7;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}

.section-title {
  font-size: 1.45rem;
}

.notice-panel,
.empty-panel,
.error-panel {
  background: var(--surface-strong);
}

.notice-panel {
  padding: 18px 22px;
  color: var(--accent-deep);
  border: 1px solid rgba(180, 91, 34, 0.24);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.empty-panel,
.error-panel {
  text-align: left;
}

.album-grid,
.sidebar-grid {
  display: grid;
  gap: 18px;
}

.album-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.album-card {
  min-width: 0;
}

.album-card-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 241, 233, 0.86));
  border: 1px solid rgba(91, 59, 35, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.album-card-link:hover {
  transform: translateY(-4px);
  border-color: rgba(180, 91, 34, 0.26);
  box-shadow: var(--shadow-md);
}

.album-card-media {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #ebdccd, #d6b59a);
}

.album-card-image,
.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-card-image {
  transition: transform 0.35s ease;
}

.album-card-link:hover .album-card-image,
.image-link:hover .gallery-image {
  transform: scale(1.03);
}

.album-card-body {
  padding: 18px 18px 20px;
}

.album-card-title {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.album-card-meta,
.pagination-status,
.post-meta-item {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tag-cloud,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud-link,
.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(180, 91, 34, 0.14);
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.tag-cloud-link:hover,
.tag-chip:hover {
  transform: translateY(-1px);
  background: var(--accent-soft);
  border-color: rgba(180, 91, 34, 0.28);
}

.tag-size-1 {
  font-size: 0.82rem;
}

.tag-size-2 {
  font-size: 0.9rem;
}

.tag-size-3 {
  font-size: 1rem;
}

.tag-size-4 {
  font-size: 1.08rem;
}

.tag-size-5 {
  font-size: 1.18rem;
}

.pagination-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255, 252, 247, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.post-panel {
  gap: 0;
}

.post-hero {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.post-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.interaction-panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
}

.interaction-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.interaction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.interaction-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(180, 91, 34, 0.35);
}

.interaction-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.interaction-button.is-active {
  color: #fff7f0;
  background: var(--accent);
  border-color: transparent;
}

.interaction-count {
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: inherit;
  text-align: center;
  font-weight: 700;
}

.interaction-button.is-active .interaction-count {
  background: rgba(255, 255, 255, 0.18);
}

.interaction-inline-note {
  min-height: 24px;
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.interaction-inline-note[data-state="error"] {
  color: #bb2d3b;
}

.feedback-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.feedback-field {
  display: grid;
  gap: 8px;
}

.feedback-label {
  font-weight: 600;
}

.feedback-select,
.feedback-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
}

.feedback-textarea {
  min-height: 110px;
  resize: vertical;
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.feedback-submit-button {
  border: none;
  cursor: pointer;
}

.feedback-cancel-button {
  min-width: 120px;
}

.post-meta-item {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
}

.post-meta-link:hover {
  color: var(--accent-deep);
  border-color: rgba(180, 91, 34, 0.28);
}

.image-gallery {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.post-intro {
  margin-top: 24px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 252, 247, 0.78);
  line-height: 1.85;
}

.post-intro p {
  margin: 0 0 12px;
}

.post-intro p:last-child {
  margin-bottom: 0;
}

.gallery-item {
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #ebdccd, #d7b9a0);
  box-shadow: var(--shadow-sm);
}

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

.page-post .gallery-item-image {
  aspect-ratio: auto;
}

.page-post .gallery-item-image .image-link {
  height: auto;
}

.page-post .gallery-item-image .gallery-image {
  height: auto;
  object-fit: contain;
}

.page-post .image-link:hover .gallery-image {
  transform: none;
}

.gallery-image {
  transition: transform 0.35s ease;
}

.gallery-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: cover;
}

.entry-footer {
  margin-top: 26px;
}

.tag-panel {
  padding: 22px;
  background: rgba(255, 252, 247, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.continue-panel {
  background:
    linear-gradient(135deg, rgba(246, 224, 208, 0.92), rgba(255, 251, 246, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent);
}

.continue-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.continue-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.continue-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.continue-link strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  line-height: 1.35;
}

.continue-link.is-disabled {
  color: var(--muted);
  pointer-events: none;
}

.continue-label {
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.site-footer {
  padding: 0 0 32px;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(255, 252, 247, 0.74);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.site-footer-link {
  color: var(--muted);
}

.site-footer-link:hover {
  color: var(--accent-deep);
}

@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .site-header-inner {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    box-shadow: var(--shadow-sm);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav-links,
  .site-search {
    width: 100%;
  }

  .site-search {
    flex-direction: column;
    align-items: stretch;
  }

  .site-search-input {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(var(--content-width), calc(100% - 20px));
  }

  .site-content {
    padding-top: 20px;
  }

  .hero-panel,
  .content-panel,
  .sidebar-panel {
    padding: 22px 18px;
  }

  .page-post .post-panel {
    padding-right: 0;
    padding-left: 0;
  }

  .page-post .post-hero,
  .page-post .post-intro,
  .page-post .entry-footer {
    margin-right: 18px;
    margin-left: 18px;
  }

  .page-post .image-gallery {
    gap: 12px;
    margin-top: 22px;
  }

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

  .continue-nav,
  .pagination-shell,
  .site-footer-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-shell {
    text-align: center;
  }

  .post-meta-list {
    flex-direction: column;
    align-items: flex-start;
  }

  .interaction-actions,
  .feedback-actions {
    flex-direction: column;
  }

  .interaction-button,
  .feedback-cancel-button,
  .feedback-submit-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
