/* Static pages: places, categories, districts, top lists, near me, saved, add, about. */
body.page { min-height: 100vh; }
.sitebar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 12px max(20px, calc((100vw - 1240px) / 2));
  background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line);
}
.sitebar .brand { flex: none; }
.mainnav { display: flex; gap: 4px; margin-left: auto; }
.mainnav a { white-space: nowrap; position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 14px; }
.mainnav a:hover { background: var(--card-2); color: var(--ink); }
.mainnav .ms { font-size: 20px; color: var(--muted); }
.mainnav .favcount { position: absolute; top: 4px; left: 26px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 20px 60px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }
.crumbs .sep { opacity: .5; }

.phead { position: relative; margin: 0 0 26px; max-width: 860px; }
.phead-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--c, var(--blue)); color: #fff; margin-bottom: 14px; box-shadow: var(--shadow-1); }
.phead-icon .ms { font-size: 30px; }
.phead h1, .place h1 { font-family: Unbounded, Manrope, sans-serif; font-weight: 700; font-size: clamp(26px, 4vw, 40px); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 14px; text-wrap: balance; }
.lead { font-size: 17px; line-height: 1.6; color: var(--ink-2); margin: 0 0 18px; }
.note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink-2); background: var(--card-2); padding: 12px 14px; border-radius: 14px; margin: 0 0 18px; }
.note .ms { color: var(--muted); font-size: 20px; }
.phead-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.chips.sub { margin: 0 0 24px; }

.grid.compact { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.grid.compact .pc-body { padding: 12px 14px 14px; }
.grid.compact .pc-name { font-size: 15.5px; }

.toptext { margin: 34px 0 0; display: grid; gap: 14px; max-width: 860px; }
.toptext article { background: var(--card); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-1); }
.toptext h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 19px; }
.toptext h2 a { color: inherit; text-decoration: none; }
.toptext .rank { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--yellow); color: #14171c; font: 800 16px Unbounded, sans-serif; }
.toptext p { margin: 0; line-height: 1.6; color: var(--ink-2); }

.faq { margin: 44px 0 0; max-width: 860px; }
.faq h2, .related h2, .hub h2, .rail h2 { font-family: Unbounded, Manrope, sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -.01em; margin: 0 0 16px; }
.faq details { background: var(--card); border-radius: var(--r-md); margin-bottom: 10px; box-shadow: var(--shadow-1); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 800; font-size: 16px; min-height: 56px; display: flex; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font-size: 22px; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 18px 18px; line-height: 1.6; color: var(--ink-2); }
.related { margin: 44px 0 0; }

.hub { margin: 0 0 36px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 6px; min-height: 116px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--card); text-decoration: none; color: inherit; box-shadow: var(--shadow-1); border: 1.5px solid transparent; transition: transform .15s var(--ease), border-color .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--c); }
.tile .ms { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 23px; }
.tile b { font-size: 15.5px; line-height: 1.3; }
.tile small { color: var(--muted); font-weight: 700; font-size: 13px; margin-top: auto; }

