:root {
  --ink: #2b1a0c;
  --ink-soft: #3a2d22;
  --ink-mute: rgba(58, 45, 34, .62);
  --paper: #efe3cb;
  --cork: #bb8550;
  --wood: #4f2f17;
  --note-yellow: #fde06a;
  --top-h: 116px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font-ui: 'Nunito Sans', system-ui, sans-serif;
  --font-hand: 'Kalam', 'Comic Sans MS', cursive;
  --font-brand: 'Kaushan Script', 'Kalam', cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #6b4526;
  color: #2b2118;
  font-family: var(--font-ui);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
button { font-family: inherit; color: inherit; }
[hidden] { display: none !important; }

.app { position: fixed; inset: 0; height: 100dvh; overflow: hidden; }
.has-testbar .app { bottom: auto; height: calc(100dvh - var(--tb-h, 36px)); --safe-b: 0px; }
.testbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  min-height: 32px; padding: 7px 14px calc(7px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: repeating-linear-gradient(135deg, #2b1a0c 0 14px, #3a2412 14px 28px);
  color: #fde06a; font-family: var(--font-ui); font-size: 13.5px; font-weight: 800; line-height: 1.2; text-align: center;
  box-shadow: 0 -2px 8px rgba(0,0,0,.35);
}
.testbar[hidden] { display: none; }
.tb-fb {
  flex-shrink: 0; height: 30px; padding: 0 12px; border: 0; border-radius: 4px;
  background: #fde06a; color: #2b1a0c; font-size: 13px; font-weight: 900; cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 0 #b8941f;
}
.tb-fb:hover { background: #ffe989; }
.tb-fb:focus-visible { outline: 3px solid #fff4e0; outline-offset: 2px; }
.tb-tag { flex-shrink: 0; padding: 2px 7px; border-radius: 3px; background: #fde06a; color: #2b1a0c; font-size: 11px; font-weight: 900; letter-spacing: .1em; }

.c-oddam    { --bg: #cfeac7; --tag-bg: #3e8e3a; --tag-fg: #fff;    --pin: #2e9a3a; --pin-d: #135a1c; }
.c-sprzedam { --bg: #fbe8a2; --tag-bg: #f2c230; --tag-fg: #3a2a00; --pin: #f2c230; --pin-d: #8a6a00; }
.c-kupie    { --bg: #cadff5; --tag-bg: #2f74c8; --tag-fg: #fff;    --pin: #2f74c8; --pin-d: #123e75; }
.c-szukam   { --bg: #f8cdd3; --tag-bg: #d23b4b; --tag-fg: #fff;    --pin: #d6343f; --pin-d: #7c141c; }
.c-zamienie { --bg: #ddd0f4; --tag-bg: #7b4fc6; --tag-fg: #fff;    --pin: #8a52d6; --pin-d: #43207a; }
.c-uslugi   { --bg: #fcd5b3; --tag-bg: #e27a2c; --tag-fg: #fff;    --pin: #ec6a21; --pin-d: #8a3508; }

.wood {
  background-color: var(--wood);
  background-image: repeating-linear-gradient(178deg, rgba(255,210,160,.05) 0 3px, transparent 3px 9px), linear-gradient(180deg, #63401f 0%, #4a2b14 100%);
  box-shadow: 0 3px 0 #331c0b, 0 8px 18px rgba(0,0,0,.4);
}

.board {
  position: absolute; inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background-color: var(--cork);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(92,52,20,.4) 0 1.3px, transparent 1.9px),
    radial-gradient(circle at 70% 60%, rgba(255,232,196,.3) 0 1px, transparent 1.6px),
    radial-gradient(circle at 40% 80%, rgba(80,45,15,.32) 0 1.1px, transparent 1.7px);
  background-size: 7.7px 6.3px, 10.5px 11.9px, 14.7px 13.3px;
  outline: none;
}
.board.panning { cursor: grabbing; }
.board-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(255,215,160,.2), rgba(70,35,10,.28) 95%);
}
.world { position: absolute; left: 0; top: 0; width: 1px; height: 1px; transform-origin: 0 0; z-index: 1; }
.board.moving .world { will-change: transform; }

.card {
  position: absolute;
  padding: 16px 18px 14px;
  background: var(--bg);
  color: #2b2118;
  transform: rotate(var(--r, 0deg));
  box-shadow: 0 1px 1px rgba(0,0,0,.18), 0 12px 18px -6px rgba(40,20,5,.6);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .25s ease;
  outline: none;
}
.card.old { background-image: linear-gradient(160deg, rgba(222,190,110,.30), rgba(200,160,80,.22)); }
.card.old .c-title, .card.old .c-excerpt { color: #4a3a28; }
.pin {
  position: absolute; top: -10px; left: var(--pin-x, 45%);
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.85) 0 2.5px, var(--pin) 4.5px, var(--pin-d) 100%);
  box-shadow: 2px 6px 5px rgba(0,0,0,.4);
  z-index: 3;
}
.tag {
  align-self: flex-start;
  display: inline-block;
  padding: 2px 7px; border-radius: 4px;
  background: var(--tag-bg); color: var(--tag-fg);
  font-size: 10.5px; font-weight: 900; letter-spacing: .1em; line-height: 1.45;
}
.c-body { display: flex; flex-direction: column; gap: 6px; }
.c-title {
  margin: 0;
  font-family: var(--font-hand); font-size: 25px; font-weight: 700; line-height: 1.05;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.c-mid { display: flex; gap: 12px; align-items: center; }
.c-ill { width: 92px; height: 77px; flex-shrink: 0; display: block; }
.c-excerpt {
  margin: 0; font-size: 13.5px; line-height: 1.38; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.c-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 2px; min-height: 18px; }
.c-price { font-weight: 900; font-size: 15px; }
.c-days { display: flex; align-items: center; gap: 3px; font-size: 11px; color: rgba(58,45,34,.5); white-space: nowrap; margin-left: auto; }
.card.old .c-days { color: rgba(120,70,20,.8); }
.card.wide .c-wrap { display: flex; gap: 16px; align-items: flex-start; }
.card.wide .c-body { flex: 1 1 0; min-width: 0; }
.card.wide .c-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; padding-top: 6px; }
.card.wide .c-ill { width: 176px; height: 147px; }
.card.wide .c-excerpt { -webkit-line-clamp: 6; }
.card.wide .c-price { margin-top: 6px; }

.tape {
  position: absolute; right: -18px; top: -8px; width: 66px; height: 22px;
  background: rgba(236,226,200,.72); transform: rotate(38deg);
  box-shadow: 0 1px 2px rgba(0,0,0,.15); z-index: 2;
}
.stamp {
  position: absolute; left: 12px; top: 64px;
  padding: 4px 10px; border: 3px double #c42a22; border-radius: 5px;
  color: #c42a22; font-size: 24px; font-weight: 900; letter-spacing: .08em;
  transform: rotate(-18deg); opacity: .85; mix-blend-mode: multiply; pointer-events: none;
}
.tab {
  position: absolute; left: 50%; top: calc(100% - 3px);
  width: 164px; margin-left: -82px;
  padding: 8px 12px 9px;
  background: var(--bg);
  border-top: 2px dashed rgba(43,33,24,.45);
  transform: rotate(2.5deg) translateY(5px);
  box-shadow: 0 10px 14px -6px rgba(40,20,5,.6);
  display: none; flex-direction: column; align-items: center; gap: 1px;
  cursor: pointer;
}
.tab-main { display: flex; align-items: center; gap: 6px; font-family: var(--font-hand); font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.tab-note { font-size: 11px; color: #5a4636; }

@media (hover: hover) and (pointer: fine) {
  .board:not(.panning) .card:hover, .card:focus-visible {
    z-index: 20;
    transform: rotate(var(--r, 0deg)) scale(1.035);
    box-shadow: 0 2px 2px rgba(0,0,0,.15), 0 24px 32px -8px rgba(40,20,5,.7);
  }
  .board:not(.panning) .card:not(.reserved):hover .tab, .card:not(.reserved):focus-visible .tab { display: flex; }
}
.card:focus-visible { outline: 3px solid #fff4c2; outline-offset: 3px; }
.card.dim { opacity: .25; }
.card.dim .tab { display: none !important; }
.card.pulse { animation: pulse 1.1s ease; z-index: 21; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,244,190,.95), 0 12px 18px -6px rgba(40,20,5,.6); }
  60% { box-shadow: 0 0 0 16px rgba(255,244,190,0), 0 12px 18px -6px rgba(40,20,5,.6); }
  100% { box-shadow: 0 1px 1px rgba(0,0,0,.18), 0 12px 18px -6px rgba(40,20,5,.6); }
}
.card.lifted { background: transparent !important; box-shadow: none !important; }
.card.lifted > :not(.pin) { visibility: hidden; }
.card.arrive { animation: arrive .45s cubic-bezier(.2,.9,.3,1.3); }
@keyframes arrive { from { opacity: 0; transform: rotate(var(--r)) translateY(-26px) scale(1.08); } }

.top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 40;
  height: var(--top-h);
  padding: 0 18px 0 30px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-rows: 58px 58px;
  grid-template-areas: "brand search mamkod pin" "brand chips view pin";
  column-gap: 28px;
  color: #fbeed8;
}
.top > * , .finder > *, .actions > * { position: relative; z-index: 1; }
.finder, .actions { display: contents; }
.brand { grid-area: brand; align-self: center; }
.search { grid-area: search; align-self: end; }
.chips { grid-area: chips; align-self: start; margin-top: 14px !important; }
.catbtn { grid-area: cat; }
.mamkod { grid-area: mamkod; align-self: end; justify-self: end; margin-bottom: 1px; margin-right: 16px; }
.viewbtn { grid-area: view; align-self: start; justify-self: end; margin: 12px 16px 0 0; }
.pin-note { grid-area: pin; align-self: center; }
.brand { min-width: 0; }
.brand-name {
  margin: 0; font-family: var(--font-brand); font-weight: 400;
  font-size: 44px; line-height: 1.1; color: #fbf1de; text-shadow: 0 2px 0 rgba(0,0,0,.35);
  white-space: nowrap;
}
.brand-tagline { margin: 2px 0 0 6px; font-family: var(--font-hand); font-style: italic; font-size: 17px; color: #f1d9b2; white-space: nowrap; }
.search {
  width: 100%; max-width: 500px; height: 42px;
  padding: 0 8px 0 16px;
  display: flex; align-items: center; gap: 10px;
  border-radius: 21px; background: #f6eadb; color: #5a4636;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.2);
}
.search-ico { flex-shrink: 0; }
.search input {
  flex: 1 1 auto; min-width: 0; height: 100%;
  border: 0; background: transparent; outline: none;
  font-family: var(--font-ui); font-size: 15px; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus-visible { outline: none; }
.search input::placeholder { color: rgba(90,70,54,.75); }
.search:focus-within { box-shadow: inset 0 1px 3px rgba(0,0,0,.2), 0 0 0 3px rgba(253,224,106,.55); }
.search-count { display: none; font-size: 12.5px; font-weight: 800; color: #5a4636; white-space: nowrap; }
.search-clear {
  flex-shrink: 0; width: 30px; height: 30px; border: 0; border-radius: 15px;
  background: rgba(90,70,54,.12); color: #5a4636; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 4px; margin: -2px -2px -4px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  height: 28px; padding: 0 8px 0 11px;
  display: flex; align-items: center; gap: 5px;
  border-radius: 14px; border: 1.5px solid rgba(251,238,216,.35);
  background: rgba(35,18,6,.45); color: #fbeed8;
  font-size: 12.5px; font-weight: 800; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  white-space: nowrap;
}
.chip.all { padding: 0 11px; }
.chip[aria-pressed="true"] { background: #fbeed8; color: var(--ink); border-color: #fbeed8; }
.chip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pin); box-shadow: inset 0 -2px 2px rgba(0,0,0,.25); }
.chip-count {
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: rgba(255,255,255,.18); font-size: 10.5px;
  display: flex; align-items: center; justify-content: center;
}
.chip[aria-pressed="true"] .chip-count { background: rgba(43,26,12,.12); }
.chip.zero { opacity: .55; }
.catbtn { display: none; }
.mamkod {
  height: 40px; padding: 0 15px; border: 0;
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); color: var(--ink);
  font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,.3);
  white-space: nowrap;
}
.viewbtn {
  height: 32px; padding: 0 12px; border: 1.5px solid rgba(251,238,216,.45); border-radius: 16px;
  display: flex; align-items: center; gap: 7px;
  background: rgba(35,18,6,.45); color: #fbeed8;
  font-size: 13.5px; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.viewbtn:hover { background: rgba(35,18,6,.7); }
.viewbtn .vb-board { display: none; }
.listmode .viewbtn { background: #fbeed8; color: var(--ink); border-color: #fbeed8; }
.listmode .viewbtn .vb-board { display: block; }
.listmode .viewbtn .vb-list { display: none; }
.listview {
  position: absolute; left: 0; right: 0; top: var(--top-h); bottom: 0; z-index: 30;
  background-color: var(--cork);
  background-image: radial-gradient(rgba(70,40,15,.18) 1px, transparent 1.5px), radial-gradient(rgba(255,230,190,.12) 1px, transparent 1.5px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 5px;
}
.listview[hidden] { display: none; }
.lv-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.lv-inner { max-width: 860px; margin: 0 auto; padding: 22px 20px calc(110px + var(--safe-b)); }
.lv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.lv-count { margin: 0; font-family: var(--font-hand); font-size: 26px; font-weight: 700; color: #fff6e6; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.lv-clear { flex-shrink: 0; white-space: nowrap; height: 36px; padding: 0 14px; border: 0; background: #fbeed8; color: var(--ink); font-weight: 800; font-size: 13.5px; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,.3); }
.lv-note { margin: -4px 0 12px; color: #fff6e6; font-weight: 700; font-size: 14px; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.lv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lv-row {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px;
  padding: 12px 16px 12px 18px; border: 0; text-align: left; cursor: pointer;
  background: var(--bg); color: #2b2118; font-family: var(--font-ui);
  border-left: 6px solid var(--tag-bg);
  box-shadow: 0 1px 1px rgba(0,0,0,.15), 0 6px 12px -6px rgba(40,20,5,.55);
}
.lv-row:hover { filter: brightness(1.03); }
.lv-row:focus-visible { outline: 3px solid #fde06a; outline-offset: 2px; }
.lv-row.old { filter: saturate(.75) sepia(.12); }
.lv-head { display: flex; align-items: center; gap: 8px; }
.lv-head .tag { font-size: 10.5px; }
.lv-stamp { padding: 1px 6px; border: 2px solid #c0262f; color: #c0262f; font-size: 10.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; transform: rotate(-2deg); }
.lv-title { font-family: var(--font-hand); font-weight: 700; font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.lv-text { font-size: 14.5px; line-height: 1.4; color: #3a2d22; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 3px; font-size: 13px; color: rgba(58,45,34,.8); }
.lv-price { font-weight: 900; color: #2b1a0c; font-size: 14.5px; }
.lv-days { display: inline-flex; align-items: center; gap: 4px; }
.lv-rep { font-weight: 700; }
.lv-row mark { background: #fde06a; color: inherit; padding: 0 1px; }
.lv-empty { padding: 30px 20px; background: #f6ecd6; text-align: center; box-shadow: 0 6px 12px -6px rgba(40,20,5,.55); }
.lv-empty p { margin: 0 0 14px; font-weight: 700; }
.lv-legal { margin: 26px 0 0; text-align: center; font-size: 13px; font-weight: 700; color: #fff6e6; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.lv-legal a { color: inherit; text-underline-offset: 2px; }
.listmode .zoombar, .listmode .foot-note, .listmode .m-home, .listmode .results { display: none !important; }
.pin-note {
  position: relative;
  width: 226px; height: 84px; border: 0;
  background: var(--note-yellow); color: var(--ink);
  font-family: var(--font-hand); font-size: 27px; font-weight: 700;
  transform: rotate(-3deg);
  box-shadow: 0 10px 16px -4px rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; white-space: nowrap;
  transition: transform .15s ease;
}
.pin-note:hover { transform: rotate(-2deg) translateY(-2px); }
.pin-dot {
  position: absolute; right: 26px; top: -9px; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.85) 0 2.5px, #d6343f 4.5px, #8e1d25 100%);
  box-shadow: 2px 5px 5px rgba(0,0,0,.4);
}
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #fde06a; outline-offset: 2px; }

.foot-note {
  position: absolute; left: 36px; bottom: calc(16px + var(--safe-b)); z-index: 40;
  width: 318px; height: 56px; padding: 0 14px;
  display: flex; align-items: center; gap: 10px;
  background: #efe3c9; transform: rotate(-1deg);
  box-shadow: 0 6px 12px rgba(0,0,0,.35);
  clip-path: polygon(0 4%, 3% 0, 97% 3%, 100% 0, 99% 96%, 96% 100%, 4% 97%, 1% 100%);
  pointer-events: none;
}
.foot-note .fn-text { flex-grow: 1; font-family: var(--font-hand); font-style: italic; font-size: 15.5px; line-height: 1.15; color: #3a2a1c; }
.foot-note .fn-links { pointer-events: auto; display: block; margin-top: 2px; font-family: var(--font-ui); font-style: normal; font-size: 11.5px; font-weight: 700; color: rgba(58,42,28,.7); }
.foot-note .fn-links a { color: inherit; text-underline-offset: 2px; }
.foot-note .fn-links a:hover { color: #2b1a0c; }
.sheet-legal { margin: 14px 4px 0; font-size: 13px; font-weight: 700; color: rgba(58,42,28,.7); text-align: center; }
.sheet-legal a { color: inherit; text-underline-offset: 2px; }

.zoombar {
  position: absolute; right: 18px; bottom: calc(14px + var(--safe-b)); z-index: 40;
  height: 62px; padding: 0 16px 0 10px;
  display: flex; align-items: center; gap: 12px;
  background: #eadcbf; box-shadow: 0 6px 14px rgba(0,0,0,.4);
  clip-path: polygon(0 3%, 2% 0, 98% 4%, 100% 0, 100% 97%, 97% 100%, 3% 97%, 0 100%);
  color: #3a2a1c;
}
.zb-home {
  width: 44px; height: 44px; border: 1px solid rgba(58,40,24,.25); border-radius: 8px;
  background: #fbf4e6; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 3px rgba(0,0,0,.15);
}
.zb-zoom {
  display: flex; align-items: center; height: 44px; border-radius: 8px;
  background: #fbf4e6; border: 1px solid rgba(58,40,24,.25); box-shadow: 0 2px 3px rgba(0,0,0,.15);
}
.zb-zoom button { width: 44px; height: 42px; border: 0; background: transparent; font-size: 22px; font-weight: 700; cursor: pointer; }
.zb-zoom button:disabled { opacity: .35; cursor: default; }
.zb-zoom span { width: 58px; text-align: center; font-size: 15px; font-weight: 800; }
.zb-hint { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px dashed rgba(58,40,24,.35); height: 44px; }
.zb-hint span { font-family: var(--font-hand); font-size: 12.5px; line-height: 1.2; width: 170px; }

.results {
  position: absolute; left: 50%; top: calc(var(--top-h) + 14px); z-index: 39;
  transform: translateX(-50%) rotate(-.5deg);
  max-width: calc(100% - 32px);
  min-height: 52px; padding: 6px 8px;
  display: flex; align-items: center; gap: 10px;
  background: #f6ecd6; color: #3a2a1c;
  box-shadow: 0 8px 16px rgba(0,0,0,.4);
  clip-path: polygon(0 4%, 2% 0, 98% 4%, 100% 0, 100% 96%, 98% 100%, 2% 96%, 0 100%);
}
.results-close, .results-nav button {
  width: 40px; height: 40px; border: 0; border-radius: 8px;
  background: rgba(58,40,24,.08); cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; line-height: 1;
}
.results-close:hover, .results-nav button:hover { background: rgba(58,40,24,.16); }
.results-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; min-width: 0; }
.res-count {
  border: 0; background: transparent; padding: 4px 2px; cursor: pointer;
  font-size: 15px; font-weight: 900; color: var(--ink);
  text-decoration: underline dotted; text-underline-offset: 4px;
}
.res-note { font-size: 12.5px; color: #6b5a4a; }
.res-empty { font-size: 14.5px; font-weight: 700; }
.res-cta {
  height: 38px; padding: 0 14px; border: 0;
  background: var(--note-yellow); color: var(--ink);
  font-family: var(--font-hand); font-size: 17px; font-weight: 700;
  box-shadow: 0 3px 6px rgba(0,0,0,.25); transform: rotate(-1deg); cursor: pointer; white-space: nowrap;
}
.res-link { border: 0; background: none; padding: 0; color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.results-nav { display: flex; align-items: center; gap: 6px; padding-left: 8px; border-left: 1px dashed rgba(58,40,24,.35); }
.results-nav span { min-width: 48px; text-align: center; font-weight: 800; font-size: 14px; }

.m-home, .fab, .m-back { display: none; }

.empty {
  position: absolute; left: 50%; top: 50%; z-index: 5;
  transform: translate(-50%, -40%) rotate(-1.5deg);
  width: min(380px, calc(100% - 48px)); padding: 26px 26px 22px;
  background: #fbe8a2; box-shadow: 0 16px 24px -8px rgba(40,20,5,.6);
  text-align: center; font-size: 15px; line-height: 1.45;
}
.empty-title { margin: 0 0 6px; font-family: var(--font-hand); font-size: 28px; font-weight: 700; }
.empty p { margin: 0; }
.loading {
  position: absolute; left: 50%; top: 55%; z-index: 5; transform: translate(-50%, -50%);
  font-family: var(--font-hand); font-size: 22px; color: #fbeed8; text-shadow: 0 2px 4px rgba(0,0,0,.4);
}

.overlay { position: absolute; inset: 0; z-index: 60; }
.overlay-dim { position: absolute; inset: 0; background: rgba(28,14,4,.58); cursor: zoom-out; opacity: 0; transition: opacity .25s ease; }
.overlay.shown .overlay-dim { opacity: 1; }
.bigcard {
  position: absolute; left: 50%; top: 50px;
  width: 560px; max-width: calc(100% - 32px); max-height: calc(100% - 100px);
  margin-left: -280px;
  overflow: hidden;
  background: var(--bg);
  transform-origin: 0 0;
  box-shadow: 0 2px 3px rgba(0,0,0,.2), 0 40px 60px -16px rgba(20,10,2,.75);
  display: flex; flex-direction: column;
  outline: none;
  user-select: text; -webkit-user-select: text;
}
.bc-scroll { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(58,40,24,.28) transparent; }
.bigcard > .bc-reply, .bigcard > .bc-closed { flex-shrink: 0; }
.bc-scroll::-webkit-scrollbar, .reply-slip::-webkit-scrollbar { width: 6px; height: 0; }
.bc-scroll::-webkit-scrollbar-track, .reply-slip::-webkit-scrollbar-track { background: transparent; }
.bc-scroll::-webkit-scrollbar-thumb, .reply-slip::-webkit-scrollbar-thumb { background: rgba(58,40,24,.28); border-radius: 3px; }
.bc-close {
  position: absolute; right: 10px; top: 10px; z-index: 2;
  width: 44px; height: 44px; border: 0; border-radius: 22px;
  background: rgba(255,255,255,.35); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bc-close:hover { background: rgba(255,255,255,.6); }
.bc-content { padding: 28px 32px 18px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.bc-content .tag { font-size: 12px; padding: 3px 9px; }
.bc-title { margin: 0; padding-right: 40px; font-family: var(--font-hand); font-size: 40px; font-weight: 700; line-height: 1.02; overflow-wrap: anywhere; }
.bc-meta { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--ink-mute); line-height: 1.35; }
.bc-meta svg { flex-shrink: 0; margin-top: 1px; }
.bc-main { display: flex; gap: 16px; align-items: flex-start; }
.bc-text { margin: 0; flex: 1 1 0; min-width: 0; font-size: 17px; line-height: 1.55; color: #33271d; white-space: pre-line; overflow-wrap: anywhere; }
.bc-ill { width: 176px; height: 147px; flex-shrink: 0; display: block; }
.bc-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1.5px dashed rgba(58,40,24,.25); }
.bc-price { display: flex; flex-direction: column; }
.bc-price-lbl { font-size: 12px; color: rgba(58,45,34,.6); font-weight: 700; }
.bc-price-val { font-size: 26px; font-weight: 900; line-height: 1.1; }
.bc-rep { font-size: 13px; color: rgba(58,45,34,.7); text-align: right; margin-left: auto; }
.bc-report { align-self: flex-start; border: 0; background: none; padding: 4px 0; font-size: 12.5px; color: rgba(90,60,40,.85); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bc-reply {
  margin-top: auto; min-height: 76px; flex-shrink: 0; border: 0;
  border-top: 2px dashed rgba(43,33,24,.45);
  background: rgba(255,255,255,.28); color: var(--ink); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.bc-reply:hover { background: rgba(255,255,255,.42); }
.bc-reply-main { display: flex; align-items: center; gap: 8px; font-family: var(--font-hand); font-size: 27px; font-weight: 700; line-height: 1; }
.bc-reply-note { font-size: 12px; color: #5a4636; }
.bc-closed {
  margin-top: auto; min-height: 64px; flex-shrink: 0; padding: 10px 20px;
  border-top: 2px dashed rgba(43,33,24,.3);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 14px; font-weight: 700; color: rgba(58,45,34,.7);
}
.bc-stamp {
  position: absolute; left: 110px; top: 140px;
  padding: 8px 18px; border: 4px double #c42a22; border-radius: 6px;
  color: #c42a22; font-size: 40px; font-weight: 900; letter-spacing: .08em;
  transform: rotate(-16deg); opacity: .85; mix-blend-mode: multiply; pointer-events: none;
}
mark {
  background: linear-gradient(100deg, rgba(255,236,90,0) 0 2%, rgba(255,232,80,.85) 4% 96%, rgba(255,236,90,0) 98%);
  color: inherit; padding: 0 1px; border-radius: 2px;
}

.sheet-wrap { position: absolute; inset: 0; z-index: 70; }
.sheet-dim { position: absolute; inset: 0; background: rgba(28,14,4,.5); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 70%; overflow-y: auto;
  padding: 8px 16px calc(16px + var(--safe-b));
  background: #f6ecd6; border-radius: 14px 14px 0 0;
  box-shadow: 0 -10px 30px rgba(0,0,0,.35);
  animation: sheet-in .22s ease-out;
}
@keyframes sheet-in { from { transform: translateY(40%); opacity: .4; } }
.sheet-grip { width: 44px; height: 5px; margin: 0 auto 8px; border-radius: 3px; background: rgba(58,40,24,.25); }
.sheet-title { margin: 0 0 6px; font-family: var(--font-hand); font-size: 24px; }
.sheet-list { list-style: none; margin: 0; padding: 0; }
.sheet-list button {
  width: 100%; min-height: 50px; padding: 0 6px; border: 0; border-bottom: 1px solid rgba(58,40,24,.12);
  background: none; display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 700; text-align: left; cursor: pointer;
}
.sheet-list button[aria-pressed="true"] { font-weight: 900; }
.sheet-list .chip-dot { width: 14px; height: 14px; }
.sheet-list .sl-count { margin-left: auto; font-size: 14px; color: #6b5a4a; }
.sheet-list .sl-check { width: 20px; color: #3e8e3a; font-weight: 900; }

.toast {
  position: absolute; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 90;
  transform: translateX(-50%) rotate(-1deg);
  width: max-content; max-width: min(440px, calc(100% - 32px));
  padding: 14px 18px;
  background: #fffbe9; color: var(--ink);
  font-size: 15px; line-height: 1.4; font-weight: 700;
  box-shadow: 0 12px 24px -6px rgba(0,0,0,.55);
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(12px) rotate(-1deg); } }

.chips.overflow { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.res-count { white-space: nowrap; }
@media (max-width: 1360px) {
  .brand-name { font-size: 38px; }
  .brand-tagline { font-size: 15px; }
  .chips { gap: 5px; }
  .chip { padding: 0 6px 0 9px; gap: 4px; font-size: 12px; }
  .chip.all { padding: 0 9px; }
  .top { column-gap: 22px; padding-left: 24px; }
  .pin-note { width: 196px; height: 76px; font-size: 24px; }
}
@media (max-width: 1180px) {
  .brand-tagline { display: none; }
  .foot-note { width: auto; height: 38px; left: 20px; padding: 0 14px; }
  .foot-note svg { display: none; }
  .foot-note .fn-text { font-size: 0; }
  .foot-note .fn-links { margin: 0; font-size: 12.5px; }
  .zb-hint { display: none; }
  .brand-name { font-size: 34px; }
  .mamkod-label { display: none; }
  .mamkod { width: 42px; padding: 0; justify-content: center; margin-right: 6px; }
  .viewbtn { margin-right: 6px; }
  .pin-note { width: 170px; height: 70px; font-size: 21px; gap: 6px; }
}
@media (max-width: 960px) {
  .brand-name { font-size: 28px; }
}

@media (max-width: 760px), (max-height: 520px) and (orientation: landscape) and (pointer: coarse) {
  :root { --top-h: calc(108px + var(--safe-t)); }
  .testbar { font-size: 12px; gap: 6px 8px; padding: 5px 10px calc(5px + env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; }
  .tb-text { flex: 1 1 60%; text-align: left; }
  .tb-fb { height: 28px; font-size: 12.5px; }
  .top {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: 56px 52px;
    grid-template-areas: "brand view mamkod" "search cat cat";
    padding: var(--safe-t) 12px 0 16px; column-gap: 8px;
  }
  .top::before {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 52px;
    background: rgba(35,18,6,.35); pointer-events: none; z-index: 0;
  }
  .brand-name { font-size: 27px; }
  .mamkod { width: auto; height: 40px; padding: 0 12px; align-self: center; margin: 0; }
  .mamkod-label { display: inline; }
  .viewbtn { height: 40px; width: 44px; padding: 0; justify-content: center; align-self: center; margin: 0; border-radius: 8px; }
  .viewbtn-label { display: none; }
  .lv-inner { padding: 14px 10px calc(100px + var(--safe-b)); }
  .lv-count { font-size: 21px; line-height: 1.1; }
  .lv-row { padding: 11px 12px 11px 14px; }
  .lv-title { font-size: 20px; }
  .pin-note { display: none; }
  .search { max-width: none; height: 40px; padding-left: 12px; gap: 8px; align-self: center; }
  .search input { font-size: 16px; }
  .chips { display: none; }
  .catbtn {
    display: flex; align-items: center; gap: 4px; flex-shrink: 0; align-self: center;
    height: 40px; padding: 0 12px; border-radius: 20px;
    border: 1.5px solid rgba(251,238,216,.45); background: rgba(35,18,6,.45); color: #fbeed8;
    font-size: 14px; font-weight: 800; cursor: pointer; max-width: 150px;
  }
  .catbtn-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .catbtn.on { background: #fbeed8; color: var(--ink); border-color: #fbeed8; }
  .catbtn .chip-dot { flex-shrink: 0; }
  .foot-note, .zoombar { display: none; }
  .results {
    top: auto; bottom: calc(12px + var(--safe-b)); left: 12px; right: 96px;
    transform: none; max-width: none; min-height: 56px; padding: 6px;
    gap: 6px; clip-path: none; border-radius: 10px;
  }
  .results-main { flex: 1 1 auto; justify-content: center; gap: 6px; }
  .res-note { display: none; }
  .res-empty { font-size: 13px; }
  .res-cta { font-size: 15px; height: 36px; padding: 0 10px; }
  .results-nav { padding-left: 4px; gap: 2px; }
  .results-nav span { min-width: 38px; font-size: 13px; }
  .results-close, .results-nav button { width: 44px; height: 44px; }
  .results.nores { right: 12px; bottom: calc(84px + var(--safe-b)); }
  .m-home {
    display: flex; align-items: center; justify-content: center;
    position: absolute; left: 12px; bottom: calc(12px + var(--safe-b)); z-index: 40;
    width: 52px; height: 52px; border: 0; border-radius: 10px;
    background: #f6ecd6; color: #3a2a1c; box-shadow: 0 6px 14px rgba(0,0,0,.4); cursor: pointer;
  }
  .has-results .m-home { display: none; }
  .fab {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    position: absolute; right: 14px; bottom: calc(14px + var(--safe-b)); z-index: 41;
    height: 64px; padding: 0 18px; border: 0;
    background: var(--note-yellow); color: var(--ink);
    font-family: var(--font-hand); font-size: 21px; font-weight: 700;
    transform: rotate(-3deg); box-shadow: 0 10px 16px -4px rgba(0,0,0,.55); cursor: pointer;
  }
  .fab .pin-dot { right: 16px; width: 18px; height: 18px; top: -7px; }
  .fab-plus { font-size: 24px; line-height: 1; }
  .has-results .fab { width: 64px; padding: 0; }
  .has-results .fab .fab-label { display: none; }
  .kb .fab, .kb .results, .kb .m-home { display: none !important; }
  .kb .search-count { display: inline; }
  .toast { bottom: calc(92px + var(--safe-b)); }

  .overlay-dim { background: rgba(28,14,4,.62); }
  .m-back {
    display: flex; align-items: center; gap: 4px;
    position: absolute; left: 12px; top: calc(10px + var(--safe-t)); z-index: 2;
    height: 44px; padding: 0 12px 0 6px;
    color: #fbeed8; font-size: 16px; font-weight: 800; text-decoration: none;
  }
  .bc-close { display: none; }
  .bigcard {
    left: 12px; right: 12px; top: calc(62px + var(--safe-t)); bottom: calc(12px + var(--safe-b));
    width: auto; max-width: none; max-height: none; margin: 0;
    overflow: hidden;
    animation: bc-up .26s cubic-bezier(.2,.8,.25,1);
  }
  @keyframes bc-up { from { transform: translateY(24px); opacity: 0; } }
  .bigcard.closing { transition: transform .2s ease, opacity .2s ease; transform: translateY(30px); opacity: 0; }
  .bc-scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
  .bc-content { padding: 20px 20px 14px; gap: 10px; }
  .bc-content .tag { font-size: 11px; }
  .bc-title { font-size: 34px; padding-right: 0; }
  .bc-meta { font-size: 12.5px; }
  .bc-main { flex-direction: column-reverse; gap: 10px; }
  .bc-ill { width: 60%; height: auto; aspect-ratio: 120 / 100; max-width: 240px; align-self: center; }
  .bc-text { font-size: 16px; line-height: 1.5; }
  .bc-price-val { font-size: 24px; }
  .bc-stamp { left: 40px; top: 120px; font-size: 32px; }
  .bc-reply-note { font-size: 11.5px; }
}
@media (max-width: 360px) {
  .mamkod-label { display: none; }
  .mamkod { width: 42px; padding: 0; justify-content: center; }
  .brand-name { font-size: 24px; }
  .fab { font-size: 19px; padding: 0 14px; }
}
@media (max-height: 520px) and (orientation: landscape) and (pointer: coarse) {
  :root { --top-h: calc(48px + var(--safe-t)); }
  .top {
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    grid-template-rows: 48px; grid-template-areas: "brand search cat view mamkod";
    padding: var(--safe-t) max(12px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  }
  .brand-name { font-size: 22px; }
  .top::before { display: none; }
  .search, .catbtn { height: 36px; }
  .mamkod, .viewbtn { height: 36px; }
  .bigcard { left: 50%; right: auto; width: min(560px, calc(100% - 24px)); transform: translateX(-50%); top: calc(8px + var(--safe-t)); bottom: 8px; animation: none; }
  .m-back { top: 8px; }
  .sheet { left: 50%; right: auto; width: min(560px, 100%); transform: translateX(-50%); animation: none; }
  .results { left: 50%; right: auto; transform: translateX(-50%); width: min(560px, calc(100% - 180px)); }
}
@property --di-p { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.di-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.di-dim { position: absolute; inset: 0; background: rgba(28,14,4,.78); opacity: 0; transition: opacity .3s ease; backdrop-filter: blur(2px); }
.di-box {
  position: relative; width: min(560px, 100%); padding: 44px 36px 30px;
  background: #fbf5e8; color: var(--ink); text-align: center; outline: none;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 2px 3px rgba(0,0,0,.25), 0 40px 70px -18px rgba(0,0,0,.8);
  opacity: 0; transform: translateY(24px) rotate(1.5deg) scale(.96);
  transition: opacity .3s ease, transform .35s cubic-bezier(.2,.8,.25,1);
}
.di-overlay.in .di-dim { opacity: 1; }
.di-overlay.in .di-box { opacity: 1; transform: rotate(-.8deg); }
.di-overlay.out .di-dim { opacity: 0; }
.di-overlay.out .di-box { opacity: 0; transform: translateY(-16px) rotate(-3deg) scale(.96); }
.di-pin {
  position: absolute; left: 50%; top: -13px; margin-left: -14px; width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.85) 0 2.5px, #d6343f 4.5px, #8e1d25 100%);
  box-shadow: 2px 6px 5px rgba(0,0,0,.4);
}
.di-stamp {
  margin: 0 0 4px; padding: 8px 26px 10px; border: 6px solid #c0262f; border-radius: 10px; color: #c0262f;
  display: flex; flex-direction: column; align-items: center; line-height: 1;
  transform: rotate(-7deg); opacity: 0;
  mix-blend-mode: multiply;
}
.di-overlay.in .di-stamp { animation: di-stamp .45s .2s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes di-stamp { 0% { opacity: 0; transform: rotate(-7deg) scale(2.4); } 100% { opacity: .92; transform: rotate(-7deg) scale(1); } }
.di-stamp-a { font-family: var(--font-ui); font-size: clamp(64px, 17vw, 112px); font-weight: 900; letter-spacing: .08em; }
.di-stamp-b { margin-top: 2px; font-size: clamp(15px, 4vw, 21px); font-weight: 900; letter-spacing: .22em; text-transform: uppercase; }
.di-lead { text-wrap: balance; margin: 6px 0 0; font-family: var(--font-hand); font-size: clamp(21px, 5.2vw, 26px); font-weight: 700; line-height: 1.25; }
.di-sub { text-wrap: balance; margin: 0; font-size: 15px; line-height: 1.45; color: #5a4636; max-width: 420px; }
.di-ring {
  --di-p: 0%;
  position: relative; width: 78px; height: 78px; margin-top: 4px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(#2b1a0c var(--di-p), rgba(43,26,12,.14) 0);
}
.di-overlay.in .di-ring { animation: di-ring 5s linear forwards; }
@keyframes di-ring { to { --di-p: 100%; } }
.di-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fde06a; }
.di-num { position: relative; font-family: var(--font-hand); font-size: 40px; font-weight: 700; line-height: 1; }
.di-num.pop { animation: di-pop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes di-pop { 0% { transform: scale(1.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.di-skip {
  margin-top: 4px; height: 46px; padding: 0 20px; border: 0; border-radius: 6px;
  background: #2b1a0c; color: #fff4e0; font-size: 15px; font-weight: 800; cursor: pointer;
}
.di-skip:hover { background: #45301c; }
.di-skip:focus-visible { outline: 3px solid #fde06a; outline-offset: 3px; }
@media (max-width: 480px) {
  .di-box { padding: 38px 20px 24px; gap: 12px; }
  .di-stamp { padding: 6px 18px 8px; border-width: 5px; }
  .di-ring { width: 66px; height: 66px; }
  .di-num { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
