@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Figtree:wght@400;500;600;700&display=swap');

:root {
  --ink: #0a2e2a;
  --muted: #5a746c;
  --paper: #f3faf6;
  --white: #fff;
  --line: #d4e8dd;
  --teal: #128c7e;
  --teal-deep: #075e54;
  --mint: #25d366;
  --wa: #25d366;
  --tg: #2aabee;
  --join: #e53935;
  --join-dark: #c62828;
  --navy: #0a2e2a;
  --radius: 16px;
  --shadow: 0 10px 28px rgba(10, 46, 42, .08);
  --header-h: 64px;
  --dock-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Figtree", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% -5%, rgba(37, 211, 102, .18), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(18, 140, 126, .14), transparent 50%),
    linear-gradient(180deg, #eaf7f0 0%, var(--paper) 45%, #e8f3ec 100%);
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: calc(var(--dock-h) + var(--safe-b));
}
body.menu-open { overflow: hidden; }
a { color: var(--teal-deep); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }
.wrap { width: min(1120px, calc(100% - 28px)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; gap: 10px;
  min-height: var(--header-h);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); font-family: "Sora", sans-serif;
  font-weight: 800; letter-spacing: -.04em; font-size: 1rem;
  min-width: 0; flex: 0 1 auto;
}
.brand img {
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line); flex: none;
}
.brand-text {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 180px;
}
.nav {
  display: flex; gap: 4px 14px; flex: 1; flex-wrap: wrap;
  align-items: center;
}
.nav a {
  color: var(--muted); font-weight: 600; font-size: .9rem;
  padding: 6px 0;
}
.nav a:hover { color: var(--teal); }
.nav-mobile-only { display: none !important; }
.hdr-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.search {
  display: flex; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; flex: none;
}
.search input {
  border: 0; background: transparent; padding: 9px 12px;
  width: 140px; outline: none; min-width: 0;
}
.search button {
  border: 0; background: var(--teal);
  color: #fff; padding: 9px 14px; font-weight: 700; cursor: pointer;
}
.menu-btn {
  display: none; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; width: 42px; height: 42px; font-size: 1.2rem;
  cursor: pointer; color: var(--ink); flex: none;
}
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(7, 30, 26, .45);
  z-index: 55;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--mint), var(--teal-deep));
  color: #fff !important; border: 0; border-radius: 12px;
  padding: 11px 16px; font-weight: 700; cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
  white-space: nowrap; text-align: center;
  min-height: 44px;
}
.btn:hover { transform: translateY(-1px); opacity: .96; }
.btn.ghost {
  background: transparent; color: var(--ink) !important; border: 1px solid var(--line);
}
.btn.join, .btn.play {
  background: linear-gradient(135deg, #ff5252, var(--join-dark));
  color: #fff !important;
}
.btn.play svg { width: 16px; height: 16px; flex: none; }
.btn.navy { background: var(--navy); }
.btn.danger { background: var(--join-dark); }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: .88rem; border-radius: 10px; }
.btn.ghost.btn-sm { color: var(--ink) !important; }

/* Hero */
.hero {
  position: relative; color: #fff; overflow: hidden;
  min-height: min(62vh, 480px); display: grid; align-items: end;
  background: #075e54 center/cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(115deg, rgba(7, 40, 36, .92) 0%, rgba(7, 94, 84, .68) 48%, rgba(37, 211, 102, .28) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding: 48px 0 40px; }
.hero .brand-mark {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: "Sora", sans-serif; font-weight: 800;
  font-size: clamp(1.35rem, 4vw, 2.1rem);
  letter-spacing: -.05em; margin-bottom: 10px;
}
.hero .brand-mark img {
  width: 52px; height: 52px; border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,.25); flex: none;
}
.hero h1 {
  margin: 0 0 10px; font-family: "Sora", sans-serif;
  font-size: clamp(1.25rem, 3.4vw, 1.85rem); letter-spacing: -.04em;
  max-width: 18ch; font-weight: 700;
}
.hero p {
  margin: 0 0 20px; max-width: 40ch; color: #dff8ea;
  font-size: 1.02rem;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn.ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.4); }

/* Quad shortcuts */
.quad {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: -24px; position: relative; z-index: 2;
}
.quad a {
  background: rgba(255,255,255,.97); border-radius: var(--radius);
  padding: 16px 14px; box-shadow: var(--shadow); color: var(--ink);
  font-family: "Sora", sans-serif; font-weight: 700; letter-spacing: -.02em;
  border: 1px solid rgba(212, 232, 221, .9);
  transition: transform .15s ease;
  min-height: 78px;
}
.quad a:hover { transform: translateY(-2px); }
.quad small {
  display: block; color: var(--muted); font-family: "Figtree", sans-serif;
  font-weight: 600; margin-top: 6px; font-size: .82rem;
}
.quad .wa { border-top: 4px solid var(--wa); }
.quad .tg { border-top: 4px solid var(--tg); }

