:root {
  color-scheme: light dark;
  --ink: #071739;
  --muted: #64748b;
  --line: #dbe4ee;
  --surface: #ffffff;
  --page: #f7f9fc;
  --tile: #f1f5fa;
  --action: #10356f;
  --action-hover: #071739;
  --coral: #cf432f;
  --positive: #147a3d;
  --positive-soft: #e5f5eb;
  --coral-soft: #fff8f5;
  --coral-ink: #7e3828;
  --shadow: 0 8px 22px rgba(7, 23, 57, .05);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #edf4ff;
    --muted: #9eacc0;
    --line: #2a3850;
    --surface: #111b2a;
    --page: #0b1320;
    --tile: #ffffff;
    --action: #2556a6;
    --action-hover: #1d478d;
    --coral: #ff806c;
    --positive: #65d391;
    --positive-soft: #123624;
    --coral-soft: #351c1d;
    --coral-ink: #ffb3a7;
    --shadow: 0 8px 22px rgba(0, 0, 0, .32);
  }
}

* { box-sizing: border-box; }
html { background: var(--page); scroll-padding-top: 84px; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input { color: inherit; font: inherit; }
button, summary { cursor: pointer; }
h1, h2, h3, p { margin: 0; }

.topbar { position: sticky; z-index: 10; top: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(1180px, calc(100% - 32px)); min-height: 64px; margin: 0 auto; }
.brand { display: block; line-height: 0; }
.brand img { width: 142px; height: auto; mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { .brand img { mix-blend-mode: normal; } }

.wrap { display: grid; gap: 28px; width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 40px; }
.hero h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: -.02em; }
.hero p { max-width: 620px; margin-top: 12px; color: var(--muted); font-size: 17px; line-height: 1.5; }

.primary-button, .secondary-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border-radius: 13px; font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.primary-button { border: 1px solid var(--action); color: #fff; background: var(--action); }
.primary-button:hover { background: var(--action-hover); }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.link-button { padding: 0; border: 0; background: none; font-weight: 800; text-decoration: underline; }

.deals { display: grid; align-content: start; gap: 16px; min-height: 320px; }
.deals h2, .panel h2 { font-size: 22px; line-height: 1.25; }
.deals-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.place-change summary { list-style: none; width: max-content; margin-left: auto; }
.place-change summary::-webkit-details-marker { display: none; }
.place-change[open] { flex-basis: 100%; }
.place-change .place-form { margin-top: 12px; }

.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.deal-card { display: grid; grid-template-rows: 160px 1fr auto; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: var(--shadow); }
.deal-media { position: relative; display: grid; overflow: hidden; place-items: center; background: var(--tile); }
.deal-media img { width: 100%; height: 160px; padding: 10px 12px; object-fit: contain; mix-blend-mode: multiply; }
.deal-media b { position: absolute; top: 8px; left: 8px; max-width: calc(100% - 16px); padding: 4px 8px; overflow: hidden; border-radius: 999px; color: #fff; background: #cf432f; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.deal-copy { min-width: 0; padding: 13px 14px 10px; }
.deal-copy h3 { display: -webkit-box; overflow: hidden; font-size: 15px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow-wrap: anywhere; }
.deal-copy p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.deal-buy { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; padding: 11px 14px; border-top: 1px solid var(--line); }
.deal-price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; white-space: nowrap; }
.deal-price strong { font-size: 18px; }
.deal-price del { color: var(--muted); font-size: 12px; }
.deal-chain { color: var(--muted); font-size: 12px; font-weight: 700; }

.is-loading .deal-media, .is-loading .deal-copy span { background: var(--line); animation: pulse 1.4s ease-in-out infinite; }
.is-loading .deal-media { height: 160px; }
.is-loading .deal-copy span { display: block; height: 12px; margin-bottom: 8px; border-radius: 6px; }
.is-loading .deal-copy span:last-child { width: 60%; }
@keyframes pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .is-loading .deal-media, .is-loading .deal-copy span { animation: none; } html { scroll-behavior: auto; } }

.panel { display: grid; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: var(--shadow); }
.panel > p { max-width: 680px; color: var(--muted); line-height: 1.5; }
.store-links { display: flex; flex-wrap: wrap; gap: 10px; }
.note { color: var(--muted); font-size: 13px; line-height: 1.5; }
.message { padding: 11px 14px; border-radius: 13px; font-size: 14px; line-height: 1.45; }
.is-good { color: var(--positive); background: var(--positive-soft); }
.is-bad { color: var(--coral-ink); background: var(--coral-soft); }

.place-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.field { display: grid; flex: 1 1 220px; gap: 6px; font-size: 13px; font-weight: 700; }
.field input { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--page); font-weight: 400; font-size: 16px; }

.legal-wrap { width: min(840px, calc(100% - 32px)); }
.legal { display: block; color: var(--muted); line-height: 1.75; }
.legal h1, .legal h2, .legal h3, .legal strong { color: var(--ink); }
.legal h1 { font-size: clamp(28px, 5vw, 36px); line-height: 1.15; }
.legal h2 { margin: 40px 0 12px; font-size: 22px; line-height: 1.25; }
.legal h3 { margin: 28px 0 8px; font-size: 17px; line-height: 1.35; }
.legal p, .legal ul, .legal ol { margin: 0 0 16px; }
.legal ul, .legal ol { padding-left: 24px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--ink); font-weight: 700; }
.legal code { padding: 0 4px; border-radius: 4px; background: var(--page); font-size: 13px; overflow-wrap: anywhere; }
.legal .eyebrow { margin-bottom: 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.legal .legal-updated { margin-top: 12px; font-size: 14px; }
.legal-table { margin-bottom: 24px; overflow-x: auto; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.legal-table th, .legal-table td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-table th { color: var(--ink); font-weight: 800; }

.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.language-choice summary { cursor: pointer; text-decoration: underline; }
.language-choice[open] { flex-basis: 100%; text-align: center; }
.language-choice div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin-top: 10px; }

.footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; padding: 8px 16px 32px; color: var(--muted); font-size: 13px; }

@media (max-width: 480px) {
  .wrap { gap: 22px; padding-top: 22px; }
  .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .deal-card { grid-template-rows: 130px 1fr auto; }
  .deal-media img, .is-loading .deal-media { height: 130px; }
  .panel { padding: 18px; }
  .place-form .primary-button, .place-form .secondary-button { flex: 1 1 auto; }
}
