@font-face {
  font-family: 'iA Writer Quattro';
  src: url('/fonts/iAWriterQuattroS-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'iA Writer Quattro';
  src: url('/fonts/iAWriterQuattroS-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'iA Writer Quattro';
  src: url('/fonts/iAWriterQuattroS-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'PPEditorialNew';
  src: url('/fonts/PPEditorialNew-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PPEditorialNew';
  src: url('/fonts/PPEditorialNew-Ultrabold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PolygonParty';
  src: url('/fonts/polygon-party/PolygonParty.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-beige: #cfb780;
  --color-teal: #345d52;
  --color-green: #416b42;
  --color-dark: #082528;
  --brand-green: #176733;
  --brand-brown: #9d7748;
  --color-cream: #f9f5ed;
  --color-warm: #f1ebdf;
  --color-gold: #f7db8d;
  --color-gold-30: #f7db8d4d;
  --color-gold-70: #f7db8db3;
  --color-gray-200: oklch(0.928 0.006 264.531);
  --color-gray-300: oklch(0.872 0.01 258.338);
  --color-gray-400: oklch(0.707 0.022 261.325);
  --color-gray-500: oklch(0.551 0.027 264.364);
  --color-gray-600: oklch(0.446 0.03 256.802);
  --color-gray-700: oklch(0.373 0.034 259.733);
  --color-gray-800: oklch(0.278 0.033 256.848);
  --color-black: #000;
  --color-white: #fff;
  --spacing: 0.25rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --font-heading: 'PPEditorialNew', serif;
  --font-body: 'iA Writer Quattro', sans-serif;
  --font-paragraph: 'iA Writer Quattro', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

html,
body {
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: normal;
  font-variation-settings: normal;
}

body {
  background-color: #fff;
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, #fafafa 1px, transparent 1px),
    linear-gradient(to bottom, #fafafa 1px, transparent 1px);
  color: #000;
  min-height: 100vh;
  overscroll-behavior: none;
  font-size: 16px;
  font-weight: 400;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

.font-heading {
  font-family: var(--font-heading);
}

.font-body {
  font-family: var(--font-body);
}

.font-paragraph {
  font-family: var(--font-paragraph);
}

/* Paper / natural backgrounds */

.bg-paper {
  background-blend-mode: multiply;
  background: linear-gradient(#fdeecb, #f8eed6), url('/img/seamless_paper_texture.webp');
}

.bg-paper-dark-brown {
  background-blend-mode: multiply;
  background: linear-gradient(#9d7748, #825e32), url('/img/seamless_paper_texture.webp');
  border-color: #755229;
}

.bg-paper-dark-brown-200,
a.bg-paper-dark-brown-200:hover,
button.bg-paper-dark-brown-200:hover {
  background-blend-mode: multiply;
  background: linear-gradient(#936f41, #755329), url('/img/seamless_paper_texture.webp');
  border-color: #664621;
}

.bg-paper-white {
  background-blend-mode: screen;
  background: linear-gradient(#ccc, #222), url('/img/seamless_paper_texture.webp');
  border-color: #ccc;
}

.bg-color-cream {
  background-color: var(--color-cream);
}

.bg-color-warm {
  background-color: var(--color-warm);
}

.bg-color-green {
  background-color: var(--color-green);
}

.bg-brand-brown {
  background-color: var(--brand-brown);
}

.bg-color-gold-30 {
  background-color: var(--color-gold-30);
}

.bg-color-gold-70 {
  background-color: var(--color-gold-70);
}

.text-color-teal {
  color: var(--color-teal);
}

.text-brand-green {
  color: var(--brand-green);
}

.text-brand-brown {
  color: var(--brand-brown);
}

.border-color-beige {
  border-color: var(--color-beige);
}

.border-color-teal {
  border-color: var(--color-teal);
}

.border-brand-brown {
  border-color: #8f693b;
}

.border-color-warm {
  border-color: #e6ddcb;
}

.text-shadow-special-1 {
  text-shadow: 0 0 10px #fffc;
}

/* Page */

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
}

@media (min-width: 40rem) {
  .page {
    padding: 0;
  }
}

/* Top bar (paper yellow) */

.topbar-wrap {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 0 10px 0;
  z-index: 50;
  background: #fff;
}

@media (min-width: 64rem) {
  .topbar-wrap {
    padding-inline: 2rem;
  }
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 70px;
  padding: 0 0.75rem;
  max-width: 1280px;
  margin: 0 auto;
  background: #fff;
  z-index: 10;
}

.topbar-brand {
  display: flex;
  align-items: center;
  z-index: 20;
  margin-left: 0.5rem;
  flex-shrink: 0;
  height: 100%;
}

.topbar-brand img {
  height: 32px;
  width: auto;
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: #000;
  white-space: nowrap;
}

.search {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  background: #f4f4f4;
  border-radius: 999px;
  border: none;
  padding: 0rem 0.9rem;
  margin-inline: auto;
}

.search-icon {
  width: 1rem;
  height: 1rem;
  color: var(--brand-green);
  flex-shrink: 0;
  margin-right: 0.5rem;
  opacity: 0.7;
}

.search-input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.45rem 0;
  color: var(--brand-green);
  min-width: 0;
}

.search-input::placeholder {
  color: #999;
  opacity: 1;
}

.search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.35rem;
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px #00000014;
  z-index: 30;
  max-height: 320px;
  overflow-y: auto;
}

.search-dropdown.open {
  display: block;
}

.search-dropdown-label {
  padding: 0.45rem 0.85rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  color: #333;
  cursor: pointer;
  text-decoration: none;
}

.search-dropdown-item:hover {
  background: #f4f4f4;
}

.search-dropdown-item mark {
  background: none;
  color: #ea580c;
  font-weight: 700;
}

.search-dropdown-count {
  font-size: 0.78rem;
  color: #999;
}

.search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: var(--brand-green);
}

.search-clear.is-visible {
  display: inline-flex;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 20;
  flex-shrink: 0;
  margin-right: 0.25rem;
}

.topbar-link {
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  color: #000;
  font-size: 0.85rem;
  line-height: 1.25;
  font-weight: 500;
}

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

.topbar-cta {
  padding: 0.45rem 1rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #fb923c 0%, #f97316 50%, #ea580c 100%);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.25;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  box-shadow: 0 3px 0 #c2410c, 0 4px 10px rgba(234,88,12,0.25);
  transition: all 0.12s ease;
  position: relative;
  top: 0;
}

.topbar-cta .chevron {
  width: 0.7rem;
  height: 0.7rem;
}

.topbar-cta-icon {
  width: 16px;
  height: 16px;
  vertical-align: -2px;
}

/* Hero */

.hero {
  max-width: 64rem;
  margin-inline: auto;
  margin-block: 2rem 1rem;
  padding: 0 1rem;
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 40rem) {
  .hero {
    grid-template-columns: 1.4fr 1fr;
    padding: 0;
  }
}

.hero-eyebrow-wrap {
  text-align: center;
  margin-bottom: 0.75rem;
}

@media (min-width: 40rem) {
  .hero-eyebrow-wrap {
    text-align: left;
  }
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  padding: 0.25rem 1rem;
  border-radius: 999px;
  color: var(--brand-green);
  font-weight: 600;
}

.hero-title {
  font-size: 2.5rem;
  line-height: 1.05;
  margin-bottom: 1rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.01em;
}

@media (min-width: 40rem) {
  .hero-title {
    font-size: 3rem;
    text-align: left;
  }
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--color-teal);
  opacity: 0.85;
}

@media (min-width: 40rem) {
  .hero-desc {
    font-size: 1.05rem;
    text-align: left;
  }
}

.hero-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

@media (min-width: 40rem) {
  .hero-actions {
    justify-content: flex-start;
  }
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border-width: 1px;
  box-shadow: 0 1px 3px 0 #0000001a;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px 0 #00000026;
}

.cta-primary .chevron {
  width: 0.75rem;
  height: 0.75rem;
  margin-left: 0.5rem;
}

.hero-fineprint {
  font-size: 0.78rem;
  color: var(--color-gray-500);
  margin-top: 0.75rem;
  line-height: 1.4;
  text-align: center;
}

@media (min-width: 40rem) {
  .hero-fineprint {
    text-align: left;
  }
}

.hero-right {
  display: flex;
  justify-content: center;
}

@media (min-width: 40rem) {
  .hero-right {
    justify-content: flex-end;
  }
}

.hero-card {
  padding: 0.6rem;
  border-radius: 0.75rem;
  border: 1px solid var(--color-gray-200);
  box-shadow: 0 8px 18px #00000014;
  background: #fff;
  transform: rotate(2deg);
  max-width: 320px;
  width: 100%;
}

.hero-card-inner {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

.hero-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  background: #000;
  color: #fff;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-top-right-radius: 0.5rem;
  z-index: 2;
  font-weight: 500;
}

.hero-card-img {
  width: 100%;
  height: 100%;
  background: #e5e7eb;
  aspect-ratio: 0.667;
  object-fit: cover;
}

/* Folder cards */

.folder-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
  width: 100%;
}

@media (max-width: 768px) {
  .folder-grid {
    grid-template-columns: 1fr;
  }
}

.folder-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 0.75rem;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  gap: 1rem;
  overflow: visible;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.folder-card:hover {
  box-shadow: 0 6px 20px #00000014;
  transform: translateY(-2px);
}

.folder-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.folder-stack {
  position: relative;
  width: 100px;
  height: 80px;
  flex-shrink: 0;
}

.folder-img {
  position: absolute;
  width: 60%;
  height: 75%;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 2px 6px #0000001a;
  background: #e8e8e8;
  transition: transform 0.2s ease;
}

.folder-card:hover .folder-img {
  transform: scale(1.05);
}

.folder-img:nth-child(1) {
  top: 10%;
  left: 0;
  transform: rotate(-8deg);
  z-index: 1;
}

.folder-img:nth-child(2) {
  top: 5%;
  left: 15%;
  transform: rotate(-3deg);
  z-index: 2;
}

.folder-img:nth-child(3) {
  top: 10%;
  left: 25%;
  transform: rotate(5deg);
  z-index: 3;
}

.folder-img:nth-child(4) {
  top: 7%;
  left: 35%;
  transform: rotate(1deg);
  z-index: 4;
}

.folder-placeholder {
  position: absolute;
  width: 60%;
  height: 75%;
  top: 10%;
  left: 0;
  transform: rotate(-8deg);
  border-radius: 5px;
  background: repeating-conic-gradient(#e2e2e2 0% 25%, #d3d3d3 0% 50%) 0 0 / 12px 12px;
}

.folder-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-count {
  font-size: 0.78rem;
  color: #888;
}

.pricing-page {
  max-width: 480px;
  margin: 4rem auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.pricing-title {
  font-family: 'PolygonParty', sans-serif;
  font-size: 2.5rem;
  color: #222;
}

.pricing-sub {
  font-size: 1rem;
  color: #888;
}

.pricing-btn {
  max-width: 320px;
}

/* CTA Button wrapper - prevents flicker on hover */
.btn-cta-wrap {
  display: inline-block;
  padding-bottom: 4px;
}

.btn-cta-wrap:hover > .detail-download-btn,
.btn-cta-wrap:hover > .mk-btn-primary,
.btn-cta-wrap:hover > .topbar-cta {
  top: 2px;
}

.btn-cta-wrap:active > .detail-download-btn,
.btn-cta-wrap:active > .mk-btn-primary,
.btn-cta-wrap:active > .topbar-cta {
  top: 4px;
}

.btn-cta-wrap:hover > .detail-download-btn,
.btn-cta-wrap:hover > .mk-btn-primary {
  box-shadow: 0 2px 0 #c2410c, 0 4px 10px rgba(234, 88, 12, 0.22);
}

.btn-cta-wrap:active > .detail-download-btn,
.btn-cta-wrap:active > .mk-btn-primary {
  box-shadow: 0 0 0 #c2410c, 0 2px 5px rgba(234, 88, 12, 0.12);
}

.btn-cta-wrap:hover > .topbar-cta {
  box-shadow: 0 1px 0 #c2410c, 0 3px 8px rgba(234, 88, 12, 0.18);
}

.btn-cta-wrap:active > .topbar-cta {
  box-shadow: 0 0 0 #c2410c, 0 1px 4px rgba(234, 88, 12, 0.1);
}

.mk-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.mk-modal-overlay.open {
  display: flex;
}

.mk-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 380px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.mk-modal-title {
  font-family: 'PolygonParty', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #222;
  padding: 1.5rem 1.5rem 0;
  margin-bottom: 1rem;
}

.mk-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mk-modal-text {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
  text-align: center;
  margin-bottom: 0.5rem;
}

.mk-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  margin-bottom: 0.5rem;
}

.mk-input:focus {
  border-color: #f97316;
}

.mk-error {
  display: none;
  font-size: 0.82rem;
  color: #e74c3c;
}

.mk-error.is-visible {
  display: block;
}

.mk-btn-primary {
  width: 100%;
  padding: 0.7rem 1rem;
  background: linear-gradient(180deg, #fb923c 0%, #f97316 50%, #ea580c 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 0 #c2410c, 0 6px 14px rgba(234, 88, 12, 0.3);
  transition: all 0.12s ease;
  position: relative;
  top: 0;
}

.mk-btn-ghost {
  width: 100%;
  padding: 0.6rem 1rem;
  background: none;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #666;
  cursor: pointer;
}

.mk-modal-pad {
  padding: 0 1.5rem;
}

.mk-modal-action {
  padding: 0.75rem 1.5rem 1.5rem;
  border-top: 1px solid #eee;
  margin-top: 0.5rem;
}

.mk-modal-action .btn-cta-wrap {
  width: 100%;
}

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

.mk-btn-row .btn-cta-wrap,
.mk-btn-row .mk-btn-primary,
.mk-btn-row .mk-btn-ghost {
  flex: 1;
}

@media (max-width: 400px) {
  .mk-btn-row {
    flex-direction: column;
  }
}

.mk-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mk-wallet-email {
  font-size: 0.9rem;
  color: #333;
  font-weight: 500;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.mk-wallet-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
}

.mk-wallet-label {
  font-size: 0.85rem;
  color: #888;
}

.mk-wallet-value {
  font-size: 0.85rem;
  font-weight: 600;
}

.mk-wallet-active {
  color: #2ecc71;
}

.mk-wallet-pending {
  color: #e67e22;
}

.mk-modal-text-muted {
  font-size: 0.82rem;
  color: #999;
}

.mk-step.is-hidden {
  display: none;
}

.mk-otp-group {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 0.75rem 0;
}

.mk-otp-input {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 2px solid #ddd;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease;
}

.mk-otp-input:focus {
  border-color: #f97316;
}

.mk-otp-input.error {
  border-color: #e74c3c;
}

.mk-balance {
  font-size: 0.85rem;
  color: #888;
  background: #f4f4f4;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

/* Layout (sidebar + content) */

.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

@media (min-width: 64rem) {
  .sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
  }
}

.sidebar-section {
  margin-bottom: 0.25rem;
}

.sidebar-title {
  color: var(--brand-green);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.4rem 0.6rem 0.6rem;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tag-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0.5rem;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brand-green);
  transition: background 0.12s ease, color 0.12s ease;
  width: 100%;
}

.tag-item:hover {
  background: var(--color-cream);
}

.tag-item.is-active {
  background: linear-gradient(135deg, #ffe9b5, #ffd6e0);
  color: var(--brand-green);
  font-weight: 600;
}

.tag-emoji {
  font-size: 1rem;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 0.4rem;
  background: var(--color-cream);
}

.tag-item.is-active .tag-emoji {
  background: rgba(255, 255, 255, 0.7);
}

.tag-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-gray-500);
  background: var(--color-cream);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  min-width: 28px;
  text-align: center;
}

.tag-item.is-active .tag-count {
  background: rgba(255, 255, 255, 0.7);
  color: var(--brand-green);
}

/* Content area */

.content {
  min-width: 0;
}

.content-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0 0.25rem;
}

.toolbar-left {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.content-title {
  font-family: 'PolygonParty', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-green);
  letter-spacing: -0.01em;
}

.content-count {
  font-size: 0.85rem;
  color: var(--color-gray-500);
  font-weight: 500;
}

.content-count strong {
  color: var(--brand-green);
  font-weight: 700;
}

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

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid var(--color-beige);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-green);
  box-shadow: 0 2px 4px #0000000a;
}

@media (min-width: 64rem) {
  .sidebar-toggle {
    display: none;
  }
}

/* Masonry */

.masonry {
  width: 100%;
  transition: opacity 0.3s ease;
}

.masonry-item {
  float: left;
  cursor: pointer;
  width: calc(33.333% - 0.5rem);
  margin-bottom: 0.75rem;
  padding: 0 0.2rem;
  box-sizing: border-box;
}

@media (max-width: 40rem) {
  .masonry-item {
    width: calc(50% - 0.5rem);
  }
}

.masonry-item-content {
  background: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 6px #0000000f;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.masonry-item-content:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px #0000001f;
}

.masonry-item-content img {
  width: 100%;
  height: auto;
  display: block;
  background: repeating-conic-gradient(#e2e2e2 0% 25%, #d3d3d3 0% 50%) 0 0 / 20px 20px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.masonry-item-meta {
  padding: 0.75rem 0.9rem 0.9rem;
}

.masonry-item-title {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--brand-green);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.masonry-item-sub {
  font-size: 0.72rem;
  color: var(--color-gray-500);
  display: flex;
  gap: 0.5rem;
}

.masonry-item-sub span:last-child::before {
  content: ' / ';
  color: var(--color-gray-300);
}

.masonry-sizer {
  width: 33.333%;
}

@media (max-width: 40rem) {
  .masonry-sizer {
    width: 50%;
  }
}

.masonry:after {
  content: '';
  display: block;
  clear: both;
}

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-gray-500);
  border: 1px dashed var(--color-gray-300);
  border-radius: 0.75rem;
  background: #fff;
  margin: 1rem 0.25rem;
}

.empty.is-hidden {
  display: none;
}

.empty h3 {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--brand-green);
  margin-bottom: 0.4rem;
}

.empty p {
  font-size: 0.85rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding: 0.5rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-beige);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-green);
  box-shadow: 0 1px 3px 0 #0000000a;
  transition: transform 0.12s ease;
}

