/* Offline progress: the "while you were away" window (systems/offline.js) */
/* under the game's toasts (61+: the update notice stays clickable), over everything else */
.off-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: #050a14cc; }
.off-box {
  /* dvh: the visible screen (without the browser's bars), on the page's scale */
  width: min(560px, 100%); max-height: calc(calc(var(--app-h, 100dvh) / var(--ui-zoom, 1)) - 32px); overflow-y: auto;
  display: grid; gap: 12px; padding: 18px 20px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 12px 40px #0008;
}
.off-box h2 { font-family: var(--pixel); font-size: 1.3rem; color: var(--accent); }
.off-box p { margin: 0; line-height: 1.45; }
.off-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.off-col, .off-loot { display: grid; gap: 4px; align-content: start; padding: 10px 12px; border-radius: 10px; background: #0b1424; border: 1px solid var(--line); }
.off-col-title { font-family: var(--pixel); font-size: 0.9rem; margin-bottom: 2px; display: flex; align-items: center; gap: 2px; }
.off-col-title img, .off-full img { width: 16px; height: 16px; }
/* the price next to "Completo": the diamond on the same line (img is display:block in reset.css) */
.off-price { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; white-space: nowrap; }
.off-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: 0.9rem; }
.off-row b { font-family: var(--pixel); color: #7dff8a; }
.off-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 10px; }
.off-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; min-width: 0; }
.off-item img { width: 22px; height: 22px; flex: none; image-rendering: pixelated; }
.off-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the choice is always in sight: the buttons stick to the bottom of the box while the rest scrolls */
.off-btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; position: sticky; bottom: -18px; z-index: 1; margin: 0 -20px; padding: 10px 20px; background: var(--card); border-top: 1px solid var(--line); }
.off-later { margin-right: auto; }
.off-full { display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.off-short { text-align: right; min-height: 1em; }
/* a short screen (a phone on its side): wider, the two columns on the left and the items on the right */
@media (max-height: 500px) {
  .off-box { width: min(860px, 100%); grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .off-box > :not(.off-cols, .off-loot) { grid-column: 1 / -1; }
  .off-loot { max-height: 34dvh; overflow-y: auto; }
}
@media (max-width: 520px) {
  .off-cols { grid-template-columns: 1fr; }
  .off-btns { flex-direction: column-reverse; }
  .off-btns .btn { width: 100%; }
}
