:root {
  --bg: #f3efe6;
  --bg-2: #ebe4d6;
  --ink: #1c1914;
  --muted: #6a6458;
  --line: rgba(28, 25, 20, 0.1);
  --card: rgba(255, 252, 246, 0.86);
  --card-solid: #fffdf8;
  --accent: #c45c26;
  --forest: #16382c;
  --forest-2: #1f6b5a;
  --shadow: 0 18px 50px rgba(28, 25, 20, 0.08);
  --radius: 22px;
  --max: 1120px;
  --sans: "PingFang SC", "SF Pro Display", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Songti SC", "Palatino Linotype", Georgia, serif;
  --header-bg: rgba(243, 239, 230, 0.78);
  --lightbox: rgba(12, 10, 8, 0.88);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412;
    --bg-2: #221e18;
    --ink: #f3efe6;
    --muted: #a39b8c;
    --line: rgba(243, 239, 230, 0.12);
    --card: rgba(36, 32, 27, 0.88);
    --card-solid: #24201b;
    --accent: #e07a3d;
    --forest: #1a4a3c;
    --forest-2: #8fd0bc;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --header-bg: rgba(22, 20, 18, 0.78);
    --lightbox: rgba(8, 7, 6, 0.92);
  }
  body {
    background:
      radial-gradient(900px 420px at 8% -10%, rgba(224, 122, 61, 0.16), transparent 50%),
      radial-gradient(800px 380px at 100% 0%, rgba(143, 208, 188, 0.1), transparent 46%),
      var(--bg);
  }
  .btn { background: #2f6f5c; color: #f7f3ea; }
  .brand-mark { background: #8fd0bc; }
  .brand-mark:before,
  .brand-mark:after { background: #161412; }
  .help-link:hover { background: var(--card-solid); }
  .nav-links a.is-active,
  .nav-links a:hover,
  .lang-btn:hover { background: rgba(255,255,255,.08); }
  input, select, textarea { background: #1c1914; border-color: var(--line); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(196, 92, 38, 0.12), transparent 50%),
    radial-gradient(800px 380px at 100% 0%, rgba(31, 107, 90, 0.1), transparent 46%),
    var(--bg);
  font: 16px/1.6 var(--sans);
}
#page { flex: 1; }

a { color: inherit; text-decoration: none; }
.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 40;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--forest);
  color: #f7f3ea;
}
.skip-link:focus { top: 12px; }
:focus-visible {
  outline: 2px solid var(--forest-2);
  outline-offset: 3px;
}
p a, .muted a, li a, td a {
  color: var(--forest-2);
  text-decoration: underline;
  text-decoration-color: rgba(31, 107, 90, 0.35);
  text-underline-offset: 3px;
}
p a:hover, .muted a:hover, li a:hover, td a:hover { text-decoration-color: currentColor; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--forest);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12);
  position: relative;
}
.brand-mark:before,
.brand-mark:after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  height: 2px;
  background: #f3efe6;
  border-radius: 2px;
}
.brand-mark:before { top: 10px; }
.brand-mark:after { top: 16px; opacity: .55; }
.nav-links { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav-links a, .lang-btn {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
}
.nav-links a.is-active,
.nav-links a:hover,
.lang-btn:hover { color: var(--ink); background: rgba(255,255,255,.55); }
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  cursor: pointer;
  position: relative;
}
.nav-toggle:before,
.nav-toggle:after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.nav-toggle:before { top: 15px; }
.nav-toggle:after { top: 23px; }

