:root {
  --ink: #132e30;
  --muted: #6d7f7e;
  --cream: #f4f0e7;
  --paper: #fffdf9;
  --coral: #e76f51;
  --gold: #e9b44c;
  --blue: #4f8fa5;
  --line: #dfe4df;
  --shadow: 0 14px 40px rgba(25, 50, 47, .09);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "DM Sans", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: "DM Serif Display", serif; font-weight: 400; }

.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; padding: 29px 22px 20px; background: var(--ink); color: white; display: flex; flex-direction: column; z-index: 5; }
.brand { color: white; text-decoration: none; display: flex; align-items: center; gap: 10px; font: 26px "DM Serif Display", serif; letter-spacing: -.5px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50% 50% 50% 8px; transform: rotate(-10deg); color: var(--gold); }
.brand-mark::first-letter { transform: rotate(10deg); }
.main-nav { display: grid; gap: 7px; margin-top: 52px; }
.nav-item { border: 0; background: transparent; color: #b5c5c3; border-radius: 10px; padding: 12px 14px; text-align: left; display: flex; align-items: center; gap: 13px; font-weight: 600; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.09); }
.nav-item b { margin-left: auto; background: var(--coral); min-width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; }
.nav-icon { width: 20px; color: var(--gold); font-size: 18px; text-align: center; }
.sidebar-challenge { padding: 17px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; margin-top: auto; background: rgba(255,255,255,.05); }
.sidebar-challenge h3 { margin: 8px 0 4px; font-size: 14px; }
.sidebar-challenge p { color: #a9bab8; font-size: 12px; line-height: 1.5; }
.challenge-row { display: flex; justify-content: space-between; color: #c7d4d3; font-size: 10px; }
.challenge-row strong { color: var(--gold); }
.profile-mini { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.profile-mini strong, .profile-mini span { display: block; font-size: 11px; }
.profile-mini span { color: #90a4a1; margin-top: 3px; }
.profile-mini button { margin-left: auto; background: none; border: 0; color: white; }
.upgrade-link { margin-left: auto; color: var(--gold); text-decoration: none; font-size: 9px; font-weight: 700; }
.avatar { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--coral); color: white; font-size: 10px; font-weight: 700; }

main { margin-left: 248px; padding: 31px 42px 50px; max-width: 1600px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.eyebrow { display: block; color: var(--coral); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.eyebrow.light { color: var(--gold); }
.topbar h1 { font-size: 30px; margin: 3px 0 0; }
.page-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.streak-pill { padding: 9px 13px; border-radius: 30px; background: white; box-shadow: var(--shadow); color: var(--muted); font-size: 11px; }
.streak-pill span { color: var(--coral); margin-right: 5px; }
.icon-button { border: 0; width: 38px; height: 38px; border-radius: 50%; background: white; color: var(--coral); }
.primary-button, .secondary-button, .ghost-button { border: 0; border-radius: 8px; padding: 11px 17px; font-size: 11px; font-weight: 700; transition: transform .2s, filter .2s; }
.primary-button:hover, .secondary-button:hover, .ghost-button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.primary-button { background: var(--ink); color: white; }
.primary-button.coral { background: var(--coral); }
.ghost-button { background: rgba(255,255,255,.13); color: white; border: 1px solid rgba(255,255,255,.25); }
.secondary-button { width: 100%; color: var(--ink); background: transparent; border: 1px solid var(--line); }

.hero { min-height: 310px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 46px 48px; border-radius: 18px; color: white; background: linear-gradient(90deg, rgba(8,35,37,.96) 0%, rgba(8,35,37,.76) 44%, rgba(8,35,37,.08) 76%), url("assets/travel-hero.png") center 48% / cover; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.15); border-radius: inherit; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; max-width: 470px; }
.hero-tag { display: inline-block; padding: 6px 10px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 20px; color: var(--gold); font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; }
.hero h2 { font-size: 38px; line-height: 1.05; margin: 14px 0 10px; }
.hero p { color: #dbe5e3; max-width: 420px; font-size: 13px; line-height: 1.55; }
.hero-actions { display: flex; gap: 8px; margin-top: 23px; }
.hero-progress { position: relative; z-index: 1; display: grid; justify-items: center; gap: 7px; margin-right: 15px; font-size: 10px; color: #e5edeb; text-transform: uppercase; letter-spacing: 1px; }
.ring { --p: calc(var(--progress) * 1%); width: 114px; height: 114px; padding: 9px; border-radius: 50%; background: conic-gradient(var(--gold) var(--p), rgba(255,255,255,.25) 0); }
.ring::before { content: ""; position: absolute; width: 96px; height: 96px; border-radius: 50%; background: rgba(11,43,45,.76); }
.ring span { position: relative; height: 96px; display: grid; place-content: center; text-align: center; }
.ring strong { font: 33px "DM Serif Display", serif; }
.ring small { font-size: 9px; color: #c7d4d3; }

.section-block { margin-top: 34px; }
.hidden, [hidden] { display: none !important; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 15px; }
.section-heading h2 { margin: 4px 0 0; font-size: 23px; }
.text-button { border: 0; background: none; color: var(--coral); font-size: 11px; font-weight: 700; }
.list-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.list-card { min-width: 0; background: var(--paper); border: 1px solid rgba(19,46,48,.08); border-radius: 15px; padding: 19px; box-shadow: 0 7px 20px rgba(25,50,47,.04); transition: transform .25s, box-shadow .25s; }
.list-card:hover, .list-card:focus { transform: translateY(-3px); box-shadow: var(--shadow); outline: none; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-top button { border: 0; background: none; color: #8a9b99; }
.list-action { color: var(--coral) !important; font-size: 10px; font-weight: 700; }
.category-pill { padding: 5px 8px; border-radius: 20px; font-size: 8px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.coral-pill { background: #f9e5de; color: #a64731; }
.blue-pill { background: #deedf0; color: #306d7d; }
.gold-pill { background: #fbefd2; color: #8f6711; }
.list-card h3 { margin: 16px 0 4px; font-size: 15px; }
.list-card p { color: var(--muted); font-size: 10px; margin-bottom: 15px; }
.list-symbol { height: 64px; display: grid; place-items: center; margin-top: 6px; font: 53px "DM Serif Display", serif; }
.globe-symbol { color: var(--blue); }
.food-symbol { color: var(--gold); }
.state-art { height: 64px; position: relative; display: flex; align-items: center; margin-top: 6px; }
.state-art strong { color: var(--coral); font: 25px "DM Serif Display", serif; margin-left: auto; }
.state-dot { position: absolute; width: 22px; height: 17px; background: var(--ink); clip-path: polygon(4% 15%, 90% 0, 100% 80%, 15% 100%); opacity: .92; }
.d1 { left: 3px; top: 10px; }.d2 { left: 27px; top: 7px; }.d3 { left: 51px; top: 13px; }.d4 { left: 74px; top: 9px; }
.d5 { left: 12px; top: 31px; }.d6 { left: 36px; top: 29px; }.d7 { left: 61px; top: 35px; }.d8 { left: 86px; top: 29px; }.d9 { left: 110px; top: 35px; }
.progress-bar { height: 5px; border-radius: 5px; overflow: hidden; background: #e6e8e4; }
.progress-bar span { display: block; height: 100%; background: var(--coral); border-radius: inherit; }
.progress-bar.blue span { background: var(--blue); }
.progress-bar.gold span { background: var(--gold); }
.card-meta { display: flex; justify-content: space-between; color: #82918f; font-size: 9px; margin-top: 8px; }
.explore-grid, .badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.explore-card, .badge-card { background: var(--paper); border: 1px solid rgba(19,46,48,.08); border-radius: 15px; padding: 20px; box-shadow: 0 7px 20px rgba(25,50,47,.04); }
.explore-card h3, .badge-card h3 { margin: 14px 0 7px; font-size: 17px; }
.explore-card p, .badge-card p { color: var(--muted); font-size: 11px; line-height: 1.55; }
.explore-card .secondary-button { margin-top: 8px; }
.badge-grid { grid-template-columns: repeat(4, 1fr); }
.badge-card { text-align: center; }
.badge-card span { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 11px; border-radius: 50%; background: #eef1ed; color: var(--muted); font: 28px "DM Serif Display", serif; }
.badge-card.earned span { background: var(--gold); color: var(--ink); box-shadow: var(--shadow); }
.badge-card.earned { border-color: rgba(233,180,76,.5); }

.split-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .75fr); gap: 25px; }
.feed-card, .right-rail { background: var(--paper); border: 1px solid rgba(19,46,48,.08); border-radius: 15px; padding: 18px; }
.feed-card + .feed-card { margin-top: 13px; }
.feed-author { display: flex; align-items: center; gap: 10px; }
.feed-author strong, .feed-author span { display: block; font-size: 10px; }
.feed-author span { color: var(--muted); margin-top: 2px; }
.completion-badge { margin-left: auto; width: 31px; height: 31px; display: grid !important; place-items: center; border-radius: 50%; background: var(--gold); color: var(--ink) !important; font-weight: 700; border: 3px double white; }
.feed-title { margin: 14px 0 12px; font-family: "DM Serif Display", serif; font-size: 15px; }
.feed-photo { height: 190px; border-radius: 10px; background: linear-gradient(0deg, rgba(8,35,37,.15), rgba(8,35,37,.05)), url("assets/travel-hero.png") center 58% / cover; }
.feed-actions { display: flex; gap: 18px; margin-top: 13px; }
.feed-actions button { background: none; border: 0; color: var(--muted); font-size: 10px; }
.feed-actions .liked { color: var(--coral); font-weight: 700; }
.right-rail { margin-top: 34px; }
.section-heading.compact { margin-bottom: 9px; }
.leader { display: grid; grid-template-columns: 18px 34px 1fr auto; gap: 8px; align-items: center; padding: 10px 5px; border-bottom: 1px solid #edf0ec; }
.leader.you { margin: 0 -7px 3px; padding: 10px 12px; background: #f8ece5; border: 0; border-radius: 9px; }
.leader .rank { color: #839491; font-size: 10px; font-weight: 700; }
.leader strong, .leader span { display: block; font-size: 10px; }
.leader div span { color: var(--muted); margin-top: 2px; font-size: 8px; }
.leader b { color: var(--coral); font-size: 9px; }
.leaderboard + .secondary-button { margin-top: 13px; }
.photo.one { background: #547b75; }.photo.two { background: #9a634f; }.photo.three { background: #5e7896; }.photo.four { background: #8f8064; }

.mobile-nav { display: none; }
dialog { width: min(430px, calc(100% - 30px)); border: 0; border-radius: 18px; padding: 0; color: var(--ink); box-shadow: 0 30px 80px rgba(7,30,31,.3); }
dialog::backdrop { background: rgba(8,35,37,.6); backdrop-filter: blur(5px); }
dialog form { padding: 30px; position: relative; }
dialog h2 { font-size: 28px; margin: 5px 0 6px; }
dialog p { color: var(--muted); font-size: 12px; line-height: 1.5; }
dialog label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; margin-top: 15px; }
dialog input { width: 100%; border: 1px solid var(--line); padding: 11px; border-radius: 7px; color: var(--ink); }
.close-button { position: absolute; right: 17px; top: 15px; background: none; border: 0; font-size: 24px; color: var(--muted); }
.modal-submit { width: 100%; margin-top: 20px; background: var(--coral); }
.toast { position: fixed; right: 25px; bottom: 25px; background: var(--ink); color: white; padding: 13px 18px; border-radius: 8px; font-size: 11px; opacity: 0; transform: translateY(15px); transition: .25s; z-index: 20; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .sidebar { width: 205px; }
  main { margin-left: 205px; padding: 27px; }
  .list-grid { grid-template-columns: repeat(2, 1fr); }
  .explore-grid, .badge-grid { grid-template-columns: repeat(2, 1fr); }
  .split-layout { grid-template-columns: 1fr; }
  .right-rail { margin-top: 0; }
}

@media (max-width: 760px) {
  body { padding-bottom: 72px; }
  .sidebar { display: none; }
  main { margin: 0; padding: 20px 15px 30px; }
  .topbar { align-items: start; margin-bottom: 18px; }
  .topbar > div:first-child { min-width: 0; }
  .topbar h1 { font-size: 24px; }
  .top-actions .primary-button, .icon-button { display: none; }
  .streak-pill { font-size: 9px; padding: 8px 10px; }
  .hero { min-height: 390px; padding: 25px; align-items: end; background: linear-gradient(0deg, rgba(8,35,37,.98) 0%, rgba(8,35,37,.6) 46%, rgba(8,35,37,.06) 78%), url("assets/travel-hero.png") 64% center / cover; }
  .hero h2 { font-size: 31px; }
  .hero-progress { position: absolute; top: 23px; right: 16px; margin: 0; }
  .ring { width: 82px; height: 82px; padding: 7px; }
  .ring::before { width: 68px; height: 68px; }
  .ring span { height: 68px; }
  .ring strong { font-size: 24px; }
  .hero-actions button { flex: 1; padding: 11px 9px; }
  .section-block { margin-top: 27px; }
  .list-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: -15px; padding-right: 15px; scrollbar-width: none; }
  .list-card, .list-card:last-child { display: block; flex: 0 0 84%; scroll-snap-align: start; }
  .explore-grid, .badge-grid { grid-template-columns: 1fr; }
  .split-layout { gap: 0; }
  .community-section { min-width: 0; }
  .feed-photo { height: 180px; }
  .right-rail { display: none; }
  .mobile-nav { position: fixed; display: flex; align-items: center; justify-content: space-around; inset: auto 0 0; height: 65px; background: var(--ink); z-index: 10; }
  .mobile-nav button { color: #9eb2af; background: none; border: 0; display: grid; gap: 2px; place-items: center; font-size: 15px; }
  .mobile-nav button span { font-size: 8px; }
  .mobile-nav button.active { color: white; }
  .mobile-nav .mobile-add { width: 44px; height: 44px; border-radius: 50%; background: var(--coral); color: white; font-size: 24px; transform: translateY(-13px); box-shadow: 0 8px 20px rgba(0,0,0,.3); }
  .toast { left: 15px; right: 15px; bottom: 80px; text-align: center; }
}
