/* CardBinder — stile "da collezionista". Mobile-first, tema chiaro/scuro, font di sistema (nessun download). */

:root {
    --bg: #f3f4fa;
    --bg-glow: rgba(91, 91, 240, .10);
    --surface: #ffffff;
    --surface-2: #eceef8;
    --text: #13152a;
    --muted: #5a5f7a;
    --border: #dfe2f0;
    --accent: #2f55e0;
    --accent-2: #8b5cf6;
    --accent-text: #ffffff;
    --accent-soft: rgba(47, 85, 224, .10);
    --gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    /* Pulsanti: sempre saturi, con testo bianco leggibile anche nel tema scuro. */
    --button-gradient: linear-gradient(135deg, #3355e8 0%, #7c4dff 100%);
    --up: #12804a;
    --down: #c0362c;
    --chart: #2f55e0;
    --chart-fill: rgba(47, 85, 224, .12);
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(19, 21, 42, .05), 0 4px 16px rgba(19, 21, 42, .06);
    --shadow-lift: 0 10px 30px rgba(19, 21, 42, .16);
    --header-bg: rgba(255, 255, 255, .78);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0c15;
        --bg-glow: rgba(120, 110, 255, .14);
        --surface: #141627;
        --surface-2: #1c1f34;
        --text: #eceefb;
        --muted: #9a9fbd;
        --border: #262a44;
        --accent: #8ea6ff;
        --accent-2: #c3a4ff;
        --accent-text: #0b0c15;
        --accent-soft: rgba(142, 166, 255, .14);
        --up: #5fd690;
        --down: #ff8a80;
        --chart: #8ea6ff;
        --chart-fill: rgba(142, 166, 255, .16);
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 18px rgba(0, 0, 0, .25);
        --shadow-lift: 0 14px 34px rgba(0, 0, 0, .55);
        --header-bg: rgba(11, 12, 21, .72);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* Footer sempre in fondo, anche con poco contenuto. */
body {
    margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
    background: radial-gradient(1200px 500px at 10% -10%, var(--bg-glow), transparent 70%) no-repeat, var(--bg);
    color: var(--text);
    font: 16px/1.55 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; font-weight: 750; }
h1 { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.4rem); margin: .4em 0 .5em; }
h2 { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); margin: 1.8em 0 .7em; }
h1:focus { outline: none; }

img { max-width: 100%; height: auto; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 28px; } }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: .875rem; }
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--muted); max-width: 60ch; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: -9999px; top: 8px; }
.skip-link:focus { left: 8px; z-index: 1000; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-sm); }