/* place page */
.place { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.gallery { position: sticky; top: 92px; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 3; background: var(--c); box-shadow: var(--shadow-2); }
.gallery.blank { display: grid; place-items: center; color: #fff; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 14px, transparent 14px 28px), radial-gradient(120% 120% at 20% 0%, color-mix(in srgb, var(--c) 55%, #fff), var(--c)); }
.gallery .huge { font-size: 120px; width: auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .2)); }
.slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .6); transition: width .2s; }
.dots i.on { width: 22px; border-radius: 4px; background: #fff; }
.kindpill { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, var(--card)); color: color-mix(in srgb, var(--c) 70%, var(--ink)); font-weight: 800; font-size: 14px; text-decoration: none; margin-bottom: 14px; }
.kindpill .ms { font-size: 19px; }
.place-where { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; margin: 0 0 18px; }
.place-where .ms { font-size: 19px; }
.place-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.place-desc { font-size: 17px; line-height: 1.65; color: var(--ink-2); margin: 22px 0; }
.rows { margin: 0 0 18px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.row { display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; padding: 15px 18px; border-top: 1px solid var(--line); align-items: start; }
.row:first-child { border-top: 0; }
.row > .ms, .row > svg { color: var(--muted); width: 22px; height: 22px; grid-row: span 2; }
.row dt { font-size: 12.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.row dd { margin: 3px 0 0; font-size: 15.5px; line-height: 1.45; word-break: break-word; }
.row dd a { font-weight: 700; text-decoration: none; }
.row small { color: var(--muted); }
.minimap { height: 260px; border-radius: var(--r-lg); overflow: hidden; background: var(--card-2); margin: 0 0 18px; box-shadow: var(--shadow-1); }
.rail { margin: 46px 0 0; }

/* near me */
.nearbox { display: grid; gap: 16px; }
.addr { display: flex; gap: 10px; max-width: 640px; }
.addr input, .addform input, .addform select, .addform textarea {
  flex: 1; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 500 16px Manrope, sans-serif; width: 100%;
}
.addr input:focus, .addform input:focus, .addform select:focus, .addform textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px var(--ring); }
.radius { display: flex; flex-wrap: wrap; gap: 8px; }
.radius button { min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); font-weight: 800; font-size: 14px; }
.radius button[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.status { color: var(--ink-2); font-weight: 600; margin: 0; }

/* add form */
.addform { display: grid; gap: 16px; max-width: 680px; background: var(--card); padding: 24px; border-radius: var(--r-xl); box-shadow: var(--shadow-1); }
.addform label { display: grid; gap: 8px; font-weight: 800; font-size: 14px; color: var(--ink-2); }
.addform .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.addform .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.addform .check input { width: 24px; min-height: 24px; height: 24px; flex: none; margin: 0; }
.addform .hp { position: absolute; left: -9999px; }
.addform pre { white-space: pre-wrap; background: var(--card-2); padding: 14px; border-radius: 12px; font-size: 13.5px; }

.prose { max-width: 760px; font-size: 17px; line-height: 1.7; color: var(--ink-2); }

/* footer */
.sitefoot { border-top: 1px solid var(--line); padding: 36px max(20px, calc((100vw - 1240px) / 2)) calc(110px + env(safe-area-inset-bottom)); background: var(--panel); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 26px; margin-bottom: 22px; }
.foot-cols h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 10px; }
.foot-cols a { display: block; padding: 7px 0; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.foot-cols a:hover { color: var(--blue); }

@media (max-width: 900px) {
  .place { grid-template-columns: 1fr; gap: 20px; }
  .gallery { position: relative; top: 0; margin: 0 -16px; border-radius: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 760px) {
  /* no backdrop-filter here: it would make the fixed tab bar position itself inside the header */
  .sitebar { gap: 10px; padding: 10px 16px; backdrop-filter: none; background: var(--panel); }
  .sitebar .langs { margin-left: auto; }
  .sitebar .brand-text small { display: none; }
  .sitebar .brand-text b { font-size: 15px; white-space: normal; line-height: 1.1; }
  .sitebar .brand { min-width: 0; flex: 1; }
  .sitebar .langs a { min-width: 38px; padding: 0 6px; font-size: 11.5px; }
  body.page { overflow-x: hidden; }
  .logo { width: 38px; height: 38px; border-radius: 12px; }
  .btn-add span:not(.ms) { display: none; }
  .btn-add { padding: 0; width: 44px; justify-content: center; }
  /* bottom tab bar: easy to reach with a thumb */
  .mainnav {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; margin: 0; justify-content: space-around; gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .mainnav a { flex: 1; flex-direction: column; gap: 3px; min-height: 54px; padding: 4px 2px; font-size: 10.5px; justify-content: center; text-align: center; }
  .mainnav a span:not(.ms) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .mainnav .ms { font-size: 23px; }
  .mainnav .favcount { left: 50%; top: 2px; }
  .wrap { padding: 16px 16px 40px; }
  .lead { font-size: 16px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid.compact .pc-name { font-size: 14px; }
  .grid.compact .pc-body { padding: 10px 12px 12px; }
  .grid.compact > li > .heart { width: 38px; height: 38px; top: 8px; right: 8px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { min-height: 104px; padding: 14px; }
  .addform { padding: 18px; }
  .addform .two { grid-template-columns: 1fr; }
  .acts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 430px) {
  .sitebar .brand-text { display: none; }
}
