:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2d36;
  background: #f5f7f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7f8;
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: #1f6f68;
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  padding: 12px;
  color: #1f2d36;
  background: #fff;
}

textarea {
  resize: vertical;
}

label {
  display: block;
  margin: 16px 0 8px;
  font-weight: 600;
}

h2 {
  margin: 18px 0;
  font-size: 24px;
}

.app-shell {
  width: 100%;
  max-width: 720px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 16px calc(96px + env(safe-area-inset-bottom));
}

.hidden {
  display: none !important;
}

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

.store-card {
  padding: 20px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #1f6f68, #22323d);
}

.store-card h1 {
  margin: 8px 0;
  font-size: 24px;
  line-height: 1.35;
}

.eyebrow,
.muted {
  margin: 0;
  opacity: 0.85;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 16px 0;
}

.category-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.category-list button {
  flex: 0 0 auto;
  border: 1px solid #d8dee4;
  color: #39434d;
  background: #fff;
}

.category-list button[aria-pressed="true"] {
  border-color: #1f6f68;
  color: #1f6f68;
  background: #e9f4f2;
}

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

.product-card,
.panel,
.selection-item {
  overflow: hidden;
  border: 1px solid #e3e7eb;
  border-radius: 10px;
  background: #fff;
}

.product-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eef2f4;
}

.product-card-body,
.panel,
.selection-item {
  padding: 12px;
}

.product-card h3 {
  min-height: 44px;
  margin: 0;
  font-size: 16px;
  line-height: 22px;
}

.product-card p {
  margin: 8px 0;
  color: #68737d;
  font-size: 13px;
}

.product-price {
  color: #9a5a2c !important;
  font-weight: 700;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.product-card button,
.wide {
  width: 100%;
}

.detail-params {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
}

.detail-params dt {
  color: #68737d;
}

.detail-params dd {
  margin: 0;
}

.detail-gallery {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.detail-gallery img,
#detail-content > img {
  display: block;
  width: 100%;
  border-radius: 8px;
  background: #eef2f4;
}

.message {
  min-height: 24px;
  color: #68737d;
}

.field-error {
  min-height: 20px;
  margin: 4px 0 0;
  color: #b42318;
  font-size: 13px;
}

.secondary,
.back {
  color: #1f6f68;
  background: #edf4f3;
}

.selection-bar {
  position: fixed;
  right: max(16px, calc((100vw - 720px) / 2 + 16px));
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: max(16px, calc((100vw - 720px) / 2 + 16px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d8dee4;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(30 43 52 / 16%);
}

.selection-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.selection-item p {
  margin: 6px 0 0;
  color: #68737d;
  font-size: 13px;
}

.selection-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  background: #eef2f4;
}

.selection-item button {
  color: #b42318;
  background: #fff0ee;
}

.privacy-note {
  padding: 12px;
  border-radius: 8px;
  color: #684c12;
  background: #fff7df;
  font-size: 13px;
  line-height: 20px;
}

.success-panel {
  padding-top: 20vh;
  text-align: center;
}

.success-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: #fff;
  background: #1f6f68;
  font-size: 40px;
  line-height: 64px;
}

.bottom-spacer {
  height: 84px;
}

.site-footer {
  width: 100%;
  max-width: 720px;
  margin: -64px auto 0;
  padding: 0 16px calc(88px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px;
}

.site-footer a {
  color: #68737d;
  text-decoration: none;
}

@media (max-width: 360px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .product-grid {
    gap: 8px;
  }

  .product-card-body {
    padding: 10px;
  }
}
