/* Age-Finder calculators: shared card styles. Colours come from the theme tokens via the --pac-* variables. */
.pac-cal{--c:var(--pac-primary,#0f766e);background:var(--pac-surface,#fff);border:1px solid var(--pac-border,#e2e8ec);border-radius:var(--pac-radius,16px);box-shadow:var(--pac-shadow-sm,0 4px 14px rgb(20 34 45 / .05));padding:clamp(16px,3vw,28px);margin:24px 0;color:var(--pac-text,#17212b)}.pac-cal *{box-sizing:border-box}.pac-cal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px 18px}.pac-field{display:flex;flex-direction:column;gap:6px}.pac-field label,.pac-field .pac-lab{font-weight:600;font-size:.92rem;color:var(--pac-text,#17212b)}.pac-field small{color:var(--pac-text-muted,#7b8992);font-size:.82rem;line-height:1.35}.pac-cal input[type=number],.pac-cal input[type=text],.pac-cal select{width:100%;min-height:46px;padding:10px 12px;border:1px solid var(--pac-border-strong,#d5dfe4);border-radius:var(--pac-radius-sm,10px);background:#fff;font-size:1rem;color:inherit}.pac-cal input:focus,.pac-cal select:focus,.pac-cal button:focus-visible,.pac-cal summary:focus-visible{outline:3px solid rgb(15 118 110 / .35);outline-offset:1px}.pac-weight-row{display:grid;grid-template-columns:1fr 92px;gap:8px}.pac-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.pac-btn{min-height:46px;padding:10px 26px;border:0;border-radius:var(--pac-radius-sm,10px);background:var(--c);color:#fff;font-weight:700;font-size:1rem;cursor:pointer}.pac-btn:hover{background:var(--pac-primary-hover,#0b5f59)}.pac-btn-ghost{background:#fff0;color:var(--c);border:1px solid var(--c)}.pac-btn-ghost:hover{background:var(--pac-primary-soft,#effaf8)}.pac-cal-result{margin-top:20px;padding:18px 20px;border-radius:var(--pac-radius-sm,10px);background:var(--pac-primary-soft,#effaf8);border:1px solid #bfe6e0}.pac-cal-result[hidden],.pac-modules[hidden],[data-adult-only][hidden]{display:none}.pac-cal-result.is-error{background:#fff5f5;border-color:#f0c4c4;color:#8a1f1f}.pac-res-kicker{font-size:.8rem;text-transform:uppercase;letter-spacing:.06em;color:var(--pac-text-secondary,#52616b);font-weight:700}.pac-res-big{font-size:clamp(1.9rem,6vw,2.6rem);font-weight:800;line-height:1.1;color:var(--c);margin:4px 0}.pac-res-big span{font-size:1rem;font-weight:600;color:var(--pac-text-secondary,#52616b)}.pac-res-small{color:var(--pac-text-secondary,#52616b)}.pac-how{margin-top:10px}.pac-how summary{cursor:pointer;font-weight:600;color:var(--c)}.pac-note{margin:12px 0 0;font-size:.9rem;color:var(--pac-text-secondary,#52616b);line-height:1.5}.pac-modules{margin-top:22px;display:grid;gap:12px}.pac-mod{border:1px solid var(--pac-border,#e2e8ec);border-radius:var(--pac-radius-sm,10px);background:var(--pac-surface-muted,#f9fafb)}.pac-mod>summary{padding:12px 16px;font-weight:700;cursor:pointer}.pac-mod-body{padding:2px 16px 16px;display:grid;gap:12px}.pac-out{font-size:.95rem;line-height:1.5}.pac-table-wrap{overflow-x:auto;margin:16px 0;border:1px solid var(--pac-border,#e2e8ec);border-radius:var(--pac-radius-sm,10px);max-height:640px;overflow-y:auto;background:#fff}.pac-table{width:100%;border-collapse:collapse;font-size:.93rem;min-width:520px;margin:0}.pac-table th,.pac-table td{padding:9px 12px;text-align:left;border-bottom:1px solid var(--pac-border,#e2e8ec);vertical-align:top}.pac-table thead th{position:sticky;top:0;background:#f2f6f7;font-weight:700;z-index:1}.pac-table tbody tr:nth-child(even){background:#fafcfc}.pac-table td.num,.pac-table th.num{text-align:right;white-space:nowrap}.pac-table tr.pac-hit,.pac-table tr.pac-hit td{background:#fff3c4!important;outline:2px solid #e2b100;outline-offset:-2px}.pac-table .pac-grp th{background:#e8f3f1;color:var(--pac-primary-hover,#0b5f59);text-align:left}.pac-muted{color:var(--pac-text-muted,#7b8992)}.pac-sources{border-left:4px solid var(--c,#0f766e);background:var(--pac-surface-muted,#f9fafb);padding:14px 18px;border-radius:0 10px 10px 0;margin:24px 0;font-size:.93rem}.pac-sources h2,.pac-sources h3{margin-top:0;font-size:1.1rem}.pac-sources ul{margin:0;padding-left:1.2em}.pac-related{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:18px 0;padding:0;list-style:none}.pac-related li{margin:0}.pac-related a,.pac-card{display:block;padding:14px 16px;border:1px solid var(--pac-border,#e2e8ec);border-radius:var(--pac-radius-sm,10px);background:#fff;text-decoration:none;color:var(--pac-text,#17212b);font-weight:600;height:100%}.pac-related a:hover,.pac-card:hover{border-color:var(--pac-primary,#0f766e);box-shadow:var(--pac-shadow-sm,0 4px 14px rgb(20 34 45 / .05))}.pac-card small{display:block;margin-top:4px;font-weight:400;color:var(--pac-text-secondary,#52616b)}.pac-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px;margin:18px 0}.pac-content-slot:not(:has(*:not(.wp-block-group__inner-container):not(p:empty))){display:none}@media (max-width:520px){.pac-actions .pac-btn{flex:1 1 100%}}
/* --- Card v2 (wireframe, theme v1.2.12). Everything above is the pet
   calorie CSS, unchanged. --- */

/* Wireframe tokens on the card. */
.pac-cal { --c: #14705f; --pac-primary: #14705f; --pac-primary-hover: #0e5a4c; --pac-primary-soft: #e6efea; color: #1a2420; background: #ffffff; border: 1px solid #dde3dc; border-radius: 20px; box-shadow: 0 10px 30px rgba(26, 36, 32, 0.08); padding: clamp(16px, 3vw, 28px); margin: 0 auto 32px; max-width: 670px; }

/* Fields: stacked, 18px apart, first label 20px below the header strip. */
.pac-cal .pac-field + .pac-field { margin-top: 18px; }
.pac-cal .pac-field:first-child { margin-top: 20px; }
.pac-cal .pac-field label { color: #1a2420; }
.pac-cal .pac-muted { color: #5c6f68; }

/* Month/Day/Year row plus a "Show date picker" button. */
.pac-date-row { position: relative; display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.pac-date-row input[type=number] { min-width: 0; min-height: 52px; padding: 10px 12px; border: 1px solid #d5dfe4; border-radius: 10px; background: #f7f3ec; font-size: 1rem; text-align: center; color: inherit; }
.pac-date-row input.pac-m, .pac-date-row input.pac-d { flex: 1 1 56px; }
.pac-date-row input.pac-y { flex: 1.6 1 84px; }
.pac-date-row input[type=number]::-webkit-outer-spin-button, .pac-date-row input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pac-date-row input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.pac-picker-btn { flex: 0 0 auto; min-height: 0; padding: 2px 0; border: 0; border-radius: 0; background: transparent; color: #14705f; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: underline; text-underline-offset: 2px; }
.pac-picker-btn:hover { color: #0e5a4c; background: transparent; }
.pac-date-native { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.pac-date-native-visible { position: static; width: 100%; min-height: 52px; margin-top: 8px; padding: 10px 12px; border: 1px solid #d5dfe4; border-radius: 10px; background: #f7f3ec; opacity: 1; pointer-events: auto; }

/* "Try:" example chips under the fields. */
.pac-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.pac-try-label { font-weight: 600; font-size: 0.92rem; color: #1a2420; }
.pac-chip { min-height: 36px; padding: 6px 14px; border: 1px solid #d5dfe4; border-radius: 999px; background: #ffffff; color: #14705f; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pac-chip:hover { border-color: #14705f; background: #e6efea; }

/* Buttons: Calculate (solid Emerald) + Clear (plain text). */
.pac-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; }
.pac-actions .pac-btn[data-age="calc"], .pac-actions .pac-btn[data-ret="calc"] { flex: 0 0 auto; min-width: 200px; min-height: 52px; }
.pac-btn-clear { background: transparent; border: 0; color: #14705f; min-height: 52px; padding: 10px 4px; font-weight: 600; }
.pac-btn-clear:hover { background: transparent; color: #0e5a4c; }

/* Result box: Sage Mist, Deep Pine kicker and sub lines, Emerald numbers. */
.pac-cal-result { margin-top: 20px; padding: 18px 20px; border-radius: 10px; background: #e6efea; border: 1px solid #c9d6cc; }
.pac-cal-result.is-error { background: #fbefec; border-color: #a63a32; color: #a63a32; }
.pac-res-kicker { color: #0c2e29; }
.pac-res-big { color: #14705f; }
.pac-res-big span { color: #14705f; }
.pac-res-small { color: #0c2e29; }
.pac-cal-result.is-error .pac-res-kicker { color: #a63a32; }
.pac-cal-result.is-error .pac-res-big { color: #a63a32; font-size: 1.15rem; line-height: 1.4; font-weight: 700; }

/* Method line under the result. */
.pac-method { margin: 18px 0 0; font-size: 14px; line-height: 1.5; color: #5c6f68; }

/* Stat chips: white, Emerald numbers, muted labels. */
.pac-age-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.pac-age-stat { background: #ffffff; border: 1px solid #dde3dc; border-radius: 10px; padding: 12px 6px; text-align: center; min-width: 0; }
.pac-age-stat b { display: block; font-size: 1.25rem; color: #14705f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pac-age-stat span { font-size: 0.8rem; color: #5c6f68; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Form controls render in Inter, not the system font. Focus is a visible Emerald outline. */
.pac-cal input, .pac-cal select, .pac-cal button { font-family: inherit; }
.pac-cal input:focus, .pac-cal select:focus, .pac-cal button:focus-visible, .pac-cal summary:focus-visible { outline: 3px solid rgb(20 112 95 / .35); outline-offset: 1px; }

/* Phones: buttons stack, Calculate full-width, Clear left-aligned.
   Stat numbers shrink and never truncate. */
@media (max-width: 520px) {
  .pac-actions { flex-direction: column; align-items: stretch; }
  .pac-actions .pac-btn[data-age="calc"], .pac-actions .pac-btn[data-ret="calc"] { flex: 1 1 auto; }
  .pac-actions .pac-btn-clear { flex: 0 0 auto; align-self: flex-start; }
  .pac-age-stats { gap: 6px; }
  .pac-age-stat { padding: 10px 4px; }
  .pac-age-stat b { font-size: 0.95rem; white-space: normal; overflow: visible; text-overflow: clip; }
  .pac-age-stat span { white-space: normal; line-height: 1.3; overflow: visible; text-overflow: clip; }
}

/* Header strip (standalone pages): the title and sub sit inside .pac-cal
   on a dark-pine strip, ~82px tall, with the gold family pill at the
   right. The strip bleeds to the card edges with negative margins equal
   to the card padding. */
.pac-cal.pac-cal--standalone .af-calc-head { margin: calc(-1 * clamp(16px, 3vw, 28px)) calc(-1 * clamp(16px, 3vw, 28px)) 0; padding: 12px clamp(16px, 3vw, 28px) 12px; background: #0c2e29; border-radius: 20px 20px 0 0; display: flex; align-items: center; gap: 16px; }
.pac-cal.pac-cal--standalone .af-calc-head-text { flex: 1; min-width: 0; }
.pac-cal.pac-cal--standalone .af-calc-title { margin: 0; padding: 0; background: transparent; color: #ffffff; font-family: Fraunces, Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 700; line-height: 1.3; }
.pac-cal.pac-cal--standalone .af-calc-sub { margin: 2px 0 0; padding: 0; background: transparent; color: #cfd8d3; font-size: 15px; line-height: 1.45; }
.pac-cal.pac-cal--standalone .af-calc-pill { flex-shrink: 0; padding: 5px 12px; border-radius: 999px; background: #c5a253; color: #1a2420; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

/* ---- Foolproof date fields (built by calc-core.js) ---- */
.pac-cal.afd-ready .pac-date-row { display: block; }
.pac-cal .afd { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; }
.pac-cal .afd-part { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; font-size: 13px; font-weight: 600; color: #3f504a; }
.pac-cal .afd-part select,
.pac-cal .afd-part input { width: 100%; min-width: 0; box-sizing: border-box; min-height: 52px; padding: 0 10px; border: 2px solid #c9d6cc; border-radius: 10px; background: #f7f3ec; color: #1a2420; font-size: 17px; font-family: inherit; }
.pac-cal .afd-part input { padding: 0 12px; }
.pac-cal .afd-part select:focus,
.pac-cal .afd-part input:focus { outline: 3px solid #c5a253; outline-offset: 1px; border-color: #14705f; }
.pac-cal .afd-invalid { border-color: #a63a32 !important; background: #fbefec !important; }
.pac-cal .afd-error { margin: 8px 0 0; color: #a63a32; font-size: 14px; font-weight: 600; }
.pac-cal .afd-note { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: #f1e7c9; color: #5a4614; font-size: 14px; }
.pac-cal .afd-summary { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid #e8b7b0; background: #fbefec; color: #8a2f28; font-size: 14px; font-weight: 700; }

/* ---- Result tools (built by calc-core.js) ---- */
.pac-cal .afr-tools { margin-top: 16px; padding-top: 16px; border-top: 1px solid #dde3dc; }
.pac-cal .afr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pac-cal .afr-actions button { flex: 1 1 140px; min-height: 48px; border-radius: 12px; font-weight: 700; font-size: 15px; font-family: inherit; cursor: pointer; }
.pac-cal .afr-copy { border: 1px solid #14705f; background: #ffffff; color: #0e5a4c; }
.pac-cal .afr-again { border: 0; background: #14705f; color: #ffffff; }
.pac-cal .afr-next-title { margin: 16px 0 8px; font-size: 14px; font-weight: 700; color: #1a2420; }
.pac-cal .afr-next { display: flex; flex-wrap: wrap; gap: 8px; }
.pac-cal .afr-next-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: #f1e7c9; color: #0c2e29; font-size: 14px; font-weight: 600; text-decoration: none; }
.pac-cal .afr-next-link:hover { background: #e9d9a8; }
.pac-cal .afr-tools[hidden] { display: none; }

/* ---- Wide two-pane layout (homepage): form left, result right ---- */
.pac-cal--wide .pac-panes { display: flex; flex-direction: column; }
.pac-cal--wide .pac-pane-form,
.pac-cal--wide .pac-pane-result { min-width: 0; }
.pac-cal--wide .pac-pane-result { display: flex; flex-direction: column; margin: 16px calc(-1 * clamp(16px, 3vw, 28px)) calc(-1 * clamp(16px, 3vw, 28px)); padding: clamp(16px, 3vw, 28px); background: #f7f3ec; border-top: 1px solid #dde3dc; }
.pac-cal--wide .pac-pane-result > [data-af-result] { margin: 0; }
.pac-cal--wide .pac-placeholder { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px 20px; border: 2px dashed #c9d6cc; border-radius: 14px; text-align: center; }
.pac-cal--wide [data-af-result]:not([hidden]) ~ .pac-placeholder { display: none; }
.pac-placeholder-icon { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 16px; background: #e6efea; color: #14705f; }
.pac-placeholder-title { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 21px; color: #0c2e29; }
.pac-placeholder-text { margin: 0; max-width: 320px; color: #5c6f68; font-size: 15px; line-height: 1.5; }
@media (min-width: 901px) {
  .pac-cal--wide .pac-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .pac-cal--wide .pac-pane-form { padding-right: clamp(16px, 3vw, 28px); }
  .pac-cal--wide .pac-pane-result { margin: calc(-1 * clamp(16px, 3vw, 28px)) calc(-1 * clamp(16px, 3vw, 28px)) calc(-1 * clamp(16px, 3vw, 28px)) 0; min-height: 470px; border-top: 0; border-left: 1px solid #dde3dc; }
  .pac-cal--wide.pac-cal--standalone .af-calc-head { margin-bottom: clamp(16px, 3vw, 28px); }
}

/* ---- Optional date fields fold away ---- */
.pac-cal .afd-fold { border-top: 1px solid #eef1ed; }
.pac-cal .afd-fold-summary { display: flex; align-items: center; min-height: 44px; color: #0e5a4c; font-weight: 600; font-size: 15px; cursor: pointer; }
.pac-cal .afd-fold[open] .afd-fold-summary { margin-bottom: 6px; }
.pac-cal .afd-fold .pac-field > label:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* ---- Share button ---- */
.pac-cal .afr-share { border: 1px solid #14705f; background: #ffffff; color: #0e5a4c; }

/* ---- Share dialog ---- */
.afs[hidden] { display: none; }
.afs { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif; }
.afs-backdrop { position: absolute; inset: 0; background: rgba(12, 46, 41, 0.6); }
.afs-panel { position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; box-sizing: border-box; padding: 20px; background: #ffffff; border-radius: 20px 20px 0 0; box-shadow: 0 -8px 40px rgba(12, 46, 41, 0.3); }
.afs-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.afs-title { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 22px; color: #0c2e29; }
.afs-x { width: 44px; height: 44px; border: 0; border-radius: 10px; background: #f7f3ec; color: #1a2420; font-size: 26px; line-height: 1; cursor: pointer; }
.afs-preview { overflow: hidden; border-radius: 14px; border: 1px solid #dde3dc; background: #0c2e29; }
.afs-img { display: block; width: 100%; height: auto; }
.afs-fallback { aspect-ratio: 1 / 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 28px; box-sizing: border-box; color: #ffffff; }
.afs-fb-title { margin: 0; color: #c5a253; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.afs-fb-big { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 34px; line-height: 1.15; }
.afs-fb-line { margin: 0; color: #cfd8d3; font-size: 15px; }
.afs-fb-url { margin: 12px 0 0; color: #c5a253; font-weight: 700; font-size: 14px; }
.afs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.afs-btn { flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 14px; border: 1px solid #14705f; border-radius: 12px; background: #ffffff; color: #0e5a4c; font-weight: 700; font-size: 15px; font-family: inherit; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.afs-btn.afs-native { background: #14705f; color: #ffffff; border-color: #14705f; }
.afs-btn[hidden] { display: none; }
.afs-social { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.afs-soc { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px; background: #e6efea; color: #0c2e29; font-weight: 700; font-size: 15px; text-decoration: none; }
.afs-soc:hover, .afs-btn:hover { filter: brightness(0.96); }
.afs-privacy { margin: 12px 0 0; color: #5c6f68; font-size: 13px; text-align: center; }
.afs a:focus-visible, .afs button:focus-visible { outline: 3px solid #c5a253; outline-offset: 2px; }
html.afs-open { overflow: hidden; }
@media (min-width: 641px) {
  .afs { align-items: center; padding: 24px; }
  .afs-panel { border-radius: 20px; }
}

/* ---- Flip card (homepage hero): form front, result back, same footprint ---- */
.pac-cal--flip .pac-flip { perspective: 1600px; }
.pac-cal--flip .pac-flip-inner { display: grid; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pac-cal--flip .pac-face { grid-area: 1 / 1; min-width: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.pac-cal--flip .pac-face--back { transform: rotateY(180deg); display: flex; flex-direction: column; justify-content: center; }
.pac-cal--flip .pac-flip.is-flipped .pac-flip-inner { transform: rotateY(180deg); }
.pac-cal--flip .pac-face--back [data-af-result] { margin: 0; outline: none; }
.pac-cal--flip .pac-face[aria-hidden="true"] { pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .pac-cal--flip .pac-flip-inner { transition: none; }
}

/* Flip card back: the card is the frame, so the result drops its inner box
   and tightens slightly to fit the same footprint as the form. */
.pac-cal--flip .pac-face--back .pac-cal-result { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.pac-cal--flip .pac-face--back .pac-res-kicker { margin-bottom: 2px; }
.pac-cal--flip .pac-face--back .pac-res-small { margin-top: 6px; margin-bottom: 0; font-size: 15px; line-height: 1.45; }
.pac-cal--flip .pac-face--back .pac-age-stats { margin-top: 10px; gap: 8px; }
.pac-cal--flip .pac-face--back .pac-age-stat { padding: 8px 6px; }
.pac-cal--flip .pac-face--back .afr-tools { margin-top: 12px; padding-top: 12px; }
.pac-cal--flip .pac-face--back .afr-actions button { min-height: 46px; }

/* Flip card: never wider than its column, and each face is switched fully
   on or off at the midpoint of the turn (when the card is edge-on), so the
   reverse side can never show through in any browser. */
.pac-cal--flip .pac-flip-inner { grid-template-columns: minmax(0, 1fr); }
.pac-cal--flip .pac-face--front { visibility: visible; transition: visibility 0s linear 0.3s; }
.pac-cal--flip .pac-face--back { visibility: hidden; transition: visibility 0s linear 0.3s; }
.pac-cal--flip .pac-flip.is-flipped .pac-face--front { visibility: hidden; }
.pac-cal--flip .pac-flip.is-flipped .pac-face--back { visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  .pac-cal--flip .pac-face--front,
  .pac-cal--flip .pac-face--back { transition: none; }
}
/* Symmetric easing: the card is exactly edge-on at the halfway time (0.3s),
   which is when the faces swap. */
.pac-cal--flip .pac-flip-inner { transition: transform 0.6s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .pac-cal--flip .pac-flip-inner { transition: none; } }

/* ---- Batch 1 form elements: operation select, amount boxes, checkbox ---- */
.pac-cal .pac-field-label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 15px; color: #1a2420; }
.pac-cal .pac-select,
.pac-cal .pac-amt { width: 100%; min-width: 0; box-sizing: border-box; min-height: 52px; padding: 0 12px; border: 2px solid #c9d6cc; border-radius: 10px; background: #f7f3ec; color: #1a2420; font-size: 17px; font-family: inherit; }
.pac-cal .pac-select:focus,
.pac-cal .pac-amt:focus { outline: 3px solid #c5a253; outline-offset: 1px; border-color: #14705f; }
.pac-cal .pac-amt-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pac-cal .pac-amt-part { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; font-size: 13px; font-weight: 600; color: #3f504a; }
.pac-cal .pac-check-label { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 500; color: #1a2420; cursor: pointer; }
.pac-cal .pac-check-label input { flex-shrink: 0; width: 22px; height: 22px; margin: 1px 0 0; accent-color: #14705f; }
.pac-cal .pac-res-note { padding: 8px 12px; border-radius: 8px; background: #f1e7c9; color: #5a4614; font-size: 14px; }
@media (max-width: 380px) { .pac-cal .pac-amt-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Batch 2: stat grid, moon, life-in-weeks grid, milestones ---- */
.pac-cal .pac-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pac-cal .pac-res-fine { color: #5c6f68; font-size: 13px; }
.pac-cal .pac-moon-row { display: flex; align-items: center; gap: 16px; }
.pac-cal .pac-moon { flex-shrink: 0; width: 76px; height: 76px; }
.pac-cal .pac-week-grid-wrap { margin-top: 12px; overflow: hidden; }
.pac-cal .pac-week-grid { display: block; max-width: 100%; }
.pac-cal .pac-grid-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: #5c6f68; }
.pac-cal .pac-key-lived, .pac-cal .pac-key-left { display: inline-block; width: 12px; height: 12px; border-radius: 2px; background: #14705f; }
.pac-cal .pac-key-left { background: #e3e8e3; margin-left: 8px; }
.pac-cal .pac-milestones { margin-top: 14px; }
.pac-cal .pac-milestones-title { margin: 0 0 8px; font-weight: 700; font-size: 15px; color: #1a2420; }
.pac-cal .pac-milestones-list { margin: 0; padding: 0; list-style: none; border: 1px solid #dde3dc; border-radius: 12px; overflow: hidden; background: #ffffff; }
.pac-cal .pac-milestones-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: center; padding: 9px 12px; border-top: 1px solid #eef1ed; font-size: 14px; }
.pac-cal .pac-milestones-list li:first-child { border-top: 0; }
.pac-cal .pac-ms-name { font-weight: 700; }
.pac-cal .pac-ms-when { padding: 2px 10px; border-radius: 999px; background: #f1e7c9; color: #5a4614; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pac-cal .pac-ms-when.is-done { background: #e6efea; color: #0e5a4c; }
@media (max-width: 480px) {
  .pac-cal .pac-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pac-cal .pac-milestones-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .pac-cal .pac-ms-date { grid-column: 1 / -1; grid-row: 2; color: #5c6f68; font-size: 13px; }
}

/* ---- Batch 3: calendar converter fields ---- */
.pac-cal .pac-cal-other { border: 0; margin: 0; padding: 0; min-width: 0; }
.pac-cal .pac-cal-other legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 15px; color: #1a2420; }
.pac-cal .pac-other-row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; }
.pac-cal .pac-other-msg { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: #f1e7c9; color: #5a4614; font-size: 14px; }
.pac-cal .pac-res-native { font-size: 18px; color: #0c2e29; }

/* ---- Homepage category tiles: three per row on desktop, with any shorter
   last row centred (5 = 3 + 2, 6 = 3 + 3, 7 = 3 + 3 + 1). A six-track grid
   lets each tile span two tracks, so a row of two or one can sit centred.
   Two per row on tablets, one on phones. ---- */
@media (min-width: 1025px) {
  .af-site .af-family-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .af-site .af-family-tiles > * { grid-column: span 2; }
  .af-site .af-family-tiles > :nth-last-child(2):nth-child(3n+1) { grid-column: 2 / span 2; }
  .af-site .af-family-tiles > :nth-last-child(2):nth-child(3n+1) + * { grid-column: 4 / span 2; }
  .af-site .af-family-tiles > :last-child:nth-child(3n+1) { grid-column: 3 / span 2; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .af-site .af-family-tiles > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---- Batches 4-5: holiday picker, cut-off row, Easter list, comparison text ---- */
.pac-cal .pac-hol-add { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr) auto; gap: 8px; }
.pac-cal .pac-hol-btn { min-height: 52px; }
.pac-cal .pac-hol-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.pac-cal .pac-hol-list li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: #e6efea; font-size: 14px; }
.pac-cal .pac-hol-x { border: 0; background: #ffffff; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; color: #0e5a4c; cursor: pointer; }
.pac-cal .pac-cut-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; }
.pac-cal .pac-ed-list { margin: 10px 0 0; padding: 0; list-style: none; border: 1px solid #dde3dc; border-radius: 12px; background: #ffffff; }
.pac-cal .pac-ed-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid #eef1ed; font-size: 14px; }
.pac-cal .pac-ed-list li:first-child { border-top: 0; }
.pac-cal .pac-ed-list li span:first-child { font-weight: 700; }
.pac-cal [data-age="compare"] .pac-ms-when { white-space: normal; border-radius: 10px; }
@media (max-width: 480px) { .pac-cal .pac-hol-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---- 2.1.0: inline result lists, age-to-birth-date finder, live seconds ---- */
.pac-cal .pac-inline-list { margin-top: 12px; }
.pac-cal .pac-reverse { margin-top: 14px; padding-top: 10px; border-top: 1px solid #eef1ed; }
.pac-cal .pac-reverse summary { display: flex; align-items: center; min-height: 44px; color: #0e5a4c; font-weight: 700; font-size: 15px; cursor: pointer; }
.pac-cal .pac-reverse-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 8px; }
.pac-cal .pac-reverse-out { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #e6efea; color: #0c2e29; }
.pac-cal .pac-live { margin-top: 14px; }

/* ---- 2.2.0: textarea, biorhythm chart ---- */
.pac-cal .pac-textarea { min-height: 150px; padding: 12px; line-height: 1.5; resize: vertical; }
.pac-cal .pac-field-help { margin: 6px 0 0; color: #5c6f68; font-size: 13px; }
.pac-cal .pac-bio-chart { display: block; width: 100%; max-width: 520px; height: auto; margin: 12px 0 4px; background: #ffffff; border: 1px solid #dde3dc; border-radius: 10px; }
.pac-cal .pac-key { display: inline-block; width: 14px; height: 4px; border-radius: 2px; vertical-align: middle; margin-left: 6px; }
.pac-cal .pac-key-phy { background: #14705f; } .pac-cal .pac-key-emo { background: #c5a253; } .pac-cal .pac-key-int { background: #5a6fb0; }

/* Share dialog: the text-only card is a fallback for browsers that cannot draw
   the image; once the image is ready, only the square image shows. */
.afs .afs-fallback[hidden], .afs .afs-img[hidden] { display: none !important; }
.afs .afs-img { aspect-ratio: 1 / 1; object-fit: contain; }

/* ---- 2.5.0: copy button, live counter, extra result lists ---- */
.pac-cal .afr-copy { min-height: 44px; padding: 0 16px; border: 1.5px solid var(--afc-green, #14705f); border-radius: 999px; background: #ffffff; color: #14705f; font-weight: 700; cursor: pointer; }
.pac-cal .afc-live { display: block; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #0c2e29; color: #ffffff; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.pac-cal .afc-extra { margin-top: 12px; }
.pac-cal .afc-extra p { margin: 6px 0; }
.pac-cal .afc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pac-cal .afc-table th, .pac-cal .afc-table td { padding: 6px 8px; border-top: 1px solid #e3e8e3; text-align: left; }
.pac-cal .afc-scroll { max-height: 320px; overflow: auto; border: 1px solid #dde3dc; border-radius: 10px; background: #ffffff; }
.pac-cal .afc-hp { min-height: 40px; padding: 0 14px; border: 1.5px solid #14705f; border-radius: 999px; background: #ffffff; color: #14705f; font-size: 14px; font-weight: 700; cursor: pointer; }
