/* Sheets, toasts, the watch star, skeletons, freshness and the upcoming-release layout */
#sheet2 .s2-scrim { position: fixed; inset: 0; z-index: 34; background: #0009; opacity: 0; pointer-events: none; transition: opacity .25s; }
#sheet2 .s2 { position: fixed; z-index: 35; left: 50%; top: 50%; width: min(520px, calc(100% - 32px)); max-height: 86vh; overflow: auto; transform: translate(-50%, -46%) scale(.98); opacity: 0; pointer-events: none;
  background: var(--deep); border-radius: 20px; padding: var(--sp-5); box-shadow: 0 0 0 1px var(--line), 0 30px 60px #000c; transition: transform .25s var(--ease), opacity .2s; }
#sheet2[data-open] .s2-scrim { opacity: 1; pointer-events: auto; }
#sheet2[data-open] .s2 { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
/* the sheet close button (shared by every page's sheets) */
.pk-x { all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: var(--mute); background: var(--surface); }
.pk-x:focus-visible { box-shadow: 0 0 0 2px var(--text); }
#sheet2 .pk-x { position: absolute; top: 14px; right: 14px; }
#sheet2 .grab { display: none; }
#sheet2 h2 { font: 700 20px var(--f-big); letter-spacing: -.02em; padding-right: 40px; }
#sheet2 h3 { font: 600 13px var(--f-ui); color: var(--mute); margin: var(--sp-4) 0 var(--sp-2); }
#sheet2 .lead { color: var(--mute); font-size: 14px; margin: 4px 0 var(--sp-4); }
#sheet2 .fine { font-size: 12px; color: var(--faint); margin-top: var(--sp-3); }
.s2-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--sp-3); align-items: center; padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.s2-row:first-child { border-top: 0; }
.s2-row .n { font-weight: 600; } .s2-row .n small { display: block; font-weight: 400; font-size: 12px; color: var(--mute); }
.s2-row small.ok { color: var(--buy); } .s2-row small.hi { color: var(--wait); }
.s2-row .p { font-weight: 600; min-width: 70px; text-align: right; }
.s2-row.out .n, .s2-row.out .p { color: var(--faint); }
.s2-go { padding: 8px 12px; border-radius: 10px; background: var(--buy); color: var(--deep); font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; }
.s2-row.pre .s2-go { background: var(--fair); }
.s2-ghost, .linkbtn { all: unset; cursor: pointer; padding: 8px 12px; border-radius: 10px; background: var(--surface); font-weight: 600; font-size: 13px; color: var(--mute); white-space: nowrap; }
.linkbtn { padding: 0; background: none; color: #FFD27A; }
.s2-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mute); }
.s2-field input, .s2-field select { font: 600 16px var(--f-ui); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; box-sizing: border-box; }
.s2-money { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font: 700 22px var(--f-big); color: var(--mute); }
.s2-money input { border: 0; background: none; font: 700 22px var(--f-big); padding: 10px 0; }
.s2-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--sp-2); }
.s2-quick button { all: unset; cursor: pointer; padding: 6px 10px; border-radius: 99px; background: var(--surface); font-size: 12px; font-weight: 600; color: var(--mute); }
.s2-sw { display: flex; gap: var(--sp-3); align-items: flex-start; padding: 8px 0; cursor: pointer; }
.s2-sw input { width: 20px; height: 20px; accent-color: var(--buy); margin-top: 2px; flex: none; }
.s2-sw b { display: block; font-weight: 600; font-size: 14px; } .s2-sw small { color: var(--mute); font-size: 12px; }
.s2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.s2-step { display: flex; align-items: stretch; gap: 6px; }
.s2-step button { all: unset; cursor: pointer; width: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); font-size: 20px; font-weight: 700; }
.s2-step input { text-align: center; }
.s2-total { margin-top: var(--sp-3); font-size: 14px; color: var(--mute); } .s2-total b { color: var(--text); }
.s2-save { all: unset; cursor: pointer; display: block; text-align: center; margin-top: var(--sp-4); padding: 14px; border-radius: 14px; background: var(--buy); color: var(--deep); font-weight: 700; }
.meter { margin-top: var(--sp-3); font-size: 13px; color: var(--mute); }
#toast { position: fixed; z-index: 60; left: 50%; bottom: 32px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--deep); font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px #000a; transition: transform .25s var(--ease), opacity .2s; max-width: calc(100% - 32px); }
#toast[data-on] { transform: translate(-50%, 0); opacity: 1; }
/* watch star */
.star { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--mute); background: var(--surface); flex: none; transition: color .15s, transform .15s; }
.star[aria-pressed=true] { color: #FFD27A; }
.star:active { transform: scale(.9); }
.who .star { margin-left: var(--sp-2); }
/* freshness */
.fresh { font-size: 12px; color: var(--faint); font-weight: 400; }
.is .r small .fresh, .src .n small .fresh { color: var(--faint); }
/* thin data */
.thin { display: flex; gap: var(--sp-2); align-items: flex-start; margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-s); background: color-mix(in srgb, var(--wait) 9%, transparent); font-size: 13px; color: var(--text); position: relative; }
.thin svg { color: var(--wait); flex: none; margin-top: 1px; }
/* loading skeleton */
.skel { padding: var(--sp-5) var(--gut); }
.skel i { display: block; border-radius: 10px; background: linear-gradient(90deg, var(--surface) 0%, var(--raise) 50%, var(--surface) 100%); background-size: 200% 100%; animation: skel 1.1s linear infinite; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* upcoming release */
.countdown { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 10px; background: color-mix(in srgb, var(--fair) 14%, transparent); color: var(--fair); font-weight: 700; font-size: 13px; }
.upc-time { margin-top: var(--sp-5); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative; }
.upc-time::before { content: ''; position: absolute; left: 8px; right: 8px; top: 9px; height: 2px; background: var(--line); }
.upc-time .st { position: relative; padding-top: 26px; font-size: 13px; color: var(--mute); }
.upc-time .st::before { content: ''; position: absolute; top: 3px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); }
.upc-time .st.done::before { background: var(--fair); box-shadow: none; }
.upc-time .st.now::before { background: var(--text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 20%, transparent); }
.upc-time .st b { display: block; color: var(--text); font-weight: 600; }
.s2cta { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding: 9px 14px; border-radius: 12px; background: var(--raise); font-weight: 600; font-size: 14px; }
.s2cta.go { background: var(--buy); color: var(--deep); }
@media (max-width: 760px) {
  #sheet2 .s2 { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 88vh; transform: translateY(105%); opacity: 1; border-radius: 20px 20px 0 0; padding-top: var(--sp-3); }
  #sheet2[data-open] .s2 { transform: none; }
  #sheet2 .grab { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto var(--sp-3); }
  .s2-row { grid-template-columns: minmax(0, 1fr) auto; } .s2-row .s2-go, .s2-row .s2-ghost { grid-column: 1 / -1; text-align: center; }
  #toast { bottom: calc(150px + env(safe-area-inset-bottom)); }
  .upc-time { grid-template-columns: 1fr; gap: var(--sp-3); } .upc-time::before { left: 6px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; } .upc-time .st { padding: 0 0 0 26px; }
}
/* store rows are buttons now (they open Where to buy) but keep their row layout */
button.is { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-3); align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.instock button.is:first-child { border-top: 0; padding-top: 0; }
button.is:hover .p { text-decoration: underline; text-underline-offset: 3px; }

