:root {
  --cream: #f7efe1;
  --cream-deep: #efe0c8;
  --paper: #fffaf0;
  --brown: #3c2718;
  --brown-soft: #725139;
  --green: #285342;
  --green-soft: #dfe9d8;
  --gold: #b58a3b;
  --shadow: 0 24px 70px rgba(60, 39, 24, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  color: var(--brown);
  background:
    radial-gradient(circle at top left, rgba(181, 138, 59, 0.16), transparent 34rem),
    linear-gradient(135deg, rgba(40, 83, 66, 0.08) 0 1px, transparent 1px 22px),
    var(--cream);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 239, 225, 0.86);
  border-bottom: 1px solid rgba(60, 39, 24, 0.12);
  backdrop-filter: blur(14px);
  max-height: 100dvh;
}

.nav {
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-toggle {
  display: none;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--green);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--paper);
  background: var(--green);
  box-shadow: inset 0 0 0 2px rgba(193, 139, 46, 0.55);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.nav-links {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 4px;
  max-width: min(980px, calc(100vw - 430px));
  padding: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(60, 39, 24, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 10px 26px rgba(60, 39, 24, 0.08);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--brown-soft);
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-current {
  color: var(--paper);
  background: var(--green);
  border-color: rgba(181, 138, 59, 0.28);
  outline: none;
}

.nav-links a.is-current {
  box-shadow: 0 8px 16px rgba(40, 83, 66, 0.16);
}

.section-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.today-section {
  padding: 72px 0 38px;
}

.hero-grid {
  display: block;
}

.intro {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--brown);
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  font-family: "Amiri", Georgia, serif;
  font-size: clamp(3rem, 8vw, 6.8rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.lead {
  max-width: 34rem;
  margin: 22px 0 0;
  color: var(--brown-soft);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
}

.section-heading,
.about-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.84rem;
  font-weight: 800;
}

time {
  color: var(--brown-soft);
  font-size: 0.92rem;
  font-weight: 700;
}

.action-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--brown-soft);
  font-weight: 700;
}

.all-section,
.about-section,
.contact-section,
.links-page-section {
  padding: 64px 0;
}

.all-section {
  background: rgba(255, 250, 240, 0.44);
  border-block: 1px solid rgba(60, 39, 24, 0.1);
}

.contact-section {
  background: rgba(40, 83, 66, 0.07);
  border-top: 1px solid rgba(60, 39, 24, 0.1);
}

.contact-page-section {
  min-height: calc(100vh - 160px);
  display: grid;
  align-items: center;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: start;
}

.contact-copy {
  max-width: 480px;
}

.contact-copy p:last-child {
  margin: 18px 0 0;
  color: var(--brown-soft);
  font-size: clamp(1rem, 2vw, 1.16rem);
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(60, 39, 24, 0.13);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.92), rgba(239, 224, 200, 0.58));
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(60, 39, 24, 0.18);
  border-radius: 6px;
  padding: 13px 14px;
  color: var(--brown);
  background: rgba(255, 250, 240, 0.86);
  font: inherit;
  font-weight: 600;
  outline: none;
}

.contact-form textarea {
  resize: vertical;
  min-height: 138px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(40, 83, 66, 0.56);
  box-shadow: 0 0 0 3px rgba(40, 83, 66, 0.12);
}

.verification-code {
  display: inline-flex;
  width: max-content;
  min-height: 38px;
  align-items: center;
  border: 1px solid rgba(60, 39, 24, 0.14);
  border-radius: 6px;
  padding: 7px 14px;
  color: var(--brown);
  background: rgba(255, 250, 240, 0.78);
  font-size: 1.06rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.contact-form button {
  min-height: 50px;
  border-radius: 999px;
  color: var(--paper);
  background: var(--green);
  font-weight: 900;
}

.contact-form button:hover,
.contact-form button:focus-visible {
  background: var(--brown);
  outline: none;
}

.contact-status {
  margin: 0;
  padding: 11px 12px;
  border-radius: 6px;
  color: var(--brown-soft);
  background: rgba(40, 83, 66, 0.08);
  font-size: 0.9rem;
  font-weight: 700;
}

.contact-status.success {
  color: var(--green);
  background: rgba(40, 83, 66, 0.12);
}

.contact-status.error {
  color: #842323;
  background: rgba(132, 35, 35, 0.1);
}

.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.section-heading {
  align-items: end;
  margin-bottom: 30px;
}

.category-panel {
  margin: 30px 0;
  padding: 18px;
  border: 1px solid rgba(60, 39, 24, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.54);
}

.category-panel p {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.featured-category-link {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}

.featured-category-link a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(40, 83, 66, 0.16);
  border-radius: 999px;
  color: var(--paper);
  background: var(--green);
  font-size: 0.94rem;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(40, 83, 66, 0.12);
}

.featured-category-link a:hover,
.featured-category-link a:focus-visible {
  background: var(--brown);
  outline: none;
}

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

.category-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--brown-soft);
  background: rgba(40, 83, 66, 0.08);
  font-size: 0.92rem;
  font-weight: 800;
}

