:root {
  --almanac-paper: #FFFFFF;
  --almanac-paper-raised: #F7F7F8;
  --almanac-ink: #16181D;
  --almanac-ink-soft: #6B7280;
  --almanac-forest: #F48120;
  --almanac-rust: #E0834F;
  --almanac-line: #E7E8EB;
  --almanac-line-strong: #D8DADF;
}

body.almanac-active-page {
  background: var(--almanac-paper) !important;
  color: var(--almanac-ink) !important;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif !important;
}
body.almanac-active-page a { color: inherit; }

.almanac-page {
  --paper: var(--almanac-paper);
  --paper-raised: var(--almanac-paper-raised);
  --ink: var(--almanac-ink);
  --ink-soft: var(--almanac-ink-soft);
  --forest: var(--almanac-forest);
  --rust: var(--almanac-rust);
  --line: var(--almanac-line);
  --line-strong: var(--almanac-line-strong);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
}
.almanac-page * { box-sizing: border-box; }

.almanac-header {
  border-bottom: 1px solid var(--line-strong);
  padding: 20px 0 16px;
}
.almanac-header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 auto;
}
.almanac-wordmark {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--forest);
}
.almanac-tagline {
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 340px;
  text-align: right;
}
@media (max-width: 640px) {
  .almanac-tagline { text-align: left; max-width: none; }
}

.almanac-intro {
  padding: 28px 0 8px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: end;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 760px) {
  .almanac-intro { grid-template-columns: 1fr; gap: 16px; }
}
.almanac-intro h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(24px, 3.6vw, 34px);
  line-height: 1.15;
  margin: 0 0 10px;
}
.almanac-intro p {
  color: var(--ink-soft);
  font-size: 14.5px;
  max-width: 46ch;
  margin: 0;
}
.almanac-count-block {
  text-align: right;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
@media (max-width: 760px) {
  .almanac-count-block { text-align: left; border-left: none; border-top: 1px solid var(--line); padding-left: 0; padding-top: 12px; }
}
.almanac-num {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  color: var(--forest);
  display: block;
}
.almanac-lbl { font-size: 13px; color: var(--ink-soft); }

.almanac-wrap {
  --paper: var(--almanac-paper);
  --paper-raised: var(--almanac-paper-raised);
  --ink: var(--almanac-ink);
  --ink-soft: var(--almanac-ink-soft);
  --forest: var(--almanac-forest);
  --rust: var(--almanac-rust);
  --line: var(--almanac-line);
  --line-strong: var(--almanac-line-strong);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  max-width: 1080px;
  margin: 0 auto;
}

.almanac-wrap * { box-sizing: border-box; }

/* ---------- Controls bar ---------- */
.almanac-controls {
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-strong);
  flex-wrap: nowrap;
}
@media (max-width: 640px) {
  .almanac-controls { flex-wrap: wrap; }
  .almanac-search { width: 100% !important; min-width: 100%; }
  .almanac-sort { max-width: none; }
}
.almanac-search {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 180px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong) !important;
  border-radius: 6px;
  padding: 0 12px;
  background: var(--paper-raised);
  box-shadow: none !important;
  transition: border-color 0.15s ease;
}
.almanac-search:focus-within { border-color: var(--forest) !important; }
.almanac-search input,
.almanac-search input[type="text"] {
  flex: 1;
  width: 100% !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  font: inherit !important;
  color: var(--ink) !important;
  outline: none !important;
  font-size: 14.5px;
  padding: 0 !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  border-radius: 0 !important;
}
.almanac-search input:focus { outline: none !important; box-shadow: none !important; border: none !important; }
.almanac-search svg { flex-shrink: 0; opacity: 0.55; }

.almanac-sort {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: 200px;
  height: 42px;
  border: 1px solid var(--line-strong) !important;
  background: var(--paper-raised) !important;
  color: var(--ink) !important;
  font: inherit !important;
  font-size: 13px;
  padding: 0 10px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: none !important;
  -webkit-appearance: menulist;
  appearance: auto;
}
.almanac-sort:focus { outline: none !important; box-shadow: none !important; }

.almanac-view-toggle {
  display: flex;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.almanac-view-btn {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 100%;
  color: var(--ink-soft);
  cursor: pointer;
  background: var(--paper-raised);
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}
.almanac-view-btn + .almanac-view-btn { border-left: 1px solid var(--line-strong) !important; }
.almanac-view-btn.active { background: var(--forest) !important; color: var(--paper) !important; }
.almanac-view-btn:hover:not(.active) { color: var(--forest); }
.almanac-view-btn:focus, .almanac-view-btn:focus-visible { outline: none !important; box-shadow: none !important; border: none !important; }

/* ---------- Category pills ---------- */
.almanac-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 0;
  overflow-x: auto;
}
.almanac-cats button {
  all: unset;
  font-size: 13.5px;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong) !important;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}
