/* Jubail Commons — shared app styles (account, home, events, admin pages).
   Tokens only (assets/tokens.css) — never raw colors. Logical properties only
   (margin-inline, padding-inline, inset-inline) so RTL flows from dir=. */
*{box-sizing:border-box}
/* the hidden attribute must win over display rules below (label{display:flex} etc.) */
[hidden]{display:none !important}
/* links follow the theme — never the browser's default blue/purple */
a{color:var(--jc-accent)}
a:visited{color:var(--jc-accent)}
body{margin:0; background:var(--jc-bg); color:var(--jc-ink);
  font:15px/1.6 var(--jc-font); -webkit-font-smoothing:antialiased; min-height:100vh}
main{max-width:480px; margin:0 auto; padding:24px 18px 40px}
.topbar{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:16px}
.topbar a.home{color:var(--jc-ink); text-decoration:none; font-weight:800; font-size:22px; letter-spacing:-.01em;
  display:flex; align-items:center; gap:10px; line-height:1.2; margin-inline-end:auto; min-width:0}
/* back (nav.js jcBack): left of the logo, mirrored in Arabic */
.topbar a.back{flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:44px; height:44px;
  margin-inline:-12px -6px; border-radius:var(--jc-radius-pill); color:var(--jc-ink)}
.topbar a.back:active{background:var(--jc-surface)}
[dir=rtl] .topbar a.back svg{transform:scaleX(-1)}
.topbar a.home svg{flex:0 0 auto}
.topbar a.home span{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.lang{border:1px solid var(--jc-line); background:var(--jc-surface); color:var(--jc-ink);
  border-radius:var(--jc-radius-pill); padding:6px 14px; font-size:13px; font-weight:700; cursor:pointer}
h1{font-size:22px; font-weight:800; margin:0 0 6px}
.sub{color:var(--jc-muted); margin:0 0 18px; font-size:14px}
.panel{background:var(--jc-surface); border:1px solid var(--jc-line); border-radius:var(--jc-radius);
  padding:18px 16px; display:flex; flex-direction:column; gap:12px}
label{display:flex; flex-direction:column; gap:5px; font-size:13px; font-weight:700; color:var(--jc-muted)}
/* every form field, one look (DS-3a, docs/design.md §5): modules never restyle these — fix them here for everyone */
input[type=email], input[type=password], input[type=text], input[type=number], input[type=tel], input[type=url],
input[type=date], input[type=time], input[type=datetime-local], textarea, select{
  font:inherit; font-size:16px; /* ≥16px: iOS doesn't zoom on focus */
  color:var(--jc-ink); background:var(--jc-surface-2); border:1px solid var(--jc-line);
  border-radius:10px; padding:11px 12px; width:100%}
/* iPhone draws date / time fields as its own pill, wider than the box: field look, allowed to shrink */
input[type=date], input[type=time], input[type=datetime-local]{-webkit-appearance:none; appearance:none; display:block;
  min-width:0; max-width:100%; min-height:46px; text-align:start}
textarea{min-height:80px; resize:vertical}
/* dropdown: 46px like the other fields, one chevron of our own (drawn with the theme's colour), on the end side */
select{-webkit-appearance:none; appearance:none; min-height:46px; padding-inline-end:36px; cursor:pointer;
  background-image:linear-gradient(45deg, transparent 50%, var(--jc-muted) 50%), linear-gradient(135deg, var(--jc-muted) 50%, transparent 50%);
  background-position:calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size:5px 5px; background-repeat:no-repeat}
[dir=rtl] select{background-position:15px 50%, 20px 50%}
input:disabled, select:disabled, textarea:disabled{opacity:.6}
/* a checkbox or radio with its text: the box first, the theme's colour (never browser blue — Cats review D13) */
label.check{flex-direction:row; align-items:flex-start; gap:8px; font-weight:600; color:var(--jc-ink); font-size:14px}
label.check input{width:20px; height:20px; flex:0 0 auto; margin:1px 0 0; accent-color:var(--jc-accent)}
/* every keyboard-reachable thing gets the same ring on the dark surface (R3c P3): textareas, selects,
   <summary>, Leaflet's keyboard markers ([tabindex]). A heading focused by script (tabindex=-1, nav.js
   jcFocusKeep) isn't a control: no ring. */
input:focus-visible, button:focus-visible, a:focus-visible, textarea:focus-visible, select:focus-visible,
summary:focus-visible, [tabindex]:not([tabindex="-1"]):focus-visible{outline:2px solid var(--jc-accent); outline-offset:2px}
/* a tap-to-open line (details › summary): Home's install steps, Pets' photo details (UI review P5: the 2nd use, so shared) */
.install summary, details.more summary{cursor:pointer; font-weight:700; color:var(--jc-accent); min-height:44px; display:flex; align-items:center}
[tabindex="-1"]:focus{outline:none}
.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0);
  white-space:nowrap; border:0}
