@import url("../fonts/fonts.css");

/* Scia — vetrina: intestazione fissa con ricerca, griglia di card con la foto del flacone
   su una tinta pastello della sua famiglia olfattiva. Un solo carattere (Manrope). */
:root {
  --bg: #FFFFFF;
  --surface: #F6F6F8;
  --surface-2: #EEEEF2;
  --ink: #16161D;
  --muted: #6A6A77;
  --line: #E4E4EA;
  --accent: #E8336B;        /* cuore, evidenze */
  --accent-ink: #FFFFFF;
  --ok: #1E9A55;
  --warn: #B26A00;
  --ko: #C83A2E;
  --shadow: 0 1px 2px rgba(22, 22, 29, .05), 0 6px 20px rgba(22, 22, 29, .06);
  --tint: 16%;              /* quanto colore di famiglia sotto le foto */

  --font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --fam-agrumata: #F2B705; --fam-aromatica: #4FAA63; --fam-chypre: #7C8B3C; --fam-cuoiata: #9A5B34;
  --fam-dolce: #F08DB0; --fam-fiorita: #E8507F; --fam-fougere: #2F9C80; --fam-fruttata: #F47B3A;
  --fam-legnosa: #A47148; --fam-marina: #2F8FD8; --fam-muschiata: #9B8DD6; --fam-orientale: #C8452F;
  --fam-speziata: #D9662B; --fam-silvestre: #3D7F52; --fam-mista: #9A9AA3; --fam-nessuna: #B9B9C3;

  --r-s: 10px; --r-m: 16px; --r-l: 22px;
  --wrap: 1320px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111115; --surface: #1B1B21; --surface-2: #24242C; --ink: #F2F2F6; --muted: #A2A2B0; --line: #2C2C35;
    --accent: #FF5C8D; --ok: #49C97F; --warn: #F0B048; --ko: #FF7A6B; --shadow: 0 1px 2px rgba(0,0,0,.4); --tint: 22%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111115; --surface: #1B1B21; --surface-2: #24242C; --ink: #F2F2F6; --muted: #A2A2B0; --line: #2C2C35;
  --accent: #FF5C8D; --ok: #49C97F; --warn: #F0B048; --ko: #FF7A6B; --shadow: 0 1px 2px rgba(0,0,0,.4); --tint: 22%;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- intestazione ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.top-in { max-width: var(--wrap); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; letter-spacing: -.03em; text-decoration: none; flex: none; }
.logo svg { width: 26px; height: 26px; }
.top .search { flex: 1; max-width: 520px; position: relative; }
.top .search input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 10px 16px 10px 40px; font-size: 15px; }
.top .search input:focus { background: var(--bg); border-color: var(--ink); outline: none; }
.top .search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.mainnav { display: flex; gap: 2px; margin-left: auto; }
.mainnav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.mainnav a:hover { color: var(--ink); background: var(--surface); }
.mainnav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.mainnav .badge-n { font-size: 11px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; border: 0;
  background: var(--ink); color: var(--bg); cursor: pointer; flex: none; }
