:root {
  --brand-navy: #0f2b46;
  --brand-blue: #1a5fa8;
  --brand-blue-light: #2f80d9;
  --brand-accent: #ff8a00;
  --gray-bg: #f3f5f8;
  --gray-border: #dde3ea;
  --gray-text: #52606d;
  --success: #1a9c6b;
  --danger: #d64545;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", Arial, sans-serif;
  background: var(--gray-bg);
  color: #1e2733;
  min-height: 100vh;
}

#app-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
  color: #fff;
  padding: 20px 16px;
  box-shadow: 0 2px 10px rgba(15, 43, 70, 0.25);
}

.app-header__inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}

.app-title i {
  color: var(--brand-accent);
}

.app-badge {
  display: inline-block;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
}

/* Main */
.app-main {
  flex: 1;
  padding: 24px 16px 40px;
  display: flex;
  justify-content: center;
}

/* Search card */
.search-card,
.result-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(15, 43, 70, 0.08);
  padding: 28px 24px;
  width: 100%;
  max-width: 480px;
  height: fit-content;
}

.search-lead {
  margin: 0 0 20px;
  font-size: 0.92rem;
  color: var(--gray-text);
  line-height: 1.6;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  background: #fbfcfe;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--brand-blue-light);
  box-shadow: 0 0 0 3px rgba(47, 128, 217, 0.15);
  background: #fff;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-light) 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 3px 10px rgba(26, 95, 168, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 5px 14px rgba(26, 95, 168, 0.45);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.search-error {
  margin-top: 16px;
  padding: 12px 14px;
  background: #fdecec;
  border: 1px solid #f4bcbc;
  color: var(--danger);
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.search-loading {
  margin-top: 16px;
  text-align: center;
  color: var(--gray-text);
  font-size: 0.9rem;
}

/* Result card */
.btn-back {
  background: none;
  border: none;
  color: var(--brand-blue);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin-bottom: 18px;
}

.btn-back:hover {
  text-decoration: underline;
}

.result-status-block {
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--gray-border);
  margin-bottom: 20px;
}

.result-label {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-text);
  margin-bottom: 4px;
}

.result-status-value {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-navy);
}

.result-updated-at {
  font-size: 0.78rem;
  color: #8a97a5;
}

/* Progress bar */
.progress-bar {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0 0 26px;
  position: relative;
}

.progress-bar li {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 0.72rem;
  color: #9aa5b1;
  font-weight: 600;
}

.progress-bar li .dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e3e8ee;
  color: #9aa5b1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid #e3e8ee;
  position: relative;
  z-index: 2;
  transition: all 0.2s;
}

.progress-bar li::before {
  content: "";
  position: absolute;
  top: 13px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: #e3e8ee;
  z-index: 1;
}

.progress-bar li:first-child::before {
  content: none;
}

.progress-bar li.done .dot {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

.progress-bar li.done::before {
  background: var(--brand-blue);
}

.progress-bar li.current .dot {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.2);
}

.progress-bar li.current {
  color: var(--brand-navy);
}

.progress-bar li.done {
  color: var(--brand-blue);
}

/* Detail list */
.result-detail-list {
  margin: 0 0 20px;
}

.result-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--gray-border);
  font-size: 0.9rem;
}

.result-detail-row dt {
  color: var(--gray-text);
  font-weight: 600;
}

.result-detail-row dd {
  margin: 0;
  font-weight: 700;
  color: #1e2733;
  text-align: right;
}

.result-note-box {
  display: flex;
  gap: 10px;
  background: #eef5fc;
  border: 1px solid #cfe3f5;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

.result-note-box i {
  color: var(--brand-blue);
  margin-top: 2px;
}

.result-note-box p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #2c3a4a;
}

.result-footnote {
  font-size: 0.76rem;
  color: #9aa5b1;
  line-height: 1.6;
  margin: 0;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 16px;
  font-size: 0.75rem;
  color: #9aa5b1;
}

/* Responsive */
@media (max-width: 480px) {
  .app-title {
    font-size: 1.15rem;
  }
  .search-card,
  .result-card {
    padding: 22px 18px;
    border-radius: 12px;
  }
  .progress-bar li {
    font-size: 0.62rem;
  }
  .progress-bar li .dot {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
  }
  .progress-bar li::before {
    top: 11px;
  }
  .result-status-value {
    font-size: 1.25rem;
  }
}