/* Buttons */
.lang-btn, .btn {
  border: 0;
  background: transparent;
  cursor: pointer;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--forest);
  color: #f7f3ea;
  font-weight: 600;
  transition: transform .15s ease;
}
.btn.secondary { background: var(--card-solid); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.accent { background: var(--accent); }
.btn.disabled { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.btn:not(.disabled):hover { transform: translateY(-1px); }

/* Type */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero { padding: 72px 0 28px; }
.hero h1, .page-head h1, .display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 12px 0 16px;
  max-width: 13em;
  text-wrap: balance;
}
.page-head { padding: 48px 0 12px; }
.page-head h1 { max-width: 16em; }
.lead { max-width: 640px; color: var(--muted); font-size: 18px; }
.hero-actions, .row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.muted { color: var(--muted); }
.list { margin: 0; padding-left: 18px; }
.list li { margin: 8px 0; }
.narrow { max-width: 780px; }

/* Layout primitives */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid.start { align-items: start; }
.section { padding: 10px 0 56px; }
.section h2 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  margin: 0 0 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p:last-child { margin-bottom: 0; }
.card.stack { margin-bottom: 12px; }

/* App bits */
.shot {
  border-radius: 16px;
  overflow: hidden;
  background: #e8e2d4;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  position: relative;
}
.shot img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.shot-empty { min-height: 220px; }
.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  flex: none;
}
.app-icon.lg { width: 84px; height: 84px; border-radius: 20px; }
.status {
  display: inline-block;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(31, 107, 90, 0.12);
  color: var(--forest-2);
  font-weight: 650;
}
.status.soon { background: rgba(196, 92, 38, 0.12); color: var(--accent); }
.title-row { display: flex; align-items: center; gap: 18px; margin: 12px 0 8px; }
.title-row h1 { margin: 0; }
.app-meta { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.kicker { font-family: var(--serif); font-size: 28px; line-height: 1.25; margin: 10px 0; }

.featured {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: stretch;
  margin-top: 20px;
  margin-bottom: 56px;
}
.featured .copy { padding: 8px 8px 0; }

.app-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 220px;
}
.app-tile .status { align-self: flex-start; }
.app-tile .app-icon { margin-bottom: 8px; }
.app-tile p { margin: 0; }
.app-tile .row-actions { margin-top: auto; padding-top: 16px; }

.app-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
}
.app-row h2 { margin: 4px 0 0; font-size: 26px; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery .shot:first-child { grid-column: 1 / -1; }
.gallery figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(28, 25, 20, 0.7);
  color: #f7f3ea;
  font-size: 12px;
}

/* Support */
.help-links { display: grid; gap: 8px; margin: 12px 0 18px; }
.help-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.6);
  border: 1px solid var(--line);
}
.help-link:hover { background: #fff; }
.help-link .app-icon { width: 40px; height: 40px; border-radius: 10px; box-shadow: none; }
.help-link strong { display: block; }
.help-link span { color: var(--muted); font-size: 13px; }

.faq { max-width: 780px; }
.faq h2 { margin: 28px 0 12px; }
.faq h2:first-child { margin-top: 0; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { color: var(--muted); margin: 10px 0 4px; }

.form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
}
textarea { min-height: 140px; resize: vertical; }
.notice {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(31, 107, 90, 0.1);
  color: var(--forest);
  display: none;
}
.notice.show { display: block; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--muted);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
}
.footer-grid h3 { margin: 0 0 10px; color: var(--ink); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.footer-grid a { display: block; padding: 4px 0; }
.footer-grid a:hover { color: var(--ink); }

/* Admin */
.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 28px 0 64px;
}
.side {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  height: fit-content;
  position: sticky;
  top: 84px;
}
.side a, .side button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--muted);
}
.side a.is-on, .side button.is-on { background: var(--card-solid); color: var(--ink); font-weight: 650; }
.stat { display: grid; gap: 4px; }
.stat b { font-size: 28px; font-family: var(--serif); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--bg-2); font-size: 12px; }
.preview-banner {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(196, 92, 38, 0.1);
  color: #8a3d14;
  font-size: 13px;
}
.table-scroll { overflow-x: auto; }

@media (max-width: 860px) {
  .featured, .grid-2, .grid-3, .footer-grid, .admin-shell {
    grid-template-columns: 1fr;
  }
  .gallery { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 40px; }
  .hero h1, .page-head h1 { max-width: none; }
  .lead { font-size: 17px; }
  .side { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .side a, .side button { width: auto; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    flex-direction: column;
    align-items: stretch;
    background: var(--card-solid);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 8px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links .lang-btn { text-align: left; padding: 12px 14px; }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--lightbox);
}
.lightbox img {
  max-width: min(1120px, 100%);
  max-height: 88vh;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  cursor: pointer;
}
.lightbox-close:before,
.lightbox-close:after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  top: 19px;
  background: #f7f3ea;
}
.lightbox-close:before { transform: rotate(45deg); }
.lightbox-close:after { transform: rotate(-45deg); }

.noscript {
  padding: 24px 0;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:not(.disabled):hover { transform: none; }
}
