/* Hod Hasharon lost & found board.
   One idea: paper notices on a painted community board, with a big poster word.
   Spacing scale (px): 0 1 2 4 8 12 16 20 24 32 40 48 56 64 72 80 96 */

@font-face {
  font-family: 'Karantina';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/karantina-hebrew-700-normal.woff2') format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Karantina';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/karantina-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Assistant';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/assistant-hebrew-wght-normal.woff2') format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Assistant';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/assistant-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --board: #cfd5c8;
  --board-edge: #b9c1b1;
  --paper: #fffefa;
  --paper-2: #f4f3ec;
  --ink: #1d2320;
  --ink-2: #48514c;
  --line: #c6cbc0;
  --lost: #b42318;
  --lost-ink: #ffffff;
  --found: #146c43;
  --found-ink: #ffffff;
  --tape: #f0cf4e;
  --mine: #f2d35c;
  --mine-ink: #1d2320;
  --focus: #0b57a3;
  --danger: #9b1c14;
  --shadow: 0 1px 1px rgb(29 35 32 / 0.06), 0 2px 4px rgb(29 35 32 / 0.06), 0 8px 16px -4px rgb(29 35 32 / 0.12);
  --shadow-lift: 0 2px 2px rgb(29 35 32 / 0.06), 0 6px 12px rgb(29 35 32 / 0.08), 0 16px 32px -8px rgb(29 35 32 / 0.18);
  --display: 'Karantina', 'Assistant', 'Arial Hebrew', Arial, sans-serif;
  --body: 'Assistant', 'Arial Hebrew', Arial, sans-serif;
  --radius: 4px;
  --header-h: 56px;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --board: #161a18;
  --board-edge: #0f1211;
  --paper: #242a27;
  --paper-2: #2d3430;
  --ink: #eef0ea;
  --ink-2: #c0c8c2;
  --line: #45504a;
  --lost: #ff9a8f;
  --lost-ink: #1d0a07;
  --found: #74d6a0;
  --found-ink: #06190f;
  --tape: #b99a2c;
  --mine: #f0d266;
  --mine-ink: #1d1a08;
  --focus: #8cc4ff;
  --danger: #ff9a8f;
  --shadow: 0 1px 1px rgb(0 0 0 / 0.3), 0 4px 10px rgb(0 0 0 / 0.3);
  --shadow-lift: 0 2px 2px rgb(0 0 0 / 0.3), 0 10px 24px rgb(0 0 0 / 0.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block-start: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--board);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