.almanac-cats button:hover { color: var(--forest); border-color: var(--forest) !important; }
.almanac-cats button.active { background: var(--forest) !important; color: var(--paper) !important; border-color: var(--forest) !important; }
.almanac-cats button:active, .almanac-cats button:focus, .almanac-cats button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* ---------- List view (default) ---------- */
.almanac-listings {
  border-top: 1px solid var(--line-strong);
}
.almanac-wrap[data-view="list"] .almanac-listings {
  display: block;
}
.almanac-wrap[data-view="list"] .almanac-entry {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: stretch;
}
.almanac-wrap[data-view="list"] .almanac-thumb {
  align-self: stretch;
}
.almanac-wrap[data-view="list"] .almanac-thumb img,
.almanac-wrap[data-view="list"] .almanac-tag-placeholder,
.almanac-wrap[data-view="list"] .almanac-thumb .thumb-tile {
  width: 100%;
  height: 100%;
  min-height: 100px;
}
.almanac-wrap[data-view="list"] .almanac-tag-chip { display: none; }

@media (max-width: 560px) {
  .almanac-wrap[data-view="list"] .almanac-entry { grid-template-columns: 84px 1fr; }
  .almanac-wrap[data-view="list"] .almanac-thumb img,
  .almanac-wrap[data-view="list"] .almanac-tag-placeholder,
  .almanac-wrap[data-view="list"] .almanac-thumb .thumb-tile { min-height: 84px; }
  .almanac-wrap[data-view="list"] .almanac-arrow { display: none; }
}

/* ---------- Grid view ---------- */
.almanac-wrap[data-view="grid"] .almanac-listings {
  border-top: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.almanac-wrap[data-view="grid"] .almanac-entry {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper-raised);
}
.almanac-wrap[data-view="grid"] .almanac-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
}
.almanac-wrap[data-view="grid"] .almanac-thumb img,
.almanac-wrap[data-view="grid"] .almanac-tag-placeholder {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
}
.almanac-wrap[data-view="grid"] .almanac-body {
  padding: 14px 16px 18px;
}
.almanac-wrap[data-view="grid"] .almanac-arrow { display: none; }

/* ---------- Shared entry pieces ---------- */
.almanac-thumb {
  display: block !important;
  flex-shrink: 0;
  text-decoration: none !important;
  color: inherit !important;
}
.almanac-thumb:hover, .almanac-thumb:focus, .almanac-thumb:visited {
  text-decoration: none !important;
  color: inherit !important;
}
.almanac-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--paper-raised);
}
.almanac-tag-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest);
  padding: 5px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--paper-raised);
}
.almanac-tag-placeholder svg { width: 32%; height: 32%; opacity: 0.8; }
.almanac-tag-chip {
  display: inline-block;
  font-family: 'Fraunces', serif;
  font-size: 11px;
  color: var(--forest);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 2px 7px;
  margin-bottom: 8px;
}
.almanac-body h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 19px;
  margin: 0 0 4px;
}
.almanac-wrap a { text-decoration: none; }
.almanac-body h3 a { color: inherit !important; text-decoration: none !important; }
.almanac-body h3 a:hover { text-decoration: underline !important; }
.almanac-sub {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.almanac-details {
  font-size: 12.5px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 8px;
}
.almanac-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-soft); }
.almanac-meta span { display: inline-flex; align-items: center; gap: 5px; }
.almanac-date svg { color: var(--rust); flex-shrink: 0; }
.almanac-location { display: inline-flex; align-items: center; gap: 5px; }
.almanac-location svg { color: var(--rust); flex-shrink: 0; }
.almanac-arrow { align-self: center; color: var(--line-strong); font-size: 20px; text-decoration: none; }

.almanac-empty {
  display: none;
  padding: 60px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}
.almanac-empty-initial {
  padding: 40px 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ---------- Single listing page ---------- */
body.almanac-single-page .entry-title,
body.almanac-single-page .wp-block-post-title,
body.almanac-single-page h1,
body.almanac-single-page h2,
body.almanac-single-page .entry-content,
body.almanac-single-page .wp-block-post-content {
  color: var(--almanac-ink) !important;
}
body.almanac-single-page .entry-title,
body.almanac-single-page .wp-block-post-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
}
body.almanac-single-page .site-header,
body.almanac-single-page .site-footer {
  color: var(--almanac-ink);
}

.almanac-single {
  --paper: var(--almanac-paper);
  --paper-raised: var(--almanac-paper-raised);
  --ink: var(--almanac-ink);
  --ink-soft: var(--almanac-ink-soft);
  --forest: var(--almanac-forest);
  --line-strong: var(--almanac-line-strong);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 0 32px;
}
.almanac-single * { box-sizing: border-box; }