.app-cta {
  margin: 24px 0 4px;
  background: linear-gradient(120deg, #075e54, #128c7e);
  color: #fff; border-radius: 20px; padding: 22px 20px;
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
  align-items: center; box-shadow: var(--shadow);
}
.app-cta h2 {
  margin: 0 0 6px; font-family: "Sora", sans-serif;
  letter-spacing: -.03em; font-size: 1.3rem;
}
.app-cta p { margin: 0; color: #d9f5e7; max-width: 48ch; font-size: .95rem; }
.app-cta .btn.join { background: linear-gradient(135deg, #ff5252, #c62828); }

.section { padding: 36px 0; }
.section-tight { padding-top: 8px; }
.section h1, .section h2 {
  margin: 0 0 8px; letter-spacing: -.03em; color: var(--ink);
  font-family: "Sora", sans-serif;
}
.section h1 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
.section .lead { margin: 0 0 14px; color: var(--muted); max-width: 56ch; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; margin-bottom: 8px; flex-wrap: wrap;
}
.section-head .lead { margin-bottom: 0; }
.muted { color: var(--muted); }

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.card {
  background: rgba(255,255,255,.97); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--line);
  min-height: 0;
}
.card-top { display: flex; gap: 10px; align-items: flex-start; }
.card-title { min-width: 0; flex: 1; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: .9rem;
  background: linear-gradient(160deg, var(--mint), var(--teal-deep));
  flex: none;
}
.card h3 {
  margin: 0; font-size: .98rem; color: var(--ink);
  font-family: "Sora", sans-serif; line-height: 1.3;
  word-break: break-word;
}
.card h3 a { color: inherit; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.pill {
  font-size: .7rem; font-weight: 700; padding: 3px 8px;
  border-radius: 999px; background: #e7f5ec; color: var(--muted);
}
.pill.wa { background: #e8f8ee; color: #128c3a; }
.pill.tg { background: #e7f6fd; color: #1677a3; }
.pill.kind.gr { background: #eef6ff; color: #1d4e89; }
.pill.kind.ch { background: #edf8f3; color: #0a5f48; }
.pill.pro { background: #fff4d6; color: #8a5a00; }
.card-desc {
  margin: 0; color: var(--muted); font-size: .88rem; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .meta { font-size: .78rem; color: var(--muted); }
.card-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px;
}
.card-actions .btn { width: 100%; }

.cats { display: flex; gap: 8px; flex-wrap: wrap; }
.cats a {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-weight: 600; color: var(--ink); font-size: .88rem;
  white-space: nowrap;
}
.cats a:hover, .cats a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.cats-scroll {
  flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 6px; scrollbar-width: thin;
}
.cats-scroll::-webkit-scrollbar { height: 4px; }
.cats-scroll::-webkit-scrollbar-thumb { background: #b7d5c8; border-radius: 4px; }

.promo-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.promo-row .card { outline: 2px solid #e4c15a; }

/* Detail */
.detail {
  display: grid; grid-template-columns: 1fr 300px; gap: 20px;
  padding: 24px 0; align-items: start;
}
.detail .join-first { order: 2; }
.detail .detail-main { order: 1; }
.panel {
  background: rgba(255,255,255,.97); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.panel h1 {
  margin: 0 0 8px; color: var(--ink); letter-spacing: -.03em;
  font-family: "Sora", sans-serif; font-size: clamp(1.25rem, 3vw, 1.7rem);
  word-break: break-word;
}
.panel h2 { font-family: "Sora", sans-serif; font-size: 1.1rem; margin: 22px 0 10px; }
.sticky-join { position: sticky; top: calc(var(--header-h) + 12px); }
.side .join { width: 100%; margin-bottom: 10px; }
.detail-mobile-join { display: none; margin: 14px 0; }
.detail-mobile-join .btn { width: 100%; }

.form { display: grid; gap: 10px; }
.form label { font-weight: 700; font-size: .88rem; }
.form label .opt { font-weight: 500; color: var(--muted); }
.form .hint { margin: -4px 0 0; color: var(--muted); font-size: .82rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 12px 12px; border: 1.5px solid var(--line);
  border-radius: 12px; background: #fff; min-height: 44px;
}
.form textarea { min-height: 110px; resize: vertical; }
.alert { padding: 12px 14px; border-radius: 12px; margin: 12px 0; }
.alert.ok { background: #e8f8ee; color: #0a5f48; }
.alert.err { background: #fdeaea; color: #9b1c1c; }
.ad-slot { margin: 16px 0; text-align: center; overflow: hidden; }
.ad-slot img { max-height: 120px; margin-inline: auto; }

/* Footer */
.site-footer {
  background: linear-gradient(160deg, #0a2e2a, #075e54 70%);
  color: #c9d8cf; padding: 36px 0 28px; margin-top: 20px;
}
.site-footer a { color: #fff; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 22px; }
.foot strong { color: #fff; font-family: "Sora", sans-serif; display: block; margin-bottom: 8px; }
.foot .links { display: flex; flex-direction: column; gap: 8px; }
.foot-cta { margin-top: 14px; }
.foot-cta .btn { display: inline-flex; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pager { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager a {
  padding: 8px 12px; background: #fff; border-radius: 10px;
  border: 1px solid var(--line); min-width: 40px; text-align: center;
  font-weight: 600;
}
.pager a.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Mobile dock — hidden on desktop */
.mobile-dock { display: none; }

/* Tablet */
@media (max-width: 1024px) {
  .brand-text { max-width: 140px; }
  .nav { gap: 4px 10px; }
  .nav a { font-size: .84rem; }
  .search input { width: 110px; }
  .hdr-actions .btn { padding: 10px 12px; }
}

/* Mobile / small tablet */
@media (max-width: 900px) {
  :root { --dock-h: 64px; --header-h: 58px; }
  .wrap { width: min(1120px, calc(100% - 20px)); }
  .quad { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: -18px; }
  .quad a { padding: 14px 12px; font-size: .92rem; min-height: 72px; }
  .app-cta { grid-template-columns: 1fr; }
  .app-cta .btn { width: 100%; }
  .foot { grid-template-columns: 1fr; gap: 18px; }
  .form-row { grid-template-columns: 1fr; }
  .detail {
    grid-template-columns: 1fr;
    padding: 16px 0 8px;
  }
  .detail .join-first { display: none; }
  .detail-mobile-join { display: block; }
  .hero { min-height: auto; }
  .hero .wrap { padding: 32px 0 28px; }
  .hero h1 { max-width: none; }
  .hero-actions .btn { flex: 1 1 calc(50% - 6px); }
  .section { padding: 28px 0; }
  .section-head .btn { width: 100%; }

  .hdr-desk { display: none !important; }
  .menu-btn { display: grid; place-items: center; }
  .nav {
    display: none;
    position: fixed; left: 0; right: 0; top: var(--header-h);
    background: #fff; padding: 10px 16px 18px;
    border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 0; z-index: 70;
    box-shadow: 0 16px 30px rgba(0,0,0,.12);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav a {
    display: block; padding: 14px 4px;
    border-bottom: 1px solid var(--line); font-size: 1rem;
  }
  .nav a:last-child { border-bottom: 0; }
  .nav-mobile-only { display: block !important; }
  .search { order: 3; flex: 1 1 auto; min-width: 0; }
  .search input { width: 100%; flex: 1; }
  .site-header .bar { flex-wrap: wrap; gap: 8px; padding: 8px 0; min-height: auto; }
  .brand { flex: 1; min-width: 0; }
  .brand-text { max-width: none; font-size: .92rem; }
  .hdr-actions { margin-left: auto; }

  .mobile-dock {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255,255,255,.96);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + var(--safe-b));
    backdrop-filter: blur(12px);
  }
  .mobile-dock a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; color: var(--muted); font-size: .68rem; font-weight: 700;
    min-height: 48px; border-radius: 10px;
  }
  .mobile-dock a:active { background: #e8f5ee; color: var(--teal-deep); }
  .mobile-dock .dock-add {
    color: #fff; background: linear-gradient(135deg, var(--mint), var(--teal-deep));
    margin-top: -10px; border-radius: 14px; box-shadow: 0 6px 16px rgba(7,94,84,.28);
  }
  .site-footer { padding-bottom: 20px; margin-bottom: 0; }
}

@media (max-width: 560px) {
  .grid, .promo-row { grid-template-columns: 1fr; }
  .quad a { font-size: .86rem; padding: 12px 10px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { flex: 1 1 auto; width: 100%; }
  .card-actions { grid-template-columns: 1.2fr 1fr; }
  .panel { padding: 16px; }
  .brand-text { font-size: .86rem; }
  .account-actions { flex-direction: column; }
  .account-actions .btn { width: 100%; }
}

@media (min-width: 901px) {
  .nav-backdrop { display: none !important; }
}