/* Intestazione: fissa in alto, semitrasparente. */
.site-header {
    position: sticky; top: 0; z-index: 800;
    background: var(--header-bg); border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
}
.header-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav lang" "search search search";
    align-items: center;
    gap: 8px 16px;
    padding-top: 10px;
    padding-bottom: 10px;
}
.brand { grid-area: brand; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.main-nav { grid-area: nav; display: flex; gap: 4px; }
.main-nav a { color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.main-nav a.active { color: var(--accent); background: var(--accent-soft); }
.lang-switch { grid-area: lang; }
.lang-switch a { display: inline-block; padding: 8px 10px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.lang-switch a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-header .search-form { grid-area: search; }

/* Telefoni (anche quelli "larghi", ~430px): nome, menu e lingua non stanno insieme su una riga.
   Resta il logo, che porta comunque alla home. */
@media (max-width: 559px) {
    .brand span { display: none; }
    .main-nav { gap: 2px; min-width: 0; }
    .main-nav a { padding: 8px 10px; }
    .lang-switch a { padding: 8px 6px; }
}

@media (min-width: 768px) {
    .header-row { grid-template-columns: auto auto 1fr auto; grid-template-areas: "brand nav search lang"; padding-top: 12px; padding-bottom: 12px; }
    .main-nav { margin-left: 12px; }
    .site-header .search-form { max-width: 440px; justify-self: end; width: 100%; }
}

/* Ricerca: campo arrotondato con la lente, pulsante dentro il campo. */
.search-form { position: relative; display: flex; align-items: center; }
.search-form input {
    flex: 1; min-width: 0; min-height: 44px; padding: 10px 96px 10px 42px; font: inherit;
    border: 1px solid var(--border); border-radius: 999px; background-color: var(--surface); color: var(--text);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%238a8fae' stroke-width='2.2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: 15px center;
    transition: border-color .15s, box-shadow .15s;
}
.search-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-form button {
    position: absolute; right: 5px; top: 5px; bottom: 5px; padding: 0 16px; font: inherit; font-weight: 650; font-size: .92rem;
    cursor: pointer; border: 0; border-radius: 999px; background: var(--button-gradient); color: #fff;
}
.search-form button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.search-form--large { max-width: 640px; margin-bottom: 1.5rem; }
.search-form--hero { max-width: 620px; margin: 24px 0 0; }
.search-form--hero input { min-height: 56px; font-size: 1.05rem; box-shadow: var(--shadow); padding-right: 116px; }
.search-form--hero button { padding: 0 22px; }

/* Contenuto */
main { flex: 1; width: 100%; padding-bottom: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-head h2 { margin-bottom: .7em; }
.section-head a { font-weight: 600; white-space: nowrap; }

/* Home */
.hero { padding: 40px 0 8px; }
@media (min-width: 768px) { .hero { padding: 64px 0 16px; } }
/* Desktop: testo a sinistra, ventaglio di carte a destra. */
.hero__grid { display: grid; gap: 32px; align-items: center; }
.hero__fan { display: none; }
@media (min-width: 1000px) {
    .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
    .hero__fan { display: block; position: relative; height: 400px; }
    .hero__fan a { display: none; position: absolute; top: 30px; left: 50%; width: 210px; margin-left: -105px; transition: transform .3s; }
    .hero__fan a[data-slot] { display: block; }
    .hero__fan a[data-slot="1"] { transform: translateX(-130px) rotate(-12deg); }
    .hero__fan a[data-slot="2"] { transform: translateY(-18px); z-index: 1; }
    .hero__fan a[data-slot="3"] { transform: translateX(130px) rotate(12deg); }
    .hero__fan:hover a[data-slot="1"] { transform: translateX(-160px) rotate(-16deg); }
    .hero__fan:hover a[data-slot="3"] { transform: translateX(160px) rotate(16deg); }
    .hero__fan .card-image { box-shadow: var(--shadow-lift); }
}
.hero h1 { font-size: clamp(2rem, 1.2rem + 4vw, 3.6rem); letter-spacing: -.035em; margin: 0 0 .35em; max-width: 18ch; }
.hero__cta { margin-top: 20px; }
.feature-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 12px; }
@media (min-width: 768px) { .feature-list { grid-template-columns: repeat(3, 1fr); } }
.feature-list li {
    display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.feature-list li::before { content: ""; width: 28px; height: 4px; border-radius: 2px; background: var(--gradient); margin-bottom: 6px; }
.feature-list span { color: var(--muted); font-size: .95rem; }
.card-grid--highlight { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 1100px) { .card-grid--highlight { grid-template-columns: repeat(6, 1fr); } }

.badge { display: inline-block; align-self: flex-start; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-2); }
.badge.up { background: color-mix(in srgb, var(--up) 15%, transparent); }
.badge.down { background: color-mix(in srgb, var(--down) 15%, transparent); }

.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 20px 0 0; font-size: .875rem; }
.breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--muted); }