.almanac-single-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  align-items: start;
}
.almanac-single-main { max-width: 760px; min-width: 0; }
@media (max-width: 900px) {
  .almanac-single-grid { grid-template-columns: 1fr; }
  .almanac-single-main { max-width: none; }
}
.almanac-back {
  display: inline-block;
  font-size: 13.5px;
  color: var(--forest) !important;
  text-decoration: none !important;
  margin-bottom: 18px;
}
.almanac-back:hover { text-decoration: underline !important; }
.almanac-single-image img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  margin-bottom: 18px;
}
.almanac-single-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.almanac-single-head .almanac-tag-chip { margin-bottom: 0; }
.almanac-single-date, .almanac-single-location {
  font-size: 12.5px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.almanac-single-date svg, .almanac-single-location svg {
  color: var(--almanac-rust);
  flex-shrink: 0;
}
.almanac-single-details {
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--forest);
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.almanac-single-body { font-size: 16px; line-height: 1.7; }
.almanac-single-body p { margin: 0 0 1em; }

/* ---------- Share + Add to calendar ---------- */
.almanac-single-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
}
.almanac-actions-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-right: 4px;
}
.almanac-share { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.almanac-share-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.almanac-share-btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-strong) !important;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.almanac-share-btn:hover { color: var(--forest); border-color: var(--forest) !important; transform: translateY(-2px); }
.almanac-share-btn svg { width: 14px; height: 14px; }
.almanac-copy-feedback {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.almanac-copy-link.is-copied .almanac-copy-feedback { opacity: 1; }

.almanac-addcal { position: relative; }
.almanac-addcal-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--line-strong) !important;
  color: var(--ink);
  background: var(--paper-raised);
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.almanac-addcal-btn svg { flex-shrink: 0; color: var(--forest); }
.almanac-addcal-btn:hover { border-color: var(--forest) !important; color: var(--forest); }
.almanac-addcal-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  min-width: 210px;
  padding: 6px;
  z-index: 20;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.5);
}
.almanac-addcal-menu.is-open { display: block; }
.almanac-addcal-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink) !important;
  text-decoration: none !important;
}
.almanac-addcal-menu a:hover { background: var(--paper); color: var(--forest) !important; }
@media (max-width: 520px) {
  .almanac-single-actions { flex-direction: column; align-items: flex-start; }
  .almanac-addcal { align-self: stretch; }
  .almanac-addcal-btn { width: 100%; justify-content: center; }
  .almanac-addcal-menu { left: 0; right: auto; width: 100%; }
}

/* ---------- "Meet with us" request card ---------- */
.almanac-meet-card {
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 22px;
  position: sticky;
  top: 20px;
}
.almanac-meet-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.25;
  margin: 0 0 16px;
  color: var(--ink);
}
.almanac-meet-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.almanac-meet-row {
  display: flex;
  gap: 12px;
}
.almanac-meet-row input { flex: 1; min-width: 0; }
@media (max-width: 420px) {
  .almanac-meet-row { flex-direction: column; }
}
.almanac-meet-form input[type="text"],
.almanac-meet-form input[type="email"],
.almanac-meet-form input[type="tel"],
.almanac-meet-form textarea {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 11px 16px;
  width: 100%;
  outline: none;
  color-scheme: light;
  transition: border-color 0.2s ease;
}
.almanac-meet-form textarea {
  border-radius: 16px;
  resize: vertical;
  min-height: 90px;
}
.almanac-meet-form input::placeholder,
.almanac-meet-form textarea::placeholder { color: var(--ink-soft); }
.almanac-meet-form input:focus,
.almanac-meet-form textarea:focus { border-color: var(--forest); }
.almanac-meet-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
  cursor: pointer;
}
.almanac-meet-consent input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--forest);
  flex-shrink: 0;
}
.almanac-meet-submit {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  text-align: center;
  background: var(--forest) !important;
  color: var(--paper) !important;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 13px 16px;
  border-radius: 999px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.almanac-meet-submit:hover { opacity: 0.88; }
.almanac-meet-submit:active,
.almanac-meet-submit:focus,
.almanac-meet-submit:focus-visible {
  transform: scale(0.98);
  outline: none !important;
  box-shadow: none !important;
  background: var(--forest) !important;
  color: var(--paper) !important;
}
@media (max-width: 900px) {
  .almanac-meet-card { position: static; }
}

/* Listing title: rendered inside the plugin column so it lines up with the image.
   The theme's own title block (full-width, misaligned) is hidden when ours is shown. */
body.almanac-own-title .entry-title,
body.almanac-own-title .wp-block-post-title,
body.almanac-own-title .page-title,
body.almanac-own-title .post-title,
body.almanac-own-title .single-title {
  display: none !important;
}
.almanac-single-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink) !important;
  margin: 0 0 14px;
  padding: 0;
}

/* Grid view: cap the Details text at 5 lines, then "..." */
.almanac-wrap[data-view="grid"] .almanac-details {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   MOTION — clean, subtle, respects prefers-reduced-motion
   ========================================================= */
body.almanac-active-page,
.almanac-page,
.almanac-wrap,
.almanac-single {
  --almanac-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes almanac-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes almanac-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Directory: intro & controls (on page load) ---- */
.almanac-intro h1        { animation: almanac-rise 0.8s var(--almanac-ease) 0.05s backwards; }
.almanac-intro p         { animation: almanac-rise 0.8s var(--almanac-ease) 0.18s backwards; }
.almanac-count-block     { animation: almanac-rise 0.8s var(--almanac-ease) 0.30s backwards; }
.almanac-num             { font-variant-numeric: tabular-nums; }
.almanac-controls        { animation: almanac-rise 0.7s var(--almanac-ease) 0.40s backwards; }
.almanac-cats button     {
  animation: almanac-rise 0.5s var(--almanac-ease) backwards;
  animation-delay: calc(var(--i, 0) * 45ms + 550ms);
}
.almanac-cats button:nth-child(1) { --i: 0; }
.almanac-cats button:nth-child(2) { --i: 1; }
.almanac-cats button:nth-child(3) { --i: 2; }
.almanac-cats button:nth-child(4) { --i: 3; }
.almanac-cats button:nth-child(5) { --i: 4; }
.almanac-cats button:nth-child(6) { --i: 5; }
.almanac-cats button:nth-child(7) { --i: 6; }
.almanac-cats button:nth-child(8) { --i: 7; }
.almanac-cats button:nth-child(9) { --i: 8; }
.almanac-cats button:nth-child(10) { --i: 9; }
.almanac-cats button:nth-child(11) { --i: 10; }
.almanac-cats button:nth-child(12) { --i: 11; }
.almanac-cats button:nth-child(n+13) { --i: 12; }

/* ---- Controls: hover / focus / press ---- */
.almanac-search { transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.almanac-search:focus-within {
  box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.12);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest) 22%, transparent);
}
.almanac-sort { transition: border-color 0.25s ease, color 0.25s ease; }
.almanac-sort:hover { border-color: var(--forest); }
.almanac-view-btn { transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease; }
.almanac-view-btn:active { transform: scale(0.92); }
.almanac-cats button {
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease,
              transform 0.25s var(--almanac-ease);
}
.almanac-cats button:hover  { transform: translateY(-2px); }
.almanac-cats button:active { transform: scale(0.95); }

