:root {
  --bg: #07111f;
  --bg-soft: #0d1b2e;
  --card: rgba(8, 16, 30, 0.78);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #95a7bf;
  --accent: #f6c26e;
  --accent-strong: #ffdf95;
  --blue: #67c4ff;
  --success: #46d59a;
  --warning: #ffbf69;
  --danger: #ff7b7b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.33);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(103, 196, 255, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(246, 194, 110, 0.22), transparent 34%),
    linear-gradient(180deg, #081220 0%, #07111f 45%, #050b14 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 35%, rgba(255, 255, 255, 0.02) 65%, transparent),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 72px
    );
  opacity: 0.38;
}

.public-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px 18px 48px;
  display: grid;
  gap: 18px;
}

.hero-card,
.query-card,
.info-card,
.detail-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px 22px 24px;
  overflow: hidden;
  position: relative;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 194, 110, 0.32), transparent 66%);
}

.hero-tag,
.detail-kicker,
.card-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-card h1,
.detail-head h2,
.section-head h3 {
  margin: 12px 0 0;
  font-family: "Iowan Old Style", "Baskerville", "Songti SC", serif;
  letter-spacing: 0.01em;
}

.hero-card h1 {
  font-size: 34px;
  line-height: 1.08;
}

.hero-copy {
  margin: 16px 0 0;
  max-width: 22em;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(246, 194, 110, 0.42);
  background: linear-gradient(135deg, rgba(246, 194, 110, 0.18), rgba(103, 196, 255, 0.12));
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.hero-link-button:hover {
  transform: translateY(-1px);
  border-color: rgba(246, 194, 110, 0.7);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.production-feed {
  position: sticky;
  top: calc(env(safe-area-inset-top) + 8px);
  z-index: 20;
  display: block;
  min-height: 42px;
  padding: 8px 0;
  overflow: hidden;
  border: 1px solid rgba(246, 194, 110, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(246, 194, 110, 0.16), rgba(103, 196, 255, 0.08)),
    rgba(8, 16, 30, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.production-feed[hidden] {
  display: none;
}

.production-feed-window {
  min-width: 0;
  min-height: 24px;
  overflow: hidden;
}

.production-feed-list {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  white-space: nowrap;
  will-change: transform;
}

.production-feed-list.is-scrolling {
  animation: productionMarquee var(--production-feed-duration, 24s) linear infinite;
}

.production-feed-item {
  position: relative;
  flex: 0 0 auto;
  padding-left: 13px;
  color: #eef6ff;
  font-size: 12px;
  font-weight: 650;
  line-height: 24px;
  white-space: nowrap;
}

.production-feed-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(70, 213, 154, 0.14), 0 0 16px rgba(70, 213, 154, 0.6);
}

@keyframes productionMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.query-card {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.query-form {
  display: grid;
  gap: 12px;
}

.field-label {
  font-size: 14px;
  color: #d8e3f1;
}

.input-row {
  display: grid;
  gap: 10px;
}

input,
button {
  font: inherit;
  border: 0;
  border-radius: 18px;
}

input {
  width: 100%;
  padding: 16px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
}

input::placeholder {
  color: rgba(230, 238, 247, 0.45);
}

input:focus {
  border-color: rgba(246, 194, 110, 0.7);
  box-shadow: 0 0 0 3px rgba(246, 194, 110, 0.16);
}

button {
  padding: 15px 18px;
  cursor: pointer;
  color: #081220;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  box-shadow: 0 12px 28px rgba(246, 194, 110, 0.22);
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.query-hint,
.card-note,
.status-time {
  color: var(--muted);
  line-height: 1.6;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-label {
  font-size: 13px;
  color: var(--muted);
}

.history-chip,
.history-clear {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: none;
}

.history-chip {
  color: var(--text);
  background: rgba(103, 196, 255, 0.16);
}

.history-clear {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.status-banner {
  padding: 14px 16px;
  border-radius: 20px;
  line-height: 1.6;
  font-size: 14px;
  border: 1px solid transparent;
}

.status-idle {
  color: #dce7f5;
  background: rgba(255, 255, 255, 0.06);
}

.status-pending {
  color: #fff6de;
  border-color: rgba(255, 191, 105, 0.24);
  background: rgba(255, 191, 105, 0.16);
}

.status-success {
  color: #e2fff3;
  border-color: rgba(70, 213, 154, 0.25);
  background: rgba(70, 213, 154, 0.16);
}

.status-warning {
  color: #fff3d8;
  border-color: rgba(255, 191, 105, 0.25);
  background: rgba(255, 191, 105, 0.14);
}

.status-error {
  color: #ffe0e0;
  border-color: rgba(255, 123, 123, 0.28);
  background: rgba(255, 123, 123, 0.14);
}

.results {
  display: grid;
  gap: 18px;
}

.overview-grid {
  display: grid;
  gap: 14px;
}

.info-card {
  padding: 20px 18px;
  display: grid;
  gap: 12px;
}

.accent-card {
  background:
    linear-gradient(180deg, rgba(246, 194, 110, 0.12), transparent 60%),
    var(--card);
}

.status-value,
.eta-value {
  font-family: "Iowan Old Style", "Baskerville", "Songti SC", serif;
  font-size: 28px;
  line-height: 1.22;
}

.detail-card {
  padding: 22px 18px;
}

.detail-head,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.detail-head h2,
.section-head h3 {
  font-size: 24px;
  line-height: 1.16;
}

.detail-badge {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--blue);
  border: 1px solid rgba(103, 196, 255, 0.25);
  background: rgba(103, 196, 255, 0.12);
}

.detail-grid {
  margin: 18px 0 0;
  display: grid;
  gap: 14px;
}

.detail-grid div {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-grid dt {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.detail-grid dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
}

.forecast-message {
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.7;
}

.forecast-meta {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.forecast-chip {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: #deecff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-status {
  font-size: 16px;
}

.timeline-time {
  font-size: 13px;
  color: var(--muted);
}

.timeline-empty {
  color: var(--muted);
  padding: 8px 4px 0;
}

.noscript-tip {
  padding: 18px;
  text-align: center;
  color: #fff2d3;
}

@media (min-width: 680px) {
  .public-shell {
    padding: 32px 24px 64px;
  }

  .input-row {
    grid-template-columns: 1fr auto;
  }

  .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .production-feed-list.is-scrolling {
    animation: none;
  }
}