bdi, [dir='ltr'] { unicode-bidi: isolate; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.wrap { max-inline-size: 1200px; margin-inline: auto; padding-inline: 16px; }
.narrow { max-inline-size: 720px; }

.skip-link {
  position: absolute; inset-inline-start: 16px; inset-block-start: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: var(--radius); font-weight: 700;
}
.skip-link:focus { inset-block-start: 8px; }

/* ---- Progress bar ---- */
.progress { position: fixed; inset-block-start: 0; inset-inline: 0; block-size: 3px; z-index: 60; pointer-events: none; }
.progress-bar { block-size: 100%; background: var(--ink); transform-origin: right; transform: scaleX(0); }

/* ---- Header ---- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: var(--paper); border-block-end: 1px solid var(--line);
}
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-block-size: var(--header-h); padding-block: 4px; }
.logo {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 6vw, 1.75rem); line-height: 1.1;
  text-decoration: none; margin-inline-end: auto; padding-block: 8px;
  display: inline-flex; align-items: center; min-block-size: 44px;
}
.header-tools { display: flex; gap: 8px; }
.icon-btn {
  min-block-size: 44px; min-inline-size: 44px; padding: 8px 12px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; font-size: 0.9375rem; font-weight: 600;
}
.icon-btn:active { transform: translateY(1px); }
.theme-label-dark { display: none; }
:root[data-theme='dark'] .theme-label-light { display: none; }
:root[data-theme='dark'] .theme-label-dark { display: inline; }

.site-nav { flex-basis: 100%; display: none; }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; display: flex; flex-direction: column; padding-block: 8px; }
.site-nav a {
  display: flex; align-items: center; min-block-size: 44px; padding-inline: 8px;
  text-decoration: none; font-weight: 600; border-radius: var(--radius);
}
.site-nav a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 2px; }
:root:not(.js) .site-nav { display: block; }
/* Without JavaScript the menu is always open and the buttons that need scripts are hidden. */
:root:not(.js) .menu-btn, :root:not(.js) [data-theme-toggle] { display: none; }
.nav-theme { display: none; }
.nav-theme-btn {
  display: flex; align-items: center; inline-size: 100%; min-block-size: 44px; padding-inline: 8px;
  background: transparent; border: 0; border-radius: var(--radius); font-weight: 600; cursor: pointer; text-align: start;
}
@media (max-width: 379px) {
  .theme-btn-header { display: none; }
  .nav-theme { display: block; }
}
@media (hover: hover) { .nav-theme-btn:hover { background: var(--paper-2); } }

@media (min-width: 900px) {
  .menu-btn { display: none; }
  .site-nav { display: block; flex-basis: auto; order: 2; }
  .header-tools { order: 3; }
  .site-nav ul { flex-direction: row; gap: 4px; padding: 0; }
  .site-nav a { padding-inline: 12px; }
}

/* ---- Breadcrumbs ---- */
/* One "back to the board" link; the page path stays in the structured data. The arrow points right: back, in Hebrew. */
.crumbs { padding-block: 16px 0; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; padding: 8px 16px 8px 20px;
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); color: var(--ink);
  font-size: 1rem; font-weight: 700; text-decoration: none; box-shadow: var(--shadow);
  transition: transform 120ms ease;
}
.back-arrow { font-size: 1.25rem; line-height: 1; }
.back-link:active { transform: translateY(1px); }
@media (hover: hover) { .back-link:hover { background: var(--paper-2); } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-block-size: 48px; padding: 8px 20px;
  border: 2px solid transparent; border-radius: var(--radius);
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform 120ms ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { cursor: progress; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-quiet { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-found { background: var(--found); color: var(--found-ink); }
.btn-lost { background: var(--lost); color: var(--lost-ink); }
.btn-danger { background: var(--paper); color: var(--danger); border-color: var(--danger); }
.btn-big { min-block-size: 56px; padding-inline: 32px; font-size: 1.125rem; }

@media (hover: hover) {
  .btn-ink:hover { background: color-mix(in srgb, var(--ink) 82%, var(--board)); }
  .btn-quiet:hover, .icon-btn:hover { background: var(--paper-2); }
  .btn-found:hover { background: color-mix(in srgb, var(--found) 85%, var(--ink)); }
  .btn-lost:hover { background: color-mix(in srgb, var(--lost) 85%, var(--ink)); }
  .btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, var(--paper)); }
  .site-nav a:hover, .site-footer a:hover { text-decoration-thickness: 2px; }
  .site-nav a:hover { background: var(--paper-2); }
}

/* ---- Intro: the two big actions ---- */
.intro { padding-block: 24px 32px; }
.intro-title { font-size: 1.25rem; font-weight: 700; margin-block-end: 16px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  min-block-size: 120px; padding: 16px; border-radius: var(--radius);
  text-decoration: none; box-shadow: var(--shadow);
  transition: transform 140ms ease;
}
.action-lost { background: var(--lost); color: var(--lost-ink); }
.action-found { background: var(--found); color: var(--found-ink); }
.action-word { font-family: var(--display); font-weight: 700; font-size: 3.5rem; line-height: 0.95; }
.action:active { transform: translateY(2px); }
@media (hover: hover) { .action:hover { transform: translateY(-2px); } }
/* "My notices": a yellow note under the two actions, the third thing people come here for */
.mine-card {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-block-size: 96px; padding: 16px; border-radius: var(--radius);
  background: var(--mine); color: var(--mine-ink); text-decoration: none; box-shadow: var(--shadow);
  transition: transform 140ms ease;
}
.mine-card-text { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }
.mine-card-word { font-family: var(--display); font-weight: 700; font-size: 2.75rem; line-height: 0.95; }
.mine-card-sub { font-size: 1rem; font-weight: 600; text-wrap: balance; }
.mine-card-go {
  flex: none; display: inline-flex; align-items: center; min-block-size: 48px; padding: 8px 20px;
  border-radius: var(--radius); background: var(--mine-ink); color: var(--mine); font-weight: 700;
}
.mine-card:active { transform: translateY(2px); }
@media (hover: hover) { .mine-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); } }
@media (max-width: 379px) { .mine-card-go { padding-inline: 16px; } }
@media (min-width: 760px) {
  .intro { padding-block: 40px 48px; }
  .intro-title { font-size: 1.5rem; }
  .actions { max-inline-size: 760px; gap: 16px; }
  .action { min-block-size: 160px; padding: 24px; }
  .action-word { font-size: 5rem; }
  .mine-card { min-block-size: 120px; padding: 20px 24px; }
  .mine-card-word { font-size: 3.5rem; }
  .mine-card-sub { font-size: 1.125rem; }
}