.category-shortcuts {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(60, 39, 24, 0.1);
}

.category-shortcuts a {
  width: min(100%, 360px);
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid rgba(181, 138, 59, 0.32);
  border-radius: 999px;
  color: var(--paper);
  background: var(--green);
  box-shadow: 0 14px 30px rgba(40, 83, 66, 0.18);
  font-size: 0.96rem;
  font-weight: 900;
  text-align: center;
}

.category-shortcuts a::after {
  content: ">";
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--green);
  background: var(--paper);
  font-size: 0.86rem;
  line-height: 1;
  flex: 0 0 auto;
}

.category-shortcuts a:hover,
.category-shortcuts a:focus-visible,
.category-link:hover,
.category-link:focus-visible,
.category-link.is-active {
  color: var(--paper);
  background: var(--green);
  outline: none;
}

.quotes-list {
  display: grid;
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
  gap: 24px;
}

.quote-item {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(60, 39, 24, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.72);
  padding: 16px;
  overflow: hidden;
}

.quote-item p {
  margin: 0;
}

.card-preview,
.card-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 18px 42px rgba(60, 39, 24, 0.16);
}

.card-preview {
  display: grid;
  place-items: center;
  color: var(--brown-soft);
  font-weight: 800;
}

.card-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card-toolbar p {
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 800;
}

.card-actions {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quote-page-link,
.whatsapp-share-link,
.like-button,
.quote-detail-toggle,
.share-card-button,
.copy-share-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(40, 83, 66, 0.18);
  border-radius: 999px;
  color: var(--green);
  background: rgba(40, 83, 66, 0.08);
  font-size: 0.9rem;
  font-weight: 800;
}

.quote-page-link:hover,
.quote-page-link:focus-visible,
.whatsapp-share-link:hover,
.whatsapp-share-link:focus-visible,
.like-button:hover,
.like-button:focus-visible,
.quote-detail-toggle:hover,
.quote-detail-toggle:focus-visible,
.share-card-button:hover,
.share-card-button:focus-visible,
.copy-share-button:hover,
.copy-share-button:focus-visible {
  color: var(--paper);
  background: var(--green);
  outline: none;
}

.whatsapp-share-link {
  color: #1e6b45;
  background: rgba(37, 211, 102, 0.13);
}

.copy-share-button {
  color: var(--brown-soft);
  background: rgba(181, 138, 59, 0.13);
}

.like-button {
  color: #7a3f37;
  background: rgba(122, 63, 55, 0.1);
}

.like-button.is-liked {
  color: var(--paper);
  background: #7a3f37;
  border-color: rgba(181, 138, 59, 0.36);
}

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

.like-count {
  min-width: 1.4em;
  margin-left: 4px;
  font-weight: 900;
}

.quote-detail-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(60, 39, 24, 0.13);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.94), rgba(239, 224, 200, 0.48));
}

.quote-detail-panel[hidden] {
  display: none;
}

.detail-eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quote-detail-panel blockquote {
  margin: 0;
  color: var(--brown);
  font-family: "Amiri", Georgia, serif;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.22;
}

.quote-detail-panel dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.quote-detail-panel dl div {
  display: grid;
  gap: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(60, 39, 24, 0.1);
}

