/* Always Nut Free: Simple family look (SIMPLE-REELS-DESIGN-RULES.md) in its own Leaf green #2F855A.
   Outfit, light by default, soft dark mode on the sun/moon switch, thin soft lines, plenty of space. Nothing moves. */

@font-face { font-family: "Outfit"; font-weight: 100 900; font-display: swap; src: url("/fonts/outfit-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Outfit"; font-weight: 100 900; font-display: swap; src: url("/fonts/outfit-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --brand: #2f855a; --brand-text: #276749; --on-brand: #ffffff;
  --text: #1e293b; --muted: #475569; --line: #e2e8f0; --bg: #f8fafc; --card: #ffffff; --tint: #eef7f1;
  --notice: #f3f8f4; --notice-line: #cfe5d6; --error: #b42318;
  --font: "Outfit", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #2f855a; --brand-text: #7bc59a; --on-brand: #ffffff;
  --text: #f1f5f9; --muted: #b6c2d4; --line: #263247; --bg: #0f1a1c; --card: #16232a; --tint: #1b2e2b;
  --notice: #18292a; --notice-line: #2c4a40; --error: #f4a29a;
  color-scheme: dark;
}
:lang(ar), :lang(ur) { --font: "Segoe UI", "Noto Sans Arabic", Tahoma, system-ui, sans-serif; }
:lang(ur) { --font: "Noto Nastaliq Urdu", "Segoe UI", "Noto Sans Arabic", Tahoma, system-ui, sans-serif; }
:lang(hi) { --font: "Nirmala UI", "Noto Sans Devanagari", "Segoe UI", system-ui, sans-serif; }
:lang(ja) { --font: "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", "Meiryo", system-ui, sans-serif; }
:lang(ko) { --font: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif; }
:lang(th) { --font: "Leelawadee UI", "Noto Sans Thai", Tahoma, system-ui, sans-serif; }
:lang(th) body, body:lang(th) { line-height: 1.75; }
bdi[dir="ltr"], .name[dir="ltr"] { unicode-bidi: isolate; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 17px; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
a { color: var(--brand-text); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
h1 { font-size: 24px; font-weight: 600; line-height: 1.3; margin: 0 0 12px; }
h2 { font-size: 18px; font-weight: 600; line-height: 1.35; margin: 0 0 8px; }
h3 { font-size: 16px; font-weight: 500; margin: 0 0 4px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.pre { white-space: pre-line; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 30; }
.hwrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 32px; height: 32px; }
.brand .name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand .tm { font-size: 0.6em; vertical-align: super; font-weight: 500; }
.nav { display: flex; gap: 4px; }
.nav a, .menu .panel a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: 15px; }
.nav a:hover, .menu .panel a:hover { background: var(--tint); }
.nav a[aria-current] { color: var(--brand-text); background: var(--tint); }
.header-tools { display: flex; align-items: center; gap: 6px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.lang-pop, .menu { position: relative; }
.lang-pop summary, .menu summary, .theme-toggle { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font: 500 14px var(--font); }
.lang-pop summary:hover, .menu summary:hover, .theme-toggle:hover, details[open] > summary { background: var(--tint); border-color: var(--notice-line); }
.lang-pop svg, .theme-toggle svg { width: 18px; height: 18px; }
.lang-panel, .menu .panel { position: absolute; inset-inline-end: 0; top: 44px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-width: 200px; max-height: 70vh; overflow: auto; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08); display: grid; z-index: 40; }
.lang-panel a { color: var(--text); text-decoration: none; padding: 7px 10px; border-radius: 8px; font-size: 15px; }
.lang-panel a:hover, .lang-panel a[aria-current] { background: var(--tint); color: var(--brand-text); }
.theme-toggle { cursor: pointer; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.menu { display: none; }
@media (max-width: 760px) { .nav { display: none; } .menu { display: block; } .brand .name { font-size: 0.98rem; } }

/* ---------- page ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 28px; padding-bottom: 48px; min-height: 60vh; }
.preview-flag { background: var(--tint); border: 1px solid var(--notice-line); border-radius: 10px; padding: 8px 12px; font-size: 14px; color: var(--muted); }
.hero { padding: 12px 0 18px; max-width: 760px; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.lead { font-size: 19px; color: var(--muted); margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 0 0 14px; }
.narrow { max-width: 520px; }
.notice { background: var(--notice); border: 1px solid var(--notice-line); border-radius: 12px; padding: 14px 18px; margin: 0 0 16px; }
.notice h2 { margin-bottom: 4px; }
.notice p { margin: 0; }
.notice.small { padding: 8px 12px; font-size: 14px; color: var(--muted); border-radius: 10px; margin: 10px 0 12px; }
.notice.strong { font-weight: 500; }
.tag { display: inline-block; font-size: 13px; font-weight: 500; color: var(--muted); background: var(--tint); border-radius: 999px; padding: 2px 10px; margin: 6px 0 0; }
.toast { background: var(--tint); border: 1px solid var(--notice-line); border-radius: 10px; padding: 10px 14px; }
.error { color: var(--error); margin: 0; }

/* tabs */
.tabs { display: flex; gap: 6px; margin: 6px 0 14px; }
.tabs a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); background: var(--card); font-weight: 500; }
.tabs a[aria-current] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* forms */
.stack { display: grid; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 12px; }
.row > .field, .row > .picker { flex: 1 1 240px; }
.row > .small-field { flex: 0 1 200px; }
.field { display: grid; gap: 4px; }
.field > span, .field label > span { font-size: 14px; font-weight: 500; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; font: 16px var(--font); color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea { resize: vertical; }
.tick { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.tick input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.picker { position: relative; }
.picks { position: absolute; z-index: 20; inset-inline: 0; top: 100%; list-style: none; margin: 4px 0 0; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08); }
.picks button { width: 100%; text-align: start; background: none; border: 0; padding: 8px 10px; border-radius: 8px; font: 15px var(--font); color: var(--text); cursor: pointer; }
.picks button:hover { background: var(--tint); }
.near { align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--brand); background: var(--brand); color: var(--on-brand); font: 500 15px var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: var(--card); color: var(--brand-text); border-color: var(--notice-line); }
.btn.ghost:hover { background: var(--tint); }
.btn:disabled { opacity: 0.6; cursor: default; }
.file-btn { position: relative; }
.link { background: none; border: 0; padding: 0; color: var(--brand-text); font: inherit; text-decoration: underline; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }

/* results */
.list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.item { margin: 0; }
.item h3 a { color: var(--text); text-decoration: none; }
.item h3 a:hover { color: var(--brand-text); }
.item p { margin: 0 0 4px; }
.practice { color: var(--text); }
.product { display: grid; grid-template-columns: 96px 1fr; gap: 14px; }
.thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--tint); }
.choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.choice-card { text-decoration: none; color: var(--text); }
.choice-card:hover { border-color: var(--notice-line); background: var(--tint); }

