:root {
  --bg: #eee5d7;
  --paper: rgba(250, 245, 236, 0.92);
  --paper-strong: #f3e8d7;
  --paper-soft: rgba(246, 238, 225, 0.88);
  --ink: #21352e;
  --muted: #6f675f;
  --line: rgba(120, 108, 93, 0.16);
  --accent: #d97e31;
  --accent-soft: #efd7bf;
  --service: #24493d;
  --service-2: #5d7c6b;
  --shadow: 0 18px 42px rgba(33, 39, 33, 0.16);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(217, 126, 49, 0.16), transparent 28%),
    linear-gradient(180deg, #efe4d2 0%, #e7dbc8 100%);
  color: var(--ink);
  font-family: "Trebuchet MS", Arial, sans-serif;
}

body {
  padding: 18px 14px calc(104px + env(safe-area-inset-bottom, 0px));
}

.app-shell {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 22px 20px 20px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--service) 0%, var(--service-2) 100%);
  box-shadow: var(--shadow);
  color: #fff6ec;
}

.hero-accent {
  width: 64px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  margin-bottom: 18px;
}

.hero-kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.78;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.02;
  font-family: "Arial Black", Arial, sans-serif;
}

.hero-subtitle {
  margin: 12px 0 0;
  max-width: 44rem;
  color: rgba(255, 246, 236, 0.88);
  font-size: 16px;
  line-height: 1.45;
}

.tab-view {
  display: grid;
  gap: 14px;
}

.panel-grid {
  display: grid;
  gap: 12px;
}

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

.fact-card,
.content-card,
.map-card {
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.fact-card {
  padding: 16px 16px 14px;
}

.fact-card--soft {
  background: var(--paper-soft);
  box-shadow: none;
}

.fact-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fact-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
  font-family: "Arial Black", Arial, sans-serif;
}

.content-card,
.map-card {
  padding: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.card-head h2 {
  margin: 0;
  font-size: 18px;
  font-family: "Arial Black", Arial, sans-serif;
}

.card-copy {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.soft-pill,
.imei-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.soft-pill {
  background: var(--paper-soft);
  color: #6b6259;
}

.imei-pill {
  background: var(--accent-soft);
  color: #88562b;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.timeline-list {
  display: grid;
  gap: 12px;
}

.timeline-row {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-row:last-child {
  border-bottom: 0;
}

.timeline-key {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-row strong {
  font-size: 18px;
  line-height: 1.25;
  font-family: "Arial Black", Arial, sans-serif;
}

.map-frame-wrap {
  overflow: hidden;
  border-radius: 18px;
  background: var(--paper-strong);
}

#device-map {
  width: 100%;
  height: min(48vh, 440px);
  border: 0;
  display: block;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  background: linear-gradient(135deg, #cc7330 0%, #e69a52 100%);
  color: #fffaf3;
}

.secondary-button {
  background: rgba(250, 245, 236, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 30;
  transform: translateX(-50%);
  width: min(920px, calc(100% - 20px));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(31, 49, 42, 0.92);
  box-shadow: 0 16px 34px rgba(19, 28, 24, 0.28);
  backdrop-filter: blur(18px);
}

.tabbar-button {
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: rgba(255, 246, 236, 0.76);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.tabbar-button.is-active {
  background: linear-gradient(135deg, rgba(217, 126, 49, 0.18), rgba(217, 126, 49, 0.34));
  color: #fff6ec;
  transform: translateY(-1px);
}

.tabbar-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  body {
    padding: 14px 10px calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .panel-grid--two,
  .action-row {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 20px 16px 18px;
  }

  .tabbar {
    bottom: 10px;
    width: calc(100% - 12px);
    gap: 8px;
    padding: 8px;
  }

  .tabbar-button {
    min-height: 54px;
    border-radius: 16px;
  }

  #device-map {
    height: 42vh;
  }
}
