:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --text: #111111;
  --muted: #5f6368;
  --line: #e7e8ea;
  --accent: #1f6fff;
  --accent-soft: #eaf1ff;
  --radius: 16px;
  --shadow: 0 14px 35px rgba(18, 26, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Helvetica Neue", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: radial-gradient(90% 45% at 0% 0%, #eef4ff 0%, var(--bg) 45%) no-repeat;
  overflow-x: hidden;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button {
  font: inherit;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.app-shell {
  max-width: 100%;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(8px + env(safe-area-inset-top)) 12px calc(88px + env(safe-area-inset-bottom));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(8px);
}

.logo-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
}

.logo-wrap picture {
  display: block;
}

.logo-image {
  width: clamp(150px, 34vw, 240px);
  height: auto;
  display: block;
  object-fit: contain;
}

.header-action {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
}

.content {
  margin-top: 8px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: reveal 240ms ease;
}

.hero {
  border-radius: 20px;
  padding: clamp(16px, 4.2vw, 34px);
  background: linear-gradient(145deg, #121212 10%, #1f2e4d 64%, #21447e 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.eyebrow {
  font-size: 12px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(24px, 7.2vw, 46px);
  line-height: 1.08;
  max-width: 16ch;
}

.hero p {
  margin-top: 10px;
  color: #dae0eb;
  max-width: 34ch;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 20px 2px 14px;
  flex-wrap: wrap;
}

.section-head.sticky {
  position: sticky;
  top: 68px;
  z-index: 5;
  backdrop-filter: blur(8px);
  padding: 8px 0;
}

.section-head h2 {
  font-size: clamp(20px, 2.5vw, 28px);
}

.text-btn {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}

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

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.quick-item {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 10px 4px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.q-icon {
  width: 28px;
  height: 28px;
  line-height: 1;
  color: #111;
}

.q-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.h-scroll {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 2px;
  scroll-snap-type: x mandatory;
}

.h-scroll > * {
  min-width: 78%;
  scroll-snap-align: start;
}

.cards-2 > * {
  min-width: calc((100% - 24px) / 2.5);
}

#categoryList .event-cover {
  height: 92px;
}

#categoryList .space-body {
  padding: 8px;
}

#categoryList .space-body h3 {
  font-size: 14px;
  font-weight: 600;
}

#categoryList .space-body .muted {
  font-size: 12px;
  line-height: 1.35;
}

#hotEventList .event-body h3,
#homeVenueList .news-body h3 {
  font-size: 14px;
  font-weight: 600;
}

#hotEventList .event-meta,
#hotEventList .muted,
#homeVenueList .news-body p,
#homeVenueList .event-meta {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

#categoryList .space-card,
#hotEventList .event-card,
#homeVenueList .news-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#categoryList .event-cover,
#hotEventList .event-cover,
#homeVenueList .news-cover {
  border-radius: 0;
}

#homeVenueList .venue-row-card {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 10px;
  align-items: start;
}

#homeVenueList .venue-row-card .news-cover {
  height: 110px;
  object-fit: cover;
}

#homeVenueList .venue-row-card .news-body {
  padding: 0;
}

.space-card,
.event-card,
.news-card {
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
}

.space-card {
  box-shadow: var(--shadow);
}

.space-images {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 6px;
  height: 190px;
}

.space-images img,
.event-cover,
.news-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.space-side {
  display: grid;
  gap: 6px;
}

.space-body,
.event-body,
.news-body {
  padding: 14px;
}

.space-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.price {
  font-size: 22px;
  font-weight: 800;
}

.price small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.tag {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.segmented {
  display: flex;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar {
  display: none;
}

.seg {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  transition: all 180ms ease;
  white-space: nowrap;
  flex: 0 0 auto;
}

.seg.active {
  background: #111;
  color: #fff;
}

.event-list,
.news-list {
  display: grid;
  gap: 12px;
}

.event-card {
  display: block;
}

.event-card.mini .event-cover {
  height: 160px;
}

.event-cover {
  height: 190px;
}

.space-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.space-gallery-wrap {
  position: relative;
}

.space-gallery .event-cover {
  min-width: 100%;
  scroll-snap-align: start;
  flex: 0 0 100%;
}

.space-gallery::-webkit-scrollbar {
  display: none;
}

.event-meta {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.primary-btn,
.ghost-btn {
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 600;
}

.primary-btn {
  background: #111;
  color: #fff;
}

.primary-btn.done {
  background: #2f7d32;
}

.ghost-btn {
  border: 1px solid var(--line);
}

.news-card {
  display: block;
}

.news-cover {
  height: 160px;
}

.news-body p {
  color: var(--muted);
  margin-top: 6px;
}

.me-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
}

.profile p {
  color: var(--muted);
  margin-top: 4px;
}

.form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
}

.hint {
  color: #c0392b;
  font-size: 13px;
}

.member-register-page {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 240ms ease;
  padding: calc(10px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
}

.member-register-page.open {
  transform: translateX(0);
}

.member-register-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
}

.member-register-head h3 {
  margin: 0;
  font-size: 20px;
}

.member-register-body {
  margin-top: 10px;
}

.venue-map-large {
  width: 100%;
  height: 420px;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 12px;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.nav-item {
  padding: 12px 6px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.n-icon {
  width: 22px;
  height: 22px;
  line-height: 1;
  color: currentColor;
}

.n-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: none;
}

.nav-item.active {
  color: #111;
  background: transparent;
}

.nav-item.nav-main {
  border-radius: 999px;
  background: #1f27ff;
  color: #fff;
  margin-top: -10px;
  padding-top: 10px;
  box-shadow: 0 8px 20px rgba(31, 39, 255, 0.35);
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.venue-detail {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 240ms ease;
  overflow: auto;
  padding: calc(8px + env(safe-area-inset-top)) 12px calc(90px + env(safe-area-inset-bottom));
}

.venue-detail.open {
  transform: translateX(0);
}

.venue-detail-header {
  position: sticky;
  top: -10px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 0;
  padding: 10px 4px;
  background: var(--bg);
  backdrop-filter: blur(8px);
}

.venue-detail-header h2 {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 30px);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: min(70vw, 520px);
  pointer-events: none;
}

.back-arrow-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  position: relative;
}

.back-arrow-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid #111;
  border-left: 2px solid #111;
  transform: translate(-35%, -50%) rotate(-45deg);
}

.venue-detail-content {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 8px;
}

.detail-block {
  margin-bottom: 12px;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#venueDetailNavBtn {
  font-size: 12px;
  padding: 6px 10px;
  line-height: 1.2;
  text-decoration: none;
  color: #111;
}

.venue-carousel {
  margin: 10px 0 12px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f7f8fa;
}

.venue-carousel img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.venue-carousel .space-gallery {
  margin-top: 0;
}

.carousel-pager {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
}

.venue-map {
  margin-top: 10px;
  width: 100%;
  height: 120px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.venue-map .tmap-zoom-control,
.venue-map .tmap-control-scale,
.venue-map .tmap-control-compass {
  display: none !important;
}

.venue-static-map {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 820px) {
  .app-shell { max-width: 430px; }
  .venue-detail-content { max-width: 430px; }
}

@media (min-width: 1100px) {
  .space-images {
    height: 220px;
  }

  .hero h1 {
    max-width: 14ch;
  }
}