/* ---- Entries: scroll-reveal (JS adds .is-in) ---- */
.almanac-anim .almanac-entry:not(.is-in) { opacity: 0; }
.almanac-anim .almanac-entry.is-in {
  animation: almanac-rise 0.65s var(--almanac-ease) var(--d, 0ms) backwards;
}

/* ---- Entries: hover ---- */
.almanac-thumb { overflow: hidden; border-radius: 4px; }
.almanac-thumb img { transition: transform 0.7s var(--almanac-ease); }
.almanac-entry:hover .almanac-thumb img { transform: scale(1.06); }
.almanac-tag-placeholder svg { transition: transform 0.5s var(--almanac-ease), opacity 0.3s ease; }
.almanac-entry:hover .almanac-tag-placeholder svg { transform: scale(1.12) rotate(-4deg); opacity: 1; }

.almanac-tag-chip { transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.almanac-entry:hover .almanac-tag-chip {
  background: var(--forest);
  color: var(--paper);
  border-color: var(--forest);
}

/* animated underline on the title instead of a hard jump */
.almanac-body h3 a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.4s var(--almanac-ease);
}
.almanac-body h3 a:hover,
.almanac-entry:hover .almanac-body h3 a {
  text-decoration: none !important;
  background-size: 100% 1px;
}

/* list view: arrow slides in */
.almanac-arrow { transition: transform 0.35s var(--almanac-ease), color 0.3s ease; }
.almanac-entry:hover .almanac-arrow { transform: translateX(6px); color: var(--forest); }

/* grid view: card lift + glow */
.almanac-wrap[data-view="grid"] .almanac-entry {
  transition: transform 0.4s var(--almanac-ease), box-shadow 0.4s var(--almanac-ease), border-color 0.3s ease;
}
.almanac-wrap[data-view="grid"] .almanac-entry:hover {
  transform: translateY(-5px);
  border-color: var(--forest);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.7);
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--forest) 55%, transparent);
}

/* empty state */
.almanac-empty { animation: almanac-rise 0.5s var(--almanac-ease) backwards; }

/* ---- Single listing page: staggered entrance ---- */
.almanac-single > * { animation: almanac-rise 0.7s var(--almanac-ease) backwards; }
.almanac-single > :nth-child(1) { animation-delay: 0.05s; }
.almanac-single > :nth-child(2) { animation-delay: 0.13s; }
.almanac-single > :nth-child(3) { animation-delay: 0.21s; }
.almanac-single > :nth-child(4) { animation-delay: 0.29s; }
.almanac-single > :nth-child(5) { animation-delay: 0.37s; }
.almanac-single > :nth-child(6) { animation-delay: 0.45s; }
.almanac-single > :nth-child(7) { animation-delay: 0.53s; }
.almanac-single > :nth-child(8) { animation-delay: 0.61s; }
.almanac-single-main > * { animation: almanac-rise 0.6s var(--almanac-ease) backwards; }
.almanac-single-main > :nth-child(1) { animation-delay: 0.21s; }
.almanac-single-main > :nth-child(2) { animation-delay: 0.29s; }
.almanac-single-main > :nth-child(3) { animation-delay: 0.37s; }
.almanac-single-main > :nth-child(4) { animation-delay: 0.45s; }
.almanac-single-main > :nth-child(5) { animation-delay: 0.53s; }
.almanac-meet-card { animation: almanac-rise 0.7s var(--almanac-ease) 0.3s backwards; }

.almanac-back { transition: transform 0.3s var(--almanac-ease); }
.almanac-back:hover { transform: translateX(-4px); }
.almanac-share-btn { transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--almanac-ease); }

