/* cats.billubnb.in (1.49.0) — a cat's profile page + the index. Tokens from tokens.css; Caveat (Google Fonts) only for the handwritten bits. */
@layer sections {
  .script { font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive; font-weight: 700; font-size: 1.22em; line-height: 1; letter-spacing: .01em; }
  .catp-draft { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: .55rem 1rem; text-align: center; background: var(--sun-soft, #FFE9B5); font-weight: 700; font-size: .92rem; }
  .catp-hero { background: linear-gradient(180deg, var(--paper-2, #FBEBD3), var(--paper, #FFF8EE)); padding: clamp(1.4rem, 4vw, 3rem) 0 clamp(1rem, 3vw, 2rem); }
  .catp-hero__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.2rem, 4vw, 3rem); align-items: center; }
  .catp-kicker { margin: 0 0 .4rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; color: var(--amber, #9A5200); }
  .catp-kicker .script { text-transform: none; letter-spacing: 0; font-size: 1.45rem; color: var(--ink); margin-left: .15rem; }
  .catp-name { margin: 0; font-size: clamp(3rem, 9vw, 5.6rem); line-height: .95; }
  .catp-tagline { margin: .7rem 0 0; font-size: clamp(1.08rem, 2vw, 1.3rem); color: var(--ink-2); max-width: 34ch; }
  .catp-chips { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .45rem; }
  .catp-chip { padding: .3rem .8rem; border-radius: 99px; background: var(--paper-3, #FFFDF8); border: 1px solid var(--line, #EAD9C2); font-weight: 700; font-size: .9rem; }
  .catp-chip--fact { text-transform: capitalize; }
  .catp-chip--trait { background: var(--deep, #1F4A40); border-color: var(--deep, #1F4A40); color: var(--on-deep, #FFF8EE); }

  /* the gallery: 1 photo = one arch; 2–5 = a mosaic; none = the drawn cats */
  .catp-gallery { display: grid; gap: .55rem; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: clamp(70px, 9vw, 120px); }
  .catp-g { position: relative; margin: 0; overflow: hidden; border-radius: 18px; background: var(--paper-2) center / cover no-repeat; grid-column: span 2; grid-row: span 2; }
  .catp-g img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .catp-g--1 { grid-column: span 4; grid-row: span 4; border-radius: 999px 999px 22px 22px; }
  .catp-gallery[data-count="1"] .catp-g--1 { grid-column: 2 / span 4; }
  .catp-gallery[data-count="2"] .catp-g--2 { grid-row: span 4; }
  .catp-gallery[data-count="3"] .catp-g--2, .catp-gallery[data-count="3"] .catp-g--3 { grid-row: span 2; }
  .catp-gallery[data-count="4"] .catp-g--4, .catp-gallery[data-count="5"] .catp-g--4, .catp-gallery[data-count="5"] .catp-g--5 { grid-column: span 2; grid-row: span 1; }
  .catp-gallery[data-count="4"] .catp-g--4 { grid-column: 5 / span 2; }
  .catp-g__more { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(42 29 20 / .45); color: #fff; font-weight: 800; font-size: 1.4rem; }
  .catp-g--mono { grid-column: 1 / -1; grid-row: span 4; display: grid; place-items: center; background: none; border-radius: 0; }
  .catp-mono { position: relative; font-family: var(--font-display, "Fraunces"), serif; font-weight: 800; font-size: clamp(7rem, 16vw, 12rem); line-height: 1; color: var(--ink); }
  .catp-paws { position: absolute; right: 14%; bottom: 10%; display: flex; gap: .4rem; transform: rotate(-12deg); }
  .catp-paws .i { width: 1.4rem; height: 1.4rem; color: var(--amber, #9A5200); opacity: .75; } .catp-paws .i:nth-child(2) { margin-top: -1rem; } .catp-paws .i:nth-child(3) { margin-top: -2rem; }
  .catp-g--drawn { grid-column: 1 / -1; grid-row: span 4; display: flex; align-items: flex-end; justify-content: center; background: none; border-radius: 0; }
  .catp-g--drawn svg { width: min(46%, 220px); height: auto; position: relative; } .catp-g--drawn svg + svg { width: min(38%, 180px); margin-left: -6%; }
  .catp-blob { position: absolute; inset: 12% 8% 0; border-radius: 48% 52% 44% 56% / 58% 50% 50% 42%; background: var(--sun, #F7B733); opacity: .55; }

  .catp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: clamp(1.4rem, 4vw, 3rem); padding-top: clamp(1.2rem, 3vw, 2rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); align-items: start; }
  .catp-main { display: grid; gap: clamp(1.4rem, 3vw, 2.2rem); min-width: 0; }
  .catp-note { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.15rem; border-radius: 18px; background: var(--sun-soft, #FFE9B5); border: 1.5px dashed var(--amber, #9A5200); }
  .catp-note p { margin: 0; line-height: 1.45; }
  .catp-note a { font-weight: 800; color: var(--ink); white-space: nowrap; }
  .catp-note a .i { display: inline-block; width: 1em; height: 1em; vertical-align: -.12em; }
  .catp-note__ic { flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--paper-3, #FFFDF8); color: #B3261E; }
  .catp-sec h2, .catp-secret__k, .catp-sponsor h2 { margin: 0 0 .6rem; font-size: clamp(1.45rem, 3vw, 1.9rem); }
  .catp-summary { margin: 0; font-size: clamp(1.08rem, 1.8vw, 1.22rem); line-height: 1.65; }
  .catp-summary mark { background: linear-gradient(transparent 55%, var(--sun-soft, #FFE9B5) 55%); color: inherit; padding: 0 .1em; font-weight: 700; }
  .catp-photo { margin: 0; }
  .catp-photo img { width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: 22px; display: block; }
  .catp-photo figcaption { margin-top: .45rem; text-align: center; color: var(--ink-2); font-size: 1.5rem; }
  .catp-loves { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
  .catp-loves li { display: flex; gap: .65rem; align-items: center; padding: .7rem .85rem; border-radius: 16px; background: var(--paper-3, #FFFDF8); border: 1px solid var(--line, #EAD9C2); font-weight: 700; line-height: 1.3; }
  .catp-loves .pebble { flex: 0 0 auto; width: 34px; height: 34px; color: #B3261E; }
  .catp-secret { display: grid; gap: 1rem; padding: clamp(1.1rem, 3vw, 1.6rem); border-radius: 22px; background: var(--deep, #1F4A40); color: var(--on-deep, #FFF8EE); }
  .catp-secret.has-photo { grid-template-columns: minmax(0, 1fr) minmax(160px, 240px); align-items: center; }
  .catp-secret__k { color: var(--sun, #F7B733); }
  .catp-secret__t { margin: 0; font-family: var(--font-display, "Fraunces"), serif; font-size: clamp(1.2rem, 2.4vw, 1.5rem); line-height: 1.4; }
  .catp-secret__ph { margin: 0; } .catp-secret__ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 999px 999px 18px 18px; display: block; }
  .catp-stays { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; } .catp-stays .script { font-size: 1.5rem; }
  .catp-sponsor { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: center; justify-content: space-between; padding: clamp(1.1rem, 3vw, 1.5rem);
    border-radius: 22px; background: var(--paper-2, #FBEBD3); }
  .catp-sponsor > div { flex: 1 1 280px; } .catp-sponsor p { margin: 0; color: var(--ink-2); }

  .catp-side { display: grid; gap: 1.2rem; position: sticky; top: calc(var(--header-h, 72px) + 1rem); }
  .catp-review { margin: 0; padding: 1.3rem 1.25rem 1.2rem; border-radius: 22px; background: var(--paper-3, #FFFDF8); border: 1px solid var(--line, #EAD9C2); box-shadow: 0 10px 28px rgb(58 42 34 / .08); transform: rotate(-1deg); }
  .catp-review__who { font-size: 1.75rem; color: var(--amber, #9A5200); }
  .catp-review blockquote { margin: .55rem 0 0; font-family: var(--font-display, "Fraunces"), serif; font-size: 1.08rem; line-height: 1.5; }
  .catp-book { padding: 1.1rem 1.15rem; border-radius: 20px; border: 1.5px solid var(--line, #EAD9C2); }
  .catp-book__k { margin: 0 0 .3rem; font-weight: 800; } .catp-book p { margin: 0 0 .8rem; color: var(--ink-2); font-size: .95rem; }

  /* the index */
  .catsi-title { margin: 0; font-size: clamp(2.2rem, 6vw, 3.6rem); } .catsi-lead { color: var(--ink-2); max-width: 60ch; margin: .6rem 0 1.6rem; }
  .catsi-empty { color: var(--ink-2); }

  /* owners' edit bar (cats-admin.js) */
  /* 1.61.0: centred with left/right 0 + auto margins — "left: 50%; translateX(-50%)" let the bar use only HALF the screen, so on a phone
     every button sat on its own line and the bar covered the page */
  .catp-admin { position: fixed; z-index: 60; left: 0; right: 0; bottom: max(12px, env(safe-area-inset-bottom)); margin-inline: auto; width: max-content;
    max-width: calc(100vw - 24px); box-sizing: border-box; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center;
    padding: .5rem; border-radius: 18px; background: var(--ink, #3A2A22); box-shadow: 0 12px 30px rgb(0 0 0 / .25); }
  .catp-admin button, .catp-admin label { font: inherit; font-weight: 800; font-size: .88rem; padding: .55rem .8rem; border-radius: 12px; border: 0; background: var(--paper, #FFF8EE); color: var(--ink); cursor: pointer; min-height: 40px; }
  .catp-admin .on { background: var(--sun, #F7B733); }
  [data-photo] > .catp-del { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgb(42 29 20 / .7); color: #fff; font-size: 1rem; cursor: pointer; }
  .catp-dlg { width: min(560px, calc(100vw - 24px)); max-height: min(88vh, 900px); border: 0; border-radius: 22px; padding: 1.2rem; background: var(--paper, #FFF8EE); color: var(--ink); }
  .catp-dlg::backdrop { background: rgb(42 29 20 / .55); }
  .catp-dlg h2 { margin: 0 0 .8rem; font-size: 1.4rem; }
  .catp-dlg label { display: grid; gap: .3rem; margin-bottom: .75rem; font-weight: 700; font-size: .92rem; }
  .catp-dlg input, .catp-dlg textarea { font: inherit; font-size: 16px; padding: .6rem .7rem; border-radius: 12px; border: 1.5px solid var(--line, #EAD9C2); background: var(--paper-3, #FFFDF8); color: var(--ink); width: 100%; box-sizing: border-box; }
  .catp-dlg .hint { font-weight: 500; color: var(--ink-2); font-size: .82rem; }
  .catp-dlg .acts { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .4rem; }

  @media (max-width: 1024px) {
    .catp-body { grid-template-columns: minmax(0, 1fr); }
    .catp-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  }
  @media (max-width: 767px) {
    .catp-hero__in { grid-template-columns: minmax(0, 1fr); }
    .catp-hero__in.has-pics .catp-gallery { order: -1; }
    .catp-gallery { grid-auto-rows: 22vw; }
    .catp-secret.has-photo { grid-template-columns: minmax(0, 1fr); }
    .catp-secret__ph { max-width: 220px; }
  }
}

/* 1.50.0 — the bigger page (page JSON v2): a large opening paragraph, what the cat would say, the story in numbered chapter cards, loves with
   their reason, a day at BilluBnB (morning → night), little quirks. Same paper / sun / script language as 1.49.0. */
@layer sections {
  .catp-lead__t { margin: 0; font-family: var(--font-display); font-size: clamp(1.25rem, 1.05rem + .9vw, 1.6rem); line-height: 1.45; color: var(--ink); }
  .catp-lead__t::first-letter { float: left; font-size: 3.4em; line-height: .82; margin: .06em .1em 0 0; color: var(--amber); }
  .catp-lead mark, .catp-ch mark { background: linear-gradient(transparent 55%, var(--sun-soft) 55%); color: inherit; padding: 0 .1em; }
  .catp-says { display: grid; grid-template-columns: 76px 1fr; gap: var(--space-3); align-items: center; margin: var(--space-6) 0; }
  .catp-says__cat { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; background: var(--sun);
    box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--sun-deep); }
  .catp-says__cat img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .catp-says__cat b { font-family: var(--font-display); font-size: 2.4rem; color: var(--ink); line-height: 1; }
  .catp-says__b { position: relative; margin: 0; padding: var(--space-3) var(--space-4); border-radius: var(--r-md); background: var(--paper-3);
    box-shadow: 0 0 0 1.5px var(--sun-deep), var(--shadow-1); }
  .catp-says__b::before { content: ""; position: absolute; left: -9px; top: 50%; width: 16px; height: 16px; background: var(--paper-3);
    border-left: 1.5px solid var(--sun-deep); border-bottom: 1.5px solid var(--sun-deep); transform: translateY(-50%) rotate(45deg); }
  .catp-says__b p { margin: 0; font-family: var(--font-display); font-size: var(--step-1); font-style: italic; }
  .catp-says figcaption { grid-column: 2; margin-top: -.3rem; color: var(--ink-2); font-size: 1.2rem; }
  .catp-story { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-4); counter-reset: none; }
  .catp-ch { position: relative; padding: var(--space-4) var(--space-4) var(--space-4) calc(var(--space-4) + 2.6rem); border-radius: var(--r-md);
    background: var(--paper-3); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
  .catp-ch__n { position: absolute; left: var(--space-4); top: var(--space-4); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
    background: var(--sun); color: var(--sun-ink); font-family: var(--font-display); font-weight: 800; }
  .catp-ch h3 { margin: 0 0 .35rem; font-family: var(--font-display); font-size: var(--step-1); line-height: 1.2; }
  .catp-ch p { margin: 0; line-height: 1.6; }
  .catp-ch--photo { padding: 0; background: none; box-shadow: none; }
  .catp-ch--photo .catp-photo { margin: 0; }
  .catp-loves li > span:last-child { display: grid; }
  .catp-loves li small { color: var(--ink-2); font-size: var(--step--1); font-weight: 500; line-height: 1.4; }
  .catp-day { list-style: none; margin: var(--space-4) 0 0; padding: 0 0 0 1.2rem; border-left: 2px dashed var(--sun-deep); display: grid; gap: var(--space-4); }
  .catp-day li { position: relative; }
  .catp-day li::before { content: ""; position: absolute; left: calc(-1.2rem - 7px); top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--sun);
    box-shadow: 0 0 0 3px var(--paper); }
  .catp-day__w { display: inline-flex; gap: .4rem; align-items: center; font-size: 1.35rem; }
  .catp-day p { margin: .15rem 0 0; }
  .catp-quirks { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: .55rem; }
  .catp-quirks li { position: relative; padding-left: 1.7rem; }
  .catp-quirks li::before { content: ""; position: absolute; left: 0; top: .2rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--sun-soft);
    box-shadow: inset 0 0 0 2px var(--sun-deep); }
  .catp-more { margin: var(--space-4) 0 0; } .catp-more a { display: inline-flex; gap: .4rem; align-items: center; font-weight: 750; color: var(--ink); }
  .catp-more .i { width: 18px; height: 18px; color: var(--amber); }
  @media (max-width: 767px) { .catp-says { grid-template-columns: 56px 1fr; } .catp-says__cat { width: 56px; height: 56px; } .catp-says__cat b { font-size: 1.8rem; }
    .catp-ch { padding-left: var(--space-4); padding-top: calc(var(--space-4) + 2.4rem); } }
}

/* 1.51.0 — photos all the way down (in-story photos, "More moments"), the ♥ and the comments */
@layer sections {
  .catp-photo--in { margin: var(--space-5) 0; }
  .catp-story .catp-photo--in { margin: 0; }
  .catp-more-grid { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  @media (min-width: 768px) { .catp-more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .catp-more-grid li { position: relative; margin: 0; }
  .catp-more-grid img { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: 16px; display: block; }
  .catp-more-grid span { display: block; margin-top: .2rem; text-align: center; color: var(--ink-2); font-size: 1.15rem; }
  .catp-social { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: var(--space-3) 0 0; }
  .catp-like { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .35rem .95rem .35rem .75rem; border: 1.5px solid var(--line-strong);
    border-radius: var(--r-pill); background: var(--paper-3); color: var(--ink); font: inherit; font-weight: 750; cursor: pointer; transition: transform .15s var(--ease), background .15s; }
  .catp-like__h { font-size: 1.2rem; line-height: 1; color: var(--ink-3); transition: color .15s, transform .25s var(--ease); }
  .catp-like b { min-width: 1ch; }
  .catp-like.is-on { background: #FDE2DD; border-color: #B3261E; }
  .catp-like.is-on .catp-like__h { color: #B3261E; }
  .catp-like.is-pop .catp-like__h { transform: scale(1.35); }
  .catp-like:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
  .catp-talk-link { color: var(--ink-2); font-weight: 700; }
  .catp-talk__list { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: .7rem; }
  .catp-cm { padding: .8rem 1rem; border-radius: 16px; background: var(--paper-3); border: 1px solid var(--line); }
  .catp-cm.is-new { box-shadow: 0 0 0 2px var(--sun); }
  .catp-cm.is-hidden { opacity: .45; }
  .catp-cm__who { margin: 0 0 .2rem; } .catp-cm__who span { color: var(--ink-3); font-size: var(--step--1); }
  .catp-cm__t { margin: 0; white-space: pre-line; }
  .catp-talk__empty { color: var(--ink-2); margin: var(--space-2) 0 0; }
  .catp-talk__form { display: grid; gap: .7rem; margin-top: var(--space-4); padding: var(--space-4); border-radius: var(--r-md); background: var(--paper-2); }
  .catp-talk__form .field { display: grid; gap: .3rem; }
  .catp-talk__form input, .catp-talk__form textarea { width: 100%; font: inherit; font-size: 1rem; padding: .6rem .8rem; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--paper-3); color: var(--ink); }
  .catp-talk__form button { justify-self: start; }
  .catp-talk__note { margin: 0; color: var(--ok); font-weight: 700; }
  .catp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
}

/* 1.51.0 — owners only: ✨ on every photo, the Enhance dialog, comment tools */
@layer sections {
  .catp-ai { position: absolute; top: 8px; left: 8px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--paper-3);
    box-shadow: var(--shadow-1); font-size: 1rem; cursor: pointer; }
  [data-photo] { position: relative; }
  .catp-dlg--ai fieldset { border: 1px solid var(--line); border-radius: 12px; margin: .6rem 0; padding: .5rem .8rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
  .catp-dlg--ai legend { font-weight: 800; padding: 0 .3rem; }
  .catp-dlg--ai .ck { display: inline-flex; gap: .35rem; align-items: center; min-height: 36px; }
  .catp-dlg--ai .ai-words { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; width: 100%; }
  .catp-dlg--ai .ai-words input[name=words] { flex: 1 1 220px; min-height: 40px; font-size: 1rem; padding: .3rem .6rem; border-radius: 10px; border: 1.5px solid var(--line-strong); }
  .catp-cm__tools { margin: .4rem 0 0; display: flex; gap: .5rem; }
  .catp-cm__tools button { font: inherit; font-size: .85rem; padding: .2rem .7rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); cursor: pointer; }
}

/* 1.51.1 — the owners' bar says problems inline; ✕ asks "Remove?" on the photo itself */
.catp-admin__msg { flex-basis: 100%; margin: 0; padding: .4rem .7rem; border-radius: 10px; background: #FDECEA; color: #8C1D18; font-weight: 700; font-size: .92rem; }
[data-photo] > .catp-del.is-sure { width: auto; padding: 0 .7rem; background: #B3261E; color: #fff; font-weight: 800; }
.catp-add { margin: var(--space-4, 1rem) 0 .4rem; color: var(--ink-2); font-size: 1.05rem; line-height: 1.5; }

/* 1.52.0 — ♥ and 💬 with their counts on top · comments in the forum's look · the review as the family wrote it · edit in place */
@layer sections {
  .catp-act { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .35rem .95rem .35rem .75rem; border: 1.5px solid var(--line-strong);
    border-radius: 999px; background: var(--paper-3); color: var(--ink); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
  .catp-act b { font-variant-numeric: tabular-nums; min-width: 1ch; }
  .catp-act__l { font-weight: 700; color: var(--ink-2); }
  .catp-act--talk:hover, .catp-act:hover { border-color: var(--ink); }
  .catp-act:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
  .catp-talk.fm { padding: 0; background: none; }
  .catp-talk .fm-answers { display: flex; align-items: baseline; gap: .5rem; }
  .catp-talk__n { font-family: var(--font-body, "Nunito"), sans-serif; font-size: 1rem; color: var(--ink-2); }
  .catp-talk .fm-c.is-hidden { opacity: .6; border-style: dashed; }
  .catp-talk__form { margin-top: var(--space-4); }
  .catp-review__t p { margin: 0 0 .7em; }
  .catp-review__t p:last-child { margin-bottom: 0; }
  .catp-review__t::before { content: "“"; font-size: 2.2rem; line-height: 0; vertical-align: -.45em; color: var(--amber, #9A5200); margin-right: .1em; }
  .catp-review__t mark, .catp-lead__t mark { background: linear-gradient(transparent 55%, #FBD98A 55%); color: inherit; padding: 0 .05em; }
  .catp-add-in { color: var(--ink-2); }
  /* empty editable spots never show to visitors */
  .catp [data-edit]:empty { display: none; }
}
/* owners only (cats-admin.js adds body.catp-editing) */
.catp-ownmeta, .catp-addbtn { display: none; }
body.catp-editing .catp-ownmeta { display: grid; gap: .35rem; margin-top: var(--space-3); padding: .7rem .9rem; border: 1.5px dashed var(--line-strong); border-radius: 14px; background: var(--paper-3); }
body.catp-editing .catp-ownmeta p { margin: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: baseline; }
body.catp-editing .catp-ownmeta small { font-weight: 800; color: var(--ink-2); flex-basis: 100%; }
body.catp-editing .catp-addbtn { display: inline-flex; align-items: center; min-height: 36px; margin: .3rem 0 0; padding: .2rem .8rem; border: 1.5px dashed var(--line-strong);
  border-radius: 999px; background: none; font: inherit; font-weight: 800; color: var(--ink-2); cursor: pointer; }
body.catp-editing [data-edit] { outline: 1.5px dashed transparent; outline-offset: 3px; border-radius: 4px; transition: outline-color .15s; cursor: text; }
body.catp-editing [data-edit]:hover { outline-color: var(--line-strong); }
body.catp-editing [data-edit]:focus { outline: 2px solid var(--sun, #F7B733); background: rgb(247 183 51 / .08); }
body.catp-editing [data-edit].is-saving { outline-color: var(--amber, #9A5200); }
body.catp-editing .catp [data-edit]:empty { display: block; min-width: 6ch; min-height: 1.2em; }
body.catp-editing .catp-chips [data-edit]:empty, body.catp-editing .catp-ownmeta [data-edit]:empty, body.catp-editing .catp-add-in:empty { display: inline-block; }
body.catp-editing [data-edit]:empty::before { content: attr(data-ph); color: var(--ink-2); opacity: .55; font-style: italic; }
.catp-admin__msg[data-kind="ok"] { background: #E3F2E5; color: #1E5B26; }
.catp-admin__msg[data-kind="info"] { background: #FFF4D6; color: #6B4A00; }
/* 1.60.0 — a cat that came back: "Back for a 2nd stay 🐾" under the kicker that lists every stay (app/repeat.py page_badge / page_stays) */
@layer sections {
  .catp-repeat { margin: 0 0 .7rem; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }
  .catp-repeat__b { display: inline-flex; align-items: center; padding: .28rem .8rem; border-radius: 99px; background: var(--sun, #F7B733); color: var(--sun-ink, #3A2A22); font-weight: 800; font-size: .92rem; }
}


/* 1.61.0 — the index as portrait "reel" cards (owner: "reel like rectangle portrait ratio, full immersive image, that looks 3d minimal frame,
   and moves a little when hovered mouse, the summary text and title can come below it"). The frame keeps one shape (--cr, Settings →
   cats_card_ratio) so nothing jumps while pictures load; a thin light edge + a soft two-step shadow give the depth; a mouse tilts it a few
   degrees (cats-cards.js sets --rx/--ry/--mx/--my) and the picture slides a touch the other way. Touch and reduced motion: still. */
@layer sections {
  .catsi-grid { --cr: 9 / 16; list-style: none; padding: 0; margin: 0; display: grid; gap: clamp(1rem, 2.4vw, 1.6rem) clamp(.75rem, 2vw, 1.25rem);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
  .catsi-card { display: grid; grid-template-rows: auto 1fr; gap: .7rem; color: var(--ink); text-decoration: none; height: 100%; perspective: 900px;
    -webkit-tap-highlight-color: transparent; }
  .catsi-frame { position: relative; display: grid; place-items: center; aspect-ratio: var(--cr); overflow: hidden; border-radius: 20px; isolation: isolate;
    background: var(--paper-2, #FBEBD3) center / cover no-repeat;
    box-shadow: 0 0 0 1px rgb(58 42 34 / .07), 0 2px 4px -1px rgb(58 42 34 / .14), 0 22px 38px -22px rgb(58 42 34 / .5);
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d;
    transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out); will-change: transform; }
  .catsi-frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .28), inset 0 1.5px 0 rgb(255 255 255 / .5), inset 0 -24px 40px -28px rgb(42 29 20 / .45); }
  .catsi-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
    transform: scale(1.001) translate(0, 0); transition: transform .7s var(--ease-out); }
  .catsi-sheen { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .4s;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgb(255 248 238 / .38), rgb(255 248 238 / 0) 55%); mix-blend-mode: soft-light; }
  .catsi-card__paw .i { width: 3rem; height: 3rem; color: var(--amber, #9A5200); }
  .catsi-meta { display: grid; gap: .3rem; align-content: start; padding: 0 .15rem; }
  .catsi-card__t { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 .5rem; }
  .catsi-card__t b { font-family: var(--font-display, "Fraunces"), serif; font-size: var(--step-1, 1.25rem); line-height: 1.15; }
  .catsi-card__t .script { color: var(--amber, #9A5200); font-size: 1.15rem; white-space: nowrap; }
  .catsi-card__l { color: var(--ink-2); font-size: var(--step--1, .92rem); line-height: 1.4;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
  .catsi-card:focus-visible { outline: none; }
  .catsi-card:focus-visible .catsi-frame { outline: 3px solid var(--focus, #1F4A40); outline-offset: 3px; }
  .catsi-card:active .catsi-frame { transform: scale(.985); transition-duration: .15s; }
  @media (hover: hover) and (pointer: fine) {
    .catsi-card:hover .catsi-frame { box-shadow: 0 0 0 1px rgb(58 42 34 / .08), 0 4px 8px -2px rgb(58 42 34 / .16), 0 34px 52px -26px rgb(58 42 34 / .55); }
    .catsi-card.is-tilt .catsi-frame { transition-duration: .12s; }
    .catsi-card.is-tilt .catsi-img { transform: scale(1.06) translate(calc((50% - var(--mx, 50%)) * .06), calc((50% - var(--my, 50%)) * .06)); transition-duration: .2s; }
    .catsi-card.is-tilt .catsi-sheen { opacity: 1; }
    .catsi-card:hover .catsi-card__t b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--sun, #F7B733); }
  }
  @media (max-width: 599px) {
    .catsi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catsi-frame { border-radius: 16px; }
    .catsi-card__t b { font-size: 1.12rem; }
    .catsi-card__t .script { font-size: 1.05rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    .catsi-frame, .catsi-img, .catsi-sheen { transition: none; }
    .catsi-card .catsi-frame { transform: none; }
  }
}

/* 1.61.0 — videos in "More moments", and the owners' upload tray + photo sheet (cats-admin.js / cats-upload.js) */
@layer sections {
  .catp-more-grid .catp-vid { grid-column: 1 / -1; }
  .catp-more-grid .catp-vid video { width: 100%; height: auto; max-height: min(70vh, 640px); object-fit: contain; border-radius: 16px; display: block; background: var(--ink, #3A2A22); }
}
.catp-up { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; padding: .45rem .6rem; border-radius: 12px; background: var(--paper, #FFF8EE); color: var(--ink, #3A2A22); }
.catp-up[hidden] { display: none; }
.catp-up__bar { position: relative; flex: 1 1 100%; height: 6px; border-radius: 99px; background: var(--paper-2, #FBEBD3); overflow: hidden; }
.catp-up__bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--sun, #F7B733); transition: width .4s var(--ease, ease); }
.catp-up__t { flex: 1 1 auto; font-weight: 700; font-size: .88rem; line-height: 1.35; }
.catp-admin .catp-up button { min-height: 36px; padding: .35rem .7rem; background: var(--sun, #F7B733); }
.catp-admin label.is-busy { opacity: .6; pointer-events: none; }
.catp-sheet { display: grid; gap: .5rem; margin: .2rem 0 .6rem; }
.catp-sheet__b { display: grid; gap: .1rem; text-align: left; padding: .75rem .9rem; min-height: 56px; border-radius: 14px; border: 1.5px solid var(--line, #EAD9C2);
  background: var(--paper-3, #FFFDF8); color: var(--ink, #3A2A22); font: inherit; cursor: pointer; }
.catp-sheet__b b { font-size: 1rem; } .catp-sheet__b span { color: var(--ink-2, #5E4A3E); font-size: .88rem; }
.catp-sheet__b:hover { border-color: var(--ink, #3A2A22); } .catp-sheet__b:disabled { opacity: .6; }
.catp-sheet__b:focus-visible { outline: 3px solid var(--focus, #1F4A40); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .catp-up__bar i { transition: none; } }
