:root {
  --green: #064b2b;
  --green-light: #0f6b3a;
  --gold: #d4af37;
  --white: #ffffff;
  --text: #1f2a24;
  --muted: #6b6b6b;
  --danger: #b71c1c;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f7f0df;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 24px 14px 40px;
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #fffaf0 0%, #f7f0df 55%, #efe3c8 100%);
  background-attachment: fixed;
  color: var(--text);
}

.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.logo {
  width: 118px;
  height: 118px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  margin-top: 8px;
}

h1 {
  margin: 18px 0 4px;
  font-size: 30px;
  color: var(--green);
  font-weight: 800;
}

.brand-subtitle {
  color: var(--gold);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 28px;
}

.search-card {
  background: var(--white);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
  text-align: left;
}

.section-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 8px;
}

input {
  width: 100%;
  padding: 15px 16px;
  font-size: 17px;
  border: 1px solid #d4d4d4;
  border-radius: 12px;
  outline: none;
}

input:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(15,107,58,0.15);
}

button {
  width: 100%;
  margin-top: 14px;
  padding: 15px;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(6,75,43,0.25);
}

.hint {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.tracking-summary {
  display: none;
  margin-bottom: 16px;
  padding: 14px;
  background: #fff8e3;
  border: 1px solid #f0d98a;
  border-radius: 14px;
  text-align: center;
}

.tracking-summary-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.tracking-summary-value {
  color: var(--green);
  font-weight: 800;
  font-size: 18px;
  word-break: break-word;
}

.not-found {
  display: none;
  margin-top: 18px;
  padding: 14px;
  background: #fff1f1;
  color: var(--danger);
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
}

.result-card {
  display: none;
  margin-top: 22px;
  background: #fbfbfb;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid #efefef;
  text-align: left;
}

.result-header {
  font-size: 20px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 14px;
  text-align: center;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #e9e9e9;
  font-size: 16px;
}

.info-label {
  color: var(--muted);
  font-weight: 700;
  min-width: 120px;
}

.info-value {
  text-align: right;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.thai-post-box {
  margin-top: 18px;
  padding: 16px;
  background: #f5fff8;
  border: 1px solid #b9dfc5;
  border-radius: 14px;
}

.thai-post-title {
  color: var(--green);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
}

.thai-post-latest {
  padding: 14px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2efe6;
  margin-bottom: 14px;
  line-height: 1.7;
}

.latest-status-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #b9dfc5;
}

.latest-status-icon {
  font-size: 24px;
  line-height: 1;
  padding-top: 2px;
}

.latest-status-content {
  flex: 1;
}

.latest-status-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.latest-status-main {
  font-size: 19px;
  color: var(--green);
  font-weight: 900;
  margin-bottom: 4px;
}

.latest-status-meta {
  font-size: 14px;
  color: #444;
  line-height: 1.6;
}

.timeline-heading {
  margin-top: 18px;
  margin-bottom: 14px;
}

.timeline-list {
  position: relative;
  margin-top: 8px;
  padding-left: 26px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 9px;
  bottom: 10px;
  width: 3px;
  background: #b9dfc5;
  border-radius: 999px;
}

.timeline-item {
  position: relative;
  padding: 0 0 22px 18px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -25px;
  top: 5px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #0f6b3a;
  z-index: 1;
}

.timeline-dot-latest {
  left: -31px;
  top: 0;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.timeline-content {
  background: transparent;
}

.timeline-latest .timeline-content {
  background: #ffffff;
  border: 1px solid #b9dfc5;
  border-radius: 12px;
  padding: 10px 12px;
}

.timeline-status {
  font-weight: 900;
  color: var(--green);
  font-size: 16px;
  line-height: 1.4;
}

.timeline-latest .timeline-status {
  font-size: 17px;
}

.timeline-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
  line-height: 1.45;
}

.timeline-detail {
  color: #444;
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.5;
}

.poster-button {
  margin-top: 18px;
  background: #fff8e3;
  color: var(--green);
  border: 1px solid #f0d98a;
  box-shadow: none;
  font-size: 16px;
}

.poster-section {
  display: none;
  margin-top: 18px;
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  border: 1px solid #ead89f;
}

.poster-img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

.footer {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

@media (max-width: 480px) {
  body {
    padding: 18px 12px 34px;
  }

  .logo {
    width: 96px;
    height: 96px;
  }

  h1 {
    font-size: 25px;
  }

  .brand-subtitle {
    font-size: 18px;
  }

  .search-card {
    padding: 20px;
  }

  .info-row {
    flex-direction: column;
    gap: 4px;
  }

  .info-value {
    text-align: left;
  }

  .timeline-list {
    padding-left: 24px;
  }

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

  .timeline-meta,
  .timeline-detail {
    font-size: 12.5px;
  }
}
