/* WTF OS: tema desktop per whatsup.wtf */
:root {
  --desk: #2b3fe0;
  --title: #1a26a8;
  --sticker: #ffe14d;
  --sale: #ff5a36;
  --plastic: #d8d2c2;
  --plastic-hi: #f6f2e8;
  --plastic-lo: #8a816d;
  --plastic-deep: #3b3528;
  --paper: #fbf9f3;
  --ink: #161412;
  --muted: #625a4b;
  --bar-h: 42px;
  --f-ui: "Atkinson Hyperlegible", system-ui, sans-serif;
  --f-px: "Pixelify Sans", "Atkinson Hyperlegible", monospace;
  --f-term: "VT323", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  touch-action: manipulation;
  overflow: hidden;
  font: 15px/1.5 var(--f-ui);
  color: var(--ink);
  background: var(--desk);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--title); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px dashed var(--sticker); outline-offset: 2px; }
.sr, .seo {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
html.js .page-src { display: none; }
html:not(.js) .page-src { position: relative; z-index: 5; background: var(--paper); margin: 24px; padding: 24px; max-width: 720px; }
html:not(.js) .seo { position: static !important; width: auto; height: auto; clip: auto; white-space: normal; }

/* ---------- Desktop ---------- */
.desk {
  position: fixed; inset: 0 0 var(--bar-h) 0;
  overflow: hidden;
  background-color: var(--desk);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.22) 1.2px, transparent 1.6px);
  background-size: 18px 18px;
}
.desk-mark {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
}
.desk-mark span {
  font: 700 clamp(44px, 11vw, 168px)/1 var(--f-px);
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,.28);
  transform: rotate(-4deg);
  white-space: nowrap;
}

.wtf-apps-section { display: none; }
.icons {
  position: absolute; inset: 12px 10px 10px;
  display: flex; justify-content: space-between; align-items: flex-start;
  pointer-events: none;
  z-index: 1;
}
.icons-col {
  display: flex; flex-direction: column; flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px 6px;
  max-height: 100%;
  pointer-events: auto;
}
.icons-col.is-right { align-content: flex-end; }
.dicon {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 92px; padding: 6px 2px;
  background: none; border: 0; cursor: pointer;
  color: #fff; text-decoration: none;
}
.dicon svg, .dicon-img { width: 52px; height: 52px; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.35)); }
.dicon-img { object-fit: contain; }
.icons.is-pixel .dicon-img { image-rendering: pixelated; }
.dicon:active svg, .dicon:active .dicon-img { transform: translateY(1px); }
.dicon-label {
  font: 600 13px/1.2 var(--f-px);
  text-align: center;
  padding: 1px 4px;
  text-shadow: 1px 1px 0 #000;
  word-break: break-word;
  max-width: 88px;
}
.dicon.is-selected .dicon-label, .dicon:focus-visible .dicon-label {
  background: var(--sticker); color: var(--ink); text-shadow: none;
}
.dicon:focus-visible { outline: none; }

/* ---------- Bevel helpers ---------- */
.bevel-out, .btn, .win-btn, .start, .task {
  border: 2px solid;
  border-color: var(--plastic-hi) var(--plastic-deep) var(--plastic-deep) var(--plastic-hi);
  box-shadow: inset -1px -1px 0 var(--plastic-lo);
}
.bevel-in, .field, .statusbar > *, .addr {
  border: 2px solid;
  border-color: var(--plastic-lo) var(--plastic-hi) var(--plastic-hi) var(--plastic-lo);
}

/* ---------- Windows ---------- */
.win {
  position: absolute;
  display: flex; flex-direction: column;
  min-width: 260px; min-height: 150px;
  background: var(--plastic);
  border: 2px solid;
  border-color: var(--plastic-hi) var(--plastic-deep) var(--plastic-deep) var(--plastic-hi);
  box-shadow: 0 0 0 1px #000, 7px 7px 0 rgba(0,0,0,.28);
}
.win.is-opening { animation: win-open .16s steps(4) both; }
@keyframes win-open { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.win.is-max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; box-shadow: none; }
.win.is-min { display: none; }