.page-btn:not(:disabled):hover {
  transform: translateY(-1px);
}

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

.page-info {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gray-600);
}

/* Footer (WAI 1:1) */

.footer {
  background: #fff;
  color: var(--color-gray-500);
  font-family: var(--font-body);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

@media (min-width: 64rem) {
  .footer-inner {
    padding-inline: 2rem;
  }
}

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

@media (min-width: 64rem) {
  .footer-grid {
    grid-template-columns: 3fr 1fr 2fr 4fr;
  }
}

.footer-brand-block {
  display: flex;
  flex-direction: column;
  order: 9999;
}

@media (min-width: 64rem) {
  .footer-brand-block {
    order: 0;
  }
}

.footer-brand-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  height: 100%;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: #000;
}

.footer-meta {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-top: 0.5rem;
}

.footer-meta-link {
  color: var(--color-gray-500);
}

.footer-meta-link:hover {
  text-decoration: underline;
}

.footer-spacer {
  display: none;
}

@media (min-width: 64rem) {
  .footer-spacer {
    display: block;
  }
}

.footer-col-title {
  font-weight: 600;
  color: var(--color-gray-800);
  margin: 0 0 1rem;
  font-size: 1rem;
}

.footer-col-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.footer-link {
  color: var(--color-gray-500);
  font-size: 0.875rem;
}

