/* OmniTravel MCP Market, mcpmarket.com-style
   Theme rules:
   - Desktop default: light
   - Mobile (<=768px) default: dark
   - html[data-theme="light"|"dark"] set by the toggle overrides both */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --surface: #ffffff;
  --border: #e6e8ec;
  --text: #14161a;
  --text-2: #5a616e;
  --accent: #5cc8de;          /* OmniTravel cyan */
  --accent-ink: #0e6e85;
  --navy: #2a3f54;
  --pill-bg: #f1f3f6;
  --pill-active: #14161a;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-hover: 0 8px 24px rgba(16, 24, 40, .10);
  --code-bg: #0f1420;
  --code-text: #dbe4f0;
}

html[data-theme="dark"] {
  --bg: #0b0d10;
  --bg-soft: #101318;
  --surface: #14181e;
  --border: #232933;
  --text: #eef1f5;
  --text-2: #9aa3b0;
  --accent: #5cc8de;
  --accent-ink: #8fdcec;
  --pill-bg: #1a1f27;
  --pill-active: #eef1f5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, .5);
  --code-bg: #0f1420;
  --code-text: #dbe4f0;
}

@media (max-width: 768px) {
  html:not([data-theme]) {
    --bg: #0b0d10;
    --bg-soft: #101318;
    --surface: #14181e;
    --border: #232933;
    --text: #eef1f5;
    --text-2: #9aa3b0;
    --accent-ink: #8fdcec;
    --pill-bg: #1a1f27;
    --pill-active: #eef1f5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--text-2); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-weight: 700; font-size: 17px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.brand-mark { color: var(--accent); }
.brand-thin { font-weight: 400; color: var(--text-2); }
.main-nav { display: flex; gap: 20px; margin-left: auto; font-size: 14.5px; }
.main-nav a { color: var(--text-2); padding: 6px 2px; transition: color .15s; }
.main-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
}
.ico-moon { display: none; }
html[data-theme="dark"] .ico-sun { display: none; }
html[data-theme="dark"] .ico-moon { display: inline; }
@media (max-width: 768px) {
  html:not([data-theme]) .ico-sun { display: none; }
  html:not([data-theme]) .ico-moon { display: inline; }
}

.burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.burger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .burger { display: flex; }
  .main-nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 8px 20px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 4px; border-bottom: 1px solid var(--border); font-size: 16px; }
  .main-nav a:last-child { border-bottom: 0; }
}

/* ---------- hero ---------- */
.hero { padding: 64px 0 36px; text-align: center; background: linear-gradient(180deg, var(--bg-soft), var(--bg)); }
.hero-count { font-size: 13px; color: var(--text-2); letter-spacing: .02em; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.12; margin: 10px 0 14px; font-weight: 800; letter-spacing: -0.02em; }
.hero .accent { color: var(--accent-ink); }
.hero-sub { max-width: 640px; margin: 0 auto 26px; color: var(--text-2); font-size: 17px; }

