:root {
  color-scheme: light;
  --ink: #102b34;
  --teal: #006c77;
  --brand: #00a0af;
  --light: #e5f5f6;
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eaf2f3;
}
* { box-sizing: border-box; }
body { margin: 0; }
::selection { color: white; background: var(--teal); }
:focus-visible { outline: 3px solid #28b9ca; outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }

.phone { background: var(--ink); }
.camera, .home-indicator { display: none; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 63px;
  padding: 8px 15px;
  background: white;
}
.top img { display: block; width: clamp(126px, 47vw, 188px); height: auto; }
.cart, .clear {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-size: .81rem;
  font-weight: 720;
}
.cart:hover, .clear:hover { background: #00535d; }
.clear[hidden] { display: none; }
.catalog { padding: 16px 14px 26px; color: white; border-top: 3px solid var(--brand); }
h1 { font-size: 1.85rem; line-height: 1.08; letter-spacing: -.035em; }
.intro { margin: 6px 0 12px; color: #c8e1e5; font-size: .875rem; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  background: white;
}
.search svg { flex: none; fill: none; stroke: var(--teal); stroke-width: 1.8; }
.search input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); padding: 9px 0; }
.search:focus-within { outline: 3px solid #28b9ca; outline-offset: 2px; }
.search input:focus-visible { outline: none; }
.filters { display: flex; gap: 6px; margin: 9px 0 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #609ca4 transparent; padding: 3px; }
.filter { min-height: 44px; padding: 0 10px; border: 1px solid #5b9299; border-radius: 8px; background: transparent; color: #eefbfc; font-size: .77rem; font-weight: 700; white-space: nowrap; }
.filter:hover { background: #214b53; }
.filter[aria-pressed="true"] { background: var(--light); border-color: var(--light); color: #00535d; }
.results { color: #c8e1e5; margin: 7px 0; font-size: .75rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bundle { display: flex; flex-direction: column; position: relative; min-width: 0; overflow: hidden; border-radius: 12px; background: white; color: var(--ink); }
.photos { display: flex; align-items: center; justify-content: center; height: 100px; padding: 7px; gap: 2px; }
.photo { display: block; width: 49%; height: 100%; object-fit: contain; }
.photo:only-child { width: 85%; }
.bundle-copy { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 7px 30px 10px 10px; border-top: 1px solid #eaf0f1; }
.bundle h2 { overflow-wrap: anywhere; font-size: .9rem; line-height: 1.2; letter-spacing: -.015em; }
.bundle p { margin-top: auto; font-size: .73rem; color: #415b62; }
footer { background: white; padding: 12px 14px; font-size: .77rem; }
footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--teal); font-weight: 700; }

@media (min-width: 520px) {
  body { min-height: 100dvh; display: grid; place-items: center; padding: 14px 24px; background: radial-gradient(ellipse at 50% 33%, #faffff 10%, #e4eff0 72%); }
  .phone {
    position: relative;
    display: grid;
    grid-template-rows: 25px minmax(0, 1fr) 19px;
    width: min(414px, 100%);
    height: clamp(470px, calc(100dvh - 28px), 856px);
    border: 7px solid #171d23;
    border-radius: 42px;
    background: #11181e;
    box-shadow: 0 0 0 2px #6d7d85, 0 24px 65px #18333f38;
  }
  .phone::before, .phone::after { content: ""; position: absolute; background: #333e45; width: 4px; border-radius: 3px; }
  .phone::before { left: -11px; top: 118px; height: 57px; }
  .phone::after { right: -11px; top: 147px; height: 62px; }
  .screen { overflow-y: auto; overscroll-behavior-y: contain; background: var(--ink); scrollbar-width: thin; scrollbar-color: #6e9da4 var(--ink); }
  .camera, .home-indicator { display: grid; place-items: center; }
  .camera span { width: 66px; height: 13px; border-radius: 10px; background: #05090c; }
  .home-indicator::before { content: ""; width: 96px; height: 4px; border-radius: 3px; background: #a9b2b7; }
}

.bundle-open { display: flex; flex: 1; flex-direction: column; }
.bundle-open:focus-visible { outline-offset: -3px; }
.bundle-copy { padding-right: 49px; min-height: 61px; }
.qr-button {
  position: absolute;
  right: 3px;
  bottom: 3px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--light);
  color: var(--teal);
}
.qr-button:hover { background: var(--teal); color: white; }
.back { min-height: 44px; margin: 4px 12px; padding: 0 6px; border: 0; background: transparent; color: var(--teal); font-weight: 720; }
.qr-dialog { width: min(315px, calc(100% - 32px)); padding: 42px 17px 17px; text-align: center; border: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 14px 40px #142b3655; }
.qr-dialog::backdrop { background: #0c2128ad; }
.qr-dialog h2 { font-size: 1.15rem; }
.qr-dialog p { margin-top: 3px; font-size: .88rem; color: #415b62; }
.qr-dialog img { display: block; width: min(232px, 100%); height: auto; margin: 1px auto; image-rendering: pixelated; }
.close-qr { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; color: var(--teal); background: var(--light); font-size: 1.55rem; }

.web-preview {
  height: calc(100dvh - 1px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: white;
}
.web-preview[hidden] { display: none; }
.web-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 8px;
  padding: 0 9px;
  border-bottom: 1px solid #dce9eb;
  background: #f2f9f9;
}
.web-toolbar .back { margin: 2px 0; }
.web-fallback { display: inline-flex; align-items: center; min-height: 44px; gap: 4px; color: var(--teal); font-size: .78rem; font-weight: 700; }
.web-fallback:hover { text-decoration: underline; }
.web-preview iframe { width: 100%; height: 100%; border: 0; }
@media (min-width: 520px) {
  .web-preview { height: 100%; }
}