/* Leaflet's attribution link is only told apart by colour (2.55:1 vs its text): underline it (axe, R3c) */
.leaflet-container .leaflet-control-attribution a{text-decoration:underline}
.btn{font:inherit; font-weight:800; font-size:15px; border:0; border-radius:10px; padding:12px 16px;
  background:var(--jc-accent); color:var(--jc-accent-ink); cursor:pointer; text-align:center; text-decoration:none}
.btn[disabled]{opacity:.6; cursor:progress}
.btn.ghost{background:transparent; color:var(--jc-ink); border:1px solid var(--jc-line)}
/* link-buttons keep their text color once visited — a:visited above is more specific than .btn and turned
   the label accent-on-accent (invisible) on any browser that had opened the link (Zee, desktop, 2026-11-05) */
a.btn, a.btn:visited{color:var(--jc-accent-ink)}
a.btn.ghost, a.btn.ghost:visited{color:var(--jc-ink)}
.links{display:flex; flex-direction:column; gap:8px; margin-top:16px; font-size:14px}
.links button{font:inherit; background:none; border:0; padding:0; color:var(--jc-accent); cursor:pointer;
  text-align:start; text-decoration:underline}
.help{color:var(--jc-faint); font-size:12.5px; margin:0}
.msg{display:none; border-radius:10px; padding:9px 12px; font-size:13.5px; margin:0}
.msg.err{display:block; background:var(--jc-surface-2); border:1px solid var(--jc-danger); color:var(--jc-danger)}
.msg.ok{display:block; background:var(--jc-surface-2); border:1px solid var(--jc-good); color:var(--jc-good)}
/* a shown message never touches its neighbours (UI review E1). Pages on the shared stack (main.jcpage) get it from the
   12px gap; the others (Events, Organizer Tools, My Home, Account) from this margin, which collapses with theirs. */
main:not(.jcpage) .msg.ok, main:not(.jcpage) .msg.err{margin-block:12px}
/* organizers' banner on member pages (nav.js jcBanner; the hub styles its own #bcast) */
.bcast{background:var(--jc-danger); color:#2d0808; border-radius:var(--jc-radius); padding:10px 14px;
  font-weight:700; margin-bottom:16px; overflow-wrap:anywhere}
.who{font-size:14px; color:var(--jc-muted); margin:0; overflow-wrap:anywhere}
.who b{color:var(--jc-ink)}
/* Sub-menu tabs inside a page — event detail (Map · List · My home) and My Home
   (Home · Household · Account). Halloween-site parity, T5.2. */
/* a row too wide for the phone (Organizer Tools: 5 tabs) scrolls sideways, every label on one line (OT-1); rows that
   fit look as before */
/* the line is an inset shadow (not a border + -1px overlap) so overflow can't clip the 3px underline; equal widths while
   the row fits (basis 0), never narrower than the label */