/* ---- Respect users who prefer reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .almanac-page *, .almanac-wrap *, .almanac-single, .almanac-single * {
    animation: none !important;
    transition: none !important;
  }
  .almanac-anim .almanac-entry { opacity: 1 !important; }
}

/* ---------- Notices ---------- */
.almanac-notice {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.almanac-notice-success {
  background: color-mix(in srgb, var(--almanac-forest) 15%, var(--almanac-paper-raised));
  border-color: var(--almanac-forest);
  color: var(--almanac-ink);
}
.almanac-notice-error {
  background: color-mix(in srgb, var(--almanac-rust) 15%, var(--almanac-paper-raised));
  border-color: var(--almanac-rust);
  color: var(--almanac-ink);
}

/* ---------- "+ Add listing" bar ---------- */
.almanac-admin-bar {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 4px;
}
.almanac-add-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  background: var(--almanac-forest) !important;
  color: var(--almanac-paper) !important;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 6px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.almanac-add-btn:hover { opacity: 0.88; }
.almanac-add-btn:active, .almanac-add-btn:focus, .almanac-add-btn:focus-visible {
  transform: scale(0.97);
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  background: var(--almanac-forest) !important;
  color: var(--almanac-paper) !important;
}

/* ---------- Add Listing modal ---------- */
.almanac-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.almanac-modal {
  background: var(--almanac-paper);
  color: var(--almanac-ink);
  border: 1px solid var(--almanac-line-strong);
  border-radius: 10px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}
.almanac-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--almanac-line-strong);
}
.almanac-modal-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 19px;
  margin: 0;
  color: var(--almanac-ink);
}
.almanac-modal-close {
  all: unset;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--almanac-ink-soft);
  padding: 4px 8px;
  border-radius: 4px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}
.almanac-modal-close:hover { color: var(--almanac-ink); background: var(--almanac-paper-raised); }
.almanac-modal-close:active, .almanac-modal-close:focus, .almanac-modal-close:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.almanac-modal-form {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.almanac-modal-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--almanac-ink);
}
.almanac-modal-form label span {
  font-weight: 400;
  color: var(--almanac-ink-soft);
  font-size: 12px;
}
.almanac-modal-row {
  display: flex;
  gap: 14px;
}
.almanac-modal-row label { flex: 1; }
@media (max-width: 480px) {
  .almanac-modal-row { flex-direction: column; }
}
.almanac-modal-form input[type="text"],
.almanac-modal-form input[type="date"],
.almanac-modal-form input[type="time"],
.almanac-modal-form input[type="file"],
.almanac-modal-form select,
.almanac-modal-form textarea {
  font: inherit;
  font-size: 14px;
  color: var(--almanac-ink);
  background: var(--almanac-paper-raised);
  border: 1px solid var(--almanac-line-strong);
  border-radius: 6px;
  padding: 9px 10px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  color-scheme: light;
}
.almanac-modal-form input[type="text"]:focus,
.almanac-modal-form input[type="date"]:focus,
.almanac-modal-form input[type="time"]:focus,
.almanac-modal-form select:focus,
.almanac-modal-form textarea:focus {
  border-color: var(--almanac-forest);
}
.almanac-modal-form textarea { resize: vertical; }

.almanac-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}
.almanac-modal-cancel {
  all: unset;
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--almanac-ink-soft);
  border: 1px solid var(--almanac-line-strong) !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}
.almanac-modal-cancel:hover { color: var(--almanac-ink); border-color: var(--almanac-forest) !important; }
.almanac-modal-cancel:active, .almanac-modal-cancel:focus, .almanac-modal-cancel:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
.almanac-modal-submit {
  all: unset;
  cursor: pointer;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  background: var(--almanac-forest) !important;
  color: var(--almanac-paper) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}
.almanac-modal-submit:hover { opacity: 0.9; }
.almanac-modal-submit:active, .almanac-modal-submit:focus, .almanac-modal-submit:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  background: var(--almanac-forest) !important;
  color: var(--almanac-paper) !important;
}

/* Submit buttons locked while a submission is in flight */
.almanac-modal-submit:disabled,
.almanac-meet-submit:disabled { opacity: .6; cursor: wait; pointer-events: none; }

/* Add category (event form) */
.almanac-cat-row { display: flex; align-items: flex-end; gap: 10px; }
.almanac-cat-row label { flex: 1; min-width: 0; }
.almanac-newcat-toggle {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  white-space: nowrap;
  height: 38px;
  padding: 0 18px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--almanac-forest) !important;
  color: var(--almanac-paper) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}
.almanac-newcat-toggle:hover { opacity: 0.9; }
.almanac-newcat-toggle:active, .almanac-newcat-toggle:focus, .almanac-newcat-toggle:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  background: var(--almanac-forest) !important;
  color: var(--almanac-paper) !important;
}
.almanac-newcat-field { margin: 0 0 14px; }
.almanac-newcat-field[hidden] { display: none; }
.almanac-newcat-field small { display: block; margin-top: 4px; opacity: .65; font-size: .75rem; }
.almanac-modal-form select:disabled { opacity: .5; }

/* =========================================================
   MODERN CLEAN THEME (white) — override layer
   ========================================================= */
.almanac-page,
.almanac-page .almanac-wrap,
.almanac-modal {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
  -webkit-font-smoothing: antialiased;
  --almanac-line: #EEF0F3;
  --almanac-line-strong: #E3E6EB;
  --almanac-paper-raised: #F6F7F9;
  --almanac-tint: #FFF3E8;
  --almanac-forest-ink: #C2560A;
  --almanac-shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --almanac-shadow-lg: 0 12px 32px -12px rgba(16,24,40,.18);
}
.almanac-page { max-width: 1120px; margin: 0 auto; padding: 24px 20px 64px; }
.almanac-page h1, .almanac-page h2, .almanac-page h3,
.almanac-modal h2, .almanac-count-block .almanac-num {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-style: normal !important;
}