.s2-go.mkt { background: var(--raise); color: var(--text); }
#sheet2 h3 .fresh { text-transform: none; }

.s2-inl { width: 48px; font: 700 14px var(--f-ui); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; margin: 0 2px; }
#sheet2 .lockrow { grid-template-columns: 12px minmax(0, 1fr) auto auto; }

#toast[data-on] { pointer-events: auto; }

/* where to buy: trust pills, delivered price, dimmed offers you don't count */
.pill.trust { height: 24px; padding: 0 8px; gap: 5px; font-size: 11px; border-radius: 8px; vertical-align: 1px; margin-left: 4px; }
.pill.trust svg { flex: none; color: var(--text); }
.s2-row.of .p { display: flex; flex-direction: column; align-items: flex-end; } .s2-row.of .p small { font-size: 11px; color: var(--faint); font-weight: 500; white-space: nowrap; }
.s2-row.dim .n, .s2-row.dim .p b { opacity: .7; }
.s2-mode { all: unset; cursor: pointer; display: block; margin: var(--sp-2) 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: 13px; color: var(--mute); }
.s2-mode b { color: var(--text); font-weight: 600; } .s2-mode:hover { background: var(--raise); } .s2-mode:focus-visible { box-shadow: 0 0 0 2px var(--text); }
.s2-outs { margin-top: var(--sp-3); } .s2-outs summary { cursor: pointer; font-size: 14px; color: var(--mute); padding: var(--sp-2) 0; }
.s2-radios { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-4); }
.s2-radio { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3); border-radius: 12px; background: var(--surface); cursor: pointer; }
.s2-radio:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--buy); }
.s2-radio input { accent-color: var(--buy); width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.s2-radio b { display: block; font-weight: 600; } .s2-radio small { font-size: 13px; color: var(--mute); }

.s2-acts { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.s2-sub { font-size: 12px; font-weight: 600; color: var(--mute); text-align: center; text-decoration: none; padding: 4px; } .s2-sub:hover { color: var(--text); }
@media (max-width: 760px) { .s2-row .s2-acts { grid-column: 1 / -1; } }
.s2-speed { font-size: 13px; color: var(--mute); margin: -4px 0 var(--sp-2); }
.al-want small { font-size: 12px; color: var(--faint); }

/* your prices sheet */
.pr-bar { position: relative; height: 34px; margin: var(--sp-6) 0 var(--sp-5); border-radius: 10px; background: var(--surface); }
.pr-bar > span { position: absolute; top: 0; bottom: 0; } .pr-bar .z-buy { left: 0; background: color-mix(in srgb, var(--buy) 30%, transparent); border-radius: 10px 0 0 10px; }
.pr-bar .z-fair { background: color-mix(in srgb, var(--fair) 26%, transparent); } .pr-bar .z-wait { background: color-mix(in srgb, var(--wait) 16%, transparent); border-radius: 0 10px 10px 0; }
.pr-m { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--text); }
.pr-m.st { background: var(--buy); } .pr-m em { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font: 600 11px var(--f-ui); font-style: normal; color: var(--mute); white-space: nowrap; }
.pr-m.st em { top: auto; bottom: -20px; color: var(--buy); }
.pr-sl { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px var(--sp-3); margin-top: var(--sp-4); }
.pr-sl b { display: block; font-weight: 600; } .pr-sl small { font-size: 12px; color: var(--mute); }
.pr-sl output { font: 700 22px var(--f-big); letter-spacing: -.03em; }
.pr-sl input { grid-column: 1 / -1; width: 100%; height: 32px; accent-color: var(--buy); cursor: pointer; }
.pr-sl output.t-fair + input { accent-color: var(--fair); }
.pr-out { margin-top: var(--sp-4); padding: var(--sp-3); border-radius: 12px; background: var(--surface); font-size: 14px; color: var(--mute); }
.t-buy { color: var(--buy); } .t-fair { color: var(--fair); } .t-wait { color: var(--wait); } .t-bad { color: var(--bad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--buy); color: var(--deep); font: 700 10px var(--f-big); box-sizing: border-box; vertical-align: 1px; }
nav.bottom a { position: relative; } nav.bottom .nav-badge { position: absolute; top: 2px; left: 50%; margin-left: 6px; box-shadow: 0 0 0 2px var(--deep); }
@media (pointer: coarse), (max-width: 760px) { #toast .linkbtn { min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; margin: -12px 0; } }
/* audit (ui-ux-pro-max), round 2: every control in a sheet is a full 44px touch target */
@media (pointer: coarse), (max-width: 760px) {
  #sheet2 .pk-x, #upsell .pk-x { width: 44px; height: 44px; display: grid; place-items: center; }
  .s2-quick button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; box-sizing: border-box; }
  .s2-step button { min-width: 44px; min-height: 44px; }
  .s2 input[type=range] { height: 44px; }
  .s2-money, .s2-field input, .s2-field select { min-height: 44px; box-sizing: border-box; }
  .s2-ghost, .add-go { min-height: 44px; display: inline-flex; align-items: center; box-sizing: border-box; }
  .s2-inl { min-width: 52px; min-height: 44px; box-sizing: border-box; }
  .s2 .ranges button { min-height: 44px; min-width: 44px; }
}

@media (min-width: 761px) { #sheet2 .s2.s2-wide { width: min(760px, calc(100% - 48px)); } }

.n-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .n-name { font-weight: 600; }
.s2-row .n small { margin-top: 4px; }
.s2-row.out .store-mark { filter: grayscale(.6); opacity: .7; }
@media (pointer: coarse), (max-width: 760px) { .s2-go { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; } }

/* the collection sheet ("I have it") and card alerts, shared by Explore, Watch and Portfolio */
.co-list { list-style: none; margin: var(--sp-3) 0 0; padding: 0; }
.co-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.co-list li:first-child { border-top: 0; }
.co-g { font: 700 11px var(--f-big); padding: 6px 8px; border-radius: 8px; background: var(--raise); color: var(--mute); white-space: nowrap; }
.co-g.slab { background: color-mix(in srgb, #FFD27A 18%, var(--raise)); color: #FFD27A; }
.co-t { min-width: 0; } .co-t b { display: block; font-size: 14px; font-weight: 600; } .co-t small { font-size: 12px; color: var(--mute); }
.co-h { font: 700 14px var(--f-big); margin: var(--sp-4) 0 var(--sp-2); }
.co-chips { margin: 0; } .co-chips .chip[aria-checked=true] { background: var(--text); color: var(--deep); }
.co-chips .chip[aria-checked=true] b { color: var(--deep); }
.s2 > .s2-field + .s2-field { margin-top: var(--sp-3); }   /* stacked fields only: never inside a grid */
.s2-field[hidden] { display: none; }
.ca-rm { display: block; text-align: center; margin-top: var(--sp-2); }
@media (pointer: coarse), (max-width: 760px) { .co-chips .chip { height: 44px; } .co-list .linkbtn { min-height: 44px; display: inline-flex; align-items: center; } }

/* Add hub, add many cards, where to buy */
.co-hub { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.co-hub button { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 60px; padding: 8px 10px; border-radius: 14px; background: var(--surface); }
.co-hub button:hover { background: var(--raise); } .co-hub button:focus-visible { box-shadow: 0 0 0 2px var(--text); }
.co-hi { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--buy) 16%, transparent); color: var(--buy); }
.co-q { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; margin-top: var(--sp-3); border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--mute); }
.co-q input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: 500 16px var(--f-ui); color: var(--text); } .co-q:focus-within { box-shadow: inset 0 0 0 1.5px var(--text); }
.co-res, .co-tray { list-style: none; margin: var(--sp-2) 0 0; padding: 0; }
.co-res li, .co-tray li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 58px; border-top: 1px solid var(--line); }
.co-res li:first-child, .co-tray li:first-child { border-top: 0; }
.co-res img { width: 36px; height: 50px; object-fit: cover; border-radius: 4px; background: var(--raise); } .co-res img.co-pimg { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; box-sizing: border-box; }
.co-res .co-hint { display: block; min-height: 0; padding: 12px 0; font-size: 13px; color: var(--mute); }
.co-plus { all: unset; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font: 700 20px var(--f-big); color: var(--text); }
.co-plus.on { background: var(--buy); color: var(--deep); box-shadow: none; } .co-plus.on b { font-size: 15px; } .co-plus:focus-visible { box-shadow: 0 0 0 2px var(--text); }
.co-trayw { margin-top: var(--sp-3); padding-top: var(--sp-2); border-top: 1px solid var(--line); } .co-trayw[hidden] { display: none; }
.co-tray li { grid-template-columns: minmax(0, 1fr) auto auto; }
.co-tray select { font: 600 13px var(--f-ui); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; height: 44px; padding: 0 8px; max-width: 110px; }
.co-tray .s2-step { align-items: center; } .co-qn { min-width: 22px; text-align: center; font: 700 15px var(--f-big); }
.co-total { margin-top: var(--sp-3); }
.co-uw { margin-top: var(--sp-3); padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.co-buy { list-style: none; margin: var(--sp-3) 0 var(--sp-3); padding: 0; }
.co-buy li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; min-height: 64px; border-top: 1px solid var(--line); }
.co-buy li:first-child { border-top: 0; } .co-buy li > b { font: 700 16px var(--f-big); } .co-buy .pill { height: 20px; font-size: 10px; vertical-align: 1px; margin-left: 4px; }
@media (max-width: 760px) { .co-buy li { grid-template-columns: 28px minmax(0, 1fr) auto; } .co-buy li > .s2-go { grid-column: 2 / -1; justify-self: start; } }
.co-tray li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t t" "g q"; row-gap: 6px; padding: 10px 0; }
.co-tray .co-t { grid-area: t; } .co-tray select { grid-area: g; justify-self: start; max-width: 160px; } .co-tray .s2-step { grid-area: q; }
.co-tray .co-t b, .co-res .co-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .co-res .co-t small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 761px) { .co-tray li { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "t g q"; } }