.footer-link:hover {
  color: var(--color-gray-900);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-gray-600);
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--brand-brown);
}

/* Not found */

.notfound {
  max-width: 48rem;
  margin: 3rem auto;
  text-align: center;
  padding: 3rem 1rem;
}

.notfound h1 {
  font-family: 'PolygonParty', sans-serif;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--brand-green);
  font-weight: 800;
}

.notfound p {
  color: var(--color-gray-500);
  margin-bottom: 1.25rem;
}

.notfound .btn-cta-wrap {
  margin-top: 0.5rem;
}

.notfound .detail-download-btn {
  width: auto;
}

@media (max-width: 64rem) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 50;
    overflow: auto;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }
}
.image-info-sidebar{display:flex;flex-direction:column;gap:0.75rem}
.image-info-title{font-size:1.25rem;line-height:1.3}
.image-info-desc{font-size:0.9rem;color:#555;line-height:1.5}
.image-info-stats{font-size:0.82rem;color:#888}
.image-info-tags{display:flex;flex-wrap:wrap;gap:0.35rem}
.image-info-tag{display:inline-block;padding:0.25rem 0.7rem;border:1px solid #ddd;border-radius:999px;font-size:0.82rem;color:inherit;text-decoration:none}
.image-info-tag:hover{background:#f5f5f5}
#sentinel{height:1px}
.similar-section{margin-top:2rem}
.similar-heading{font-family:'PolygonParty',sans-serif;font-size:1.1rem;margin-bottom:1rem}
.similar-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0.75rem}
.similar-item{border-radius:6px;overflow:hidden;background:repeating-conic-gradient(#e2e2e2 0% 25%,#d3d3d3 0% 50%) 0 0/16px 16px}
.similar-item img{width:100%;aspect-ratio:1;object-fit:cover;display:block}
@media(max-width:768px){.similar-grid{grid-template-columns:repeat(2,1fr)}}
.content--wide{max-width:none!important}
.detail-image-wrap{background:repeating-conic-gradient(#e2e2e2 0% 25%,#d3d3d3 0% 50%) 0 0/20px 20px;border-radius:8px;overflow:hidden;position:relative}
.detail-image{width:100%;display:block;position:relative;z-index:1}

.detail-bg-switcher {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.4rem;
  z-index: 2;
}

.detail-bg-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px #00000033;
  transition: transform 0.12s ease;
}

.detail-bg-circle:hover {
  transform: scale(1.15);
}

.detail-bg-circle.active {
  border-color: #176733;
}

.bg-checker {
  background: repeating-conic-gradient(#e2e2e2 0% 25%, #d3d3d3 0% 50%) 0 0 / 8px 8px;
}

.bg-white {
  background: #fff;
}

.bg-dark {
  background: #555;
}
.detail-tags{display:flex;flex-wrap:wrap;gap:0.35rem}
.detail-tag{display:inline-block;padding:0.25rem 0.7rem;border:1px solid #ddd;border-radius:999px;font-size:0.82rem;color:inherit;text-decoration:none}
.detail-tag:hover{background:#f5f5f5}
@media(max-width:768px){.detail-split{grid-template-columns:1fr}}
.layout-detail{max-width:1280px;margin:0 auto;padding:1.5rem 2rem 0}
@media(max-width:768px){.layout-detail{padding:1rem 1rem 0}}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

.detail-main {
  min-width: 0;
}

.detail-sidebar {
  position: sticky;
  top: 90px;
}

.detail-sidebar-card {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 0.75rem;
  padding: 0 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-title {
  font-family: 'PolygonParty', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #222;
  line-height: 1.3;
}

.detail-download-btn {
  width: 100%;
  padding: 0.8rem 1.8rem;
  background: linear-gradient(180deg, #fb923c 0%, #f97316 50%, #ea580c 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 4px 0 #c2410c, 0 6px 14px rgba(234,88,12,0.3);
  transition: all 0.12s ease;
  position: relative;
  top: 0;
}

.detail-download-sub {
  font-size: 0.78rem;
  color: #888;
  text-align: center;
  margin-top: -0.25rem;
}

.detail-download-sub u {
  text-decoration-color: rgba(0,0,0,0.4);
}

.detail-actions {
  display: flex;
  gap: 0.5rem;
}

.detail-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem;
  background: #f4f4f4;
  border: 1px solid #e1e1e1;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  color: #555;
  cursor: pointer;
  transition: background 0.12s ease;
}

.detail-action-btn:hover {
  background: #eaeaea;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid #eee;
}

.detail-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.85rem;
}

.detail-meta-label {
  color: #888;
}

.detail-meta-value {
  color: #333;
  font-weight: 500;
}

.detail-meta-toggle {
  background: none;
  border: none;
  color: #176733;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.3rem 0;
  text-align: left;
}

.detail-meta-toggle:hover {
  text-decoration: underline;
}

.detail-meta-extra {
  display: none;
}

.detail-meta-extra.open {
  display: flex;
  flex-direction: column;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.detail-tag {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: #f4f4f4;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #555;
  text-decoration: none;
}

.detail-tag:hover {
  background: #eaeaea;
}

.detail-trust-card {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
}

.detail-trust-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 50%;
  background: #eee;
}

.detail-trust-text {
  padding: 0.5rem 0.5rem 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.82rem;
  color: #555;
}

.detail-trust-line {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.detail-trust-badge {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.detail-wiki-card {
  background: #f9f9f9;
  border: 1px solid #e1e1e1;
  border-radius: 0.75rem;
  margin-top: 0.75rem;
  overflow: hidden;
  padding: 0.75rem;
}

.detail-wiki-heading {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
  margin-bottom: 0.5rem;
}

.detail-wiki-link {
  display: flex;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.detail-wiki-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 0.5rem;
}

.detail-wiki-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.detail-wiki-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #222;
}

.detail-wiki-summary {
  font-size: 0.76rem;
  color: #666;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