/* Griglia dei set */
.set-grid, .card-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.set-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.set-tile {
    display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%;
    padding: 16px 14px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-align: center;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.set-tile img { width: 100%; max-width: 200px; aspect-ratio: 5 / 2; object-fit: contain; }
.set-tile:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.set-name { font-weight: 600; }
.set-meta { font-size: .8rem; color: var(--muted); }

.set-header { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 8px 0 20px; }
.set-header img { width: 200px; aspect-ratio: 5 / 2; object-fit: contain; }
.set-header h1 { margin: 0 0 4px; }
.set-header p { margin: 0; }

/* Griglia delle carte */
.card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (min-width: 768px) { .card-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
.card-tile { display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.card-tile:hover { text-decoration: none; }
.card-tile:hover .card-image { transform: translateY(-4px) rotate(-.6deg); box-shadow: var(--shadow-lift); }
/* Riflesso "olografico" al passaggio del mouse. */
.card-tile .card-image::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 45%, rgba(160, 140, 255, .25) 52%, transparent 65%);
}
.card-tile:hover .card-image::after { opacity: 1; }
.card-set { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.card-name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--muted); }
.card-meta .price { color: var(--text); font-weight: 600; }

.card-image {
    position: relative; display: block; width: 100%; height: auto; aspect-ratio: 63 / 88; object-fit: contain;
    border-radius: 4.5% / 3.2%; background: var(--surface-2); transition: transform .2s, box-shadow .2s;
    box-shadow: 0 2px 8px rgba(19, 21, 42, .10);
}

/* Immagine con segnaposto (ImageFrame): il nome al centro se l'immagine manca o non si carica. */
.img-frame { position: relative; display: block; overflow: hidden; container-type: inline-size; }
.img-frame > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.img-frame__label {
    display: none; position: absolute; inset: 0; align-items: center; justify-content: center; padding: 8%;
    text-align: center; font-weight: 600; font-size: max(9px, 10cqi); line-height: 1.2; overflow-wrap: anywhere;
    color: var(--muted); background: var(--surface); border: 1px dashed var(--muted); border-radius: inherit;
}
.img-frame[data-broken] > img { visibility: hidden; }
.img-frame[data-broken] > .img-frame__label { display: flex; }

/* Scheda della carta */
/* minmax(0, …): senza, la colonna si allarga quanto la tabella dei prezzi (righe senza a capo) e su telefono
   la pagina scorre di lato. La tabella scorre già da sola dentro .table-scroll. */
.card-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 16px; }
.card-detail__info { min-width: 0; }
.card-detail__image { max-width: 360px; width: 100%; justify-self: center; }
@media (min-width: 900px) {
    .card-detail { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); align-items: start; gap: 40px; }
    .card-detail__image { position: sticky; top: 16px; }
}
.card-detail h1 { margin-top: 0; }
.card-detail h1 .muted { font-weight: 400; font-size: .7em; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 8px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.prices { width: 100%; border-collapse: collapse; font-size: .925rem; }
.prices tbody tr:last-child td { border-bottom: 0; }
.prices tbody tr:hover { background: var(--surface-2); }
.prices th, .prices td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.prices th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.prices .num { text-align: right; font-variant-numeric: tabular-nums; }
.prices .strong { font-weight: 700; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }

.price-chart { margin: 0; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.price-chart svg { display: block; width: 100%; height: 160px; }
.price-chart .grid { stroke: var(--border); stroke-width: 1; }
.price-chart .line { fill: none; stroke: var(--chart); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.price-chart .area { fill: var(--chart-fill); stroke: none; }
.price-chart figcaption { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.price-chart .range { color: var(--text); }
.premium-note { margin-top: 8px; }

.message-page { padding: 48px 0; text-align: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 28px 0; }
.disclaimer { margin: 0; font-size: .8rem; color: var(--muted); max-width: 90ch; }

/* Errori di Blazor */
.blazor-error-boundary { background: #b32121; padding: 1rem; color: #fff; }
.blazor-error-boundary::after { content: "An error has occurred."; }

/* --- Account, moduli e pagine legali (Fase 3) --- */
.account-page, .legal-page, .app-page { max-width: 560px; padding: 24px 0 48px; }
.legal-page { max-width: 760px; }

.stack-form { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.stack-form label { font-weight: 600; margin-top: 8px; }
.stack-form input[type=text], .stack-form input[type=email], .stack-form select {
    font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); color: var(--text); min-height: 44px;
}
.stack-form input:focus-visible, .stack-form select:focus-visible, .button:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}
.stack-form label.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.stack-form label.checkbox input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.stack-form .button { align-self: flex-start; margin-top: 8px; }

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 20px;
    font: inherit; font-weight: 650; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none;
    transition: transform .12s, box-shadow .15s, border-color .15s, background-color .15s;
}
.button:hover { text-decoration: none; border-color: var(--accent); }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--button-gradient); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(64, 80, 240, .35); }
.button.primary:hover { border-color: transparent; box-shadow: 0 8px 26px rgba(64, 80, 240, .5); }
.button.google { width: 100%; }
.button.danger { border-color: var(--down); color: var(--down); }
.inline-form { margin: 24px 0; }

.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.notice.success { border-color: var(--up); }
.notice.error { border-color: var(--down); }
.field-error { color: var(--down); margin: 0; }
.hint { color: var(--muted); font-size: .9rem; margin: 0; }

.separator { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 20px 0; }
.separator::before, .separator::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.link-list { padding-left: 1.2em; }
.link-list li { margin: 6px 0; }
.footer-links { margin: 0 0 8px; }

/* --- Area personale: collezione (Fase 3b) --- */
.app-page--wide { max-width: 900px; }
.text-input {
    font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); color: var(--text); min-height: 44px; width: 100%;
}
.text-input.compact { min-height: 36px; padding: 6px 8px; width: auto; max-width: 100%; }
.text-input:focus-visible, .link-button:focus-visible, .picker-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.button.compact { min-height: 36px; min-width: 36px; padding: 4px 10px; }
.button:disabled { opacity: .6; cursor: default; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.link-button { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--down); cursor: pointer; }

