/* Apple Maps-style infra place card - test build.
   Light mode uses warm cream surfaces (never plain white) per owner convention. */
.place-card {
  --pc-bg: rgba(17, 21, 28, 0.72);
  --pc-raised: rgba(23, 28, 36, 0.55);
  --pc-ink: #eefcf5;
  --pc-muted: #9caea4;
  --pc-line: rgba(255, 255, 255, 0.14);
  --pc-blue: #0a84ff;
  --pc-blue-ink: #fff;
  --pc-glass: blur(16px) saturate(1.35);
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(560px, calc(100vw - 20px));
  background: var(--pc-bg);
  -webkit-backdrop-filter: var(--pc-glass);
  backdrop-filter: var(--pc-glass);
  border: 1px solid var(--pc-line);
  border-radius: 22px;
  box-shadow:
    0 24px 70px #000a,
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: var(--pc-ink);
  font:
    14px/1.45 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  padding: 10px 18px 0;
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
  animation: pc-rise 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
html[data-theme="light"] .place-card {
  --pc-bg: rgba(237, 236, 225, 0.78);
  --pc-raised: rgba(246, 244, 233, 0.55);
  --pc-ink: #13241c;
  --pc-muted: #5c6b60;
  --pc-line: rgba(19, 36, 28, 0.16);
  box-shadow: 0 24px 70px #3d3a2a33;
}
@keyframes pc-rise {
  from {
    opacity: 0;
    transform: translate(-50%, 26px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.place-card.pc-drag {
  transition: none;
  animation: none;
}
/* Grab handle for drag-to-dismiss. */
.pc-grab {
  position: static;
  flex: 0 0 auto;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: 2px 0 10px;
  cursor: grab;
  touch-action: none;
  background: none;
}
.pc-grab:active {
  cursor: grabbing;
}
.pc-handle {
  width: 44px;
  height: 5px;
  border-radius: 99px;
  background: var(--pc-line);
}
/* Floating share/close buttons. */
.pc-fab {
  position: fixed;
  z-index: 1201;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--pc-line);
  background: var(--pc-raised);
  -webkit-backdrop-filter: var(--pc-glass);
  backdrop-filter: var(--pc-glass);
  color: var(--pc-ink);
  font-size: 16px;
  cursor: pointer;
  box-shadow:
    0 8px 24px #0006,
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s;
}
.pc-fab:hover {
  transform: scale(1.06);
}
.pc-fab.share {
  left: max(14px, calc(50% - 280px + 14px));
}
.pc-fab.close {
  right: max(14px, calc(50% - 280px + 14px));
}
.pc-fab-wrap {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 20px));
  z-index: 1201;
  pointer-events: none;
}
.pc-fab-wrap .pc-fab {
  position: absolute;
  pointer-events: auto;
}
.pc-fab-wrap .pc-fab.share {
  left: 2px;
}
.pc-fab-wrap .pc-fab.close {
  right: 2px;
}
.pc-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 2px 46px 0;
  text-align: center;
  overflow-wrap: break-word;
}
.pc-sub {
  color: var(--pc-muted);
  font-size: 14px;
  margin: 2px 46px 10px;
  text-align: center;
  overflow-wrap: break-word;
}
.pc-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.pc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pc-raised);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--pc-line);
  color: var(--pc-ink);
  border-radius: 9px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
}
.pc-badge i {
  font-style: normal;
  font-size: 13px;
}
.pc-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  border: 0;
  border-radius: 15px;
  background: var(--pc-blue);
  color: var(--pc-blue-ink);
  font-size: 16px;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  margin: 2px 0 16px;
  transition:
    filter 0.14s,
    transform 0.14s;
}
.pc-primary:hover {
  filter: brightness(1.08);
}
.pc-primary:active {
  transform: scale(0.985);
}
.pc-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.pc-tab {
  border: 1.5px solid var(--pc-line);
  background: transparent;
  color: var(--pc-ink);
  border-radius: 99px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pc-tab.on {
  background: var(--pc-blue);
  border-color: var(--pc-blue);
  color: #fff;
}
/* Fixed header: title, badges, primary action and tabs. */
.pc-head {
  flex: 0 0 auto;
}
/* Detail rows; scroll independently of the fixed header. */
.pc-rows {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 -18px;
  padding: 0 18px 82px;
}
.pc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-top: 1px solid var(--pc-line);
  cursor: default;
}
.pc-row:first-child {
  border-top: 0;
}
.pc-row-ic {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--pc-raised);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--pc-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.pc-row-main {
  flex: 1;
  min-width: 0;
}
.pc-row-main b {
  display: block;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-row-main small {
  display: block;
  color: var(--pc-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-row-val {
  flex: 0 0 auto;
  text-align: right;
  font-size: 13px;
  font-weight: 650;
  color: var(--pc-ink);
  max-width: 42%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-row a {
  color: var(--pc-blue);
  text-decoration: none;
  font-weight: 650;
}
/* Bottom action bar: idea pin (deferred), favourite, overflow. */
.pc-actionbar {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  background: var(--pc-raised);
  -webkit-backdrop-filter: var(--pc-glass);
  backdrop-filter: var(--pc-glass);
  border: 1px solid var(--pc-line);
  border-radius: 99px;
  padding: 6px;
  box-shadow:
    0 12px 30px #0007,
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  z-index: 2;
}
.pc-actionbar button {
  width: 46px;
  height: 40px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--pc-ink);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pc-actionbar button:hover {
  background: var(--pc-line);
}
.pc-actionbar button.faved {
  color: #f5c542;
}
/* Overflow menu: copy coordinates, jump to table. */
.pc-menu {
  position: absolute;
  bottom: 70px;
  right: 18px;
  z-index: 4;
  background: var(--pc-raised);
  -webkit-backdrop-filter: var(--pc-glass);
  backdrop-filter: var(--pc-glass);
  border: 1px solid var(--pc-line);
  border-radius: 14px;
  box-shadow:
    0 16px 44px #0008,
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  padding: 6px;
  min-width: 200px;
}
.pc-menu button {
  display: flex;
  width: 100%;
  gap: 9px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--pc-ink);
  padding: 10px 11px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.pc-menu button:hover {
  background: var(--pc-line);
}
/* Transient status message. */
.pc-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 1300;
  background: rgba(23, 28, 36, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #eefcf5;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 11px 16px;
  font: 600 13px system-ui;
  box-shadow: 0 14px 40px #000a;
  animation: pc-rise 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@supports not (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .place-card {
    --pc-bg: #11151c;
    --pc-raised: #171c24;
  }
  html[data-theme="light"] .place-card {
    --pc-bg: #edece1;
    --pc-raised: #f6f4e9;
  }
}
@media (prefers-reduced-motion: reduce) {
  .place-card,
  .pc-toast {
    animation: none;
  }
}
/* Phone layout: the card docks to the bottom sheet width. */
@media (max-width: 640px) {
  .place-card {
    bottom: 0;
    width: 100vw;
    border-radius: 20px 20px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    max-height: 78vh;
  }
}

/* Lucide icons inside the place card */
.place-card .ic {
  display: inline-block;
  vertical-align: middle;
}
.pc-row-ic .ic {
  width: 15px;
  height: 15px;
}
.pc-badge i {
  display: inline-flex;
  font-style: normal;
}
.pc-badge .ic {
  width: 11px;
  height: 11px;
}
.pc-fab .ic {
  width: 17px;
  height: 17px;
}
.pc-primary .ic {
  width: 14px;
  height: 14px;
}
.pc-actionbar .ic {
  width: 17px;
  height: 17px;
}
.pc-menu .ic {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}