.searchbar { position: relative; display: flex; max-width: 620px; margin: 0 auto; }
.searchbar input {
  flex: 1; height: 50px; padding: 0 18px; font-size: 16px;
  border: 1px solid var(--border); border-right: 0; border-radius: 12px 0 0 12px;
  background: var(--surface); color: var(--text); outline: none;
}
.searchbar input:focus { border-color: var(--accent); }
.searchbar button {
  height: 50px; padding: 0 22px; border: 0; border-radius: 0 12px 12px 0;
  background: var(--navy); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
.searchbar button:hover { background: var(--accent-ink); }
.typeahead {
  position: absolute; top: 54px; left: 0; right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-hover); overflow: hidden; text-align: left;
}
.typeahead a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.typeahead a:last-child { border-bottom: 0; }
.typeahead a:hover { background: var(--bg-soft); }
.typeahead .ta-name { font-weight: 600; font-size: 14px; }
.typeahead .ta-tag { font-size: 12.5px; color: var(--text-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 28px; }
.pill {
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px;
  background: var(--pill-bg); color: var(--text-2); border: 1px solid transparent;
  transition: all .15s;
}
.pill:hover { color: var(--text); border-color: var(--border); }
.pill-all { background: var(--pill-active); color: var(--bg); font-weight: 600; }
.pill-pinned { border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
@media (max-width: 768px) {
  .cat-pills { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cat-pills::-webkit-scrollbar { display: none; }
  .pill { flex: 0 0 auto; }
}

/* ---------- rows & cards ---------- */
.row-section { padding: 28px 0; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.row-head h2 { font-size: 22px; margin: 0; letter-spacing: -0.01em; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.card-own { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.card-top { display: flex; align-items: center; justify-content: space-between; min-height: 18px; }
.card-author { font-size: 12.5px; color: var(--text-2); margin: 0; }
.card-title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.card-tagline {
  margin: 0; font-size: 14px; color: var(--text-2); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); }

.chip {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--pill-bg); color: var(--text-2);
}
.type-tag { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.pop { font-weight: 600; color: var(--text); }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.badge-official { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-ink); }

.card-cat { align-items: flex-start; }
.grid-cats { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-cats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid-cats { grid-template-columns: 1fr; } }

/* ---------- page head / breadcrumbs ---------- */
.page-head { padding: 36px 0 8px; }
.page-head h1 { margin: 8px 0 4px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.02em; }
.crumbs { font-size: 13px; color: var(--text-2); }
.crumbs a:hover { color: var(--text); }

/* ---------- detail page ---------- */
.detail-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-top: 8px; }
.detail-tagline { font-size: 17px; color: var(--text-2); max-width: 720px; margin: 6px 0 12px; }
.detail-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-actions { display: flex; gap: 10px; }
.detail-body { max-width: 820px; }
.detail-desc p { font-size: 15.5px; }

.btn {
  display: inline-block; padding: 10px 18px; border-radius: 10px; font-size: 14.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  transition: all .15s;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }

.code-panel { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.code-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-2);
}
.copy-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 6px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; }
.code-panel pre { margin: 0; padding: 14px 16px; background: var(--code-bg); color: var(--code-text); overflow-x: auto; font-size: 13.5px; }

/* ---------- empty / footer ---------- */
.empty { text-align: center; padding: 48px 0; }
.empty .btn { margin-top: 8px; }

.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 36px 0 20px; background: var(--bg-soft); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.footer-col a { display: block; padding: 4px 0; font-size: 14px; color: var(--text-2); }
.footer-col a:hover { color: var(--text); }
.footer-bottom { padding-top: 24px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- live demo (agentic hotel search) ---------- */
.demo-section { padding-top: 8px; }
.demo-head { display: block; margin-bottom: 20px; }
.demo-head p { max-width: 760px; margin: 6px 0 0; }

.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .demo-grid { grid-template-columns: 1fr; } }

.demo-panel {
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.demo-panel-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: var(--bg-soft); border-bottom: 1px solid var(--border);
  font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2);
}
.demo-dot-ind { width: 9px; height: 9px; border-radius: 50%; }
.demo-dot-amber { background: #d4a843; }
.demo-dot-green { background: #2fbf71; }
.demo-remaining { margin-left: auto; text-transform: none; font-weight: 400; }

.demo-steps { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.demo-step { display: flex; gap: 12px; align-items: flex-start; }
.demo-step-num {
  min-width: 26px; height: 26px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: var(--accent-ink);
}
.demo-step-title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.demo-step-text { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.demo-step-text em { color: var(--text); }
.demo-beta { font-size: 12.5px; font-style: italic; margin: 4px 0 0; }

.demo-chat { height: 480px; }
.demo-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.demo-msg-row { display: flex; justify-content: flex-start; }
.demo-msg-user { justify-content: flex-end; }
.demo-msg {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; font-size: 13.5px; line-height: 1.6; max-width: 88%; color: var(--text);
}
.demo-msg-mine { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.demo-msg-hint { color: var(--text-2); font-size: 13px; margin-bottom: 8px; }
.demo-examples { display: flex; flex-direction: column; gap: 7px; }
.demo-example {
  text-align: left; background: color-mix(in srgb, var(--accent) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  color: var(--text); padding: 8px 12px; border-radius: 10px; font-size: 12.5px;
  cursor: pointer; line-height: 1.5; transition: background .15s; font-family: inherit;
}
.demo-example:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); }

.demo-typing { padding: 4px 16px 0; }
.demo-typing-bubble { width: fit-content; }
.demo-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); margin: 0 2px; animation: demo-blink 1.2s ease-in-out infinite; }
.demo-dot:nth-child(2) { animation-delay: .2s; }
.demo-dot:nth-child(3) { animation-delay: .4s; }
@keyframes demo-blink { 0%, 80%, 100% { opacity: .2 } 40% { opacity: 1 } }

.demo-inputbar { padding: 12px 14px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; }
.demo-inputbar input {
  flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 10px 14px; border-radius: 12px; font-size: 14px; outline: none; font-family: inherit;
}
.demo-inputbar input:focus { border-color: var(--accent); }
.demo-inputbar button {
  background: var(--navy); border: 0; color: #fff; padding: 10px 20px; border-radius: 12px;
  font-weight: 700; font-size: 14px; cursor: pointer;
}
.demo-inputbar button:hover { background: var(--accent-ink); }
.demo-inputbar button:disabled { opacity: .6; cursor: default; }
.demo-limit { padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--accent-ink); text-align: center; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.demo-limit a { text-decoration: underline; }

.demo-results { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); min-height: 240px; box-shadow: var(--shadow); }
.demo-empty-state { min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px; text-align: center; font-size: 13.5px; line-height: 1.7; }
.demo-empty-ico {
  width: 52px; height: 52px; border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid var(--border); display: grid; place-items: center; font-size: 1.5rem;
}
.demo-loading { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.demo-skel {
  border-radius: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--text) 6%, transparent) 25%, color-mix(in srgb, var(--accent) 12%, transparent) 50%, color-mix(in srgb, var(--text) 6%, transparent) 75%);
  background-size: 200% 100%; animation: dshimmer 1.5s infinite;
}
@keyframes dshimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
.demo-content { padding: 16px; }

