:root {
  --ink: #141311;
  --ink-soft: #3d3a34;
  --paper: #f6f1e8;
  --paper-2: #efe8db;
  --sea: #1a6b73;
  --sea-deep: #0a2a32;
  --gold: #c4a574;
  --coral: #b83a2f;
  --line: rgba(20, 19, 17, 0.12);
  --shadow: 0 18px 50px rgba(10, 42, 50, 0.12);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Outfit", "Avenir Next", system-ui, sans-serif;
  --body: "Source Serif 4", Georgia, serif;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-width: 0;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
  box-sizing: border-box;
}

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 241, 232, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 36px; width: auto; }
.nav { display: flex; gap: 20px; margin-left: auto; min-width: 0; }
.nav a { font-weight: 500; letter-spacing: 0.02em; font-size: 0.95rem; white-space: nowrap; }
.nav a:hover, .nav a.is-active { color: var(--sea); }
.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  margin-left: auto; flex-shrink: 0; place-items: center;
}
.header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch a { padding: 6px 10px; font-size: 0.75rem; font-weight: 600; }
.lang-switch a.is-active { background: var(--sea-deep); color: #fff; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line);
  display: grid; place-items: center; background: transparent; cursor: pointer;
}
.search-pop { display: none; padding: 0 0 16px; }
.search-pop.is-open { display: block; }
.search-pop form { display: flex; gap: 8px; }
.search-pop input {
  flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 12px 18px; outline: none;
}

