/* ============================================================================
   Mushroom Map — "Liquid Glass" static styles (vanilla CSS, English)
   Fluid gradient background + drifting color orbs + frosted glass surfaces.
   ============================================================================ */
:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-bg-strong: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 10px 34px -8px rgba(28, 34, 51, 0.22);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18);
  --ink: #1b1a17;
  --ink-soft: #57534e;
  --brand: #b5651d;
  --brand-dark: #8a4a12;
  --forest: #2f5d3a;
  --danger: #d12b2b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; cursor: pointer; }

/* ---- Liquid background -------------------------------------------------- */
.liquid-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(155deg, #f4ede2 0%, #eaf1ea 45%, #e2ecf4 100%);
}
.liquid-bg .orb { position: absolute; border-radius: 50%; filter: blur(64px); opacity: .72; will-change: transform; }
.orb-1 { width: 56vw; height: 56vw; left: -12vw; top: -14vw; background: radial-gradient(circle at 40% 40%, #f4ab4d 0%, rgba(244,171,77,0) 68%); animation: drift1 28s ease-in-out infinite; }
.orb-2 { width: 54vw; height: 54vw; right: -14vw; top: 18vh; background: radial-gradient(circle at 50% 50%, #5cb986 0%, rgba(92,185,134,0) 68%); animation: drift2 34s ease-in-out infinite; }
.orb-3 { width: 50vw; height: 50vw; left: 8vw; bottom: -22vw; background: radial-gradient(circle at 50% 50%, #4fb1cf 0%, rgba(79,177,207,0) 68%); animation: drift3 30s ease-in-out infinite; }
.orb-4 { width: 44vw; height: 44vw; right: 6vw; bottom: -14vw; background: radial-gradient(circle at 50% 50%, #c08fe8 0%, rgba(192,143,232,0) 68%); animation: drift1 36s ease-in-out infinite reverse; }
@keyframes drift1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(7vw,6vh) scale(1.12)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-6vw,8vh) scale(1.1)} }
@keyframes drift3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(5vw,-7vh) scale(1.15)} }
@media (prefers-reduced-motion: reduce) { .liquid-bg .orb { animation: none; } }

/* ---- Glass surfaces ----------------------------------------------------- */
.glass { background: var(--glass-bg); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow), var(--glass-inset); }
.glass-strong { background: var(--glass-bg-strong); backdrop-filter: blur(22px) saturate(190%); -webkit-backdrop-filter: blur(22px) saturate(190%); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow), var(--glass-inset); }
.glass-amber { background: rgba(255,240,214,.62); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border: 1px solid rgba(245,200,120,.55); box-shadow: var(--glass-shadow), var(--glass-inset); }
.glass-danger { background: rgba(255,222,222,.55); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border: 1px solid rgba(209,43,43,.45); box-shadow: 0 10px 34px -8px rgba(150,20,20,.28), var(--glass-inset); }

/* ---- Layout ------------------------------------------------------------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.app { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

/* Disclaimer */
.disclaimer { padding: 12px 12px 0; }
.disclaimer-inner { max-width: 1280px; margin: 0 auto; border-radius: 16px; padding: 8px 16px; text-align: center; font-size: 13px; line-height: 1.4; color: #451a03; }
.disclaimer-inner strong { font-weight: 700; }

/* Header */
header.site { position: sticky; top: 12px; z-index: 40; padding: 0 12px; }
.header-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 12px; border-radius: 24px; padding: 10px 18px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; }
.logo .badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 14px; background: rgba(255,255,255,.6); font-size: 20px; box-shadow: inset 0 1px 3px rgba(0,0,0,.12); }
.logo .name { background: linear-gradient(90deg, var(--brand-dark), var(--forest)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { flex: 1; display: flex; justify-content: center; }
.search form { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 440px; border-radius: 999px; padding: 8px 16px; }
.search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 14px; color: #292524; }
.search input::placeholder { color: rgba(87,83,78,.8); }
.nav { display: flex; gap: 4px; font-size: 14px; font-weight: 600; color: #44403c; }
.nav a { border-radius: 999px; padding: 8px 12px; }
.nav a:hover { background: rgba(255,255,255,.6); }

/* Filter bar */
.filterbar { padding: 12px 12px 0; }
.filterbar-inner { max-width: 1280px; margin: 0 auto; border-radius: 16px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pills { display: flex; gap: 8px; overflow-x: auto; flex: 1; padding: 4px 0; }
.pills::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 500; color: #44403c; background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.5); transition: background .2s; }
.pill:hover { background: rgba(255,255,255,.8); }
.pill.active { color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.controls { display: flex; gap: 8px; align-items: center; }
.controls select { border-radius: 999px; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.6); padding: 6px 12px; font-size: 14px; font-weight: 500; color: #44403c; outline: none; }
.clear-btn { border: 0; background: transparent; color: #78716c; font-weight: 500; font-size: 14px; }
.clear-btn:hover { color: #292524; text-decoration: underline; }

/* Result count / view toggle */
.result-row { max-width: 1280px; margin: 0 auto; padding: 16px 16px 0; display:flex; align-items:center; justify-content: space-between; gap: 10px; }
.result-count { font-size: 14px; color: #57534e; }
.result-count b { color: #1c1917; }
.view-toggle { display: none; gap: 4px; border-radius: 999px; padding: 4px; }
.view-toggle button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; color: #57534e; }
.view-toggle button.active { background: #1c1917; color: #fff; }

/* Split view */
.split { max-width: 1280px; margin: 0 auto; padding: 16px; display: flex; gap: 24px; }
.list-col { flex: 1; min-width: 0; }
.map-col { width: 40%; flex-shrink: 0; }
.map-panel { position: sticky; top: 88px; height: calc(100vh - 120px); border-radius: 24px; overflow: hidden; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); }

/* Grid + cards */
.grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 20px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { display: block; border-radius: 24px; padding: 6px; overflow: hidden; transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 48px -12px rgba(28,34,51,.3), var(--glass-inset); }
.card-img { position: relative; aspect-ratio: 4/3; width: 100%; overflow: hidden; border-radius: 20px; background: rgba(255,255,255,.4); border: 1px solid rgba(255,255,255,.4); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-img .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 44px; color: #d6d3d1; }
.card-badge { position: absolute; right: 8px; top: 8px; }
.card-body { padding: 12px 10px 8px; }
.card-title { font-size: 15px; font-weight: 700; color: #1c1917; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sci { font-size: 14px; font-style: italic; color: #78716c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; color: rgba(87,83,78,.9); }

/* Edibility badge */
.badge-edib { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; font-weight: 600; color: #fff; padding: 3px 9px; font-size: 11px; border: 1px solid rgba(255,255,255,.4); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 2px 8px rgba(0,0,0,.18); }
.badge-edib.md { padding: 5px 11px; font-size: 13px; }

/* Empty state */
.empty { border-radius: 24px; padding: 80px 20px; text-align: center; }
.empty .em { font-size: 40px; }
.empty p { margin: 8px 0 0; }
.empty .t { font-weight: 600; color: #44403c; }
.empty .s { font-size: 14px; color: #78716c; }

/* Pagination */
.pager { margin-top: 24px; display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager button { border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; color: #44403c; border: 0; }
.pager button:hover:not(:disabled) { background: rgba(255,255,255,.8); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager button.active { background: var(--brand); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.pager .dots { padding: 0 6px; color: #a8a29e; }

/* Map generic */
.mapboxgl-map { font-family: var(--font-sans) !important; }
.mapboxgl-popup-content { padding: 0; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.mapboxgl-popup-close-button { display: none; }
.mapboxgl-ctrl-group { border-radius: 12px !important; overflow: hidden; background: rgba(255,255,255,.7) !important; border: 1px solid rgba(255,255,255,.6) !important; box-shadow: 0 4px 14px rgba(0,0,0,.12) !important; }
.popup-card { width: 176px; }
.popup-card img, .popup-card .ph { width: 100%; height: 96px; object-fit: cover; background: #f5f5f4; }
.popup-card .ph { display: grid; place-items: center; font-size: 28px; }
.popup-card .b { padding: 6px 8px; }
.popup-card .n { font-size: 14px; font-weight: 600; color: #1c1917; }
.popup-card .sci { font-size: 12px; font-style: italic; color: #78716c; }
.popup-card .go { margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--brand); }

/* Detail */
.detail { max-width: 1024px; margin: 0 auto; padding: 16px; }
.back { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 500; color: #57534e; margin-bottom: 16px; }
.back:hover { background: rgba(255,255,255,.8); }
.gallery-main { position: relative; aspect-ratio: 16/10; width: 100%; overflow: hidden; border-radius: 24px; background: rgba(255,255,255,.4); border: 1px solid rgba(255,255,255,.5); box-shadow: var(--glass-shadow); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-badge { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { width: 80px; height: 64px; border-radius: 12px; overflow: hidden; flex-shrink: 0; border: 0; padding: 0; opacity: .7; transition: opacity .2s; }
.thumb.active { opacity: 1; outline: 2px solid var(--brand); outline-offset: 1px; }
.thumb:hover { opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail h1 { margin: 24px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -.01em; background: linear-gradient(90deg, var(--brand-dark), var(--forest)); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.title-row h1 { margin: 0; }
.detail .sci { margin: 4px 0 0; font-size: 18px; font-style: italic; color: #78716c; }
.detail .sci .fam { margin-left: 8px; font-size: 14px; font-style: normal; color: #a8a29e; }
.panel { border-radius: 24px; padding: 20px 24px; margin-top: 24px; }
.panel h2 { margin: 0 0 12px; font-size: 20px; font-weight: 700; color: #1c1917; }
.panel section + section { margin-top: 32px; }
.desc { margin-top: 20px; border-radius: 24px; padding: 20px; }
.desc p { margin: 0; line-height: 1.6; color: #44403c; }
.info-row { display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid rgba(255,255,255,.4); padding: 12px 0; }
.info-row:last-child { border-bottom: 0; }
@media (min-width: 640px) { .info-row { flex-direction: row; gap: 16px; } }
.info-row dt { width: 160px; flex-shrink: 0; font-size: 14px; font-weight: 500; color: #78716c; }
.info-row dd { margin: 0; font-size: 14px; color: #292524; }
dl { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border-radius: 999px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.5); padding: 4px 12px; font-size: 14px; color: #44403c; }

/* Season calendar */
.season { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.season .m { display: flex; align-items: center; justify-content: center; border-radius: 12px; padding: 8px 0; font-size: 11px; font-weight: 500; background: rgba(255,255,255,.45); color: #a8a29e; border: 1px solid rgba(255,255,255,.4); }
.season .m.on { background: var(--brand); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }

/* Poison band */
.poison { border-radius: 24px; padding: 20px; margin-top: 20px; color: var(--danger); display: flex; gap: 12px; }
.poison .icon { font-size: 30px; line-height: 1; }
.poison h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--danger); }
.poison p { margin: 4px 0 0; font-size: 14px; color: rgba(209,43,43,.9); }
.poison .tox-label { margin-top: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: rgba(209,43,43,.7); }
.poison .tox { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.poison .tox li { list-style: none; border-radius: 999px; background: rgba(209,43,43,.1); padding: 4px 10px; font-size: 12px; font-weight: 500; }
.poison .cta { margin-top: 16px; border-radius: 12px; background: var(--danger); color: #fff; padding: 12px 16px; font-size: 14px; font-weight: 600; }
.poison .cta a { text-decoration: underline; color: #fff; }

/* Lookalike box */
.looks { border-radius: 24px; padding: 20px; margin-top: 24px; }
.looks h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--danger); display: flex; align-items: center; gap: 8px; }
.looks .sub { margin: 4px 0 16px; font-size: 14px; color: rgba(209,43,43,.8); }
.look-item { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.5); }
.look-item + .look-item { margin-top: 12px; }
.look-item .im { width: 96px; height: 80px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.4); }
.look-item .im img { width: 100%; height: 100%; object-fit: cover; }
.look-item .im .ph { display: grid; place-items: center; height: 100%; font-size: 24px; }
.look-body { min-width: 0; flex: 1; }
.look-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.look-head .lname { font-weight: 600; color: #1c1917; }
.look-head .lname:hover { text-decoration: underline; }
.danger-badge { border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; color: #fff; }
.look-sci { font-size: 14px; font-style: italic; color: #78716c; margin: 2px 0; }
.look-note { font-size: 14px; color: #44403c; }
.look-note b { color: #1c1917; }

/* Detail map */
.detail-map { height: 400px; border-radius: 24px; overflow: hidden; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); margin-top: 12px; }
.detail-map.empty-map { display: grid; place-items: center; color: #a8a29e; font-size: 14px; height: auto; padding: 40px; box-shadow: none; background: rgba(255,255,255,.4); }
.wiki-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; color: #44403c; }
.wiki-btn:hover { background: rgba(255,255,255,.8); }

/* Fullscreen expand button */
.map-expand { position: absolute; left: 8px; top: 8px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: #44403c; border: 1px solid var(--glass-border); }
.map-wrap { position: relative; width: 100%; height: 100%; }
.map-wrap.fullscreen { position: fixed; inset: 0; z-index: 9999; border-radius: 0; }

/* Footer */
footer.site { margin-top: 48px; padding: 0 12px 16px; }
.footer-inner { max-width: 1280px; margin: 0 auto; border-radius: 24px; padding: 28px 24px; font-size: 14px; color: #57534e; }
.footer-top { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 640px) { .footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; } }
.footer-inner .logo { font-size: 16px; }
.footer-note { border-radius: 16px; padding: 16px; color: #451a03; max-width: 380px; }
.footer-copy { margin-top: 24px; border-top: 1px solid rgba(255,255,255,.4); padding-top: 16px; font-size: 12px; color: rgba(87,83,78,.8); }

/* Responsive: mobile single column + toggle */
@media (max-width: 1023px) {
  .view-toggle { display: inline-flex; }
  .split { display: block; }
  .map-col { width: 100%; display: none; }
  .map-panel { position: relative; top: 0; height: 70vh; margin-top: 16px; }
  .split.show-map .map-col { display: block; }
  .split.show-map .list-col { display: none; }
}

.hidden { display: none !important; }