/* result cards */
.dr-card { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; overflow: hidden; background: var(--bg); transition: border-color .2s; }
.dr-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.dr-card-loading { animation: dr-pulse 1.5s ease-in-out infinite; }
@keyframes dr-pulse { 0%, 100% { border-color: var(--border) } 50% { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)) } }
.dr-discarded { opacity: .5; }
.dr-hdr { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.dr-hdr-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dr-hdr-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.dr-num {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--accent-ink);
}
.dr-num-off { background: var(--pill-bg); color: var(--text-2); }
.dr-name { font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-stars { color: #d4a843; font-size: 13px; }
.dr-slot-badge { font-size: 12px; font-weight: 700; white-space: nowrap; }
.dr-mapped { color: var(--accent-ink); }
.dr-bad { color: #e05656; }
.dr-enriching { color: #d4a843; border: 1px solid color-mix(in srgb, #d4a843 40%, transparent); padding: 2px 8px; border-radius: 8px; }
.dr-preferred { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-ink); padding: 2px 7px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.dr-badge-blink { animation: dr-blink .5s step-start infinite; }
@keyframes dr-blink { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
.dr-body { padding: 14px 16px; }
.dr-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip-brand { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.dr-reco { font-style: italic; font-size: 14px; line-height: 1.6; border-left: 3px solid var(--accent); padding-left: 12px; margin-bottom: 14px; }
.dr-detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 640px) { .dr-detail-grid { grid-template-columns: 1fr; } }
.dr-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.dr-box-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 8px; }
.dr-kv { display: flex; gap: 8px; margin-bottom: 4px; }
.dr-k { min-width: 82px; font-size: 11px; font-weight: 700; color: var(--text-2); text-transform: uppercase; padding-top: 2px; }
.dr-v { font-size: 13px; line-height: 1.5; word-break: break-word; }
.dr-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.dr-mapbox { margin-bottom: 2px; }
.dr-maplist { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-map {
  padding: 4px 10px; border-radius: 8px; font-size: 12.5px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
}
.dr-map b { color: var(--accent-ink); font-weight: 700; }
.dr-map i { color: var(--text-2); margin: 0 3px; font-style: normal; }
.dr-map code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.dr-discard-note { font-size: 13.5px; line-height: 1.7; }

/* ---------- admin ---------- */
.admin-login-wrap { display: flex; justify-content: center; padding: 32px 0; }
.admin-login { max-width: 380px; width: 100%; padding: 28px; }
.admin-login h1 { margin: 0 0 4px; }
.admin-login form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.admin-login label, .admin-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.admin-login input, .admin-form input, .admin-form select, .admin-form textarea, .admin-table input {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none;
}
.admin-login input:focus, .admin-form input:focus, .admin-form textarea:focus, .admin-table input:focus { border-color: var(--accent); }
.admin-error { background: color-mix(in srgb, #e05656 12%, transparent); border: 1px solid color-mix(in srgb, #e05656 40%, transparent); color: #e05656; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; margin-top: 12px; }
.admin-saved { display: inline-block; background: color-mix(in srgb, #2fbf71 14%, transparent); border: 1px solid color-mix(in srgb, #2fbf71 40%, transparent); color: #1d9459; padding: 5px 12px; border-radius: 8px; font-size: 13px; margin-top: 8px; }
.admin-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 10px 14px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.admin-table td { padding: 8px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-center { text-align: center; }
.admin-num { width: 72px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.admin-inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-check { display: inline-flex; flex-direction: row !important; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text); font-weight: 500 !important; }

.admin-form-wrap { max-width: 860px; }
.admin-form { display: flex; flex-direction: column; gap: 16px; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .admin-form-grid { grid-template-columns: 1fr; } }
.admin-flags { display: flex; gap: 20px; flex-wrap: wrap; }
.admin-actions { display: flex; gap: 10px; align-items: center; }
.admin-danger { color: #e05656; border-color: color-mix(in srgb, #e05656 40%, var(--border)); margin-left: auto; }
.admin-danger:hover { border-color: #e05656; }

/* hidden attribute must always win over display rules */
[hidden] { display: none !important; }

/* admin form v2: sectioned cards */
.admin-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 18px 20px 20px; margin: 0; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.admin-card legend { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); padding: 0 8px; }
.admin-hint { font-weight: 400; color: var(--text-2); font-size: 12px; text-transform: none; }
.admin-form textarea { resize: vertical; min-height: 40px; }
.admin-table td input[type="text"] { width: 100%; min-width: 160px; }
.admin-table td input[type="number"] { min-width: 64px; }

/* ---------- chomper hero animation v2 (pixel) ---------- */
@font-face {
  font-family: 'Geist Pixel Square';
  src: url('/assets/fonts/GeistPixel-Square.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
:root { --font-geist-pixel-square: 'Geist Pixel Square'; --font-geist-mono: ui-monospace; }

.chomper-section { padding: 6px 0 22px; }
.chomper-stage { position: relative; height: 104px; }

/* pixel chomper: 14x14 grid, 1 grid px = 1em (font-size below) */
.pxchomper {
  position: absolute; left: 50%; top: 50%;
  width: 14em; height: 14em; font-size: 5px;
  transform: translate(-50%, -50%);
  z-index: 2; animation: pxc-chomp 0.36s steps(1) infinite;
}
@keyframes pxc-chomp { 0%, 100% { --pxc: 0; } }
.pxchomper .pxc-half { animation: pxc-swap 0.36s steps(1) infinite; }
.pxchomper .pxc-open { animation: pxc-swap-inv 0.36s steps(1) infinite; }
@keyframes pxc-swap     { 0% { opacity: 0 } 50% { opacity: 1 } 100% { opacity: 0 } }
@keyframes pxc-swap-inv { 0% { opacity: 1 } 50% { opacity: 0 } 100% { opacity: 1 } }

/* trains */
.train { position: absolute; top: 50%; transform: translateY(-50%); overflow: hidden; }
.train-in  { left: calc(50% + 5.2em); right: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
          mask-image: linear-gradient(90deg, #000 82%, transparent); }
.train-out { left: 0; width: calc(50% - 5.2em);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%);
          mask-image: linear-gradient(90deg, transparent, #000 14%); }
.train { font-size: 5px; } /* em ruler shared with chomper for mouth alignment */

.train-track {
  display: inline-flex; gap: 44px; white-space: nowrap; will-change: transform;
  animation: train-move 26s linear infinite;
}
.train-out .train-track { animation-duration: 22s; }
@keyframes train-move { from { transform: translateX(0) } to { transform: translateX(-50%) } }

.train-item {
  font-family: var(--font-geist-pixel-square), var(--font-geist-mono), ui-monospace, monospace;
  font-size: 17px; font-weight: 400; letter-spacing: .03em; line-height: 1;
  color: var(--text);
}
.train-out .train-item { color: var(--accent-ink); }

@media (max-width: 640px) {
  .pxchomper, .train { font-size: 4px; }
  .train-item { font-size: 13px; }
  .train-track { gap: 28px; animation-duration: 18s; }
  .train-out .train-track { animation-duration: 15s; }
}
@media (prefers-reduced-motion: reduce) { .chomper-stage { display: none; } }
.pxc-frame { position: absolute; top: 0; left: 0; width: 1em; height: 1em; }
.pxc-open { box-shadow:
    5em 0em 0 #101010,
    6em 0em 0 #101010,
    7em 0em 0 #101010,
    8em 0em 0 #101010,
    3em 1em 0 #101010,
    4em 1em 0 #101010,
    5em 1em 0 #ffe14d,
    6em 1em 0 #ffe14d,
    7em 1em 0 #ffe14d,
    8em 1em 0 #ffe14d,
    9em 1em 0 #101010,
    10em 1em 0 #101010,
    2em 2em 0 #101010,
    3em 2em 0 #ffe14d,
    4em 2em 0 #ffe14d,
    5em 2em 0 #ffe14d,
    6em 2em 0 #101010,
    7em 2em 0 #101010,
    8em 2em 0 #ffe14d,
    9em 2em 0 #ffe14d,
    10em 2em 0 #ffe14d,
    11em 2em 0 #101010,
    1em 3em 0 #101010,
    2em 3em 0 #ffe14d,
    3em 3em 0 #ffe14d,
    4em 3em 0 #ffe14d,
    5em 3em 0 #ffe14d,
    6em 3em 0 #101010,
    7em 3em 0 #101010,
    8em 3em 0 #ffe14d,
    9em 3em 0 #ffe14d,
    10em 3em 0 #ffe14d,
    11em 3em 0 #101010,
    1em 4em 0 #101010,
    2em 4em 0 #ffe14d,
    3em 4em 0 #ffe14d,
    4em 4em 0 #ffe14d,
    5em 4em 0 #ffe14d,
    6em 4em 0 #ffe14d,
    7em 4em 0 #ffe14d,
    8em 4em 0 #ffe14d,
    9em 4em 0 #101010,
    10em 4em 0 #101010,
    0em 5em 0 #101010,
    1em 5em 0 #ffe14d,
    2em 5em 0 #ffe14d,
    3em 5em 0 #ffe14d,
    4em 5em 0 #ffe14d,
    5em 5em 0 #ffe14d,
    6em 5em 0 #ffe14d,
    7em 5em 0 #ffe14d,
    8em 5em 0 #101010,
    0em 6em 0 #101010,
    1em 6em 0 #ffe14d,
    2em 6em 0 #ffe14d,
    3em 6em 0 #ffe14d,
    4em 6em 0 #ffe14d,
    5em 6em 0 #ffe14d,
    6em 6em 0 #ffe14d,
    7em 6em 0 #101010,
    0em 7em 0 #101010,
    1em 7em 0 #ffe14d,
    2em 7em 0 #ffe14d,
    3em 7em 0 #ffe14d,
    4em 7em 0 #ffe14d,
    5em 7em 0 #ffe14d,
    6em 7em 0 #ffe14d,
    7em 7em 0 #101010,
    0em 8em 0 #101010,
    1em 8em 0 #ffe14d,
    2em 8em 0 #ffe14d,
    3em 8em 0 #ffe14d,
    4em 8em 0 #ffe14d,
    5em 8em 0 #ffe14d,
    6em 8em 0 #ffe14d,
    7em 8em 0 #ffe14d,
    8em 8em 0 #101010,
    1em 9em 0 #101010,
    2em 9em 0 #ffe14d,
    3em 9em 0 #ffe14d,
    4em 9em 0 #ffe14d,
    5em 9em 0 #ffe14d,
    6em 9em 0 #ffe14d,
    7em 9em 0 #ffe14d,
    8em 9em 0 #ffe14d,
    9em 9em 0 #101010,
    10em 9em 0 #101010,
    1em 10em 0 #101010,
    2em 10em 0 #ffe14d,
    3em 10em 0 #ffe14d,
    4em 10em 0 #ffe14d,
    5em 10em 0 #ffe14d,
    6em 10em 0 #ffe14d,
    7em 10em 0 #ffe14d,
    8em 10em 0 #ffe14d,
    9em 10em 0 #ffe14d,
    10em 10em 0 #ffe14d,
    11em 10em 0 #101010,
    2em 11em 0 #101010,
    3em 11em 0 #ffe14d,
    4em 11em 0 #ffe14d,
    5em 11em 0 #ffe14d,
    6em 11em 0 #ffe14d,
    7em 11em 0 #ffe14d,
    8em 11em 0 #ffe14d,
    9em 11em 0 #ffe14d,
    10em 11em 0 #ffe14d,
    11em 11em 0 #101010,
    3em 12em 0 #101010,
    4em 12em 0 #101010,
    5em 12em 0 #ffe14d,
    6em 12em 0 #ffe14d,
    7em 12em 0 #ffe14d,
    8em 12em 0 #ffe14d,
    9em 12em 0 #101010,
    10em 12em 0 #101010,
    5em 13em 0 #101010,
    6em 13em 0 #101010,
    7em 13em 0 #101010,
    8em 13em 0 #101010; }
.pxc-half { box-shadow:
    5em 0em 0 #101010,
    6em 0em 0 #101010,
    7em 0em 0 #101010,
    8em 0em 0 #101010,
    3em 1em 0 #101010,
    4em 1em 0 #101010,
    5em 1em 0 #ffe14d,
    6em 1em 0 #ffe14d,
    7em 1em 0 #ffe14d,
    8em 1em 0 #ffe14d,
    9em 1em 0 #101010,
    10em 1em 0 #101010,
    2em 2em 0 #101010,
    3em 2em 0 #ffe14d,
    4em 2em 0 #ffe14d,
    5em 2em 0 #ffe14d,
    6em 2em 0 #101010,
    7em 2em 0 #101010,
    8em 2em 0 #ffe14d,
    9em 2em 0 #ffe14d,
    10em 2em 0 #ffe14d,
    11em 2em 0 #101010,
    1em 3em 0 #101010,
    2em 3em 0 #ffe14d,
    3em 3em 0 #ffe14d,
    4em 3em 0 #ffe14d,
    5em 3em 0 #ffe14d,
    6em 3em 0 #101010,
    7em 3em 0 #101010,
    8em 3em 0 #ffe14d,
    9em 3em 0 #ffe14d,
    10em 3em 0 #ffe14d,
    11em 3em 0 #ffe14d,
    12em 3em 0 #101010,
    1em 4em 0 #101010,
    2em 4em 0 #ffe14d,
    3em 4em 0 #ffe14d,
    4em 4em 0 #ffe14d,
    5em 4em 0 #ffe14d,
    6em 4em 0 #ffe14d,
    7em 4em 0 #ffe14d,
    8em 4em 0 #ffe14d,
    9em 4em 0 #ffe14d,
    10em 4em 0 #ffe14d,
    11em 4em 0 #ffe14d,
    12em 4em 0 #101010,
    0em 5em 0 #101010,
    1em 5em 0 #ffe14d,
    2em 5em 0 #ffe14d,
    3em 5em 0 #ffe14d,
    4em 5em 0 #ffe14d,
    5em 5em 0 #ffe14d,
    6em 5em 0 #ffe14d,
    7em 5em 0 #ffe14d,
    8em 5em 0 #ffe14d,
    9em 5em 0 #ffe14d,
    10em 5em 0 #101010,
    11em 5em 0 #101010,
    12em 5em 0 #101010,
    13em 5em 0 #101010,
    0em 6em 0 #101010,
    1em 6em 0 #ffe14d,
    2em 6em 0 #ffe14d,
    3em 6em 0 #ffe14d,
    4em 6em 0 #ffe14d,
    5em 6em 0 #ffe14d,
    6em 6em 0 #ffe14d,
    7em 6em 0 #ffe14d,
    8em 6em 0 #ffe14d,
    9em 6em 0 #101010,
    0em 7em 0 #101010,
    1em 7em 0 #ffe14d,
    2em 7em 0 #ffe14d,
    3em 7em 0 #ffe14d,
    4em 7em 0 #ffe14d,
    5em 7em 0 #ffe14d,
    6em 7em 0 #ffe14d,
    7em 7em 0 #ffe14d,
    8em 7em 0 #ffe14d,
    9em 7em 0 #101010,
    0em 8em 0 #101010,
    1em 8em 0 #ffe14d,
    2em 8em 0 #ffe14d,
    3em 8em 0 #ffe14d,
    4em 8em 0 #ffe14d,
    5em 8em 0 #ffe14d,
    6em 8em 0 #ffe14d,
    7em 8em 0 #ffe14d,
    8em 8em 0 #ffe14d,
    9em 8em 0 #ffe14d,
    10em 8em 0 #101010,
    11em 8em 0 #101010,
    12em 8em 0 #101010,
    13em 8em 0 #101010,
    1em 9em 0 #101010,
    2em 9em 0 #ffe14d,
    3em 9em 0 #ffe14d,
    4em 9em 0 #ffe14d,
    5em 9em 0 #ffe14d,
    6em 9em 0 #ffe14d,
    7em 9em 0 #ffe14d,
    8em 9em 0 #ffe14d,
    9em 9em 0 #ffe14d,
    10em 9em 0 #ffe14d,
    11em 9em 0 #ffe14d,
    12em 9em 0 #101010,
    1em 10em 0 #101010,
    2em 10em 0 #ffe14d,
    3em 10em 0 #ffe14d,
    4em 10em 0 #ffe14d,
    5em 10em 0 #ffe14d,
    6em 10em 0 #ffe14d,
    7em 10em 0 #ffe14d,
    8em 10em 0 #ffe14d,
    9em 10em 0 #ffe14d,
    10em 10em 0 #ffe14d,
    11em 10em 0 #ffe14d,
    12em 10em 0 #101010,
    2em 11em 0 #101010,
    3em 11em 0 #ffe14d,
    4em 11em 0 #ffe14d,
    5em 11em 0 #ffe14d,
    6em 11em 0 #ffe14d,
    7em 11em 0 #ffe14d,
    8em 11em 0 #ffe14d,
    9em 11em 0 #ffe14d,
    10em 11em 0 #ffe14d,
    11em 11em 0 #101010,
    3em 12em 0 #101010,
    4em 12em 0 #101010,
    5em 12em 0 #ffe14d,
    6em 12em 0 #ffe14d,
    7em 12em 0 #ffe14d,
    8em 12em 0 #ffe14d,
    9em 12em 0 #101010,
    10em 12em 0 #101010,
    5em 13em 0 #101010,
    6em 13em 0 #101010,
    7em 13em 0 #101010,
    8em 13em 0 #101010; opacity: 0; }
/* hero rotator in pixel font */
#heroRotate {
  font-family: var(--font-geist-pixel-square), var(--font-geist-mono), ui-monospace, monospace;
  font-weight: 400; letter-spacing: .01em;
}

/* hero typewriter line */
.hero-title { line-height: 1.18; }
.hero-typeline {
  display: inline-flex; align-items: baseline; gap: .18em;
  font-family: var(--font-geist-pixel-square), var(--font-geist-mono), ui-monospace, monospace;
  font-weight: 400;
}
.hero-prompt { color: var(--text-2); font-size: .8em; }
#heroRotate { min-height: 1em; }
.hero-caret {
  display: inline-block; width: .5em; height: .95em;
  background: var(--accent-ink); align-self: center;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 0%, 100% { opacity: 1 } 50% { opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .hero-caret { animation: none; } }

.hero-sub2 { font-size: 14.5px; margin-top: -14px; }

/* homepage row pagination */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.pager-btn {
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s;
}
.pager-btn:hover:not(:disabled) { border-color: var(--accent); }
.pager-btn:disabled { opacity: .35; cursor: default; }
.pager-info { font-size: 13px; color: var(--text-2); min-width: 44px; text-align: center;
  font-family: var(--font-geist-pixel-square), ui-monospace, monospace; }

.demo-intro2 { font-size: 13.5px; max-width: 760px; margin-top: 6px; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; }
.faq-section-head { margin-top: 26px; }
.faq-section-head:first-child { margin-top: 0; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden;
}
.faq-item summary {
  cursor: pointer; padding: 14px 18px; font-weight: 700; font-size: 15px;
  list-style: none; position: relative; padding-right: 40px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-geist-pixel-square), ui-monospace, monospace;
  color: var(--accent-ink); font-size: 17px;
}
.faq-item[open] summary::after { content: '-'; }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-answer { padding: 12px 18px 16px; }
.faq-answer p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--text-2); }
.faq-cta { margin-top: 32px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.faq-cta p { margin: 0; }

/* listing documentation */
.detail-doc { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 22px; }
.doc-title { font-size: 20px; margin: 0 0 14px; }
.detail-doc h3 { font-size: 17px; margin: 22px 0 8px; }
.detail-doc h4 { font-size: 15px; margin: 18px 0 6px; color: var(--accent-ink); }
.detail-doc p { font-size: 14.5px; line-height: 1.7; }
.detail-doc ul { margin: 8px 0 14px; padding-left: 22px; }
.detail-doc li { font-size: 14.5px; line-height: 1.7; margin-bottom: 4px; }
.detail-doc code { background: var(--pill-bg); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.doc-code { background: var(--code-bg); color: var(--code-text); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.6; margin: 10px 0 16px; }
.doc-code code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.admin-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* documentation images */
.doc-img { margin: 14px 0 18px; }
.doc-img img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 12px; display: block; }