.breaking {
  background: var(--sea-deep); color: #f6f1e8;
}
.breaking-inner {
  display: flex; align-items: center; gap: 14px;
  min-height: 44px; overflow: hidden;
}
.breaking b {
  background: var(--coral); color: #fff; font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 6px 10px; border-radius: 4px;
  flex: none; position: relative; z-index: 2;
}
.breaking-viewport {
  flex: 1; min-width: 0; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 12px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 12px), transparent);
}
.breaking-track { display: flex; width: max-content; animation: marquee 36s linear infinite; }
.breaking-set { display: flex; gap: 0; flex: none; }
.breaking-set a {
  display: inline-flex; align-items: center;
  white-space: nowrap; opacity: 0.92; font-size: 0.9rem;
  padding: 0 28px 0 20px; position: relative;
}
.breaking-set a::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); transform: translateY(-50%);
}
.breaking:hover .breaking-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.hero { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 22px; padding: 28px 0 10px; }
.hero-main { position: relative; aspect-ratio: 16/10; min-height: 0; border-radius: 28px; overflow: hidden; background: var(--sea-deep); color: #fff; }
.hero-main img, .hero-ph { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-ph { background: linear-gradient(135deg, #0a2a32, #1a6b73 55%, #c4a574); }
.hero-main .copy, .card-overlay .copy { position: relative; z-index: 2; padding: 28px; }
.hero-main .copy { position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(10,42,50,.88)); padding: 80px 32px 32px; }
.kicker { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.hero-main h1 {
  font-family: var(--serif); font-size: clamp(1.7rem, 3.6vw, 3.2rem); line-height: 1.08;
  margin: 8px 0 12px; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.lede { opacity: 0.86; max-width: 46ch; }
.hero-side { display: grid; gap: 14px; min-width: 0; }
.side-story { display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 14px; padding: 12px; border-radius: 18px; background: #fff; border: 1px solid var(--line); min-width: 0; }
.side-story .thumb { height: 88px; border-radius: 12px; overflow: hidden; background: var(--sea-deep); }
.side-story .thumb img, .side-story .thumb .hero-ph { height: 100%; width: 100%; object-fit: cover; }
.side-story h3 {
  font-family: var(--serif); font-size: 1.05rem; margin: 4px 0 0; line-height: 1.25; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.section { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-family: var(--serif); font-size: 2.1rem; margin: 0; font-weight: 500; }
.link-more { color: var(--sea); font-weight: 600; }

.city-row {
  display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden;
  padding: 2px 0 12px; scrollbar-width: thin;
}
.city-chip {
  flex: none; padding: 10px 16px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); font-weight: 500;
}
.city-chip:hover { border-color: var(--sea); color: var(--sea); }
.city-chip.is-active { background: var(--sea-deep); color: #fff; border-color: var(--sea-deep); }

.grid-4, .grid-3, .grid-2 { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.story-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.story-card .media { aspect-ratio: 16/10; border-radius: 18px; overflow: hidden; background: var(--sea-deep); position: relative; }
.story-card .media img, .story-card .media .hero-ph { width: 100%; height: 100%; object-fit: cover; }
.badge {
  display: inline-flex; padding: 3px 8px; border-radius: 999px; font-size: 0.7rem;
  letter-spacing: 0.08em; text-transform: uppercase; background: var(--paper-2); font-weight: 600;
}
.story-card h3 {
  font-family: var(--serif); font-size: 1.25rem; margin: 0; line-height: 1.2; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.story-card p {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0;
}
.meta { color: var(--ink-soft); font-size: 0.82rem; }

.magazine-band { background: var(--sea-deep); color: #f6f1e8; border-radius: 32px; padding: 36px; overflow: hidden; }
.magazine-band .grid-2 { align-items: center; }
.magazine-band h2 { color: #fff; }
.magazine-feature { aspect-ratio: 16/10; min-height: 0; border-radius: 22px; overflow: hidden; position: relative; background: #12343c; }
.magazine-feature img, .magazine-feature .hero-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.magazine-feature .copy { position: absolute; inset: auto 0 0 0; padding: 24px;
  background: linear-gradient(transparent, rgba(0,0,0,.7)); }

.dest-card { position: relative; aspect-ratio: 3/4; min-height: 0; border-radius: 24px; overflow: hidden; color: #fff; }
.dest-card .hero-ph, .dest-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dest-card .copy { position: relative; z-index: 1; padding: 22px; height: 100%; display: flex; flex-direction: column; justify-content: end;
  background: linear-gradient(transparent 20%, rgba(10,42,50,.82)); }
.dest-card h3 { font-family: var(--serif); font-size: 1.8rem; margin: 0; font-weight: 500; }

.newsletter {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 32px;
}
.newsletter h2 { font-family: var(--serif); font-size: 2rem; margin: 0 0 8px; font-weight: 500; }
.newsletter form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter input { flex: 1; min-width: 180px; border-radius: 999px; border: 1px solid var(--line); padding: 12px 16px; }
.btn {
  border: 0; border-radius: 999px; padding: 12px 18px; cursor: pointer; font-weight: 600;
  background: var(--sea-deep); color: #fff;
}
.btn-gold { background: var(--gold); color: var(--sea-deep); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-coral { background: var(--coral); color: #fff; }

.site-footer { margin-top: 40px; background: var(--sea-deep); color: #efe8db; padding: 48px 0 24px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.site-footer a { opacity: 0.85; }
.site-footer h4 { margin: 0 0 12px; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.tiny { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: 0.82rem; opacity: 0.7; }

.article-hero { padding: 28px 0 10px; }
.article-hero .kicker { color: var(--sea); }
.article-hero h1 { font-family: var(--serif); font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.12; margin: 10px 0 16px; font-weight: 500; max-width: min(28ch, 100%); }
.byline { display: flex; gap: 12px; align-items: center; color: var(--ink-soft); flex-wrap: wrap; }
.cover { border-radius: 28px; overflow: hidden; margin: 22px 0 32px; aspect-ratio: 16/9; background: var(--sea-deep); }
.cover img, .cover .hero-ph { width: 100%; height: 100%; object-fit: cover; }
.prose { font-family: var(--body); font-size: 1.15rem; line-height: 1.75; max-width: 68ch; overflow-wrap: anywhere; }
.prose img { border-radius: 16px; }
.prose p { margin: 0 0 1.1em; }
.prose h2, .prose h3 { font-family: var(--serif); }
.prose a { color: var(--sea); text-decoration: underline; }
.prose .source-note { font-family: var(--sans); font-size: 0.92rem; background: var(--paper-2); padding: 14px 16px; border-radius: 14px; }
.share { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; }
.share-btn {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  background: #fff; color: var(--ink); border-radius: 999px;
  padding: 8px 14px; font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.share-btn:hover, .share-btn.is-copied { border-color: var(--sea); color: var(--sea); }

.article-shell {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px; align-items: start; padding-bottom: 40px;
}
.popular-box {
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  padding: 18px 18px 8px; margin-top: 28px; position: sticky; top: 88px;
}
.popular-box h2 { font-family: var(--serif); font-size: 1.35rem; margin: 6px 0 10px; font-weight: 500; }
.popular-box ol { list-style: none; margin: 0; padding: 0; }
.popular-box li { border-bottom: 1px solid var(--line); }
.popular-box li:last-child { border-bottom: 0; }
.popular-box a { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 0; align-items: start; }
.popular-box .n, .popular-row .n {
  font-family: var(--serif); font-size: 1.2rem; color: var(--gold); font-weight: 600; line-height: 1.2;
}
.popular-box .t {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.popular-row {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px;
}
.popular-row a { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.popular-row strong {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-family: var(--serif); font-weight: 500;
}
.page-head { padding: 36px 0 12px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 4rem); margin: 6px 0; font-weight: 500; }
.filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 4px auto 28px; align-items: center;
}

.form-grid { display: grid; gap: 12px; max-width: 560px; }
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff;
}
.alert { padding: 12px 14px; border-radius: 12px; background: #e7f4ea; margin-bottom: 12px; }
.alert-error { background: #f8e6e4; }

.empty { padding: 40px; text-align: center; color: var(--ink-soft); }

@media (max-width: 1040px) {
  .hero, .grid-4, .grid-3, .grid-2, .newsletter, .foot-grid, .magazine-band .grid-2, .article-shell, .popular-row { grid-template-columns: 1fr; }
  .popular-box { position: static; }
  .nav-toggle { display: grid; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper);
    flex-direction: column; gap: 2px;
    margin: 0; padding: 8px 16px 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 10px 2px; }
  .hero-main { aspect-ratio: 4/5; }
  .header-inner { min-height: 62px; gap: 10px; }
  .mobile-nav { display: flex !important; }
  .magazine-band { padding: 22px; border-radius: 24px; }
  .dest-card { aspect-ratio: 4/5; }
}
.mobile-nav {
  display: none; position: sticky; bottom: 0; z-index: 30; background: #fff;
  border-top: 1px solid var(--line); justify-content: space-around; padding: 10px 8px 14px;
}
.mobile-nav a { font-size: 0.72rem; font-weight: 600; text-align: center; opacity: 0.8; }

/* Studio */
.studio { display: grid; grid-template-columns: 240px minmax(0,1fr); min-height: 100vh; background: #0b1214; color: #e8eceb; font-family: var(--sans); }
.side { background: #121c1f; border-right: 1px solid rgba(255,255,255,.06); padding: 22px 16px; min-width: 0; }
.side .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; color: #fff; font-weight: 700; letter-spacing: 0.04em; }
.side nav a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 12px; color: #c5cdcb; margin-bottom: 4px;
}
.side nav a:hover, .side nav a.is-active { background: rgba(196,165,116,.12); color: #fff; }
.side .badge-count { background: var(--coral); color: #fff; border-radius: 999px; font-size: 0.7rem; padding: 1px 7px; }
.studio-main { padding: 28px; min-width: 0; overflow-x: auto; }
.studio-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.studio-top > div:not(:first-child) { display: flex; flex-wrap: wrap; gap: 8px; }
.studio h1 { font-family: var(--serif); font-weight: 500; margin: 0; color: #fff; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: #162226; border: 1px solid rgba(255,255,255,.06); border-radius: 16px; padding: 16px; }
.stat b { display: block; font-size: 1.8rem; color: var(--gold); }
.panel { background: #162226; border: 1px solid rgba(255,255,255,.06); border-radius: 18px; padding: 16px; margin-top: 16px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 0.92rem; }
.table a { color: #d7c09a; }
.wire { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,0.9fr); gap: 16px; }
.wire-item { display: grid; grid-template-columns: 96px minmax(0,1fr) auto; gap: 12px; padding: 12px; border-bottom: 1px solid rgba(255,255,255,.06); min-width: 0; }
.wire-item img, .wire-item .ph { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; background: #0a2a32; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at top, #1a6b73, #0b1214 55%); }
.login-card { width: min(420px, calc(100% - 32px)); background: #121c1f; padding: 32px; border-radius: 24px; color: #fff; }
.login-card input { width: 100%; margin: 8px 0 14px; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: #0b1214; color: #fff; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button { background: #0b1214; color: #c5cdcb; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.tabs button.is-on { background: var(--gold); color: #0b1214; }
.editor-grid { display: grid; grid-template-columns: 1.5fr 0.7fr; gap: 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: #9aa8a5; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: #0b1214; color: #fff; border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 10px 12px;
}
.ql-toolbar, .ql-container { background: #fff; color: #111; border-radius: 8px; }
.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; color: #c5cdcb; }
.muted { color: #9aa8a5; font-size: 0.88rem; }
.ok { background: #1e3b2f; color: #b7e0c6; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.err { background: #3b1e1e; color: #f0c2c2; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
@media (max-width: 900px) {
  .studio, .editor-grid, .wire, .cards { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 5; }
  .side nav { display: flex; gap: 4px; overflow-x: auto; }
  .side nav a { flex: none; white-space: nowrap; margin: 0; }
  .wire-item { grid-template-columns: 72px minmax(0,1fr); }
  .wire-item > :last-child { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
}

.install { min-height: 100vh; background: var(--paper); padding: 40px 20px; }
.install-card { width: min(640px, 100%); margin: 0 auto; background: #fff; border-radius: 24px; padding: 32px; border: 1px solid var(--line); }
.install-card h1 { font-family: var(--serif); font-weight: 500; }
.dest-d0 { background: linear-gradient(135deg,#0a2a32,#1a6b73); }
.dest-d1 { background: linear-gradient(135deg,#12343c,#c4a574); }
.dest-d2 { background: linear-gradient(135deg,#1a3d2f,#1a6b73); }
.dest-d3 { background: linear-gradient(135deg,#4a2a12,#c4a574); }
.dest-d4 { background: linear-gradient(135deg,#0e3a4a,#67a0a8); }
.dest-d5 { background: linear-gradient(135deg,#2a4a1a,#c4a574); }
.dest-d6 { background: linear-gradient(135deg,#1b2e24,#7aa187); }
.dest-d7 { background: linear-gradient(135deg,#0a2a32,#b83a2f); }
