/* NFA Wishlist share page. Phone-first; neutral black/white; cards match the extension popup. */
:root {
  /* Chrome's default palette, matching the extension popup */
  --ink: #202124;
  --muted: #5f6368;
  --line: #dadce0;
  --bg: #f1f3f4;
  --card: #ffffff;
  --placeholder: #686d72; /* ≥4.5:1 on the page and on cards */
  --brand-soft: #9aa0a6;
  --btn: #202124;
  --on-btn: #ffffff;
  --hover: rgba(32, 33, 36, .06);
  --badge-bg: rgba(255, 255, 255, .94);
  --shadow: 0 1px 2px rgba(60, 64, 67, .2), 0 2px 8px rgba(60, 64, 67, .12);
  --head-shadow: 0 2px 8px rgba(60, 64, 67, .12);
  --toast-bg: #202124;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaed;
    --muted: #bdc1c6;
    --line: #3c4043;
    --bg: #202124;
    --card: #35363a;
    --placeholder: #9aa0a6;
    --brand-soft: #9aa0a6;
    --btn: #e8eaed;
    --on-btn: #202124;
    --hover: rgba(232, 234, 237, .08);
    --badge-bg: rgba(53, 54, 58, .94);
    --shadow: 0 1px 3px rgba(0, 0, 0, .5), 0 4px 14px rgba(0, 0, 0, .35);
    --head-shadow: 0 2px 10px rgba(0, 0, 0, .5);
    --toast-bg: #3c4043;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
}
a { color: inherit; }
button { font: inherit; cursor: pointer; color: inherit; }

