:root {
  --blue: #002b5c;
  --blue-2: #004a98;
  --gold: #f2b632;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #162033;
  --muted: #5d6b82;
  --border: #dfe6f0;
  --shadow: 0 16px 38px rgba(12, 38, 75, 0.12);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(242, 182, 50, 0.22), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 50%, #eef3f9 100%);
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(223, 230, 240, 0.9);
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  padding: 5px;
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--blue);
}

.brand-subtitle {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.25;
}

.page-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 18px 14px 42px;
}

.hero {
  margin-top: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(0, 43, 92, 0.96), rgba(0, 74, 152, 0.92)),
    radial-gradient(circle at top right, rgba(242, 182, 50, 0.55), transparent 18rem);
  border-radius: 28px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 16px 0 8px;
  font-size: clamp(28px, 8vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.5;
}

.search-wrap {
  margin: 16px 0;
}

.search-input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  padding: 0 18px;
  font-size: 16px;
  box-shadow: 0 10px 24px rgba(12, 38, 75, 0.08);
  outline: none;
}

.search-input:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(0, 74, 152, 0.14);
}

.package-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.package-card {
  display: grid;
  grid-template-columns: 86px 1fr 22px;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(12, 38, 75, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.package-card:active { transform: scale(0.99); }
.package-card:hover { border-color: rgba(0, 74, 152, 0.38); box-shadow: var(--shadow); }

.card-image-wrap {
  width: 86px;
  height: 86px;
  border-radius: 18px;
  overflow: hidden;
  background: #e9eef6;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-code, .detail-code {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 74, 152, 0.1);
  color: var(--blue-2);
  font-size: 12px;
  font-weight: 800;
}

.card-title {
  margin: 0 0 5px;
  font-size: 17px;
  line-height: 1.18;
  color: var(--blue);
}

.card-description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-arrow {
  font-size: 32px;
  color: var(--blue-2);
}

.back-row { margin: 4px 0 14px; }
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--border);
  font-weight: 700;
}

.detail-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-image {
  width: 100%;
  height: clamp(210px, 58vw, 420px);
  object-fit: cover;
  background: #e8edf5;
}

.detail-content { padding: 20px 16px 24px; }

.detail-title {
  margin: 4px 0 10px;
  font-size: clamp(28px, 8vw, 48px);
  line-height: 1.04;
  color: var(--blue);
  letter-spacing: -0.04em;
}

.intro-text {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.58;
}

.content-section, .text-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.content-section h2, .text-section h2 {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 21px;
  line-height: 1.2;
}

.text-section p {
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.58;
}

.text-section ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.text-section li {
  margin: 7px 0;
  line-height: 1.48;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
}

.material-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: #fff;
}

.material-table th,
.material-table td {
  padding: 13px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.4;
}

.material-table th {
  color: var(--blue);
  background: #f3f7fc;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.material-table tr:last-child td { border-bottom: 0; }

.loading-card, .error-card {
  margin-top: 24px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.loader {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 4px solid #d7e0ec;
  border-top-color: var(--blue-2);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (min-width: 720px) {
  .topbar { padding-left: 28px; padding-right: 28px; }
  .page-shell { padding: 30px 28px 64px; }
  .hero { padding: 42px; border-radius: 34px; }
  .package-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .package-card { grid-template-columns: 104px 1fr 28px; min-height: 132px; padding: 14px; }
  .card-image-wrap { width: 104px; height: 104px; }
  .detail-content { padding: 34px; }
}

@media (min-width: 1040px) {
  .package-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