/* Log a buy */
.lg-p { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; margin: var(--sp-3) 0 var(--sp-4); padding: 10px; border-radius: 14px; background: var(--surface); }
.lg-p img { width: 52px; height: 52px; object-fit: contain; border-radius: 10px; background: #fff; padding: 3px; box-sizing: border-box; }
.lg-p b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lg-p small { font-size: 12px; color: var(--mute); }
.lg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-3); align-items: start; }
.lg-grid .s2-field { margin: 0; min-width: 0; } .lg-grid .s2-field > span:first-child { font-weight: 600; }
.lg-grid .s2-step { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; }
.lg-grid .s2-step button, .lg-grid .s2-step input, .lg-grid .s2-money, .lg-grid input[type=date], .lg-grid select { height: 48px; min-height: 48px; box-sizing: border-box; }
.lg-grid .s2-step input { width: 100%; min-width: 0; text-align: center; font: 700 17px var(--f-big); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.lg-grid .s2-money { font-size: 17px; } .lg-grid .s2-money input { font-size: 17px; padding: 0; height: 100%; min-width: 0; width: 100%; }
.lg-grid input[type=date] { color-scheme: dark; padding: 0 10px; }
.lg-sum { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l b" "s p"; align-items: center; row-gap: 4px; margin-top: var(--sp-4); padding: 12px 14px; border-radius: 14px; background: var(--surface); }
.lg-sl { grid-area: l; font-size: 12px; font-weight: 600; color: var(--mute); } .lg-sum b { grid-area: b; font: 700 24px var(--f-big); letter-spacing: -.03em; text-align: right; }
.lg-sum small { grid-area: s; font-size: 12px; color: var(--mute); } .lg-sum .pill { grid-area: p; justify-self: end; }
/* I have it: copies */
.co-n { display: grid; grid-template-columns: 44px 72px 44px; gap: 6px; } .co-n button, .co-n input { height: 44px; box-sizing: border-box; }
.co-n input { text-align: center; font: 700 16px var(--f-big); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.co-more { display: block; text-align: center; margin: var(--sp-2) auto 0; min-height: 44px; }
/* Tick off a set */
.co-step { margin: 0 0 4px; font: 700 11px var(--f-big); letter-spacing: .08em; text-transform: uppercase; color: var(--fair); }
.co-back { display: inline-flex; align-items: center; min-height: 44px; margin: -6px 0 4px -8px; }
.co-sets { list-style: none; margin: var(--sp-3) 0 0; padding: 0; }
.co-sets button { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 72px minmax(0, 1fr) 56px; gap: 12px; align-items: center; min-height: 56px; padding: 6px 8px; border-radius: 12px; }
.co-sets button:hover { background: var(--surface); } .co-sets button:focus-visible { box-shadow: 0 0 0 2px var(--text); }
.co-sl img { display: block; max-width: 72px; max-height: 30px; object-fit: contain; }
.co-sets .co-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-mini { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; } .co-mini i { display: block; height: 100%; background: var(--buy); }
.co-rar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: var(--sp-3) 0 0; } .co-rar > * { flex: none; }
.co-tsbar { display: flex; justify-content: flex-end; margin: var(--sp-2) 0; } .co-tsbar .linkbtn { min-height: 44px; display: inline-flex; align-items: center; }
.co-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.co-tk { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 3px; border-radius: 9px; }
.co-tk img { width: 100%; height: auto; aspect-ratio: 200 / 279; border-radius: 6px; background: var(--raise); opacity: .55; transition: opacity var(--dur-1); }
.co-tk small { font-size: 11px; color: var(--mute); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-tkm { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--deep) 70%, transparent); color: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 50%, transparent); }
.co-tk[aria-pressed=true] img { opacity: 1; } .co-tk[aria-pressed=true] { box-shadow: inset 0 0 0 2px var(--buy); }
.co-tk[aria-pressed=true] .co-tkm { background: var(--buy); color: var(--deep); box-shadow: none; }
.co-tk.own { cursor: default; box-shadow: none; } .co-tk.own .co-tkm { background: var(--raise); color: var(--mute); }
.co-tk:focus-visible { box-shadow: 0 0 0 2px var(--text); }
.co-foot { position: sticky; bottom: calc(-1 * var(--sp-5)); z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin: var(--sp-4) calc(-1 * var(--sp-5)) calc(-1 * var(--sp-5)); padding: 12px var(--sp-5) calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--deep) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); }
.co-foot b { color: var(--text); } .co-foot .s2-go { min-height: 44px; display: inline-flex; align-items: center; border: 0; cursor: pointer; font: inherit; font-weight: 700; } .co-foot .s2-go[disabled] { opacity: .4; cursor: default; }
@media (prefers-reduced-motion: reduce) { .co-tk img { transition: none; } }
.co-own { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; color: var(--mute); } .co-own b { color: var(--text); } .co-own .co-mini { width: 48px; }
.co-sets button { grid-template-columns: 72px minmax(0, 1fr) auto; }

