* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: #ffffff;
  color: #111111;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", Arial, sans-serif;
  line-height: 1.6;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 18px 56px;
}

.hero {
  display: flex;
  flex-direction: column;
}

.brand-kicker {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #71717a;
}

.title {
  margin: 0 0 14px;
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 0 28px;
  font-size: 1.125rem;
  color: #444444;
}

.recent-searches {
  margin-top: 6px;
  padding: 14px 16px;
  border: 1px solid #ececec;
  border-radius: 16px;
  background: #ffffff;
}

.recent-searches-header {
  margin-bottom: 10px;
}

.recent-searches-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #71717a;
}

.recent-searches-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.recent-search-chip {
  display: block;
  width: 100%;
  padding: 10px 0;
  color: #111111;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  transition: color 0.15s ease;
}

.recent-search-chip:last-child {
  border-bottom: 0;
}

.recent-search-chip:hover {
  color: #2563eb;
}

.recent-search-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  border-radius: 6px;
}

.page-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.search-input {
  width: 100%;
  min-height: 64px;
  padding: 16px 18px;
  border: 1.5px solid #d9d9d9;
  border-radius: 16px;
  font-size: 1.35rem;
  font-weight: 600;
  outline: none;
  background: #fff;
}

.search-input:focus {
  border-color: #111111;
}

.search-button {
  width: 100%;
  min-height: 60px;
  border: none;
  border-radius: 16px;
  background: #111111;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

.guide-box,
.status-box,
.empty-box,
.result-card {
  border: 1px solid #ececec;
  border-radius: 20px;
  background: #fff;
}

.guide-box {
  padding: 20px;
}

.guide-title,
.result-label,
.status-label {
  margin: 0 0 8px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #666666;
}

.guide-text {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 700;
}

.guide-note,
.status-note,
.empty-subtext {
  margin: 10px 0 0;
  font-size: 1rem;
  color: #666666;
}

.topbar {
  margin-bottom: 18px;
}

.topbar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.page-title-block {
  min-width: 0;
}

.page-brand {
  margin: 0 0 2px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #71717a;
}

.search-form-results {
  margin-bottom: 0;
}

.status-box {
  padding: 20px;
  margin-bottom: 18px;
}

.status-value {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  word-break: break-word;
}

.result-summary {
  margin-bottom: 10px;
}

.result-count {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-card {
  padding: 8px 11px;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.03);
}

.result-block + .result-block {
  margin-top: 0;
}

.copy-field {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  width: 100%;
  padding: 7px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.copy-field-inline {
  display: grid;
}

.copy-field:hover {
  background: #fafafa;
}

.copy-field:active {
  transform: translateY(1px);
}

.copy-field:hover .result-main,
.copy-field:hover .zip {
  color: #27272a;
}

.copy-field:focus-visible {
  outline: none;
  background: #fafafa;
  box-shadow: inset 0 0 0 1px #d4d4d8;
}

.copy-field:focus-visible .result-main,
.copy-field:focus-visible .zip,
.copy-field:focus-visible .result-label {
  text-decoration: underline;
  text-decoration-color: #a1a1aa;
  text-underline-offset: 4px;
}

.result-main {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.42;
  word-break: break-word;
  letter-spacing: -0.01em;
  color: #18181b;
}

.result-block:nth-child(2) {
  margin-top: 2px;
  padding: 9px 8px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
}

.result-block:nth-child(2):hover {
  background: linear-gradient(180deg, #f3f8ff 0%, #e9f2ff 100%);
}

.result-block:nth-child(2):focus-visible {
  background: linear-gradient(180deg, #f3f8ff 0%, #e9f2ff 100%);
  box-shadow: inset 0 0 0 1px #93c5fd;
}

.result-main.english {
  font-size: 0.94rem;
  font-weight: 600;
  color: #1d4ed8;
}

.inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zip {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #18181b;
}

.result-label {
  margin: 0;
  padding-top: 2px;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #71717a;
}

.result-card .copy-field + .copy-field {
  border-top: 1px solid #f3f4f6;
}

.empty-box {
  padding: 28px 20px;
  text-align: center;
  border-color: #e4e4e7;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  box-shadow: 0 10px 30px rgba(24, 24, 27, 0.04);
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  background: #ffffff;
  color: #3f3f46;
  font-size: 1.35rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.empty-text {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.empty-subtext {
  max-width: 420px;
  margin: 12px auto 0;
  line-height: 1.65;
}

.topbar-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px 0 10px;
  flex-shrink: 0;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.topbar-back-button:hover {
  background: #f4f4f5;
  border-color: #d4d4d8;
}

.topbar-back-button:active {
  transform: translateY(1px);
}

.topbar-back-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.14);
}

.topbar-back-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-back-text {
  position: relative;
  top: -0.5px;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  min-width: 180px;
  max-width: calc(100vw - 32px);
  padding: 13px 16px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #18181b;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 30px rgba(24, 24, 27, 0.14), 0 2px 8px rgba(24, 24, 27, 0.08);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.copy-toast.is-error {
  border-color: #fecaca;
  background: rgba(254, 242, 242, 0.97);
  color: #991b1b;
}

.scroll-top-button {
  position: fixed;
  right: 20px;
  bottom: 86px;
  z-index: 980;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: #18181b;
  box-shadow: 0 10px 30px rgba(24, 24, 27, 0.12), 0 2px 8px rgba(24, 24, 27, 0.08);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.scroll-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-button:hover {
  background: #f4f4f5;
  border-color: #d4d4d8;
}

.scroll-top-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.14), 0 10px 30px rgba(24, 24, 27, 0.12);
}

.scroll-top-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

@media (min-width: 720px) {
  .wrap {
    padding: 36px 24px 72px;
  }

  .search-form {
    flex-direction: row;
    align-items: stretch;
  }

  .topbar-header {
    align-items: center;
  }

  .search-input {
    flex: 1;
  }

  .search-button {
    width: 180px;
  }

  .copy-field {
    grid-template-columns: 92px minmax(0, 1fr);
    column-gap: 16px;
    padding: 11px 6px;
  }

  .title {
    font-size: 2.6rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }
}
