*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  font-family: "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans KR",
    "PingFang SC", "Noto Sans SC", "Noto Naskh Arabic", "Geeza Pro",
    Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

:root {
  --ink: #161410;
  --ink-soft: #534d43;
  --paper: #f3efe6;
  --paper-2: #e6dfd1;
  --card: #fffcf7;
  --line: #d7cec0;
  --accent: #c24e1d;
  --accent-hover: #a33d14;
  --accent-ink: #fff8f3;
  --trust: #1c5c54;
  --trust-soft: #d7ebe7;
  --fair: #9a4a12;
  --good: #1c5c54;
  --excellent: #1e3a8a;
  --danger: #9f1239;
  --focus: #1c5c54;
  --shadow: 0 16px 40px rgba(22, 20, 16, 0.08);
  --radius: 18px;
  --header-h: 72px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: 8px;
  z-index: 80;
  background: var(--ink);
  color: var(--card);
  padding: 10px 14px;
  border-radius: 10px;
  transform: translateY(-140%);
}

.skip:focus {
  transform: none;
}

.container {
  width: min(100% - 32px, 1200px);
  margin-inline: auto;
}

.layout-child {
  min-width: 0;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--paper) 86%, white);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgb(22 20 16 / 8%);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
  min-width: 0;
}

.brand strong {
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.brand span {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.header-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nav-desktop a {
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.nav-desktop a:hover {
  background: rgb(22 20 16 / 6%);
}

.icon-btn,
.btn {
  min-height: 44px;
  min-width: 44px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
}

.icon-btn {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 650;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--card);
}

.btn-wide {
  width: 100%;
}

.lang {
  position: relative;
}

.lang-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  width: min(280px, calc(100vw - 32px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 50;
}

.lang-menu[hidden] {
  display: none;
}

.lang-menu button {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  text-align: start;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.lang-menu button[aria-current="true"] {
  background: var(--trust-soft);
}

body.nav-open {
  overflow: hidden;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(22 20 16 / 45%);
  z-index: 45;
}

.drawer-panel {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(360px, 100%);
  background: var(--paper);
  z-index: 46;
  padding: calc(env(safe-area-inset-top) + 16px) 20px
    max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
}

.drawer-panel a,
.drawer-panel .btn {
  min-height: 44px;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
}

.hero {
  padding: 28px 0 12px;
  min-height: unset;
}

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

.hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 750;
}

:lang(en) .hero h1,
:lang(en-SG) .hero h1,
:lang(en-NG) .hero h1,
:lang(en-ZA) .hero h1,
:lang(tr) .hero h1 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--trust);
  font-weight: 650;
  font-size: 0.92rem;
}

.lead {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 42rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 8px;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  min-width: 0;
}

.stat strong {
  display: block;
  font-size: 1.05rem;
}

.stat span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.hero-media {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-width: 0;
  background: var(--paper-2);
  aspect-ratio: 4 / 5;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  inset-inline-start: 16px;
  bottom: 16px;
  background: rgb(255 252 247 / 92%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 12px 14px;
  max-width: min(240px, calc(100% - 32px));
  font-weight: 700;
}

.section {
  padding: 48px 0;
}

.section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

.section-head {
  margin-bottom: 22px;
  max-width: 44rem;
}

.cat-grid,
.product-grid,
.grade-grid,
.promise-grid,
.review-grid {
  display: grid;
  gap: 16px;
}

.cat-grid {
  grid-template-columns: 1fr;
}

.card-link,
.product-card,
.grade-card,
.promise-card,
.review-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.card-link {
  text-decoration: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-link:hover {
  border-color: #c4b8a6;
  box-shadow: var(--shadow);
}

.card-link img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  object-position: center;
  background: #d9d0c3;
}

.card-link div {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.card-link strong {
  display: block;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 14px;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--card);
  border-color: var(--ink);
}

.product-grid {
  grid-template-columns: 1fr;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center;
  background: #d9d0c3;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-body h3 {
  margin: 0;
  font-size: 1.15rem;
}

.meta-line {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.price {
  font-size: 1.35rem;
  font-weight: 750;
}

.was {
  color: var(--ink-soft);
  text-decoration: line-through;
}

.save {
  color: var(--trust);
  font-weight: 650;
  font-size: 0.9rem;
}

.grade {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  width: fit-content;
}

.grade-fair {
  background: #f6e1cf;
  color: var(--fair);
}

.grade-good {
  background: var(--trust-soft);
  color: var(--good);
}

.grade-excellent {
  background: #dbe4f8;
  color: var(--excellent);
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgb(255 252 247 / 50%);
}

.product-card ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.product-card li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.grade-card,
.promise-card,
.review-card {
  padding: 20px;
}

.grade-card p,
.promise-card p,
.review-card p {
  color: var(--ink-soft);
  margin: 8px 0 0;
}

.promise-visual {
  display: grid;
  gap: 16px;
}

.promise-visual img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.review-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.stars {
  color: var(--accent);
  letter-spacing: 0.12em;
}

.faq button {
  width: 100%;
  min-height: 52px;
  text-align: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 650;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.faq-item + .faq-item {
  margin-top: 10px;
}

.faq-item p {
  margin: 0;
  padding: 12px 8px 8px;
  color: var(--ink-soft);
}

.form-grid {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 650;
}

input,
textarea,
select {
  min-height: 48px;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 12px 14px;
  width: 100%;
  color: var(--ink);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: start;
  gap: 10px;
  font-weight: 500;
}

.check input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin-top: 2px;
}

.field-error,
.form-status {
  color: var(--danger);
  font-weight: 600;
  margin: 0;
}

.success {
  background: var(--trust-soft);
  border: 1px solid #b7d7d1;
  border-radius: 16px;
  padding: 16px;
}

.success pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--card);
  padding: 12px;
  border-radius: 12px;
  overflow: auto;
}

.note {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.site-footer {
  padding: 40px 0 max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.boot {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-card {
  width: min(100%, 360px);
  text-align: center;
}

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

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

.sticky-action {
  position: sticky;
  bottom: 0;
  z-index: 30;
  padding: 10px 0 max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--paper) 28%);
}

.cart-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--ink);
  color: var(--card);
  border-radius: 18px;
  padding: 10px 10px 10px 16px;
}