/* Log a buy: the price is the one thing you type, so it's big; the rest are settings-style rows with room to breathe */
.lg-price { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--mute); }
.lg-price .s2-money { min-height: 64px; padding: 0 16px; font-size: 28px; border-radius: 16px; }
.lg-price .s2-money input { font-size: 28px; padding: 0; min-width: 0; width: 100%; height: 62px; }
.lg-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 var(--sp-4); }
.lg-quick .chip { min-height: 40px; font-size: 13px; } .lg-quick .chip b { font-weight: 700; margin-left: 4px; }
.lg-rows { border-radius: 16px; background: var(--surface); padding: 0 14px; }
.lg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--text); }
.lg-row:first-child { border-top: 0; }
.lg-row .s2-step { display: grid; grid-template-columns: 44px 56px 44px; gap: 6px; }
.lg-row .s2-step button { height: 44px; } .lg-row .s2-step input { height: 44px; width: 100%; min-width: 0; text-align: center; font: 700 17px var(--f-big); color: var(--text); background: var(--deep); border: 1px solid var(--line); border-radius: 12px; box-sizing: border-box; -moz-appearance: textfield; }
.lg-row .s2-step input::-webkit-inner-spin-button { -webkit-appearance: none; }
.lg-row input[type=date], .lg-row select { width: auto; max-width: 62%; min-height: 44px; font: 600 15px var(--f-ui); color: var(--text); background: var(--deep); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; box-sizing: border-box; color-scheme: dark; }
.lg-sum { margin-top: var(--sp-4); padding: 14px 16px; }
.lg-sum b { font-size: 26px; }
#lgSave { width: 100%; box-sizing: border-box; min-height: 52px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.lg-row .s2-step button { background: var(--deep); box-shadow: inset 0 0 0 1px var(--line); }
.lg-price .s2-money input { color: var(--text); }
.lg-row > span:first-child { white-space: nowrap; } @media (max-width: 360px) { .lg-row .s2-step { grid-template-columns: 44px 44px 44px; } .lg-quick .chip { font-size: 12px; padding: 0 10px; } }

