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

:root {
  --ink:   #0d0d0d;
  --ink-2: #3a3a3a;
  --ink-3: #888888;
  --ink-4: #c0c0c0;
  --rule:  rgba(0,0,0,0.07);
}

body {
  background-color: #e8edf5;
  background-image: linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── TOPBAR ── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0.5rem;
}
.brand { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; text-decoration: none; }
.nav { display: flex; gap: 0.5rem; }
.nav a {
  font-size: 13px; font-weight: 600; color: var(--ink);
  text-decoration: none;
  background: rgba(255,255,255,0.6);
  padding: 6px 14px; border-radius: 20px;
}
.nav a:hover { background: rgba(255,255,255,0.9); }

/* ── CARD — bianca con bordo colorato spesso ── */
.card {
  background: #ffffff;
  border-radius: 20px;
  border: 3px solid #e0e0e0;
  padding: 1.25rem 1.25rem;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Bordi colorati */
.border-blue   { border-color: #a8c8f0; }
.border-yellow { border-color: #f0d878; }
.border-green  { border-color: #8ecfa0; }
.border-purple { border-color: #c8a0e8; }
.border-peach  { border-color: #f0a888; }
.border-mint   { border-color: #7dd8c0; }
.border-rose   { border-color: #f08098; }
.border-sage   { border-color: #98c890; }
.border-lilac  { border-color: #b0a0e0; box-shadow: 0 2px 12px rgba(176,160,224,0.35); }
.border-sand   { border-color: #e0c888; }

.card-title svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ── RESET HEADINGS ── */
h1.date-left { margin: 0; }

/* ── CARD HEADER ── */
.card-title-date { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--ink-4); letter-spacing: 0.02em; }
.card-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-top: 0;
  margin-bottom: 0.875rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-title-left { display: flex; align-items: center; gap: 0.5rem; }
.card-ico  { font-size: 20px; }
.card-date { font-size: 11px; font-weight: 500; color: var(--ink-4); }

/* ── HEADER DATA ── */
.date-card {
  background: #ffffff;
  border-radius: 20px;
  border: 3px solid #a8c8f0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 0.75rem 1.25rem 1.25rem;
}
.date-top {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0;
}
.date-left {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
}
.date-right {
  text-align: right;
  align-self: flex-start;
  padding-top: 0;
}
.date-main-left {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
  line-height: 1;
  width: 100%;
}
.date-num {
  font-size: clamp(5rem, 28vw, 9rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.04em;
}
.date-month-stack {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.4em;
  flex: 1;
}
.date-month { font-size: clamp(2rem, 9vw, 3.2rem); font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1; }
.date-right { position: absolute; right: 0; top: 0.75rem; text-align: right; }
.date-year  { font-size: 20px; font-weight: 800; color: var(--ink); display: block; letter-spacing: -0.02em; }
.date-wd    { font-size: 16px; font-weight: 400; color: var(--ink-3); display: block; margin-top: 2px; }
.date-meta  { font-size: 12px; color: var(--ink-4); margin-top: 0.4rem; margin-bottom: 0.5rem; }
.eph {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.eph-item {
  background: #f5f5f5;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eph-icon { flex-shrink: 0; color: var(--ink-3); }
.eph-lbl { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); display: block; margin-bottom: 4px; }
.eph-val { font-size: 15px; font-weight: 700; color: var(--ink); display: block; }
.eph-item:nth-child(n+3) .eph-val { font-size: 13px; }

/* ── NAV ── */
.day-nav {
  background: rgba(255,255,255,0.5);
  border-radius: 14px;
  padding: 0.625rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.day-nav a { font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; }
.day-nav-mid { font-size: 12px; font-weight: 500; color: var(--ink-3); }

/* ── RIGHE PERSONE ── */
.row {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}
.row:first-child { padding-top: 0; }
.row:last-child  { border-bottom: none; padding-bottom: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-green  { background: #22c55e; }
.dot-purple { background: #a855f7; }
.row-name  { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 1px; letter-spacing: -0.01em; }
.row-desc  { font-size: 14px; color: var(--ink-3); }
.row-year  { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ink-4); flex-shrink: 0; }

/* ── SANTI ── */
.santo { padding: 0.65rem 0; border-bottom: 1px solid var(--rule); }
.santo:first-child { padding-top: 0; }
.santo:last-child  { border-bottom: none; padding-bottom: 0; }
.santo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 3px; }
.santo-name { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.santo-year { font-size: 12px; font-weight: 500; color: var(--ink-4); flex-shrink: 0; }
.santo-desc { font-size: 14px; color: var(--ink-3); line-height: 1.5; }

/* ── ONOMASTICI ── */
.onomastici { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.6; letter-spacing: -0.01em; }
.sep { color: var(--ink); font-weight: 400; }

/* ── GIORNATE ── */
.gi-item { padding: 0.65rem 0; border-bottom: 1px solid var(--rule); }
.gi-item:first-child { padding-top: 0; }
.gi-item:last-child  { border-bottom: none; padding-bottom: 0; }
.gi-org   { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 5px; display: inline-block; }
.gi-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 3px; letter-spacing: -0.01em; }
.gi-body  { font-size: 14px; color: var(--ink-3); line-height: 1.5; }

/* ── EVENTI ── */
.event { display: grid; grid-template-columns: 44px 1fr; gap: 0.875rem; padding: 0.65rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.event:first-child { padding-top: 0; }
.event:last-child  { border-bottom: none; padding-bottom: 0; }
.event-year { font-size: 12px; font-weight: 700; color: #3b82f6; font-variant-numeric: tabular-nums; }
.event-text { font-size: 14px; color: var(--ink-2); line-height: 1.6; }

/* ── CITAZIONE ── */
.quote-text { font-size: 16px; font-weight: 700; font-style: italic; color: var(--ink); line-height: 1.6; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.quote-by   { font-size: 14px; font-weight: 500; color: var(--ink-4); }

/* ── ITEM ── */
.item-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 8px;
}
.border-blue   .item-badge, .border-blue   .gi-org { background:#d8ecff; color:#1a5ca0; border-radius:6px; padding:3px 9px; }
.border-yellow .item-badge, .border-yellow .gi-org { background:#faeea0; color:#8a7000; border-radius:6px; padding:3px 9px; }
.border-mint   .item-badge, .border-mint   .gi-org { background:#b8f0e0; color:#0a6e50; border-radius:6px; padding:3px 9px; display:inline-block; margin-bottom:5px; }
.border-green  .item-badge, .border-green  .gi-org { background:#c8ecd0; color:#1a6e30; border-radius:6px; padding:3px 9px; }
.border-purple .item-badge, .border-purple .gi-org { background:#e8c8f8; color:#6a20a0; border-radius:6px; padding:3px 9px; }
.border-sand   .item-badge, .border-sand   .gi-org { background:#f0dfa0; color:#7a5e00; border-radius:6px; padding:3px 9px; }
.border-peach  .item-badge, .border-peach  .gi-org { background:#fcd0b0; color:#9a3800; border-radius:6px; padding:3px 9px; }
.border-lilac  .item-badge, .border-lilac  .gi-org { background:#d8c8f8; color:#5030b0; border-radius:6px; padding:3px 9px; }
.border-sage   .item-badge, .border-sage   .gi-org { background:#c8e8c0; color:#2a6e20; border-radius:6px; padding:3px 9px; }

.border-blue   .event-year { color: #1a5ca0; }
.border-sand   .event-year { color: #7a5e00; }
.border-green  .dot-green  { background: #8ecfa0; }
.border-purple .dot-purple { background: #c8a0e8; }

.item-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 6px; line-height: 1.25; letter-spacing: -0.02em; }
.item-body  { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.item-meta  { font-size: 12px; font-weight: 500; color: var(--ink-4); margin-top: 8px; }

/* ── ZODIACO ── */
.zodiac-main { display: flex; flex-direction: column; gap: 0.875rem; }
.zodiac-top { display: flex; gap: 1rem; align-items: flex-start; }
.zodiac-icon { flex-shrink: 0; color: var(--ink-3); }
.zodiac-name { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; margin-bottom: 2px; }
.zodiac-dates { font-size: 12px; color: var(--ink-4); margin-bottom: 0.5rem; }
.zodiac-props { display: flex; flex-wrap: wrap; gap: 6px; }
.zodiac-desc { font-size: 14px; color: var(--ink-2); line-height: 1.7; }

/* ── RICETTA ── */
.recipe-section-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 0.5rem; }
.recipe-ingredients { list-style: none; padding: 0; margin: 0; }
.recipe-ingredients li { font-size: 14px; color: var(--ink-2); padding: 0.35rem 0; border-bottom: 1px solid var(--rule); line-height: 1.4; }
.recipe-ingredients li:last-child { border-bottom: none; }
.recipe-ingredients li::before { content: "·"; margin-right: 0.5rem; color: var(--ink-4); }

/* ── FOOTER ── */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.25rem 0.5rem 4rem;
}
.footer-brand { font-size: 12px; font-weight: 700; color: #000; }
.footer-date  { font-size: 12px; font-weight: 500; color: #000; }

/* ── SHARE BUTTON ── */
.share-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 12px; font-weight: 600; color: #000;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: inherit;
}
.share-btn:hover { opacity: 0.6; }

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }


/* ── UTILITÀ RESPONSIVE ── */
.solo-desktop { display: none; }
@media (min-width: 860px) {
  .solo-desktop { display: block; }
  .solo-mobile  { display: none; }
}

/* ── COLONNE ── */
.colonna-sinistra,
.colonna-destra {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── LAYOUT DUE COLONNE (desktop) ── */
@media (min-width: 860px) {
  .page {
    max-width: 980px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    align-items: start;
    gap: 1rem;
  }

  .topbar {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .colonna-sinistra {
    grid-column: 1;
    grid-row: 2;
  }

  .colonna-destra {
    grid-column: 2;
    grid-row: 2;
  }

  .footer {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

/* ── PRIVACY PAGE ── */
.page.privacy-page {
  max-width: 680px;
}

@media (min-width: 860px) {
  .page.privacy-page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 680px;
  }
}


.privacy-section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.privacy-section h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.6rem;
}
.privacy-section p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}
.privacy-section p:last-child { margin-bottom: 0; }
.privacy-section ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}
.privacy-section ul li {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}
.privacy-section ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--ink-4);
}
.privacy-section a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.privacy-date {
  font-size: 12px !important;
  color: var(--ink-4) !important;
  margin-top: 1rem !important;
}
