.pixel-preferences {
  position: fixed;
  z-index: 90;
  inset: auto max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 5px 24px #231e221a;
}
.pixel-preferences h2 { margin: 0; font: 650 18px/1.3 var(--sans); }
.pixel-preferences p { margin: 8px 0 16px; font-size: 14px; color: var(--muted); }
.pixel-preferences a { text-decoration: underline; }
.pixel-preferences-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pixel-preferences-actions button { min-height: 44px; border: 1px solid var(--ink); border-radius: 24px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.pixel-preferences-actions button:hover { background: var(--tone); }
.pixel-preferences :focus-visible, .privacy-choice-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.privacy-choice-link { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }

@media (max-width: 767px) {
  .pixel-preferences:not([hidden]) {
    inset: auto 0 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title actions" "notice notice";
    align-items: center;
    gap: 2px 10px;
    width: 100dvw;
    max-height: 45dvh;
    padding: 4px max(12px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border: 0;
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 10px #231e2212;
  }
  .pixel-preferences h2 { grid-area: title; font-size: 14px; }
  .pixel-preferences p { grid-area: notice; margin: 0; font-size: 12px; line-height: 1.25; }
  .pixel-preferences-actions { grid-area: actions; gap: 6px; }
  .pixel-preferences-actions button {
    min-height: 44px; min-width: 62px; padding-inline: 8px; font-size: 13px;
  }
  body:has(> .pixel-preferences:not([hidden])) {
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }
  body.home:has(> .pixel-preferences:not([hidden])) .home-hero-image {
    max-width: max(146px, calc(100svh - 516px - env(safe-area-inset-bottom)));
    justify-self: center;
  }
}

@media (max-width: 767px) and (max-height: 720px) {
  body.home:has(> .pixel-preferences:not([hidden])) .home-hero-layout {
    gap: 10px;
    padding-block: 16px;
  }
  body.home:has(> .pixel-preferences:not([hidden])) .home-hero h1 { font-size: clamp(34px, 10vw, 46px); }
  body.home:has(> .pixel-preferences:not([hidden])) .home-hero-copy > p { margin-top: 8px; }
  body.home:has(> .pixel-preferences:not([hidden])) .home-hero-actions { margin-block: 12px 8px; }
  body.home:has(> .pixel-preferences:not([hidden])) .home-hero-actions .button { min-height: 44px; }
  body.home:has(> .pixel-preferences:not([hidden])) .home-hero-image {
    max-width: max(146px, calc(100svh - 475px - env(safe-area-inset-bottom)));
  }
}