/* notes on a buy or a copy: a full-width box under the rows */
.lg-note, .s2-field textarea { display: block; }
.lg-note { margin-top: var(--sp-3); font-size: 14px; font-weight: 600; color: var(--mute); } .lg-note > span { display: block; margin-bottom: 6px; } .lg-note small { font-weight: 500; color: var(--faint); }
.lg-note textarea, .s2-field textarea { width: 100%; box-sizing: border-box; min-height: 64px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 15px/1.4 var(--f-ui); resize: vertical; }
.lg-note textarea:focus-visible, .s2-field textarea:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.lg-row input[type=text] { width: 62%; min-height: 44px; font: 600 15px var(--f-ui); color: var(--text); background: var(--deep); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; box-sizing: border-box; text-align: right; }
.co-ch { font-size: 12px; color: var(--faint); }
.s2-save { width: 100%; box-sizing: border-box; min-height: 52px; display: flex; align-items: center; justify-content: center; }   /* the main action in every sheet: full width, easy to reach */
.co-acts { display: flex; gap: 14px; flex: none; } .co-acts .linkbtn { min-height: 44px; display: inline-flex; align-items: center; }

/* the quieter actions under a form's main button: split, delete, remove */
.s2-sub { display: flex; flex-direction: column; gap: 8px; margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.s2-sub .s2-ghost, .s2-danger { all: unset; box-sizing: border-box; cursor: pointer; min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 14px; font-weight: 600; font-size: 15px; }
.s2-sub .s2-ghost { background: var(--surface); color: var(--text); }
.s2-danger { color: #FF8A7A; } .s2-danger:hover { background: color-mix(in srgb, #FF8A7A 10%, transparent); } .s2-danger[data-sure] { background: color-mix(in srgb, #FF8A7A 16%, transparent); }
.s2-sub button:focus-visible { box-shadow: 0 0 0 2px var(--text); }
.lg-split { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; font-weight: 600; }
.lg-split .s2-step { display: grid; grid-template-columns: 44px 52px 44px; gap: 6px; } .lg-split .s2-step button { height: 44px; background: var(--surface); }
.lg-split .s2-step input { height: 44px; width: 100%; text-align: center; font: 700 16px var(--f-big); color: var(--text); background: var(--deep); border: 1px solid var(--line); border-radius: 12px; box-sizing: border-box; }
.lg-split .s2cta { min-height: 44px; margin: 0 0 0 auto; padding: 0 18px; } .lg-split .s2cta.go { background: var(--buy); color: var(--deep); }

/* ---------- account: sign in, sync, the account sheet (sync.js) ---------- */
.acc { display: grid; gap: var(--sp-3); padding-top: var(--sp-2); text-align: left; }
.acc .s2-h { margin: 0; font: 700 22px/1.2 var(--f-big); letter-spacing: -.01em; }
.acc .s2-sub { margin: 0; text-align: left; color: var(--mute); font-size: 15px; line-height: 1.5; } .acc .s2-sub b { color: var(--text); font-weight: 600; }
.acc .s2-go { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 12px; background: var(--buy); color: var(--deep); font-weight: 700; font-size: 15px; }
.acc .s2-go:disabled { opacity: .6; cursor: progress; }
.acc-google { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border-radius: 12px; background: #fff; color: #1f1f1f; font-weight: 600; font-size: 15px; text-decoration: none; }
.acc-or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; color: var(--faint); font-size: 13px; }
.acc-or::before, .acc-or::after { content: ''; height: 1px; background: var(--line); }
.acc-form { display: grid; gap: 8px; } .acc-form label { font-size: 13px; font-weight: 600; color: var(--mute); }
.acc-form input, .acc-del input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); color: var(--text); font: 500 16px var(--f-ui); }
.acc-form input:focus-visible, .acc-del input:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.acc-code { letter-spacing: .4em; font-size: 24px !important; text-align: center; font-variant-numeric: tabular-nums; }
.acc-err { margin: 0; min-height: 1em; color: var(--bad); font-size: 14px; } .acc-err:empty { min-height: 0; }
.acc-fine { margin: 0; color: var(--faint); font-size: 13px; line-height: 1.5; }
.acc-links { display: flex; flex-wrap: wrap; gap: 4px 16px; } .acc-links button, .acc-alt { all: unset; cursor: pointer; color: var(--mute); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; display: inline-flex; align-items: center; }
.acc-links button:hover, .acc-alt:hover { color: var(--text); } .acc-links button:focus-visible, .acc-alt:focus-visible, .acc .s2-go:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.acc-acts { display: grid; gap: 6px; justify-items: start; } .acc-acts .s2-go { justify-self: stretch; margin-bottom: 4px; }
.acc-dl { margin: 0; display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--raise); }
.acc-dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; } .acc-dl dt { color: var(--mute); } .acc-dl dd { margin: 0; text-align: right; }
.acc-del { border-top: 1px solid var(--line); padding-top: var(--sp-3); } .acc-del summary { cursor: pointer; color: var(--bad); font-weight: 600; font-size: 14px; min-height: 32px; display: flex; align-items: center; }
.acc-del p { color: var(--mute); font-size: 14px; } .acc-del .acc-err { color: var(--bad); }
.acc-danger { all: unset; cursor: pointer; margin-top: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); font-weight: 700; display: inline-flex; align-items: center; }
.ab-acct { all: unset; box-sizing: border-box; cursor: pointer; height: 40px; min-width: 40px; padding: 0 14px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.ab-acct i, .acc-strip i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--buy); color: var(--deep); font-weight: 800; font-size: 13px; }
.ab-acct:has(i) { padding: 0 6px; } .ab-acct:focus-visible, .acc-strip:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.acc-strip { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; color: var(--mute); margin-bottom: var(--sp-4); }
.acc-strip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .acc-strip b { color: var(--text); font-weight: 600; }
.acc-strip em { font-style: normal; font-weight: 700; color: var(--buy); white-space: nowrap; } .acc-strip.on em { color: var(--mute); }
.sync-news { position: fixed; z-index: 61; left: 50%; bottom: 88px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--text); color: var(--deep); font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px #0008; transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2); }
.sync-news[data-on] { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.sync-news button { all: unset; cursor: pointer; padding: 8px 12px; border-radius: 10px; background: var(--deep); color: var(--text); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .sync-news { transition: none; } }
/* signed out on a page that is all about your own things: only the sign-up panel shows (sync.js gate) */
html.sh-gate main[data-personal] > :not(.acc-gate) { display: none !important; }
html.sh-hush #toast { display: none !important; }
.acc-gate { max-width: 560px; margin: clamp(32px, 10vh, 96px) auto; padding: 0 var(--sp-4); display: grid; gap: var(--sp-4); text-align: left; }
.acc-gate h1 { font: 700 clamp(28px, 5vw, 40px)/1.1 var(--f-big); letter-spacing: -.02em; }
.acc-gate > p { color: var(--mute); font-size: 17px; line-height: 1.55; } .acc-gate .eyebrow { color: var(--buy); }
.acc-gate-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: var(--sp-2); }
.acc-gate-go { all: unset; box-sizing: border-box; cursor: pointer; min-height: 52px; padding: 0 24px; border-radius: 14px; background: var(--buy); color: var(--deep); font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; }
.acc-gate-go:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.acc-gate .acc-fine a { color: var(--text); }
/* onboarding choices */
.acc-opts { display: grid; gap: 8px; }
.acc-opt { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 2px; padding: 14px 16px; min-height: 52px; border-radius: 12px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--dur-1), background var(--dur-1); }
.acc-opt b { font-weight: 600; font-size: 15px; } .acc-opt small { color: var(--mute); font-size: 13px; }
.acc-opt[aria-pressed=true] { background: color-mix(in srgb, var(--buy) 14%, var(--raise)); box-shadow: inset 0 0 0 2px var(--buy); }
.acc-opt:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.acc .eyebrow { margin: 0; }
.acc-money { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); }
.acc-money:focus-within { outline: 2px solid var(--text); outline-offset: 1px; }
.acc-money span { font: 700 22px var(--f-big); color: var(--mute); }
.acc-money input { all: unset; flex: 1; min-width: 0; font: 700 24px var(--f-big); color: var(--text); font-variant-numeric: tabular-nums; }
.acc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-chip { all: unset; cursor: pointer; padding: 8px 12px; min-height: 20px; border-radius: 99px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: 14px; }
.acc-chip:hover { box-shadow: inset 0 0 0 1px var(--mute); } .acc-chip:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.acc-fine a { color: var(--mute); text-underline-offset: 3px; }
/* the account button's picture (your Google photo, or your initial) */
.ab-acct img, .acc-strip img, .mbar-me img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; }
/* phones: a slim top bar with the mark and you; it slides away while you scroll down and comes back when you scroll up */
.mbar { display: none; }
@media (max-width: 760px) {
  .mbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 31; height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--gut) 0;
    background: var(--deep); border-bottom: 1px solid var(--line); transition: transform var(--dur-3) var(--ease-out); }
  .mbar.away { transform: translateY(-100%); }
  .mbar-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font: 700 15px var(--f-big); letter-spacing: -.01em; }
  .mbar-brand img { border-radius: 6px; }
  .mbar-me { all: unset; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
  .mbar-me img, .mbar-me i { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 2px var(--line); }
  .mbar-me i { display: grid; place-items: center; font-style: normal; background: var(--buy); color: var(--deep); font-weight: 800; font-size: 14px; }
  .mbar-in { all: unset; cursor: pointer; padding: 8px 14px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: 14px; }
  .mbar-me:focus-visible, .mbar-in:focus-visible, .mbar-brand:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) { .mbar { transition: none; } }