.menu { position: absolute; right: 24px; top: 58px; min-width: 220px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow); padding: 6px; display: grid; z-index: 40; }
.menu a, .menu button { text-align: left; padding: 10px 12px; border-radius: 8px; text-decoration: none; background: none; border: 0; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface); }
.menu .who { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tabbar { display: none; }

main { max-width: var(--wrap); margin: 0 auto; padding: 28px 24px 80px; min-width: 0; }

@media (max-width: 1080px) { .mainnav a.opt { display: none; } }
@media (max-width: 820px) {
  .top-in { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .top .search { order: 3; flex-basis: 100%; max-width: none; }
  .mainnav { display: none; }
  .avatar { margin-left: auto; }
  .menu { right: 16px; }
  main { padding: 18px 16px calc(92px + env(safe-area-inset-bottom, 0px)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    background: var(--bg); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted);
    text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer; }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar [aria-current="page"] { color: var(--ink); }
  .tabbar [aria-current="page"] svg { color: var(--accent); }
}

/* ---------- tipografia ---------- */
h1, h2, h3 { margin: 0; text-wrap: balance; }
.h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; }
.h2 { font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.h3 { font-size: 16px; line-height: 1.3; font-weight: 700; }
.lede { color: var(--muted); max-width: 62ch; margin: 6px 0 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.section { margin-top: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }

/* ---------- controlli ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); cursor: pointer; text-decoration: none; font-weight: 600; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: .88; }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--surface); }
.btn.big { padding: 12px 22px; font-size: 15px; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.wish[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--bg);
  cursor: pointer; color: var(--ink); box-shadow: var(--shadow); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.wish[aria-pressed="true"] { color: var(--accent); }
.icon-btn.plain { box-shadow: none; background: transparent; }

input[type="search"], input[type="text"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); padding: 9px 12px; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
textarea { width: 100%; resize: vertical; min-height: 96px; line-height: 1.5; }
input[type="range"] { accent-color: var(--accent); width: 100%; }
label.field { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
label.field > :is(input, select, textarea) { color: var(--ink); font-size: 15px; font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); background: var(--bg); cursor: pointer; line-height: 1.2; white-space: nowrap; text-decoration: none; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { font-weight: 500; opacity: .6; font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; background: var(--fam, var(--fam-nessuna)); }

.seg { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.pill.fam { background: color-mix(in srgb, var(--fam) 22%, var(--bg)); }
.pill.new { background: var(--ink); color: var(--bg); }
.pill.drop { background: var(--ok); color: #fff; }
.pill.mine { background: var(--accent); color: var(--accent-ink); }
.stock { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock.ok { color: var(--ok); }
.stock.ko { color: var(--muted); }
.stock.ko::before { background: transparent; border: 1.5px solid currentColor; width: 7px; height: 7px; }

.panel { background: var(--surface); border-radius: var(--r-m); padding: 18px 20px; min-width: 0; }
.panel.white { background: var(--bg); border: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }

/* ---------- catalogo ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 14px; }
.toolbar .count { font-weight: 700; margin-right: auto; }
.famrow { margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 28px 20px; }
@media (max-width: 520px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; } }
.card { position: relative; display: grid; gap: 4px; align-content: start; text-decoration: none; color: inherit; min-width: 0; }
.card .photo { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-l); overflow: hidden;
  background: color-mix(in srgb, var(--fam, var(--fam-nessuna)) var(--tint), var(--bg)); display: grid; place-items: center; margin-bottom: 8px; }
.card .photo img { width: 74%; height: 74%; object-fit: contain; mix-blend-mode: multiply; transition: transform .25s ease; }
:root[data-theme="dark"] .card .photo img { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card .photo img { mix-blend-mode: normal; } }
.card:hover .photo img { transform: scale(1.04); }
.card .photo .letter { font-weight: 800; font-size: 48px; color: color-mix(in srgb, var(--fam, var(--fam-nessuna)) 70%, var(--ink)); opacity: .5; }
.card .heart { position: absolute; top: 10px; right: 10px; }
.card .flags { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.card .brand { font-size: 13px; color: var(--muted); font-weight: 600; }
.card .name { font-size: 15px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .notes { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .why { font-size: 13px; color: var(--ink); background: var(--surface); border-radius: 8px; padding: 6px 8px; margin-top: 4px; }
.card .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 2px; }
.card .price b { font-size: 16px; font-weight: 800; }
.card .shops { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.shop-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
  display: inline-flex; align-items: center; gap: 4px; }
.shop-tag.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.more { display: flex; justify-content: center; padding: 28px 0; }
.empty { padding: 56px 0; text-align: center; color: var(--muted); max-width: 46ch; margin: 0 auto; display: grid; gap: 10px; justify-items: center; }
.empty .h2 { color: var(--ink); }

/* filtri: pannello laterale */
.drawer { position: fixed; z-index: 50; inset: 0 0 0 auto; width: min(400px, 94vw); background: var(--bg); box-shadow: var(--shadow);
  padding: 20px 22px 100px; overflow: auto; transform: translateX(105%); transition: transform .22s ease; display: grid; gap: 24px; align-content: start; }
.drawer.open { transform: none; }
.drawer h3 { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.drawer .check { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 4px 0; cursor: pointer; }
.drawer .check input { accent-color: var(--accent); width: 18px; height: 18px; }
.drawer-foot { position: fixed; z-index: 51; right: 0; bottom: 0; width: min(400px, 94vw); padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--bg); border-top: 1px solid var(--line); display: flex; gap: 10px; transform: translateX(105%); transition: transform .22s ease; }
.drawer.open + .drawer-foot { transform: none; }
.drawer-foot .btn { flex: 1; }
.scrim { position: fixed; inset: 0; z-index: 45; background: rgba(17, 17, 21, .35); }
.inline-add { display: flex; gap: 8px; }
.inline-add input { flex: 1; }

/* ---------- scheda profumo ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 18px; }
.back:hover { color: var(--ink); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.hero .photo { aspect-ratio: 1; border-radius: 28px; background: color-mix(in srgb, var(--fam, var(--fam-nessuna)) var(--tint), var(--bg));
  display: grid; place-items: center; overflow: hidden; position: sticky; top: 90px; }
.hero .photo img { width: 72%; height: 72%; object-fit: contain; mix-blend-mode: multiply; }
:root[data-theme="dark"] .hero .photo img { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero .photo img { mix-blend-mode: normal; } }
.hero .brand { font-weight: 700; color: var(--muted); text-decoration: none; }
.hero .brand:hover { color: var(--ink); }
.hero .h1 { margin: 6px 0 12px; }
.hero .pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.hero .price-big { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero .own { margin-top: 18px; display: grid; gap: 8px; justify-items: start; }
.hero .ext { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero .photo { position: static; max-width: 420px; width: 100%; justify-self: center; }
}

/* curva delle note: cosa senti nel tempo */
.evap svg { width: 100%; height: auto; display: block; overflow: visible; }
.evap .lbl { font: 700 12px var(--font); fill: var(--muted); }
.evap .tick { font: 600 11px var(--font); fill: var(--muted); }
.evap .axis { stroke: var(--line); }
.evap .note-txt { font: 600 13px var(--font); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.evap .you { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 4; }
.evap .you-txt { font: 800 12px var(--font); fill: var(--accent); }
.evap figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; }
.note-groups { display: grid; gap: 12px; margin-top: 16px; }
.note-groups .row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: start; }
.note-groups .lvl { font-size: 13px; font-weight: 700; color: var(--muted); padding-top: 6px; }
.note-chip { display: inline-flex; padding: 5px 11px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); }
.note-chip:hover { border-color: var(--ink); }

.metric { display: grid; gap: 2px; }
.metric b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.metric span { font-size: 13px; color: var(--muted); font-weight: 600; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; margin-top: 12px; }
.meter { display: flex; gap: 3px; margin-top: 4px; }
.meter i { width: 18px; height: 6px; border-radius: 3px; background: var(--surface-2); }
.meter i.on { background: var(--accent); }

.store { display: grid; gap: 10px; }
.store-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.sizes { width: 100%; border-collapse: collapse; font-size: 14px; }
.sizes td { padding: 8px 0; border-top: 1px solid var(--line); }
.sizes td.p { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.sizes td.s { text-align: right; width: 118px; }
.store-list { display: flex; flex-wrap: wrap; gap: 6px; }
.store-list .pill.here { background: var(--ink); color: var(--bg); }

.diary { display: grid; gap: 12px; }
.entry { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; }
.entry .when { font-size: 13px; color: var(--muted); font-weight: 600; }
.entry .facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; margin-top: 6px; align-items: center; }
.entry p { margin: 8px 0 0; white-space: pre-wrap; }
.entry .title { font-weight: 800; text-decoration: none; }
.stars { display: inline-flex; gap: 1px; }
.stars button { background: none; border: 0; padding: 0 1px; font-size: 24px; line-height: 1; color: var(--surface-2); cursor: pointer; }
.stars button.on { color: #F5A623; }
.stars-ro { color: #F5A623; letter-spacing: 1px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px 18px; align-items: end; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.range-val { font-weight: 800; color: var(--ink); }
.spark { width: 100%; height: 76px; }
.spark path.line { fill: none; stroke: var(--ink); stroke-width: 2; }
.spark path.area { fill: var(--surface-2); }
.spark circle { fill: var(--accent); }
.spark text { font: 600 11px var(--font); fill: var(--muted); }
.desc { max-width: 72ch; }
.desc p { margin: 0 0 10px; }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 210px); gap: 18px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }

/* ---------- per te, collezione, liste ---------- */
.taste { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 26px; }
@media (max-width: 820px) { .taste { grid-template-columns: minmax(0, 1fr); } }
.taste .cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; text-decoration: none; }
.bar .track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--fam, var(--ink)); border-radius: 999px; display: block; }
.bar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border-radius: var(--r-m); padding: 16px 18px; }
.kpi b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 13px; font-weight: 600; }
.results { display: grid; gap: 6px; margin-top: 10px; max-height: 360px; overflow: auto; }
.result { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px; border-radius: var(--r-s); }
.result:hover { background: var(--surface); }
.result .mini { width: 48px; height: 48px; border-radius: 10px; background: color-mix(in srgb, var(--fam, var(--fam-nessuna)) var(--tint), var(--bg)); display: grid; place-items: center; overflow: hidden; }
.result .mini img { width: 80%; height: 80%; object-fit: contain; mix-blend-mode: multiply; }
.visit { display: grid; gap: 12px; }
.visit-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 12px; background: var(--surface); border-radius: var(--r-m); }
.visit-item .mini { width: 84px; height: 84px; border-radius: 14px; background: color-mix(in srgb, var(--fam, var(--fam-nessuna)) var(--tint), var(--bg)); display: grid; place-items: center; overflow: hidden; }
.visit-item .mini img { width: 80%; height: 80%; object-fit: contain; mix-blend-mode: multiply; }
.visit-item .quick { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.visit-item.done { opacity: .55; }
.store-card { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; align-items: center; padding: 16px 18px; background: var(--surface); border-radius: var(--r-m); }
.month { font-size: 15px; font-weight: 800; margin: 28px 0 10px; text-transform: capitalize; }
.feed { display: grid; gap: 10px; }
.feed .entry { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
.feed .mini { width: 56px; height: 56px; border-radius: 12px; background: color-mix(in srgb, var(--fam, var(--fam-nessuna)) var(--tint), var(--bg)); display: grid; place-items: center; overflow: hidden; }
.feed .mini img { width: 80%; height: 80%; object-fit: contain; mix-blend-mode: multiply; }

/* note */
.note-index { columns: 4 190px; column-gap: 28px; }
.note-index a { display: flex; justify-content: space-between; gap: 8px; text-decoration: none; padding: 4px 0; break-inside: avoid; font-size: 14px; font-weight: 500; }
.note-index a:hover { color: var(--accent); }
.note-index .letter { font-weight: 800; font-size: 18px; margin: 16px 0 4px; break-after: avoid; }

/* impostazioni */
.steps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--accent); transition: width .3s; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.table td, .table th { text-align: left; padding: 9px 10px 9px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 700; font-size: 13px; }

/* accesso */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth .art { position: relative; overflow: hidden; background: var(--surface); }
.auth .art span { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .9; }
.auth .art p { position: absolute; left: 40px; bottom: 40px; right: 40px; font-size: clamp(26px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; margin: 0; }
.auth .pane { display: grid; place-items: center; padding: 32px 20px; }
.auth form { width: min(380px, 100%); display: grid; gap: 14px; }
.auth .logo { font-size: 30px; }
.err { color: var(--ko); font-size: 14px; font-weight: 600; margin: 0; min-height: 1em; }
@media (max-width: 820px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth .art { min-height: 180px; } .auth .art p { left: 20px; bottom: 20px; } }

/* toast e fogli */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow); font-size: 14px; font-weight: 600; max-width: calc(100vw - 32px); }
@media (max-width: 820px) { .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }
dialog.sheet { border: 0; border-radius: var(--r-l); padding: 0; width: min(560px, calc(100vw - 24px)); background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }
dialog.sheet::backdrop { background: rgba(17, 17, 21, .45); }
dialog.sheet .inner { padding: 22px; }
.more-menu { display: grid; }
.more-menu a { padding: 14px 6px; text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Fragrantica: scelta del profumo da collegare */
.fr-choices { display: grid; gap: 8px; margin-top: 12px; max-height: 420px; overflow-y: auto; }
.fr-choice { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; padding: 8px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: inherit; font: inherit; cursor: pointer; }
.fr-choice:hover { border-color: var(--ink); }
.fr-choice[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.fr-choice .mini { width: 52px; height: 52px; border-radius: 10px; background: color-mix(in srgb, var(--fam, var(--fam-nessuna)) var(--tint), var(--bg)); display: grid; place-items: center; overflow: hidden; }
.fr-choice .mini img { width: 80%; height: 80%; object-fit: contain; mix-blend-mode: multiply; }