.win-bar {
  flex: none;
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 3px 0 6px;
  background: #7d7666;
  color: #e8e3d6;
  cursor: grab; user-select: none; touch-action: none;
}
.win.is-active .win-bar {
  background: var(--title);
  color: #fff;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 2px, transparent 2px 6px);
}
.win-bar:active { cursor: grabbing; }
.win-bar svg { width: 18px; height: 18px; flex: none; }
.win-title {
  flex: 1; min-width: 0;
  font: 600 14px/1 var(--f-px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.win-btns { display: flex; gap: 2px; }
.win-btn {
  width: 24px; height: 21px; padding: 0;
  display: grid; place-items: center;
  background: var(--plastic); color: var(--ink);
  font: 700 12px/1 var(--f-px); cursor: pointer;
}
.win-btn:active, .btn:active, .start[aria-expanded="true"], .task.is-active {
  border-color: var(--plastic-deep) var(--plastic-hi) var(--plastic-hi) var(--plastic-deep);
  box-shadow: inset 1px 1px 0 var(--plastic-lo);
}
.win-body { flex: 1; min-height: 0; overflow: auto; container-type: inline-size; }
.win-grip {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px;
  cursor: nwse-resize; touch-action: none;
  background:
    linear-gradient(135deg, transparent 0 55%, var(--plastic-lo) 55% 62%, transparent 62% 72%, var(--plastic-lo) 72% 79%, transparent 79%);
}

/* ---------- Generic UI ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 4px 14px;
  background: var(--plastic);
  font: 700 14px/1.1 var(--f-ui);
  color: var(--ink); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--sticker); }
.btn[disabled] { color: var(--plastic-lo); cursor: not-allowed; }
.field {
  width: 100%; min-height: 34px; padding: 5px 8px;
  background: #fff; color: var(--ink);
  font: 15px/1.3 var(--f-ui); border-radius: 0;
}
label { display: block; font-weight: 700; margin: 12px 0 4px; }
.muted { color: var(--muted); }

.toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 6px;
  border-bottom: 1px solid var(--plastic-lo);
  box-shadow: 0 1px 0 var(--plastic-hi);
}
.toolbar .field { width: auto; min-height: 30px; padding: 3px 6px; font-size: 14px; }
.toolbar input[type="search"] { flex: 1 1 140px; }
.toolbar .btn { min-height: 30px; padding: 2px 10px; font-size: 13px; }
.addr {
  flex: 1 1 220px; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 3px 8px;
  background: #fff;
  font: 400 11px/1 var(--f-px);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.statusbar {
  flex: none;
  display: flex; gap: 3px; padding: 3px;
  font-size: 13px;
}
.statusbar > * { padding: 1px 8px; flex: 1; }
.statusbar > *:last-child { flex: 0 0 auto; }

/* ---------- Explorer ---------- */
.explorer { display: flex; flex-direction: column; height: 100%; }
.explorer-main { flex: 1; overflow-x: hidden; overflow-y: auto; background: var(--paper); margin: 0 6px; overscroll-behavior: contain; }
.win-body { overflow-x: hidden; }
.catbar { display: flex; gap: 0; padding: 6px 6px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 2px solid var(--plastic-deep); }
.catbar[hidden] { display: none; }
.catbar::-webkit-scrollbar { display: none; }
.cat-btn {
  flex: none; min-height: 36px; padding: 4px 12px; margin-bottom: -2px; margin-right: 2px;
  background: var(--plastic); font: 700 14px/1 var(--f-ui); cursor: pointer; color: var(--ink);
  border: 2px solid; border-bottom: 0; border-color: var(--plastic-hi) var(--plastic-deep) var(--plastic-deep) var(--plastic-hi);
}
.cat-btn small { font-weight: 400; color: var(--muted); }
.cat-btn[aria-selected="true"] { background: var(--paper); padding-bottom: 6px; position: relative; z-index: 1; }
.cat-btn:disabled { color: var(--plastic-lo); cursor: default; }
.size-btn:disabled { opacity: .4; cursor: default; }
.sizebar { display: flex; gap: 4px; align-items: center; overflow-x: auto; padding: 6px; scrollbar-width: none; }
.sizebar[hidden] { display: none; }
.sizebar::-webkit-scrollbar { display: none; }
.sizebar-label { font: 11px var(--f-px); margin-right: 4px; flex: none; }
.size-btn { flex: none; min-height: 32px; min-width: 40px; padding: 2px 10px; font-size: 14px; }
.size-btn[aria-pressed="true"] { background: var(--title); color: #fff; }
.size-chip { display: inline-block; margin-right: 6px; padding: 0 6px; background: var(--title); color: #fff; font-weight: 700; font-size: 12px; }
.file-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 22px 16px;
  padding: 18px 16px 26px;
}
.file {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  padding: 6px; margin: 0;
  background: none; border: 1px solid transparent;
  text-align: left; cursor: default;
}
.file:hover { border-color: rgba(26,38,168,.25); }
.file.is-selected { border: 1px dotted var(--title); background: rgba(43,63,224,.08); }
.file-img {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #fff;
  padding: 6px 6px 18px;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 2px 3px 0 rgba(0,0,0,.14);
}
.file:nth-child(3n+1) .file-img { transform: rotate(-1.2deg); }
.file:nth-child(3n+2) .file-img { transform: rotate(.8deg); }
.file-img img { width: 100%; height: 100%; object-fit: cover; background: #ece8dd; }
.file-img.is-empty { display: grid; place-items: center; color: var(--muted); font: 11px var(--f-px); }
.file-name {
  font: 700 13px/1.3 var(--f-ui);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.file-meta { font-size: 13px; color: var(--muted); }

/* price sticker: il dettaglio memorabile */
.tag {
  position: absolute; right: -8px; bottom: 4px;
  display: inline-flex; flex-direction: column; align-items: flex-end;
  padding: 4px 8px 4px 12px;
  background: var(--sticker); color: var(--ink);
  font: 700 14px/1.05 var(--f-ui);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
  transform: rotate(-5deg);
  box-shadow: 1px 1px 0 rgba(0,0,0,.2);
}
.tag::before {
  content: ""; position: absolute; left: 5px; top: 50%;
  width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%;
  background: var(--paper);
}
.tag s { font-size: 11px; font-weight: 400; opacity: .7; }
.tag.is-sale { background: var(--sale); color: #fff; }
.stamp {
  position: absolute; left: 50%; top: 42%;
  transform: translate(-50%, -50%) rotate(-14deg);
  padding: 4px 10px;
  border: 3px solid var(--sale); color: var(--sale);
  font: 700 18px/1 var(--f-px);
  background: rgba(251,249,243,.85);
  white-space: nowrap;
}
.file.is-sold img { filter: grayscale(1) contrast(.9); opacity: .75; }

.files.is-list { grid-template-columns: 1fr; gap: 0; padding: 4px 8px; }
.files.is-list .file { flex-direction: row; align-items: center; gap: 12px; border-bottom: 1px solid #e6e1d4; }
.files.is-list .file-img { width: 54px; flex: none; padding: 3px; transform: none; box-shadow: none; border: 1px solid #ddd6c6; }
.files.is-list .tag, .files.is-list .stamp { display: none; }
.files.is-list .file-text { flex: 1; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.files.is-list .file-meta { color: var(--ink); font-weight: 700; }

.empty {
  display: grid; place-items: center; gap: 10px;
  min-height: 220px; padding: 30px; text-align: center; color: var(--muted);
}
.empty svg { width: 48px; height: 48px; opacity: .7; }
.loading { padding: 30px; font: 12px var(--f-px); color: var(--muted); }
.loading::after { content: "_"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Product ---------- */
.pv {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px; padding: 14px; min-height: 100%;
}
@container (max-width: 620px) { .pv { grid-template-columns: minmax(0, 1fr); } }
.pv > * { min-width: 0; }
.pv-size { margin: -6px 0 14px; font-size: 16px; }
.pv-size strong { display: inline-block; margin-left: 6px; padding: 2px 10px; background: var(--title); color: #fff; }
.pv-stage { background: #fff; padding: 10px 10px 34px; box-shadow: 2px 3px 0 rgba(0,0,0,.15); align-self: start; }
.pv-main { aspect-ratio: 4 / 5; background: #ece8dd; }
.pv-main img { width: 100%; height: 100%; object-fit: cover; }
.pv-thumbs { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; }
.pv-thumb { flex: none; width: 58px; aspect-ratio: 4/5; padding: 0; border: 2px solid transparent; background: #ece8dd; cursor: pointer; }
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pv-thumb[aria-current="true"] { border-color: var(--title); }
.pv-info h2 { font: 700 26px/1.12 var(--f-ui); margin: 4px 0 8px; letter-spacing: -.01em; }
.pv-vendor { font: 11px var(--f-px); color: var(--muted); margin: 0; }
.pv-price { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 14px; }
.pv-price strong { font: 700 22px/1 var(--f-ui); padding: 5px 10px; background: var(--sticker); }
.pv-price.is-sale strong { background: var(--sale); color: #fff; }
.pv-price s { color: var(--muted); }
.opt { border: 0; padding: 0; margin: 0 0 12px; }
.opt legend { font-weight: 700; margin-bottom: 6px; }
.opt-vals { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-val { min-width: 44px; min-height: 36px; padding: 4px 10px; font-size: 14px; }
.opt-val[aria-pressed="true"] { background: var(--title); color: #fff; }
.opt-val.is-out { text-decoration: line-through; color: var(--plastic-lo); }
.qty { display: inline-flex; align-items: stretch; margin-right: 8px; }
.qty .btn { min-width: 34px; padding: 0; }
.qty input { width: 48px; text-align: center; }
.buy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.buy-row .btn-primary { flex: 1; min-height: 44px; font-size: 16px; }
.pv-tabs { display: flex; gap: 2px; margin-top: 18px; }
.pv-tab { min-height: 30px; padding: 2px 12px; font-size: 13px; }
.pv-tab[aria-selected="true"] { background: var(--paper); border-bottom-color: var(--paper); }
.pv-panel { background: var(--paper); padding: 12px 14px; max-height: 320px; overflow: auto; }
.msg { font-size: 14px; margin: 6px 0 0; min-height: 1.4em; }
.msg.is-err { color: #b3261e; }

/* ---------- Doc / notepad ---------- */
.doc { padding: 16px 20px 24px; background: var(--paper); min-height: 100%; }
.doc > :first-child { margin-top: 0; }
.doc h1 { font: 700 24px/1.15 var(--f-ui); margin: 0 0 10px; }
.doc h2 { font: 700 19px/1.2 var(--f-ui); margin: 18px 0 8px; }
.doc h3 { font: 700 16px/1.3 var(--f-ui); margin: 16px 0 6px; }
.doc p, .doc li { max-width: 66ch; }
.doc img { margin: 10px 0; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc-table th, .doc-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #ddd6c6; }
.doc-card { padding: 10px; margin: 8px 0; background: #fff; border: 1px solid #ddd6c6; }
.doc .errors { color: #b3261e; }
.gift-code { font: 700 18px var(--f-px); background: var(--sticker); padding: 4px 8px; }
.dialog { display: flex; gap: 14px; align-items: flex-start; }
.dialog-ico svg { width: 40px; height: 40px; }
.nl-row { display: flex; gap: 6px; }
.nl-row .field { flex: 1; }
.nl-ok { padding: 10px; background: var(--sticker); font-weight: 700; }
.nl-err { color: #b3261e; font-weight: 700; }
details { margin-top: 14px; }
summary { cursor: pointer; font-weight: 700; }

/* ---------- Cart ---------- */
.cart { display: flex; flex-direction: column; height: 100%; }
.cart-list { flex: 1; overflow: auto; background: var(--paper); margin: 6px 6px 0; }
.ci { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px; border-bottom: 1px solid #e6e1d4; align-items: start; }
.ci-img { aspect-ratio: 4/5; background: #ece8dd; border: 1px solid #ddd6c6; }
.ci-img img { width: 100%; height: 100%; object-fit: cover; }
.ci-title { font-weight: 700; line-height: 1.25; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(0,0,0,.25); }
.ci-var { font-size: 13px; color: var(--muted); }
.ci-controls { display: flex; gap: 4px; margin-top: 8px; align-items: center; }
.ci-controls .btn { min-height: 28px; min-width: 28px; padding: 0 6px; font-size: 13px; }
.ci-controls span { min-width: 24px; text-align: center; }
.ci-price { font-weight: 700; text-align: right; }
.cart-foot { padding: 12px 12px 10px; }
.ship-bar { margin-bottom: 10px; font-size: 14px; }
.ship-track { height: 14px; margin-top: 4px; background: #fff; padding: 2px; }
.ship-fill { height: 100%; background: repeating-linear-gradient(90deg, var(--title) 0 8px, transparent 8px 10px); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 16px; }
.cart-total strong { font-size: 20px; }
.cart-foot .btn-primary { width: 100%; min-height: 46px; font-size: 16px; }

/* ---------- Search ---------- */
.search-form { display: flex; gap: 6px; padding: 8px; }
.search-form .field { flex: 1; }

/* ---------- Taskbar ---------- */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--bar-h);
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
  background: var(--plastic);
  border-top: 2px solid var(--plastic-hi);
  box-shadow: 0 -1px 0 #000;
  z-index: 9000;
}
.start {
  display: flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px 0 6px;
  background: var(--plastic);
  font: 700 15px/1 var(--f-ui); cursor: pointer;
}
.start-logo {
  display: grid; place-items: center;
  width: 22px; height: 22px;
  background: var(--desk); color: var(--sticker);
  font: 700 11px/1 var(--f-px);
  transform: rotate(-6deg);
}
.tasks { flex: 1; min-width: 0; display: flex; gap: 4px; overflow: hidden; }
.task {
  display: flex; align-items: center; gap: 6px;
  flex: 0 1 180px; min-width: 40px; height: 32px; padding: 0 8px;
  background: var(--plastic); cursor: pointer;
  font-size: 13px; text-align: left;
}
.task.is-active { background: var(--plastic-hi); font-weight: 700; }
.task svg { width: 16px; height: 16px; flex: none; }
.task span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tray {
  display: flex; align-items: center; gap: 10px;
  height: 32px; padding: 0 10px;
  border: 2px solid; border-color: var(--plastic-lo) var(--plastic-hi) var(--plastic-hi) var(--plastic-lo);
}
.tray-cart { display: flex; align-items: center; gap: 4px; color: var(--ink); text-decoration: none; font-weight: 700; }
.tray-cart svg { width: 18px; height: 18px; }
.tray-cart.is-bump { animation: bump .4s steps(3); }
@keyframes bump { 50% { transform: translateY(-4px); } }
.clock { font: 12px var(--f-px); }
.tray-lang { display: flex; align-items: center; gap: 3px; font: 700 11px var(--f-px); letter-spacing: .04em; }
.tray-lang a { color: inherit; opacity: .55; text-decoration: none; padding: 6px 2px; }
.tray-lang a:hover, .tray-lang a:focus-visible { opacity: 1; text-decoration: underline; }
.tray-lang span { opacity: .35; }
.tray-sound { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; background: none; border: 0; cursor: pointer; }
.tray-sound svg { width: 20px; height: 20px; }

/* ---------- Start menu ---------- */
.startmenu {
  position: fixed; left: 4px; bottom: calc(var(--bar-h) - 2px);
  display: flex; width: 280px; max-height: calc(100% - var(--bar-h) - 8px);
  background: var(--plastic);
  border: 2px solid; border-color: var(--plastic-hi) var(--plastic-deep) var(--plastic-deep) var(--plastic-hi);
  box-shadow: 0 0 0 1px #000, 6px 6px 0 rgba(0,0,0,.3);
  z-index: 9100;
}
.startmenu[hidden] { display: none; }
.startmenu-band {
  writing-mode: vertical-rl; transform: rotate(180deg);
  padding: 12px 6px;
  background: var(--desk); color: var(--sticker);
  font: 700 18px/1 var(--f-px);
}
.startmenu-list { flex: 1; padding: 4px; overflow: auto; }
.sm-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; background: none; border: 0;
  font-size: 15px; text-align: left; color: var(--ink); text-decoration: none; cursor: pointer;
}
.sm-item svg { width: 24px; height: 24px; flex: none; }
.sm-item:hover, .sm-item:focus-visible { background: var(--title); color: #fff; outline: none; }
.sm-sep { height: 0; margin: 4px 2px; border-top: 1px solid var(--plastic-lo); border-bottom: 1px solid var(--plastic-hi); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; right: 12px; bottom: calc(var(--bar-h) + 12px);
  display: flex; gap: 10px; align-items: center;
  max-width: 320px; padding: 10px 12px;
  background: var(--sticker); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 rgba(0,0,0,.35);
  font-weight: 700; z-index: 9200;
}

/* ---------- Boot & shutdown ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 8vh 8vw;
  background: #080a24; color: #d8dcff;
  font: 24px/1.25 var(--f-term);
  cursor: pointer;
}
.overlay .boot-brand { font: 700 clamp(34px, 7vw, 76px)/1 var(--f-px); color: var(--sticker); margin-bottom: 26px; }
.overlay .boot-bar { display: flex; gap: 4px; margin-top: 18px; }
.overlay .boot-bar i { width: 16px; height: 22px; background: var(--desk); opacity: .25; }
.overlay .boot-bar i.on { opacity: 1; background: var(--sticker); }
.overlay .boot-skip { margin-top: 24px; opacity: .6; font-size: 20px; }
.overlay.is-off { background: #000; align-items: center; text-align: center; }

/* ---------- Password page ---------- */
body.is-password { overflow: auto; }
.pw-desk { inset: 0; display: grid; place-items: center; padding: 20px; }
.pw-win { position: relative; width: min(440px, 100%); }
.pw-win .win-bar { cursor: default; }
.pw-details { margin-top: 18px; }

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  :root { --bar-h: 54px; }
  .cat-btn { padding: 4px 8px; font-size: 13px; }
  .cat-btn small { font-size: 11px; }
  .icons { inset: 16px 8px 12px; }
  .icons-col { flex-wrap: nowrap; overflow-y: auto; gap: 18px; padding-bottom: 8px; scrollbar-width: none; }
  .dicon { width: 104px; }
  .dicon svg, .dicon-img { width: 72px; height: 72px; }
  .dicon-label { font-size: 14px; max-width: 100px; }
  .win:not(.pw-win) {
    left: 4px !important; top: 4px !important;
    width: calc(100% - 8px) !important; height: calc(100% - 8px) !important;
    box-shadow: 0 0 0 1px #000;
  }
  .win-grip, .win-btn[data-act="max"] { display: none; }
  .win-btn { width: 30px; height: 26px; }
  .start { height: 42px; padding: 0 16px 0 8px; font-size: 17px; }
  .start-logo { width: 26px; height: 26px; }
  .task { flex: 0 0 44px; height: 42px; justify-content: center; }
  .task span { display: none; }
  .tray { height: 42px; }
  .startmenu { left: 4px; right: 4px; width: auto; }
  .sm-item { padding: 12px 12px; font-size: 17px; }
  .files { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; padding: 14px 12px 24px; }
  .file { padding: 2px; }
  .file-img { padding: 5px 5px 14px; }
  .file:nth-child(n) .file-img { transform: none; }
  .tag { right: 2px; font-size: 13px; }
  .file-name { font-size: 14px; }
  .field, .toolbar .field, input, select, textarea { font-size: 16px !important; }
  .toolbar { gap: 6px; }
  .toolbar .addr { flex-basis: 100%; }
  .toolbar input[type="search"] { flex: 1 1 0; min-width: 0; }
  .pv { padding: 10px; gap: 14px; }
  .pv-info h2 { font-size: 22px; overflow-wrap: anywhere; }
  .pv-stage { padding: 8px 8px 20px; }
  .buy-row .btn-primary { flex-basis: 100%; }
  .clock { display: none; }
}

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

/* ---------- Musica ---------- */
.mp { display: flex; flex-direction: column; min-height: 100%; background: var(--plastic); }
.mp-head { padding: 10px 12px 8px; background: var(--title); color: #fff; }
.mp-title { font: 700 15px/1.25 var(--f-ui); text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mp-pos { font: 11px/1.4 var(--f-px); text-align: center; opacity: .8; margin-top: 2px; }
.mp-time { display: flex; align-items: center; gap: 8px; margin-top: 6px; font: 12px var(--f-px); }
.mp-time span { flex: none; min-width: 38px; }
.mp-left { text-align: right; }
.mp-modes { display: flex; justify-content: space-between; margin-top: 6px; }
.mp-mode { width: 34px; height: 28px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; opacity: .55; }
.mp-mode svg { width: 20px; height: 20px; filter: invert(1); }
.mp-mode[aria-pressed="true"] { opacity: 1; }
.mp-mode[aria-pressed="true"] svg { filter: none; }
.mp-mode[aria-pressed="true"] svg path { fill: var(--sticker); stroke: var(--sticker); }
input[type="range"] { flex: 1; min-width: 0; height: 26px; accent-color: var(--sticker); cursor: pointer; }
.mp-cover { aspect-ratio: 1; display: grid; place-items: center; background: var(--paper); color: #c9c3b3; border-top: 2px solid var(--plastic-deep); border-bottom: 2px solid var(--plastic-hi); }
.mp-cover img { width: 100%; height: 100%; object-fit: cover; }
.mp-cover svg { width: 55%; height: 55%; }
.mp-ctrl { display: flex; justify-content: space-around; align-items: center; padding: 12px 8px; }
.mp-ctrl button {
  width: 64px; height: 52px; display: grid; place-items: center; cursor: pointer;
  background: var(--plastic);
  border: 2px solid; border-color: var(--plastic-hi) var(--plastic-deep) var(--plastic-deep) var(--plastic-hi);
}
.mp-ctrl button:active { border-color: var(--plastic-deep) var(--plastic-hi) var(--plastic-hi) var(--plastic-deep); }
.mp-ctrl button[data-mp="toggle"] { width: 76px; background: var(--sticker); }
.mp-ctrl svg { width: 26px; height: 26px; }
.mp-vol { display: flex; align-items: center; gap: 10px; padding: 0 14px 10px; }
.mp-vol svg { width: 20px; height: 20px; flex: none; }
.mp-list { list-style: none; margin: 0 8px 8px; padding: 0; background: var(--paper); border: 2px solid; border-color: var(--plastic-lo) var(--plastic-hi) var(--plastic-hi) var(--plastic-lo); counter-reset: t; }
.mp-list li { counter-increment: t; border-bottom: 1px solid #e6e1d4; }
.mp-list button { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 8px 10px; background: none; border: 0; text-align: left; cursor: pointer; font-size: 14px; }
.mp-list button::before { content: counter(t) "."; color: var(--muted); font-size: 12px; }
.mp-list small { color: var(--muted); margin-left: auto; }
.mp-list li.is-now button { background: var(--title); color: #fff; }
.mp-list li.is-now small, .mp-list li.is-now button::before { color: #dfe3ff; }
.mp-foot { padding: 4px 8px 12px; }
.mp-spotify { width: 100%; min-height: 42px; background: #1a1a1a; color: #fff; }
.tray-music { display: flex; gap: 2px; }
.tray-music[hidden] { display: none; }
.tray-music button {
  width: 34px; height: 32px; display: grid; place-items: center; cursor: pointer; background: var(--plastic);
  border: 2px solid; border-color: var(--plastic-hi) var(--plastic-deep) var(--plastic-deep) var(--plastic-hi);
}
.tray-music svg { width: 16px; height: 16px; }

/* ---------- Campo fiorito ---------- */
.mf { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.mf-head {
  display: flex; justify-content: space-between; align-items: center; padding: 6px;
  border: 2px solid; border-color: var(--plastic-lo) var(--plastic-hi) var(--plastic-hi) var(--plastic-lo);
}
.mf-lcd { min-width: 54px; padding: 2px 6px; background: #1a1a1a; color: var(--sale); font: 26px/1 var(--f-term); text-align: center; letter-spacing: 1px; }
.mf-reset { width: 42px; height: 42px; padding: 0; }
.mf-reset svg { width: 28px; height: 28px; }
.mf-reset.is-lost svg { filter: grayscale(1); transform: rotate(180deg); }
.mf-grid {
  display: grid; gap: 0;
  border: 3px solid; border-color: var(--plastic-lo) var(--plastic-hi) var(--plastic-hi) var(--plastic-lo);
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.mf-c {
  aspect-ratio: 1; padding: 0; display: grid; place-items: center;
  background: #9fdc7c; cursor: pointer;
  border: 3px solid; border-color: #d7f5c2 #4f8a37 #4f8a37 #d7f5c2;
  font: 700 18px/1 var(--f-px);
}
.mf-c svg { width: 70%; height: 70%; }
.mf-c.is-open { background: var(--paper); border: 1px solid #d5cfbf; cursor: default; }
.mf-c.is-boom { background: var(--sale); }
.mf-c[data-n="1"] { color: #1a26a8; } .mf-c[data-n="2"] { color: #2f7d32; }
.mf-c[data-n="3"] { color: #d32f2f; } .mf-c[data-n="4"] { color: #4a148c; }
.mf-c[data-n="5"] { color: #8d2d00; } .mf-c[data-n="6"] { color: #00796b; }
.mf-c[data-n="7"] { color: #111; }    .mf-c[data-n="8"] { color: #666; }
.mf-flag[aria-pressed="true"] { background: var(--sale); color: #fff; }
.mf-foot { display: flex; justify-content: center; }
.mf-msg { margin: 0; font-size: 14px; text-align: center; }

/* ---------- Vendi · Scambia ---------- */
.tr { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px 26px; }
.tr > * { margin: 0; }
.tr p { margin: 0; }
.tr .tr-h { font: 400 clamp(30px, 8cqi, 40px)/1.02 var(--f-serif, var(--f-ui)); margin: 0; text-wrap: balance; letter-spacing: -.005em; }
.tr-lbl { align-self: flex-start; display: inline-block; padding: 5px 8px; background: var(--black, var(--ink)); color: var(--chalk, #fff); font: 700 11px/1.2 var(--f-px); letter-spacing: .07em; text-transform: uppercase; }
.tr-lbl.is-red { background: var(--sale); color: #fff; }
.tr-big { font: 400 24px/1.1 var(--f-serif, var(--f-ui)); }
.tr-k { display: block; margin: 0; font: 700 11px/1.2 var(--f-px); letter-spacing: .07em; text-transform: uppercase; }
.tr-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.tr .field { min-height: 44px; font-size: 16px; }
.tr-steps { display: flex; gap: 4px; }
.tr-steps i { flex: 1; height: 6px; background: rgba(0,0,0,.14); }
.tr-steps i.is-on { background: var(--black, var(--ink)); }
.tr-steps i.is-now { background: var(--sale); }
.tr-opts { display: flex; flex-direction: column; gap: 10px; }
.tr-opt { display: flex; flex-direction: column; gap: 6px; padding: 16px; text-align: left; background: #fff; color: var(--ink); border: 2px solid var(--black, var(--ink)); cursor: pointer; font: inherit; }
.tr-opt b { font: 400 28px/1 var(--f-serif, var(--f-ui)); }
.tr-opt span { color: var(--muted); font-size: 15px; line-height: 1.35; }
.tr-opt:hover, .tr-opt:focus-visible { background: var(--black, var(--ink)); color: var(--chalk, #fff); }
.tr-opt:hover span, .tr-opt:focus-visible span { color: #c9c8c1; }
.tr-lastreq { font-size: 14px; }
.tr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-chip { min-height: 44px; padding: 8px 14px; background: #fff; color: var(--ink); border: 1px solid var(--black, var(--ink)); font: 700 13px/1 var(--f-px); cursor: pointer; }
.tr-chip[aria-pressed="true"] { background: var(--black, var(--ink)); color: var(--chalk, #fff); }
.tr-eur { display: flex; align-items: center; gap: 8px; max-width: 200px; }
.tr-eur span { font: 700 16px/1 var(--f-px); }
.tr-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.tr-nav .btn { min-height: 46px; padding: 6px 18px; font: 700 14px/1 var(--f-px); letter-spacing: .04em; text-transform: uppercase; }
.tr-nav .btn[disabled] { opacity: .45; }
.tr-why, .tr-small { font-size: 13px; }
.tr-rules { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; background: var(--black, var(--ink)); color: var(--chalk, #fff); font-size: 14px; line-height: 1.3; }
.tr-rules li { display: flex; gap: 8px; align-items: flex-start; }
.tr-rules b { font-family: var(--f-px); color: var(--sale); }
.tr-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.tr-slot { position: relative; aspect-ratio: 1; min-width: 0; }
.tr-pick { position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 8px; overflow: hidden; cursor: pointer; font-weight: 400; border: 2px dashed var(--plastic-lo); background: rgba(0,0,0,.05); }
.tr-slot.is-done .tr-pick { border: 2px solid var(--black, var(--ink)); }
.tr-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tr-pick img { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; object-fit: cover; pointer-events: none; }
.tr-badge { position: absolute; top: 6px; left: 6px; z-index: 1; padding: 3px 5px; background: rgba(0,0,0,.12); color: var(--ink); font: 700 9px/1 var(--f-px); letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.tr-slot.is-req .tr-badge { background: var(--black, var(--ink)); color: var(--chalk, #fff); }
.tr-slot.is-done .tr-badge { background: #2f7a45; color: #fff; }
.tr-slot.is-busy .tr-badge { background: var(--sale); color: #fff; }
.tr-cap { position: relative; z-index: 1; align-self: flex-start; padding: 3px 5px; background: rgba(255,255,255,.92); font: 700 12px/1.2 var(--f-px); pointer-events: none; }
.tr-hint { position: relative; z-index: 1; color: var(--muted); font-size: 12px; line-height: 1.25; pointer-events: none; }
.tr-slot.is-done .tr-pick img ~ .tr-hint { display: none; }
.tr-x { position: absolute; top: 4px; right: 4px; z-index: 2; width: 32px; height: 32px; padding: 0; border: 1px solid #000; background: var(--black, var(--ink)); color: var(--chalk, #fff); font: 700 18px/1 var(--f-px); cursor: pointer; }
.tr-count { font: 700 13px/1.3 var(--f-px); }
.tr-err { padding: 10px 12px; border-left: 4px solid var(--sale); background: #fff; color: #9d1c12; font-weight: 700; font-size: 14px; }
.tr-err[hidden] { display: none; }
.tr-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--black, var(--ink)); }
.tr-tab { padding: 10px 12px; margin-bottom: -2px; background: transparent; border: 2px solid transparent; border-bottom: 0; font: 700 12px/1 var(--f-px); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tr-tab[aria-selected="true"] { background: var(--black, var(--ink)); color: var(--chalk, #fff); border-color: var(--black, var(--ink)); cursor: default; }
.tr-tab[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.tr-tab em { margin-left: 4px; padding: 2px 4px; font-style: normal; font-size: 9px; background: rgba(0,0,0,.12); color: var(--ink); }
.tr-picked { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-picked:empty { display: none; }
.tr-pchip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding-left: 8px; background: var(--black, var(--ink)); color: var(--chalk, #fff); font-size: 13px; }
.tr-pchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-pchip button { flex: none; width: 34px; height: 34px; padding: 0; background: none; border: 0; color: inherit; font: 700 18px/1 var(--f-px); cursor: pointer; }
.tr-more { grid-column: 1 / -1; }
.tr-pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tr-piece { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px; min-width: 0; text-align: left; background: #fff; color: var(--ink); border: 1px solid var(--black, var(--ink)); cursor: pointer; font: inherit; }
.tr-ph { align-self: stretch; aspect-ratio: 1; background: #e3e5e7; overflow: hidden; }
.tr-ph img { width: 100%; height: 100%; margin: 0; object-fit: cover; }
.tr-t { font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.tr-sz { color: var(--muted); font-size: 13px; }
.tr-p { margin-top: auto; padding: 5px 7px; background: var(--black, var(--ink)); color: var(--chalk, #fff); font: 700 13px/1 var(--f-px); }
.tr-piece[aria-pressed="true"] { outline: 3px solid var(--sale); outline-offset: -3px; }
.tr-piece[aria-pressed="true"] .tr-p { background: var(--sale); color: #fff; }
.tr-piece[aria-pressed="true"] .tr-p::before { content: "✓ "; }
.tr-sum-bar { position: sticky; bottom: 0; margin: 0 -20px -26px; padding: 10px 20px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); border-top: 2px solid var(--black, var(--ink)); }
.tr-sum { margin: 0; border-top: 1px solid rgba(0,0,0,.18); }
.tr-sum div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(0,0,0,.18); font-size: 15px; }
.tr-sum dt { color: var(--muted); white-space: nowrap; }
.tr-sum dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.tr-num { font-family: var(--f-px); font-variant-numeric: tabular-nums; }
.tr-check { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 400; font-size: 14px; line-height: 1.4; cursor: pointer; }
.tr-check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--black, var(--ink)); }
.tr-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tr-note { padding-left: 10px; border-left: 3px solid var(--sale); color: var(--muted); font-size: 13px; }
.tr-track { list-style: none; margin: 0; padding: 0; }
.tr-track li { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; }
.tr-track i { flex: none; width: 14px; height: 14px; margin-top: 3px; border: 2px solid var(--black, var(--ink)); background: #fff; }
.tr-track .is-on i { background: var(--black, var(--ink)); }
.tr-track .is-now i { background: var(--sale); border-color: var(--sale); }
.tr-track small { display: block; color: var(--muted); font-size: 13px; }
.tr-track li:not(.is-on):not(.is-now) > span { color: var(--muted); }
.tr-link { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--black, var(--ink)); }
.tr-link a { overflow-wrap: anywhere; font: 700 13px/1.35 var(--f-px); }
.tr-offers { display: flex; flex-direction: column; gap: 10px; }
.tr-offer { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 18px; text-align: left; font: inherit; background: var(--black, var(--ink)); color: var(--chalk, #fff); border: 3px solid transparent; cursor: pointer; }
.tr-offer[aria-disabled="true"] { cursor: default; }
.tr-offer[aria-checked="true"] { border-color: var(--sale); box-shadow: 4px 4px 0 var(--sale); }
.tr-offer[role="radio"]::after { content: "Tocca per scegliere"; font: 700 10px/1 var(--f-px); letter-spacing: .07em; text-transform: uppercase; color: #a9aaa4; }
.tr-offer[aria-checked="true"]::after { content: "✓ Scelta"; color: var(--chalk, #fff); }
.tr-wide { grid-column: 1 / -1; }
.tr-help { color: var(--muted); font-size: 13px; }
.tr-help.is-bad { color: #9d1c12; font-weight: 700; }
.tr .field[aria-invalid="true"] { border-color: var(--sale); outline: 2px solid var(--sale); outline-offset: -2px; }
.tr-piece-line { font: 700 14px/1.35 var(--f-px); overflow-wrap: anywhere; }
.tr-ship { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--black, var(--ink)); }
.tr-addr { white-space: pre-line; font: 700 15px/1.4 var(--f-px); }
.tr-amt { font: 400 56px/1 var(--f-serif, var(--f-ui)); }
.tr-teaser .nl-form label { margin: 4px 0 6px; }
.tr-teaser .nl-row .field { min-height: 44px; }
@media (max-width: 480px) {
  .tr { padding: 16px 16px 24px; }
  .tr-grid { grid-template-columns: 1fr; }
  .tr-rules { grid-template-columns: 1fr; }
  .tr-slots { grid-template-columns: 1fr 1fr; }
  .tr-pieces { grid-template-columns: 1fr 1fr; }
  .tr-nav .btn { flex: 1; padding: 6px 10px; letter-spacing: .02em; }
  .tr-sum-bar .tr-why { display: none; }
  .tr-sum-bar { margin: 0 -16px -24px; padding: 12px 16px 14px; }
  .tr-teaser .nl-row { flex-direction: column; }
}

@media (max-width: 700px) {
  .tray-music button { width: 40px; height: 40px; }
  .tray { padding: 0 6px; gap: 6px; }
}

/* ---------- Accensione, logo, spegnimento ---------- */
.overlay.is-power, .overlay.is-splash { align-items: center; justify-content: center; text-align: center; cursor: default; }
.power-btn {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: #1c1f4d; border: 3px solid #3a3f88; box-shadow: 0 0 0 6px #0e1030, 0 0 30px rgba(255,225,77,.25);
  animation: pulse 1.8s ease-in-out infinite;
}
.power-btn svg { width: 54px; height: 54px; }
.power-lbl { margin-top: 18px; font: 14px var(--f-px); color: var(--sticker); letter-spacing: .1em; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px #0e1030, 0 0 46px rgba(255,225,77,.55); } }
.overlay.is-splash { background: radial-gradient(ellipse at center, #1f2bff 0%, #0b0f5a 60%, #05072b 100%); color: #fff; }
.boot-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; animation: logo-in .9s cubic-bezier(.2,.8,.2,1) both; }
.boot-emblem {
  width: 116px; height: 96px; position: relative; display: grid; place-items: center;
  background: var(--sticker); color: var(--desk);
  border: 4px solid #111; border-radius: 22px 22px 22px 4px;
  transform: rotate(-8deg) skewX(-6deg);
  box-shadow: 8px 8px 0 var(--sale), 16px 16px 0 #00d1ff;
}
.boot-emblem span { font: 700 46px/1 var(--f-px); }
.boot-word { margin-top: 18px; font: italic 700 clamp(34px, 9vw, 64px)/1 var(--f-ui); letter-spacing: -.03em; text-shadow: 3px 3px 0 var(--sale); }
.boot-word sup { font: 700 .35em var(--f-px); color: var(--sticker); margin-left: 4px; vertical-align: top; }
.boot-ed { font: 12px var(--f-px); color: #9fb0ff; letter-spacing: .25em; }
.boot-logo-img { max-width: min(70vw, 420px); max-height: 40vh; object-fit: contain; animation: logo-in .9s cubic-bezier(.2,.8,.2,1) both; }
.splash-bar { width: 180px; height: 12px; margin-top: 34px; padding: 2px; border: 2px solid #9fb0ff; overflow: hidden; }
.splash-bar i { display: block; width: 36px; height: 100%; background: repeating-linear-gradient(90deg, var(--sticker) 0 8px, transparent 8px 10px); animation: slide 1.1s linear infinite; }
@keyframes slide { from { transform: translateX(-40px); } to { transform: translateX(180px); } }
@keyframes logo-in { from { opacity: 0; transform: scale(.85); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.overlay.is-out { animation: fade-out .45s ease both; pointer-events: none; }
@keyframes fade-out { to { opacity: 0; } }
.overlay.is-off { background: #000; color: #d8dcff; }
.overlay.is-off .crt { position: absolute; left: 0; right: 0; top: 50%; height: 3px; background: #fff; box-shadow: 0 0 24px #fff; animation: crt 1s ease-in forwards; }
.overlay.is-off .off-msg { opacity: 0; animation: appear .6s .9s forwards; }
@keyframes crt { 0% { height: 100%; top: 0; opacity: .9; } 55% { height: 3px; top: 50%; left: 0; right: 0; } 85% { left: 48%; right: 48%; opacity: 1; } 100% { left: 50%; right: 50%; opacity: 0; } }
@keyframes appear { to { opacity: 1; } }

/* ---------- Aiutante ---------- */
.buddy { position: fixed; right: 14px; bottom: calc(var(--bar-h) + 14px); z-index: 9300; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.buddy.is-in { animation: buddy-in .7s cubic-bezier(.3,1.6,.5,1) both; }
.buddy.is-out { animation: fade-out .35s ease both; }
@keyframes buddy-in { from { transform: translateY(140%); } }
.buddy-body { width: 78px; height: 88px; padding: 0; background: none; border: 0; cursor: pointer; animation: bounce 1.1s ease-in-out infinite; transform-origin: 50% 90%; }
.buddy-body svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(3px 4px 0 rgba(0,0,0,.35)); }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.buddy-body.is-hit { animation: hit .5s ease both; }
@keyframes hit { 20% { transform: translateX(-6px) rotate(-10deg) scale(.92); } 45% { transform: translateX(6px) rotate(8deg); } 70% { transform: translateX(-3px) rotate(-4deg); } }
.buddy-body.is-flip { animation: backflip 1.1s cubic-bezier(.4,0,.2,1) both; }
@keyframes backflip { 0% { transform: none; } 25% { transform: translateY(8px) scaleY(.85); } 60% { transform: translateY(-70px) rotate(-200deg); } 85% { transform: translateY(0) rotate(-360deg); } 92% { transform: scaleY(.9); } 100% { transform: none; } }
.buddy-body.is-spin { animation: spin .35s linear 6; }
@keyframes spin { to { transform: rotate(360deg); } }
.buddy-eyes .pupil { animation: look 4s steps(1) infinite; }
@keyframes look { 0%, 60% { transform: none; } 61%, 80% { transform: translateX(-2px); } 81% { transform: translateX(1px); } }
.buddy-bubble {
  position: relative; max-width: 240px; padding: 10px 12px;
  background: #fffbd6; color: var(--ink); border: 2px solid #1a1a1a; border-radius: 10px;
  box-shadow: 4px 4px 0 rgba(0,0,0,.3); font-size: 15px;
}
.buddy-bubble::after { content: ""; position: absolute; right: 30px; bottom: -10px; width: 16px; height: 16px; background: #fffbd6; border-right: 2px solid #1a1a1a; border-bottom: 2px solid #1a1a1a; transform: rotate(45deg); }
.buddy-bubble[hidden] { display: none; }
.buddy-bubble p { margin: 0 0 8px; }
.buddy-bubble p:last-child { margin: 0; }
.buddy-actions { display: flex; gap: 6px; }
.buddy-actions .btn { min-height: 32px; padding: 2px 10px; font-size: 14px; }
.linklike { background: none; border: 0; padding: 0; color: var(--title); text-decoration: underline; font: inherit; cursor: pointer; }
.help-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Sfondo collina bootleg ---------- */
.desk-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene-clouds g { animation: drift 60s linear infinite alternate; }
.scene-clouds g:nth-child(2) { animation-duration: 80s; }
.scene-clouds g:nth-child(3) { animation-duration: 45s; }
@keyframes drift { to { transform: translateX(60px); } }
.desk-mark.is-sky { align-items: start; padding-top: 18vh; }
.desk-mark.is-sky span { -webkit-text-stroke: 0; color: rgba(255,255,255,.9); text-shadow: 4px 4px 0 rgba(26,38,168,.55); font-size: clamp(40px, 9vw, 140px); }
.desk-mark { z-index: 0; }
.icons { z-index: 1; }
.dicon-label { text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000; }
.tray-music { margin-left: auto; }
@media (max-width: 700px) {
  .desk-mark.is-sky { padding-top: 64vh; }
  .desk-mark.is-sky span { font-size: 13vw; }
}

/* ---------- Banner musica ---------- */
.mbanner {
  position: fixed; left: 50%; top: 14px; transform: translateX(-50%);
  width: min(420px, calc(100% - 20px));
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--plastic); color: var(--ink); z-index: 9400;
  border: 2px solid; border-color: var(--plastic-hi) var(--plastic-deep) var(--plastic-deep) var(--plastic-hi);
  box-shadow: 0 0 0 1px #000, 5px 5px 0 rgba(0,0,0,.3);
  animation: mb-in .4s cubic-bezier(.3,1.4,.5,1) both;
}
.mbanner.is-out { animation: fade-out .35s ease both; }
@keyframes mb-in { from { transform: translate(-50%, -140%); } }
.mbanner-ico svg { width: 34px; height: 34px; }
.mbanner-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mbanner-txt b { font-size: 15px; }
.mbanner-txt small { font-size: 13px; color: var(--muted); }
.mbanner-n { display: inline-block; min-width: 1ch; color: var(--title); animation: tick 1s steps(1) infinite; }
@keyframes tick { 0% { transform: scale(1.3); } 30% { transform: none; } }
.mbanner-btns { display: flex; gap: 4px; }
.mbanner-btns .btn { min-height: 36px; padding: 2px 12px; }
.buddy-cash { animation: cash 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 80% 80%; }
@keyframes cash { 50% { transform: rotate(-10deg); } }

/* ---------- Giochi e Mystery Box ---------- */
.gm, .mb { display: flex; flex-direction: column; min-height: 100%; background: var(--paper); }
.gm-boss { display: flex; align-items: flex-end; gap: 10px; padding: 12px 12px 8px; background: #0f5a22; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1.5px); background-size: 8px 8px; }
.gm-avatar { width: 70px; height: 76px; flex: none; }
.gm-avatar svg { width: 100%; height: 100%; }
.gm-say { position: relative; flex: 1; padding: 8px 10px; background: #fffbd6; border: 2px solid #1a1a1a; border-radius: 10px; font-size: 14px; line-height: 1.3; }
.gm-say::before { content: ""; position: absolute; left: -9px; bottom: 12px; width: 14px; height: 14px; background: #fffbd6; border-left: 2px solid #1a1a1a; border-bottom: 2px solid #1a1a1a; transform: rotate(45deg); }
.gm-tabs { background: var(--plastic); }
.gm-stage { padding: 16px 14px; }
.gm-result { margin-top: 12px; text-align: center; }
.gm-win { padding: 12px; background: var(--sticker); border: 2px solid #1a1a1a; }
.gm-win b { font-size: 18px; display: block; margin-bottom: 6px; }
.gm-lose { font-weight: 700; }
.gm-rules { margin: 0 12px 12px; }
.gm-rules ul { padding-left: 18px; margin: 8px 0; }
.sc-card { position: relative; width: 100%; max-width: 320px; height: 150px; margin: 0 auto; background: #fff; border: 3px solid #1a1a1a; box-shadow: 4px 4px 0 rgba(0,0,0,.25); }
.sc-under { position: absolute; inset: 0; display: grid; place-items: center; font: 700 26px var(--f-px); color: var(--title); background: repeating-linear-gradient(45deg, #fffbd6 0 10px, #fff3a0 10px 20px); text-align: center; padding: 8px; }
.sc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; transition: opacity .5s; }
.sc-canvas.is-done { opacity: 0; pointer-events: none; }
.wh { max-width: 280px; margin: 0 auto; }
.wh-svg { width: 100%; height: auto; overflow: visible; }
.dc { display: flex; align-items: center; justify-content: center; gap: 12px; }
.dc-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dc-dice { display: flex; gap: 6px; }
.die { width: 52px; height: 52px; }
.dc-sum { font: 700 22px var(--f-px); }
.dc-vs { font: 700 18px var(--f-px); color: var(--sale); }
.mb-box { margin: 12px; padding: 12px; background: #fff; border: 2px solid; border-color: var(--plastic-lo) var(--plastic-hi) var(--plastic-hi) var(--plastic-lo); }
.mb-head { display: flex; gap: 12px; align-items: flex-start; }
.mb-head img, .mb-art { width: 84px; height: 84px; flex: none; object-fit: cover; background: #efe7d6; display: grid; place-items: center; }
.mb-art svg { width: 60px; height: 60px; }
.mb-head h3 { margin: 0 0 4px; font: 700 19px var(--f-ui); }
.mb-head .pv-price { margin: 2px 0 6px; }
.mb-desc { margin: 0; font-size: 14px; }
.mb-odds { width: 100%; margin: 10px 0; border-collapse: collapse; font-size: 13px; }
.mb-odds th, .mb-odds td { text-align: left; padding: 5px 6px; border-bottom: 1px solid #e6e1d4; }
.mb-odds td:last-child, .mb-odds th:last-child { text-align: right; white-space: nowrap; }
.mb-buy { width: 100%; min-height: 42px; }
.mb-size { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 14px; }
.mb-size select { flex: 1; min-height: 40px; }
.mb-note { margin: 0 12px 16px; font-size: 12px; }

/* ---------- Boss: mitra, rabbia, X ---------- */
.tommy { position: absolute; width: 62px; height: 26px; left: 30%; top: 58%; opacity: 0; transform: translateX(-30px) rotate(10deg); pointer-events: none; transition: transform .35s cubic-bezier(.3,1.5,.5,1), opacity .2s; }
.tommy .muzzle { opacity: 0; }
.buddy-body, .gm-avatar { position: relative; }
.gm-avatar { padding: 0; background: none; border: 0; cursor: pointer; }
.gm-avatar.is-gun .tommy, .buddy-body.is-angry .tommy { opacity: 1; transform: translateX(0) rotate(-4deg); }
.gm-avatar .tommy { left: 40%; top: 55%; width: 70px; }
.buddy-body.is-angry { animation: none !important; filter: drop-shadow(0 0 6px rgba(255,60,40,.8)); }
.buddy-body.is-angry svg:first-child { animation: shake .12s linear infinite; }
.buddy-body.is-firing .tommy { animation: recoil .09s linear infinite; }
.buddy-body.is-firing .tommy .muzzle { opacity: 1; animation: flash .09s steps(2) infinite; }
@keyframes shake { 50% { transform: translateX(1px) rotate(-1deg); } }
@keyframes recoil { 50% { transform: translateX(-3px) rotate(-6deg); } }
@keyframes flash { 50% { opacity: 0; } }
.buddy .tommy { left: -30%; top: 52%; width: 74px; transform: translateX(30px) scaleX(-1) rotate(10deg); }
.buddy-body.is-angry .tommy { transform: translateX(0) scaleX(-1) rotate(-4deg); }
@keyframes recoil-b { 50% { transform: translateX(3px) scaleX(-1) rotate(-8deg); } }
.buddy-body.is-firing .tommy { animation-name: recoil-b; }
.buddy-x {
  position: absolute; right: -6px; top: auto; bottom: 74px; z-index: 2;
  width: 26px; height: 26px; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--plastic); color: var(--ink); font: 700 16px/1 var(--f-ui);
  border: 2px solid; border-color: var(--plastic-hi) var(--plastic-deep) var(--plastic-deep) var(--plastic-hi);
}
.buddy-bubble:not([hidden]) ~ .buddy-x { bottom: auto; top: -10px; }
.rata { font: 700 20px var(--f-px); color: var(--sale); letter-spacing: .04em; }
.holes { position: fixed; inset: 0; z-index: 9250; pointer-events: none; }
.holes.is-out { animation: fade-out .9s ease forwards; }
.hole { position: absolute; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle, #111 0 28%, #3b3b3b 30% 36%, rgba(255,255,255,.85) 38% 44%, transparent 46%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.15); animation: pop .12s ease-out both; }
.hole::before, .hole::after { content: ""; position: absolute; left: 50%; top: 50%; width: 46px; height: 2px; background: rgba(255,255,255,.75); transform: translate(-50%, -50%) rotate(35deg); }
.hole::after { transform: translate(-50%, -50%) rotate(-62deg); width: 38px; }
@keyframes pop { from { transform: scale(.2); } }

/* ---------- Sala giochi: stile casinò anni 90 ---------- */
.gm { background: #14061f; color: #fff; }
.gm-sign {
  position: relative; margin: 10px 10px 0; padding: 12px 10px 10px; text-align: center;
  background: linear-gradient(#3a0a52, #1d0430); border: 3px solid #e7b416; border-radius: 8px;
  box-shadow: 0 0 18px rgba(255,46,170,.45), inset 0 0 12px rgba(255,210,63,.25);
}
.gm-sign::before {
  content: ""; position: absolute; inset: 4px; border-radius: 5px; pointer-events: none;
  background:
    radial-gradient(circle, #ffe680 0 2.5px, transparent 3px) 0 0 / 14px 100% repeat-x,
    radial-gradient(circle, #ffe680 0 2.5px, transparent 3px) 7px 100% / 14px 7px repeat-x;
  animation: bulbs .6s steps(2) infinite;
}
@keyframes bulbs { 50% { filter: brightness(.45); } }
.gm-sign span { display: block; font: 700 30px/1 var(--f-px); letter-spacing: .08em; color: #ff4fd8; text-shadow: 0 0 6px #ff4fd8, 0 0 14px #ff4fd8, 2px 2px 0 #3a0a52; }
.gm-sign small { display: block; margin-top: 6px; font: 600 12px var(--f-px); color: #ffd23f; letter-spacing: .12em; text-transform: uppercase; }
.gm .gm-boss { background: transparent; }
.gm .gm-tabs { background: transparent; border-bottom: 0; padding: 8px 10px 0; gap: 6px; }
.gm .cat-btn {
  background: #2a0b40; color: #ffd23f; border: 2px solid #ff4fd8; border-radius: 6px; margin: 0;
  font: 700 14px var(--f-px); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px;
  box-shadow: 0 0 8px rgba(255,79,216,.4);
}
.gm .cat-btn[aria-selected="true"] { background: #ff4fd8; color: #14061f; box-shadow: 0 0 14px #ff4fd8; padding-bottom: 8px; }
.gm-stage {
  margin: 10px; padding: 18px 14px; border-radius: 14px;
  background: radial-gradient(ellipse at center, #1f8a3a 0%, #106126 70%, #0a4519 100%);
  border: 6px solid #6b3a12; box-shadow: inset 0 0 0 2px #e7b416, inset 0 0 30px rgba(0,0,0,.45);
}
.gm .gm-result { color: #fff; }
.gm .gm-lose { color: #ffd6d6; text-shadow: 1px 1px 0 #000; }
.gm .gm-win { background: linear-gradient(#ffe680, #e7b416); color: #1a1a1a; border: 3px solid #fff; box-shadow: 0 0 16px #ffd23f; border-radius: 8px; }
.gm .btn-primary { background: #ffd23f; }
.gm .sc-card { border: 4px solid #e7b416; border-radius: 10px; overflow: hidden; box-shadow: 0 0 16px rgba(255,210,63,.6); }
.gm .sc-under { background: repeating-linear-gradient(45deg, #ffe680 0 10px, #ffd23f 10px 20px); color: #b3001b; }
.gm .wh-svg { filter: drop-shadow(0 0 12px rgba(255,210,63,.6)); }
.gm .dc-side small, .gm .dc-sum { color: #ffe680; }
.gm .dc-vs { color: #ff4fd8; text-shadow: 0 0 8px #ff4fd8; }
.gm .gm-rules { color: #e8dcff; }
.gm .gm-rules .muted { color: #b8a8d8; }
.gm .empty, .gm-done { color: #fff; text-align: center; }
.gm .gm-say { color: var(--ink); }

/* ---------- Boss: animazioni ---------- */
.bsvg { overflow: visible; }
.b-ov { opacity: 0; transition: opacity .15s; }
.b-hat, .b-box-in, .bsvg, .buddy-cash, .pupil { transform-box: fill-box; }
.b-hat { transform-origin: 50% 100%; }
.anim-tip .b-hat { animation: tip 1.2s ease both; }
@keyframes tip { 20%, 65% { transform: translate(-3px, -7px) rotate(-16deg); } }
.anim-dance .bsvg { animation: dance .45s ease-in-out infinite alternate; transform-origin: 50% 95%; }
@keyframes dance { from { transform: rotate(-8deg); } to { transform: rotate(8deg) translateY(-3px); } }
.anim-dance .b-shades, .anim-win .b-shades { opacity: 1; }
.anim-arms .b-arms { opacity: 1; }
.anim-drip .b-hat { animation: wig .35s ease-in-out 3; }
@keyframes wig { 50% { transform: rotate(8deg); } }
.anim-kicks .pupil { transform: translateY(2.6px); transition: transform .2s; }
.anim-kicks .bsvg { animation: lookdown 1.8s ease both; transform-origin: 50% 100%; }
@keyframes lookdown { 20%, 80% { transform: rotate(4deg) translateY(2px); } }
.anim-facepalm .b-palm { opacity: 1; }
.anim-facepalm .bsvg { animation: nope .3s ease-in-out 5; }
@keyframes nope { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.anim-thumb .b-thumb, .anim-win .b-thumb { opacity: 1; }
.anim-thumb .bsvg { animation: hop .5s ease 2; }
@keyframes hop { 40% { transform: translateY(-5px); } }
.anim-count .buddy-cash { animation: cashfast .1s linear infinite !important; transform-origin: 80% 80%; }
@keyframes cashfast { 50% { transform: rotate(-22deg) translateY(-2px); } }
.anim-lens .b-lens { opacity: 1; }
.anim-lens .bsvg { animation: peek 2.2s ease both; }
@keyframes peek { 30% { transform: translateX(-3px); } 60% { transform: translateX(3px); } }
.anim-shakebox .b-box { opacity: 1; }
.anim-shakebox .b-box-in { animation: boxshake .1s linear 14; transform-origin: 50% 50%; }
@keyframes boxshake { 50% { transform: rotate(12deg) translateX(1px); } }
.anim-win .bsvg { animation: hop .45s ease 4; }
.anim-laugh .b-laugh { opacity: 1; }
.anim-laugh .bsvg { animation: haha .18s linear 10; transform-origin: 50% 100%; }
@keyframes haha { 50% { transform: translateY(-2px) scaleY(.97); } }
.anim-yawn .b-yawn { opacity: 1; }
.anim-yawn .bsvg { animation: yawn 2.6s ease both; transform-origin: 50% 100%; }
@keyframes yawn { 30%, 70% { transform: scaleY(1.04) rotate(-3deg); } }
.anim-hit .bsvg { animation: hit .45s ease both; }
.bp { position: fixed; z-index: 9600; pointer-events: none; font: 700 16px var(--f-px); transform: translate(-50%, 0); animation: rise 1.4s ease-out forwards; text-shadow: 1px 1px 0 rgba(0,0,0,.35); }
@keyframes rise { to { transform: translate(calc(-50% + var(--dx, 0px)), -64px); opacity: 0; } }
.p-note { color: #ff4fd8; font-size: 20px; }
.p-z { color: #9fb0ff; font-size: 18px; }
.p-spark { color: #ffd23f; font-size: 18px; }
.p-ha { color: #ff5a36; font-size: 15px; }
.rain { position: fixed; inset: 0; z-index: 9550; pointer-events: none; overflow: hidden; }
.rain .bill, .rain .coin { position: absolute; top: -50px; animation: fall 2.2s linear forwards; }
.rain .bill { width: 46px; height: 22px; background: #8fe38f; border: 2px solid #1a5c1a; display: grid; place-items: center; font: 700 13px var(--f-px); color: #1a5c1a; }
.rain .coin { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6b0, #e7b416 55%, #a8790a); border: 2px solid #8a6a00; }
@keyframes fall { to { transform: translateY(110vh) rotate(var(--r, 360deg)); } }

/* ---------- Striscia del boss nelle finestre ---------- */
.bstrip {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 6px;
  background: #0f5a22; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1.5px); background-size: 8px 8px;
  border-bottom: 2px solid var(--plastic-deep);
}
.bstrip-av { width: 42px; height: 44px; flex: none; padding: 0; background: none; border: 0; cursor: pointer; }
.bstrip-av .bsvg { width: 100%; height: 100%; }
.bstrip-say {
  position: relative; flex: 1; min-width: 0; padding: 6px 9px; background: #fffbd6; color: var(--ink);
  border: 2px solid #1a1a1a; border-radius: 9px; font-size: 13.5px; line-height: 1.25;
}
.bstrip-say::before { content: ""; position: absolute; left: -8px; top: 50%; margin-top: -6px; width: 11px; height: 11px; background: #fffbd6; border-left: 2px solid #1a1a1a; border-bottom: 2px solid #1a1a1a; transform: rotate(45deg); }
.bstrip-say.is-new { animation: saypop .3s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes saypop { from { transform: scale(.85); opacity: .3; } }
.bstrip.is-mini { padding: 2px 6px; justify-content: flex-start; }
.bstrip.is-mini .bstrip-say { display: none; }
.bstrip.is-mini .bstrip-av { width: 30px; height: 32px; }
.btoast { position: fixed; right: 10px; bottom: calc(var(--bar-h) + 10px); z-index: 9350; display: flex; align-items: flex-end; gap: 6px; animation: buddy-in .5s cubic-bezier(.3,1.5,.5,1) both; }
.btoast.is-out { animation: fade-out .35s ease both; }
.btoast-say { max-width: 220px; padding: 8px 10px; background: #fffbd6; border: 2px solid #1a1a1a; border-radius: 10px; font-weight: 700; font-size: 14px; box-shadow: 3px 3px 0 rgba(0,0,0,.3); }
.btoast-av { width: 58px; height: 62px; }
.btoast-av .bsvg { width: 100%; height: 100%; }
html.boss-off .bstrip, html.boss-off .buddy, html.boss-off .btoast { display: none !important; }
.sm-boss .sm-boss-av { width: 24px; height: 26px; flex: none; }
.sm-boss .sm-boss-av .bsvg { width: 100%; height: 100%; }
.sm-boss small { display: block; font-size: 12px; opacity: .75; font-style: italic; }
.gm-avatar .bsvg, .buddy-body .bsvg { width: 100%; height: 100%; }

/* ---------- Insegna Sala Giochi rifatta ---------- */
.gm-sign { padding: 6px 8px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(135deg, #e7b416, #fff1a8 40%, #b88a0c 60%, #ffe680); border: 0; border-radius: 12px; box-shadow: 0 0 22px rgba(255,79,216,.45), 0 4px 0 #6b3a12; }
.gm-sign::before { content: none; }
.gm-bulbs { display: flex; justify-content: space-between; padding: 0 6px; }
.gm-bulbs b { width: 9px; height: 9px; border-radius: 50%; background: #fff3b0; box-shadow: 0 0 6px #ffd23f, 0 0 2px #fff; animation: chase .8s steps(1) infinite; }
.gm-bulbs b:nth-child(odd) { animation-delay: .4s; }
@keyframes chase { 50% { background: #7a5a10; box-shadow: none; } }
.gm-sign-in { padding: 12px 10px 12px; text-align: center; border-radius: 8px; background: radial-gradient(ellipse at 50% 0%, #4a0f6b, #1d0430 75%); border: 2px solid #6b3a12; }
.gm-sign-in span { display: block; font: 700 32px/1 var(--f-px); letter-spacing: .1em; color: #ff4fd8; text-shadow: 0 0 4px #fff, 0 0 10px #ff4fd8, 0 0 22px #ff4fd8; animation: neon 4s infinite; }
@keyframes neon { 0%, 18%, 22%, 62%, 66%, 100% { opacity: 1; } 20%, 64% { opacity: .55; } }
.gm-sign-in small { display: block; margin-top: 7px; font: 600 11px var(--f-px); letter-spacing: .14em; text-transform: uppercase; color: #ffd23f; }
.gm-sign-in .gm-suits { margin: 0 0 6px; font-size: 14px; letter-spacing: .5em; color: #fff; text-shadow: 0 0 6px #ff4fd8; }
.gm-boss { padding: 10px 12px 4px; }
.ticket { max-width: 330px; margin: 0 auto; padding: 10px; background: #fff7d1; border-radius: 12px; border: 3px dashed #b3001b; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 8px; font: 700 15px var(--f-px); color: #b3001b; letter-spacing: .06em; }
.ticket-head b { padding: 2px 8px; background: #b3001b; color: #ffd23f; border-radius: 4px; }
.ticket-foot { margin-top: 8px; text-align: center; font: 600 11px var(--f-px); color: #7a5a10; letter-spacing: .06em; text-transform: uppercase; }
.gm .ticket .sc-card { box-shadow: none; }
.wh-bulb { fill: #fff3b0; animation: chase .7s steps(1) infinite; }
.wh-bulb.alt { animation-delay: .35s; }
.gm .die { filter: drop-shadow(2px 4px 0 rgba(0,0,0,.35)); }
.gm-avatar .tommy, .buddy .tommy { height: 30px; }

/* ---------- WTF Player (app Musica) ---------- */
.mp2 { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 14px; min-height: 100%; background: radial-gradient(ellipse at top, #2a3ad8, #121a6e 70%); }
.mp2-top .mp-spotify { width: 100%; min-height: 46px; gap: 10px; background: #111; color: #fff; border-color: #444 #000 #000 #444; font-size: 15px; }
.sp-dot { width: 18px; height: 18px; border-radius: 50%; background: #1ed760; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.dev {
  align-self: center; width: min(100%, 330px); padding: 12px 12px 10px; border-radius: 26px;
  background: linear-gradient(160deg, #fdfdfd, #dcdcdc 55%, #bdbdbd);
  box-shadow: 0 0 0 2px #1a1a1a, 6px 8px 0 rgba(0,0,0,.35), inset 0 2px 0 #fff;
}
.dev-screen { padding: 8px; border-radius: 12px; background: #0d1033; border: 3px solid #1a1a1a; box-shadow: inset 0 0 18px rgba(80,120,255,.35); color: #dfe6ff; }
.dev-bar { display: flex; justify-content: space-between; align-items: center; font: 600 11px var(--f-px); color: #9fb0ff; margin-bottom: 6px; }
.dev-bat { width: 20px; height: 9px; border: 1.5px solid #9fb0ff; border-radius: 2px; background: linear-gradient(90deg, #6fe36f 70%, transparent 70%); }
.dev-now { display: flex; gap: 10px; align-items: center; }
.dev .mp-cover { width: 46%; flex: none; aspect-ratio: 1; border: 0; border-radius: 6px; background: #f6f2e8; color: #c9c3b3; display: grid; place-items: center; overflow: hidden; }
.dev .mp-cover svg { width: 60%; height: 60%; }
.dev-meta { flex: 1; min-width: 0; }
.dev .mp-title { font: 700 15px/1.25 var(--f-ui); color: #fff; text-align: left; white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dev .mp-pos { font: 600 11px var(--f-px); color: #9fb0ff; opacity: 1; margin: 0; }
.dev-eq { display: flex; align-items: flex-end; gap: 3px; height: 22px; margin-top: 10px; }
.dev-eq i { width: 5px; height: 4px; background: #ffe14d; }
.dev.is-playing .dev-eq i { animation: eq .5s ease-in-out infinite alternate; }
.dev.is-playing .dev-eq i:nth-child(2) { animation-delay: .15s; } .dev.is-playing .dev-eq i:nth-child(3) { animation-delay: .3s; }
.dev.is-playing .dev-eq i:nth-child(4) { animation-delay: .05s; } .dev.is-playing .dev-eq i:nth-child(5) { animation-delay: .22s; }
@keyframes eq { from { height: 4px; } to { height: 22px; } }
.dev .mp-time { margin-top: 8px; color: #9fb0ff; }
.dev .mp-ctrl { padding: 12px 0 6px; justify-content: center; gap: 12px; }
.dev .mp-ctrl button { width: 70px; height: 58px; border-radius: 16px; background: linear-gradient(#fff, #d9d9d9); border: 2px solid #1a1a1a; box-shadow: 0 4px 0 #1a1a1a; }
.dev .mp-ctrl button:active { transform: translateY(3px); box-shadow: 0 1px 0 #1a1a1a; }
.dev .mp-ctrl button[data-mp="toggle"] { width: 84px; background: linear-gradient(#ffe680, #ffd23f); }
.dev .mp-ctrl svg { width: 28px; height: 28px; }
.dev-sub { display: flex; align-items: center; gap: 6px; }
.dev-sub .mp-vol { flex: 1; padding: 0; }
.dev-sub .mp-mode { opacity: .5; }
.dev-sub .mp-mode svg { filter: none; }
.dev-sub .mp-mode[aria-pressed="true"] { opacity: 1; }
.dev-sub .mp-mode[aria-pressed="true"] svg path { fill: var(--title); stroke: var(--title); }
.dev-brand { margin-top: 4px; text-align: center; font: 700 11px var(--f-px); letter-spacing: .3em; color: #8a8a8a; }
.mp2-label { font: 600 12px var(--f-px); color: #9fb0ff; letter-spacing: .1em; text-transform: uppercase; margin: 4px 2px -4px; }
.mp2 .mp-list { margin: 0; }
.bstrip-av { position: relative; }
.bstrip-av .tommy { left: 52%; top: 48%; width: 46px; height: 20px; }
.bstrip-av.is-angry { filter: drop-shadow(0 0 6px rgba(255,60,40,.85)); }
.bstrip-av.is-angry .tommy { opacity: 1; transform: none; }
.bstrip-av.is-angry .bsvg { animation: shake .12s linear infinite; }
.bstrip-av.is-firing .tommy { animation: recoil .09s linear infinite; }
.bstrip-av.is-firing .tommy .muzzle { opacity: 1; animation: flash .09s steps(2) infinite; }

/* ---------- Preferiti, navigazione prodotti, avvisi ---------- */
.fav { position: absolute; left: 4px; top: 4px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.88); border: 2px solid #1a1a1a; border-radius: 50%; box-shadow: 2px 2px 0 rgba(0,0,0,.25); }
.fav svg { width: 20px; height: 20px; }
.fav.is-on .heart-f { fill: var(--sale); }
.fav.is-pop { animation: favpop .4s cubic-bezier(.3,1.8,.5,1); }
@keyframes favpop { 40% { transform: scale(1.35); } }
.fav-btn { position: static; width: 46px; height: 44px; min-height: 44px; padding: 0; border-radius: 0; flex: none; }
.fav-btn.btn { border: 2px solid; border-color: var(--plastic-hi) var(--plastic-deep) var(--plastic-deep) var(--plastic-hi); box-shadow: inset -1px -1px 0 var(--plastic-lo); background: var(--plastic); }
.buy-row .btn-primary { flex: 1 1 auto; }
@media (max-width: 700px) { .buy-row .btn-primary { flex-basis: calc(100% - 54px); } .buy-row .qty { order: -1; } }
.files.is-list .fav { display: none; }
.cat-fav { padding: 4px 10px; }
.cat-fav svg { width: 18px; height: 18px; vertical-align: middle; }
.cat-fav[aria-selected="true"] .heart-f { fill: var(--sale); }
.pv-nav { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; background: var(--plastic); border-bottom: 1px solid var(--plastic-lo); }
.pv-nav .btn { min-height: 34px; padding: 2px 10px; font-size: 13px; }
.pv-nav span { font: 600 12px var(--f-px); color: var(--muted); }
.pv-main { touch-action: pan-y; }
.bstrip-btn { margin-left: 8px; min-height: 28px; padding: 1px 10px; font-size: 13px; vertical-align: middle; }
.size-btn[data-zero] { opacity: .45; } .size-btn[data-zero][aria-pressed="true"] { opacity: 1; }
@media (max-width: 700px) { .catbar:not(.gm-tabs) .cat-btn { padding: 4px 7px; font-size: 12.5px; } .cat-fav { padding: 4px 8px; } }

/* ---------- v16 ---------- */
.buddy-count { font-size: 13px; color: var(--muted); }
.buddy-count b { color: var(--title); font: 700 16px var(--f-px); }
@media (max-width: 700px) {
  .win-btn[data-act="min"] { display: none; }
  .tasks { visibility: hidden; }
}
/* ruota */
.wh { position: relative; }
.wh-hub {
  position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; border: 3px solid #1a1a1a; cursor: pointer; padding: 0;
  background: radial-gradient(circle at 35% 30%, #ff8a6b, #d7261e 60%, #8a0f0a);
  color: #fff; font: 700 13px var(--f-px); letter-spacing: .05em; text-shadow: 1px 1px 0 #000;
  box-shadow: 0 0 0 4px #e7b416, 0 4px 0 #5a0905, 0 0 18px rgba(255,90,54,.7);
}
.wh-hub:active { transform: translate(-50%, -48%); box-shadow: 0 0 0 4px #e7b416, 0 1px 0 #5a0905; }
.wh-hub:disabled, .is-spinning .wh-hub { filter: grayscale(.6); cursor: default; }
.wh-cta { display: flex; justify-content: center; margin-top: 14px; }
.wh-go {
  position: relative; min-width: 220px; min-height: 52px; padding: 0 22px; cursor: pointer;
  border: 3px solid #1a1a1a; border-radius: 30px;
  background: linear-gradient(#ffe680, #ffd23f 55%, #d9a90c); color: #3a0a52;
  font: 700 18px var(--f-px); letter-spacing: .08em;
  box-shadow: 0 5px 0 #6b3a12, 0 0 20px rgba(255,210,63,.6);
  animation: ctaglow 1.4s ease-in-out infinite;
}
.wh-go:active { transform: translateY(4px); box-shadow: 0 1px 0 #6b3a12; }
.wh-go:disabled { animation: none; filter: grayscale(.7); opacity: .7; cursor: default; }
@keyframes ctaglow { 50% { box-shadow: 0 5px 0 #6b3a12, 0 0 34px rgba(255,79,216,.75); } }
@media (max-width: 700px) { .wh { max-width: 250px; } }
/* frecce prodotto */
.pv-stage { position: relative; }
.pv-arrow {
  position: absolute; top: 40%; z-index: 3; width: 44px; height: 44px; margin-top: -22px; padding: 0;
  display: grid; place-items: center; cursor: pointer; border-radius: 50%;
  background: rgba(255,255,255,.92); border: 2px solid #1a1a1a; box-shadow: 2px 3px 0 rgba(0,0,0,.3);
  font: 700 30px/1 var(--f-ui); color: var(--ink);
}
.pv-arrow span { margin-top: -4px; }
.pv-arrow.is-prev { left: 2px; }
.pv-arrow.is-next { right: 2px; }
.pv-arrow:active { transform: scale(.92); }
.pv-count { position: absolute; right: 14px; top: 14px; z-index: 3; padding: 3px 8px; background: rgba(13,16,51,.85); color: #fff; font: 600 12px var(--f-px); border-radius: 10px; }
.pv-stage .fav-btn { display: none; }
@media (max-width: 700px) {
  .pv-main { max-height: 54vh; aspect-ratio: auto; height: 54vh; }
  .pv-stage { padding: 6px 6px 12px; }
}

/* barra Previous / Next nella finestra prodotto */
.pv-navbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px;background:var(--plastic);border-bottom:1px solid var(--plastic-lo);box-shadow:0 1px 0 var(--plastic-hi)}
.pv-navbtn{min-width:112px;text-transform:uppercase;letter-spacing:.04em}
.pv-navcount{font:600 12px var(--f-px);padding:3px 8px;background:#0d1033d9;color:#fff;border-radius:10px;white-space:nowrap}
/* boss rifinito: fumo del sigaro */
.b-smoke { animation: b-smoke 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes b-smoke { 0% { opacity: 0; transform: translateY(2px) scaleY(.6); } 40% { opacity: .7; } 100% { opacity: 0; transform: translateY(-6px) scaleY(1.1); } }
@media (prefers-reduced-motion: reduce) { .b-smoke { animation: none; opacity: .4; } }

/* ---------- Riga legale (dati della società + preferenze cookie) ---------- */
.desk { bottom: calc(var(--bar-h) + var(--legal-h, 0px)); }
.buddy { bottom: calc(var(--bar-h) + var(--legal-h, 0px) + 14px); }
.btoast { bottom: calc(var(--bar-h) + var(--legal-h, 0px) + 10px); }
.legal-line {
  position: fixed; left: 0; right: 0; bottom: var(--bar-h); z-index: 2;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 2px 12px;
  padding: 4px 10px; background: rgba(0, 0, 0, .55); color: rgba(255, 255, 255, .86);
  font: 400 10.5px/1.35 var(--f-ui, system-ui, sans-serif); text-align: center;
}
.legal-line a { color: inherit; }
.legal-cookie { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
/* Dati societari: chiusi dietro un tasto, il testo è già nella pagina e si apre sopra la riga */
.legal-line { align-items: center; }
.legal-toggle { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.legal-toggle::after { content: " ▴"; font-size: .9em; }
.legal-toggle[aria-expanded="true"]::after { content: " ▾"; }
.legal-body {
  position: absolute; left: 0; right: 0; bottom: 100%;
  padding: 8px 14px; background: rgba(14, 14, 14, .94); color: inherit;
  border-top: 1px solid rgba(255, 255, 255, .12); text-align: center;
}
.legal-body[hidden] { display: none; }
html.is-busy, html.is-busy * { cursor: progress !important; }

/* Desktop: icone in colonna a sinistra e a destra */
@media (max-width: 700px) {
  .icons-col { gap: 4px; }
  .icons-col .dicon { width: 100px; padding: 3px 2px; }
  .icons-col .dicon svg, .icons-col .dicon-img { width: 60px; height: 60px; }
}
/* nomi lunghi (Selected Streetwear) vanno a capo */
html .icons .dicon-label, html.skin-asfalto .icons .dicon-label { white-space: normal; overflow-wrap: normal; word-break: normal; max-width: 100px; }
/* Mystery Box come primo gioco di Gamble: niente panno verde, schede chiare */
.gm-stage.is-mb { margin: 6px 0 0; padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0; }
.gm .mb { background: none; min-height: 0; }
.gm .mb-box { color: #1a1a1a; border: 3px solid #e7b416; border-radius: 10px; box-shadow: 0 0 16px rgba(255,210,63,.35); }
.gm .mb-note { color: rgba(255,255,255,.75); margin: 4px 14px 14px; }
/* Shop: scelta tra shop digitale e negozio normale */
.shop-pick h2 { margin: 0 0 12px; }
.shop-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 10px;
  padding: 12px; text-align: left; cursor: pointer; font: inherit; color: #111;
  background: #fff; border: 2px solid #111; box-shadow: 3px 3px 0 #111;
}
.shop-opt svg { width: 42px; height: 42px; flex: none; }
.shop-opt span { display: flex; flex-direction: column; gap: 2px; }
.shop-opt b { font-size: 16px; }
.shop-opt small { font-size: 13px; opacity: .75; }
.shop-opt:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #111; }
.shop-opt[disabled] { opacity: .55; cursor: default; box-shadow: none; }
/* Start › Chi siamo: il cerchio .wtf al posto della cartella */
.sm-wtf {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%; background: #0e0e0e; color: #f6f5f1;
  font: 400 10px/1 "Instrument Serif", Georgia, serif; letter-spacing: -.01em;
}
@media (max-width: 700px) { .sm-wtf { width: 28px; height: 28px; font-size: 11px; } }
html.skin-asfalto .sm-wtf { font-family: var(--f-serif); }
.shop-wtf {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 42px; height: 42px; border-radius: 50%; background: #0e0e0e; color: #f6f5f1;
  font: 400 15px/1 "Instrument Serif", Georgia, serif;
}
html.skin-asfalto .shop-wtf { font-family: var(--f-serif); }

/* ---------- v30: foto a schermo intero con zoom ---------- */
.pv-main { cursor: zoom-in; }
.zv { position: fixed; inset: 0; z-index: 2147483000; background: #0b0b0b; display: flex; touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: contain; }
.zv-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.zv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; will-change: transform; -webkit-user-drag: none; pointer-events: none; }
.zv-x { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 10px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #111; font: 400 30px/1 Georgia, serif; cursor: pointer; z-index: 2; }
.zv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(255,255,255,.14); color: #fff; font: 400 36px/1 Georgia, serif; cursor: pointer; z-index: 2; }
.zv-prev { left: 6px; } .zv-next { right: 6px; }
.zv-n { position: absolute; top: calc(22px + env(safe-area-inset-top)); left: 16px; color: #fff; font: 600 13px var(--f-px, monospace); z-index: 2; }
.zv-hint { position: absolute; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom)); text-align: center; color: rgba(255,255,255,.7); font: 13px/1.3 system-ui, sans-serif; pointer-events: none; animation: zvHint 4s forwards; }
@keyframes zvHint { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
@media (hover: none) { .zv-nav { display: none; } }

/* ---------- v31: informative ---------- */
.doc .doc-links { padding-left: 18px; }
.doc .doc-links li { margin: 6px 0; }
.doc .doc-links a { font-weight: 700; }
.doc .muted { color: var(--muted); font-size: 13px; }


@media (max-width: 700px) { body.is-buying .buddy { display: none; } }
.col-desc { padding: 18px 16px 24px; max-width: 70ch; font-size: 15px; line-height: 1.55; }
.col-desc h2 { font-size: 18px; margin: 0 0 8px; }

/* Collaudo telefono 21/10: righe d'acquisto, badge, guida taglie, 404 */
.dialog-ico { flex: none; width: 40px; height: 40px; }
.dialog-ico svg { display: block; }
.pv-col { margin: -4px 0 8px; font-size: 14px; }
.pv-col a { font-weight: 700; }
.pv-badges { list-style: none; margin: 4px 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pv-badges li { font: 600 11px/1 var(--f-px); letter-spacing: .03em; padding: 5px 8px; border: 2px solid var(--ink); background: var(--paper); }
.pv-badges li[hidden] { display: none; }
.pv-badges .pv-one { background: var(--sticker); }
.pv-sizehelp { margin: -6px 0 14px; font-size: 13px; color: var(--muted); }
.pv-lines { margin: 4px 0 14px; font-size: 13px; color: var(--muted); }
.pv-lines p { margin: 0 0 6px; }
.pv-lines p[hidden] { display: none; }
.pv-sold { color: var(--ink); }
.msg .msg-cart { margin-left: 8px; padding: 4px 10px; font-size: 13px; vertical-align: middle; }
.cart-note { margin: 0 0 8px; font-size: 13px; }
.cart-note[hidden] { display: none; }
.cart-trust { margin: 0 0 10px; font-size: 12px; font-weight: 700; }
.rain.is-top { bottom: auto; height: 38vh; }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 14px; border: 2px solid var(--ink); max-width: 100%; }
.size-tbl { border-collapse: collapse; font-size: 13px; white-space: nowrap; min-width: 100%; }
.size-tbl th, .size-tbl td { padding: 5px 10px; border-bottom: 1px solid rgba(0, 0, 0, .15); text-align: left; }
.size-tbl thead th { background: var(--ink); color: var(--paper); font-weight: 700; }
.size-tbl tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--sticker); color: var(--ink); font-weight: 700; border-right: 2px solid var(--ink); }
.size-tbl thead tr > :first-child { z-index: 2; }
.doc-pad { height: 0; }
@media (max-width: 700px) { .doc-pad { height: 130px; } }
/* Vendi · Scambia: titolo grande e un vero tasto (26/10) */
.tr .tr-h.tr-h-xl { font-size: clamp(40px, 11cqi, 56px); }
.tr .tr-go { align-self: stretch; min-height: 64px; font: 700 22px/1 var(--f-px); letter-spacing: .05em; text-transform: uppercase; }
/* resi: in fondo e in piccolo (26/10) */
.doc .doc-fine, .doc .doc-fine p, .doc .doc-fine h3 { font-size: 12px; line-height: 1.45; color: var(--muted); }
.doc .doc-fine h3 { margin-top: 18px; }

/* telefono, finestra aperta: il boss si fa piccolo e scende nell'angolo, non copre i testi delle schede (QC 26/10) */
@media (max-width: 700px) {
  body:has(.win:not(.is-min):not([hidden])) .buddy { right: 4px; bottom: calc(var(--bar-h) + 4px); }
  body:has(.win:not(.is-min):not([hidden])) .buddy-body { width: 40px; height: 46px; opacity: .9; }
}
@media (max-width: 700px) { .buddy { bottom: calc(var(--bar-h) + 74px); } }

/* ---------- v1.0.3 · 64013 mobile polish: full desktop OS, catalog, games, and checkout ---------- */
@media (max-width:700px){
  :root{--bar-h:calc(54px + env(safe-area-inset-bottom,0px));}
  .desk{bottom:var(--bar-h);}
  .taskbar{height:var(--bar-h);padding:4px max(5px,env(safe-area-inset-right,0px)) calc(4px + env(safe-area-inset-bottom,0px)) max(5px,env(safe-area-inset-left,0px));gap:4px;}
  .start{flex:none;min-width:70px;height:42px;padding:0 8px;font-size:15px;}
  .tasks{overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;flex:1;gap:3px;}
  .tasks::-webkit-scrollbar{display:none;}
  .task{flex:0 0 43px;min-width:43px;height:42px;padding:0;justify-content:center;}
  .tray{flex:none;height:42px;padding:0 4px;gap:4px;}
  .tray-lang{font-size:10px;}
  .tray-lang a{padding:8px 1px;}
  .tray-sound{min-width:38px;height:40px;}
  .tray-cart{min-width:34px;min-height:38px;}
  .win:not(.pw-win){top:0!important;left:0!important;width:100%!important;height:100%!important;max-height:100%!important;border-left:0;border-right:0;min-width:0;min-height:0;}
  .win-body{min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
  .win-bar{min-height:38px;gap:6px;padding:5px;}
  .win-title{font-size:13px;}
  .win-btn{min-width:38px;min-height:32px;}
  .toolbar{gap:6px;padding:8px;}
  .toolbar .btn{min-height:44px;}
  .cat-btn,.size-btn{min-height:44px;}
  .files{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 9px;padding:12px 9px calc(20px + env(safe-area-inset-bottom,0px));}
  .file{min-width:0;padding:3px;}
  .file-name,.file-meta{overflow-wrap:anywhere;}
  .pv{grid-template-columns:minmax(0,1fr)!important;padding:10px 10px 22px;gap:12px;}
  .pv-stage,.pv-info{min-width:0;}
  .pv-stage img{max-width:100%;object-fit:contain;}
  .buy-row{display:flex;flex-wrap:wrap;gap:8px;}
  .buy-row .btn,.buy-row button{min-height:44px;}
  .tbl-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .startmenu{max-width:calc(100vw - 8px);max-height:calc(100dvh - var(--bar-h) - 8px);overflow-y:auto;}
  .gm-stage{max-width:100%;overflow:hidden;}
  .gm-tabs{overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .gm .gm-stage canvas,.gm-stage canvas{max-width:100%;}
  .gm .btn,.gm button{min-height:44px;}
  .ht-head{flex-wrap:wrap;}
  .ht-brand{font-size:clamp(18px,5vw,23px);}
  .ht-bar{gap:8px;}
  .ht-quick{min-height:44px;font-size:11px;}
  .ht-status{min-width:0;overflow-wrap:anywhere;}
  .doc,.tr{max-width:100%;overflow-wrap:break-word;}
  .tr-grid,.tr-rules{grid-template-columns:minmax(0,1fr);}
  .nl-row,.search-form{flex-wrap:wrap;}
  input,select,textarea{font-size:16px!important;max-width:100%;}
  button,a,input,select{ -webkit-tap-highlight-color:transparent;}
}
@media (max-width:370px){
  .tray-lang{display:none;}
  .start{min-width:64px;padding:0 6px;}
  .dicon{width:88px;}
  .dicon svg,.dicon-img{width:58px;height:58px;}
  .dicon-label{font-size:12px;}
  .gm .gm-stage{margin-inline:3px;}
  .ht-stats span{min-width:37px;}
}
@media (max-height:520px) and (orientation:landscape) and (pointer:coarse){
  :root{--bar-h:calc(44px + env(safe-area-inset-bottom,0px));}
  .start,.task,.tray{height:36px;}
  .icons-col{flex-flow:column wrap;gap:4px;}
  .dicon{width:85px;}
  .dicon svg,.dicon-img{width:50px;height:50px;}
  .startmenu{max-height:calc(100dvh - var(--bar-h));}
}