/* detail pages */
.detail { max-width: 760px; }
.photos { display: grid; gap: 12px; grid-template-columns: 2fr 1fr; margin: 0 0 12px; }
.photos figure { margin: 0; }
.photos img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--tint); }
.photos figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }
@media (max-width: 600px) { .photos { grid-template-columns: 1fr; } }
.seen { padding-inline-start: 18px; margin: 0; }
.row-item { border-top: 1px solid var(--line); padding: 12px 0; }
.row-item:first-of-type { border-top: 0; }
.row-item p { margin: 0 0 4px; }
.invite { font-size: 14px; word-break: break-all; }
.prose { max-width: 760px; }
.prose h1 { margin-top: 0; }
.prose h2 { margin-top: 20px; }

/* report dialog */
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); padding: 20px; max-width: min(480px, 92vw); }
dialog::backdrop { background: rgba(15, 23, 42, 0.35); }
.choice { display: grid; gap: 8px; margin: 0 0 12px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 24px 0 36px; color: var(--muted); font-size: 14px; }
.site-foot p { margin: 0 0 8px; }
.foot-line { color: var(--text); }

/* header: keep the name on one line on small phones */
@media (max-width: 420px) { .brand { min-width: 0; flex: 1 1 auto; } .brand .name { font-size: 0.9rem; line-height: 1.15; } .brand img { width: 28px; height: 28px; } .hwrap { gap: 8px; } }

/* "ask this place to join": the card and its QR code; printing shows only the card */
#ask textarea { font-size: 15px; }
.print-card { border: 1px dashed var(--notice-line); border-radius: 12px; padding: 16px; }
.qr { width: 168px; max-width: 60vw; background: #ffffff; padding: 6px; border-radius: 8px; }
.qr svg { display: block; width: 100%; height: auto; }
@media print {
  body * { visibility: hidden; }
  #print-card, #print-card * { visibility: visible; }
  #print-card { position: absolute; inset: 0 auto auto 0; width: 100%; border: 0; color: #000; }
}

/* App only: while the camera scanner is open, the page steps aside so the camera shows, with one bar to cancel */
html.scanning, html.scanning body { background: transparent !important; }
html.scanning body > *:not(#scan-bar) { visibility: hidden; }
#scan-bar { position: fixed; inset: auto 0 0 0; z-index: 50; background: var(--card); border-top: 1px solid var(--line); padding: 16px 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#scan-bar p { margin: 0; }

.partner { margin-top: 18px; }
.partner p { margin: 0 0 4px; }
/* A long email address or link must wrap, not push the page sideways (seen on the Fold, 30 Nov 2026). */
main p, main li, footer p { overflow-wrap: anywhere; }