/* intro */
.almanac-intro { max-width: none; padding: 40px 0 20px; gap: 24px; align-items: center; }
.almanac-intro h1 {
  font-size: clamp(30px, 4.4vw, 46px) !important; line-height: 1.08 !important;
  font-weight: 700 !important; letter-spacing: -0.03em !important; color: var(--almanac-ink);
  margin: 0 0 12px !important;
}
.almanac-intro p { font-size: 16px; line-height: 1.6; color: var(--almanac-ink-soft); max-width: 52ch; margin: 0; }
.almanac-count-block {
  justify-self: end; display: inline-flex; align-items: baseline; gap: 8px;
  background: var(--almanac-tint); border: 0; border-radius: 999px; padding: 10px 18px;
}
.almanac-count-block .almanac-num { font-size: 22px !important; font-weight: 700 !important; color: var(--almanac-forest-ink); line-height: 1; }
.almanac-count-block .almanac-lbl { font-size: 13px; font-weight: 500; color: var(--almanac-forest-ink); text-transform: none; letter-spacing: 0; }

/* add button */
.almanac-admin-bar { margin: 4px 0 16px; }
.almanac-add-btn, .almanac-modal-submit, .almanac-newcat-toggle {
  border-radius: 10px !important; font-weight: 600 !important; letter-spacing: -0.005em;
  box-shadow: 0 1px 2px rgba(244,129,32,.25) !important; transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}
.almanac-add-btn:hover, .almanac-modal-submit:hover, .almanac-newcat-toggle:hover { opacity: 1; box-shadow: 0 6px 16px -6px rgba(244,129,32,.55) !important; transform: translateY(-1px); }

/* controls */
.almanac-controls { gap: 12px; margin: 8px 0 18px; }
.almanac-search, .almanac-sort, .almanac-view-toggle {
  border: 1px solid var(--almanac-line-strong) !important; border-radius: 12px !important;
  background: #fff !important; box-shadow: var(--almanac-shadow);
}
.almanac-search:focus-within, .almanac-sort:hover { border-color: var(--almanac-forest) !important; box-shadow: 0 0 0 4px rgba(244,129,32,.12) !important; }
.almanac-view-toggle { overflow: hidden; }
.almanac-view-btn.active { background: var(--almanac-tint) !important; color: var(--almanac-forest-ink) !important; }