.quote-detail-panel dt {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-detail-panel dd {
  margin: 0;
  color: var(--brown-soft);
  font-weight: 750;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.download-card-button,
.download-all-button {
  min-height: 44px;
  border-radius: 999px;
  color: var(--paper);
  background: var(--green);
  font-weight: 800;
}

.download-card-button {
  padding: 0 16px;
}

.download-all-button {
  padding: 0 20px;
  white-space: nowrap;
}

.seo-quote-section {
  padding: clamp(36px, 7vw, 72px) 0;
}

.seo-quote-card {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 5vw, 52px);
  border: 1px solid rgba(181, 138, 59, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(255, 250, 240, 0.9), rgba(255, 250, 240, 0.9)),
    radial-gradient(circle at top left, rgba(181, 138, 59, 0.24), transparent 18rem),
    radial-gradient(circle at bottom right, rgba(40, 83, 66, 0.13), transparent 18rem);
  box-shadow: var(--shadow);
}

.seo-quote-card::before,
.seo-quote-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  pointer-events: none;
  border: 1px solid rgba(40, 83, 66, 0.18);
  border-radius: calc(var(--radius) - 2px);
}

.seo-quote-card::after {
  inset: 21px;
  border-color: rgba(181, 138, 59, 0.2);
}

.seo-quote-card > * {
  position: relative;
  z-index: 1;
}

.seo-quote-card .eyebrow {
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(40, 83, 66, 0.1);
}

.seo-quote-card h1 {
  max-width: 18rem;
  margin-bottom: 18px;
  color: var(--green);
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.05rem, 3.6vw, 1.45rem);
  font-weight: 900;
  line-height: 1.25;
}

.seo-quote-card blockquote {
  margin: 0;
  padding: clamp(18px, 4vw, 30px);
  border-radius: var(--radius);
  color: var(--brown);
  background: rgba(255, 250, 240, 0.68);
  border-left: 4px solid var(--gold);
  font-family: "Amiri", Georgia, serif;
  font-size: clamp(1.8rem, 8vw, 3.8rem);
  font-weight: 700;
  line-height: 1.14;
}

.seo-card-visual {
  margin: 24px 0 0;
  padding: 16px;
  border: 1px solid rgba(60, 39, 24, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.7);
}

.seo-card-visual canvas {
  display: none;
}

.seo-card-visual img {
  display: block;
  width: min(100%, 360px);
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 20px 44px rgba(60, 39, 24, 0.16);
  object-fit: cover;
}

.seo-card-visual figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--brown-soft);
  font-weight: 800;
  text-align: center;
}

.seo-card-visual figcaption > span {
  flex: 1 0 100%;
}

.seo-card-visual .quote-page-link {
  min-width: 180px;
}

.seo-card-visual .whatsapp-share-link,
.seo-card-visual .like-button {
  min-width: 140px;
}

.seo-quote-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
  color: var(--brown-soft);
  font-weight: 800;
}

.seo-quote-meta p {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(60, 39, 24, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.58);
}

.seo-quote-meta p:nth-child(4) {
  display: none;
}