/* ---- Board ---- */
.board { padding-block: 0 64px; }
.board-title { font-size: 1.25rem; margin-block-end: 12px; }
.search { display: grid; gap: 12px; margin-block-end: 24px; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-inline-size: 0; }
.contact-mode { margin-block-end: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.search-clear a { display: inline-block; padding-block: 8px; font-weight: 600; }

input[type='text'], input[type='search'], input[type='date'], textarea {
  inline-size: 100%; min-block-size: 48px; padding: 8px 12px;
  background: var(--paper); border: 2px solid var(--ink-2); border-radius: var(--radius);
  font-size: 1.0625rem;
}
textarea { resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--ink-2); opacity: 1; }
input[type='date'] { max-inline-size: 240px; }
[aria-invalid='true'] { border-color: var(--lost) !important; }

/* Segmented choices: real radio buttons, square corners, never pills */
fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.seg { display: flex; flex-wrap: wrap; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-opt span {
  display: flex; align-items: center; min-block-size: 44px; padding-inline: 14px;
  background: var(--paper); border: 1px solid var(--ink-2); margin-inline-start: -1px;
  font-weight: 600; font-size: 0.9375rem;
}
.seg-opt:first-of-type span { border-start-start-radius: var(--radius); border-end-start-radius: var(--radius); margin-inline-start: 0; }
.seg-opt:last-of-type span { border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); }
.seg-opt input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; position: relative; z-index: 1; }
@media (hover: hover) { .seg-opt input:not(:checked):hover + span { background: var(--paper-2); } }

/* ---- Notices ---- */
/* Each notice keeps its own height, like paper on a board: one without a photo is just its text. */
.notes { list-style: none; display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 520px) { .notes { grid-template-columns: repeat(2, 1fr); gap: 24px 20px; } }
@media (min-width: 900px) { .notes { grid-template-columns: repeat(3, 1fr); gap: 32px 24px; } }
@media (min-width: 1180px) { .notes { grid-template-columns: repeat(4, 1fr); } }

.note { position: relative; display: flex; flex-direction: column; }
.note-link {
  position: relative; display: flex; flex-direction: column; flex: 1;
  background: var(--paper); color: var(--ink); text-decoration: none;
  padding: 12px; border-radius: 2px; box-shadow: var(--shadow);
  transition: transform 160ms ease;
}
.tilt-a .note-link { transform: rotate(-0.6deg); }
.tilt-b .note-link { transform: rotate(0.5deg); }
.tilt-c .note-link { transform: rotate(-0.2deg); }
@media (hover: hover) {
  .note-link:hover { transform: rotate(0deg) translateY(-3px); box-shadow: var(--shadow-lift); }
}
.note-link:active { transform: rotate(0deg) translateY(0); }
/* One strip of tape, only on notices with a photo */
.note-photo::before {
  content: ''; position: absolute; inset-block-start: -10px; inset-inline-start: 50%;
  inline-size: 72px; block-size: 20px; translate: 50% 0; rotate: -3deg;
  background: var(--tape); opacity: 0.85; z-index: 1;
}
.note-photo {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden;
}
.note-photo img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: contain; }
/* Category drawing in the corner, beside the big word; with no photo the notice is only its text */
.cat-icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.note-head, .post-word-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cat-icon-small { inline-size: 32px; block-size: 32px; stroke-width: 1.8; }
.cat-icon-post { inline-size: 48px; block-size: 48px; }
.note-lost .cat-icon-small, .post-lost .cat-icon-post { color: var(--lost); }
.note-found .cat-icon-small, .post-found .cat-icon-post { color: var(--found); }
.note-body { display: grid; gap: 4px; padding-block-start: 12px; }
.note-body:first-child { padding-block-start: 0; }
.note-word { font-family: var(--display); font-weight: 700; font-size: 3rem; line-height: 1; }
.note-lost .note-word { color: var(--lost); }
.note-found .note-word { color: var(--found); }
/* The end of a notice, confirmed by its poster: a rubber stamp in green ink, "נמצא" or "הוחזר".
   Two lines of ink (the border and an inset outline) and a slight tilt, like a real stamp pressed by hand. */
