/* SH EcoGuide: the HK Bird ID layout (soft, pale, rounded panels) in a Shui Hau palette:
   teal water, sage and olive fields, sand paths, a warm orange and a soft yellow for the sun. */
:root {
  --bg: #eef4f0; --panel: rgba(255,255,255,.82); --solid: #ffffff; --soft: #f5f8f4; --hover: #e9f2ee;
  --ink: #1f3a36; --muted: #6a827d; --line: #dfe9e4; --line-2: #cddbd5;
  --teal: #2a7f7a; --teal-ink: #17605c; --teal-soft: #dcefeb;
  --sage: #9cbc7c; --sage-ink: #4c6b2c; --sage-soft: #e8f1dc;
  --olive: #5f8a3a; --forest: #2f5d22;
  --sand: #dcc49c; --sand-ink: #8a6a32; --sand-soft: #f6eedd;
  --orange: #d98c45; --orange-ink: #9a5518; --orange-soft: #fbe9d6;
  --yellow: #f2c84b;
  --accent: var(--teal); --accent-ink: var(--teal-ink); --accent-soft: var(--teal-soft);
  /* chance bands and month strips */
  /* pastel fills, as in HK Bird ID: the pale colour fills, the ink colour writes */
  --c3: #86cfa3; --c2: #c3e3a8; --c1: #f1e2ae; --c0: #e9efec; --nd: #f6f8f7;
  --hk: #8fd0c8; --hk-pk: #5fb8ad; --hk-occ: #6cbfb5; --hk-usual: #c5e7e2;
  --shadow: 0 1px 2px rgba(31,58,54,.05), 0 8px 24px rgba(31,58,54,.07);
  --r: 22px; --r-sm: 14px;
  font: 14px/1.5 "Inter", "Segoe UI", system-ui, -apple-system, "Microsoft JhengHei", "PingFang TC", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sci { font-style: italic; }
.zh { font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif; }
.m-only { display: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.backdrop i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .6; }
.backdrop .b1 { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: #cfe7e2; }
.backdrop .b2 { width: 36vw; height: 36vw; right: -8vw; top: 30vh; background: #e3eed2; }
.backdrop .b3 { width: 30vw; height: 30vw; left: 30vw; bottom: -14vw; background: #f6e8cc; }

.shell { display: grid; grid-template-columns: var(--side-w, 280px) minmax(0, 1fr); min-height: 100vh; }

/* ---------------- sidebar */
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px 14px; display: flex; flex-direction: column;
  gap: 12px; background: var(--panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--line); z-index: 1000; }
.title { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 0 11px; align-items: center; padding: 0 4px 4px 4px; }
.brand-mark { width: 58px; height: 58px; border-radius: 50%; box-shadow: var(--shadow); display: grid; place-items: center; overflow: hidden; background: #fff; }
.brand-mark img { width: 58px; height: 58px; display: block; }
h1 { margin: 0; font: 800 16px/1.2 "Montserrat", "Inter", sans-serif; letter-spacing: .05em; color: var(--teal-ink); }
.beta-label { display: inline-block; font-size: 10px; font-weight: 500; letter-spacing: 0; white-space: nowrap; vertical-align: middle; background: var(--sage-soft); border-radius: 4px; padding: 2px 4px; }
.species-report { font-size: 11px; color: var(--muted); }
.report-form { max-width: 600px; }
.report-form label { display: block; margin: 18px 0 6px; font-weight: 600; }
.report-form textarea, .report-form input { box-sizing: border-box; width: 100%; min-width: 0; font: inherit; color: var(--ink); background: var(--solid); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.report-form textarea { resize: vertical; }
.report-notice { font-size: 13px; }
.report-result { overflow-wrap: anywhere; }
h1 .zh { display: block; font-size: 13px; font-weight: 500; letter-spacing: .14em; color: var(--muted); margin-top: 2px; }

.taxa { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.taxa button { border: 1px solid var(--line-2); background: var(--solid); border-radius: 14px; padding: 9px 10px; text-align: left; cursor: pointer;
  font-weight: 600; font-size: 13px; line-height: 1.25; }
.taxa button .zh { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.taxa button small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; }
.taxa button.on { background: var(--teal-soft); border-color: #8fd0c8; color: var(--teal-ink); box-shadow: 0 4px 14px rgba(42,127,122,.12); }
.taxa button.on .zh { color: var(--teal-ink); opacity: .8; }
.taxa button:disabled { opacity: .55; cursor: default; border-style: dashed; }
.taxa button:not(:disabled):not(.on):hover { background: var(--hover); }

.views { display: flex; flex-direction: column; gap: 4px; }
.views button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 10px; border-radius: 12px; cursor: pointer;
  font-weight: 600; text-align: left; }
.views button .zh { color: var(--muted); font-weight: 500; }
.views button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--teal); }
.views button:hover { background: var(--hover); }
.views button.on { background: var(--sage-soft); color: var(--forest); }

.filters { display: flex; flex-direction: column; gap: 12px; padding: 2px 4px; }
input[type=search] { font: inherit; color: var(--ink); width: 100%; border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 14px 9px 36px;
  background: var(--solid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a827d' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 13px 50% / 15px no-repeat; }
input[type=search]:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; background: var(--solid); }
.seg button { flex: 1; border: 0; background: none; padding: 8px 10px; cursor: pointer; font: 600 12.5px/1.1 "Inter", sans-serif; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.on { background: var(--teal-soft); color: var(--teal-ink); }
.seg button.on .zh { color: inherit; }
.seg.small button { padding: 6px 12px; font-size: 12px; flex: 0 0 auto; }
.seg.small button.on { background: var(--sage-soft); color: var(--forest); }
.seg.small button.on .zh { color: inherit; }
.months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.months button { font: 500 12px/1 "Inter", sans-serif; padding: 7px 0; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--solid); color: var(--muted); cursor: pointer; }
.months button.now { border-color: var(--orange); color: var(--orange-ink); }
.months button.on { background: var(--sage-soft); border-color: var(--olive); color: var(--forest); font-weight: 700; }
.link { font: inherit; background: none; border: 0; padding: 0; color: var(--accent-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.side-label { font: 700 11px/1 "Montserrat", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 8px; }
#grp-list { display: flex; flex-direction: column; gap: 2px; }
#grp-list button { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; background: none; padding: 7px 10px;
  border-radius: 12px; cursor: pointer; text-align: left; }
#grp-list .g-n { font-weight: 500; font-size: 13px; line-height: 1.25; }
#grp-list .g-n .zh { display: block; color: var(--muted); font-size: 11.5px; }
#grp-list .cnt { font: 600 11px/1 "Inter", sans-serif; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; color: var(--muted); }
#grp-list button:hover { background: var(--hover); }
#grp-list button.on { background: var(--teal-soft); color: var(--teal-ink); }
#grp-list button.on .cnt { background: var(--teal); color: #fff; border-color: var(--teal); }
.sidebar footer { margin-top: auto; padding: 8px 6px 0; border-top: 1px solid var(--line); }
.sidebar footer p { margin: 6px 0; line-height: 1.45; }

/* ---------------- main */
main { min-width: 0; padding: 18px 22px 22px; }
.pagehead { padding: 0 4px 12px; }
.crumb { font-size: 12px; color: var(--muted); }
.crumb span { margin: 0 4px; }
.ph-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
h2 { margin: 2px 0; font: 800 26px/1.2 "Montserrat", "Inter", sans-serif; color: var(--teal-ink); letter-spacing: -.01em; }
h2 .zh { display: inline-block; white-space: nowrap; font: 700 .88em/1.2 "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif; color: var(--teal-ink); margin-left: 6px; letter-spacing: .02em; }
.ph-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font: 600 12px/1 "Inter", sans-serif; padding: 8px 12px; border-radius: 999px; background: var(--solid); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pill.sage { background: var(--sage-soft); color: var(--sage-ink); border-color: transparent; }
.pill.sand { background: var(--sand-soft); color: var(--sand-ink); border-color: transparent; }

.split { display: grid; grid-template-columns: var(--split-cols, minmax(0, 1fr) 14px minmax(0, 1.25fr)); gap: 0; height: calc(100vh - 110px); }
.split > .panel:first-child { grid-column: 1; }
.split > .panel:last-child { grid-column: 3; }
.split-resizer, .side-resizer { cursor: col-resize; }
.split-resizer { grid-column: 2; position: relative; }
.split-resizer::after { content: ""; position: absolute; left: 6px; top: 40%; height: 46px; width: 3px; border-radius: 3px; background: var(--line-2); }
.side-resizer { position: fixed; top: 0; bottom: 0; left: calc(var(--side-w, 280px) - 4px); width: 8px; z-index: 1001; }
body.resizing, body.resizing * { user-select: none; cursor: col-resize !important; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: auto; min-width: 0;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.panel-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 14px 16px 10px; }
.panel-head h3 { margin: 0; font: 700 12px/1 "Montserrat", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.panel-head h3 .zh { letter-spacing: .05em; }
.panel-head.sticky { position: sticky; top: 0; z-index: 5; background: var(--panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.show-bar { display: flex; width: 100%; }
.show-bar button { padding: 9px 10px; font-size: 13px; }
.sort-bar { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.sort-bar button { border: 1px solid var(--line-2); background: var(--solid); border-radius: 999px; padding: 5px 10px; font: 600 11.5px/1 "Inter", sans-serif; cursor: pointer; color: var(--muted); }
.sort-bar button.on { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-ink); }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); width: 100%; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--c0); border: 1px solid transparent; }
.lg.on { background: var(--hk); } .lg.on.usual { background: var(--hk-usual); } .lg.on.pk { background: var(--hk-pk); }
.lg.occ { background: transparent; border: 1.5px solid var(--hk-occ); }
.lg.c3 { background: var(--c3); } .lg.c2 { background: var(--c2); } .lg.c1 { background: var(--c1); }
.lg.nd { background: repeating-linear-gradient(45deg, var(--nd), var(--nd) 2px, var(--line) 2px, var(--line) 4px); }

/* species list */
.sp-list { padding: 6px 8px 14px; display: flex; flex-direction: column; gap: 4px; }
.sp-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 12px; align-items: center; text-align: left;
  border: 1px solid transparent; background: none; border-radius: 16px; padding: 7px 10px; cursor: pointer; }
.sp-item:hover { background: var(--hover); }
.sp-item.on { background: var(--teal-soft); border-color: color-mix(in srgb, var(--teal) 40%, transparent); }
.sp-item .ic { grid-row: 1 / 3; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; background: var(--soft); display: grid; place-items: center; }
.sp-item .ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { font-size: 22px; opacity: .4; }
.noimg.big { font-size: 44px; display: grid; place-items: center; width: 100%; height: 100%; background: var(--sage-soft); }
.sp-item .nm { min-width: 0; line-height: 1.3; }
.sp-item .nm b { font-weight: 600; }
.sp-item .nm .zh { color: var(--muted); margin-left: 2px; }
.sp-item .nm .sci { display: block; color: var(--muted); font-size: 12px; }
.sp-item .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tags { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.st { font: 700 10px/1 "Inter", sans-serif; padding: 3px 6px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-ink); border: 1px solid #b6e0da; }
.st-WV { background: #e1f1fb; color: #1f6fa3; border-color: #b9def4; } .st-SV { background: var(--orange-soft); color: var(--orange-ink); border-color: #f4cfa6; }
.st-PM { background: var(--sage-soft); color: var(--sage-ink); border-color: #cfe4b9; } .st-Va { background: #efeafb; color: #6b55a8; border-color: #d8cdf3; }
.iucn { font: 700 10px/1 "Inter", sans-serif; padding: 4px 6px; border-radius: 6px; color: #fff; }
.iucn-CR { background: #d81e05; } .iucn-EN { background: #fc7f3f; } .iucn-VU { background: #f9d100; color: #333; } .iucn-NT { background: #cce226; color: #333; }
.chance { font: 600 10.5px/1 "Inter", sans-serif; padding: 4px 7px; border-radius: 999px; white-space: nowrap; }
.chance { border: 1px solid transparent; }
.chance.c3 { background: #dff2e6; color: #2a6a46; border-color: #a9dcbc; } .chance.c2 { background: #eef6e4; color: #4c6b2c; border-color: #cfe6ba; } .chance.c1 { background: #fbf5e2; color: #86682a; border-color: #eedfb0; }

/* month strip */
.strip { display: inline-grid; grid-template-columns: repeat(12, 9px); gap: 2px; }
.strip i { width: 9px; height: 9px; border-radius: 3px; background: var(--c0); box-sizing: border-box; }
.strip.hk i.on { background: var(--hk); } .strip.hk i.on.usual { background: var(--hk-usual); } .strip.hk i.on.pk { background: var(--hk-pk); }
.strip.hk i.occ { background: transparent; border: 1.5px solid var(--hk-occ); }
.strip.hk i.nd { background: var(--nd); }
.strip.sh i.c3 { background: var(--c3); } .strip.sh i.c2 { background: var(--c2); } .strip.sh i.c1 { background: var(--c1); }
.strip.sh i.nd { background: repeating-linear-gradient(45deg, var(--nd), var(--nd) 2px, var(--line) 2px, var(--line) 4px); }
.strip i.cur { outline: 2px solid var(--orange); outline-offset: 1px; }
.strip.big { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; width: 100%; }
.strip.big .mc { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 500 11px/1 "Inter", sans-serif; color: var(--muted); }
.strip.big .mc i { width: 100%; height: 26px; border-radius: 8px; }
.strip.big .mc.mnow { color: var(--orange-ink); font-weight: 700; }
.strip.big i.cur { outline: 0; box-shadow: inset 0 0 0 2px var(--orange); }

/* photo grid and the on-site strip */
.now { padding: 14px 16px 2px; }
.now:empty { display: none; }
.m-now { display: none; border-bottom: 1px solid var(--line); }
.now-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.now-head h3 { margin: 0; font: 700 15px/1.3 "Montserrat", sans-serif; color: var(--forest); }
.now-head h3 .zh { color: var(--muted); font-weight: 500; }
.now-row { display: flex; gap: 10px; overflow-x: auto; padding: 10px 2px 12px; scroll-snap-type: x mandatory; }
.now-c { flex: 0 0 auto; width: 92px; border: 0; background: none; padding: 0; cursor: pointer; text-align: center; scroll-snap-align: start; position: relative; line-height: 1.2; }
.now-c .ph { display: block; width: 84px; height: 84px; margin: 0 auto 6px; border-radius: 50%; overflow: hidden; background: var(--sage-soft);
  box-shadow: 0 0 0 3px var(--solid), 0 0 0 5px var(--sage), var(--shadow); }
.now-c .ph img { width: 100%; height: 100%; object-fit: cover; }
.now-c b { display: block; font-size: 11.5px; font-weight: 600; }
.now-c .zh { display: block; font-size: 11px; color: var(--muted); }
.now-c .dot { position: absolute; top: 4px; right: 8px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--solid); }
.dot.c3 { background: #5fb883; } .dot.c2 { background: var(--c2); } .dot.c1 { background: var(--c1); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 4px 16px 18px; }
/* photo grid, as in HK Bird ID: the picture fills its square (--z from app.js fill()), the Chinese name large
   in white on a dark fade, the English in a small frosted box under it, the badges small in the top right */
.card { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 18px; overflow: hidden; cursor: pointer; background: var(--sage-soft); box-shadow: var(--shadow); }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(var(--z, 1)); transition: transform .3s; }
.card:hover img { transform: scale(calc(var(--z, 1) * 1.04)); }
.tile::after { content: ""; position: absolute; inset: auto 0 0 0; height: 50%; background: linear-gradient(transparent, rgba(0, 0, 0, .58)); pointer-events: none; }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0 8px 8px; text-align: left; }
.tile .cap .cn { display: block; margin: 0 2px 5px; color: #fff; font-size: 16px; line-height: 1.2; font-weight: 700; letter-spacing: .04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.tile .cap .en { display: inline-block; max-width: 100%; background: rgba(255, 255, 255, .8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 8px; padding: 3px 8px; font-size: 11.5px; line-height: 1.3; font-weight: 600; color: #23324a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .corner { position: absolute; top: 8px; right: 8px; bottom: auto; height: auto; z-index: 1; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }      /* stacked down the right edge, so they leave the head clear (Kani) */
.tile .corner .st, .tile .corner .chance { box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.tile .tile-chance { position: absolute; top: 8px; left: 8px; z-index: 1; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; box-sizing: content-box; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
@media (max-width: 760px) { .tile .cap .cn { font-size: 15px; } .tile .cap .en { font-size: 11px; } }

/* species page */
.sp-page { padding: 14px 16px 24px; }
.sp-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.back { grid-column: 1 / -1; justify-self: start; border: 1px solid var(--line-2); background: var(--solid); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 12.5px; }
.photos .main { margin: 0; border-radius: 20px; overflow: hidden; background: var(--sage-soft); box-shadow: var(--shadow); }
.photos .main .frame { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.photos .main img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(var(--z, 1)); }
.photos figcaption { font-size: 11px; color: var(--muted); padding: 6px 10px 8px; background: var(--solid); }
.photos figcaption a { color: inherit; }
.thumbs { display: flex; gap: 6px; margin-top: 8px; }
.thumbs button { width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: none; }
.thumbs button.on { border-color: var(--teal); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nophoto { aspect-ratio: 4 / 3; display: grid; place-items: center; border-radius: 20px; background: var(--sage-soft); color: var(--muted); }
.names { padding-top: 4px; }
.names .grp { font: 600 12px/1.3 "Inter", sans-serif; color: var(--olive); text-transform: uppercase; letter-spacing: .06em; }
.names .grp .zh { text-transform: none; color: var(--muted); }
.names h2 { font-size: 28px; margin: 6px 0 2px; }
.names .cn { font-size: 22px; font-weight: 600; color: var(--ink); }
.names .sci { color: var(--muted); margin: 2px 0 10px; }
.card-s { background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; margin-top: 14px; box-shadow: var(--shadow); }
.card-s h3 { margin: 0 0 10px; font: 700 15px/1.3 "Montserrat", sans-serif; color: var(--teal-ink); }
.card-s h3 .zh { color: var(--muted); font-weight: 500; }
.card-s p { margin: 8px 0; }
.note { font-size: 13px; }
.src { font-size: 11px; color: var(--muted); }
.when-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 8px; border-radius: 12px; }
.when-row.sel { background: var(--soft); }
.wl { font: 600 12px/1.25 "Inter", sans-serif; color: var(--muted); }
.wl .zh { display: block; }
.when-row.sel .wl { color: var(--teal-ink); }
.withheld { display: flex; gap: 10px; align-items: flex-start; background: var(--sand-soft); color: var(--sand-ink); border-radius: 12px; padding: 12px; margin: 0; }
.withheld svg { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#mini { height: 210px; border-radius: 12px; overflow: hidden; margin-bottom: 10px; background: var(--soft); }
.where-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.where-row .wl { width: 96px; }
.chip { font: 500 12px/1 "Inter", sans-serif; padding: 6px 10px; border-radius: 999px; background: var(--sage-soft); color: var(--sage-ink); border: 0; }
.chip.code { background: #fdf3cf; color: #8a6510; border: 1px solid #f3dc8c; font-weight: 700; cursor: pointer; }
.chip.zone { background: var(--teal-soft); color: var(--teal-ink); font-weight: 600; cursor: pointer; }
.chip .zh { opacity: .85; }
.ar-go { display: block; padding: 12px 16px; border-radius: 999px; background: var(--teal-ink); color: #fff; text-align: center; text-decoration: none; font-weight: 700; }
.ar-go .zh { opacity: .85; font-weight: 500; }
.card-s.ar .note { margin-bottom: 0; }
.card-s.ar .note .zh { display: block; white-space: normal; }      /* a whole sentence: the short-label nowrap rule further down would push it off the card */
.links a {display: inline-block; margin: 0 8px 6px 0; padding: 7px 12px; border-radius: 999px; background: var(--teal-soft); text-decoration: none; font-weight: 600; font-size: 12.5px; }

/* sizes */
.size-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin: 12px 0 4px; }
.size-ruler { margin: 2px 0 6px; }
.sizechart { display: block; max-width: 100%; height: auto; }
.sizechart .sil { fill: var(--sand); stroke: var(--sand); }
.sizechart .sil.main { fill: #5fb3a8; stroke: #5fb3a8; }
.sizechart .hit { fill: transparent; stroke: none; }
.sizechart .sil[data-id] { cursor: pointer; }
.sizechart .sil[data-id]:hover { fill: var(--orange); stroke: var(--orange); }
.sizechart .sil.paint, .sizechart .sil.paint[data-id]:hover { fill: none; stroke: none; }
.sizechart .sil.paint[data-id]:hover { opacity: .8; }
.sizechart .ground { stroke: var(--line-2); stroke-width: 1; }
.sizechart .ant { stroke: var(--sand); }
.sizechart .sil.main .ant { stroke: #5fb3a8; }
.sizechart .coin { fill: #d9dcdf; stroke: #9aa0a6; stroke-width: .6; }
.sizechart .coin-in { fill: none; stroke: #b4b9be; stroke-width: .4; }
.sizechart .coin-t { font: 700 9px "Inter", sans-serif; fill: #7a8087; }
.sizechart .ruler path { stroke: var(--muted); stroke-width: .5; fill: none; }
.sizechart .ruler-t { font: 600 3.4px "Inter", sans-serif; fill: var(--muted); }
.sz-b { display: inline-flex; flex-direction: column; align-items: center; }
.sz-b small { font-size: 10.5px; color: var(--muted); max-width: 110px; text-align: center; line-height: 1.2; margin-top: 3px; }
.sz-b small .zh { display: block; }
.sz-b.main small { color: var(--teal-ink); font-weight: 700; }
.sz-b.ref .sil { fill: var(--line-2); stroke: var(--line-2); }
.sz-b .sizechart.one { width: auto; max-height: none; }
.sz-b[data-id], .sz-b[data-sz] { cursor: pointer; }

.size-tab { position: fixed; right: 0; top: 42%; z-index: 1500; writing-mode: vertical-rl; font: 700 12.5px/1 "Inter", sans-serif;
  border: 0; border-radius: 12px 0 0 12px; background: #6cbfb5; color: #fff; padding: 14px 8px; cursor: pointer; box-shadow: var(--shadow); }
.size-tab .zh { margin-top: 6px; letter-spacing: .1em; }
.size-tab:hover { background: #4fa69b; }
body.sizes-open .size-tab { right: var(--szw, min(780px, 64vw)); }
.size-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: var(--szw, min(780px, 64vw)); z-index: 1490; display: flex; flex-direction: column;
  background: var(--solid); border-left: 1px solid var(--line); box-shadow: -10px 0 40px rgba(31,58,54,.15); }
.sz-head { padding: 14px 18px 10px; border-bottom: 1px solid var(--line); position: relative; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.sz-head h3 { margin: 0 110px 0 0; font: 700 16px/1.3 "Montserrat", sans-serif; color: var(--teal-ink); }
.sz-head p { margin: 0; }
.sz-tools { position: absolute; right: 14px; top: 10px; display: flex; gap: 6px; }
.sz-tools button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--solid); cursor: pointer; font-size: 15px; }
.sz-body { overflow: auto; padding: 8px 18px 40px; flex: 1; }
.sz-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* ---------------- farmland map */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; height: calc(100vh - 110px); }
.map, .map.panel { overflow: hidden !important; }
.map-card { padding: 16px 18px; }
.map-card h3 { margin: 0; font: 700 17px/1.3 "Montserrat", sans-serif; color: var(--teal-ink); }
.map-card h4 { margin: 16px 0 8px; font: 700 12.5px/1.3 "Inter", sans-serif; color: var(--forest); }
.mc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.code-big { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font: 800 16px/1 "Montserrat", sans-serif; color: #1f2a1e; box-shadow: var(--shadow); }
.mc-list { display: flex; flex-direction: column; gap: 4px; }
.mc-sp { display: flex; gap: 10px; align-items: center; border: 0; background: none; padding: 5px 6px; border-radius: 12px; cursor: pointer; text-align: left; }
.mc-sp:hover { background: var(--hover); }
.mc-sp img, .mc-sp .noimg { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex: 0 0 38px; display: grid; place-items: center; background: var(--soft); }
.mc-sp b { display: block; font-weight: 600; font-size: 13px; }
.mc-sp .zh { font-size: 12px; color: var(--muted); }
.prefix { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.prefix b { display: inline-block; width: 34px; padding: 3px 0; text-align: center; border-radius: 6px; background: #fdf3cf; color: #8a6510; margin-right: 6px; }
.area-lbl, .zone-lbl { background: none; border: 0; box-shadow: none; font: 800 11px/1 "Montserrat", sans-serif; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); padding: 0; }
.area-lbl::before, .zone-lbl::before { display: none; }
.lowzoom .area-lbl { display: none; }
.zone-lbl { font-size: 13px; color: #f6eedd; letter-spacing: .04em; }
.map-legend { background: var(--panel); backdrop-filter: blur(8px); padding: 8px 10px; border-radius: 12px; font-size: 11px; display: grid; gap: 3px; color: var(--ink); box-shadow: var(--shadow); }
.map-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }

/* ---------------- about */
.about { max-width: 1100px; }
.hero { position: relative; background: linear-gradient(135deg, #cfeae5, #e3f0d6 60%, #f6eedd); color: var(--ink); border-radius: var(--r); overflow: hidden; padding: 34px 30px 70px; box-shadow: var(--shadow); }
.hero h2 { color: var(--teal-ink); font-size: 30px; }
.hero h2 .zh { color: var(--teal-ink); }
.hero p { max-width: 640px; font-size: 15px; opacity: .95; }
.hero .wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 60px; fill: var(--bg); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 14px; margin-top: -30px; position: relative; padding: 0 12px; }
.bands { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; }
.bands .lg { margin-right: 6px; vertical-align: -1px; }
.credits { padding-left: 18px; margin: 4px 0; font-size: 12.5px; }

.empty { padding: 24px; color: var(--muted); text-align: center; }
.tabbar { display: none; }

/* ---------------- tablets and phones: one panel at a time, tabs at the bottom */
@media (max-width: 1000px) {
  .m-only { display: flex; }
  .shell { display: block; }
  .side-resizer, .split-resizer { display: none; }
  .sidebar { position: static; height: auto; border-right: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 14px 14px 100px; }
  main { padding: 12px 12px 72px; }
  body:not([data-mview="groups"]) .sidebar { display: none; }
  body[data-mview="groups"] main { display: none; }
  body[data-mview="groups"] .sidebar footer { margin-top: 12px; }
  .split { display: block; height: auto; }
  .panel { overflow: visible; }
  body[data-mview="species"] #right { display: none; }
  .m-now:not(:empty) { display: block; }
  #grid-view .now { display: none; }
  body[data-mview="photos"] #sp-panel { display: none; }
  body[data-mview="photos"] .pagehead { display: none; }
  .panel-head.sticky { top: 0; }
  h2 { font-size: 22px; }
  .sp-top { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 4px 12px 16px; }
  .map-wrap { grid-template-columns: 1fr; height: auto; }
  .map { height: 58vh; }
  /* bottom bar: Menu, Home and the three buttons of the part you are in */
  .tabbar { display: flex; position: fixed; left: 8px; right: 8px; bottom: calc(6px + env(safe-area-inset-bottom)); z-index: 2000; justify-content: space-around;
    background: rgba(255,255,255,.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line);
    border-radius: 16px; padding: 3px; box-shadow: 0 6px 20px rgba(31,58,54,.14); }
  .tabbar button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; color: var(--muted);
    font: 600 9.5px/1 "Inter", sans-serif; padding: 4px 0 3px; border-radius: 12px; cursor: pointer; }
  .tabbar .tb-t { display: flex; align-items: baseline; gap: 2px; white-space: nowrap; }
  .tabbar .tb-t .zh { font: 500 9.5px/1 "Inter", sans-serif; }
  .tabbar svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .drawer svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar button.on { background: var(--teal-soft); color: var(--teal-ink); }
  .tabbar .menu-btn { color: var(--teal-ink); }
  body[data-mset="sp"] .tabbar [data-set="tr"], body[data-mset="tr"] .tabbar [data-set="sp"] { display: none; }
  /* Menu: every page, sliding out from the left */
  .menu-scrim { position: fixed; inset: 0; z-index: 2002; background: rgba(20,40,38,.32); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.menu-open .menu-scrim { opacity: 1; pointer-events: auto; }
  .drawer { display: flex; flex-direction: column; gap: 4px; position: fixed; left: 0; top: 0; bottom: 0; width: min(232px, 72vw); z-index: 2003;
    padding: calc(16px + env(safe-area-inset-top)) 10px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto;
    background: rgba(255,255,255,.97); border-right: 1px solid var(--line); box-shadow: 8px 0 30px rgba(31,58,54,.18);
    transform: translateX(-105%); transition: transform .24s ease; visibility: hidden; }
  body.menu-open .drawer { transform: none; visibility: visible; }
  .tb-head { font: 800 15px/1.3 "Montserrat", sans-serif; color: var(--teal-ink); padding: 4px 10px 12px; display: flex; flex-direction: column; }
  .tb-head .zh { font: 600 12px/1.4 "Inter", sans-serif; color: var(--muted); }
  .drawer button { display: flex; align-items: center; gap: 12px; border: 0; background: none; color: var(--teal-ink); text-align: left;
    font: 600 15px/1.2 "Inter", sans-serif; padding: 12px; border-radius: 14px; cursor: pointer; }
  .drawer .tb-t .zh { color: var(--muted); font-weight: 500; margin-left: 4px; }
  .drawer button.on { background: var(--teal-soft); }
  .size-tab { top: auto; bottom: calc(70px + env(safe-area-inset-bottom)); padding: 12px 7px; font-size: 11.5px; }
  .size-drawer { width: 100%; z-index: 2400; }
  body.sizes-open .size-tab { display: none; }
  .about-grid { padding: 0 4px; grid-template-columns: 1fr; }
  .hero { padding: 26px 20px 64px; }
}
@media (min-width: 1001px) {
  .back { display: none; }
  body[data-view="species"] .sp-page .back { display: inline-block; }
}

/* photo checks (review.js): the Google sign-in button, and the reviewers' panel on the species page */
#rv-box { padding: 0 2px; }
.rv-btn { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); background: var(--solid);
  border: 1px solid var(--line-2); border-radius: 14px; padding: 9px 12px; box-shadow: var(--shadow); font-weight: 600; font-size: 13px; line-height: 1.25; }
.rv-btn:hover { background: var(--hover); }
.rv-btn svg { width: 20px; height: 20px; flex: 0 0 20px; }
.rv-btn .zh { color: var(--muted); font-weight: 500; }
.rv-btn small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.rv-on { background: var(--teal-soft); border: 1px solid #b6e0da; color: var(--teal-ink); border-radius: 14px; padding: 9px 12px; font-size: 12.5px; line-height: 1.35; }
.rv-card { border-color: #b6e0da; background: #f6fbfa; }
.rv-list { display: flex; flex-direction: column; gap: 6px; }
.rv-ph { display: grid; grid-template-columns: 22px 56px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 6px; border-radius: 12px; background: var(--solid); border: 1px solid var(--line); }
.rv-ph img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.rv-ph.off { opacity: .6; }
.rv-ph.off img { filter: grayscale(1); }
.rv-drag { cursor: grab; touch-action: none; user-select: none; color: var(--muted); font-size: 20px; line-height: 1; text-align: center; padding: 10px 0; }
.rv-ph.dragging { box-shadow: 0 6px 18px rgba(0,0,0,.18); border-color: var(--teal); position: relative; z-index: 2; }
.rv-ph.dragging .rv-drag { cursor: grabbing; color: var(--teal); }
/* the photo checks as small tiles: drag to order, × to remove, ↺ to restore, ◎ to frame the list thumbnail */
.rv-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.rv-t { position: relative; width: 64px; height: 64px; border-radius: 10px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.rv-t img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; pointer-events: none; }
.rv-t.dragging { opacity: .65; transform: scale(1.08); cursor: grabbing; z-index: 2; }
.rv-t.off { cursor: default; }
.rv-t.off img { filter: grayscale(1); opacity: .5; }
.rv-main { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9.5px; line-height: 1.5; background: rgba(20,30,28,.6); color: #fff; text-align: center; border-radius: 0 0 10px 10px; }
.rv-tx, .rv-tr, .rv-tc { position: absolute; top: -7px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--solid); padding: 0; display: grid; place-items: center; cursor: pointer; font-size: 14px; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.rv-tx { right: -7px; background: #c4472c; color: #fff; }
.rv-tr { right: -7px; background: var(--teal); color: #fff; }
.rv-tc { left: -7px; background: var(--solid); color: var(--muted); font-size: 11px; }
.rv-tc.on { background: var(--teal-soft); color: var(--teal-ink); }
.rv-meta { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; }
.rv-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-acts { display: flex; gap: 4px; }
.rv-acts button, .rv-why button { border: 1px solid var(--line-2); background: var(--solid); border-radius: 999px; min-width: 32px; height: 32px; padding: 0 9px; cursor: pointer; font-weight: 600; }
.rv-acts button:disabled { opacity: .35; cursor: default; }
.rv-x { color: #b4441c; }
.rv-why { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 4px; }
.rv-why select, .rv-why input { font: inherit; font-size: 12.5px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--solid); }
.rv-why input { flex: 1; min-width: 120px; }

/* places on the farmland map: the names, not the survey codes */
.code-big.zh { font: 700 14px/1.15 "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif; text-align: center; padding: 4px; }
.code-big.long { font-size: 12px; }
.places { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; }
.place-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 12px; cursor: pointer; text-align: left; font-size: 13.5px; }
.place-btn:hover { background: var(--hover); }
.place-btn i { width: 14px; height: 14px; border-radius: 4px; flex: 0 0 14px; }
.place-btn .zh { font-weight: 700; margin-right: 2px; }
.chip.code .zh { font-weight: 700; }
.area-lbl { font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif; font-size: 12px; letter-spacing: .04em; }

/* bilingual buttons and labels: the Chinese never breaks inside; it moves to the next line as a whole */
button .zh, .chip .zh, .pill .zh, .wl .zh, .side-label .zh, label .zh, .field .zh, .legend .zh, .map-legend .zh, h3 .zh, h4 .zh, .note .zh, .sz-b small .zh {
  display: inline-block; white-space: nowrap; }
.seg button { line-height: 1.25; }
.sz-looks { display: flex; flex-wrap: wrap; gap: 6px; }

/* the top of the species list and of the photos, as in HK Bird ID: a tinted band with a soft shadow under it,
   rounded with the panel, staying in place while the list scrolls */
.panel-head.sticky { background: linear-gradient(180deg, #e3f1ed, #eef6f2); border-bottom: 1px solid #d2e5de;
  border-radius: var(--r) var(--r) 0 0; box-shadow: 0 8px 14px -10px rgba(23, 96, 92, .28); }
#grid-view > .panel-head, #grid-view > .now:not(:empty) { background: linear-gradient(180deg, #e3f1ed, #eef6f2); }
#grid-view > .now:not(:empty) { border-radius: var(--r) var(--r) 0 0; border-bottom: 1px solid #d2e5de; margin-bottom: 4px;
  box-shadow: 0 8px 14px -10px rgba(23, 96, 92, .22); }
#grid-view > .now:empty + .panel-head { border-radius: var(--r) var(--r) 0 0; box-shadow: 0 8px 14px -10px rgba(23, 96, 92, .22); }
.m-now:not(:empty) { background: linear-gradient(180deg, #e3f1ed, #eef6f2); border-radius: var(--r) var(--r) 0 0; }
.m-now:not(:empty) + .panel-head.sticky { border-radius: 0; }
.panel-head.sticky .show-bar { background: rgba(255, 255, 255, .85); box-shadow: 0 1px 2px rgba(23, 96, 92, .08); }

/* the Sizes tab on computer screens: larger, a teal-to-sage gradient and a ruler icon; when the page opens it
   slides out a little and glows three times, then rests (not for visitors who ask for less motion) */
.size-tab .sz-ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; margin-bottom: 8px; }
@media (min-width: 1001px) {
  .size-tab { padding: 18px 11px; font-size: 14px; letter-spacing: .04em; border-radius: 16px 0 0 16px;
    background: linear-gradient(180deg, #4fb3a8, #7fbf6a); box-shadow: -4px 6px 18px rgba(23, 96, 92, .28); }
  .size-tab .sz-ic { width: 20px; height: 20px; }
  .size-tab:hover { background: linear-gradient(180deg, #3f9f95, #6aad57); transform: translateX(-3px); }
  .size-tab { transition: transform .2s, background .2s; }
  .size-tab.hello { animation: sz-hello 1.4s ease-in-out 1s 3; }
}
@keyframes sz-hello {
  0%, 100% { transform: translateX(0); box-shadow: -4px 6px 18px rgba(23, 96, 92, .28); }
  40% { transform: translateX(-8px); box-shadow: -4px 6px 18px rgba(23, 96, 92, .28), 0 0 0 6px rgba(127, 191, 106, .45), 0 0 24px 8px rgba(242, 200, 75, .55); }
  70% { transform: translateX(-4px); }
}
@media (prefers-reduced-motion: reduce) { .size-tab.hello { animation: none; } }

/* list icons framed by a reviewer: the photo, moved and zoomed inside the square */
img.crop { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-item .ic, .now-c .ph, .mc-sp { overflow: hidden; }
.mc-sp img.crop { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; }
/* the framer in the photo-check panel */
.rv-acts button.on { background: var(--teal-soft); border-color: #8fd0c8; color: var(--teal-ink); }
.rv-crop { grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; padding-top: 8px; }
.rv-frame { width: 200px; height: 200px; border-radius: 22px; overflow: hidden; background: var(--soft); cursor: grab; touch-action: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--teal), var(--shadow); }
.rv-frame:active { cursor: grabbing; }
.rv-frame img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.rv-crop-tools { display: flex; flex-direction: column; gap: 8px; min-width: 180px; flex: 1; }
.rv-crop-tools label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 12.5px; }
.rv-crop-tools input[type=range] { accent-color: var(--teal); }
.rv-crop-tools button { border: 1px solid var(--line-2); background: var(--solid); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; margin-right: 6px; }
.rv-crop-tools .rv-ok { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------------------------------------------------------------- Shui Hau Project page (project.js) */
.project { max-width: 1180px; }
.pj-head { padding: 0 4px 12px; }
.pj-head p { margin: 2px 0 0; }
.pj-wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.pj-tabs { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pj-tabs button { text-align: left; border: 0; background: none; border-radius: 12px; padding: 9px 12px; cursor: pointer; color: var(--ink);
  border-left: 3px solid transparent; }
.pj-tabs button .en { display: block; font: 600 13.5px/1.25 "Inter", sans-serif; }
.pj-tabs button .zh { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.pj-tabs button:hover { background: var(--hover); }
.pj-tabs button.on { background: var(--teal-soft); color: var(--teal-ink); border-left-color: var(--teal); }
.pj-tabs button.on .zh { color: var(--teal-ink); opacity: .8; }
.pj-body { padding: 22px 26px 18px; overflow: visible; }
.pj-body p { max-width: 72ch; }
.pj-body p.zh { color: #3d5a55; margin-top: -4px; }
.pj-title { margin: 0 0 12px; font: 800 22px/1.25 "Montserrat", sans-serif; color: var(--teal-ink); }
.pj-title .zh { font: 500 17px/1.3 "Microsoft JhengHei", "PingFang TC", sans-serif; color: var(--muted); margin-left: 4px; }
.pj-h { margin: 22px 0 8px; font: 700 16px/1.35 "Montserrat", sans-serif; color: var(--teal-ink); }
.pj-h .zh { font-weight: 500; color: var(--muted); margin-left: 4px; }
.pj-fig { margin: 0; }
.pj-fig .pj-zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--sage-soft); border-radius: 16px; overflow: hidden; cursor: zoom-in; }
.pj-fig img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }
.pj-fig .pj-zoom:hover img { transform: scale(1.03); }
.pj-fig figcaption { font-size: 12px; color: var(--muted); padding: 6px 2px 0; line-height: 1.45; }
.pj-fig figcaption .zh { display: block; }
.pj-fig .by { display: block; font-size: 11px; opacity: .85; }
.hero-fig { margin: 0 0 14px; }
.hero-fig img { aspect-ratio: 16 / 7; }
.hero-fig.full img, .hero-fig.full img:hover { aspect-ratio: auto; }
.pj-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 14px 0; }
.pj-photos.old img { aspect-ratio: auto; max-height: 300px; object-fit: contain; }
.pj-photos.old .pj-zoom { background: var(--sand-soft); }
.pj-pillars { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pj-pillars li { background: linear-gradient(135deg, var(--teal-soft), var(--sage-soft)); border-radius: var(--r-sm); padding: 12px 14px; font-weight: 600; color: var(--teal-ink); }
.pj-pillars li .zh { display: block; font-weight: 500; color: var(--ink); opacity: .75; margin-top: 2px; }
.pj-pillars li.go { padding: 0; }
.pj-pillars li.go button { all: unset; box-sizing: border-box; display: block; width: 100%; height: 100%; padding: 12px 34px 12px 14px;
  position: relative; cursor: pointer; border-radius: inherit; transition: background-color .15s ease; }
.pj-pillars li.go button:hover { background-color: rgba(255, 255, 255, .35); }
.pj-pillars li.go button:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }
.pj-pillars li.go .arrow { position: absolute; right: 12px; top: 12px; opacity: .6; }
.pj-h[id] { scroll-margin-top: 80px; }
.pj-list { padding-left: 20px; margin: 8px 0; }
.pj-list li { margin: 0 0 8px; max-width: 72ch; }
.pj-list li .zh { display: block; color: var(--muted); }
.pj-quote { margin: 20px 0 8px; padding: 14px 18px; border-left: 4px solid var(--sage); background: var(--sage-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic; color: var(--sage-ink); }
.pj-quote p { margin: 0; }
.pj-quote p.zh { font-style: normal; margin-top: 4px; }
.pj-funder { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pj-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; background: var(--soft); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 14px; margin: 12px 0; }
.pj-card.solo { grid-template-columns: 1fr; }
.pj-card h4, .pj-stop h4, .pj-time h4, .pj-events h4 { margin: 0 0 6px; font: 700 14.5px/1.35 "Montserrat", sans-serif; color: var(--teal-ink); }
.pj-card h4 .zh, .pj-stop h4 .zh, .pj-time h4 .zh, .pj-events h4 .zh { font-weight: 500; color: var(--muted); margin-left: 4px; }
.pj-card p { margin: 0 0 6px; }
.pj-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 12px 0; }
.pj-events section { background: var(--orange-soft); border-radius: var(--r-sm); padding: 12px 14px; }
.pj-events .when { font: 700 11.5px/1.3 "Inter", sans-serif; color: var(--orange-ink); margin-bottom: 4px; }
.pj-events .when .zh { font-weight: 500; margin-left: 4px; }
.pj-events p { margin: 0; font-size: 13px; }
.pj-events p .zh { display: block; color: var(--muted); }
.pj-time { list-style: none; margin: 6px 0; padding: 0 0 0 26px; position: relative; }
.pj-time::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--teal), var(--sage), var(--sand)); border-radius: 2px; }
.pj-time li { position: relative; padding: 0 0 22px; }
.pj-time li::before { content: ""; position: absolute; left: -24px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--solid); border: 3px solid var(--teal); }
.pj-time .when { font: 700 12px/1.3 "Inter", sans-serif; color: var(--teal); letter-spacing: .02em; margin-bottom: 2px; }
.pj-time .when .zh { font-weight: 500; color: var(--muted); margin-left: 4px; }
.pj-time p { margin: 0 0 4px; }
.pj-time .pj-fig { max-width: 420px; margin-top: 8px; }
.pj-stops { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 14px 0; }
.pj-stop { background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pj-stop .pj-fig .pj-zoom { border-radius: 0; }
.pj-stop .pj-fig figcaption { padding: 4px 12px 0; }
.pj-stop-in { padding: 10px 14px 14px; }
.pj-stop-in p { margin: 0 0 6px; font-size: 13.5px; }
.pj-stop .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #fff; font: 700 12px/1 "Inter", sans-serif; margin-right: 8px; vertical-align: 1px; }
.pj-stop .chip { margin-top: 4px; }
.pj-light { position: fixed; inset: 0; z-index: 5000; background: rgba(20,36,33,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; cursor: zoom-out; }
.pj-light img { max-width: 100%; max-height: calc(100% - 40px); border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.pj-light span { color: #e8f1ee; font-size: 12px; }
.mc-photo { margin: 10px 0 4px; }
.mc-photo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; }
.mc-photo figcaption { font-size: 11px; color: var(--muted); padding-top: 3px; }
@media (max-width: 1000px) {
  .pj-wrap { grid-template-columns: 1fr; gap: 10px; }
  .pj-tabs { position: sticky; top: 0; z-index: 20; flex-direction: row; overflow-x: auto; gap: 6px; padding: 6px; border-radius: 16px;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); scrollbar-width: none; }
  .pj-tabs::-webkit-scrollbar { display: none; }
  .pj-tabs button { flex: 0 0 auto; border-left: 0; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--solid); }
  .pj-tabs button.on { border-color: var(--teal); }
  .pj-tabs button .en { font-size: 12.5px; white-space: nowrap; }
  .pj-tabs button .zh { font-size: 11px; white-space: nowrap; }
  .pj-body { padding: 16px 16px 12px; }
  .pj-title { font-size: 19px; }
  .pj-card { grid-template-columns: 1fr; }
  .hero-fig img { aspect-ratio: 4 / 3; }
  .hero-fig.full img { aspect-ratio: auto; }
}

/* short Chinese labels inside About sentences stay whole */
.card-s p .zh { display: inline-block; }
.pj-photos.small { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 8px 0 0; max-width: 720px; }

/* the logo (tools/make_logo.py) on the About page: on white, as drawn */
.hero-logo { position: absolute; right: 34px; top: 50%; transform: translateY(-58%); width: 168px; height: 168px; padding: 12px;
  background: #fff; border-radius: 50%; box-shadow: var(--shadow); z-index: 1; }
.hero .hero-in { padding-right: 200px; }
@media (max-width: 1000px) {
  .hero-logo { position: static; transform: none; display: block; width: 128px; height: 128px; padding: 9px; margin: 0 0 12px; }
  .hero .hero-in { padding-right: 0; }
}

/* a picked group's species to scale (renderStrip), under the list head, as in HK Bird ID */
.grp-strip { padding: 10px 14px 8px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--soft), transparent); }
.grp-strip .gs-art { overflow-x: auto; scrollbar-width: thin; }
.grp-strip .sizechart.compact { height: 72px; width: auto; max-width: none; margin: 0; }
.grp-strip .bf-row { display: flex; align-items: center; gap: 6px; width: max-content; padding-bottom: 2px; }
.grp-strip .bf-row .sizechart.one { width: auto; flex: 0 0 auto; }
.grp-strip .sil.main:not(.paint) { fill: #5fb3a8; stroke: #5fb3a8; }
.grp-strip .sil.paint.main { filter: drop-shadow(0 0 2px var(--teal)) drop-shadow(0 0 1px var(--teal)); }
.grp-strip .bar line { stroke: var(--muted); stroke-width: 1.2; }
.grp-strip .bar text { fill: var(--muted); font-family: "Inter", sans-serif; }
.strip-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 11px; color: var(--muted); margin-top: 4px; }
.strip-hint .sz-looks { display: inline-flex; flex-wrap: wrap; gap: 6px; }

/* the Sizes drawer: Whole bird / Flying and the names switch; the finger count (HK Bird ID's flight.js) */
.sz-more { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sz-b .sizechart.one.fly { width: auto; max-height: none; }
.fing { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; padding: 0 5px 0 3px; border-radius: 999px;
  background: var(--soft); border: 1px solid var(--line); color: var(--muted); font: 600 10.5px/16px "Inter", sans-serif; vertical-align: 1px; }
.fing svg { width: 13px; height: 13px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.fly-note { margin: 4px 0 0; }

/* recently reported on eBird (Shui Hau hotspot) */
.eb-head { margin-top: 10px; }
.eb-head a, .eb-line a { color: var(--teal-ink); }
.now-c .eb-date { display: inline-block; margin-top: 3px; font: 600 10.5px/1 "Inter", sans-serif; color: var(--teal-ink); background: var(--teal-soft); border-radius: 999px; padding: 3px 7px; }
.card-s .funder { margin: 0 0 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--sage-soft); color: var(--forest); }
.card-s .funder .zh { display: block; }

/* the field guide card: notes by plumage, then status, range and breeding */
.card-s.fg .fg-lang { float: right; margin: -38px 0 0; }
.fg-notes { margin: 6px 0 10px; }
dl.fg-notes dt { font: 700 12px/1.3 "Inter", sans-serif; color: var(--teal-ink); margin-top: 8px; }
dl.fg-notes dd { margin: 2px 0 0; }
.fg-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); }
.fg-row p { margin: 0; }
@media (max-width: 1000px) { .card-s.fg .fg-lang { float: none; display: inline-flex; margin: 0 0 6px; } }

/* amphibians and reptiles: venomous and introduced tags, and the safety note */
.st.st-ven { background: #fde4dc; color: #a2371a; border-color: #f2b9a6; }
.st.st-intro { background: var(--sand-soft); color: var(--sand-ink); border-color: #e6d3ad; }
.st .zh { font-weight: 500; }
.safety { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--r-sm); background: #fde4dc; color: #7a2a14; border: 1px solid #f2b9a6; }
.safety .zh { display: block; }

/* amphibians and reptiles (herp.js) */
.sz-row.herp { align-items: center; }
.sz-row.herp .sizechart.one { max-width: none; }
.size-drawer .sz-body { overflow-x: auto; }
.size-row.herp { align-items: center; }

/* calls (callsCard) */
.calls .call { margin: 6px 0 10px; }
.calls audio { width: 100%; height: 36px; }
.calls figcaption { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* the documentary on the project page: a preview picture, the YouTube player when tapped */
.pj-video { margin: 8px 0 14px; max-width: 640px; }
.pj-yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #1e2a28; cursor: pointer; }
.pj-yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pj-yt .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%); border-radius: 14px; background: rgba(204, 0, 0, .9); }
.pj-yt .play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.pj-yt:hover .play { background: #e00; }
.pj-yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.pj-video figcaption { font-size: 12.5px; padding-top: 6px; }
.pj-video figcaption a { color: var(--teal-ink); font-weight: 600; }

/* the "Likely" and eBird strips: every circle the same size and on one line, names below (a button centres its
   content, so a two-line name used to lift its circle) */
.now-row { align-items: flex-start; }
.now-c { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; align-self: flex-start; }
.now-c .ph { flex: 0 0 84px; width: 84px; min-width: 84px; height: 84px; box-sizing: border-box; }

/* group buttons: a faint silhouette on the right (taxonArt) */
.taxa button { position: relative; overflow: hidden; }
.taxa button .tx-art { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 1px;
  color: var(--teal); opacity: .2; pointer-events: none; }
.taxa button.on .tx-art { opacity: .32; color: var(--teal-ink); }
.taxa button:disabled .tx-art { opacity: .1; }
.taxa button .tx-art svg { display: block; width: auto; height: auto; max-height: 40px; max-width: 54px; }
.taxa button .tx-art .sil, .taxa button .tx-art .sil.paint { fill: currentColor; stroke: currentColor; }

/* dragonflies (odonata.js); the map card's group chooser */
.sz-row.odo, .size-row.odo { align-items: flex-end; }
.sizechart.one.odo { max-width: none; }
.mc-tx { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.mc-tx .chip { cursor: pointer; border: 1px solid var(--line-2); background: var(--solid); }
.mc-tx .chip.on { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-ink); }
.mc-grp { margin: 12px 0 6px; font: 700 12.5px/1.3 "Inter", sans-serif; color: var(--teal-ink); }
.mc-grp .zh { font-weight: 500; color: var(--muted); }
.sz-row.refs { border-bottom: 0; }
.sz-ref-note { flex-basis: 100%; }

/* map place list: each icon trimmed to its own square */
.mc-sp .mc-ic { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; overflow: hidden; display: block; position: relative; background: var(--soft); }
.mc-sp .mc-ic img, .mc-sp .mc-ic img.crop, .mc-sp .mc-ic .noimg { width: 100%; height: 100%; flex: none; border-radius: 0; }

/* a species opened from the map: back to the place card */
.tomap { grid-column: 1 / -1; justify-self: start; border: 1px solid var(--teal); background: var(--teal-soft); color: var(--teal-ink);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 12.5px; }

/* computers: the HKBWS logo and the Catowl Design Studio owl at the top right (as in HK Bird ID); titles keep clear */
main { position: relative; }
.brand-logos { position: absolute; top: 14px; right: 26px; display: flex; align-items: center; gap: 14px; z-index: 5; pointer-events: none; }
.brand-logos img { display: block; width: auto; }
.brand-logos img[src*="hkbws"] { height: 40px; }
.brand-logos img[src*="catowl"] { height: 46px; pointer-events: auto; }
@media (min-width: 1001px) { .pagehead, .pj-head { padding-right: 230px; } }
body[data-view="about"] .brand-logos { display: none; }
@media (max-width: 1000px) { .brand-logos { display: none; } }

/* the Sizes drawer's left edge: drag to resize (computers) */
.sz-grip { display: none; position: fixed; top: 0; bottom: 0; right: calc(var(--szw, min(780px, 64vw)) - 5px); width: 10px; z-index: 1495; cursor: ew-resize; touch-action: none; }
.sz-grip::after { content: ""; position: absolute; left: 3px; top: 50%; width: 4px; height: 56px; margin-top: -28px; border-radius: 4px; background: var(--line-2); transition: background .15s; }
.sz-grip:hover::after, body.sz-dragging .sz-grip::after { background: var(--teal); }
body.sizes-open .sz-grip { display: block; }
body.sz-dragging { cursor: ew-resize; user-select: none; }
@media (max-width: 1000px) { body.sizes-open .sz-grip { display: none; } }

/* the Find tab under Sizes: both in one column on the right edge, opening the same drawer */
.edge-tabs { position: fixed; right: 0; top: 34%; z-index: 1500; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.edge-tabs .size-tab { position: static; }
body.sizes-open .edge-tabs { right: var(--szw, min(780px, 64vw)); }
.size-tab.find-tab { background: #e0a43c; }
.size-tab.find-tab:hover { background: #c98d27; }
.size-tab.on { box-shadow: inset 3px 0 0 rgba(255,255,255,.75), var(--shadow); }
@media (min-width: 1001px) {
  .size-tab.find-tab { background: linear-gradient(180deg, #e8b04a, #d98a3a); }
  .size-tab.find-tab:hover { background: linear-gradient(180deg, #d99e36, #c97a2c); }
}
@media (max-width: 1000px) {
  .edge-tabs { top: auto; bottom: calc(60px + env(safe-area-inset-bottom)); gap: 8px; }
  body.sizes-open .edge-tabs { display: none; }
}

/* Find your species (finder.js), after HK Bird ID's Find your bird */
.finder { padding-top: 12px; }
.fq-h { font: 700 13px/1.3 "Inter", sans-serif; color: var(--teal-ink); margin: 0 0 6px; }
.fq + .fq { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.fq-any { font-weight: 500; font-size: 11px; color: var(--muted); margin-left: 8px; }
.fq-note { font-size: 12px; color: var(--muted); margin: -2px 0 6px; }
.fq-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fq-chips button { font: 500 12.5px/1.2 "Inter", sans-serif; border: 1px solid var(--line-2); background: var(--solid); color: var(--ink);
  border-radius: 999px; padding: 7px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-align: left; }
.fq-chips button small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.fq-chips button:hover { background: var(--hover); }
.fq-chips button.on { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-ink); font-weight: 700; }
.fq-chips button.unsure { border-style: dashed; color: var(--muted); }
.fq-chips button.unsure.on { background: var(--soft); border-color: var(--line-2); color: var(--muted); font-weight: 600; }
.fq-chips.size-q button { flex-direction: column; align-items: flex-start; gap: 1px; border-radius: 14px; }
.fq-chips.kind-q, .fq-chips.size-q { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.fq-chips .sw { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); display: inline-block; flex: none; }
.fq-chips.months-q button { padding: 6px 10px; }
.fq-chips .fan { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; flex: none; }
.fq-chips .ft { display: inline; }
.fq-chips .ft .zh { white-space: nowrap; }
.fq-n { font-size: 10.5px; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 1px 6px; margin-left: 2px; }
.f-results { margin-top: 20px; padding-top: 14px; border-top: 2px solid var(--line); }
.f-results h4 { margin: 0 0 4px; font: 700 15px/1.3 "Montserrat", sans-serif; color: var(--teal-ink); }
.f-results h4 .zh { font-weight: 600; color: var(--muted); font-size: 13px; }
.fres { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.fr { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 12px; align-items: center; text-align: left; font: inherit; color: inherit;
  background: var(--solid); border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px; cursor: pointer; }
.fr:hover { background: var(--hover); }
.fr > img, .fr > .noimg { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; display: flex; align-items: center; justify-content: center; background: var(--soft); overflow: hidden; }
.fr-t b { font-size: 14px; }
.fr-t > .zh { font-weight: 600; }
.fr-t small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: 12px; margin-top: 2px; }
.fits { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.fit { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px; }
.fit.yes { background: #dff2e6; color: #2a6a46; }
.fit.no { background: #fdecea; color: #b4432c; }
.fit.unk { background: var(--soft); color: var(--muted); }
.chance.c0 { background: var(--soft); color: var(--muted); border-color: var(--line); }
.to-results { position: sticky; bottom: 12px; float: right; z-index: 6; margin: 10px 0 0; font: 700 13px/1 "Inter", sans-serif; border: 0; cursor: pointer;
  color: #fff; background: var(--teal); border-radius: 999px; padding: 10px 16px; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.sz-tools .f-reset { font-size: 17px; }
@media (max-width: 760px) {
  .fq-chips.kind-q, .fq-chips.size-q { grid-template-columns: 1fr 1fr; }
  .fq-chips button { padding: 8px 11px; font-size: 13px; }
  .fq-chips.kind-q button small, .fq-chips.size-q button small { font-size: 10.5px; }
}
/* Find results: each icon trimmed to its own square (a reviewer's framed icon is zoomed with a transform) */
.fr .fr-ic { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; display: block; position: relative; background: var(--soft); }
.fr .fr-ic img, .fr .fr-ic img.crop, .fr .fr-ic .noimg { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; border-radius: 0; }

/* bird sounds from xeno-canto (xcCard), after HK Bird ID */
ul.xc { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 12px; }
ul.xc li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: start; }
.xc-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--teal); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.xc-play:hover { background: var(--teal-ink); }
.xc-play svg { width: 18px; height: 18px; fill: currentColor; }
.xc-play.playing { background: #d9822b; }
.xc-top { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: 13px; }
.xc-type { font-weight: 700; }
.xc-type .zh { font-weight: 600; }
.xc-type.xc-song { color: #2e7d3e; } .xc-type.xc-call { color: var(--teal-ink); }
.xc-where { color: var(--muted); font-size: 12px; }
.xc-sono { display: block; width: 100%; max-width: 360px; height: auto; aspect-ratio: 270 / 121; border-radius: 6px; margin: 4px 0 2px; background: #f4f4f2; }
.xc-cred { font-size: 11px; color: var(--muted); }
.xc-cred a { color: var(--teal-ink); }
.xc-hk { font: 700 10px/1 "Inter", sans-serif; color: #fff; background: #2e7d3e; border-radius: 4px; padding: 2px 4px; }

/* staff sign-in: a quiet line at the bottom of the left panel (review.js) */
.sidebar footer p.staff { margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--muted); opacity: .7; }
.sidebar footer p.staff a { color: inherit; text-decoration: none; }
.sidebar footer p.staff a:hover { text-decoration: underline; opacity: 1; }
.sidebar footer p.staff .zh { font-weight: 400; }

/* the home page (renderHome): the logo and title go back to it */
.sidebar .title { cursor: pointer; border-radius: 16px; }
.sidebar .title:hover h1 { color: var(--teal); }
.sidebar .title:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
body[data-view="home"] .brand-logos { display: none; }
.home-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: -30px; position: relative; padding: 0 12px; }
.home-likely h3 { margin-bottom: 2px; }
.home-row { padding-top: 10px; border-top: 1px dashed var(--line); margin-top: 8px; }
.home-row:first-of-type { border-top: 0; }
.home-row h4 { margin: 0; font: 700 14px/1.3 "Montserrat", sans-serif; color: var(--teal-ink); }
.home-row h4 .zh { color: var(--muted); font-weight: 600; }
.home-row .now-row { padding-bottom: 6px; }
.home-row .now-c .noimg { display: grid; place-items: center; width: 100%; height: 100%; font-size: 30px; }
.legend-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.legend-line .dot { position: static; display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 0; }
.home-taxa { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 8px; }
.home-taxa button { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--solid); border-radius: 16px; padding: 14px 16px; font: inherit; color: var(--ink); min-height: 86px; }
.home-taxa button:hover { background: var(--teal-soft); border-color: var(--teal); }
.home-taxa b { font: 700 15px/1.25 "Montserrat", sans-serif; color: var(--teal-ink); }
.home-taxa .zh { font-weight: 600; }
.home-taxa small { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.home-taxa .tx-art { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--teal); opacity: .22; pointer-events: none; display: flex; align-items: center; }
.home-taxa .tx-art svg { display: block; width: auto; height: auto; max-height: 52px; max-width: 72px; }
.home-taxa .tx-art .sil, .home-taxa .tx-art .sil.paint { fill: currentColor; stroke: currentColor; }
.home-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 10px; margin-top: 8px; }
.home-page { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  border: 1px solid var(--line); background: var(--solid); border-radius: 16px; padding: 14px; }
.home-page:hover { background: var(--hover); border-color: var(--line-2); }
.home-page .hp-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--teal-soft); color: var(--teal-ink); display: grid; place-items: center; }
.home-page .hp-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-page .hp-t { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.5; }
.home-page .hp-t b { font: 700 14px/1.3 "Montserrat", sans-serif; color: var(--teal-ink); }
.home-page .hp-t > .zh { color: var(--muted); font-size: 12.5px; }
@media (max-width: 1000px) {
  .home-body { padding: 0 4px; }
  .home-taxa { grid-template-columns: 1fr 1fr; }
}
/* home: the long Chinese lines wrap (titles keep .zh unbroken elsewhere) */
.home p .zh, .home .hp-t .zh { white-space: normal; display: inline; }
.home .hp-t > .zh { display: block; }

/* the habitat map: where am I? (on site) */
.geo-ctl button { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; background: #fff; color: #23324a; cursor: pointer;
  font: 600 12.5px/1 "Inter", sans-serif; border-radius: 4px; }
.geo-ctl button:hover { background: #f4f4f4; }
.geo-ctl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.geo-ctl button.on { color: #2f80ed; }
.geo-ctl button.busy svg { animation: geo-spin 1.2s linear infinite; }
@keyframes geo-spin { to { transform: rotate(360deg); } }
.geo-here { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 800; max-width: calc(100% - 28px); background: rgba(255,255,255,.95);
  border-radius: 14px; padding: 8px 12px; box-shadow: 0 6px 18px rgba(0,0,0,.18); font-size: 13px; line-height: 1.45; color: var(--ink); }
.geo-here b { color: #2f80ed; }
.geo-pop { position: fixed; inset: 0; z-index: 5000; background: rgba(20,30,28,.45); display: grid; place-items: center; padding: 20px; }
.geo-box { background: var(--solid); border-radius: 18px; padding: 20px 22px 16px; max-width: 360px; box-shadow: 0 16px 40px rgba(0,0,0,.25); text-align: center; }
.geo-box p { margin: 0 0 8px; }
.geo-box .geo-ok { margin-top: 8px; border: 0; border-radius: 999px; padding: 9px 22px; background: var(--teal); color: #fff; font-weight: 700; cursor: pointer; }
@media (max-width: 760px) { .geo-ctl button span { display: none; } .geo-ctl button { width: 34px; padding: 0; justify-content: center; } }
.map.geo-on .map-legend { display: none; }

/* the HKBWS logo and the Catowl Design Studio owl in the top right of the Home and About banners, on every screen */
.hero-brands { position: absolute; top: 16px; right: 22px; display: flex; align-items: center; gap: 12px; z-index: 2; pointer-events: none; }
.hero-brands img { display: block; width: auto; }
.hero-brands img[src*="hkbws"] { height: 40px; }
.hero-brands img[src*="catowl"] { height: 46px; }
@media (min-width: 1001px) { .hero:has(.hero-brands) .hero-logo { top: calc(50% + 26px); } .hero:has(.hero-brands) { padding-top: 46px; } }
@media (max-width: 1000px) {
  .hero-brands { top: 14px; right: 16px; gap: 10px; }
  .hero-brands img[src*="hkbws"] { height: 32px; }
  .hero-brands img[src*="catowl"] { height: 38px; }
}

/* the status letters: tap for what they mean (statusPop) */
.st-tap { cursor: help; }
.st-tap:hover { filter: brightness(.95); box-shadow: 0 0 0 2px rgba(42,127,122,.18); }
.st-what { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--line-2); background: var(--solid); border-radius: 999px;
  padding: 3px 9px 3px 4px; font: 600 11.5px/1.2 "Inter", sans-serif; color: var(--teal-ink); cursor: pointer; }
.st-what:hover { background: var(--teal-soft); }
.st-what .zh { font-weight: 500; color: var(--muted); }
.geo-box.st-help { text-align: left; max-width: 440px; max-height: calc(100vh - 60px); overflow: auto; }
.st-help h3 { margin: 0 0 8px; font: 700 16px/1.3 "Montserrat", sans-serif; color: var(--teal-ink); }
.st-help .lg-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; align-items: start; padding: 7px 6px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.st-help .lg-row.on { background: var(--teal-soft); }
.st-help .lg-row .st { justify-self: start; margin-top: 2px; }
.st-help .geo-ok { display: block; margin: 10px auto 0; }
.st.st-I { background: var(--sand-soft); color: var(--sand-ink); border-color: #e6d3ad; }
.st.st-E { background: #f1f1ef; color: #66625a; border-color: #dcdad4; }
/* phones: a slimmer page heading over the species list, so "Likely at Shui Hau" comes up sooner
   (the counts and season pills are left out; the season is in the Groups tab) */
@media (max-width: 1000px) {
  #pg-species .pagehead { padding: 0 4px 8px; }
  #pg-species .pagehead .crumb, #pg-species .ph-stats { display: none; }
  #pg-species .pagehead h2 { font-size: 21px; }
  .now { padding-top: 10px; }
}

/* phones, Groups tab: the pages are in the bottom bar, so the side panel goes straight from the group to its
   families (to open the species), with search, season and month after them */
@media (max-width: 1000px) {
  .sidebar .views { display: none; }
  .sidebar .title { order: 0; } .sidebar .taxa { order: 1; } .sidebar .side-hint { order: 2; }
  .sidebar .grp-wrap { order: 3; } .sidebar .filters { order: 4; margin-top: 14px; } .sidebar footer { order: 5; }
  .side-hint { flex-direction: column; gap: 4px; margin: 2px 2px 0; padding: 10px 12px; border-radius: 14px; background: var(--teal-soft);
    color: var(--teal-ink); font-size: 13px; line-height: 1.4; }
  .side-hint b { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 11px; }
  .side-hint .zh { display: block; margin-left: 24px; color: var(--muted); font-size: 12px; }
  .side-hint .muted { font-size: 11.5px; margin-top: 2px; }
  .sidebar .grp-wrap { margin-top: 4px; }
  #grp-list button { padding: 10px 12px; background: var(--solid); border: 1px solid var(--line); margin-bottom: 4px; border-radius: 12px; }
}

/* the group list: a few colour drawings of each family (groupArt), between its name and its count */
#grp-list .g-n { flex: 1 1 auto; min-width: 0; }
#grp-list .g-art { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
#grp-list .g-art .ga { display: flex; align-items: center; justify-content: center; height: 30px; max-width: 46px; }
#grp-list .g-art svg { display: block; height: 28px; width: auto; max-width: 46px; }
#grp-list .g-art .sil:not(.paint) { fill: var(--line-2); stroke: var(--line-2); }
@media (min-width: 1001px) {      /* the narrow side panel: two smaller drawings */
  #grp-list .g-art .ga:nth-child(n+3) { display: none; }
  #grp-list .g-art .ga { height: 24px; max-width: 36px; }
  #grp-list .g-art svg { height: 22px; max-width: 36px; }
}
@media (max-width: 1000px) {
  #grp-list .g-art .ga { height: 36px; max-width: 56px; }
  #grp-list .g-art svg { height: 34px; max-width: 56px; }
}
/* five groups: the last one spans the row */
.taxa button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.home-taxa button:last-child:nth-child(odd) { grid-column: auto; }

/* sensitive species not listed (plants): the note at the top of the list */
.held-note { display: flex; gap: 8px; align-items: flex-start; margin: 8px 12px 6px; padding: 9px 12px; border-radius: 12px; background: var(--sand-soft);
  color: var(--sand-ink); font-size: 12.5px; line-height: 1.45; }
.held-note svg { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.held-note .zh { display: block; }

/* ---------------- the Shui Hau Tour (tour.js): the map first, the stops below, a stop opens as a sheet */
.tour { max-width: 1100px; }
.tr-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.tr-bar .tr-routes { margin: 0; }
.tr-gbtn { border: 1px solid var(--line-2); background: var(--solid); border-radius: 999px; padding: 9px 14px; font: 600 13px/1.2 "Inter", sans-serif; color: var(--ink); cursor: pointer; box-shadow: var(--shadow); }
.tr-gbtn .zh { color: var(--muted); }
.tr-gbtn.on { background: #fdf0d8; border-color: #ecc98a; color: #7a4a10; }
.tr-gbtn.on .zh { color: #9a6a2a; }
.tr-guide { background: #fdf6e6; border: 1px solid #f0dcae; border-radius: 14px; padding: 4px 14px 6px; margin: 10px 0; }
.tr-guide h4, .tr-card .tr-guide h4 { margin: 10px 0 4px; color: #7a4a10; font: 700 13.5px/1.3 "Inter", sans-serif; }
.tr-guide h5 { margin: 12px 0 2px; font: 700 12.5px/1.3 "Inter", sans-serif; color: #8a5a20; }
.tr-guide .tr-sum { margin: 8px 0; }
.tr-intro .tr-guide .zh { display: block; }
.tr-photo { margin: 12px 0 4px; }
.tr-photo .tr-ph { display: block; width: 100%; cursor: zoom-in; background: var(--soft); border-radius: 14px; }
/* the whole photo, never cropped (a portrait one, like the raptor perch, keeps its top and foot) */
.tr-photo .tr-ph img { width: auto; max-width: 100%; height: auto; max-height: 380px; margin: 0 auto; border-radius: 14px; display: block; }
.tr-photo figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
/* the other photos of a stop or path, small, in a row that scrolls sideways */
.tr-strip { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; scrollbar-width: thin; }
.tr-sm { flex: 0 0 auto; border: 2px solid transparent; padding: 0; border-radius: 9px; background: none; cursor: pointer; }
.tr-sm img { width: 64px; height: 48px; object-fit: cover; border-radius: 7px; display: block; }
.tr-sm.on { border-color: var(--teal); }
.tr-sm.vid { position: relative; }
.tr-sm.vid::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 16px; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.tr-vid { display: block; width: 100%; max-height: 380px; border-radius: 14px; background: #000; }
/* a stop's featured animals: round photos with names; one opens a note underneath */
.tr-feat h4 { margin: 14px 0 8px; }
.tr-frow { display: flex; flex-wrap: wrap; gap: 10px 8px; }
.tr-f { width: 78px; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 11.5px; line-height: 1.25; text-align: center; color: var(--ink); }
.tr-f img, .tr-f i { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; display: block; border: 3px solid var(--solid); box-shadow: 0 0 0 1.5px var(--line-2); background: var(--soft); }
.tr-f .zh { display: block; }
.tr-f.on img { box-shadow: 0 0 0 2.5px var(--teal); }
.tr-f-invasive img { box-shadow: 0 0 0 1.5px #d0583a; }
/* a featured bird with a 3D model to see on the pond (AR) */
.tr-f { position: relative; }
.tr-arb { position: absolute; top: -2px; left: 50%; margin-left: 14px; font: 700 9.5px/1 "Inter", sans-serif; letter-spacing: .04em;
  color: #fff; background: var(--teal); border: 2px solid var(--solid); border-radius: 999px; padding: 3px 5px; }
.tr-fpop .tr-ar { display: inline-block; margin: 6px 0 2px; text-decoration: none; background: var(--teal); border-color: var(--teal); color: #fff; }
.tr-fpop .tr-ar:hover { background: var(--teal-ink); }
.tr-fpop { position: relative; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); font-size: 13px; }
.tr-fpop img { width: 100%; max-height: 260px; object-fit: contain; background: var(--solid);  /* the whole photo: no cut heads */ border-radius: 10px; display: block; margin-bottom: 8px; }
.tr-fpop h5 { margin: 0 34px 4px 0; font: 700 14px/1.3 "Inter", sans-serif; }
.tr-fpop p { margin: 4px 0; }
.tr-fpop .tr-x { top: 6px; right: 6px; }
.tr-inv { display: inline-block; font-size: 11px; font-weight: 600; color: #fff; background: #d0583a; border-radius: 999px; padding: 1px 8px; vertical-align: 1px; }
/* two stops seen together (5 and 6): the second one's heading inside the same card */
.tr-head .tr-n + .tr-n { margin-left: -6px; }
.tr-pairh { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line-2); align-items: center; }
.tr-pairh h3 { margin: 0; font-size: 17px; }
/* a stop's thumbnail in the list; a reviewer's framing scales the photo inside it */
.tr-th { order: 3; flex: 0 0 64px; width: 64px; height: 48px; border-radius: 8px; margin-left: auto; overflow: hidden; display: block; }
.tr-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* the stretches of path with photos: under the stop they lead to, and in a stop's card */
.tr-legbtn { display: block; width: 100%; text-align: left; border: 1px dashed var(--line-2); background: none; color: var(--ink); border-radius: 10px;
  padding: 5px 10px; margin-bottom: 4px; font: inherit; font-size: 12.5px; cursor: pointer; }
.tr-legbtn:hover { background: var(--hover); }
.tr-legs { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 6px; }
.tr-legs .tr-legbtn { margin: 0; }
.tr-noend { opacity: .7; cursor: default; }
.tr-cam { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fffbe6; border: 2px solid #f0c419;
  box-shadow: 0 1px 4px rgba(0,0,0,.3); font-size: 12px; cursor: pointer; }
.tr-map.far .tr-cam { transform: scale(.75); }
.tr-expop { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.tr-expop .tr-ph img { width: 220px; height: 150px; object-fit: cover; border-radius: 10px; display: block; }
.tr-gcard h3 { margin: 0 40px 8px 0; font: 700 19px/1.25 "Montserrat", sans-serif; color: var(--teal-ink); }
.tr-gcard .tr-form { grid-template-columns: 1fr auto; align-items: center; }
.tr-gcard .tr-form input { font: inherit; border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px; }
.tr-gcard .tr-msg { grid-column: 1 / -1; }
.tr-routes { margin: 6px 0 12px; flex-wrap: wrap; }
.tr-routes button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; font-size: 13px; }
.tr-routes i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); }
.tr-map { height: min(62vh, 620px); position: relative; }
.tr-map.ill { background: #8fcbe0; }
.tr-routes button { white-space: nowrap; }
.tr-intro p { margin: 6px 0; }
.tr-intro .zh { display: block; color: var(--muted); }
.tr-how { background: #fff4d6; border: 1.5px solid #f0c419; border-radius: 12px; padding: 9px 13px; font-size: 13.5px; margin: 0 0 8px; color: var(--ink); }      /* above the map, so people notice it (Kani) */
.tr-how .zh { color: var(--teal-ink); opacity: .85; }
.tr-stops { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.tr-stops > li { display: flex; flex-direction: column; justify-content: flex-end; }      /* a path above a stop: the stops stay level */
.tr-stop { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--solid); border: 1px solid var(--line);
  border-radius: 16px; padding: 10px 12px; cursor: pointer; box-shadow: var(--shadow); font: inherit; color: var(--ink); position: relative; }
.tr-stop:hover { background: var(--hover); }
.tr-n { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 14px/1 "Montserrat", sans-serif; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.tr-n.big { flex-basis: 44px; width: 44px; height: 44px; font-size: 19px; }
.tr-t { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.4; min-width: 0; }
.tr-t b { color: var(--ink); font-size: 14px; }
.tr-t b .zh { color: var(--muted); font-weight: 600; }
.tr-pc, .tr-done, .tr-wait { position: absolute; right: 10px; top: 8px; font: 700 11px/1 "Inter", sans-serif; }
.tr-done { color: #2f8a4a; top: auto; bottom: 8px; font-size: 14px; }
.tr-wait { background: #fdf3cf; color: #8a6510; border: 1px solid #f3dc8c; border-radius: 999px; padding: 3px 7px; position: static; }
.tr-stop .tr-wait { position: absolute; }
.tr-staff { background: #fdf3cf; border: 1px solid #f3dc8c; color: #6a4e10; border-radius: 12px; padding: 8px 12px; }
.tr-rules ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.tr-rules .zh { display: block; color: var(--muted); }
.tr-src { margin: 12px 4px 20px; }
.tr-pin { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 14px/1 "Montserrat", sans-serif;
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.tr-pin.off { opacity: .55; transform: scale(.8); }
.tr-pin.seen::after { content: "✓"; position: absolute; right: -6px; top: -6px; width: 15px; height: 15px; border-radius: 50%; background: #2f8a4a; color: #fff; font-size: 10px; display: grid; place-items: center; }
/* stop names: very small when zoomed out, full size once zoomed in (.names, tour.js NAMES_Z) */
.tr-map .leaflet-tooltip.tr-name { padding: 0 4px; border-radius: 5px; font-size: 8.5px; line-height: 1.35; font-weight: 600; opacity: .9 !important; }
.tr-map .leaflet-tooltip.tr-name .zh { margin-left: 3px; }
.tr-map.names .tr-zl { display: none; }
.tr-map.far .leaflet-tooltip.tr-name { display: none; }
.leaflet-tooltip.tr-name { padding: 2px 7px; border: 0; border-radius: 8px; background: rgba(255,255,255,.94); box-shadow: 0 1px 4px rgba(0,0,0,.3);
  color: #1f2a26; font: 700 12px/1.25 "Inter", sans-serif; }
.leaflet-tooltip.tr-name::before { display: none; }
.leaflet-tooltip.tr-name .zh { margin-left: 5px; font-weight: 500; color: #4a5a54; }
.tr-map.names .leaflet-tooltip.tr-name { padding: 2px 7px; border-radius: 8px; font-size: 12px; line-height: 1.25; font-weight: 700; opacity: 1 !important; }
.tr-map.names .leaflet-tooltip.tr-name .zh { margin-left: 5px; }
.tr-lang { margin-left: auto; }
.tr-lang button { font-size: 12.5px; }
.tr-l-zh .tr-sum .zh, .tr-l-zh .tr-intro .zh { color: inherit; }
.tr-ex { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.3); font-size: 14px; }
.tr-ex-caution { background: #fff3c4; }
.tr-follow button span .zh { margin-left: 2px; }
.tr-sheet { position: fixed; inset: 0; z-index: 4000; background: rgba(20,30,28,.42); display: flex; align-items: flex-end; justify-content: center; }
.tr-card { position: relative; background: var(--solid); width: min(640px, 100%); max-height: 88vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 18px 20px 28px;
  box-shadow: 0 -10px 40px rgba(0,0,0,.25); -webkit-overflow-scrolling: touch; }
@media (min-width: 1001px) { .tr-sheet { align-items: center; } .tr-card { border-radius: 22px; } }
/* a wide screen: the open stop in a column beside the map (tour.js sideOn), clear of the Sizes / Find tabs */
.tr-side { display: none; }
@media (min-width: 1280px) {
  .tour { max-width: 1560px; padding-right: 40px; }
  .tr-cols { display: grid; grid-template-columns: minmax(0, 1100px) minmax(320px, 420px); gap: 18px; align-items: start; }
  .tr-main { min-width: 0; }
  .tr-side { display: block; position: sticky; top: 12px; }
  .tr-side .tr-card { width: auto; max-height: calc(100vh - 24px); border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
  .tr-side .tr-nav { grid-template-columns: 1fr 1fr; }
  .tr-side .tr-nav > :nth-child(2) { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
  .tr-hint p { margin: 0; color: var(--muted); line-height: 1.5; }
  .tr-hint b { color: var(--ink); }
  .tr-hint .zh { display: block; }
}
.tr-pin.sel { transform: scale(1.3); box-shadow: 0 0 0 4px rgba(255,255,255,.75), 0 2px 8px rgba(0,0,0,.45); }
.tr-x { position: absolute; right: 12px; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--solid); font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.tr-head { display: flex; gap: 12px; align-items: center; margin-right: 40px; }
.tr-head h3 { margin: 2px 0 0; font: 700 19px/1.25 "Montserrat", sans-serif; color: var(--teal-ink); }
.tr-head h3 .zh { color: var(--teal-ink); }
.tr-sum { padding-left: 18px; margin: 14px 0; display: grid; gap: 10px; }
.tr-sum li { line-height: 1.5; }
.tr-sum .zh { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; white-space: normal; }
.tr-sp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.tr-sp .chip { cursor: pointer; }
.tr-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; margin: 14px 0 6px; }
.tr-nav > :last-child { justify-self: end; }
.btn-s { border: 1px solid var(--line-2); background: var(--solid); border-radius: 999px; padding: 7px 12px; font: 600 12px/1.2 "Inter", sans-serif; cursor: pointer; color: var(--ink); }
.btn-s:hover { background: var(--hover); }
.btn-s.ok { background: #e3f3e3; border-color: #9fd3a6; color: #23602f; }
.btn-s.no { background: #fbe9e4; border-color: #f0b8a8; color: #9a3a1c; }
.btn { border: 0; background: var(--teal); color: #fff; border-radius: 999px; padding: 10px 20px; font: 700 14px/1 "Inter", sans-serif; cursor: pointer; }
.btn:disabled { opacity: .6; }
.tr-card h4 { margin: 18px 0 8px; font: 700 13.5px/1.3 "Inter", sans-serif; color: var(--forest); }
.tr-posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tr-post { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; background: var(--soft); border-radius: 14px; padding: 8px; }
.tr-post.pend { background: #fffbea; border: 1px dashed #e6c867; }
.tr-post p { margin: 0 0 4px; white-space: pre-wrap; }
.tr-ph { border: 0; padding: 0; background: none; cursor: zoom-in; }
.tr-ph img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; display: block; }
.tr-mod { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tr-form { display: grid; gap: 8px; margin-top: 4px; }
.tr-form textarea, .tr-form input[name=name] { font: inherit; width: 100%; border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px; background: var(--solid); color: var(--ink); }
.tr-file { display: block; border: 2px dashed var(--line-2); border-radius: 14px; padding: 12px; text-align: center; cursor: pointer; font-weight: 600; color: var(--teal-ink); }
.tr-file input { display: none; }
.tr-file .zh { color: var(--muted); font-weight: 500; }
.tr-prev img { max-width: 100%; max-height: 220px; border-radius: 12px; display: block; }
.tr-form .muted.small .zh, .tr-form p { white-space: normal; }
.tr-msg { color: var(--teal-ink); font-weight: 600; }
@media (max-width: 1000px) {
  .tr-map { height: 56vh; }
  .tr-stops { grid-template-columns: 1fr; }
  .tr-card { max-height: 84vh; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .tr-routes { display: flex; }
  .tr-routes button { flex: 1 1 auto; }
  .tr-follow button > span { font-size: 12px; }
}
@media (max-width: 760px) {      /* the Tour keeps its buttons' words, small, at the map's lower left */
  .tr-follow button span { display: inline; }
  .tr-follow button { width: auto; padding: 0 8px; height: 28px; gap: 4px; font-size: 11px; }
  .tr-follow button > span { font-size: 11px; }
  .tr-follow svg { width: 14px; height: 14px; }
  .tr-map .leaflet-bottom.leaflet-left .leaflet-control { margin-left: 8px; margin-bottom: 6px; }
  .tr-map .leaflet-bottom.leaflet-left .leaflet-control:last-child { margin-bottom: 22px; }      /* above the credit line */
}
.tr-map .geo-here { width: max-content; }
/* the big photo of a stop: ‹ › to the one before or after (and a swipe, and the arrow keys) */
.tr-bigw { position: relative; }
.tr-gnav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85);
  color: var(--ink); font-size: 26px; line-height: 1; padding: 0 0 3px; cursor: pointer; box-shadow: 0 1px 6px rgba(0,0,0,.3); display: grid; place-items: center; }
.tr-gnav.prev { left: 8px; }
.tr-gnav.next { right: 8px; }
.tr-gnav:hover { background: #fff; }
/* a culture stop's on-site panel, paraphrased: set apart, with its source */
.tr-panel { margin: 12px 0; padding: 10px 14px 6px; border-radius: 14px; background: #f3f6fb; border: 1px solid #d5deea; }
.tr-panel h4 { margin: 2px 0 6px; color: #3c5a85; }
.tr-panel .tr-sum { margin: 0 0 6px; }
.tr-panel .link { font-size: inherit; }
/* the photo checks' "add photos" tile (Tour stops and paths) */
.rv-t.rv-add { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px dashed var(--line-2); background: var(--solid); cursor: pointer; color: var(--muted); text-align: center; }
.rv-add span { font-size: 22px; line-height: 1; }
.rv-add small { font-size: 9px; line-height: 1.2; }
.rv-add:hover { border-color: var(--teal); color: var(--teal-ink); }

/* ---------------------------------------------------------------- 2026 Harvest Festival 水口豐饒節 (fest.js) */
.fest { max-width: 1180px; }
.fe-hero { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 24px; padding: 18px; align-items: center; }
.fe-poster { margin: 0; }
.fe-poster button { display: block; width: 100%; padding: 0; border: 0; border-radius: 16px; overflow: hidden; cursor: zoom-in; background: var(--sage-soft); }
.fe-poster img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .4s ease; }
.fe-poster button:hover img { transform: scale(1.03); }
.fe-poster figcaption { font-size: 12px; color: var(--muted); padding: 6px 2px 0; line-height: 1.4; }
.fe-poster figcaption .zh { display: block; }
.fe-kicker { margin: 0; font: 600 12px/1.4 "Inter", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--sand-ink); }
.fe-kicker .zh { text-transform: none; letter-spacing: 0; margin-left: 4px; }
.fe-hero h2 { margin: 4px 0 2px; font: 800 30px/1.15 "Montserrat", sans-serif; color: var(--teal-ink); }
.fe-hero h2 .zh { display: block; font: 700 26px/1.3 "Microsoft JhengHei", "PingFang TC", sans-serif; color: var(--forest); margin-top: 2px; }
.fe-theme { margin: 6px 0 14px; font: 600 15px/1.4 "Inter", sans-serif; color: var(--sage-ink); }
.fe-theme .zh { margin-left: 6px; }
.fe-facts { display: grid; gap: 8px; margin: 0 0 16px; }
.fe-facts div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.fe-facts dt { font-size: 12px; color: var(--muted); padding-top: 2px; }
.fe-facts dd { margin: 0; font-weight: 600; }
.fe-facts dd .zh { display: block; font-weight: 500; color: var(--ink); opacity: .8; }
.fe-cta { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 10px; }
.fe-btn { display: inline-flex; gap: 6px; align-items: center; padding: 11px 20px; border-radius: 999px; background: var(--teal); color: #fff; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
.fe-btn:hover { background: var(--teal-ink); }
.fe-btn .zh { color: #fff; }
.fe-early { font-size: 13px; color: var(--orange-ink); background: var(--orange-soft); border-radius: 999px; padding: 5px 12px; }
.fe-badge { display: inline-block; vertical-align: middle; font: 700 11px/1 "Inter", sans-serif; letter-spacing: .03em; color: var(--sand-ink); background: var(--sand-soft);
  border: 1px dashed var(--sand); border-radius: 999px; padding: 5px 9px; white-space: nowrap; }
.fe-badge .zh { font-weight: 600; margin-left: 2px; color: inherit; }
.fe-soon { margin: 16px 0; padding: 4px 18px 18px; }
.fe-soon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.fe-soon-c { border: 1px dashed var(--line-2); border-radius: var(--r-sm); padding: 14px; background: var(--soft); }
.fe-soon-top { display: flex; justify-content: space-between; align-items: center; }
.fe-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--teal-soft); }
.fe-ic svg { width: 22px; height: 22px; fill: none; stroke: var(--teal-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fe-soon-c h4 { margin: 10px 0 2px; font: 700 15px/1.3 "Montserrat", sans-serif; color: var(--teal-ink); }
.fe-soon-c h4 .zh { font-weight: 500; color: var(--muted); margin-left: 4px; }
.fe-who { margin: 0 0 6px; font-size: 12.5px; }
.fe-soon-c ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.45; }
.fe-soon-c li { margin: 4px 0; }
.fe-soon-c li .zh, .fe-notes li .zh { display: block; color: var(--muted); }
.fe-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.fe-body { padding: 22px 26px 18px; }
.fe-body p { max-width: 72ch; }
.fe-body p.zh { color: #3d5a55; margin-top: -4px; }
.fe-poem { border-left: 3px solid var(--sage); padding: 2px 0 2px 14px; margin: 6px 0 14px; }
.fe-poem p { margin: 6px 0; color: var(--muted); font-size: 13.5px; }
.fe-poem p .zh { display: block; color: var(--ink); font-size: 16px; line-height: 1.6; }
.fe-rice, .fe-bus, .fe-acts ul { padding-left: 20px; margin: 8px 0; }
.fe-rice li, .fe-bus li, .fe-acts li { margin: 4px 0; }
.fe-table-wrap { overflow-x: auto; }
.fe-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 8px; }
.fe-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.fe-table th .zh { display: block; font-weight: 500; }
.fe-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fe-table td .en { display: block; font-size: 12px; color: var(--muted); }
.fe-table td:not(:first-child) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fe-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.fe-acts section { background: var(--sage-soft); border-radius: var(--r-sm); padding: 10px 14px; }
.fe-acts h4 { margin: 2px 0 4px; font-size: 14px; color: var(--sage-ink); }
.fe-stalls { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.fe-stalls li { background: var(--sand-soft); color: var(--sand-ink); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; }
.fe-notes { padding-left: 20px; }
.fe-notes li { margin: 6px 0; }
.fe-gallery { position: sticky; top: 12px; }
.fe-gallery .pj-h { margin-top: 0; }
.fe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fest .chip { cursor: pointer; }
.home-fest { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; width: 100%; margin: 0 0 14px; padding: 10px 16px 10px 10px;
  border: 1px solid var(--sand); border-radius: var(--r-sm); background: linear-gradient(120deg, var(--sand-soft), var(--sage-soft)); text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.home-fest img { width: 84px; height: 105px; object-fit: cover; border-radius: 10px; }
.home-fest small { display: block; font-size: 12px; color: var(--sand-ink); }
.home-fest b { display: block; font: 800 18px/1.3 "Montserrat", sans-serif; color: var(--teal-ink); margin: 2px 0; }
.home-fest b .zh { font-weight: 700; color: var(--forest); margin-left: 4px; }
.home-fest > span > span:last-child { font-size: 13px; color: var(--muted); }
.home-fest:hover { border-color: var(--sand-ink); }
@media (max-width: 900px) {
  .fe-cols { grid-template-columns: 1fr; }
  .fe-gallery { position: static; }
  .fe-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 700px) {
  .fe-hero { grid-template-columns: 1fr; padding: 12px; gap: 14px; }
  .fe-hero .fe-poster.lead { max-width: 320px; margin: 0 auto; width: 100%; }
  .fe-hero h2 { font-size: 24px; }
  .fe-hero h2 .zh { font-size: 21px; }
  .fe-body { padding: 16px 14px; }
  .fe-soon { padding: 2px 12px 14px; }
}
.views .vf .zh { display: block; font-size: 12px; margin-top: 1px; }
.fe-rice-row { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 16px; align-items: center; margin: 10px 0; }
.fe-rice-fig { margin: 0; }
.fe-rice-fig button { display: block; width: 100%; padding: 0; border: 0; border-radius: 16px; overflow: hidden; cursor: zoom-in; background: var(--sand-soft); }
.fe-rice-fig img { display: block; width: 100%; height: auto; transition: transform .4s ease; }
.fe-rice-fig button:hover img { transform: scale(1.03); }
.fe-rice-fig figcaption { font-size: 12px; color: var(--muted); padding: 6px 2px 0; }
.fe-rice-row .fe-rice li { margin: 8px 0; }
.fe-rice-row .fe-rice li .zh { display: block; font-weight: 600; }
@media (max-width: 700px) { .fe-rice-row { grid-template-columns: 1fr; } }

/* the 2026 Harvest Festival menu item: a golden paddy pill with a date tag, set apart from the other pages */
.views button.fest-nav, .drawer button.fest-nav { position: relative; overflow: hidden; margin: 6px 0;
  background: linear-gradient(115deg, #fbe7b0 0%, #f5d27a 45%, #dfe9b8 100%); color: #5b3f0c;
  border: 1px solid #e3b955; box-shadow: 0 2px 10px rgba(201, 145, 30, .22); font-weight: 700; }
.views button.fest-nav svg, .drawer button.fest-nav svg { flex: none; width: 30px; height: 30px; padding: 5px; box-sizing: border-box; border-radius: 50%;
  background: #fff8e6; color: #b07a12; stroke: #b07a12; stroke-width: 2; box-shadow: inset 0 0 0 1px #e9c66f; }
.fest-nav .vf { flex: 1; min-width: 0; line-height: 1.25; }
.views button.fest-nav .zh, .drawer button.fest-nav .zh { color: #7a5a17; font-weight: 600; }
.fest-nav .fn-date { flex: none; margin-left: auto; font: 800 11px/1 "Inter", sans-serif; letter-spacing: .02em; color: #fff;
  background: #b07a12; border-radius: 999px; padding: 4px 7px; }
.fest-nav::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(-120%); animation: fest-shine 5s ease-in-out 1.2s infinite; }
@keyframes fest-shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .fest-nav::after { animation: none; display: none; } }
.views button.fest-nav:hover, .drawer button.fest-nav:hover { filter: brightness(1.04); background: linear-gradient(115deg, #fbe7b0 0%, #f5d27a 45%, #dfe9b8 100%); }
.views button.fest-nav.on, .drawer button.fest-nav.on { border-color: #b07a12; box-shadow: 0 0 0 2px rgba(176, 122, 18, .35), 0 2px 10px rgba(201, 145, 30, .25);
  background: linear-gradient(115deg, #fbe7b0 0%, #f5d27a 45%, #dfe9b8 100%); color: #4a3208; }
.drawer button.fest-nav .tb-t { flex: 1; }
.drawer button.fest-nav { gap: 10px; padding: 10px; font-size: 14.5px; }
.drawer button.fest-nav .tb-t .zh { display: block; margin: 2px 0 0; font-size: 12px; }

/* home page: who made the guide (HKBWS) and who designed it (Catowl Design Studio) */
.home-credit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.home-credit .hc-org { display: inline-flex; align-items: center; border-radius: 10px; }
.home-credit .hc-org img { display: block; width: auto; }
.home-credit .hc-org:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 3px; }
.home-credit .hc-x { width: 1px; align-self: stretch; min-height: 40px; background: var(--line-2); }
.home-credit p { flex: 1 1 260px; margin: 0; font-size: 14px; line-height: 1.5; }
.home-credit p .zh { display: block; color: var(--muted); font-size: 13px; }