.seo-quote-meta span {
  display: block;
  margin-bottom: 2px;
  color: var(--green);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seo-link-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.download-card-button:hover,
.download-card-button:focus-visible,
.download-all-button:hover,
.download-all-button:focus-visible {
  outline: none;
  background: #1f4134;
  box-shadow: 0 12px 24px rgba(40, 83, 66, 0.18);
}

.about-layout {
  align-items: start;
}

.about-layout > * {
  flex: 1;
}

.about-layout p:last-child {
  margin: 6px 0 0;
  max-width: 620px;
  color: var(--brown-soft);
  font-size: 1.12rem;
}

.about-page-layout {
  gap: 36px;
}

.about-intro p:last-child,
.about-content > p {
  margin: 14px 0 0;
  color: var(--brown-soft);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.75;
}

.about-content {
  display: grid;
  gap: 18px;
}

.about-points {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.about-points p {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(60, 39, 24, 0.12);
  border-radius: 8px;
  color: var(--brown-soft);
  background: rgba(255, 250, 240, 0.58);
  font-weight: 700;
  line-height: 1.55;
}

.about-points span {
  display: block;
  margin-bottom: 3px;
  color: var(--green);
  font-weight: 900;
}

.about-note {
  padding-top: 8px;
  border-top: 1px solid rgba(60, 39, 24, 0.1);
}

.links-page-section {
  min-height: calc(100vh - 160px);
  background: rgba(255, 250, 240, 0.44);
  border-top: 1px solid rgba(60, 39, 24, 0.1);
}

.links-page-layout {
  display: grid;
  gap: 30px;
}

.links-page-header {
  max-width: 760px;
}

.permanent-link-list {
  display: grid;
  gap: 14px;
}

.permanent-link-item {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(60, 39, 24, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
}

.permanent-link-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
}

.permanent-link-meta span {
  color: var(--brown-soft);
}

.permanent-link-item h2 {
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.35;
}

.permanent-link-item h2 a {
  color: var(--brown);
}

.permanent-link-item h2 a:hover,
.permanent-link-item h2 a:focus-visible,
.permanent-link-url:hover,
.permanent-link-url:focus-visible {
  color: var(--green);
  outline: none;
}

.permanent-link-item p {
  margin: 8px 0 0;
  color: var(--brown-soft);
  line-height: 1.6;
}

.permanent-link-url {
  min-width: 0;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.permanent-link-empty {
  padding: 20px;
  border: 1px solid rgba(60, 39, 24, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
}

.permanent-link-empty p {
  margin: 0;
  color: var(--brown-soft);
  font-weight: 700;
}

.pagination-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.pagination-pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pagination-nav a,
.pagination-nav span {
  display: inline-flex;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--brown-soft);
  background: rgba(255, 250, 240, 0.72);
  font-size: 0.9rem;
  font-weight: 900;
}

.pagination-nav a:hover,
.pagination-nav a:focus-visible,
.pagination-nav .is-current {
  color: var(--paper);
  background: var(--green);
  outline: none;
}

.pagination-nav span[aria-disabled="true"] {
  opacity: 0.46;
}

.site-footer {
  padding: 28px 16px;
  color: rgba(60, 39, 24, 0.72);
  text-align: center;
  border-top: 1px solid rgba(60, 39, 24, 0.1);
}

.site-footer p {
  margin: 0;
}

.bottom-nav {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left));
  z-index: 30;
  width: min(720px, calc(100% - 24px));
  min-height: 66px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(60, 39, 24, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.9);
  box-shadow: 0 18px 46px rgba(60, 39, 24, 0.18);
  backdrop-filter: blur(16px);
}

.bottom-nav a {
  min-width: 0;
  min-height: 52px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  padding: 4px 2px;
  border-radius: 6px;
  color: var(--brown-soft);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  border: 1px solid transparent;
}

.bottom-nav a span:first-child {
  min-height: 21px;
  display: grid;
  place-items: center;
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
}

.bottom-nav a:hover,
.bottom-nav a:focus-visible,
.bottom-nav a.is-current {
  color: var(--paper);
  background: var(--green);
  border-color: rgba(181, 138, 59, 0.32);
  outline: none;
}

.bottom-nav a:hover span:first-child,
.bottom-nav a:focus-visible span:first-child,
.bottom-nav a.is-current span:first-child {
  color: var(--paper);
}

@media (min-width: 0) {
  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: auto;
    padding: 14px 0;
    align-items: center;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-toggle {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    gap: 4px;
    padding: 10px;
    border: 1px solid rgba(60, 39, 24, 0.12);
    border-radius: 999px;
    color: var(--paper);
    background: var(--green);
    box-shadow: 0 10px 22px rgba(40, 83, 66, 0.18);
  }

  .nav-toggle span {
    width: 20px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav.is-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav.is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-links {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    display: none;
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    padding: 8px;
    border-radius: var(--radius);
    height: min(56dvh, 460px);
    max-height: calc(100dvh - 128px);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
  }

  .nav.is-open .nav-links {
    position: fixed;
    top: 96px;
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
    z-index: 20;
    width: auto;
    max-width: none;
    height: calc(100dvh - 112px);
    max-height: calc(100dvh - 112px);
    display: flex;
    border: 1px solid rgba(181, 138, 59, 0.34);
    background:
      radial-gradient(circle at top left, rgba(181, 138, 59, 0.18), transparent 18rem),
      linear-gradient(145deg, rgba(19, 45, 36, 0.98), rgba(43, 30, 22, 0.98));
    box-shadow: 0 26px 70px rgba(18, 16, 13, 0.34);
  }

  .nav.is-open {
    max-height: 100dvh;
  }

  .nav.is-open .nav-links a {
    color: #fff4df;
    background: rgba(255, 250, 240, 0.08);
  }

  .nav.is-open .nav-links a:hover,
  .nav.is-open .nav-links a:focus-visible {
    color: #2b1e16;
    background: #f1d89c;
  }

  .nav-links a {
    width: 100%;
    min-height: 40px;
    flex: none;
    padding-inline: 12px;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
  }

  .today-section {
    padding-top: 48px;
  }

  .about-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 620px) {
  body {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .section-shell,
  .nav {
    width: min(100% - 12px, 1120px);
  }

  .bottom-nav {
    right: max(6px, env(safe-area-inset-right));
    bottom: max(6px, env(safe-area-inset-bottom));
    left: max(6px, env(safe-area-inset-left));
    width: min(100% - 12px, 720px);
    min-height: 64px;
    padding: 5px;
    gap: 3px;
  }

  .bottom-nav a {
    min-height: 52px;
    font-size: 0.68rem;
  }

  .nav {
    min-height: 62px;
    padding: 8px 0;
  }

  .brand {
    gap: 8px;
    font-size: 0.98rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
    padding: 8px;
  }

  .nav.is-open .nav-links {
    top: 74px;
    right: 6px;
    left: 6px;
    height: calc(100dvh - 84px);
    max-height: calc(100dvh - 84px);
  }

  .nav-links a {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 0.92rem;
  }

  .today-section {
    padding: 16px 0 8px;
  }

  .all-section,
  .about-section,
  .contact-section {
    padding: 30px 0;
  }

  .all-section {
    padding: 24px 0 10px;
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  h1 {
    font-size: clamp(2.05rem, 10vw, 3rem);
  }

  h2 {
    font-size: clamp(1.65rem, 9vw, 2.4rem);
  }

  .lead {
    margin-top: 8px;
    font-size: 0.96rem;
    line-height: 1.45;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }

  .category-panel {
    margin: 16px 0 8px;
    padding: 12px;
  }

  .category-panel p {
    margin-bottom: 9px;
  }

  .category-links {
    gap: 7px;
  }

  .category-link,
  .pill {
    min-height: 32px;
    padding: 0 11px;
    font-size: 0.82rem;
  }

  .site-footer {
    padding: 8px 14px;
  }

  .site-footer p {
    font-size: 0.88rem;
    line-height: 1.25;
  }

  .quotes-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .quote-item {
    gap: 10px;
    padding: 10px;
  }

  .card-preview,
  .card-canvas {
    border-radius: 6px;
    box-shadow: 0 12px 26px rgba(60, 39, 24, 0.13);
  }

  .card-toolbar {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .card-actions,
  .detail-actions {
    gap: 7px;
  }

  .card-actions {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .quote-page-link,
  .whatsapp-share-link,
  .like-button,
  .quote-detail-toggle,
  .share-card-button,
  .copy-share-button,
  .download-card-button,
  .download-all-button {
    min-height: 38px;
    padding-inline: 12px;
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .card-actions > * {
    flex: 0 0 auto;
  }

  .quote-detail-panel {
    gap: 10px;
    padding: 12px;
  }

  .quote-detail-panel blockquote {
    font-size: clamp(1.35rem, 7vw, 1.85rem);
  }

  .quote-detail-panel dl {
    gap: 7px;
  }

  .contact-form {
    gap: 10px;
    padding: 12px;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 11px 12px;
  }

  .seo-quote-section {
    padding: 18px 0;
  }

  .seo-quote-card {
    padding: 18px 12px;
  }

  .seo-quote-card::before {
    inset: 6px;
  }

  .seo-quote-card::after {
    display: none;
  }

  .seo-quote-card h1 {
    max-width: none;
  }

  .seo-quote-card blockquote {
    padding: 13px;
    font-size: clamp(1.45rem, 9vw, 2.25rem);
  }

  .seo-card-visual {
    margin-top: 14px;
    padding: 10px;
  }

  .seo-card-visual img {
    width: min(100%, 300px);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(60, 39, 24, 0.14);
  }

  .seo-card-visual figcaption {
    gap: 8px;
    margin-top: 10px;
    font-size: 0.88rem;
  }

  .seo-card-visual .quote-page-link,
  .seo-card-visual .whatsapp-share-link,
  .seo-card-visual .like-button {
    flex: 1 1 130px;
    min-width: 0;
  }

  .seo-quote-meta {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 16px;
  }

  .seo-quote-meta p {
    padding: 10px 12px;
  }

  .seo-link-row {
    gap: 8px;
    margin-top: 14px;
  }

  .download-card-button,
  .download-all-button {
    width: 100%;
  }

  .card-actions .download-card-button {
    width: auto;
  }
}