.stamp {
  justify-self: start; inline-size: fit-content; margin-block: 4px;
  padding: 2px 14px 4px; border: 3px solid currentColor; border-radius: 6px;
  outline: 2px solid currentColor; outline-offset: -8px;
  color: var(--found); font-family: var(--display); font-weight: 700; line-height: 1.1;
  transform: rotate(-6deg); transform-origin: center;
}
.note-stamp { font-size: 1.5rem; padding: 2px 14px 4px; border-width: 2.5px; outline-width: 1.5px; outline-offset: -7px; }
.post-stamp { font-size: 3rem; padding: 4px 20px 8px; outline-offset: -10px; margin-block: 8px; }
/* The moment it is pressed: it comes down from above, lands a little too hard, settles. */
.stamp-new { animation: stamp-down 560ms cubic-bezier(0.2, 0.8, 0.3, 1) both; }
@keyframes stamp-down {
  0% { opacity: 0; transform: rotate(-16deg) scale(2.6); }
  50% { opacity: 1; transform: rotate(-5deg) scale(0.9); }
  72% { transform: rotate(-6.5deg) scale(1.05); }
  100% { opacity: 1; transform: rotate(-6deg) scale(1); }
}
/* The paper under it takes the hit. */
.jolt { animation: jolt 300ms ease-out 260ms; }
@keyframes jolt {
  0%, 100% { transform: none; }
  30% { transform: translateY(4px) scale(0.994); }
  60% { transform: translateY(-1px); }
}
.owner-done { flex-basis: 100%; font-weight: 700; color: var(--mine-ink); }
.owner-done:focus { outline: none; }
.is-returned .note-photo img { opacity: 0.85; }
.note-title { font-size: 1.125rem; font-weight: 700; }
.note-meta { color: var(--ink-2); font-size: 0.9375rem; }
.more { margin-block-start: 32px; text-align: center; }

