:root {
  color-scheme: dark;
  --ink: #e7d5c5;
  --muted: #a68f7c;
  --line: #3a2f29;
  --paper: #050505;
  --surface: #0d0d0d;
  --accent: #b8794d;
  --accent-2: #c6926b;
  --rose: #fb7185;
  --sky: #60a5fa;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

.primary {
  border-color: #fff;
  background: #fff;
  color: #050505;
}

.topbar {
  display: flex;
  align-items: center;
  gap: clamp(22px, 4vw, 68px);
  padding: 24px clamp(16px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: #050505;
}

.brand-home {
  display: grid;
  flex: 0 0 auto;
  min-width: 108px;
  padding: 9px 12px;
  border: 2px solid var(--ink);
  color: var(--ink);
  line-height: 0.92;
  text-decoration: none;
}

.brand-home span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.brand-home strong {
  font-size: 27px;
  letter-spacing: 0.05em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 46px);
  min-width: 0;
}

.primary-nav-link {
  position: relative;
  padding: 12px 0;
  color: var(--muted);
  font-size: clamp(15px, 1.35vw, 20px);
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav-link::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  background: var(--accent);
  content: "";
  transition: transform 160ms ease;
}

.primary-nav-link:hover,
.primary-nav-link.active {
  color: var(--ink);
}

.primary-nav-link.active::after {
  transform: scaleX(1);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-2);
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.auth-pill {
  flex: 0 0 auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}

.session-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.small-button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
}

.ghost {
  background: transparent;
}

.layout {
  display: block;
  padding: 0 clamp(16px, 4vw, 64px) 64px;
}