.cart-bar .btn-primary {
  margin-inline-start: auto;
}

.menu-btn {
  display: inline-flex;
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .hero-media {
    aspect-ratio: 16 / 10;
    max-height: 38vh;
  }

  .hero {
    padding-top: 16px;
  }
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .hero-media {
    aspect-ratio: 4 / 5;
  }

  .grade-grid,
  .review-grid,
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .promise-visual {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }

  .form-grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }

  .menu-btn {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero {
    padding-top: 40px;
  }

  .sticky-action {
    display: none;
  }
}

@media (min-width: 1440px) {
  .container {
    width: min(100% - 48px, 1240px);
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .hero-media {
    aspect-ratio: 16 / 9;
    max-height: 70vh;
  }

  .site-header {
    position: sticky;
  }
}

.dwell-tease {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed var(--accent);
  background: rgb(194 78 29 / 8%);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
}

.dwell-tease-on {
  border-style: solid;
  border-color: var(--trust);
  background: var(--trust-soft);
}

.perk-line {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.perk-line.perk-on,
.perk-form.perk-on {
  color: var(--trust);
  font-weight: 600;
}

body.has-dwell {
  padding-bottom: 88px;
}

.dwell-dock {
  position: fixed;
  z-index: 40;
  inset-inline: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  pointer-events: none;
}

.dwell-card {
  pointer-events: auto;
  display: grid;
  gap: 6px;
  width: min(100%, 520px);
  margin-inline: auto;
  background: var(--ink);
  color: var(--card);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}

.dwell-card strong {
  display: block;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.dwell-card p {
  display: none;
  margin: 2px 0 0;
  color: rgb(255 252 247 / 82%);
  font-size: 0.86rem;
}

.dwell-meter {
  height: 4px;
  border-radius: 999px;
  background: rgb(255 255 255 / 16%);
  overflow: hidden;
}

.dwell-meter span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.dwell-dock-open .dwell-card {
  grid-template-columns: auto 1fr;
  align-items: center;
  background: var(--trust);
}

.dwell-dock-open .dwell-card p {
  display: block;
}

.dwell-check {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgb(255 255 255 / 18%);
  font-size: 1rem;
}

.dwell-pop .dwell-card {
  animation: dwell-pop 0.55s ease;
}

@keyframes dwell-pop {
  0% {
    transform: translateY(12px) scale(0.98);
  }
  60% {
    transform: translateY(-4px) scale(1.02);
  }
  100% {
    transform: none;
  }
}

@media (min-width: 640px) {
  .dwell-card p {
    display: block;
  }

  .dwell-meter {
    height: 6px;
  }
}

@media (max-width: 1023px) {
  body.has-cart {
    padding-bottom: 88px;
  }

  body.has-dwell {
    padding-bottom: 84px;
  }

  body.has-dwell.has-cart {
    padding-bottom: 160px;
  }

  .sticky-action {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
  }

  body.has-cart .dwell-dock {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .dwell-pop .dwell-card {
    animation: none;
  }
}