/* ---- States ---- */
.state {
  background: var(--paper); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; gap: 8px; justify-items: start;
}
.state-title { font-weight: 700; font-size: 1.125rem; }
.state-error { border-inline-start: 6px solid var(--lost); }
.spinner {
  display: inline-block; inline-size: 18px; block-size: 18px; vertical-align: -3px;
  border: 3px solid var(--line); border-block-start-color: var(--ink); border-radius: 50%;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Single notice ---- */
.post { padding-block: 16px 64px; display: grid; gap: 24px; max-inline-size: 860px; }
.post-head { display: grid; gap: 8px; }
.post-word { font-family: var(--display); font-weight: 700; font-size: 5rem; line-height: 0.9; }
.post-lost .post-word { color: var(--lost); }
.post-found .post-word { color: var(--found); }
.post-title { font-size: 1.75rem; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.facts div { display: flex; gap: 8px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 700; }
.gallery { display: grid; gap: 16px; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.gallery-item {
  display: grid; gap: 8px; background: var(--paper); padding: 12px; box-shadow: var(--shadow);
  text-decoration: none; border-radius: 2px;
}
.gallery-item img { inline-size: 100%; block-size: auto; max-block-size: 420px; object-fit: contain; }
.gallery-hint { font-size: 0.9375rem; color: var(--ink-2); text-align: center; }
.post-text { background: var(--paper); padding: 20px; white-space: pre-line; border-radius: 2px; box-shadow: var(--shadow); font-size: 1.125rem; }
.contact-box { background: var(--paper); padding: 20px; display: grid; gap: 16px; border-radius: 2px; box-shadow: var(--shadow); }
.contact-box h2 { font-size: 1.25rem; }
.contact-result { font-size: 1.375rem; font-weight: 800; }
.contact-result a { text-decoration-thickness: 2px; }
.post-tools { display: flex; flex-wrap: wrap; gap: 12px; }
.post-posted { color: var(--ink-2); font-size: 0.9375rem; }

/* ---- Dialogs (at most 85% of the screen) ---- */
.dialog {
  border: 0; padding: 0; border-radius: var(--radius); background: var(--paper); color: var(--ink);
  inline-size: min(560px, 92vw); max-block-size: 85vh; max-block-size: 85dvh; box-shadow: var(--shadow-lift);
}
.dialog::backdrop { background: rgb(0 0 0 / 0.55); }
.dialog-body { display: grid; gap: 16px; padding: 24px; }
.dialog-body h2 { font-size: 1.375rem; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.choices { display: grid; gap: 4px; }
.choice, .check { display: flex; gap: 12px; align-items: flex-start; min-block-size: 44px; padding-block: 8px; cursor: pointer; }
.choice input, .check input { inline-size: 22px; block-size: 22px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }
.photo-dialog { inline-size: min(1100px, 96vw); max-block-size: 85vh; max-block-size: 85dvh; }
.photo-dialog-inner { display: grid; gap: 12px; padding: 12px; justify-items: center; }
.photo-dialog img { max-block-size: calc(85vh - 96px); max-block-size: calc(85dvh - 96px); inline-size: auto; object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  .dialog[open] { animation: rise 160ms ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ---- Forms ---- */
.page-title { font-size: 2rem; padding-block: 24px 8px; }
.lead { color: var(--ink-2); margin-block-end: 24px; }
.form { display: grid; gap: 24px; background: var(--paper); padding: 20px 16px; border-radius: 2px; box-shadow: var(--shadow); margin-block-end: 64px; }
@media (min-width: 640px) { .form { padding: 32px; } }
.field { display: grid; gap: 8px; }
.field > label, .field > legend, .field-label { font-weight: 700; font-size: 1.0625rem; padding: 0; }
.field > legend { margin-block-end: 8px; }
.hint { color: var(--ink-2); font-size: 0.9375rem; }
.field-error { color: var(--lost); font-weight: 700; font-size: 0.9375rem; }
.field-error::before { content: '! '; }
.big-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.big-opt { position: relative; }
.big-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.big-opt span {
  display: grid; place-items: center; min-block-size: 80px; border: 3px solid currentColor; border-radius: var(--radius);
  font-family: var(--display); font-weight: 700; font-size: 2.5rem; line-height: 1;
}
.big-lost { color: var(--lost); }
.big-found { color: var(--found); }
.big-lost input:checked + span { background: var(--lost); color: var(--lost-ink); border-color: var(--lost); }
.big-found input:checked + span { background: var(--found); color: var(--found-ink); border-color: var(--found); }
.big-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.only-found, .only-found-block { display: none; }
.form[data-kind='found'] .only-found { display: inline; }
.form[data-kind='found'] .only-lost { display: none; }
.form[data-kind='found'] .only-found-block { display: block; }
.file-pick { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.file-pick input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.file-pick input:focus-visible + .btn { outline: 3px solid var(--focus); outline-offset: 2px; }
.file-count { color: var(--ink-2); font-size: 0.9375rem; }
.previews { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.previews li { display: grid; gap: 4px; justify-items: center; inline-size: 120px; font-size: 0.875rem; }
.previews img { inline-size: 120px; block-size: 90px; object-fit: contain; background: var(--paper-2); }
.rules, .law { background: var(--paper-2); padding: 16px; border-radius: var(--radius); font-size: 0.9375rem; display: grid; gap: 8px; }
.privacy-notice { color: var(--ink-2); font-size: 0.9375rem; }
.rules h2, .law h2 { font-size: 1.0625rem; }
.rules ul { padding-inline-start: 20px; }
.law { border-inline-start: 6px solid var(--found); }
.submit-row { display: grid; gap: 12px; justify-items: start; }
.form-status { font-weight: 700; min-block-size: 1.6em; }
.form-success { color: var(--found); font-weight: 700; }
.error-summary { background: var(--paper); border: 3px solid var(--lost); padding: 16px 20px; margin-block-end: 24px; border-radius: var(--radius); }
.error-summary h2 { font-size: 1.125rem; margin-block-end: 8px; }
.error-summary ul { padding-inline-start: 20px; }
.error-summary a { color: var(--lost); font-weight: 700; display: inline-block; padding-block: 4px; }
.success { background: var(--paper); padding: 24px; display: grid; gap: 16px; border-inline-start: 6px solid var(--found); box-shadow: var(--shadow); margin-block-end: 64px; }
.success h2 { font-family: var(--display); font-size: 3rem; line-height: 1; color: var(--found); }
.private-link { display: grid; gap: 8px; }
.private-link label { font-weight: 700; }
#edit-photos { margin-block-end: 24px; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-end: 16px; }
.turnstile-slot:empty { display: none; }

/* ---- Prose pages ---- */
.prose { padding-block-end: 64px; }
.prose h2 { font-size: 1.25rem; margin-block: 32px 8px; }
.prose p, .prose ul, .prose ol { margin-block-end: 12px; max-inline-size: 70ch; }
.prose ul, .prose ol { padding-inline-start: 24px; }
.prose li { margin-block-end: 4px; }
.updated { color: var(--ink-2); margin-block-end: 8px; }
.steps li { padding-block: 4px; }
.faq { display: grid; gap: 8px; }
.faq-item { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }
.faq-item summary { min-block-size: 48px; padding: 12px 16px; cursor: pointer; font-weight: 700; list-style-position: inside; }
.faq-item p { padding: 0 16px 16px; margin: 0; }
@media (hover: hover) { .faq-item summary:hover { background: var(--paper-2); } }

/* ---- Admin ---- */
.admin-list { list-style: none; display: grid; gap: 16px; padding-block-end: 64px; }
.admin-item { background: var(--paper); padding: 16px; display: grid; gap: 12px; box-shadow: var(--shadow); border-radius: 2px; }
.admin-item.is-hidden { border-inline-start: 6px solid var(--lost); }
@media (min-width: 900px) { .admin-item { grid-template-columns: 220px 1fr auto; align-items: start; } }
.admin-photos { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-photos img { inline-size: 96px; block-size: 96px; object-fit: contain; background: var(--paper-2); }
.admin-word { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1; }
.post-lost .admin-word { color: var(--lost); }
.post-found .admin-word { color: var(--found); }
.admin-title { font-size: 1.125rem; }
.admin-meta, .admin-desc { font-size: 0.9375rem; }
.admin-desc { white-space: pre-line; color: var(--ink-2); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* My notices: the links this phone remembers */
.mine-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 16px; }
.mine-item { background: var(--paper); padding: 16px; display: grid; gap: 8px; box-shadow: var(--shadow); border-radius: 2px; }
.mine-word { font-family: var(--display); font-weight: 700; font-size: 2.5rem; line-height: 1; }
.mine-lost .mine-word { color: var(--lost); }
.mine-found .mine-word { color: var(--found); }
.mine-title { font-size: 1.25rem; overflow-wrap: anywhere; }
.mine-meta { color: var(--ink-2); font-size: 0.9375rem; }
.mine-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 4px; }
.mine-list:empty { display: none; }
.mine-start { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block-start: 8px; justify-self: stretch; }
.mine-note { margin-block: -8px 24px; }
/* The list is drawn from this phone's memory after load: keep the footer out of view so nothing visible moves. */
.mine-page { min-block-size: 100vh; min-block-size: 100dvh; padding-block-end: 32px; }

.error-page { padding-block: 48px 96px; display: grid; gap: 16px; justify-items: start; }

/* ---- Footer ---- */
.site-footer { background: var(--paper); border-block-start: 1px solid var(--line); padding-block: 32px 96px; }
.footer-inner { display: grid; gap: 12px; }
.footer-name { font-family: var(--display); font-weight: 700; font-size: 1.75rem; line-height: 1.1; }
.footer-name a { text-decoration: none; }
.footer-small { color: var(--ink-2); font-size: 0.9375rem; }
.footer-links { list-style: none; display: grid; gap: 0 24px; }
@media (min-width: 640px) { .footer-links { grid-template-columns: repeat(2, max-content); } }
.footer-links a { display: inline-flex; align-items: center; min-block-size: 44px; min-inline-size: 44px; }

/* ---- Floating buttons (small, at the bottom corners, never a bar) ---- */
.float-contact, .to-top {
  position: fixed; inset-block-end: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  min-block-size: 44px; padding: 8px 14px; border-radius: var(--radius);
  font-weight: 700; font-size: 0.9375rem; box-shadow: var(--shadow-lift); text-decoration: none; cursor: pointer;
}
.float-contact { inset-inline-start: 16px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); }
.to-top { inset-inline-end: 16px; background: var(--ink); color: var(--paper); border: 0; }
.to-top[hidden] { display: none; }
.float-contact, .to-top { transition: transform 200ms ease, opacity 200ms ease; }
.is-tucked .float-contact, .is-tucked .to-top { transform: translateY(160%); opacity: 0; pointer-events: none; }
.float-contact:focus-visible, .to-top:focus-visible { transform: none; opacity: 1; }
@media (hover: hover) {
  .float-contact:hover { background: var(--paper-2); }
  .to-top:hover { background: color-mix(in srgb, var(--ink) 82%, var(--board)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .tilt-a .note-link, .tilt-b .note-link, .tilt-c .note-link { transform: none; }
}

/* ---- Your own notice on the board: pen and trash in the bottom row, opposite share and comment, so they
   never cover the photo, the big word or the category drawing ---- */
.owner-tool {
  position: absolute; inset-block-end: 12px; z-index: 3;
  display: grid; place-items: center; inline-size: 44px; block-size: 44px;
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow); cursor: pointer;
  transition: transform 120ms ease;
}
.owner-tool svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.owner-edit { inset-inline-start: 12px; }
.owner-delete { inset-inline-start: 64px; color: var(--danger); border-color: var(--danger); }
.owner-tool:active { transform: translateY(1px); }
/* Your own notice not marked yet: "הפריט נמצא" across the card, above the bottom row of buttons. */
.has-found .note-link { padding-block-end: 120px; }
.owner-found {
  position: absolute; inset-inline: 12px; inset-block-end: 64px; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.owner-found svg { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (hover: hover) { .owner-tool:hover { background: var(--paper-2); } }

/* ---- Your own notice page: edit and delete without opening the private link (yellow, like "המודעות שלי") ---- */
.owner-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  margin-block-start: 12px; padding: 12px; border-radius: var(--radius);
  background: var(--mine); color: var(--mine-ink); box-shadow: var(--shadow);
}
.owner-label { font-weight: 700; }
.owner-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.owner-actions .btn { min-block-size: 44px; padding: 8px 16px; }
.owner-bar-big { margin-block: 0 24px; padding: 16px; }
.owner-bar-big .owner-label { font-size: 1.125rem; }
.owner-name { font-weight: 700; overflow-wrap: anywhere; }

/* Edit page: photos of the notice, with remove buttons and "add photos" */
.edit-photos-box { display: grid; gap: 12px; justify-items: start; margin-block: 32px; }
.edit-photos-box h2 { font-size: 1.375rem; }
.edit-photos-box .hint { justify-self: stretch; }
.edit-photos-box .previews:empty, .edit-photos-box .form-status:empty, .edit-photos-box .turnstile-slot:empty { display: none; }
/* The 4-digit management code needs a short field, so it reads as a code and not as free text */
#code, #manage-code { max-inline-size: 10rem; font-size: 1.25rem; letter-spacing: 0.2em; text-align: center; }

/* ---- The board's owner, logged in: the same pen and trash can as on your own notices ---- */
.admin-bar .form-status:empty { display: none; }
.admin-bar .form-status { flex-basis: 100%; margin: 0; }
.state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---- "Found it" replies under a lost notice ---- */
.reply-note { margin-block: 8px 0; padding: 8px 12px; border-inline-start: 4px solid var(--found); background: var(--paper); font-weight: 600; }
.replies-box { background: var(--paper); padding: 20px; display: grid; gap: 12px; justify-items: start; border-radius: 2px; box-shadow: var(--shadow); }
.replies-box h2 { font-size: 1.25rem; }
.replies { list-style: none; display: grid; gap: 8px; justify-self: stretch; }
.reply-link {
  display: flex; align-items: center; gap: 12px; min-block-size: 64px; padding: 8px;
  border: 2px solid var(--found); border-radius: var(--radius); color: var(--ink); text-decoration: none;
}
.reply-link img { inline-size: 64px; block-size: 64px; object-fit: cover; flex: none; background: var(--paper-2); }
.reply-link strong { display: block; overflow-wrap: anywhere; }
.reply-meta { display: block; color: var(--ink-2); font-size: 0.9375rem; }
@media (hover: hover) { .reply-link:hover { background: var(--paper-2); } }

/* ---- Public comments under a notice ---- */
.comments-box { background: var(--paper); padding: 20px; display: grid; gap: 16px; border-radius: 2px; box-shadow: var(--shadow); }
.comments-box h2 { font-size: 1.25rem; }
.comments { list-style: none; display: grid; gap: 12px; }
.comments:empty { display: none; }
.comment { padding: 12px 16px; background: var(--paper-2); border-radius: var(--radius); display: grid; gap: 4px; }
.comment-meta { color: var(--ink-2); font-size: 0.9375rem; }
.comment-meta strong { color: var(--ink); }
.comment-body { white-space: pre-line; overflow-wrap: anywhere; }
.comment-tools { display: flex; flex-wrap: wrap; gap: 0 16px; }
.comments-empty, .comments-closed, .comments-lead { color: var(--ink-2); }
.comment-form { padding: 0; background: none; box-shadow: none; margin-block-end: 0; }
.comment-notice { font-size: 0.875rem; }
.link-btn {
  min-block-size: 44px; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 0.9375rem;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn.link-danger { color: var(--danger); }
@media (hover: hover) { .link-btn:hover { color: var(--ink); text-decoration-thickness: 2px; } .link-btn.link-danger:hover { color: var(--danger); } }
.admin-section { margin-block: 40px 16px; font-size: 1.5rem; }

/* ---- Share and comment icons: on each notice on the board, and under the title of a notice ---- */
.note-link { padding-block-end: 68px; }
.note-actions {
  position: absolute; inset-inline: 12px; inset-block-end: 12px; z-index: 2;
  display: flex; justify-content: flex-end; gap: 8px;
}
.act-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-inline-size: 44px; min-block-size: 44px; padding: 0 8px;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 120ms ease;
}
.act-btn:active { transform: translateY(1px); }
@media (hover: hover) { .act-btn:hover { border-color: var(--ink); background: var(--paper-2); } }
.action-icon { inline-size: 22px; block-size: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-count { font-size: 0.9375rem; min-inline-size: 1ch; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 12px; }
.act-btn-labeled { padding: 0 12px; }

/* Short message at the bottom of the screen */
.toast {
  position: fixed; inset-inline: 16px; inset-block-end: 16px; z-index: 50; margin: 0 auto; max-inline-size: 360px;
  padding: 12px 16px; border-radius: var(--radius); background: var(--ink); color: var(--paper);
  font-weight: 700; text-align: center; box-shadow: var(--shadow-lift);
  opacity: 0; pointer-events: none; transition: opacity 160ms ease;
}
.toast.is-on { opacity: 1; }