/* category pills */
.almanac-cats { gap: 8px; padding: 2px 0 22px; }
.almanac-cats button {
  border-radius: 999px !important; background: var(--almanac-paper-raised) !important;
  border: 1px solid transparent !important; color: #4B5563 !important;
  font-size: 13.5px !important; font-weight: 500 !important; padding: 8px 16px !important; text-transform: none !important; letter-spacing: 0 !important;
}
.almanac-cats button:hover { background: #fff !important; border-color: var(--almanac-line-strong) !important; color: var(--almanac-ink) !important; transform: none; }
.almanac-cats button.active { background: var(--almanac-ink) !important; color: #fff !important; border-color: var(--almanac-ink) !important; }

/* listings: cards */
.almanac-listings { border-top: 0 !important; }
.almanac-wrap[data-view="list"] .almanac-listings { display: flex; flex-direction: column; gap: 14px; }
.almanac-wrap[data-view="list"] .almanac-entry,
.almanac-wrap[data-view="grid"] .almanac-entry {
  background: #fff; border: 1px solid var(--almanac-line-strong); border-radius: 18px;
  box-shadow: var(--almanac-shadow); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.almanac-wrap[data-view="list"] .almanac-entry { padding: 14px; gap: 22px; grid-template-columns: 148px 1fr auto; align-items: center; }
.almanac-wrap[data-view="list"] .almanac-entry:hover,
.almanac-wrap[data-view="grid"] .almanac-entry:hover {
  transform: translateY(-3px); border-color: #F9C79B; box-shadow: var(--almanac-shadow-lg);
}
.almanac-thumb { border-radius: 12px !important; background: var(--almanac-paper-raised); }
.almanac-wrap[data-view="grid"] .almanac-thumb { border-radius: 0 !important; }
.almanac-tag-placeholder { background: linear-gradient(135deg, #FFF3E8, #FFE4CC) !important; color: var(--almanac-forest) !important; }
.almanac-wrap[data-view="grid"] .almanac-body { padding: 16px 18px 18px; }

.almanac-tag-chip, .almanac-entry:hover .almanac-tag-chip {
  display: inline-block; background: var(--almanac-tint) !important; color: var(--almanac-forest-ink) !important;
  border: 0 !important; border-radius: 999px !important; font-size: 12px !important; font-weight: 600 !important;
  padding: 4px 10px !important; text-transform: none !important; letter-spacing: 0 !important; margin-bottom: 10px;
}
.almanac-body h3 { font-size: 18px !important; font-weight: 650 !important; letter-spacing: -0.02em !important; line-height: 1.3 !important; color: var(--almanac-ink); margin: 0 0 6px !important; }
.almanac-body h3 a:hover { text-decoration: none !important; color: var(--almanac-forest-ink) !important; }
.almanac-sub { font-size: 14px; line-height: 1.55; color: var(--almanac-ink-soft); margin: 0 0 8px; }
.almanac-details { font-size: 12.5px; color: #8A919C; }
.almanac-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: #4B5563; margin-top: 10px; }
.almanac-meta svg { color: var(--almanac-forest); margin-right: 6px; vertical-align: -2px; }
.almanac-arrow {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--almanac-paper-raised); color: var(--almanac-ink) !important; font-size: 16px; margin-right: 6px;
}
.almanac-entry:hover .almanac-arrow { background: var(--almanac-forest); color: #fff !important; transform: translateX(3px); }

/* modal */
.almanac-modal-overlay { background: rgba(16,24,40,.45); backdrop-filter: blur(4px); }
.almanac-modal { border: 0; border-radius: 22px; box-shadow: 0 30px 80px -20px rgba(16,24,40,.35); }
.almanac-modal-head h2 { font-size: 20px !important; font-weight: 700 !important; letter-spacing: -0.02em; }
.almanac-modal-form label { font-size: 13px; font-weight: 600; color: #344054; }
.almanac-modal-form input[type="text"], .almanac-modal-form input[type="date"], .almanac-modal-form input[type="time"],
.almanac-modal-form input[type="file"], .almanac-modal-form select, .almanac-modal-form textarea {
  background: #fff; border-radius: 10px; border-color: var(--almanac-line-strong); box-shadow: var(--almanac-shadow); font-weight: 400;
}
.almanac-modal-form input:focus, .almanac-modal-form select:focus, .almanac-modal-form textarea:focus {
  border-color: var(--almanac-forest) !important; box-shadow: 0 0 0 4px rgba(244,129,32,.14) !important;
}
.almanac-modal-cancel { border-radius: 10px !important; font-weight: 500; background: #fff; }

@media (max-width: 640px) {
  .almanac-page { padding: 12px 14px 48px; }
  .almanac-count-block { justify-self: start; }
  .almanac-wrap[data-view="list"] .almanac-entry { grid-template-columns: 88px 1fr; gap: 14px; padding: 12px; }
}

/* ---- Meta rows: date / time / location each on their own line ---- */
.almanac-meta { flex-direction: column; align-items: flex-start; gap: 7px; }
.almanac-meta span { display: inline-flex; align-items: center; }
.almanac-time svg { color: var(--almanac-forest); flex-shrink: 0; }

/* ---- Larger, taller list cards ---- */
.almanac-wrap[data-view="list"] .almanac-listings { gap: 18px; }
.almanac-wrap[data-view="list"] .almanac-entry {
  grid-template-columns: 260px 1fr auto;
  gap: 28px;
  padding: 18px;
  min-height: 210px;
}
.almanac-wrap[data-view="list"] .almanac-thumb { align-self: stretch; }
.almanac-wrap[data-view="list"] .almanac-thumb img,
.almanac-wrap[data-view="list"] .almanac-tag-placeholder,
.almanac-wrap[data-view="list"] .almanac-thumb .thumb-tile { min-height: 174px; border-radius: 14px; }
.almanac-wrap[data-view="list"] .almanac-body { align-self: center; }
.almanac-wrap[data-view="list"] .almanac-body h3 { font-size: 21px !important; }
.almanac-wrap[data-view="list"] .almanac-sub { font-size: 14.5px; }
@media (max-width: 760px) {
  .almanac-wrap[data-view="list"] .almanac-entry { grid-template-columns: 1fr; min-height: 0; gap: 14px; }
  .almanac-wrap[data-view="list"] .almanac-thumb img,
  .almanac-wrap[data-view="list"] .almanac-tag-placeholder { min-height: 180px; }
  .almanac-wrap[data-view="list"] .almanac-arrow { display: none; }
}

/* ---- Grid view: 3 wider cards per row ---- */
.almanac-wrap[data-view="grid"] .almanac-listings {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.almanac-wrap[data-view="grid"] .almanac-thumb { aspect-ratio: 16 / 10; }
.almanac-wrap[data-view="grid"] .almanac-thumb img,
.almanac-wrap[data-view="grid"] .almanac-tag-placeholder { height: 100%; width: 100%; }
@media (max-width: 960px) {
  .almanac-wrap[data-view="grid"] .almanac-listings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .almanac-wrap[data-view="grid"] .almanac-listings { grid-template-columns: 1fr; }
}

/* ---- Grid view: category as a white badge on the image (top left) ---- */
.almanac-wrap[data-view="grid"] .almanac-entry { position: relative; }
.almanac-wrap[data-view="grid"] .almanac-entry .almanac-tag-chip,
.almanac-wrap[data-view="grid"] .almanac-entry:hover .almanac-tag-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  right: auto;
  z-index: 2;
  margin: 0 !important;
  padding: 6px 12px !important;
  background: #fff !important;
  color: #16181D !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1;
  letter-spacing: 0 !important;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .14);
  pointer-events: none;
}

/* ---- List view: same white badge, top left of the thumbnail ---- */
.almanac-wrap[data-view="list"] .almanac-entry { position: relative; }
.almanac-wrap[data-view="list"] .almanac-entry .almanac-tag-chip,
.almanac-wrap[data-view="list"] .almanac-entry:hover .almanac-tag-chip {
  display: inline-block;
  position: absolute;
  top: 30px;   /* card padding (18) + 12 */
  left: 30px;
  right: auto;
  z-index: 2;
  margin: 0 !important;
  padding: 6px 12px !important;
  background: #fff !important;
  color: #16181D !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1;
  letter-spacing: 0 !important;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .14);
  pointer-events: none;
}
@media (max-width: 640px) {
  .almanac-wrap[data-view="list"] .almanac-entry .almanac-tag-chip,
  .almanac-wrap[data-view="list"] .almanac-entry:hover .almanac-tag-chip { top: 24px; left: 24px; }
}

/* =========================================================
   Modern animated sort dropdown
   ========================================================= */
.almanac-sort-native { display: none !important; }
.almanac-dd { position: relative; flex: 0 0 auto; }
.almanac-dd-btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px 0 16px;
  background: #fff !important;
  border: 1px solid var(--almanac-line-strong) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06) !important;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--almanac-ink);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s ease, box-shadow .25s ease, transform .15s ease;
}
.almanac-dd-btn:hover { border-color: #F9C79B !important; }
.almanac-dd-btn:active { transform: scale(.98); }
.almanac-dd-btn:focus-visible,
.almanac-dd.is-open .almanac-dd-btn {
  border-color: var(--almanac-forest) !important;
  box-shadow: 0 0 0 4px rgba(244,129,32,.14) !important;
  outline: none;
}
.almanac-dd-label { color: var(--almanac-ink-soft); font-weight: 500; }
.almanac-dd-value { font-weight: 600; }
.almanac-dd-chev {
  color: var(--almanac-ink-soft);
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), color .2s ease;
}
.almanac-dd.is-open .almanac-dd-chev { transform: rotate(180deg); color: var(--almanac-forest); }

.almanac-dd-menu {
  list-style: none;
  margin: 0;
  padding: 6px;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 100%;
  width: max-content;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--almanac-line-strong);
  border-radius: 14px;
  box-shadow: 0 18px 40px -12px rgba(16,24,40,.22), 0 4px 10px -4px rgba(16,24,40,.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.96);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .2s ease, transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s;
}
.almanac-dd.is-open .almanac-dd-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity .2s ease, transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s;
}
.almanac-dd-menu li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: #344054;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: background-color .15s ease, color .15s ease;
}
.almanac-dd.is-open .almanac-dd-menu li {
  animation: almanac-dd-in .3s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--i, 0) * 40ms + 30ms);
}
@keyframes almanac-dd-in { to { opacity: 1; transform: none; } }
.almanac-dd-menu li:hover,
.almanac-dd-menu li.is-active { background: var(--almanac-paper-raised); color: var(--almanac-ink); }
.almanac-dd-menu li.is-selected { background: var(--almanac-tint); color: var(--almanac-forest-ink); font-weight: 600; }
.almanac-dd-tick { opacity: 0; transform: scale(.5); transition: opacity .2s ease, transform .25s cubic-bezier(.2,.8,.2,1); flex-shrink: 0; }
.almanac-dd-menu li.is-selected .almanac-dd-tick { opacity: 1; transform: none; color: var(--almanac-forest); }

