:root {
  color-scheme: light;
  --ink: #121b36;
  --ink-soft: #65708b;
  --navy: #111a34;
  --navy-2: #1c2a50;
  --blue: #3f82ff;
  --blue-soft: #e9f1ff;
  --cyan: #63d9ed;
  --lime: #dfff91;
  --paper: #f5f7fb;
  --line: #e5e9f2;
  --white: #fff;
  --shadow: 0 18px 48px rgba(18, 27, 54, 0.12);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  background:
    radial-gradient(circle at 0 0, rgba(99, 217, 237, 0.2), transparent 28rem),
    linear-gradient(145deg, #edf4ff 0%, var(--paper) 42%, #f7f8fb 100%);
}

button, select, input { font: inherit; }
button { cursor: pointer; }
body.logs-open { overflow: hidden; }

.demo-nav { display: flex; align-items: center; gap: 10px; width: min(100%, 480px); min-height: 44px; margin: 0 auto; padding: 0 20px; color: var(--ink-soft); font-size: 12px; }
.demo-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-weight: 700; text-decoration: none; }
.demo-nav a:hover { text-decoration: underline; }
.demo-nav a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.workspace-header { display: none; }
.workspace-header-right { display: flex; align-items: center; gap: 14px; }

.site-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(18, 27, 54, 0.03), 0 24px 70px rgba(18, 27, 54, 0.1);
}

.app-screen { min-height: 100vh; padding-bottom: 34px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(18px, env(safe-area-inset-top)) 20px 15px;
  color: var(--white);
  background: var(--navy);
}

