/* Guardaroba — stile dell'interfaccia. Pensato per iPhone, uso con una mano. */
:root {
  --bg: #f6f1ea; --surface: #fffdf9; --tile: #efe7dc; --ink: #221d18; --muted: #7b7067; --line: #e4d9cb;
  --accent: #b23a55; --accent-ink: #fff; --accent-soft: #f6dfe4;
  --good: #2f7a55; --good-soft: #dff0e6; --warn: #a2610d; --warn-soft: #fbecd2; --bad: #b3261e; --bad-soft: #fbe0dd;
  --plaid: #f2c94c; --skin: #d8d3cc; --hair: transparent;
  --r: 18px; --r-s: 12px; --nav-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.4 var(--sans); overscroll-behavior-y: none; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1 { font: 600 30px/1.1 var(--serif); letter-spacing: -.01em; }
h2 { font: 600 21px/1.2 var(--serif); }
h3 { font: 600 13px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 10px; }
a { color: var(--accent); }
[hidden] { display: none !important; }

.app { min-height: 100dvh; padding: calc(var(--safe-t) + 14px) 16px calc(var(--nav-h) + var(--safe-b) + 24px); max-width: 560px; margin: 0 auto; }
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; color: var(--muted); }
.view { display: flex; flex-direction: column; gap: 14px; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.view-head.tight { align-items: center; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 2px; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.45; }
.muted { color: var(--muted); font-size: 13px; }
.center { display: flex; justify-content: center; margin: 8px 0; }

/* Barra in basso */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(255, 253, 249, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 500; transition: color .15s; }
.tabbar button.on { color: var(--accent); }
.tabbar button:active svg { transform: scale(.9); }
.tabbar svg { transition: transform .15s var(--ease); }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 15px; transition: transform .12s var(--ease), background .15s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; margin-top: 10px; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.icon-btn:active { background: var(--tile); }
.link-btn { color: var(--accent); font-weight: 600; font-size: 14px; min-height: 44px; padding: 0 4px; }
.link-btn.danger { color: var(--bad); display: block; margin: 6px auto 0; }
.fab { position: fixed; right: 18px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 15; width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(178, 58, 85, .35); transition: transform .15s var(--ease); }
.fab:active { transform: scale(.92); }

/* Chip */
.chips-row { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; flex-shrink: 0; }
.chips-row::-webkit-scrollbar { display: none; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s, transform .12s var(--ease); }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.static { min-height: 30px; background: var(--tile); border: 0; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); flex-shrink: 0; }
.swatch.big { width: 26px; height: 26px; }
.palette { display: flex; gap: 6px; margin: 10px 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--tile); font-size: 12.5px; font-weight: 600; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.row-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }

/* Avvisi */
.notice, .banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-s); background: var(--tile); font-size: 14px; line-height: 1.4; text-align: left; margin: 4px 0; }
.notice > span, .notice > div { flex: 1; }
.notice.warn, .banner { background: var(--warn-soft); color: #5f3a06; }
.notice.ok { background: var(--good-soft); color: #1d4d35; }
.banner { width: 100%; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 60; margin: 0 auto; max-width: 480px; padding: 13px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: toast-in .28s var(--ease); }
.toast.error { background: var(--bad); }
.toast.ok { background: var(--good); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
.spinner.small { width: 15px; height: 15px; border-width: 2px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Stato vuoto */
.empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h2 { color: var(--ink); }
.empty-art { width: 108px; height: 108px; border-radius: 50%; background: var(--tile); display: grid; place-items: center; color: var(--accent); }

/* Griglia capi */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid.small { grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 480px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { text-align: left; display: flex; flex-direction: column; gap: 6px; transition: transform .15s var(--ease); min-width: 0; }
.card:active { transform: scale(.97); }
.card-img { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r); background: var(--tile); overflow: hidden; display: grid; place-items: center; }
.item-img { width: 100%; height: 100%; object-fit: contain; padding: 8%; filter: drop-shadow(0 6px 10px rgba(60, 40, 20, .16)); pointer-events: none; }
.img-ph { width: 100%; height: 100%; }
.shimmer { background: linear-gradient(100deg, var(--tile) 30%, #f8f2e9 50%, var(--tile) 70%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.card-status { position: absolute; inset: auto 8px 8px 8px; display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 253, 249, .94); font-size: 12px; font-weight: 600; line-height: 1.2; }
.card-badge { position: absolute; left: 8px; bottom: 8px; padding: 4px 9px; border-radius: 999px; background: var(--warn-soft); color: #5f3a06; font-size: 11.5px; font-weight: 600; }
.card-comfort { position: absolute; right: 8px; top: 8px; font-size: 8px; letter-spacing: 1px; color: var(--good); background: rgba(255, 253, 249, .9); padding: 3px 6px; border-radius: 999px; }
.card-meta { display: grid; gap: 1px; padding: 0 2px; min-width: 0; }
.card-meta b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta span { font-size: 12.5px; color: var(--muted); min-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.pick .card-img { border: 2px solid transparent; }
.card.picked .card-img { border-color: var(--accent); background: var(--accent-soft); }
.pick-mark { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.grid.small .card-meta b { font-size: 12px; }

/* Pannello dal basso */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap .sheet-wrap { z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(34, 29, 24, .42); animation: fade .2s; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 88dvh; display: flex; flex-direction: column; background: var(--bg); border-radius: 24px 24px 0 0; animation: sheet-in .32s var(--ease); box-shadow: 0 -10px 40px rgba(0, 0, 0, .18); }
.sheet.tall { height: 94dvh; max-height: 94dvh; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 6px 20px; flex-shrink: 0; }
.sheet-head h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 6px 20px calc(var(--safe-b) + 24px); display: flex; flex-direction: column; gap: 10px; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.action-list { display: grid; gap: 10px; }
.action { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-align: left; min-height: 64px; }
.action:active { background: var(--tile); }
a.action { color: inherit; text-decoration: none; }
.action b { display: block; }
.action svg { color: var(--accent); flex-shrink: 0; }
.action div { display: grid; gap: 2px; min-width: 0; }
.action span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Scheda capo */
.item-hero { height: 240px; border-radius: var(--r); background: var(--tile); flex-shrink: 0; }
.comfort-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.comfort-box div:first-child { display: grid; gap: 2px; }
.comfort-box span { font-size: 12.5px; color: var(--muted); }
.dots { display: flex; gap: 4px; }
.dot { width: 34px; height: 44px; position: relative; }
.dot::after { content: ""; position: absolute; inset: 9px 4px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); transition: background .15s, transform .15s var(--ease); }
.dot.on::after { background: var(--good); border-color: var(--good); transform: scale(1.06); }
.fields { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 50px; padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field:active { background: var(--tile); }
.f-label { font-size: 13.5px; color: var(--muted); flex-shrink: 0; }
.f-value { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; font-size: 15px; font-weight: 500; text-align: right; }
.empty-val, .f-value i { font-style: normal; color: #b6aa9d; font-weight: 400; }
.src { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--tile); color: var(--muted); }
.src.stimato { background: var(--warn-soft); color: var(--warn); }
.src.web, .src.etichetta { background: var(--good-soft); color: var(--good); }
.item-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.item-actions .btn { font-size: 13.5px; padding: 0 10px; text-align: center; line-height: 1.15; }
.input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 16px; color: var(--ink); }
.input.bare { border: 0; padding: 0; min-height: 28px; background: none; font-weight: 600; }
.input.title-input { font: 600 22px var(--serif); }
.scale { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--muted); }
.scale-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 16px; color: var(--ink); }
.scale-btn.on { background: var(--ink); color: #fff; }
.adv { font-size: 14px; margin-top: 6px; }
.adv summary { min-height: 44px; display: flex; align-items: center; color: var(--muted); font-weight: 600; }
.adv .f-label { display: block; margin: 10px 0 6px; }
.plain { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 6px; }

/* Crea */
.app[data-tab="crea"] { padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
.create { height: calc(100dvh - var(--nav-h) - var(--safe-b) - var(--safe-t) - 14px); gap: 10px; }
.seg { display: flex; padding: 3px; border-radius: 14px; background: var(--tile); }
.seg button { min-height: 40px; padding: 0 20px; border-radius: 11px; font-weight: 600; font-size: 15px; color: var(--muted); transition: background .2s, color .2s; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.ctx-bar { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; flex-shrink: 0; }
.ctx-bar::-webkit-scrollbar { display: none; }
.temp-big { font: 600 64px/1 var(--serif); text-align: center; margin: 8px 0; }
.temp-big small { display: block; font: 500 15px var(--sans); color: var(--muted); margin-top: 6px; }
.range { width: 100%; height: 44px; accent-color: var(--accent); }

.bands { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; margin: 0 -16px; }
.bands-center { position: absolute; top: 0; bottom: 0; left: 50%; width: 46%; transform: translateX(-50%); border-radius: 22px; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(242, 201, 76, .16) 0 10px, transparent 10px 20px), repeating-linear-gradient(90deg, rgba(242, 201, 76, .16) 0 10px, transparent 10px 20px); border: 1.5px solid rgba(242, 201, 76, .7); z-index: 0; }
.band { position: relative; flex: 1; min-height: 76px; z-index: 1; }
.band-label { position: absolute; left: 8px; top: 4px; z-index: 2; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: rgba(246, 241, 234, .85); padding: 2px 6px; border-radius: 6px; pointer-events: none; }
.band-scroll { height: 100%; display: flex; gap: 0; column-gap: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: none; padding: 0 27%; touch-action: pan-x; }
.band-scroll::-webkit-scrollbar { display: none; }
.band-cell { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: grid; place-items: center; opacity: .38; transform: scale(.72); transition: transform .28s var(--ease), opacity .28s; }
.band-cell.act { opacity: 1; transform: scale(1); }
.band-cell .item-img { padding: 2% 4%; }
.band-cell.none .none-mark { font-size: 13px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: 12px; padding: 10px 16px; }
.bands-toggle { margin-top: -2px; }
.shuffle { position: absolute; right: 12px; top: 2px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--plaid); color: #3d2f05; font-weight: 700; font-size: 14px; box-shadow: 0 6px 16px rgba(180, 140, 20, .35); transition: transform .15s var(--ease); }
.shuffle:active { transform: scale(.93) rotate(-3deg); }
.create { position: relative; }
.dock { flex-shrink: 0; display: grid; gap: 8px; padding-bottom: 10px; }
.verdict { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; width: 100%; min-height: 54px; padding: 8px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.verdict b { font-size: 14.5px; grid-column: 1; }
.verdict span { font-size: 12.5px; color: var(--muted); grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verdict svg { grid-column: 2; grid-row: 1 / 3; color: var(--muted); }
.verdict.good { background: var(--good-soft); border-color: transparent; } .verdict.good b { color: var(--good); }
.verdict.mid { background: var(--warn-soft); border-color: transparent; } .verdict.mid b { color: var(--warn); }
.verdict.bad { background: var(--bad-soft); border-color: transparent; } .verdict.bad b { color: var(--bad); }
.verdict:disabled { opacity: 1; }
.dock-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.catalog { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 10px; margin: 0 -16px; padding: 0 16px 8px; }
.tray { display: flex; gap: 8px; overflow-x: auto; min-height: 84px; padding: 8px; border-radius: var(--r); background: var(--tile); flex-shrink: 0; align-items: center; scrollbar-width: none; }
.tray-empty { font-size: 14px; color: var(--muted); padding: 0 8px; }
.tray-item { position: relative; flex: 0 0 64px; height: 68px; border-radius: 12px; background: var(--surface); }
.tray-item .item-img { padding: 6%; }
.tray-x { position: absolute; right: -4px; top: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.mini-h { margin: 4px 0 0; }

.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notes li { display: flex; gap: 10px; font-size: 14px; line-height: 1.4; }
.n-ico { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--good-soft); color: var(--good); }
.notes .warn .n-ico { background: var(--warn-soft); color: var(--warn); }
.notes .tip .n-ico { background: var(--tile); color: var(--muted); }
.sugg { display: grid; gap: 8px; }
.sugg-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.sugg-row:active { background: var(--tile); }
.sugg-img { flex: 0 0 52px; height: 56px; border-radius: 10px; background: var(--tile); }
.sugg-img .item-img { padding: 6%; }
.sugg-txt { flex: 1; display: grid; gap: 2px; min-width: 0; }
.sugg-txt b { font-size: 14px; }
.sugg-txt span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.sugg-add { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }

/* Genera */
.modes { display: grid; gap: 12px; }
.mode { display: flex; align-items: center; gap: 16px; padding: 20px 18px; border-radius: 22px; text-align: left; min-height: 96px; transition: transform .15s var(--ease); }
.mode:active { transform: scale(.98); }
.mode div { display: grid; gap: 4px; }
.mode b { font: 600 19px var(--serif); }
.mode span { font-size: 13.5px; opacity: .85; line-height: 1.35; }
.mode-ico { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .55); display: grid; place-items: center; flex-shrink: 0; }
.mode.pin { background: #f3d6dc; color: #5c1526; }
.mode.free { background: var(--ink); color: #fff; } .mode.free .mode-ico { background: rgba(255, 255, 255, .14); }
.mode.style { background: #f6e3a4; color: #4a3806; }
.result { border-radius: 22px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.result-body { padding: 16px 18px 6px; display: grid; gap: 6px; }
.why { font-size: 15px; line-height: 1.5; }
.body-why { color: var(--muted); font-size: 14px; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 18px 18px; }
.collage { display: flex; gap: 6px; padding: 10px; background: var(--tile); aspect-ratio: 1 / 1; }
.collage.compact { aspect-ratio: 4 / 5; border-radius: var(--r); padding: 6px; gap: 4px; }
.empty-collage { place-items: center; display: grid; color: var(--muted); font-size: 13px; }
.collage-big { flex: 2.4; display: grid; gap: 6px; min-width: 0; min-height: 0; }
.collage-big.n1 { grid-template: 1fr / 1fr; } .collage-big.n2 { grid-template: 1fr 1.25fr / 1fr; }
.collage-big.n3 { grid-template: 1fr 1.2fr / 1fr 1fr; } .collage-big.n3 .tile:last-child { grid-column: 1 / 3; }
.collage-big.n4 { grid-template: 1fr 1.2fr / 1fr 1fr; }
.collage-small { flex: 1; display: grid; grid-auto-rows: 1fr; gap: 6px; min-width: 0; min-height: 0; }
.tile { border-radius: 12px; background: var(--surface); min-height: 0; min-width: 0; overflow: hidden; }
.tile .item-img { padding: 5%; }
.style-list { display: grid; gap: 8px; }
.style-row { display: grid; grid-template-columns: 1fr auto; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.style-main { display: flex; align-items: center; gap: 12px; padding: 12px 6px 12px 14px; text-align: left; min-height: 64px; }
.style-main:active { background: var(--tile); }
.style-main div { flex: 1; display: grid; gap: 2px; }
.style-main span { font-size: 13px; color: var(--muted); line-height: 1.3; }
.style-emoji { font-size: 24px; width: 34px; text-align: center; }
.style-count { font-size: 11.5px !important; color: var(--good) !important; font-weight: 600; white-space: nowrap; }
.style-more { width: 48px; color: var(--muted); display: grid; place-items: center; }
.style-detail { grid-column: 1 / 3; padding: 0 16px 14px; font-size: 13.5px; display: grid; gap: 6px; line-height: 1.4; }
.style-detail b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.taste { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.taste-sum { font: 600 18px/1.3 var(--serif); margin: 4px 0 10px; }

/* Outfit salvati */
.outfit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.outfit-card { text-align: left; display: grid; gap: 6px; min-width: 0; }
.outfit-card:active { transform: scale(.98); }
.piece-list { display: grid; gap: 8px; }
.piece { display: flex; align-items: center; gap: 12px; }
.piece-img { flex: 0 0 52px; height: 56px; border-radius: 10px; background: var(--tile); }
.piece div:last-child { display: grid; gap: 1px; }
.piece span { font-size: 12.5px; color: var(--muted); }

/* Figura e profilo */
.figure { position: relative; display: flex; justify-content: center; }
.figure svg { height: 300px; width: auto; max-width: 100%; }
.figure.big svg { height: min(58dvh, 520px); }
.figure.big { background: var(--tile); border-radius: var(--r); padding: 10px 0; flex-shrink: 0; }
.figure.preview { background: var(--tile); border-radius: var(--r); padding: 8px; flex: 0 0 42%; }
.figure.preview svg { height: 260px; }
.figure-side { position: absolute; right: 8px; top: 10px; display: grid; gap: 6px; }
.side-thumb { width: 46px; height: 46px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.side-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.profile-top { display: flex; gap: 12px; align-items: stretch; }
.profile-form { flex: 1; display: grid; gap: 10px; min-width: 0; }
.field-card { display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 2px; padding: 12px 14px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); text-align: left; min-height: 66px; }
.field-card .f-label { grid-column: 1 / 3; font-size: 12px; }
.field-card b { font-size: 16px; }
.field-card svg { color: var(--muted); }
.advice { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; }
.advice h3 { margin: 0; }
.advice p { font-size: 14.5px; line-height: 1.45; }
.shape-list { display: grid; gap: 10px; }
.shape { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 8px; border-radius: var(--r); background: var(--surface); border: 2px solid var(--line); text-align: left; }
.shape.on { border-color: var(--accent); background: var(--accent-soft); }
.shape div { display: grid; gap: 3px; }
.shape span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.shape-fig { width: 74px; height: 124px; flex-shrink: 0; color: #cdbba9; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Diario, statistiche, valigia, richiesta a parole */
.seg.wide { display: grid; grid-template-columns: repeat(3, 1fr); }
.seg.wide button { padding: 0 6px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; text-transform: capitalize; font-family: var(--serif); font-size: 19px; }
.flip { display: grid; transform: scaleX(-1); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-w { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-day { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.cal-day i { position: absolute; left: 4px; top: 2px; font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); }
.cal-day.has { background: var(--tile); border-color: transparent; }
.cal-day.future.has { background: var(--accent-soft); }
.cal-day.is-today { border: 2px solid var(--accent); }
.cal-day.is-today i { color: var(--accent); }
.cal-day .item-img { padding: 14% 6% 4%; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 2px; }
.stat b { font: 600 26px/1.1 var(--serif); }
.stat span { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.color-bar { display: flex; height: 22px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.thumb-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.thumb-row .piece-img { flex: 0 0 56px; }
.ask { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.ask .btn { min-width: 52px; padding: 0; min-height: 50px; }
.mode.trip { background: #dce8dc; color: #1f3d2a; }
.center-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding-bottom: 12px; }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper span { flex: 1; font-size: 14px; color: var(--muted); }
.stepper b { font: 600 24px var(--serif); min-width: 28px; text-align: center; }
.pack-list { display: grid; gap: 6px; }
.pack { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: left; min-height: 56px; }
.pack b { font-size: 14px; font-weight: 600; }
.pack .piece-img { flex: 0 0 40px; height: 44px; }
.pack-box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; flex-shrink: 0; }
.pack.done { opacity: .6; } .pack.done b { text-decoration: line-through; }
.pack.done .pack-box { background: var(--good); border-color: var(--good); color: #fff; }
.date-btn { position: relative; overflow: hidden; }
.date-btn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; }

/* ===== Stile "neutro" (modello di riferimento) =====
   Palette calda e neutra, titoli sans in grassetto, griglia a 3 colonne,
   filtri a pillola, barra in basso con "+" al centro. */
:root {
  --bg: #f3f2ef; --surface: #ffffff; --tile: #ebe9e5; --ink: #1c1c1e; --muted: #707074; --line: #e4e2dd;
  --accent: #1c1c1e; --accent-ink: #fff; --accent-soft: #ebe9e5;
  --serif: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --r: 18px; --nav-h: 66px;
}
h1 { font: 700 32px/1.1 var(--serif); letter-spacing: -.02em; }
h2 { font: 700 20px/1.2 var(--serif); letter-spacing: -.01em; }
.view { gap: 16px; }
.view-head { align-items: center; min-height: 48px; }
.sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.head-actions { display: flex; gap: 4px; }
.head-actions .icon-btn { width: 44px; height: 44px; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--tile); display: grid; place-items: center; flex-shrink: 0; }
.center-text { text-align: center; padding: 24px 0; }

/* Pulsanti e chip neutri */
.btn.primary { background: var(--ink); border-color: var(--ink); }
.chip.on { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.toast.ok { background: var(--ink); }
.fab { display: none; }

/* Filtri a pillola */
.seg-scroll { display: flex; gap: 2px; padding: 4px; border-radius: 16px; background: var(--tile); overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-scroll button { flex-shrink: 0; min-height: 40px; padding: 0 16px; border-radius: 12px; font-size: 15px; font-weight: 500; color: #3a3a3c; white-space: nowrap; transition: background .2s, box-shadow .2s; }
.seg-scroll button.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.seg button.on { font-weight: 700; }
.input.search { background: var(--surface); }

/* Griglia a 3 colonne, solo immagini */
.grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 480px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card-img { aspect-ratio: 1 / 1; border-radius: 16px; background: var(--tile); }
.card .card-meta { display: none; }
.card.pick .card-meta, .grid.small .card-meta { display: grid; }
.item-img { padding: 9%; filter: none; }
.card-fav { position: absolute; right: 8px; top: 8px; color: var(--ink); }
.card-fav svg { fill: currentColor; }
.card-badge { background: var(--surface); color: var(--ink); }

/* Elenco sotto la griglia */
.list-card { border-radius: var(--r); background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.05); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 16px; text-align: left; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row span { flex: 1; font-size: 16px; font-weight: 500; }
.list-row em { font-style: normal; color: var(--muted); font-size: 14px; }
.list-row svg:last-child { color: #b3b1ac; }
.list-row:active { background: var(--tile); }

/* Barra in basso con "+" al centro */
.tabbar { background: rgba(255,255,255,.94); border-top: 1px solid var(--line); align-items: center; }
.tabbar button { color: #8a8a8e; font-size: 11px; }
.tabbar button.on { color: var(--ink); font-weight: 700; }
.tabbar button.on svg { stroke-width: 2.2; }
.tabbar .tab-add { flex: 0 0 auto; width: 52px; height: 52px; margin: 0 6px; border-radius: 50%; background: var(--tile); color: var(--ink); display: grid; place-items: center; }
.tabbar .tab-add:active { transform: scale(.92); }

/* Home */
.home .view-head { align-items: flex-start; }
.hero { position: relative; display: block; width: 100%; min-height: 150px; padding: 26px 22px; border-radius: 22px; text-align: left; color: #fff; overflow: hidden;
  background: radial-gradient(120% 140% at 85% 20%, #e7e1d8 0%, #b9ad9e 38%, #8f8476 70%, #7a7065 100%); }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 95% 100%, rgba(255,255,255,.35), transparent 60%); pointer-events: none; }
.hero span { position: relative; z-index: 1; font: 500 27px/1.25 var(--serif); letter-spacing: -.01em; }
.hero small { position: relative; z-index: 1; display: block; margin-top: 10px; font-size: 13px; opacity: .85; }
.hero-go { position: absolute; z-index: 1; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-style: normal; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick button { display: grid; justify-items: center; gap: 10px; padding: 16px 4px 14px; border-radius: 18px; background: var(--tile); font-size: 12.5px; font-weight: 500; }
.quick button:active { transform: scale(.96); }
.sec-head { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 4px; text-align: left; }
.daily { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 22px; background: var(--tile); min-height: 170px; }
.daily-look { flex: 1.35; min-width: 0; }
.daily-text { flex: 1; display: grid; gap: 6px; padding-right: 18px; }
.daily-text p { font-size: 17px; line-height: 1.35; }
.daily-text small { color: var(--muted); font-size: 13px; }
.heart { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.heart.on svg { fill: var(--ink); }
.look-pieces { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.look-piece { flex: 1; height: 100%; min-width: 0; }
.look-pieces.n3 .look-piece:last-child { flex: .7; height: 60%; }
.look-piece .item-img { padding: 2%; }
.inspo-row { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.inspo-row::-webkit-scrollbar { display: none; }
.inspo-card { flex: 0 0 62%; scroll-snap-align: start; display: grid; gap: 8px; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.05); text-align: left; }
.inspo-card .look-pieces { height: 160px; }
.inspo-label { font-weight: 700; font-size: 15px; }
.empty.small { padding: 20px; background: var(--tile); border-radius: 18px; }

/* Ritocchi alle altre schermate */
.mode.pin { background: var(--tile); color: var(--ink); }
.mode.free { background: var(--ink); }
.mode.style { background: #e4dfd6; color: var(--ink); }
.mode.trip { background: var(--surface); color: var(--ink); }
.collage, .daily, .tray { background: var(--tile); }
.bands-center { background: rgba(255,255,255,.55); border-color: #d6d3cd; }
.shuffle { background: var(--ink); color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.verdict.good b { color: #1f6b47; }
.daily-text { padding-right: 34px; }
.daily-text p { font-size: 16px; }
.card-img > .item-img, .card-img > .img-ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.look-piece { position: relative; }
.look-piece > .item-img { position: absolute; inset: 0; width: 100%; height: 100%; object-position: bottom; }
.daily-look, .inspo-card { display: block; }
.look-pieces { width: 100%; }
.inspo-card .inspo-label { display: block; margin-top: 8px; }
/* Da rivedere e viste aperta/dietro */
.review-hero { position: relative; height: 300px; border-radius: 22px; background: var(--tile); flex-shrink: 0; }
.review-hero > .item-img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 6%; }
.review-hero .seg-scroll { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(255,255,255,.8); }
.seg-scroll.mini button { min-height: 32px; padding: 0 12px; font-size: 13px; }
.q { display: grid; gap: 8px; }
.q-title { font-weight: 600; font-size: 15px; }
.review-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; position: sticky; bottom: 0; padding: 10px 0; background: var(--bg); }
.review-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.06); text-align: left; }
.review-banner span { flex: 1; display: grid; gap: 2px; }
.review-banner small { color: var(--muted); font-size: 12.5px; }
.view-switch { display: grid; gap: 6px; }
.view-switch > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.review-hero { height: 230px; }
/* Foto grande sfogliabile */
.pager { position: relative; height: min(56vh, 460px); border-radius: 22px; background: var(--tile); flex-shrink: 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pager > .item-img, .pager > .img-ph { position: absolute; inset: 0; width: 100%; height: 100%; padding: 5%; }
.pager-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.12); display: grid; place-items: center; }
.pager-arrow.left { left: 10px; } .pager-arrow.right { right: 10px; }
.pager-arrow:active { transform: translateY(-50%) scale(.92); }
.pager-count { position: absolute; top: 12px; right: 14px; font-size: 12px; font-weight: 600; color: var(--muted); background: rgba(255,255,255,.85); padding: 3px 9px; border-radius: 999px; }
.pager-views { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(255,255,255,.85); }
.item-hero { display: none; }
.review-title { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.review-actions.three { grid-template-columns: 1fr 1fr 1.4fr; }
.q-head { display: flex; align-items: center; gap: 8px; }
.info-btn { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--muted); color: var(--muted); font: italic 700 13px/1 Georgia, serif; display: grid; place-items: center; }
.info-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.opt { position: relative; }
.opt-draw { width: 18px; height: 26px; fill: currentColor; stroke: currentColor; stroke-width: .6; opacity: .75; }
.sugg-tag { position: absolute; top: -9px; right: -4px; font-style: normal; font-size: 9.5px; font-weight: 700; background: #f3c969; color: #4a3806; padding: 1px 6px; border-radius: 999px; }
.gloss { margin: 4px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--surface); display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 13.5px; }
.gloss dt { font-weight: 700; }
.gloss dd { margin: 0; color: #3a3a3c; }
.q .chips-wrap { row-gap: 12px; padding-top: 4px; }
.opt-draw { width: 22px; height: 28px; flex-shrink: 0; align-self: center; }
.chip.opt { align-items: center; }
.preview-fig { position: relative; }
.card-brand { display: block; margin-top: 5px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); margin-top: -2px; }
.tips { padding: 14px 16px; border-radius: 16px; background: var(--surface); font-size: 14px; line-height: 1.45; display: grid; gap: 6px; }
.tips ol { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.tips small { color: var(--muted); }
.item-sub { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 36px; }
/* Tavola outfit stile Pinterest */
:root { --board: #e9e9eb; }
.board { position: relative; display: flex; justify-content: center; }
.board-empty { position: absolute; top: 45%; text-align: center; width: 100%; }
.shape-preview { display: grid; place-items: center; color: #cdbba9; }
.shape-preview .shape-fig { width: 120px; height: 220px; }

/* Per il tuo corpo */
.sec-sub { color: var(--muted); font-size: 14px; margin: -6px 0 10px; }
.body-best { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.body-best-item { background: var(--tile); border-radius: 16px; padding: 8px; display: grid; gap: 6px; }
.body-best-item .item-img { aspect-ratio: 1; }
.body-best-item small { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.body-look { display: grid; gap: 4px; margin: 0 0 12px; }
.body-look dt { font-weight: 600; margin-top: 8px; }
.body-look dd { margin: 0; color: var(--muted); line-height: 1.4; }

/* ===== Stile v2: minimal, neutro, editoriale (vedi PROMPT-stile.md) ===== */
:root {
  --bg: #f6f4f1; --surface: #ffffff; --tile: #edebe7; --tile-2: #e4e1dc; --board: #eeeef0;
  --ink: #1a1a1a; --muted: #7a7670; --line: #ece9e4;
  --accent: #1a1a1a; --accent-ink: #fff; --accent-soft: #e4e1dc;
  --glass: rgba(255, 255, 255, .55);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, system-ui, "Segoe UI", Roboto, sans-serif;
  --serif: var(--sans);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141312; --surface: #1d1c1b; --tile: #242322; --tile-2: #2e2c2a; --board: #1f1f21;
    --ink: #f2f0ec; --muted: #a29d96; --line: #2e2c2a; --accent: #f2f0ec; --accent-ink: #141312; --accent-soft: #2e2c2a;
    --glass: rgba(255, 255, 255, .08);
  }
}
body { background: var(--bg); color: var(--ink); font-family: var(--sans); }
h1 { font: 700 33px/1.1 var(--sans); letter-spacing: -.5px; }
h2 { font: 700 20px/1.2 var(--sans); letter-spacing: -.2px; }
h3 { font: 700 17px/1.25 var(--sans); text-transform: none; letter-spacing: -.1px; color: var(--ink); margin: 24px 0 10px; }
.sub, .view-head .sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.view { gap: 16px; }
.app { padding-left: 20px; padding-right: 20px; }
.chips-row, .inspo-row { margin: 0 -20px; padding-left: 20px; padding-right: 20px; }

/* Hero */
.hero { min-height: 150px; padding: 24px 22px; border-radius: 22px;
  background: radial-gradient(120% 140% at 85% 0%, rgba(255,255,255,.35), transparent 55%), linear-gradient(135deg, #b9b2a8, #8f877c); }
.hero span { font: 400 26px/1.25 var(--sans); letter-spacing: -.3px; }
.hero-go { box-shadow: 0 1px 2px rgba(0,0,0,.04); }

/* Accessi rapidi, card, liste */
.quick button { background: var(--tile); border-radius: 18px; min-height: 96px; align-content: center; font-size: 13px; }
.sec-head h2 { font-size: 20px; }
.daily { background: var(--tile); border-radius: 22px; }
.daily-text p { font-size: 17px; font-weight: 400; }
.heart { background: var(--surface); }
.inspo-card { flex: 0 0 70%; background: var(--tile); box-shadow: none; border-radius: 18px; padding: 12px; }
.inspo-label { font-size: 15px; font-weight: 600; }
.review-banner, .list-card, .action { background: var(--surface); border: 0; box-shadow: none; border-radius: 20px; }
.action svg { color: var(--ink); }
.btn { border-radius: 999px; border: 0; background: var(--tile); }
.btn.primary { background: var(--ink); color: var(--accent-ink); }
.chip { border-color: transparent; background: var(--tile); }
.chip.on { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
.seg, .seg-scroll { background: var(--tile-2); border-radius: 999px; padding: 4px; }
.seg button, .seg-scroll button { border-radius: 999px; color: var(--muted); font-weight: 500; }
.seg button.on, .seg-scroll button.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.card-img { background: var(--tile); border-radius: 16px; }
.card-img .item-img { padding: 12%; }
.sheet { background: var(--bg); }
.sheet-head h2 { font-size: 20px; }
.tabbar { background: var(--surface); border-top: 0; box-shadow: 0 -1px 0 var(--line); }
.tabbar button.on { color: var(--ink); }
.tabbar .tab-add { width: 48px; height: 48px; background: var(--tile); }
.notice, .banner { border-radius: 16px; }
:focus-visible { outline-color: var(--ink); }
a, .link-btn { color: var(--ink); }

/* Tavola outfit */
.board { position: relative; width: 100%; max-width: min(420px, calc(72vh * var(--ar, .56))); margin: 0 auto; background: var(--board); border-radius: 20px; overflow: hidden; }
.board-item { position: absolute; object-fit: contain; object-position: center; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .08)); pointer-events: none; }
.board-item.top { object-position: center top; }
.board-acc { position: absolute; display: grid; place-items: center; border-radius: 22%; background: var(--glass); border: 1px solid rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.board-acc img { width: 74%; height: 74%; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .1)); }
.board-palette { position: absolute; left: 12.5%; width: 75%; display: flex; align-items: center; justify-content: center; gap: 6%; border-radius: 999px; background: var(--glass); border: 1px solid rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.board-palette i { height: 66%; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.board.compact { border-radius: 16px; max-width: none; }
.board.big { margin-bottom: 4px; }
.collage-board { width: 100%; }
.outfit-grid .board { border-radius: 16px; }
.result .board { border-radius: 22px; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ===== Stile v3: identico al modello (Home, Guardaroba, Ispirati, Outfit) ===== */
:root {
  --bg: #f8f7f5; --surface: #ffffff; --tile: #efedea; --tile-2: #e9e7e3; --board: #efefef;
  --ink: #161616; --muted: #6f6b66; --line: #ecebe8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #121212; --surface: #1c1c1c; --tile: #232322; --tile-2: #2b2b2a; --board: #1e1e1f; --ink: #f4f3f1; --muted: #a09c97; --line: #2b2b2a; }
}
html, body { background: var(--bg); }
.view-head { min-height: 52px; margin-top: 6px; }
.view-head h1 { font-size: 32px; font-weight: 700; letter-spacing: -.6px; }
.head-actions { display: flex; gap: 6px; }
.head-actions .icon-btn { width: 40px; height: 40px; }
.avatar { width: 46px; height: 46px; background: var(--tile-2); }

/* Hero: tessuto drappeggiato */
.hero { min-height: 146px; padding: 26px 22px; border-radius: 20px; color: #fff;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(255,255,255,.55), transparent 55%),
    radial-gradient(55% 90% at 62% 120%, rgba(70,58,46,.35), transparent 60%),
    linear-gradient(118deg, transparent 38%, rgba(255,255,255,.28) 52%, transparent 60%, rgba(60,50,40,.16) 70%, transparent 78%, rgba(255,255,255,.22) 88%, transparent 96%),
    linear-gradient(100deg, #9d958a 0%, #b6aea3 40%, #cbc4ba 68%, #a79f93 100%); }
.hero { background-color: #a9a196; }
.hero::after { background: linear-gradient(160deg, transparent 50%, rgba(255,255,255,.18) 64%, transparent 72%); }
.hero span { font: 400 27px/1.28 var(--sans); letter-spacing: -.3px; text-shadow: 0 1px 12px rgba(0,0,0,.08); }
.hero small { display: none; }
.hero-go { width: 42px; height: 42px; right: 16px; bottom: 16px; }

.quick { gap: 9px; }
.quick button { min-height: 92px; border-radius: 16px; background: var(--tile); gap: 12px; font-size: 13px; font-weight: 500; }
.sec-head { margin-top: 10px; }
.sec-head h2 { font-size: 20px; font-weight: 700; }
.daily { min-height: 160px; border-radius: 20px; background: var(--tile); }
.daily-text small { display: none; }
.daily-text p { font-size: 17px; line-height: 1.3; }

/* Riga orizzontale di tavole (Home) */
.inspo-row { align-items: flex-start; gap: 10px; }
.inspo-row .look-tile { flex: 0 0 56%; scroll-snap-align: start; }

/* Tavola in card con cuore */
.look-tile { position: relative; display: block; text-align: left; cursor: pointer; border-radius: 16px; overflow: hidden; background: var(--board); transition: transform .15s var(--ease); }
.look-tile:active { transform: scale(.98); }
.look-tile .board { border-radius: 0; background: transparent; }
.tile-heart { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.tile-heart.on svg { fill: var(--ink); }
.tile-label { display: block; padding: 0 12px 12px; margin-top: -4px; font-size: 14px; font-weight: 600; }

/* Mosaico a mattoni */
.mosaic { columns: 2; column-gap: 10px; }
.mosaic > * { break-inside: avoid; margin-bottom: 10px; width: 100%; }
.text-tile { position: relative; display: grid; align-content: start; gap: 6px; width: 100%; min-height: 150px; padding: 18px 16px 60px; border-radius: 16px; background: var(--tile); text-align: left; transition: transform .15s var(--ease); }
.text-tile:active { transform: scale(.98); }
.text-tile b { font-size: 20px; font-weight: 500; line-height: 1.2; letter-spacing: -.2px; }
.text-tile small { font-size: 13px; color: var(--muted); line-height: 1.35; }
.text-tile.dark { background: var(--ink); color: var(--bg); }
.tile-go { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); color: var(--ink); display: grid; place-items: center; font-style: normal; }

/* Outfit salvati: mosaico */
.outfit-grid { display: block; columns: 2; column-gap: 10px; }
.outfit-card { break-inside: avoid; margin-bottom: 12px; width: 100%; }
.outfit-card .board { border-radius: 16px; }

/* Guardaroba */
.grid { gap: 9px; }
.card-img { border-radius: 14px; }
.list-card { border-radius: 18px; margin-top: 8px; }
.list-row span { font-size: 15.5px; }

/* Filtri */
.seg-scroll, .seg { background: var(--tile-2); }
.seg-scroll button, .seg button { min-height: 38px; font-size: 14.5px; color: #3c3a37; }

/* Tab bar */
.tabbar { box-shadow: none; border-top: 1px solid var(--line); }
.tabbar button { color: #8b8884; }
.tabbar button.on { color: var(--ink); }
.tabbar .tab-add { background: var(--tile-2); }

/* ===== Stile v4: colori presi dalle immagini del modello ===== */
:root {
  --bg: #f5f3f1; --surface: #ffffff; --tile: #ece8e5; --tile-2: #eeebe8; --board: #fcfaf8; --card: #fcfaf8;
  --ink: #151515; --muted: #6e6a66; --line: #e8e4e0; --disabled: #e1dbd6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #121212; --surface: #1c1c1c; --tile: #252423; --tile-2: #2a2928; --board: #1b1b1b; --card: #1b1b1b; --ink: #f4f3f1; --muted: #a09c97; --line: #2b2b2a; --disabled: #2e2c2a; }
}
html, body, .sheet, .tabbar { background: var(--bg); }
.tabbar { border-top: 1px solid var(--line); }
.quick button, .daily, .card-img, .text-tile, .empty.small { background: var(--tile); }
.avatar { background: #dbd7d3; }
.list-card, .review-banner { background: #fbfaf9; }

/* Hero con il tessuto */
.hero { background: #a9a196 url("../img/hero-tessuto.jpg") center / cover no-repeat; min-height: 148px; }
.hero::after { display: none; }
.hero span { font: 400 26px/1.3 var(--sans); }

/* Outfit del giorno: tavola a sinistra con le proporzioni vere */
.daily { min-height: 168px; padding: 12px 16px 12px 12px; }
.daily-look { flex: 1.25; height: 150px; }
.daily-look .board { height: 100%; background: transparent; }

/* Tavola */
.board { position: relative; width: 100%; max-width: none; aspect-ratio: auto; background: transparent; border-radius: 0; overflow: visible; }
.board svg { display: block; width: 100%; height: auto; max-height: 68vh; }
.board.compact svg { height: 100%; max-height: none; }
.board-wait { aspect-ratio: 3 / 4; }
.result-card { background: var(--card); border-radius: 20px; padding: 14px; }
.result-card .board svg { max-height: 62vh; margin: 0 auto; }
.result-bar { display: flex; justify-content: space-around; align-items: center; background: #efebe8; border-radius: 20px; padding: 10px 6px; margin-top: 12px; }
.result-bar button { width: 52px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--ink); }
.result-bar button.on svg { fill: var(--ink); }
.result-bar button:active { background: var(--tile); }

/* Mosaico Ispirati: un riquadro grande + due medi, poi tre piccoli (come il modello) */
.mosaic { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 132px; gap: 8px; columns: auto; }
.mosaic > * { margin: 0; break-inside: auto; min-width: 0; min-height: 0; }
.mosaic .g-big { grid-column: span 3; grid-row: span 2; }
.mosaic .g-med { grid-column: span 3; }
.mosaic .g-sm { grid-column: span 2; grid-row: span 1; }
.look-tile { background: var(--tile); border-radius: 14px; display: flex; flex-direction: column; padding: 10px 8px 6px; }
.look-tile .board { flex: 1; min-height: 0; }
.look-tile .board svg { height: 100%; width: 100%; max-height: none; }
.look-tile .tile-label { padding: 4px 4px 2px; margin: 0; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inspo-row .look-tile { height: 230px; flex: 0 0 52%; }
.tile-heart { width: 30px; height: 30px; top: 6px; right: 6px; background: rgba(255,255,255,.7); }
.text-tile { min-height: 0; height: 100%; padding: 14px 12px 50px; border-radius: 14px; }
.text-tile b { font-size: 17px; font-weight: 500; }
.text-tile small { font-size: 12px; }
.text-tile .tile-go { width: 34px; height: 34px; right: 10px; bottom: 10px; }
.outfit-grid { display: grid; grid-template-columns: 1fr 1fr; columns: auto; gap: 10px; }
.outfit-card { margin: 0; background: var(--tile); border-radius: 14px; padding: 10px; }
.outfit-card .board { height: 190px; }
.outfit-card .board svg { height: 100%; max-height: none; }

/* Crea un outfit */
.create2 { padding-bottom: 90px; }
.nav-row { display: flex; justify-content: space-between; margin: -4px -10px 0; }
.create2 header h1 { font-size: 30px; }
.create2 .sub { margin-top: 6px; font-size: 16px; }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot-grid.chosen { grid-template-columns: repeat(6, 1fr); }
.slot { position: relative; border-radius: 18px; background: var(--tile); color: var(--ink); }
.slot.empty { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 18px 6px 14px; min-height: 172px; text-align: center; }
.slot-grid.compact .slot.empty { min-height: 128px; padding: 12px 4px 10px; gap: 4px; }
.slot-ico { color: #2a2a2a; }
.slot-label { font-size: 14px; line-height: 1.25; }
.slot-label small { display: block; font-size: 11.5px; color: var(--muted); }
.slot-plus { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-style: normal; margin-top: auto; }
.slot-grid.compact .slot-plus { width: 30px; height: 30px; }
.slot.filled { grid-column: span 3; display: flex; flex-direction: column; align-items: center; padding: 12px 10px 12px; min-height: 186px; }
.slot.filled.big { min-height: 236px; }
.slot.filled.small { grid-column: span 2; min-height: 160px; }
.slot-imgs { flex: 1; width: 100%; display: flex; gap: 6px; min-height: 0; }
.slot-img { position: relative; flex: 1; min-width: 0; }
.slot-img .item-img { position: absolute; inset: 6px 4px 4px; width: calc(100% - 8px); height: calc(100% - 10px); object-fit: contain; }
.slot-x { position: absolute; top: -4px; right: -4px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink); }
.slot.filled .slot-label { margin-top: 6px; text-align: center; font-size: 13.5px; }
.slot-more { position: absolute; left: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.slot-title { font-size: 13px; font-weight: 600; color: var(--muted); margin: 4px 0 -4px; }
.create-cta { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); padding: 0 20px; z-index: 10; max-width: 560px; margin: 0 auto; }
.create-cta .btn { min-height: 56px; font-size: 17px; border-radius: 999px; margin: 0; }
.create-cta .btn:disabled { background: var(--disabled); color: #a49d97; opacity: 1; }

/* Crea un outfit: icone tutte sulla stessa linea, poco sopra la scritta */
.slot.empty { display: grid; grid-template-rows: 1fr auto auto; justify-items: center; align-items: end; gap: 6px; padding: 14px 6px 14px; min-height: 184px; }
.slot-ico { height: 50px; display: flex; align-items: flex-end; justify-content: center; }
.slot.empty .slot-label { align-self: start; min-height: 46px; display: block; }
.slot.empty .slot-plus { margin-top: 4px; }
.slot-grid.compact .slot.empty { min-height: 150px; gap: 4px; padding: 10px 4px; }
.slot-grid.compact .slot-ico { height: 38px; }
.slot-grid.compact .slot.empty .slot-label { min-height: 40px; font-size: 12.5px; }
.slot-grid .slot.empty:last-child:nth-child(3n+1) { grid-column: 2; }
.slot.empty { grid-template-rows: 58px 64px auto; align-items: start; min-height: 0; padding: 16px 6px 14px; }
.slot.empty .slot-ico { align-self: end; height: auto; }
.slot.empty .slot-label { min-height: 0; }
.slot.empty .slot-plus { align-self: end; }
.slot-grid.compact .slot.empty { grid-template-rows: 44px 54px auto; padding: 12px 4px 10px; }
.create2 { padding-bottom: 120px; }

/* ===== Margini, scorrimento col dito, taglia, animazioni stile iOS ===== */
:root { --ios: cubic-bezier(.32, .72, 0, 1); --spring: cubic-bezier(.34, 1.36, .64, 1); }

/* Riga orizzontale: margine bianco a destra e a sinistra anche durante lo scorrimento */
.inspo-row { scroll-padding-inline: 20px; padding-bottom: 6px; }
.inspo-row::after { content: ""; flex: 0 0 10px; }

/* Carosello: scorrimento nativo con scatto, come nelle Foto di iPhone */
.swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; border-radius: 20px; }
.swipe::-webkit-scrollbar { display: none; }
.swipe-page { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; min-width: 0; }
.pager { position: relative; }
.pager .swipe { background: var(--tile); }
.pager-img { aspect-ratio: 1 / 1.05; display: grid; place-items: center; padding: 8%; }
.pager-img .item-img, .pager-img .img-ph { width: 100%; height: 100%; object-fit: contain; }
.pager-arrow { display: none !important; }
.preview-fig .result-card { margin: 0; }
.dots-row { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots-row i { width: 6px; height: 6px; border-radius: 50%; background: #cfcac5; transition: width .3s var(--ios), background .3s; }
.dots-row i.on { width: 18px; border-radius: 3px; background: var(--ink); }

/* Marca · taglia */
.item-sub-row { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.item-sub-dot { color: var(--muted); }
.size-select { position: relative; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.size-select select { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; font-size: 16px; cursor: pointer; }
.size-sheet .size-select { width: 100%; justify-content: space-between; min-height: 50px; padding: 0 16px; border-radius: 14px; background: var(--surface); font-weight: 600; }
.select-field { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 0 16px; border-radius: 14px; background: var(--surface); }
.select-field select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); width: 100%; height: 50px; outline: none; }
.select-field svg { pointer-events: none; color: var(--muted); }

/* Animazioni: brevi, morbide, come in iOS */
.sheet { animation: sheet-ios .45s var(--ios); }
.sheet-backdrop { animation: fade .3s ease; }
@keyframes sheet-ios { from { transform: translateY(100%); } to { transform: none; } }
.view { animation: view-in .32s var(--ios); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
button, .look-tile, .card, .slot, .quick button, .text-tile { transition: transform .22s var(--ios), background-color .2s ease, opacity .2s ease, box-shadow .2s ease; }
button:active:not(:disabled), .look-tile:active, .card:active { transform: scale(.965); }
.tabbar button:active { transform: scale(.9); }
.seg-scroll button, .seg button, .chip { transition: background-color .25s var(--ios), color .25s var(--ios), box-shadow .25s var(--ios), transform .2s var(--ios); }
.heart.on svg, .tile-heart.on svg, .result-bar button.on svg { animation: pop .42s var(--spring); }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.grid .card, .mosaic > *, .inspo-row > *, .slot { animation: rise .45s var(--ios) both; }
.grid .card:nth-child(n+4), .mosaic > :nth-child(n+3) { animation-delay: .04s; }
.grid .card:nth-child(n+7), .mosaic > :nth-child(n+5) { animation-delay: .08s; }
.grid .card:nth-child(n+10) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.toast { animation: toast-ios .4s var(--spring); }
@keyframes toast-ios { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet, .view, .grid .card, .mosaic > *, .inspo-row > *, .slot, .toast, .board svg { animation: none !important; } }
.item-sub-row { flex-direction: row; flex-wrap: nowrap; margin: 2px 0 4px; }
.item-sub-row > .item-sub { width: auto; display: inline-flex; align-items: center; gap: 4px; margin: 0; min-height: 36px; }

/* ===== Riquadro outfit fisso, indicatore discreto, pressione stile iOS, intestazione ===== */
/* Il riquadro bianco ha sempre la stessa misura: cambiano solo i capi dentro. */
.preview-fig .result-card, .sheet .result-card { aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden; }
.result-card .board { width: 100%; height: 100%; }
.result-card .board svg { width: 100%; height: 100%; max-height: none; margin: 0; }
.result-card .board-wait { width: 100%; height: 100%; aspect-ratio: auto; }
.preview-fig .swipe { border-radius: 20px; }

/* Indicatore di pagina come quello di iOS: puntini piccoli e grigi, nessuna barra nera */
.dots-row { gap: 7px; margin-top: 12px; }
.dots-row i, .dots-row i.on { width: 7px; height: 7px; border-radius: 50%; }
.dots-row i { background: rgba(60, 60, 67, .18); transition: background .35s var(--ios), transform .35s var(--ios); }
.dots-row i.on { background: rgba(60, 60, 67, .6); transform: scale(1.05); }

/* Pressione: rimpicciolisce e si attenua subito, al rilascio torna con una leggera molla */
button, a, .look-tile, .card, [role="button"], .item-sub { transition: transform .38s var(--spring), opacity .3s ease, background-color .2s ease; -webkit-user-select: none; user-select: none; }
.is-pressed { transform: scale(.96) !important; opacity: .72; transition: transform .12s ease-out, opacity .08s ease-out !important; }
.tabbar .is-pressed, .icon-btn.is-pressed, .slot-x.is-pressed, .tile-heart.is-pressed { transform: scale(.86) !important; }
.btn.primary.is-pressed { opacity: .82; }
.card.is-pressed, .look-tile.is-pressed, .slot.is-pressed, .quick .is-pressed { transform: scale(.975) !important; }

/* Voti sugli outfit */
.rate-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.rate { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 999px; background: var(--tile); font-weight: 600; font-size: 15px; }
.rate.on { background: var(--ink); color: var(--bg); }
.rate.on svg { animation: pop .42s var(--spring); }

/* Saluto e foto profilo un po' più in basso, lontani dalla barra di stato */
.home .view-head { margin-top: 18px; }
.app { padding-top: calc(var(--safe-t) + 22px); }

/* ===== Correzioni ===== */
/* Nei pannelli nessun blocco deve schiacciarsi (prima la lista dei campi di un capo spariva). */
.sheet-body > * { flex-shrink: 0; }
/* Saluto su una riga anche con "Buongiorno" e nomi lunghi */
.home .view-head h1 { font-size: clamp(24px, 7.6vw, 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.home .view-head > div { min-width: 0; }
/* La comparsa delle schermate non deve usare transform: i pannelli finivano sotto la barra in basso. */
@keyframes view-in { from { opacity: 0; } to { opacity: 1; } }
.home .view-head h1 { line-height: 1.25; padding-bottom: 2px; }

/* Scheda di un capo: foto a misura fissa (prima usciva dal riquadro), dettagli in una raccolta */
.pager { height: auto; background: none; touch-action: auto; }
.pager .swipe { height: min(50vh, 400px); }
.pager .swipe-page { height: 100%; }
.pager-img { height: 100%; aspect-ratio: auto; padding: 7%; }
details.more { background: var(--surface); border-radius: 18px; padding: 0 14px; }
details.more > summary { list-style: none; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; min-height: 56px; padding: 10px 0; font-weight: 600; font-size: 15.5px; cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary small { grid-column: 1; font-weight: 400; font-size: 12.5px; color: var(--muted); }
details.more > summary::after { content: ""; grid-row: 1 / span 2; grid-column: 2; width: 9px; height: 9px; border-right: 1.7px solid var(--muted); border-bottom: 1.7px solid var(--muted); transform: rotate(45deg); transition: transform .3s var(--ios); margin-top: -4px; }
details.more[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
details.more[open] > :not(summary) { animation: fadein .3s ease; }
details.more .fields { margin: 0 -14px; border-radius: 0; background: transparent; }
details.more .item-actions { padding-bottom: 14px; }
details.more > .hint { padding-bottom: 12px; }
.item-actions.main { grid-template-columns: 1fr 1fr; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* Da rivedere: la foto scorre con la pagina (non resta ferma sopra le domande); il capo si adatta al riquadro. */
.review-photo { position: relative; margin: 0; padding: 0 0 4px; }
.review-photo .pager .swipe { height: min(44vh, 380px); }
.review-photo .pager-img { padding: 2%; }
/* Il capo entra sempre tutto nel riquadro (la griglia non deve allungarsi oltre l'altezza). */
.pager-img { grid-template: 100% / 100%; min-height: 0; overflow: hidden; }
.pager-img .item-img, .pager-img .img-ph { min-height: 0; max-height: 100%; }

/* ===================== Stile v5 · Porcelain & Mulberry =====================
   Base iOS minimale + tocco editoriale. Tre livelli: sfondo porcellana, schede bianche
   per le funzioni, superfici materiche (tessuti) solo per i contenuti editoriali.
   Un solo colore di accento (Mulberry) per azioni principali, selezioni e dettagli. */
:root {
  --bg: #f7f5f2; --surface: #ffffff; --tile: #eeeae7; --tile-2: #f3efec; --card: #ffffff; --board: #ffffff;
  --ink: #242225; --muted: #77716f; --line: #ebe6e2;
  --accent: #79536b; --accent-ink: #ffffff; --accent-soft: #f2eaef; --accent-2: #5f3f53;
  --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --shadow-1: 0 1px 2px rgba(36, 34, 37, .04), 0 6px 20px rgba(36, 34, 37, .05);
}
html, body, .sheet { background: var(--bg); }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }

/* Tipografia: 4 livelli */
.view-head h1, .home-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 10px; }
.sec-row h2 { font-size: 21px; font-weight: 700; letter-spacing: -.015em; }
.see-all { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 15px; font-weight: 500; }
.sec-sub { color: var(--muted); font-size: 14.5px; margin: -4px 0 10px; }
.kicker { font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kicker.light { color: rgba(255, 255, 255, .85); }

/* Pulsanti e selezioni con l'accento */
.btn.primary, .pill { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.on, .seg-scroll button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn, .action { border-radius: var(--r-sm); }
.spinner { border-top-color: var(--accent); }
.tile-heart.on, .heart.on { color: var(--accent); }
.tile-heart.on svg, .heart.on svg { fill: var(--accent); }

/* Barra in basso: vetro */
.tabbar { background: rgba(247, 245, 242, .72); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); border-top: .5px solid rgba(36, 34, 37, .1); }
.tabbar button { color: #9a9491; }
.tabbar button.on { color: var(--ink); font-weight: 600; }
.tabbar .tab-add { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); border: .5px solid var(--line); }

/* ---- Home ---- */
.home.v5 { padding-bottom: 28px; }
.home-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-top: 6px; margin-bottom: 14px; }
.home-head h1 { white-space: normal; font-size: clamp(26px, 7.6vw, 32px); }
.date-kicker { color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.home-head .sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.home-head .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--tile); display: grid; place-items: center; flex-shrink: 0; }
.review-pill { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-2); text-align: left; margin-bottom: 12px; }
.review-pill span { flex: 1; font-size: 14.5px; }

.today { position: relative; display: grid; grid-template-columns: 124px 1fr; align-items: center; gap: 2px; min-height: 320px; padding: 16px 4px 16px 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.today-text { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.today .serif { font-size: clamp(27px, 8vw, 34px); line-height: 1.08; color: var(--ink); }
.today .rule { display: block; width: 34px; height: 2px; border-radius: 2px; background: var(--accent); }
.today-sub { font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 600; margin-top: 6px; }
.today .pill { white-space: nowrap; padding: 0 10px 0 13px; gap: 4px; font-size: 14.5px; }
.today-board { height: 300px; min-width: 0; }
.today-board .board { height: 100%; }
.today-board .board svg { height: 100%; width: 100%; max-height: none; }
.today .heart { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .9); display: grid; place-items: center; box-shadow: var(--shadow-1); }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.duo-btn { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 12px 0 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-1); font-size: 15px; font-weight: 600; text-align: left; }
.duo-btn span { flex: 1; }
.duo-btn > svg:last-child { color: var(--muted); }
.duo-btn.tint { background: var(--accent-soft); color: var(--accent-2); }

.inspo-row { gap: 10px; }
.look-tile { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: 12px 10px 8px; }
.inspo-row .look-tile { height: 236px; flex: 0 0 46%; }
.look-tile .tile-label { font-size: 13px; font-weight: 600; padding-top: 6px; }
.tile-heart { background: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .06); }

.editorial { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; min-height: 150px; margin-top: 26px; padding: 20px 64px 20px 20px; border-radius: var(--r-lg); color: #fff; text-align: left; background: #7d6f69 url("../img/hero-tessuto.jpg") center / cover no-repeat; overflow: hidden; }
.editorial::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(95, 63, 83, .78), rgba(95, 63, 83, .25) 70%); }
.editorial > * { position: relative; }
.editorial .serif { font-size: 28px; line-height: 1.1; }
.editorial small { font-size: 14px; opacity: .92; line-height: 1.35; }
.editorial .round-go { position: absolute; right: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; }

.closet-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.closet-thumb { aspect-ratio: 3 / 4; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1); display: grid; place-items: center; padding: 8px; }
.closet-thumb .item-img { width: 100%; height: 100%; object-fit: contain; }

/* ---- Ispirati ---- */
.seg-scroll { gap: 8px; }
.seg-scroll button { min-height: 36px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: .5px solid var(--line); font-size: 14.5px; font-weight: 500; color: var(--ink); }
.ins-head { margin: 18px 0 12px; }
.ins-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.ins-head .sec-sub { margin: 4px 0 0; }
.look-tile.hero-look { height: min(108vw, 440px); padding: 18px 16px 14px; border-radius: var(--r-lg); }
.look-caption { margin: 10px 2px 4px; }
.look-caption b, .pair-item b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.look-caption small, .pair-item small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.look-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.pair-item .look-tile { height: 236px; margin-bottom: 8px; }
.pair-item b { font-size: 15px; }
.ins .inspo-row { margin-top: 18px; }

.explore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tex-tile { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: var(--tile); text-align: left; }
.tex-img { position: absolute; inset: 0; overflow: hidden; }
.tex-img .item-img { width: 100%; height: 100%; object-fit: cover; transform: scale(2.6); transform-origin: 50% 42%; }
.tex-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(36, 34, 37, .62), transparent 60%); }
.tex-tile b { position: absolute; z-index: 1; left: 12px; right: 10px; bottom: 11px; color: #fff; font-size: 15px; font-weight: 600; line-height: 1.2; }

.studio { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; }
.ask-field { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 16px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-1); color: var(--muted); font-size: 15.5px; text-align: left; }
.ask-field svg { color: var(--accent); }
.group-list { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); overflow: hidden; }
.group-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px 14px; text-align: left; }
.group-row + .group-row { border-top: .5px solid var(--line); }
.group-row span { flex: 1; min-width: 0; }
.group-row b { display: block; font-size: 15.5px; font-weight: 600; }
.group-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 1px; }
.group-row > svg:last-child { color: #b9b3b0; }
.gr-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }

/* Angoli più precisi */
.card-img, .outfit-card, .result-card, .slot { border-radius: var(--r-md); }
.sheet { border-radius: 24px 24px 0 0; }
.today .kicker { white-space: nowrap; }
.duo-btn { gap: 8px; font-size: 14.5px; padding: 0 10px 0 12px; }
.duo-btn span { white-space: nowrap; }
.closet-strip { display: grid !important; padding: 0; }
.closet-thumb { min-width: 0; overflow: hidden; }
.closet-thumb .item-img { max-width: 100%; max-height: 100%; }
.home.v5 { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 28px); }
.seg-scroll { background: none; padding: 2px 0; box-shadow: none; }
.head-count { color: var(--muted); font-size: 15px; margin-top: 2px; }
.w-quick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 4px -20px 12px; padding: 0 20px; scroll-padding-inline: 20px; }
.w-quick::-webkit-scrollbar { display: none; }
.w-quick button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: .5px solid var(--line); font-size: 14px; font-weight: 500; white-space: nowrap; }
.w-quick button.on { background: var(--accent-soft); color: var(--accent-2); border-color: transparent; }
.card-img { background: var(--surface); box-shadow: var(--shadow-1); }
/* Anteprima guardaroba in Home: riquadri tutti uguali e allineati, il capo si adatta dentro */
.closet-strip { align-items: start; }
.closet-thumb { position: relative; display: block; height: 0; padding: 0 0 133% 0; aspect-ratio: auto; }
.closet-thumb .item-img { position: absolute; inset: 10%; width: 80%; height: 80%; object-fit: contain; }
.head-count { display: flex; align-items: center; gap: 10px; }
.sort-select { position: relative; display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 14.5px; font-weight: 500; }
.sort-select svg { order: 2; }
.sort-select select { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; }
.grid-sec { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 10px; }
.grid-sec h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.grid-sec span { color: var(--muted); font-size: 14px; }
/* Completi */
.set-ask { display: grid; gap: 6px; padding: 16px; margin: 0 0 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-1); }
.set-ask b { font-size: 16px; }
.set-ask small { color: var(--muted); font-size: 13.5px; }
.set-pics { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.set-pics i { font-style: normal; color: var(--muted); font-size: 20px; }
.set-pic { width: 84px; height: 104px; border-radius: var(--r-sm); background: var(--bg); display: grid; place-items: center; padding: 6px; }
.set-pic .item-img { width: 100%; height: 100%; object-fit: contain; }
.set-pic.small { width: 48px; height: 58px; flex-shrink: 0; }
.set-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 8px; }
.set-btns .btn { min-height: 44px; font-size: 14.5px; }
.set-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-1); }
.set-row > div { flex: 1; min-width: 0; }
.set-row b { display: block; font-size: 14.5px; }
.set-row small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-pic { position: relative; overflow: hidden; }
.set-pic .item-img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
/* Diario: celle uguali, outfit intero in miniatura dentro ogni giorno */
.cal { gap: 5px; }
.cal-day { aspect-ratio: 3 / 4; min-width: 0; border-radius: 10px; background: var(--surface); border: .5px solid var(--line); box-shadow: none; padding: 0; }
.cal-day.has { background: var(--surface); border-color: var(--line); }
.cal-day.future.has { background: var(--accent-soft); }
.cal-day.is-today { border: 1.5px solid var(--accent); }
.cal-board { position: absolute; inset: 15px 2px 2px; display: block; }
.cal-board .board { width: 100%; height: 100%; }
.cal-board .board svg { width: 100%; height: 100%; max-height: none; }

/* Strati del look (collant, termici): riga sotto la tavola e dettaglio Visibili / Nascosti. */
.layers-row { display: flex; align-items: center; gap: 12px; width: 100%; margin: 12px 0 4px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--tile); text-align: left; color: var(--ink); }
.layers-row:active { filter: brightness(.97); }
.layers-ico { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); color: var(--accent); }
.layers-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.layers-txt b { font-size: 15px; font-weight: 600; }
.layers-txt small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layers-row > svg:last-child { color: var(--muted); flex-shrink: 0; }
.layers-seg { margin: 12px 0; }
.layers-seg button { flex: 1; }
.layer-card { display: flex; gap: 14px; align-items: center; padding: 10px; margin-bottom: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.layer-img { flex: 0 0 96px; height: 110px; border-radius: 12px; background: var(--tile); overflow: hidden; }
.layer-img .item-img { padding: 6%; }
.layer-txt { display: grid; gap: 3px; font-size: 14px; line-height: 1.4; color: var(--muted); min-width: 0; }
.layer-txt b { font-size: 16px; color: var(--ink); }
.layer-txt .eyebrow { margin: 0; color: var(--accent); }

/* Fai spazio nell'armadio: gruppi di capi simili e swipe tengo / via. */
.dc-back { display: inline-flex; align-items: center; gap: 4px; margin: -6px 0 6px; }
.dc-cards { display: grid; gap: 10px; margin-top: 14px; }
.dc-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 14px 14px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left; color: var(--ink); }
.dc-card:disabled { opacity: .55; }
.dc-card.via { background: var(--accent-soft); border-color: transparent; }
.dc-ico { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--tile); color: var(--accent); }
.dc-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dc-txt b { font-size: 16px; font-weight: 600; }
.dc-txt small { font-size: 13px; color: var(--muted); line-height: 1.35; }
.dc-card > svg:last-child { color: var(--muted); flex-shrink: 0; }
.dc-title { margin: 2px 0 6px; }
.dc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.dc-tile { position: relative; display: grid; gap: 2px; font-size: 13px; min-width: 0; }
.dc-tile b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-tile small { color: var(--muted); font-size: 12px; }
.dc-tile-img { aspect-ratio: 4 / 5; border-radius: 14px; background: var(--tile); overflow: hidden; margin-bottom: 4px; }
.dc-tile-img .item-img { padding: 8%; }
.dc-twin { position: absolute; top: 8px; right: 8px; min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.dc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dc-nav { display: flex; justify-content: space-between; margin-top: 6px; }
.dc-nav .link-btn { display: inline-flex; align-items: center; gap: 4px; }
.dc-nav .link-btn:disabled { opacity: .35; }
.dc-swipe { position: relative; height: min(62vh, 520px); margin: 8px 0 14px; touch-action: pan-y; }
.dc-card-big { position: absolute; inset: 0; display: flex; flex-direction: column; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .08); overflow: hidden; cursor: grab; user-select: none; touch-action: none; transition: transform .22s var(--ease); }
.dc-card-big.drag { transition: none; cursor: grabbing; }
.dc-big-img { flex: 1; min-height: 0; background: var(--tile); }
.dc-big-img .item-img { padding: 8%; pointer-events: none; }
.dc-big-txt { padding: 14px 16px 16px; display: grid; gap: 3px; }
.dc-big-txt b { font-size: 18px; }
.dc-big-txt small { color: var(--muted); }
.dc-why { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dc-why span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--tile); color: var(--ink); }
.dc-stamp { position: absolute; top: 18px; z-index: 2; padding: 6px 14px; border: 3px solid currentColor; border-radius: 12px; font-weight: 800; font-size: 22px; letter-spacing: .08em; pointer-events: none; }
.dc-stamp.keep { left: 18px; color: var(--good); transform: rotate(-12deg); }
.dc-stamp.away { right: 18px; color: var(--bad); transform: rotate(12deg); }
.dc-swipe-btns { display: flex; justify-content: center; align-items: center; gap: 22px; }
.dc-round { display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.dc-round > svg { box-sizing: content-box; padding: 16px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, .07); }
.dc-round.no > svg { color: var(--bad); }
.dc-round.yes > svg { color: var(--good); }
.dc-round.skip > svg { padding: 12px; }
.dc-via { display: grid; gap: 10px; margin-top: 12px; }
.dc-via-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.dc-via-img { flex: 0 0 56px; height: 64px; border-radius: 10px; background: var(--tile); }
.dc-via-img .item-img { padding: 6%; }
.dc-via-txt { flex: 1; min-width: 0; display: grid; }
.dc-via-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-via-txt small { color: var(--muted); font-size: 12px; }

/* Uso del capo nella scheda: volte, costo per utilizzo, outfit. */
.usage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 4px; padding: 14px 12px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.usage-cell { display: grid; justify-items: center; gap: 2px; text-align: center; min-width: 0; }
.usage-cell b { font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.usage-cell span { font-size: 12px; color: var(--muted); }
.usage-cell .link-btn { min-height: 0; font-size: 12px; padding: 0; color: var(--accent); }
.usage-foot { grid-column: 1 / -1; margin: 6px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); text-align: center; }
.link-btn.inline { display: inline; min-height: 0; padding: 0; font-size: inherit; color: var(--accent); }

/* Look di oggi: "Lo indosso oggi" con un tocco, sotto "Vedi il look". */
.wear-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); min-height: 36px; }
.wear-link.on { color: var(--good, #2f7a55); }

/* Da comprare: lista dei desideri con controllo dei doppioni. */
.wish-form { display: grid; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); margin: 12px 0; }
.wish-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.wish-two { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.wish-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.wish-list { display: grid; gap: 10px; margin-top: 14px; }
.wish { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; }
.wish-head { display: flex; align-items: center; gap: 12px; }
.wish-dot { flex: 0 0 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.wish-txt { flex: 1; min-width: 0; display: grid; }
.wish-txt b { font-size: 15px; }
.wish-txt small { color: var(--muted); font-size: 12.5px; }
.wish-verdict { margin: 0; font-size: 13.5px; line-height: 1.4; padding: 8px 10px; border-radius: 12px; }
.wish-verdict.warn { background: var(--warn-soft, #fbecd2); color: var(--warn, #a2610d); }
.wish-verdict.ok { background: var(--good-soft, #dff0e6); color: var(--good, #2f7a55); }
.wish-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Dove si trova il capo: nell'armadio, in lavatrice, prestato. */
.away-row { display: flex; gap: 4px; padding: 4px; margin: 10px 0 2px; border-radius: 14px; background: var(--tile); }
.away-row button { flex: 1; min-height: 38px; border-radius: 11px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.away-row button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.card-badge.away { background: rgba(255, 255, 255, .92); color: var(--ink); }

/* Comodità: titolo sopra, pallini sotto (sui telefoni stretti il titolo non va più a capo su tre righe). */
.comfort-box { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 10px; }
.comfort-box div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.comfort-box .dots { display: flex; justify-content: space-around; }

/* Cambio di stagione */
.season-pill { display: flex; align-items: stretch; gap: 4px; margin: 0 0 12px; border-radius: 18px; background: var(--accent-soft); }
.season-main { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 6px 12px 14px; text-align: left; font-size: 14px; color: var(--ink); min-width: 0; }
.season-main span { flex: 1; min-width: 0; line-height: 1.35; }
.season-main > svg { color: var(--accent); flex-shrink: 0; }
.season-x { flex: 0 0 40px; display: grid; place-items: center; color: var(--muted); }
.season-sec { margin-top: 18px; display: grid; gap: 10px; }
.season-head { display: flex; align-items: center; justify-content: space-between; }
.season-head h3 { margin: 0; }
.season-head.as-btn { width: 100%; color: var(--muted); }
.season-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.season-tile { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; background: var(--tile); overflow: hidden; border: 2px solid var(--accent); transition: opacity .15s, border-color .15s; }
.season-tile.off { border-color: transparent; opacity: .45; }
.season-img { position: absolute; inset: 0; }
.season-img .item-img { padding: 8%; }
.season-check { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.season-tile.off .season-check { background: rgba(255, 255, 255, .85); color: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.card.stored .card-img > :not(.card-badge) { opacity: .45; }
.away-row button { font-size: 12.5px; padding: 0 2px; }
.season-ask { display: grid; gap: 10px; margin: 14px 0 4px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.season-ask.todo { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.season-ask > b { font-size: 16px; }
.season-ask small { font-size: 12px; color: var(--muted); }
.season-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.season-choice button { display: grid; align-content: start; gap: 4px; padding: 12px; border-radius: 14px; background: var(--tile); text-align: left; color: var(--ink); border: 2px solid transparent; }
.season-choice button b { font-size: 14.5px; }
.season-choice button span { font-size: 12px; line-height: 1.35; color: var(--muted); }
.season-choice button.on { background: var(--accent-soft); border-color: var(--accent); }
.season-title { margin: 22px 0 2px; }
.season-how { display: flex; align-items: center; gap: 6px; margin: -4px 0 0; font-size: 12.5px; color: var(--accent); }
.season-bar { position: sticky; bottom: 0; padding: 12px 0 4px; background: linear-gradient(to top, var(--bg) 70%, transparent); margin-top: 8px; }

/* Riquadri "su misura" (come nel riferimento): altezza fissa, larghezza data dalla forma dell'outfit. */
.inspo-row .look-tile.fit { height: auto; flex: 0 0 auto; padding: 10px 10px 10px; }
.look-tile.fit .board { flex: none; }
.look-tile.fit .board svg { width: 100%; height: 100%; }
.look-tile.fit .tile-label { width: 0; min-width: 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; padding: 8px 2px 0; font-size: 13.5px; font-weight: 500; }

/* Viste del capo (Davanti / Aperto / Dietro): sotto la foto, staccate dal capo. */
.pager-views { position: static; transform: none; width: max-content; max-width: 100%; margin: 10px auto 0; }
/* Crea un outfit: tocca la foto di un capo scelto per cambiarlo; filtri per categoria nella scelta. */
.slot-change { position: absolute; inset: 0; display: block; padding: 0; background: none; border-radius: 12px; }
.slot-x { z-index: 2; }
.pick-cats { position: sticky; top: 0; z-index: 2; margin: 0 0 6px; }
.pick-head { font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 2px 8px; }

/* "Più caldo" / "Più fresco" sotto ogni outfit */
.tune { margin: 16px 0 8px; }
.tune-q { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 2px 8px; }
.tune-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tune-row .btn { justify-content: flex-start; gap: 10px; min-height: 58px; padding: 8px 14px; text-align: left; }
.tune-row .btn span { display: flex; flex-direction: column; line-height: 1.2; }
.tune-row .btn small { font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.tune-done { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 8px 2px 0; }
.tune-done > span { flex: 1; min-width: 0; }
.tune-done .link-btn { min-height: 36px; flex: none; }
.tune-feel { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 6px 2px 0; line-height: 1.4; }
.tune-feel > span { flex: 1; min-width: 0; }
.tune-feel .link-btn { min-height: 32px; flex: none; font-size: 13px; }
.feel-box { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--tile); font-size: 14px; line-height: 1.45; }
.feel-box p { margin: 0; flex: 1; }
.feel-box .link-btn { min-height: 32px; flex: none; }

/* "Ce l'ho già?" */
.shop-working { display: grid; justify-items: center; gap: 10px; margin: 8px 0 12px; }
.shop-working p { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 0; }
.shop-photo { width: 132px; height: 160px; object-fit: contain; border-radius: 14px; background: var(--tile); flex: none; }
.shop-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 10px; }
.shop-head .eyebrow { margin: 0 0 4px; }
.shop-head .hint { margin: 6px 0 0; }
.shop-verdict { font-size: 20px; line-height: 1.2; margin: 0; }
.shop-verdict.warn { color: var(--bad); }
.shop-verdict.ok { color: var(--good, var(--ink)); }
.shop-list { display: grid; gap: 8px; margin: 10px 0; }
.shop-row { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.shop-row .piece-img { width: 56px; height: 56px; flex: none; }
.shop-row b { display: block; font-size: 14px; }
.shop-row span { font-size: 13px; color: var(--muted); }
.shop-row .lvl-3, .shop-row .lvl-2 { color: var(--bad); font-weight: 600; }
.shop-actions { display: grid; gap: 8px; margin-top: 12px; }

/* Foto dei capi più grandi: riempiono il riquadro lasciando solo un piccolo margine (regola di Giorgia). */
.pager-img { padding: 3%; }
.pager-img .item-img { padding: 0; }
.review-photo .pager-img { padding: 2%; }
.card-img .item-img { padding: 5%; }
.season-choice.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 420px) { .season-choice.three { grid-template-columns: 1fr; } }
.pref-name { margin: 6px 0 12px; }
.shop-row > div:not(.piece-img) { flex: 1; min-width: 0; }

/* Benvenuto e preferenze, una domanda per pagina */
.ob-progress { display: flex; gap: 4px; margin: 0 0 16px; }
.ob-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.ob-progress i.on { background: var(--accent); }
.ob-title { font-size: 20px; line-height: 1.25; margin: 4px 0 10px; }
.ob-opts { display: grid; gap: 8px; margin: 12px 0; }
.ob-opt { display: grid; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); }
.ob-opt b { font-size: 16px; }
.ob-opt span { font-size: 13px; color: var(--muted); }
.ob-opt.on { border-color: var(--accent); background: var(--accent-soft, var(--tile)); }
.ob-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.ob-result { margin: 8px 0 12px; }
.shape-list { margin-top: 12px; }

/* Titolo dei look: spazio per le lettere con la gamba (g, p, q), che venivano tagliate. */
.look-tile .tile-label { line-height: 1.4; padding-bottom: 4px; flex: none; }

.worn { display: grid; gap: 8px; margin: 12px 0; }
.worn-img { width: 100%; border-radius: 16px; background: var(--tile); }

/* Cuore dei preferiti: cerchio lilla, cuore a filo malva scuro (come "Sorprendimi"); pieno = nei preferiti. */
.fav-heart { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #ebe0f0; color: var(--accent-2, #5f3f53); border: 0; }
.fav-heart.on { background: #e3d3ec; }
.fav-heart svg { fill: none; }
.fav-heart.on svg path { fill: currentColor; }
.tile-heart.fav-heart { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; z-index: 2; background: #ebe0f0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.heart.fav-heart { position: absolute; right: 12px; bottom: 12px; }
.fig-heart { position: absolute; top: 10px; right: 10px; z-index: 3; }
.preview-fig, .result, .outfit-card { position: relative; }
.sheet-fav { position: static; margin: 0 0 8px auto; }

.taste-formulas { margin: 4px 0 8px; padding-left: 18px; font-size: 14px; line-height: 1.5; }

/* Potrebbe piacerti: per ora senza foto, colore e tipo del pezzo. */
.wish-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.wish-row::-webkit-scrollbar { display: none; }
.wish-card { flex: 0 0 62%; max-width: 260px; scroll-snap-align: start; background: var(--tile, #f4efe9); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.wish-swatch { height: 96px; display: flex; align-items: flex-end; padding: 10px 12px; background: var(--c); }
.wish-swatch.stripes { background: repeating-linear-gradient(0deg, var(--c) 0 10px, #f3ede4 10px 16px); }
.wish-swatch.checks { background: repeating-linear-gradient(0deg, transparent 0 12px, rgba(255,255,255,.35) 12px 18px), repeating-linear-gradient(90deg, var(--c) 0 12px, rgba(0,0,0,.18) 12px 18px); }
.wish-swatch span { background: rgba(255,255,255,.88); color: #3a2f35; border-radius: 999px; padding: 3px 10px; font-size: 12px; text-transform: capitalize; }
.wish-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.wish-body b { font-size: 15px; line-height: 1.25; }
.wish-body small { font-size: 12px; color: var(--ink-2, #6b6168); line-height: 1.35; }
.wish-body small.muted { opacity: .8; font-style: italic; }
.wish-btns { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.wish-btns .btn.small { padding: 6px 10px; font-size: 13px; text-decoration: none; }
.wish-btns .icon-btn { margin-left: auto; }
.ref-looks { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 8px; }
.ref-looks li { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; background: var(--tile, #f4efe9); border-radius: 12px; padding: 8px 10px; }
.ref-looks small { display: block; font-size: 12px; color: var(--ink-2, #6b6168); }
.wish-row { align-items: flex-start; }
.wish-swatch.light { box-shadow: inset 0 0 0 1px rgba(60,40,50,.14); border-radius: 16px 16px 0 0; }
.wish-card { background: var(--card, #fff); box-shadow: 0 1px 0 rgba(60,40,50,.06), 0 0 0 1px rgba(60,40,50,.06); }
.wish-row { scroll-padding-inline: 20px; }
.dots-count { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px; }

/* Account */
.acc-social { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.acc-social .btn { justify-content: center; gap: 10px; }
.acc-logo { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; }
.acc-google .acc-logo { background: #4285f4; }
.acc-facebook .acc-logo { background: #1877f2; font-family: Georgia, serif; }
.acc-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: var(--ink-2, #6b6168); font-size: 13px; }
.acc-or::before, .acc-or::after { content: ''; flex: 1; height: 1px; background: rgba(0,0,0,.12); }
.acc-tabs { margin-bottom: 10px; }
.acc-form { display: flex; flex-direction: column; gap: 10px; }
.acc-user { display: flex; gap: 12px; align-items: center; margin: 6px 0 12px; }
.acc-user b { display: block; }
.acc-user span { font-size: 13px; color: var(--ink-2, #6b6168); }
.acc-ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tile, #f4efe9); }
.acc-ask { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 6px; }
.acc-bar { height: 6px; border-radius: 3px; background: rgba(0,0,0,.08); margin-top: 8px; overflow: hidden; }
.acc-bar i { display: block; height: 100%; background: currentColor; opacity: .55; transition: width .3s; }
.acc-skip { display: block; margin: 18px auto 0; font-size: 13px; text-align: center; }