.subtabs{display:flex; gap:4px; margin:8px 0 14px; box-shadow:inset 0 -1px 0 var(--jc-line); overflow-x:auto; overflow-y:hidden; scrollbar-width:none}
.subtabs::-webkit-scrollbar{display:none}
/* more tabs past an edge: that edge fades out (admin UI review G2); end/start mirror in Arabic */
.subtabs{--tab-end:right; --tab-start:left}
html[dir="rtl"] .subtabs{--tab-end:left; --tab-start:right}
.subtabs.more-end{--tab-mask:linear-gradient(to var(--tab-end), #000 calc(100% - 32px), transparent)}
.subtabs.more-start{--tab-mask:linear-gradient(to var(--tab-start), #000 calc(100% - 32px), transparent)}
.subtabs.more-start.more-end{--tab-mask:linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent)}
.subtabs.more-start, .subtabs.more-end{-webkit-mask-image:var(--tab-mask); mask-image:var(--tab-mask)}
.subtabs button{flex:1 0 0; min-width:max-content; white-space:nowrap; font:inherit; font-weight:700; cursor:pointer; color:var(--jc-muted); background:none;
  border:0; border-bottom:3px solid transparent; padding:10px 6px}
.subtabs button[aria-selected="true"]{color:var(--jc-ink); border-bottom-color:var(--jc-accent)}

/* shared pin map (home pin, organizer venue pin): the ring is fixed at the map's center;
   the person pans the map. Pages that use it load Leaflet + assets/map.js. */
.pinmap{position:relative; height:44vh; min-height:280px; border-radius:var(--jc-radius); overflow:hidden;
  border:1px solid var(--jc-line)}
.pinmap .map{position:absolute; inset:0}
.pinmap .ring{position:absolute; top:50%; left:50%; width:34px; height:34px; margin:-17px 0 0 -17px;
  border:3px solid var(--jc-accent); border-radius:50%; box-shadow:0 0 0 2px rgba(0,0,0,.55); pointer-events:none; z-index:500}
.pinmap .ring::after{content:""; position:absolute; top:50%; left:50%; width:6px; height:6px; margin:-3px 0 0 -3px;
  background:var(--jc-accent); border-radius:50%}
.pinmap .layers{position:absolute; top:10px; right:10px; z-index:600}   /* physical: Leaflet's zoom is always top-left, also in Arabic */
.pinmap .locate{position:absolute; bottom:40px;  /* clear of the map credits line */
  left:50%; transform:translateX(-50%); z-index:600;
  background:var(--jc-accent); color:var(--jc-accent-ink); border-color:var(--jc-accent); padding:9px 18px; font-size:14px}
/* formatted descriptions (rich.js) — event page + editor preview */
.rich p, .richpreview p{margin:0 0 6px}
.rich h3, .richpreview h3{font-size:16px; margin:8px 0 4px}
.rich ul, .rich ol, .richpreview ul, .richpreview ol{margin:0 0 6px; padding-inline-start:22px}
.rich > :last-child, .richpreview > :last-child{margin-bottom:0}
.richfield{display:grid; gap:5px}   /* label, buttons, box: the same 5px a label keeps around its box */
.richbar{display:flex; gap:6px}
.richbar .rich-b{font-weight:900} .richbar .rich-u{text-decoration:underline}
.richpreview{border:1px dashed var(--jc-line); border-radius:10px; padding:10px 12px; font-size:14px; overflow-wrap:anywhere}

/* pop-up window (Map Labels, page help): native <dialog> */
dialog.sheet{border:1px solid var(--jc-line); border-radius:16px; background:var(--jc-bg); color:var(--jc-ink);
  width:min(92vw, 420px); max-height:80vh; overflow:auto; padding:14px 16px 18px}
dialog.sheet::backdrop{background:rgba(0,0,0,.6)}
.sheethead{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px}
.sheethead h2{margin:0; font-size:18px}
/* the "?" help button in the top bar (2026-11-06) */
.topbar .help-btn{width:30px; height:30px; min-width:30px; padding:0; border-radius:50%; font-weight:800; font-size:14px; flex:0 0 auto; margin-inline-end:-4px}
.helplist{margin:4px 0 0; padding-inline-start:18px; display:flex; flex-direction:column; gap:8px; font-size:15px; line-height:1.45}
/* My Home → account: organizers' own button above the box; others a quiet link at the bottom */
a#toAdmin.btn{display:block; text-align:center; margin-bottom:12px}
.orglink{margin-top:18px; text-align:center}

/* Shared by every module (Zee 2026-11-09: consistency) — moved from events/events.css.
   A card's Admin badge (organizers: straight to its editor), and a page title with its Admin button at the end. */
.badge{flex:0 0 auto; font-size:11px; font-weight:800; letter-spacing:.04em;
  text-transform:uppercase; text-decoration:none; border-radius:var(--jc-radius-pill); padding:4px 10px;
  color:var(--jc-accent); border:1px solid var(--jc-accent)}
a.badge:visited{color:var(--jc-accent)}
.evtop{display:flex; align-items:flex-start; justify-content:space-between; gap:10px}
.evtitle{display:flex; align-items:flex-start; gap:10px}
.evtitle h1{flex:1 1 auto; min-width:0; overflow-wrap:anywhere}
.evtitle .adminbtn, .evtitle .adminbtn:visited{flex:0 0 auto; margin-top:2px; text-decoration:none; color:var(--jc-ink)}

/* chips (Pets, Organizer Tools; R5d-1 moved here from pets.css + admin.css): colour only for real states —
   Missing = red, Needs help = amber, the rest neutral */
.chip{display:inline-block; font-size:11.5px; line-height:1.5; border:1px solid var(--jc-line); border-radius:999px; padding:0 8px; color:var(--jc-muted)}
.chip.miss{background:var(--jc-danger); border-color:var(--jc-danger); color:#2d0808; font-weight:700}
.chip.warn{border-color:var(--jc-warn); color:var(--jc-warn); font-weight:700}
/* Shared building blocks, one copy for every page (module CSS only adds page-specific variants).
   Three looks, never mixed up (Zee 2026-11-18):
   - .chip: a small outlined pill that only labels (status, provisional). Never tappable.
   - choices (.filters / .opts buttons): bigger filled pills you pick one of; the picked one gets the accent ring.
   - actions: squarer corners. .btn for a screen's main actions, .mini for small actions inside a card.
   Actions side by side go in a .row so they never touch. */
.row{display:flex; gap:8px; flex-wrap:wrap}
.row .btn{flex:1}
.mini{font:inherit; font-size:13px; font-weight:700; cursor:pointer; color:var(--jc-ink); background:var(--jc-surface);
  border:1px solid var(--jc-line); border-radius:8px; padding:7px 12px; min-height:36px; min-width:36px}
.mini.danger{color:var(--jc-danger); border-color:var(--jc-danger)}
.mini:disabled{opacity:.5; cursor:default}
fieldset{border:0; margin:0; padding:0; display:flex; flex-direction:column; gap:6px}
legend{font-size:13px; font-weight:700; color:var(--jc-muted); margin-bottom:6px; padding:0}
h2.group{font-size:12.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--jc-muted); margin:10px 0 0}
.notice{margin:0; padding:10px 12px; border-radius:10px; border:1px solid var(--jc-accent); background:var(--jc-surface); font-size:13.5px; line-height:1.4}
.notice.warn{border-color:var(--jc-warn)} .notice.warn b{color:var(--jc-warn)}   /* a heads-up inside a card, e.g. a feeding visit's problem (Cats UI review #1) */

/* filter chips (api.js jcChipsHtml; OT-1 moved them here from pets.css): Pets, Organizer Tools */
.filters, .opts{display:flex; flex-wrap:wrap; gap:6px}
.filters button, .opts button{font:inherit; font-size:14px; cursor:pointer; color:var(--jc-ink); background:var(--jc-surface);
  border:1px solid var(--jc-line); border-radius:var(--jc-radius-pill); padding:7px 14px; min-height:40px}
.filters button[aria-pressed="true"], .opts button[aria-pressed="true"]{border-color:var(--jc-accent); box-shadow:inset 0 0 0 1px var(--jc-accent)}
.filters .n{color:var(--jc-muted); font-size:12.5px; margin-inline-start:3px; font-variant-numeric:tabular-nums}
.filters button[aria-pressed="true"] .n{color:var(--jc-ink)}
/* the search box over a list (api.js jcSearchHtml) */
.jcsearch{margin:0}

/* settings-style rows (OT-2; Organizer Tools → Community, later Pets → Settings): a name, one line of what it's for, a
   chevron (mirrored in Arabic). Each row opens its own screen. */
.setrows{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; background:var(--jc-surface);
  border:1px solid var(--jc-line); border-radius:var(--jc-radius); overflow:hidden}
.setrows li + li{border-top:1px solid var(--jc-line)}
.setrow{font:inherit; color:var(--jc-ink); background:none; border:0; width:100%; cursor:pointer; text-align:start;
  display:flex; align-items:center; gap:12px; padding:13px 14px; min-height:56px}
.setrow > span{flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px}
.setrow b{font-size:15px}
.setrow small{color:var(--jc-muted); font-size:13px; line-height:1.35}
.setrow.hot small{color:var(--jc-accent); font-weight:700}
.setrow .chev{flex:0 0 auto; color:var(--jc-muted)}
[dir=rtl] .setrow .chev{transform:scaleX(-1)}
.setrow:active{background:var(--jc-surface-2)}
.setrow:focus-visible{outline-offset:-2px}

/* R5c pet photos (R5d-2a: shared by Pets and Organizer Tools): the paw sits underneath until the photo has loaded (and stays if it never does) */
.ptph{position:relative; display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; overflow:hidden;
  border-radius:50%; background:var(--jc-surface-2); color:var(--jc-muted)}
.ptph img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0}
.ptph.has img{opacity:1}
.ptph.has svg{visibility:hidden}
.ptph.thumb{width:44px; height:44px}
.ptph.big{width:100%; height:auto; aspect-ratio:4 / 3; max-height:300px; border-radius:14px; margin-bottom:10px}
.ptphotoedit{display:flex; flex-direction:column; align-items:flex-start; gap:8px}
.ptphotoedit .ptph.big{max-width:320px}

/* PV-1 photo viewer: a tappable photo looks exactly like the photo; the viewer is a full-screen dark window */
.ptview{all:unset; box-sizing:border-box; display:inline-flex; cursor:zoom-in; border-radius:inherit}
.ptview.big{display:block; width:100%}
.ptphotoedit .ptview.big{max-width:320px}
.ptview:focus-visible{outline:2px solid var(--jc-accent); outline-offset:2px; border-radius:14px}
dialog.photoview{width:100vw; height:100vh; height:100dvh; max-width:none; max-height:none; margin:0; padding:0; border:0;
  background:rgba(0,0,0,.94); color:#fff; overflow:hidden}
dialog.photoview[open]{display:flex; flex-direction:column; overscroll-behavior:contain}
html:has(dialog.photoview[open]){overflow:hidden}   /* iPhone: the page behind doesn't scroll (review) */
dialog.photoview::backdrop{background:rgba(0,0,0,.94)}
.pvhead{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 16px; padding-top:max(12px, env(safe-area-inset-top))}
.pvcount{font-size:14px; font-weight:700}
.pvstage{flex:1 1 auto; min-height:0; display:flex; align-items:center; justify-content:center; padding:0 8px; touch-action:pan-y pinch-zoom; overflow:hidden}
.ptph.full{width:100%; height:100%; border-radius:0; background:transparent; color:rgba(255,255,255,.5)}
.ptph.full svg{position:absolute}
.ptph.full img{position:static; width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain; cursor:zoom-in;
  transition:transform .2s ease; transform-origin:50% 50%; -webkit-user-drag:none; user-select:none; -webkit-user-select:none}
/* DS-3c zoom (Cats review D12): Zoom In / double-tap = 2.5×, drag to look around; the stage clips, and while zoomed a
   drag never changes the photo and a tap never closes the viewer */
.pvstage.zoomed{touch-action:none; cursor:grab}
.pvstage.zoomed img{cursor:grab}
.pvstage.zoomed.drag img{transition:none; cursor:grabbing}
.pvnav{display:flex; justify-content:center; gap:24px; padding:12px 16px; padding-bottom:max(16px, env(safe-area-inset-bottom))}
.pvnav .btn{min-width:64px; font-size:24px; line-height:1; color:#fff; border-color:rgba(255,255,255,.4)}
[dir=rtl] .pvchev{display:inline-block; transform:scaleX(-1)}

/* a record list: label · state · note rows (R5b; CC-5: the Cats vaccines, invoices and status history) */
.care{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px}
.care li{display:flex; flex-wrap:wrap; gap:4px 10px; align-items:baseline; background:var(--jc-surface); border:1px solid var(--jc-line);
  border-radius:10px; padding:8px 12px; font-size:14px}
.care .nm{font-weight:700; flex:1 1 auto}
.care .st{font-size:13px; color:var(--jc-muted)}
.care .st-done{color:var(--jc-good)}
.care .st-due{color:var(--jc-warn)}
.care .note{flex-basis:100%; color:var(--jc-muted); font-size:13px}

/* red buttons and the danger zone (Pets; R5d-3b: shared with Organizer Tools — Remove Photo, Archive) */
.btn.danger-fill{background:var(--jc-danger); color:#2d0808}
.btn.ghost.danger{color:var(--jc-danger); border-color:var(--jc-danger)}
.danger-zone{margin-top:12px; border-color:var(--jc-danger); display:flex; flex-direction:column; gap:10px}
.danger-zone .btn{align-self:flex-start}

/* ---------- page pieces (DS-3b, docs/design.md §2–4): one copy, used by Pets, Courts, Cats ---------- */
/* page shell: 12px between every block, so nothing touches. Opt in with <main class="jcpage"> (a bare main{} rule here
   would restyle Events / My Home / Organizer Tools); .jcstack = the same column for a wrapper of its own */
main.jcpage, .jcpage #view, .jcpage [role="tabpanel"], .jcstack{display:flex; flex-direction:column; gap:12px}
.jcpage #view > h1, .jcpage #view > p, .jcpage #view > .subtabs{margin:0}
.jcpage #view > .subtabs + .msg{margin-top:-4px}
/* list cards: text entries without photos (sightings, care log, bookings, reports); actions in .acts at the foot */
.bklist{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px}
.bklist > li{background:var(--jc-surface); border:1px solid var(--jc-line); border-radius:var(--jc-radius); padding:12px 14px;
  display:flex; flex-direction:column; gap:6px; font-size:14px; overflow-wrap:anywhere}
.bklist li.missing{border-color:var(--jc-danger)}
.bklist b{font-size:15px}
.bklist .meta{color:var(--jc-muted); font-size:13px}
.bklist .acts{display:flex; flex-wrap:wrap; gap:8px; align-items:center}
/* a row of chips */
.head{display:flex; flex-wrap:wrap; align-items:center; gap:6px}
/* photo cards (blocks.js jcCardHtml): two columns, the whole card one button; .wide = one column, photo beside the text */
.ptgrid{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px}
.ptgrid.wide{grid-template-columns:1fr}
.ptgrid li{display:flex; min-width:0}
.ptcard{font:inherit; color:var(--jc-ink); text-align:start; cursor:pointer; width:100%; display:flex; flex-direction:column;
  background:var(--jc-surface); border:1px solid var(--jc-line); border-radius:var(--jc-radius); padding:0; overflow:hidden}
.ptcard:focus-visible{outline:2px solid var(--jc-accent); outline-offset:2px}
.ptgrid li.missing .ptcard{border:2px solid var(--jc-danger)}
.ptcard .ptph.tile{width:100%; aspect-ratio:1 / 1; border-radius:0; color:var(--jc-accent)}
.ptgrid.wide .ptcard{flex-direction:row; align-items:stretch}
.ptgrid.wide .ptph.tile{width:104px; aspect-ratio:auto; min-height:104px}
.ptbody{display:flex; flex-direction:column; gap:4px; padding:10px 12px 12px; min-width:0; overflow-wrap:anywhere}
.ptbody b{font-size:15px; line-height:1.25}
.ptbody .meta{color:var(--jc-muted); font-size:12.5px; line-height:1.35}
.ptbody .where{display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.ptbody .head{gap:4px; margin-top:2px}
/* hero header (blocks.js jcHeroHtml): the photo beside the name, so the tabs stay on the first screen */
.pthero{display:flex; flex-direction:row; align-items:center; gap:14px}
.pthero .meta{margin:0; color:var(--jc-muted); font-size:14px}
.pthero .ptph.tile{width:104px; height:104px; border-radius:14px; color:var(--jc-accent)}
.ptwho{display:flex; flex-direction:column; gap:4px; min-width:0}
.ptwho h1{margin:0; overflow-wrap:anywhere}
/* facts (blocks.js jcFactsHtml): muted label, value */
.facts{display:grid; grid-template-columns:9.5em 1fr; gap:6px 14px; margin:0; font-size:14px}
.facts dt{color:var(--jc-muted); font-weight:700}
.facts dd{margin:0; overflow-wrap:anywhere}
/* typed text keeps dir="auto" (a Latin name's letters stay in order); in Arabic it still lines up with the rest */
html[dir="rtl"] .ptbody b, html[dir="rtl"] .ptwho h1, html[dir="rtl"] .facts dd, html[dir="rtl"] .care .note,
html[dir="rtl"] .jcpage .desc, html[dir="rtl"] .bklist li > [dir="auto"]{text-align:right}
/* a list entry's still mini map (map.js jcMiniHtml / jcMinisDraw; Pets sightings, Cats activity — DS-4b) */
.ptmini{height:130px; border-radius:var(--jc-radius); overflow:hidden; border:1px solid var(--jc-line)}
.ptmini .leaflet-control-attribution{font-size:9px}
/* a thing's page (Pets, Cats; DS-4a): the story under the hero; the red "missing" box above the tabs; a row of
   buttons outside a list card. Scoped to .jcpage: Events / Organizer Tools have their own .desc / .acts */
.jcpage .desc{margin:0; font-size:14.5px; line-height:1.45; overflow-wrap:anywhere}
.jcpage .acts{display:flex; flex-wrap:wrap; gap:8px; align-items:center}
.alarm{border:2px solid var(--jc-danger); border-radius:var(--jc-radius); padding:12px 14px; background:var(--jc-surface)}
.alarm b{color:var(--jc-danger)}
.alarm p{margin:6px 0 0; font-size:14px}
.alarm .acts{margin-top:10px}
.alarm .btn{flex:1 1 auto}

/* Desktop layout (DL-1, docs/plans/DL-desktop-layout.md; Zee 2026-11-17). Everything sits inside this one block, so
   phones and iPad portrait (< 900 px) are unchanged. Resident pages: a wider column. <body class="wide"> (Organizer
   Tools, later Community Cats): up to 1200 px; forms and text stay readable at 600 px; card lists opt in to columns
   with .jcgrid (doubled in the rule so a page's own list display can't win; never on timelines: care log, sightings, day view); .jcsplit puts a list beside its map. */
@media (min-width:900px){
  main{max-width:600px}
  body.wide main{max-width:1200px}
  body.wide main :where(.panel, form, fieldset, .setrows, .row, .notice, .evtools, .codebox, .adminsbox, .pinmap, .filters, .jcsearch, p){max-width:600px}
  .jcgrid.jcgrid{display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); align-items:start}
  .jcsplit{display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:16px; align-items:start}
  .jcsplit > .jcsplit-map{position:sticky; top:16px}
}