.topbar-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-title { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.topbar-subtitle { margin-top: 2px; color: #abb8da; font-size: 11px; }
.topbar-action { flex: 0 0 auto; }

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: var(--navy);
  background: linear-gradient(145deg, var(--lime), var(--cyan));
  font-size: 17px;
  font-weight: 900;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 22px 24px;
  color: var(--white);
  background: var(--navy);
}
.hero-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.language-toggle { min-height: 31px; padding: 0 10px; border: 1px solid rgba(223,255,145,.35); border-radius: 999px; color: var(--lime); background: rgba(223,255,145,.08); font-size: 11px; font-weight: 800; }
.language-toggle.compact { min-height: 28px; padding: 0 8px; color: #dbe6ff; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); }
.language-toggle:hover { background: rgba(223,255,145,.16); }
.language-toggle.compact:hover { background: rgba(255,255,255,.16); }

.hero::before, .hero::after {
  position: absolute;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  content: "";
}

.hero::before { width: 340px; height: 340px; right: -180px; top: -178px; }
.hero::after { width: 250px; height: 250px; right: -135px; top: -132px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #90a3d1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
}

.eyebrow::before { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); content: ""; }
.hero h1 { position: relative; max-width: 320px; margin: 12px 0 8px; font-size: clamp(29px, 8vw, 38px); line-height: 1.05; letter-spacing: -0.045em; }
.hero p { position: relative; max-width: 350px; margin: 0; color: #b5c0dc; font-size: 13px; line-height: 1.7; }
.demo-disclaimer { position: relative; display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; color: #e4ebff; background: rgba(255,255,255,.08); font-size: 11px; line-height: 1.5; }
.demo-disclaimer strong { flex: 0 0 auto; color: var(--lime); font-size: 10px; letter-spacing: .06em; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hero-meta span, .api-count {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 7px 10px;
  color: #d7e1fa;
  background: rgba(255,255,255,.07);
  font-size: 11px;
  font-weight: 700;
}
.hero-doc { display: inline-flex; align-items: center; padding: 7px 10px; border: 1px solid rgba(223,255,145,.28); border-radius: 999px; color: var(--lime); background: rgba(223,255,145,.08); font-size: 11px; font-weight: 800; text-decoration: none; }

.main-pad { padding: 18px 16px 0; }
.section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 3px 3px 11px; }
.section-label h2 { margin: 0; font-size: 18px; letter-spacing: -0.025em; }
.section-label span { color: var(--ink-soft); font-size: 11px; }

.card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: 0 8px 24px rgba(18,27,54,.04); }
.search-card { padding: 17px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.select-wrap { position: relative; }
.select-wrap::after { position: absolute; right: 12px; top: 50%; color: #8290ac; content: "⌄"; font-size: 14px; pointer-events: none; transform: translateY(-55%); }
select, input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 34px 0 12px;
  color: var(--ink);
  outline: none;
  background: #fbfcfe;
  font-size: 13px;
  font-weight: 650;
}
select { appearance: none; -webkit-appearance: none; -moz-appearance: none; }
input { padding: 0 12px; }
select:focus, input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(63,130,255,.12); }
.field-hint { margin-top: -1px; color: #97a1b6; font-size: 10px; line-height: 1.45; }

.primary-button, .secondary-button, .outline-button, .text-button, .icon-button {
  border: 0;
  border-radius: 13px;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-button:active, .secondary-button:active, .outline-button:active, .icon-button:active { transform: scale(.98); }
.primary-button { min-height: 48px; padding: 0 16px; color: var(--navy); background: linear-gradient(105deg, var(--lime), var(--cyan)); box-shadow: 0 8px 18px rgba(81, 205, 217, .25); }
.primary-button.block { width: 100%; margin-top: 16px; }
.secondary-button { min-height: 43px; padding: 0 14px; color: var(--white); background: var(--blue); box-shadow: 0 7px 17px rgba(63,130,255,.2); }
.outline-button { min-height: 42px; padding: 0 13px; color: var(--blue); background: var(--white); border: 1px solid #cddcff; }
.text-button { padding: 5px 0; color: var(--blue); background: transparent; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; color: inherit; background: rgba(255,255,255,.1); font-size: 22px; line-height: 1; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 14px; }
.feature { min-height: 78px; padding: 11px 9px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.68); }
.feature strong { display: block; font-size: 18px; letter-spacing: -0.04em; }
.feature span { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }

.api-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 15px; padding: 13px; border-radius: 15px; color: #51617f; background: var(--blue-soft); font-size: 11px; line-height: 1.6; }
.api-note b { flex: 0 0 auto; padding: 3px 6px; border-radius: 6px; color: var(--blue); background: rgba(63,130,255,.12); font-size: 10px; }

.results-header { padding: 18px 16px 0; }
.results-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); }
.summary-main { min-width: 0; }
.summary-route { overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.summary-sub { margin-top: 4px; color: var(--ink-soft); font-size: 11px; }
.summary-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: var(--navy); background: linear-gradient(145deg, #dffaff, #efffb0); font-size: 20px; }
.result-list { display: grid; gap: 13px; padding: 13px 16px 0; }
.route-card { overflow: hidden; }
.route-visual { position: relative; height: 112px; padding: 15px; color: var(--white); background: linear-gradient(130deg, #122346 0%, #21446a 57%, #44b6bd 100%); }
.route-visual::after { position: absolute; right: -28px; bottom: -70px; width: 240px; height: 130px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 -13px 0 rgba(255,255,255,.1), 0 -26px 0 rgba(255,255,255,.08); content: ""; transform: rotate(-8deg); }
.visual-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ship-kicker { color: #d4e6ff; font-size: 10px; font-weight: 700; }
.ship-name { margin-top: 4px; font-size: 18px; font-weight: 850; letter-spacing: -.03em; }
.brand-pill { padding: 6px 8px; border-radius: 8px; color: var(--navy); background: rgba(223,255,145,.94); font-size: 10px; font-weight: 850; }
.route-body { padding: 14px; }
.route-line { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 11px; }
.route-line i { flex: 1; height: 1px; background: var(--line); }
.route-dates { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 7px; }
.route-dates strong { font-size: 14px; }
.route-duration { color: var(--ink-soft); font-size: 11px; }
.route-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 15px; }
.price-caption { color: var(--ink-soft); font-size: 10px; }
.price { margin-top: 3px; color: var(--blue); font-size: 21px; font-weight: 900; letter-spacing: -.04em; }
.price small { margin-left: 3px; font-size: 11px; font-weight: 700; }

.back-button { display: inline-flex; align-items: center; gap: 6px; padding: 3px 0; border: 0; color: #b9c5e4; background: transparent; font-size: 12px; font-weight: 750; }
.page-content { padding: 16px; }
.detail-hero { position: relative; overflow: hidden; min-height: 166px; padding: 20px; border-radius: var(--radius-lg); color: var(--white); background: linear-gradient(135deg, #132344, #2b5676 65%, #5cc2c1); }
.detail-hero::after { position: absolute; right: -40px; bottom: -75px; width: 270px; height: 155px; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; box-shadow: 0 -14px 0 rgba(255,255,255,.08), 0 -28px 0 rgba(255,255,255,.07); content: ""; transform: rotate(-10deg); }
.detail-hero h1 { position: relative; z-index: 1; max-width: 280px; margin: 9px 0 7px; font-size: 25px; letter-spacing: -.04em; }
.detail-hero p { position: relative; z-index: 1; max-width: 280px; margin: 0; color: #d3e3ed; font-size: 12px; line-height: 1.6; }
.ship-facts { position: relative; z-index: 1; display: flex; gap: 8px; margin-top: 17px; }
.ship-facts span { padding: 6px 8px; border: 1px solid rgba(255,255,255,.17); border-radius: 8px; color: #e2eff5; background: rgba(255,255,255,.08); font-size: 10px; }
.stack { display: grid; gap: 12px; margin-top: 16px; }
.stack h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.fare-section { overflow: hidden; }
.fare-section-head { display: flex; align-items: center; justify-content: space-between; padding: 15px; border-bottom: 1px solid var(--line); }
.fare-section-head span { color: var(--ink-soft); font-size: 11px; }
.fare-list { display: grid; gap: 10px; padding: 11px; }
.fare-card { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: #fbfcff; }
.fare-icon { display: grid; width: 41px; height: 41px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: var(--blue); background: var(--blue-soft); font-size: 19px; }
.fare-info { flex: 1; min-width: 0; }
.fare-name { font-size: 13px; font-weight: 850; }
.fare-meta { margin-top: 4px; overflow: hidden; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.fare-price { text-align: right; }
.fare-price strong { display: block; color: var(--blue); font-size: 16px; }
.fare-price span { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 10px; }

.cabin-toolbar { display: flex; align-items: center; gap: 7px; overflow-x: auto; margin: 12px 0; padding-bottom: 2px; scrollbar-width: none; }
.cabin-toolbar::-webkit-scrollbar { display: none; }
.deck-button { flex: 0 0 auto; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); background: var(--white); font-size: 11px; font-weight: 800; }
.deck-button.active { border-color: var(--navy); color: var(--white); background: var(--navy); }
.cabin-map { position: relative; overflow: hidden; padding: 17px 13px; border-radius: var(--radius-lg); background: #e7edf4; }
.cabin-map::before { position: absolute; left: 50%; top: -50px; width: 80px; height: calc(100% + 100px); border-right: 2px dashed rgba(92,110,137,.22); border-left: 2px dashed rgba(92,110,137,.22); content: ""; transform: translateX(-50%); }
.cabin-map-header { position: relative; z-index: 1; display: flex; justify-content: space-between; margin-bottom: 13px; color: var(--ink-soft); font-size: 10px; font-weight: 750; }
.cabin-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px 11px; }
.cabin-button { min-height: 45px; border: 1px solid #cad6e5; border-radius: 11px; color: #3f597e; background: rgba(255,255,255,.88); font-size: 11px; font-weight: 850; box-shadow: 0 3px 5px rgba(44,64,93,.05); }
.cabin-button:hover, .cabin-button.selected { border-color: var(--blue); color: var(--white); background: var(--blue); box-shadow: 0 7px 12px rgba(63,130,255,.25); }
.cabin-button.sold { color: #b2bac8; background: #dce3ec; border-color: #d3dbe6; cursor: not-allowed; text-decoration: line-through; }
.cabin-legend { display: flex; gap: 14px; margin-top: 13px; color: var(--ink-soft); font-size: 10px; }
.legend { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 3px; background: #fff; border: 1px solid #cad6e5; }
.legend i.selected { border-color: var(--blue); background: var(--blue); }
.legend i.sold { border-color: #d3dbe6; background: #dce3ec; }

.traveler-card { padding: 15px; }
.traveler-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.traveler-title strong { font-size: 14px; }
.traveler-title span { color: var(--ink-soft); font-size: 10px; }
.traveler-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.traveler-fields .field:first-child { grid-column: 1 / -1; }
.quote-card { padding: 16px; border-color: #cfe0ff; background: linear-gradient(145deg, #f8fbff, #eef5ff); }
.quote-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.quote-top span { color: var(--ink-soft); font-size: 10px; }
.quote-total { margin-top: 4px; color: var(--blue); font-size: 28px; font-weight: 900; letter-spacing: -.05em; }
.quote-total small { margin-left: 3px; font-size: 12px; }
.quote-expiry { padding: 6px 8px; border-radius: 7px; color: #2d7e59; background: #dcf8e9; font-size: 10px; font-weight: 800; }
.breakdown { display: grid; gap: 7px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #d9e5f7; }
.breakdown-row { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-soft); font-size: 11px; }
.breakdown-row strong { color: var(--ink); }
.dining-options { display: flex; gap: 8px; margin-top: 10px; }
.dining-option { flex: 1; padding: 10px 8px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink-soft); background: var(--white); text-align: center; font-size: 11px; }
.dining-option.selected { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); font-weight: 850; }

.success-screen { display: flex; min-height: 100vh; flex-direction: column; }
.success-main { flex: 1; padding: 32px 22px 24px; }
.success-icon { display: grid; width: 65px; height: 65px; place-items: center; border-radius: 22px; color: var(--navy); background: linear-gradient(145deg, var(--lime), var(--cyan)); font-size: 33px; box-shadow: 0 10px 24px rgba(74,190,190,.25); }
.success-main h1 { margin: 20px 0 8px; font-size: 29px; letter-spacing: -.05em; }
.success-main > p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.order-card { margin-top: 23px; padding: 16px; }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-head strong { font-size: 16px; }
.status { padding: 6px 8px; border-radius: 7px; color: #347c57; background: #dcf8e9; font-size: 10px; font-weight: 850; }
.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 17px; }
.order-grid span { display: block; color: var(--ink-soft); font-size: 10px; }
.order-grid strong { display: block; margin-top: 4px; font-size: 12px; }
.flow-card { margin-top: 14px; padding: 15px; }
.flow-card h3 { margin: 0 0 13px; font-size: 14px; }
.flow-step { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 13px; }
.flow-step:last-child { padding-bottom: 0; }
.flow-dot { position: relative; display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 900; }
.flow-step:not(:last-child) .flow-dot::after { position: absolute; top: 22px; left: 10px; width: 1px; height: 24px; background: #d6e1f3; content: ""; }
.flow-step strong { display: block; font-size: 11px; }
.flow-step span { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 10px; }

.floating-api { position: fixed; z-index: 10; right: max(16px, calc((100vw - 480px) / 2 + 16px)); bottom: max(17px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 7px; padding: 10px 12px; border: 0; border-radius: 999px; color: var(--white); background: rgba(17,26,52,.94); box-shadow: 0 9px 20px rgba(17,26,52,.25); font-size: 11px; font-weight: 850; }
.floating-api b { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: var(--navy); background: var(--lime); font-size: 10px; }

.drawer { position: fixed; z-index: 30; inset: 0; visibility: hidden; opacity: 0; transition: opacity .22s ease, visibility .22s ease; }
.drawer.open { visibility: visible; opacity: 1; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(8, 14, 31, .48); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; display: flex; width: min(100%, 440px); flex-direction: column; background: var(--paper); transform: translateX(100%); transition: transform .26s ease; }
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; padding: max(21px, env(safe-area-inset-top)) 18px 15px; color: var(--white); background: var(--navy); }
.drawer-header h2 { margin: 8px 0 0; font-size: 20px; letter-spacing: -.03em; }
.drawer-description { margin: 9px 0 0; color: #b5c0dc; font-size: 11px; line-height: 1.6; }
.drawer-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.drawer-actions .api-count { white-space: nowrap; }
.log-list { overflow: auto; flex: 1; min-height: 0; padding: 12px; overscroll-behavior: contain; }
.empty-logs { padding: 48px 24px; color: var(--ink-soft); text-align: center; font-size: 12px; line-height: 1.7; }
.log-item { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.log-item summary { display: flex; align-items: center; gap: 8px; padding: 12px; cursor: pointer; list-style: none; }
.log-item summary::-webkit-details-marker { display: none; }
.log-number { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 7px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 900; }
.log-summary-main { min-width: 0; flex: 1; }
.log-method { color: var(--blue); font-size: 9px; font-weight: 900; letter-spacing: .04em; }
.log-path { overflow: hidden; margin-top: 2px; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.log-time { color: #98a1b2; font-size: 9px; }
.log-content { display: grid; gap: 10px; padding: 0 12px 12px; }
.log-payload { min-width: 0; }
.log-label { margin: 9px 0 4px; color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.log-label span { margin-left: 7px; color: #98a1b2; font-size: 10px; font-weight: 500; }
.log-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.log-label > span:first-child { min-width: 0; margin-left: 0; }
.json-view-switch { display: inline-flex; flex: 0 0 auto; margin-left: auto; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.json-view-switch .json-view-button { min-height: 22px; padding: 0 6px; border: 0; border-radius: 5px; color: var(--ink-soft); background: transparent; font-size: 9px; font-weight: 750; }
.json-view-switch .json-view-button.active { color: var(--blue); background: var(--blue-soft); }
.log-content pre { overflow: auto; max-height: 260px; margin: 0; padding: 12px; border-radius: 8px; color: #d9e7ff; background: #1b2948; font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; overscroll-behavior: contain; }
.json-tree { overflow: auto; max-height: 260px; margin: 0; padding: 9px 10px; border-radius: 8px; color: #d9e7ff; background: #1b2948; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.65; overscroll-behavior: contain; }
.json-node summary { display: flex; align-items: center; gap: 5px; min-height: 20px; cursor: pointer; list-style: none; }
.json-node summary::-webkit-details-marker { display: none; }
.json-disclosure { display: inline-block; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 5px solid #91a7ce; transition: transform .15s ease; }
.json-node[open] > summary .json-disclosure { transform: rotate(90deg); }
.json-key { color: #b9c9eb; overflow-wrap: anywhere; }
.json-root > summary .json-key { color: #eef4ff; font-weight: 800; }
.json-type, .json-count { color: #8095bd; font-size: 10px; }
.json-count { margin-left: auto; }
.json-children { margin: 1px 0 2px 10px; padding-left: 10px; border-left: 1px solid rgba(145, 167, 206, .24); }
.json-leaf { display: flex; align-items: baseline; gap: 5px; min-height: 20px; padding-left: 10px; }
.json-colon { color: #7188b1; }
.json-string { color: #b9e5b2; overflow-wrap: anywhere; }
.json-number { color: #f3cc91; }
.json-boolean { color: #eea8c9; }
.json-null { color: #95a4c1; }
.drawer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--ink-soft); background: var(--white); font-size: 10px; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 78px; max-width: calc(100vw - 40px); padding: 10px 14px; border-radius: 10px; color: var(--white); background: rgba(17,26,52,.94); box-shadow: 0 8px 20px rgba(17,26,52,.2); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 620px) {
  .site-shell { margin: 22px auto; min-height: calc(100vh - 44px); border-radius: 32px; overflow: hidden; }
  .app-screen, .success-screen { min-height: calc(100vh - 44px); }
  .hero { padding-top: 35px; }
}

@media (min-width: 960px) {
  .demo-workspace { max-width: 1520px; margin: 0 auto; padding: 0 24px 24px; }
  .demo-nav { width: 100%; padding: 0; }
  .workspace-header { display: flex; height: 76px; align-items: center; justify-content: space-between; gap: 20px; }
  .workspace-header strong { font-size: 20px; letter-spacing: -.04em; }
  .workspace-header span { color: var(--ink-soft); font-size: 12px; }
  .workspace-header div span { margin-left: 16px; }
  .demo-layout { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 24px; height: calc(100vh - 144px); height: calc(100dvh - 144px); min-height: 440px; }
  .site-shell { width: 100%; min-width: 0; min-height: 0; height: 100%; margin: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .app-screen, .success-screen { min-height: calc(100vh - 144px); min-height: calc(100dvh - 144px); }
  .floating-api, .drawer-backdrop, .drawer-actions [data-action="close-logs"] { display: none; }
  .drawer { position: relative; z-index: auto; inset: auto; min-width: 0; min-height: 0; visibility: visible; opacity: 1; transition: none; }
  .drawer-panel { position: static; width: 100%; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); transform: none; transition: none; }
  .drawer-header { padding: 22px 20px 18px; }
  .log-list { padding: 16px; }
  .log-item summary { padding: 15px; }
  .log-method { font-size: 11px; }
  .log-path { font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
  .log-time { font-size: 10px; }
  .log-content { padding: 0 15px 15px; }
  .log-label { font-size: 12px; }
  .json-view-switch .json-view-button { font-size: 10px; }
  .log-content pre, .json-tree { max-height: 360px; font-size: 12px; }
  .drawer-footer { padding: 14px 20px; font-size: 11px; }
}

@media (min-width: 1280px) {
  .log-content { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; }
  .log-payload { display: flex; flex-direction: column; }
  .log-content pre, .json-tree { flex: 1; }
}