/* Header: sticks to the top; hairline + shadow once the cards scroll under it */
.head {
  position: sticky; top: 0; z-index: 10; background: var(--bg);
  border-bottom: 1px solid transparent; transition: box-shadow .15s, border-color .15s;
}
.head.scrolled { border-bottom-color: var(--line); box-shadow: var(--head-shadow); }
.top, .wrap-x, .wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.top { padding-top: 14px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { display: block; width: 28px; height: 28px; }
/* Logo: NFA = white on black square, WISHLIST = black on white square (same in both modes), flush together */
.logo { font-weight: 800; letter-spacing: .5px; background: #111; color: #fff; padding: 2px 8px; font-size: 14px; line-height: 1.4; border: 1px solid #111; }
.brand-name { font-weight: 700; font-size: 14px; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; background: #fff; color: #111; padding: 3px 9px; margin-left: -8px; }

.intro { padding-top: 8px; padding-bottom: 12px; }
.title-row { display: flex; align-items: center; gap: 2px; }
.title { flex: 1; min-width: 0; margin: 0; font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
.explainer { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; max-width: 62ch; }

/* Header icon buttons: no circle until hover */
.icon {
  width: 36px; height: 36px; display: grid; place-items: center; padding: 0; flex: none;
  border: 0; border-radius: 50%; background: none; color: var(--ink);
}
.icon:hover, .icon[aria-expanded="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.icon:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

.rename { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-width: 420px; font-size: 14px; font-weight: 600; }

.wrap { flex: 1; padding-top: 12px; padding-bottom: 32px; }
.state { color: var(--muted); padding: 24px 0; margin: 0; }

/* Cards: 2 columns on phones, more on wider screens */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; align-items: start; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { min-width: 0; display: flex; flex-direction: column; }
.card.dragging { opacity: .35; }
.owner .card { cursor: grab; }
.media {
  position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden;
  background: var(--card); box-shadow: var(--shadow);
}
.media-link { position: absolute; inset: 0; cursor: pointer; -webkit-user-drag: none; }
.owner .media-link { cursor: grab; }
.media-link:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; border-radius: 14px; }
.img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 12px; text-align: center; color: var(--muted); font-size: 13px;
}
.noimg-store { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
/* Amazon item card (Figma "NFA card", 262×324): grey card, Sean's scribble + NFA mark cropped by the
   card, "no Amazon links" badge, links to Etsy / other shops. Sizes scale with the card (cqw = % of
   card width), so it looks the same in the popup, side panel and website. Fixed light colors in both
   themes, like a photo. */
.media { container-type: inline-size; }
.alt { position: absolute; inset: 0; background: #ebebeb; color: #000; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; }
.alt-art { position: absolute; left: -76.8%; top: -16.25%; width: 314.5%; height: auto; max-width: none; pointer-events: none; user-select: none; }
.alt-badge {
  position: absolute; left: 50%; top: 65.1%; transform: translateX(-50%); white-space: nowrap;
  background: #000; color: #fff; font-size: 6.49cqw; line-height: 1.24; padding: 1.53cqw 3.05cqw;
}
.alt-etsy, .alt-web { position: absolute; top: 81.2%; color: #000; font-size: 6.1cqw; line-height: 1.2; text-decoration: none; white-space: nowrap; font-weight: 500; }
.alt-etsy { left: 5.73%; }
.alt-web { right: 8%; }
.alt .u { text-decoration: underline; }
.alt a:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.badge {
  position: absolute; left: 8px; top: 8px; background: var(--badge-bg); color: var(--ink);
  border: 1px solid var(--line); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}

/* Hover overlay (always on for touch screens, which can't hover) */
.overlay {
  position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .15s;
  background: linear-gradient(to bottom, transparent 55%, rgba(0, 0, 0, .55));
}
/* The overlay never catches clicks itself (the photo link underneath does); only its buttons do. */
.ov-btn { pointer-events: none; }
.media:hover .overlay, .media:focus-within .overlay, .card.menu-open .overlay { opacity: 1; }
.media:hover .ov-btn, .media:focus-within .ov-btn, .card.menu-open .ov-btn { pointer-events: auto; }
@media (hover: none) {
  .overlay { opacity: 1; background: none; }
  .ov-btn { pointer-events: auto; }
  .ov-store { display: none; }
}
.card.dragging .overlay { opacity: 0; }
.ov-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; padding: 0;
  background: rgba(40, 36, 32, .72); color: #fff; cursor: pointer;
}
.ov-btn:hover, .ov-btn[aria-expanded="true"] { background: rgba(40, 36, 32, .9); }
.ov-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.del { position: absolute; top: 8px; right: 8px; }
.ov-bottom { position: absolute; left: 10px; right: 8px; bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ov-bottom .more { margin-left: auto; }
.ov-store { color: #fff; font-weight: 700; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.card.claimed .ov-store { display: none; }

/* Text lines; click to edit on the owner's edit link */
.txt { padding: 8px 2px 0; display: flex; flex-direction: column; gap: 1px; }
.t-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-desc { font-size: 13.5px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-price { font-size: 15px; font-weight: 700; }
.friend .t-desc:empty, .friend .t-price:empty { display: none; }
.owner .txt > div { border-radius: 4px; padding: 0 3px; margin: 0 -3px; cursor: text; outline: none; }
.owner .txt > div:hover { background: var(--hover); }
.owner .txt > div:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.owner .txt > div:empty::before { content: attr(data-placeholder); color: var(--placeholder); font-weight: 400; }
.txt > .editing { background: var(--card); box-shadow: 0 0 0 2px var(--ink); white-space: normal !important; display: block !important; }

/* Buttons: pills */
.pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px;
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.pill-solid { background: var(--btn); color: var(--on-btn); border-color: var(--btn); }
.pill-ghost:hover { background: var(--hover); }
.pill-solid:hover { filter: brightness(1.15); }
.pill:disabled { opacity: .6; cursor: default; }
.pill:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ink); }
/* Friends' purchase buttons: small white pills */
.pill-small { min-height: 30px; padding: 4px 12px; font-size: 13px; }
.buy, .unbuy { align-self: flex-start; margin-top: 8px; }
.buy:hover, .unbuy:hover { background: var(--hover); }
/* "✓ I gifted/own this": a "Click to undo" tooltip on hover or keyboard focus (the button's
   aria-label says it too). Phones can't hover, so they show a small underlined "Undo" instead. */
.unbuy { position: relative; gap: 6px; }
.unbuy-touch { display: none; text-decoration: underline; }
.tip {
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translate(-50%, 2px);
  background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; line-height: 1.3;
  padding: 4px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .12s, transform .12s; z-index: 5;
}
.tip::after { /* little arrow */
  content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink);
}
.unbuy:hover .tip, .unbuy:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); transition-delay: .25s; }
@media (hover: none) {
  .unbuy-touch { display: inline; }
  .tip { display: none; }
}
.section-h { font-size: 18px; font-weight: 700; margin: 40px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.row-end { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* Rename input */
#renameInput {
  font: inherit; font-size: 16px; /* 16px stops iOS zooming in */
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); width: 100%;
}
#renameInput:focus { outline: none; box-shadow: 0 0 0 2px var(--ink); }

/* "Did you buy it?" prompt (bottom sheet) */
.ask {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 45;
  width: min(460px, calc(100% - 24px)); display: flex; gap: 12px; align-items: center;
  padding: 12px; border-radius: 18px; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 12px 36px rgba(0, 0, 0, .22);
}
.ask-img { width: 64px; height: 80px; object-fit: cover; border-radius: 10px; flex: none; background: var(--bg); }
.ask-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ask-text { margin: 0; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.ask-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Claimed: greyed out for friends (the person who marked it can still Undo) */
.card.claimed .media img, .card.claimed .noimg { filter: grayscale(1); opacity: .45; }
.card.claimed .txt > div { color: var(--muted); } /* faded but still ≥4.5:1 (was opacity, which failed contrast) */

/* Menus */
.menu {
  position: fixed; z-index: 40; min-width: 200px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-radius: 999px;
  padding: 9px 12px; color: var(--ink); font-size: 14.5px; text-align: left;
}
.menu-item svg { color: var(--muted); flex: none; }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); outline: none; }
.menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.menu-hint { color: var(--placeholder); margin-left: -4px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 18px 16px 28px; text-align: center; color: var(--muted); font-size: 13px; }
.foot p { margin: 0 auto; max-width: 60ch; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px);
  padding: 10px 10px 10px 18px; border-radius: 16px; background: var(--toast-bg); color: #fff;
  font-size: 14.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.toast-msg { min-width: 0; }
.toast-undo { background: none; border: 0; padding: 4px 6px; border-radius: 999px; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; flex: none; }
.toast-close { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; background: none; border: 0; border-radius: 50%; color: inherit; flex: none; }
.toast-undo:hover, .toast-close:hover { background: rgba(255, 255, 255, .12); }

/* Tagline next to the logo */
.tagline { margin-left: 4px; font-size: 10px; letter-spacing: .02em; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---- Accessibility ---- */
/* Text only screen readers hear (announcements). */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Editable lines on the owner's page are at least 24px tall (touch target size). */
.owner .t-name, .owner .t-price { line-height: 24px; }
/* ≥24px tall target, text centred (same as the extension) */
.owner .txt > .t-desc { padding-top: calc(20px - 1.35em); padding-bottom: 0; border-bottom: 4px solid transparent; } /* beats .owner .txt > div padding; border, not padding, so a clamped 3rd line can't peek out */
/* Friends: same rhythm as the editable views (~7px between name, description and price) */
.friend .t-desc { margin-top: 2px; }
.friend .t-price { margin-top: 4px; }
/* Respect "reduce motion": no fades, slides or smooth scrolling. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---- Home page, privacy, terms ---- */
.brand-link { color: inherit; text-decoration: none; width: fit-content; }
.brand-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
.foot-links { display: flex; justify-content: center; gap: 18px; margin-top: 10px; }
.foot-links a { color: var(--muted); }
.foot-links a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: none; }

.prose, .landing { line-height: 1.6; font-size: 16px; }
.prose > *, .landing > * { max-width: 68ch; } /* readable line length, left-aligned with the logo */
.prose { padding-top: 16px; padding-bottom: 48px; }
.prose h1, .landing-title { font-size: 32px; line-height: 1.15; margin: 8px 0 6px; letter-spacing: -.01em; }
.prose h2, .landing h2 { font-size: 20px; line-height: 1.3; margin: 32px 0 8px; }
.prose h3 { font-size: 16px; margin: 20px 0 4px; }
.prose p, .landing p { margin: 0 0 12px; }
.prose ul, .steps { margin: 0 0 12px; padding-left: 22px; }
.prose li, .steps li { margin: 6px 0; }
.prose a, .landing a { color: var(--ink); }
.meta { color: var(--muted); font-size: 14px; }

.landing { padding: 24px 0 40px; }
/* Headline: 70px on a 390px phone up to 150px at 1440px (Sean's Figma, Nov 21) */
.landing-title { font-size: clamp(56px, calc(40px + 7.62vw), 150px); margin-top: 12px; font-weight: 800; letter-spacing: -.03em; line-height: .8; }
@media (max-width: 640px) { .landing-title { line-height: 1; } }
.landing-sub { font-size: clamp(20px, 3.5vw, 28px); font-weight: 700; letter-spacing: .12em; line-height: 1.3; margin: 12px 0 0 !important; }
.br-phone { display: none; }
@media (max-width: 640px) { .br-phone { display: inline; } }
.landing-lead { font-size: 18px; color: var(--muted); margin-top: 12px !important; }
.landing-cta { margin: 20px 0 8px !important; }
.pill-static { cursor: default; }
.pill-static:hover { filter: none; }

/* ---- Optional Google sign-in (auth.js): header account, home-page link ---- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { min-width: 0; }
.account { flex: none; display: flex; align-items: center; }
.text-link {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0; background: none; border: 0;
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.text-link:hover { text-decoration-thickness: 2px; }
.text-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.avatar-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--muted); color: var(--card);
  font: inherit; font-size: 14px; font-weight: 700;
}
.avatar-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.menu-info { padding: 8px 12px 6px; font-size: 12.5px; color: var(--muted); max-width: 260px; overflow-wrap: anywhere; }
.landing-mine { font-size: 16px; color: var(--muted); }
.landing-mine .text-link { font-size: 16px; }

/* ---- Note + shipping address (migration 007) ---- */
.details { display: grid; gap: 12px; margin: 0 0 22px; max-width: 640px; }
.note-text { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.ship { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); }
.ship-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; min-height: 48px; }
.ship-toggle {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 0;
  background: none; border: 0; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer;
}
.ship-icon { display: grid; place-items: center; color: var(--muted); flex: none; }
.ship-icon svg { display: block; width: 18px; height: 18px; }
.ship-copy { flex: none; }
.ship-chev {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; padding: 0;
  background: none; border: 0; border-radius: 50%; color: var(--ink); cursor: pointer;
}
.ship-chev svg, .addr-toggle .chev { display: block; width: 22px; height: 22px; transform-origin: 50% 50%; transition: transform .15s; }
.ship-chev.open svg, .addr-toggle.open .chev { transform: rotate(180deg); }
.ship-chev:hover { background: var(--hover); }
.ship-toggle:focus-visible, .ship-chev:focus-visible, .addr-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
.ship-body { padding: 0 16px 14px 42px; display: grid; gap: 8px; justify-items: start; font-size: 15px; }
.ship-body address { font-style: normal; white-space: pre-line; overflow-wrap: anywhere; }
.ship-muted { margin: 0; color: var(--muted); font-size: 14px; }

/* Owner editor */
.details-form { display: grid; gap: 12px; }
.edit-block { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; display: grid; gap: 10px; }
.edit-h { font-size: 14px; font-weight: 600; color: var(--ink); }
.edit-h .opt { font-weight: 400; color: var(--muted); }
.details-form textarea {
  width: 100%; resize: vertical; font: inherit; font-size: 15px; line-height: 1.45; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
.details-form textarea::placeholder { color: var(--placeholder); }
.details-form textarea:focus { outline: none; box-shadow: 0 0 0 2px var(--ink); border-color: transparent; }
.vis { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.vis label { display: flex; align-items: center; gap: 8px; min-height: 24px; cursor: pointer; }
.vis input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
.addr-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 2px 0;
  background: none; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.addr-toggle .chev { margin-left: auto; flex: none; }
.addr-panel { display: grid; gap: 10px; }
.details-actions { display: flex; gap: 18px; align-items: center; }
@media (prefers-reduced-motion: reduce) { .ship-chev svg, .addr-toggle .chev { transition: none; } }

/* Share toast: message + the link (selectable in one click) + copy button; stays until closed */
.toast-text { min-width: 0; display: grid; gap: 2px; }
.toast-url {
  font-size: 12.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: all; -webkit-user-select: all; cursor: text;
}
.toast-copy {
  width: 30px; height: 30px; display: grid; place-items: center; flex: none; padding: 0;
  background: none; border: 0; border-radius: 50%; color: inherit; cursor: pointer;
}
.toast-copy:hover { background: rgba(255, 255, 255, .12); }
.toast-copy:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.toast.has-url .toast-msg { white-space: normal; }

/* ---- Owner: ⋯ → Add item (blank card at the top) ---- */
.new-card { gap: 10px; }
.new-media { display: grid; }
.new-media .img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.new-photo {
  position: relative; z-index: 1; display: grid; place-items: center; align-content: center; gap: 6px;
  margin: 10px; border: 2px dashed var(--line); border-radius: 10px; color: var(--muted);
  font-size: 14px; font-weight: 600; cursor: pointer; text-align: center; padding: 10px;
}
.new-photo:hover { border-color: var(--muted); color: var(--ink); }
.new-photo-icon { font-size: 30px; font-weight: 300; line-height: 1; }
.new-photo.has-photo { align-self: end; margin: 0 10px 10px; border: 0; padding: 6px 12px; justify-self: center;
  background: var(--badge-bg); color: var(--ink); border-radius: 999px; box-shadow: var(--shadow); }
.new-photo.has-photo .new-photo-icon { display: none; }
.new-photo-off { cursor: default; }
input#niPhoto:focus-visible + .new-photo { outline: 2px solid var(--ink); outline-offset: 2px; }
.new-form { display: grid; gap: 8px; }
.new-field { display: grid; gap: 3px; }
.new-field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.new-field input, .new-field textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; resize: vertical;
}
.new-field input::placeholder { color: var(--placeholder); }
.new-field input:focus, .new-field textarea:focus { outline: none; box-shadow: 0 0 0 2px var(--ink); border-color: transparent; }
.new-error { margin: 0; font-size: 13px; color: var(--ink); font-weight: 600; }
.new-actions { display: flex; gap: 18px; align-items: center; }
.text-link[disabled] { opacity: .55; cursor: default; }

/* No photo: Sean's raven on a soft grey box, shop name under it (Amazon items keep their own card on top) */
:root { --noimg-bg: #e8eaed; }
@media (prefers-color-scheme: dark) { :root { --noimg-bg: #3c4043; } }
.noimg { background: var(--noimg-bg); }
.noimg-mark { width: 24%; min-width: 30px; max-width: 56px; height: auto; display: block; }
.noimg-store { font-weight: 600; color: var(--muted); }

.new-price { display: flex; gap: 6px; }
.new-price select { flex: none; }
.new-price input { flex: 1; min-width: 0; }

/* Gift delivery: phone + notes under the address */
.ship-line { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.addr-panel .new-field input, .addr-panel .new-field textarea { font-size: 15px; }
.new-field label .opt { font-weight: 400; }

/* Phones: the tagline moves to its own line under the logo instead of being cut off */
@media (max-width: 560px) {
  .brand { flex-wrap: wrap; row-gap: 2px; }
  .tagline { flex-basis: 100%; margin-left: 36px; white-space: normal; overflow: visible; font-size: 11px; }
}
/* Toasts size to their text (up to the screen width) instead of being squeezed from the middle */
.toast { width: max-content; }

/* ---- Dropdown standard (every <select>, site + extension; keep both copies the same) ----
   Our own chevron 12px from the right edge (the browser's arrow hugs the border), 36px right padding
   so text never runs under it, same height/border/radius/focus ring as text fields. */
select {
  -webkit-appearance: none; appearance: none;
  font: inherit; font-size: 14px; line-height: 1.3; color: var(--ink);
  min-height: 36px; padding: 7px 36px 7px 12px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px;
}
@media (prefers-color-scheme: dark) {
  select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bdc1c6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
}
select:hover { border-color: var(--muted); }
select:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ink); border-color: transparent; }
select:disabled { opacity: .55; cursor: default; }
.landing-sign { font-weight: 600; margin-top: 4px; }
.landing-sign::before { content: "— "; }

/* Photos: the box takes the photo's own shape (set by fitPhoto() when it loads), between 2:3 and 16:10,
   so photos fill it with little or no cropping and no bars. No-photo / Amazon cards keep 4:5. */

/* ---- Amazon cards: on hover a muted grey card, scribbles fade to 20%, links turn white (nothing covers
   them); delete button top right, no ⋯ menu; name + description crossed out (still readable) and locked ---- */
.alt, .alt-scribble, .alt-etsy, .alt-web { transition: background-color .15s, opacity .15s, color .15s; }
.media:hover .alt, .media:focus-within .alt { background: #5f6368; }
.media:hover .alt-scribble, .media:focus-within .alt-scribble { opacity: .2; }
.media:hover .alt-etsy, .media:hover .alt-web, .media:focus-within .alt-etsy, .media:focus-within .alt-web { color: #ffffff; }
.media:hover .alt a:focus-visible, .media:focus-within .alt a:focus-visible { outline-color: #ffffff; }
.card.amazon .overlay { background: none; }
.card.amazon .ov-store { display: none; }
.card.amazon .ov-bottom { top: 8px; bottom: auto; left: auto; right: 50px; }
.card.amazon .ov-btn { background: #ffffff; color: #111111; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.card.amazon .ov-btn:hover, .card.amazon .ov-btn[aria-expanded="true"] { background: #e8eaed; }
.card.amazon .ov-btn:focus-visible { outline-color: #ffffff; }
.card.amazon .t-name, .card.amazon .t-desc { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--muted); cursor: default; }
@media (prefers-reduced-motion: reduce) { .alt, .alt-scribble, .alt-etsy, .alt-web { transition: none; } }

/* ---- Save / Cancel standard (every form, site + extension; keep both copies the same) ----
   Right-aligned: [Cancel] [Save], Save on the far right. Save = round pill, card colour (white) with a light grey outline;
   Cancel = underlined text link. Text boxes are rounded rectangles (8px), never pills. */
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn-save {
  display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 18px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-save:hover { border-color: var(--muted); }
.btn-save:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn-save:disabled { opacity: .55; cursor: default; }

/* Home page screenshots under "How it works" */
/* Desktop: side by side at the same height (flex-grow = each image's width/height ratio), using the
   full page width up to 1000px. Phones: stacked, the tall panel shot kept narrow. */
.shots { display: flex; align-items: flex-start; gap: 20px; margin: 24px 0 8px; max-width: 1000px; }
.shot { margin: 0; min-width: 0; }
.shot-tall { flex: 0.613 1 0; }
.shot-wide { flex: 1.131 1 0; }
@media (max-width: 640px) {
  .shots { flex-direction: column; gap: 24px; }
  .shot-tall { width: min(100%, 300px); flex: none; }
  .shot-wide { width: 100%; flex: none; }
}
.shot img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0,0,0,.08); background: var(--card); }
.shot figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