.page-view {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.panel {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.controls {
  position: sticky;
  top: 18px;
  overflow: hidden;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.tab {
  border: 0;
  border-radius: 0;
  background: #111;
  color: var(--muted);
  font-weight: 700;
}

.tab.active {
  background: var(--surface);
  color: #fff;
  box-shadow: inset 0 -3px 0 #fff;
}

.tab-panel {
  display: none;
  padding: 18px;
}

.tab-panel.active {
  display: block;
}

.stack {
  display: grid;
  gap: 12px;
}

.separated {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.business-status {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #141414;
  color: var(--muted);
  font-size: 14px;
}

.my-cafes {
  display: grid;
  gap: 8px;
}

.my-cafe-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
}

.my-cafe-item strong {
  display: block;
}

.is-disabled {
  opacity: 0.58;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
  color: var(--ink);
  padding: 10px 11px;
}

textarea {
  resize: vertical;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.location-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.nearby-intro {
  margin-bottom: 18px;
}

.nearby-intro h2 {
  margin-bottom: 6px;
  font-size: 25px;
}

.nearby-intro > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.feed {
  display: grid;
  gap: 14px;
}

.page-view {
  display: none;
  min-width: 0;
}

.page-view.active {
  display: block;
}

.snap-panel-head,
.snap-view-head,
.profile-snap-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.snap-panel-head h2,
.snap-view-head h2 {
  margin: 0;
  font-size: 24px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 18px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.segmented button {
  border: 0;
  border-radius: 0;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  background: #fff;
  color: #050505;
}

.snap-view-head {
  align-items: flex-end;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.snap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.snap-tile {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 5;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #1b1b1b;
  text-align: left;
}

.snap-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.snap-tile:hover img {
  transform: scale(1.025);
}

.snap-tile-shade {
  position: absolute;
  inset: 42% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.72));
}

.snap-tile-meta {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  gap: 3px;
  color: white;
}

.snap-tile-meta b {
  font-size: 15px;
}

.snap-tile-meta span {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snap-tile-like {
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  min-height: 260px;
  place-content: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

dialog {
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

dialog::backdrop {
  background: rgba(17, 24, 39, 0.76);
}

.snap-dialog {
  width: min(1000px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
}

.profile-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 28px;
}

.dialog-close {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 10px;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.72);
  color: white;
  font-size: 26px;
  line-height: 1;
}

.snap-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  min-height: min(760px, calc(100vh - 28px));
}

.snap-detail-media {
  display: grid;
  min-width: 0;
  margin: 0;
  place-items: center;
  background: #111;
}

.snap-detail-media img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 28px);
  object-fit: contain;
}

.snap-detail-copy {
  display: flex;
  min-width: 0;
  padding: 22px;
  flex-direction: column;
}

.profile-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 52px;
  padding: 0 48px 12px 0;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.profile-link span:not(.avatar) {
  display: grid;
  gap: 2px;
}

.profile-link small,
.snap-cafe-tag small {
  color: var(--muted);
}

.avatar {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 900;
  object-fit: cover;
  place-items: center;
}

.avatar-large {
  width: 86px;
  height: 86px;
  font-size: 30px;
}

.snap-cafe-tag {
  display: grid;
  gap: 2px;
  margin-top: 14px;
  padding: 11px 12px;
  border-left: 3px solid var(--accent-2);
  background: #17130d;
  font-size: 14px;
  font-weight: 800;
}

.snap-copy-body {
  padding: 22px 0 14px;
}

.snap-copy-body p:not(.eyebrow) {
  line-height: 1.65;
  white-space: pre-wrap;
}

.snap-copy-body time {
  color: var(--muted);
  font-size: 12px;
}

.snap-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.icon-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0;
  border: 0;
  font-size: 22px;
}

.icon-action b {
  font-size: 14px;
}

.icon-action.liked {
  color: var(--rose);
}

.snap-comment-list {
  display: grid;
  gap: 12px;
  max-height: 210px;
  padding: 14px 0;
  overflow: auto;
}

.snap-comment button {
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--accent);
}

.snap-comment p {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.snap-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding-right: 34px;
}

.profile-identity h2 {
  margin: 0 0 7px;
  font-size: 25px;
}

.profile-identity p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.follow-button.active {
  background: var(--ink);
  color: white;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.profile-stats div {
  border-left: 1px solid var(--line);
}

.profile-stats div:first-child {
  border-left: 0;
}

.profile-stats dt {
  font-size: 20px;
  font-weight: 900;
}

.profile-stats dd {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 22px;
}

.profile-snap-head {
  align-items: center;
  margin-bottom: 10px;
}

.profile-snap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.profile-snap-grid button {
  aspect-ratio: 1;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.profile-snap-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-guide-head,
.nearest-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.map-guide-head {
  min-height: 170px;
  padding: 32px 4px 24px;
}

.map-guide-head h2 {
  margin: 0 0 8px;
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.map-guide-head p:last-child {
  margin: 0;
  color: var(--muted);
}

.map-guide-head > strong {
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.cafe-map-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b0b0b;
}

.map-filter-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #0d0d0d;
}

.map-filter-button {
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #151515;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.map-filter-button.active {
  border-color: #fff;
  background: #fff;
  color: #050505;
}

.map-filter-bar > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

#cafeMap {
  width: 100%;
  height: clamp(420px, 60vh, 680px);
  background: #101010;
}

.map-key {
  position: absolute;
  z-index: 500;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 5, 5, 0.88);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.map-key-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.leaflet-tile-pane {
  filter: grayscale(1) invert(0.92) hue-rotate(180deg) brightness(0.72) contrast(1.18);
}

.leaflet-control-zoom a,
.leaflet-control-attribution {
  border-color: var(--line) !important;
  background: #0d0d0d !important;
  color: #fff !important;
}

.leaflet-control-attribution a {
  color: var(--accent) !important;
}

.coffee-map-pin {
  border: 0;
  background: transparent;
}

.coffee-map-pin span {
  display: grid;
  width: 42px;
  height: 42px;
  transform: rotate(-45deg);
  border: 3px solid #050505;
  border-radius: 50% 50% 50% 0;
  background: #fff;
  color: #050505;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
  place-items: center;
}

.coffee-map-pin span::after {
  content: attr(data-rank);
  transform: rotate(45deg);
}

.coffee-map-pin.business span {
  border-color: #fff;
  background: var(--accent);
  color: #050505;
}

.coffee-user-pin span {
  display: block;
  width: 24px;
  height: 24px;
  border: 5px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(184, 121, 77, 0.28), 0 5px 16px rgba(0, 0, 0, 0.5);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #0d0d0d;
  color: #fff;
}

.leaflet-popup-content-wrapper {
  border: 1px solid var(--line);
  border-radius: 0;
}

.map-popup {
  display: grid;
  min-width: 210px;
  gap: 4px;
}

.map-popup > img {
  width: calc(100% + 40px);
  height: 126px;
  margin: -14px -20px 7px;
  object-fit: cover;
}

.map-popup > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-popup strong {
  font-size: 16px;
}

.map-popup small {
  color: var(--muted);
}

.map-popup > button {
  min-height: 34px;
  margin-top: 7px;
  border-color: #fff;
  background: #fff;
  color: #050505;
  font-size: 12px;
  font-weight: 850;
}

.owner-snap-badge {
  width: max-content;
  margin-top: 3px;
  padding: 4px 6px;
  background: var(--accent);
  color: #050505;
  font-size: 10px;
}

.map-unavailable {
  display: grid;
  min-height: 420px;
  padding: 24px;
  color: var(--muted);
  place-items: center;
  text-align: center;
}

.nearest-head {
  margin: 36px 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.nearest-head h2 {
  margin: 0;
  font-size: 28px;
}

.cafe-rank {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.cafe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-focus {
  min-height: 36px;
  padding: 8px 10px;
  border-color: #fff;
  background: #fff;
  color: #050505;
  font-size: 14px;
  font-weight: 800;
}

.cafe-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.cafe-image {
  min-height: 168px;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.12), rgba(242, 169, 59, 0.18)),
    url("https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?auto=format&fit=crop&w=600&q=80") center/cover;
}

.cafe-body {
  padding: 18px 18px 18px 0;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.meta,
.small {
  color: var(--muted);
  font-size: 14px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.badge {
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #151515;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.badge.orange {
  border-color: #4a3617;
  background: #1c160d;
  color: var(--accent-2);
}

.badge.owner {
  border-color: var(--accent);
  background: var(--accent);
  color: #050505;
}

.map-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.map-link:hover {
  border-color: var(--accent);
}

.menu {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
}

.menu-image {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0a0a;
}

.menu ul,
.comments {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.menu li,
.comments li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.comments li:first-child,
.menu li:first-child {
  border-top: 0;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 13px 14px;
  border-radius: 8px;
  background: #fff;
  color: #050505;
  box-shadow: var(--shadow);
}

.section-hero {
  display: grid;
  min-height: 220px;
  padding: 54px 0 34px;
  align-content: end;
  border-bottom: 1px solid var(--line);
}

.section-hero h1 {
  color: var(--ink);
  font-size: clamp(38px, 6vw, 82px);
  letter-spacing: -0.055em;
}

.section-hero > p:last-child {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.map-home-actions {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.map-home-actions strong {
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.home-stream {
  margin-top: clamp(54px, 8vw, 110px);
}

.stream-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.stream-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.stream-head > span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.hot-cafe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hot-cafe-card {
  display: grid;
  min-width: 0;
  min-height: 138px;
  grid-template-columns: 48px 112px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 0;
  background: #0b0b0b;
  text-align: left;
}

.hot-cafe-card:hover {
  background: #12100f;
}

.hot-rank {
  color: var(--accent);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hot-cafe-image {
  width: 112px;
  height: 108px;
  background: linear-gradient(135deg, #251912, #0b0b0b);
  background-position: center;
  background-size: cover;
}

.hot-cafe-copy {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.hot-cafe-copy b {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-cafe-copy small {
  color: var(--muted);
  line-height: 1.5;
}

.home-snap-grid,
.owner-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.owner-post-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-snap-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #17120f;
  text-align: left;
}

.home-snap-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.home-snap-card:hover img {
  transform: scale(1.025);
}

.home-snap-overlay {
  position: absolute;
  inset: 30% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.88));
}

.home-snap-copy {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  gap: 6px;
  color: #fff;
}

.home-snap-copy em {
  width: max-content;
  padding: 4px 6px;
  background: var(--accent);
  color: #080604;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.home-snap-copy b {
  font-size: clamp(17px, 1.7vw, 25px);
  line-height: 1.15;
}

.home-snap-copy small {
  color: #d5c1b1;
  line-height: 1.35;
}

.home-snap-card.owner {
  outline: 1px solid rgba(184, 121, 77, 0.6);
  outline-offset: -1px;
}

.network-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 70px);
  padding-top: 36px;
}

.network-tools {
  position: sticky;
  top: 24px;
  overflow: hidden;
}

.network-tools .tab-panel,
.settings-tools .tab-panel {
  display: block;
  padding: 22px;
}

.network-tools .tab-panel + .tab-panel,
.settings-tools .tab-panel + .tab-panel {
  border-top: 1px solid var(--line);
}

.network-feed {
  min-width: 0;
}

.news-editor,
.preference-form {
  display: grid;
  max-width: 760px;
  gap: 14px;
  margin: 34px 0;
  padding: 24px;
}

.news-grid {
  display: grid;
  gap: 1px;
  margin-top: 34px;
  background: var(--line);
}

.news-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  min-height: 310px;
  background: #080808;
}

.news-card > img {
  width: 100%;
  height: 100%;
  min-height: 310px;
  object-fit: cover;
}

.news-card > div {
  display: grid;
  padding: clamp(24px, 5vw, 64px);
  align-content: center;
}

.news-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.news-card h2 {
  margin: 12px 0;
  color: var(--ink);
  font-size: clamp(27px, 3.4vw, 48px);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.news-card p {
  color: var(--muted);
  line-height: 1.7;
}

.news-card details {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.news-card summary {
  color: var(--accent-2);
  cursor: pointer;
  font-weight: 800;
}

.preference-form {
  margin-bottom: 24px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
}

.setting-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.settings-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
  margin-top: 24px;
}

.settings-tools > .tab-panel {
  border: 1px solid var(--line);
  background: var(--surface);
}

.site-footer {
  padding: 0 clamp(16px, 4vw, 48px) 32px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.doc-page {
  display: grid;
  gap: 24px;
  max-width: 840px;
  padding: 28px clamp(16px, 4vw, 48px) 56px;
}

.doc-page section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.doc-page p {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .primary-nav {
    width: 100%;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .session-box {
    align-items: flex-start;
    flex-direction: column;
    margin-left: 0;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .controls {
    position: static;
  }

  .network-layout,
  .settings-tools {
    grid-template-columns: 1fr;
  }

  .network-tools {
    position: static;
  }

  .hot-cafe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cafe-card {
    grid-template-columns: 1fr;
  }

  .cafe-body {
    padding: 0 16px 16px;
  }

  .cafe-image {
    min-height: 180px;
  }

  .snap-detail-layout {
    grid-template-columns: 1fr;
  }

  .snap-detail-media img {
    max-height: 62vh;
  }

  .snap-detail-copy {
    min-height: 520px;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding-top: 16px;
    padding-bottom: 14px;
  }

  .brand-home {
    min-width: 94px;
  }

  .brand-home strong {
    font-size: 23px;
  }

  .primary-nav-link {
    font-size: 15px;
  }

  .session-box {
    width: 100%;
    flex-direction: row;
  }

  .tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .location-row,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .card-head {
    display: grid;
  }

  .map-guide-head,
  .nearest-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-guide-head {
    min-height: 0;
    padding-top: 12px;
  }

  .map-home-actions {
    width: 100%;
    justify-items: start;
  }

  .hot-cafe-grid,
  .home-snap-grid {
    grid-template-columns: 1fr;
  }

  .hot-cafe-card {
    grid-template-columns: 40px 92px minmax(0, 1fr);
    min-height: 116px;
    padding: 10px;
  }

  .hot-cafe-image {
    width: 92px;
    height: 92px;
  }

  .home-snap-grid .home-snap-card {
    aspect-ratio: 16 / 13;
  }

  .owner-post-grid {
    gap: 5px;
  }

  .home-snap-copy {
    right: 11px;
    bottom: 11px;
    left: 11px;
  }

  .owner-post-grid .home-snap-copy small {
    display: none;
  }

  .stream-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .stream-head > span {
    text-align: left;
  }

  .section-hero {
    min-height: 180px;
    padding-top: 36px;
  }

  .news-card {
    grid-template-columns: 1fr;
  }

  .news-card > img {
    min-height: 220px;
    max-height: 280px;
  }

  #cafeMap {
    height: 380px;
  }

  .map-filter-bar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .map-filter-bar > span {
    width: 100%;
    margin: 2px 0 0;
    text-align: left;
  }

  .map-key {
    right: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
  }

  .snap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .snap-tile-meta {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }

  .snap-tile-meta span {
    display: none;
  }

  .snap-dialog,
  .profile-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .profile-dialog {
    padding: 22px 16px;
  }

  .profile-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .follow-button {
    grid-column: 1 / -1;
  }

  .profile-edit {
    grid-template-columns: 1fr;
  }
}
