:root {
  color-scheme: light;
  --red: #a52126;
  --deep-red: #86151b;
  --gold: #c8a268;
  --ink: #302723;
  --muted: #93877f;
  --paper: #f7f3ed;
  --line: #eee3d7;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.hero {
  position: relative;
  display: flex;
  min-height: 340px;
  padding: 86px 28px 54px;
  align-items: center;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(145deg, var(--deep-red), #b82c2e 58%, #ca4a3f);
  color: #fff;
  text-align: center;
}

.brand-logo {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 20px;
  width: 132px;
  height: auto;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 4px 16px rgba(77, 20, 20, .12);
  object-fit: contain;
}

.hero-ring {
  position: absolute;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(255, 220, 160, .18);
  border-radius: 50%;
}

.hero-ring::before,
.hero-ring::after {
  position: absolute;
  border: 1px solid rgba(255, 220, 160, .14);
  border-radius: 50%;
  content: "";
  inset: 28px;
}

.hero-ring::after {
  inset: 62px;
}

.hero-ring-left {
  top: -112px;
  left: -108px;
}

.hero-ring-right {
  right: -124px;
  bottom: -142px;
}

.anniversary {
  position: relative;
  display: flex;
  height: 66px;
  align-items: baseline;
  color: #f8d89b;
}

.anniversary-number {
  font-family: Georgia, serif;
  font-size: 68px;
  font-weight: 700;
  line-height: 1;
}

.anniversary-unit {
  margin-left: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 4px;
}

.hero-eyebrow {
  position: relative;
  margin: 16px 0 0;
  color: #f5d9ac;
  font-size: 15px;
  letter-spacing: 6px;
}

.hero h1 {
  position: relative;
  margin: 9px 0 0;
  font-size: 30px;
  line-height: 1.35;
  letter-spacing: 4px;
}

.hero-subtitle {
  position: relative;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, .84);
  font-size: 16px;
  line-height: 1.5;
}

.main-content {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 18px;
}

.progress {
  position: relative;
  z-index: 2;
  display: flex;
  margin: -28px 0 22px;
  padding: 20px 16px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(91, 42, 30, .09);
  list-style: none;
}

.progress-item {
  display: flex;
  min-width: 64px;
  align-items: center;
  flex-direction: column;
  color: #a49b94;
}

.progress-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #ddd4cc;
  border-radius: 50%;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
}

.progress-label {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
}

.progress-item.active {
  color: var(--red);
}

.progress-item.active .progress-number {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.progress-line {
  height: 1px;
  margin: 17px 6px 0;
  flex: 1;
  background: #e7dfd7;
}

.progress-line.active {
  background: #c97a71;
}

.form-card {
  margin-bottom: 18px;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(77, 47, 35, .04);
}

.contact-card,
.result-card {
  animation: rise-in .25s ease-out;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-number {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 700;
}

.section-title-group {
  min-width: 0;
  flex: 1;
}

.section-title-group h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
}

.section-title-group p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.text-button {
  min-height: 44px;
  padding: 0 0 0 10px;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 15px;
  white-space: nowrap;
}

.company-combobox {
  position: relative;
  margin-top: 20px;
}

.search-box {
  display: flex;
  height: 58px;
  padding: 0 16px;
  align-items: center;
  border: 1px solid #e5dbd1;
  border-radius: 12px;
  background: #fcfaf7;
}

.search-box.active {
  border-color: #b4514e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(165, 33, 38, .07);
}

.search-icon {
  width: 25px;
  height: 25px;
  margin-right: 12px;
  flex: 0 0 auto;
  color: #9a6a5b;
}

#company-input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  -webkit-appearance: none;
}

#company-input::-webkit-search-cancel-button {
  display: none;
}

#company-input::placeholder {
  color: #a79c94;
}

.selected-check {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 16px;
}

.company-dropdown {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid #eadfd4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(66, 36, 25, .14);
}

.dropdown-meta {
  display: flex;
  padding: 13px 16px;
  justify-content: space-between;
  border-bottom: 1px solid #f0e8df;
  color: #9b8d83;
  font-size: 12px;
}

.company-list {
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.company-option {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid #f3ece5;
  background: #fff;
  color: #3c322e;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

.company-option:last-child {
  border-bottom: 0;
}

.company-option:active,
.company-option:hover {
  background: #fbefea;
  color: #9f1d22;
}

.no-company {
  padding: 28px 20px;
  text-align: center;
}

.no-company strong {
  display: block;
  color: #9f1d22;
  font-size: 17px;
}

.no-company span {
  display: block;
  margin-top: 8px;
  color: #8d8179;
  font-size: 15px;
  line-height: 1.5;
}

.contact-input-wrap {
  margin-top: 20px;
}

#query-form {
  margin-top: 24px;
}

.field-group + .field-group {
  margin-top: 18px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #5f5048;
  font-size: 16px;
  font-weight: 600;
}

#contact-input,
#phone-input {
  width: 100%;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid #e5dbd1;
  border-radius: 12px;
  outline: 0;
  background: #fcfaf7;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
  -webkit-appearance: none;
  appearance: none;
}