@media (prefers-reduced-motion: reduce) {
  .almanac-dd-menu, .almanac-dd-menu li, .almanac-dd-chev { transition: none !important; animation: none !important; }
  .almanac-dd.is-open .almanac-dd-menu li { opacity: 1; transform: none; }
}
@media (max-width: 640px) { .almanac-dd-label { display: none; } }
.almanac-controls { position: relative; z-index: 20; }

/* =========================================================
   Add-event modal: animated open / close
   ========================================================= */
.almanac-modal-overlay.is-open { animation: almanac-ov-in .3s ease both; }
.almanac-modal-overlay.is-open .almanac-modal { animation: almanac-modal-in .55s cubic-bezier(.16, 1, .3, 1) both; }
.almanac-modal-overlay.is-closing { animation: almanac-ov-out .24s ease forwards !important; }
.almanac-modal-overlay.is-closing .almanac-modal { animation: almanac-modal-out .24s cubic-bezier(.4, 0, 1, 1) forwards !important; }

.almanac-modal-overlay.is-open .almanac-modal-head,
.almanac-modal-overlay.is-open .almanac-modal-form > *:not(input[type="hidden"]) {
  animation: almanac-field-in .5s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 38ms + 140ms);
}
.almanac-modal-overlay.is-open .almanac-modal-head { animation-delay: 90ms; }
.almanac-modal-overlay.is-closing .almanac-modal-head,
.almanac-modal-overlay.is-closing .almanac-modal-form > * { animation: none !important; opacity: 1; }

.almanac-modal-close { transition: transform .3s cubic-bezier(.2,.8,.2,1), background-color .2s ease, color .2s ease; }
.almanac-modal-close:hover { transform: rotate(90deg); }

@keyframes almanac-ov-in  { from { opacity: 0; backdrop-filter: blur(0); } to { opacity: 1; backdrop-filter: blur(4px); } }
@keyframes almanac-ov-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes almanac-modal-in  { from { opacity: 0; transform: translateY(36px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes almanac-modal-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes almanac-field-in  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* new-category field slides in */
.almanac-newcat-field:not([hidden]) { animation: almanac-field-in .4s cubic-bezier(.16, 1, .3, 1) both; }

@media (max-width: 600px) {
  .almanac-modal-overlay { align-items: flex-end; padding: 0; }
  .almanac-modal { border-radius: 22px 22px 0 0; max-height: 92vh; }
  @keyframes almanac-modal-in  { from { opacity: 1; transform: translateY(100%); } to { opacity: 1; transform: none; } }
  @keyframes almanac-modal-out { from { transform: none; } to { transform: translateY(100%); } }
}
@media (prefers-reduced-motion: reduce) {
  .almanac-modal-overlay.is-open, .almanac-modal-overlay.is-open * { animation-duration: .01ms !important; animation-delay: 0s !important; }
}