.value-summary {
    position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; margin: 16px 0; box-shadow: var(--shadow);
}
.value-summary::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gradient); }
.value-summary__label { font-size: .95rem; font-weight: 600; color: var(--muted); margin: 0; }
.value-summary__value { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); font-weight: 800; letter-spacing: -.03em; margin: 4px 0; }
.value-summary p { margin: 4px 0; }

.add-panel { margin: 24px 0; }
.add-panel label { display: block; font-weight: 600; margin-bottom: 6px; }
.picker-results { list-style: none; padding: 0; margin: 8px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.picker-results li + li { border-top: 1px solid var(--border); }
.picker-item { display: flex; gap: 12px; align-items: center; width: 100%; padding: 8px 12px; background: none; border: 0; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.picker-item:hover { background: var(--bg); }
.picker-item span { display: flex; flex-direction: column; }
.picker-item .thumb, .collection-item .thumb { border-radius: 4px; background: var(--bg); flex: none; }
.picker-selected { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.picker-selected > div { flex: 1; min-width: 240px; }
.add-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.add-form label { font-weight: 600; }
.add-form .text-input { margin-top: 4px; font-weight: 400; }

.collection-list { list-style: none; padding: 0; margin: 12px 0; }
.collection-item {
    display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "img info value" "img qty value";
    gap: 6px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border);
}
.collection-item .thumb { grid-area: img; }
.collection-item__info { grid-area: info; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.collection-item__info a { overflow-wrap: anywhere; }
.collection-item__qty { grid-area: qty; display: flex; align-items: center; gap: 8px; }
.collection-item__value { grid-area: value; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
@media (max-width: 520px) {
    .collection-item { grid-template-columns: auto 1fr; grid-template-areas: "img info" "img qty" "img value"; }
    .collection-item__value { align-items: flex-start; text-align: left; }
}

/* --- Area personale: navigazione, set e desideri (Fase 3c) --- */
.app-page--full { max-width: none; }
.app-nav {
    display: inline-flex; gap: 4px; flex-wrap: wrap; margin: 16px 0 8px; padding: 4px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow);
}
.app-nav a { padding: 8px 14px; color: var(--muted); border-radius: 999px; font-weight: 600; font-size: .95rem; }
.app-nav a[aria-current=page] { color: #fff; background: var(--button-gradient); }
.app-nav a:hover { text-decoration: none; color: var(--text); }
.app-nav a[aria-current=page]:hover { color: #fff; }

.progress { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.progress__fill { height: 100%; background: var(--gradient); border-radius: inherit; }
.set-progress-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.set-progress {
    display: grid; grid-template-columns: 32px 1fr; grid-template-areas: "sym name" "sym bar" "sym text";
    gap: 4px 12px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text);
}
.set-progress:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow-lift); }
.set-progress img { grid-area: sym; }
.set-progress__name { grid-area: name; font-weight: 600; }
.set-progress .progress { grid-area: bar; }
.set-progress .muted { grid-area: text; font-size: .9rem; }
.set-progress-header { display: grid; gap: 8px; max-width: 560px; margin-bottom: 16px; }
.checkbox-inline { display: flex; gap: 8px; align-items: center; }
.checkbox-inline input { width: 20px; height: 20px; }

.progress-grid { list-style: none; padding: 0; }
.progress-card { display: flex; flex-direction: column; gap: 4px; }
.progress-card .progress-image { width: 100%; border-radius: 6px; }
.progress-card.is-missing .progress-image { filter: grayscale(1); opacity: .45; }
.progress-card.is-owned .progress-image { box-shadow: 0 0 0 3px var(--up); }
.progress-card__status { font-size: .85rem; color: var(--muted); }
.progress-card.is-owned .progress-card__status { color: var(--up); font-weight: 600; }
.progress-card__actions { display: flex; gap: 6px; }
.button.wish { font-size: 1.1rem; }
.button.wish.is-on { color: var(--down); border-color: var(--down); }

.share-panel { margin: 32px 0; padding-top: 8px; border-top: 1px solid var(--border); }
.share-panel label { display: block; font-weight: 600; margin: 8px 0 4px; }
.wish-tile { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.public-wishlist { padding: 24px 0 48px; }

/* Invito a installare la PWA (dashboard) */
.install-prompt { display: flex; gap: 14px; align-items: flex-start; margin: 16px 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.install-prompt img { flex: none; border-radius: 10px; }
.install-prompt h2 { margin: 0 0 4px; font-size: 1.05rem; }
.install-prompt p { margin: 0 0 10px; }
.install-prompt .button-row { margin-bottom: 0; }
/* Pagine pubbliche: in basso, sopra al contenuto, finché non si installa o si sceglie "Non ora". */
.install-banner { position: fixed; z-index: 900; left: 12px; right: 12px; bottom: 12px; margin: 0 auto; max-width: 520px; padding: 12px; }
.install-banner[hidden], .install-banner [hidden] { display: none; }
.install-banner p { font-size: .95rem; }

/* Telefono, home: la ricerca grande è già nella pagina, quella dell'intestazione sarebbe un doppione. */
@media (max-width: 767px) {
    body:has(.search-form--hero) .site-header .search-form { display: none; }
}

/* --- Area personale: eBay --- */
.badge.ebay { margin: 2px 0; color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--accent) 15%, transparent); }
.ebay-intro .feature-list { margin-top: 16px; }
.ebay-status { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; margin: 16px 0; }
.ebay-status > p { margin: 0; }
.ebay-list { list-style: none; padding: 0; margin: 12px 0; }
.ebay-listing { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ebay-listing .thumb { border-radius: 4px; background: var(--bg); object-fit: cover; }
.ebay-listing__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ebay-listing__info a { overflow-wrap: anywhere; }
.ebay-match { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ebay-match .button.compact { white-space: normal; text-align: left; }
.ebay-choose { display: grid; gap: 6px; max-width: 520px; }
.link-button.choose { align-self: flex-start; color: var(--accent); }
.ebay-sale { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ebay-sale strong { overflow-wrap: anywhere; }
@media (max-width: 520px) { .ebay-sale { grid-template-columns: 1fr auto; } .ebay-sale > :first-child { grid-column: 1 / -1; } }