#contact-input:focus,
#phone-input:focus {
  border-color: #b4514e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(165, 33, 38, .07);
}

#contact-input::placeholder,
#phone-input::placeholder {
  color: #a79c94;
}

.query-button {
  width: 100%;
  min-height: 54px;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
}

.query-button:active {
  background: var(--deep-red);
}

.query-button:disabled {
  cursor: wait;
  opacity: .68;
}

.error-banner {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #e8b8ac;
  border-radius: 12px;
  background: #fff3ef;
  color: #9f1d22;
  font-size: 16px;
  line-height: 1.6;
}

.result-card {
  position: relative;
  overflow: hidden;
  padding: 36px 24px 24px;
  border: 1px solid #d9b676;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdf8, #fff 70%);
  box-shadow: 0 16px 40px rgba(104, 51, 32, .1);
  text-align: center;
  scroll-margin-top: 16px;
}

.result-ribbon {
  position: absolute;
  top: 0;
  left: 0;
  padding: 7px 16px;
  border-radius: 0 0 10px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  letter-spacing: 2px;
}

.result-welcome {
  margin: 18px 0 0;
  color: #4b3a31;
  font-size: 21px;
  line-height: 1.5;
}

.result-company {
  margin: 6px 0 0;
  color: #8d7b6d;
  font-size: 15px;
  line-height: 1.5;
}

.table-display {
  margin: 24px 0;
  padding: 22px 12px 26px;
  border-top: 1px solid #eadcc6;
  border-bottom: 1px solid #eadcc6;
  background: #fff9ed;
}

.table-label {
  display: block;
  color: #8c6a3d;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 5px;
}

.table-number-row {
  display: flex;
  margin-top: 6px;
  align-items: baseline;
  justify-content: center;
}

.table-number {
  color: var(--red);
  font-family: Georgia, "PingFang SC", serif;
  font-size: 84px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.table-number.pending {
  font-family: inherit;
  font-size: 48px;
}

.table-unit {
  margin-left: 10px;
  color: var(--red);
  font-size: 24px;
  font-weight: 700;
}

.table-pending-note {
  margin: 10px 0 0;
  color: #8c6a3d;
  font-size: 15px;
  line-height: 1.5;
}

.guest-detail {
  margin: 0;
  text-align: left;
}

.detail-row {
  display: flex;
  padding: 12px 0;
  align-items: flex-start;
  font-size: 17px;
  line-height: 1.5;
}

.detail-row dt {
  width: 92px;
  flex-shrink: 0;
  color: #94877d;
}

.detail-row dd {
  margin: 0;
  flex: 1;
  color: #3c322e;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.privacy-note {
  display: flex;
  margin: 6px 4px 0;
  align-items: center;
  justify-content: center;
  color: #9b8e84;
  font-size: 13px;
  line-height: 1.5;
}

.privacy-mark {
  display: grid;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #aa9c90;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 12px;
}

.bottom-tip {
  position: fixed;
  z-index: 50;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 72px;
  padding: 20px 24px calc(20px + env(safe-area-inset-bottom));
  align-items: center;
  justify-content: center;
  border-top: 1px solid #ead8c4;
  background: rgba(255, 251, 244, .97);
  color: #8f2427;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  box-shadow: 0 -6px 20px rgba(77, 47, 35, .05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.tip-line {
  width: 34px;
  height: 1px;
  margin: 0 14px;
  background: #cfad84;
}

.empty-state,
.noscript {
  padding: 36px 24px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.empty-state h2 {
  margin: 0;
  font-size: 22px;
}

.empty-state p,
.noscript {
  color: var(--muted);
  font-size: 16px;
}

@media (min-width: 600px) {
  .hero {
    min-height: 300px;
  }

  .main-content {
    padding: 0 24px;
  }

  .form-card {
    padding: 26px 24px;
  }
}

@media (max-width: 360px) {
  .main-content {
    padding: 0 12px;
  }

  .form-card {
    padding: 20px 16px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .progress {
    padding-right: 10px;
    padding-left: 10px;
  }

  .progress-item {
    min-width: 58px;
  }

  .table-number {
    font-size: 72px;
  }

  .bottom-tip {
    font-size: 16px;
  }

  .tip-line {
    width: 24px;
    margin: 0 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