/* closed pop-ups are invisible AND out of reach: without this, a closed sheet's buttons stayed in the Tab order and in
   screen readers (it was only faded out). visibility waits for the closing fade, so the animation still plays. */
#sheet2:not([data-open]) .s2, #sheet2:not([data-open]) .s2-scrim, #upsell:not([data-open]) .up, #upsell:not([data-open]) .up-scrim,
.pk:not([data-open]), .pk-scrim:not([data-open]) { visibility: hidden; transition-property: transform, opacity, visibility; transition-delay: 0s, 0s, var(--dur-2); }
#sheet2[data-open] .s2, #upsell[data-open] .up, .pk[data-open] { visibility: visible; transition-delay: 0s; }
/* small text buttons and search fields: at least 24px to tap (WCAG 2.2), the typing area fills its box */
button.more, .linkbtn { min-height: 24px; display: inline-flex; align-items: center; }
.srch input, #pkQ { min-height: 44px; }
/* iPhone and iPad zoom the page into any text box under 16px when it's tapped (and the sheet then scrolls sideways):
   every box people type or pick in is 16px or more */
.lg-row input[type=date], .lg-row select, .lg-row input[type=text], .lg-note textarea, .s2-field textarea, #alFall { font-size: 16px; }

/* 16px or more, so iPhone and iPad don't zoom in when it's tapped */
.co-tray select { font-size: 16px; }
/* while a sheet or pop-up is open, the page behind it doesn't scroll (iPhone and iPad included), and scrolling to the
   end of a sheet doesn't carry on into the page */
html:has(#sheet2[data-open]), html:has(#upsell[data-open]), html:has(aside.sheet[data-open]) { overflow: hidden; }
html:has(#sheet2[data-open]) body, html:has(#upsell[data-open]) body, html:has(aside.sheet[data-open]) body { overflow: hidden; }
#sheet2 .s2, #upsell .up, aside.sheet { overscroll-behavior: contain; }
#sheet2 .s2 { overflow-x: hidden; }
