/* UMET — the home computer shop. Bright white, loud orange, bargains everywhere. */
#umet { --o: #fb7701; --o2: #ff4b00; --ink: #222; --mute: #777; --line: #eee; --bg: #f5f5f5;
  position: fixed; inset: 0; z-index: 8; background: #0009; display: grid; place-items: center;
  color: var(--ink); font-family: "Arial Rounded MT Bold", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  text-shadow: none; -webkit-user-select: none; user-select: none; }
:where(#umet button) { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
#umet .hidden { display: none !important; }
#umet button:focus-visible { outline: 3px solid #1f6fff; outline-offset: 2px; }
.u-app { width: min(980px, 100vw); height: min(100%, 100dvh); max-height: 100vh; background: var(--bg); display: flex; flex-direction: column;
  overflow: hidden; box-shadow: 0 20px 80px #000c; }
@media (min-width: 1000px) { .u-app { height: 92vh; border-radius: 18px; border: 10px solid #1b1d22; } }

.u-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top));
  padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); background: var(--o); color: #fff; }
.u-logo { font-weight: 900; font-size: 26px; letter-spacing: .02em; line-height: 1; padding: 4px 10px; border: 3px solid #fff; border-radius: 10px;
  font-family: "Arial Black", "Arial Rounded MT Bold", system-ui, sans-serif; }
.u-search { flex: 1; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 0 6px 0 12px; height: 38px;
  border: 2px solid #000; min-width: 0; }
.u-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15px; min-width: 0; background: none; color: var(--ink); -webkit-user-select: text; user-select: text; }
.u-coins { font-weight: 900; background: #fff2; border-radius: 999px; padding: 6px 12px; white-space: nowrap; font-size: 16px; }
.u-top .u-x { font-size: 22px; width: 38px; height: 38px; border-radius: 50%; background: #0002; color: #fff; flex: none; }
.u-ship-strip { background: #fff3e8; color: #0a8a3a; font-size: 12px; font-weight: 700; padding: 5px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-chips { display: flex; gap: 8px; padding: 8px 12px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); scrollbar-width: none; flex: none; }
.u-chips::-webkit-scrollbar { display: none; }
.u-chips button { white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 700; }
.u-chips button.on { background: var(--o); color: #fff; }
.u-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 10px 12px 18px; overscroll-behavior: contain; }

.u-tabs { display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); flex: none; }
.u-tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 7px; font-size: 11px; font-weight: 700; color: var(--mute) !important; position: relative; }
.u-tabs button span { font-size: 20px; filter: grayscale(1); opacity: .7; }
.u-tabs button.on { color: var(--o) !important; } .u-tabs button.on span { filter: none; opacity: 1; }
.u-dot { position: absolute; top: 4px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 50%; background: #e0001b; border: 2px solid #fff; }

/* shop feed */
.u-hero { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 14px; margin-bottom: 10px;
  background: linear-gradient(120deg, var(--h1), var(--h2)); color: #fff !important; }
.u-hero b { font-size: 20px; font-weight: 900; } .u-hero span { font-size: 13px; opacity: .95; }
.u-hero small { margin-top: 4px; align-self: flex-start; background: #fff; color: #e0001b; font-weight: 900; padding: 3px 9px; border-radius: 6px; font-size: 13px; }
.u-boxpromo { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 2px dashed var(--o); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; }
.u-boxpromo .u-gift { font-size: 34px; animation: u-wobble 1.6s ease-in-out infinite; }
.u-boxpromo span { flex: 1; display: flex; flex-direction: column; } .u-boxpromo small { color: var(--mute); font-size: 12px; }
.u-boxpromo em { font-style: normal; background: var(--o); color: #fff; font-weight: 900; padding: 6px 14px; border-radius: 999px; }
.u-row-head { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 2px 8px; gap: 8px; }
.u-row-head b { font-size: 17px; font-weight: 900; } .u-row-head span { font-size: 12px; color: #e0001b; font-weight: 700; }
.u-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; touch-action: pan-x pan-y; }
.u-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.u-card { display: flex; flex-direction: column; text-align: left; background: #fff; border-radius: 10px; overflow: hidden; padding-bottom: 8px; position: relative;
  transition: transform .12s; }
.u-card:active { transform: scale(.97); }
.u-card.off { opacity: .55; }
.u-pic { aspect-ratio: 1; display: grid; place-items: center; position: relative; overflow: hidden; }
.u-pic.sm { width: 56px; height: 56px; border-radius: 8px; flex: none; }
.u-pic.big { aspect-ratio: 16 / 10; border-radius: 14px 14px 0 0; }
.u-emo { font-size: clamp(44px, 12vmin, 72px); filter: drop-shadow(0 6px 8px #0004); }
.u-pic.sm .u-emo { font-size: 30px; } .u-pic.big .u-emo { font-size: 96px; }
.u-badge { position: absolute; top: 6px; left: 6px; font-style: normal; font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 5px; color: #fff; background: #e0001b; }
.u-badge.deal { background: #ffd400; color: #111; } .u-badge.season { background: #2a0a3a; } .u-badge.hot { background: #e0001b; }
.u-sheet .u-badge { position: static; margin-left: 4px; }
.u-rar { position: absolute; bottom: 6px; right: 6px; font-style: normal; font-size: 10px; font-weight: 900; color: #fff; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.u-sheet-body > .u-rar, .u-card-big > .u-rar { position: static; display: inline-block; }
.u-name { font-size: 12.5px; line-height: 1.25; margin: 6px 8px 2px; color: #333; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.u-price { display: flex; align-items: baseline; gap: 5px; margin: 2px 8px; flex-wrap: wrap; }
.u-price b { color: var(--o2); font-size: 18px; font-weight: 900; } .u-price s { color: #999; font-size: 12px; }
.u-price em { font-style: normal; color: #fff; background: var(--o2); font-size: 11px; font-weight: 900; padding: 1px 5px; border-radius: 4px; }
.u-price.big b { font-size: 30px; } .u-price.big s { font-size: 15px; }
.u-meta { font-size: 11.5px; color: var(--mute); margin: 0 8px; }
.u-free, .u-own { font-size: 11px; font-weight: 800; color: #0a8a3a; margin: 3px 8px 0; }
.u-own { color: #1f6fff; } .u-own.on { color: var(--o); }
.u-empty { text-align: center; color: var(--mute); padding: 30px 10px; }
.u-small { font-size: 12px; color: var(--mute); text-align: center; }
.u-orange { color: var(--o2); }

/* product pictures */
.u-car { width: 62%; height: 24%; border-radius: 10px 14px 6px 6px; background: var(--p); position: relative; margin-top: 10%;
  box-shadow: inset 0 -6px 0 #0003, 0 0 26px var(--g, transparent), 0 10px 14px #0003; }
.u-car::before { content: ""; position: absolute; left: 22%; width: 46%; height: 75%; top: -62%; background: linear-gradient(#9fd8ff, #1f3550);
  border: 5px solid var(--p); border-bottom: 0; border-radius: 10px 12px 0 0; }
.u-car i { position: absolute; bottom: -45%; width: 24%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #ffc21a 0 34%, #161616 36%); left: 10%; }
.u-car i + i { left: auto; right: 10%; }
.u-wheel { width: 54%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--h) 0 22%, #0003 23% 25%, var(--h) 26% 36%, var(--t) 37% 100%);
  box-shadow: 0 10px 18px #0005, inset 0 0 0 6px #0002; animation: u-spin 3s linear infinite; position: relative; }
.u-wheel::after { content: ""; position: absolute; inset: 14%; border-radius: 50%; border: 4px dashed #0002; }
.u-wheel.ghost { opacity: .55; box-shadow: 0 0 30px #bff6ff; }
.u-banner { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 8px; color: var(--fg);
  background: linear-gradient(110deg, var(--b1), var(--b2)); box-shadow: 0 4px 10px #0004; min-width: 120px; max-width: 92%;
  clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%); padding-right: 22px; }
.u-banner.p-check { background: repeating-conic-gradient(var(--b1) 0 25%, var(--b2) 0 50%) 0 0 / 16px 16px; }
.u-banner.p-check .u-btxt { background: #000a; color: #fff; padding: 2px 6px; border-radius: 4px; }
.u-banner.p-stripes { background: repeating-linear-gradient(115deg, var(--b1) 0 12px, var(--b2) 12px 24px); }
.u-banner.p-stars { background: radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 2px) 0 0 / 18px 18px, radial-gradient(circle at 70% 70%, #fff8 0 1px, transparent 2px) 0 0 / 14px 14px, linear-gradient(110deg, var(--b1), var(--b2)); }
.u-bemo { font-size: 22px; } .u-btxt { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.u-btxt b { font-size: 14px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-btxt small { font-size: 9.5px; font-weight: 900; letter-spacing: .12em; opacity: .9; }
.u-banner.big { padding: 10px 34px 10px 12px; } .u-banner.big .u-bemo { font-size: 34px; } .u-banner.big b { font-size: 22px; } .u-banner.big small { font-size: 12px; }

/* product sheet */
.u-sheet { position: absolute; inset: 0; background: #0008; display: flex; align-items: flex-end; justify-content: center; z-index: 2; }
.u-sheet-card { width: min(560px, 100vw); max-height: 94%; overflow-y: auto; touch-action: pan-y; background: #fff; border-radius: 18px 18px 0 0; position: relative;
  padding-bottom: env(safe-area-inset-bottom); animation: u-up .22s ease-out; overscroll-behavior: contain; }
@media (min-width: 700px) { .u-sheet { align-items: center; } .u-sheet-card { border-radius: 18px; } }
.u-sheet-card.nope { animation: u-nope .35s; }
.u-sheet-card .u-x { position: absolute; top: 10px; right: 10px; z-index: 1; width: 36px; height: 36px; border-radius: 50%; background: #0006; color: #fff !important; font-size: 18px; }
.u-sheet-body { padding: 12px 16px 18px; }
.u-sheet-body small { color: var(--mute); font-size: 12px; }
.u-sheet-body h3 { font-size: 16px; margin: 8px 0 6px; line-height: 1.3; }
.u-sheet-body h4 { margin: 16px 0 6px; font-size: 14px; }
.u-season { margin-top: 8px; background: #2a0a3a; color: #ffd6a8; font-size: 12.5px; font-weight: 700; padding: 6px 10px; border-radius: 8px; }
.u-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.u-buy { flex: 1; min-width: 150px; background: var(--o) !important; color: #fff !important; font-weight: 900 !important; font-size: 17px !important; padding: 13px 18px !important;
  border-radius: 999px; box-shadow: 0 4px 0 #b84f00; }
.u-buy:active { transform: translateY(2px); box-shadow: 0 2px 0 #b84f00; }
.u-buy:disabled { background: #ccc !important; box-shadow: none; cursor: default; }
.u-buy.done { background: #1f6fff !important; }
.u-ghost { border: 2px solid var(--o) !important; color: var(--o) !important; font-weight: 900 !important; padding: 11px 18px !important; border-radius: 999px; }
.u-ghost.sm { padding: 3px 10px !important; font-size: 12px; }
.u-rev { background: var(--bg); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; font-size: 13px; }
.u-rev p { margin: 3px 0 0; color: #444; }

/* mystery box */
.u-box, .u-sell, .u-garage { max-width: 560px; margin: 0 auto; text-align: center; position: relative; }
.u-box h2, .u-sell h2, .u-garage h2 { margin: 6px 0 4px; font-size: 22px; } .u-box > p, .u-sell > p { color: #555; font-size: 14px; margin: 0 0 10px; }
.u-bigbox { font-size: min(130px, 30vmin); line-height: 1; margin: 6px auto 10px; display: block; filter: drop-shadow(0 14px 16px #0004) grayscale(.6); opacity: .7; }
.u-bigbox.ready { filter: drop-shadow(0 14px 16px #0004); opacity: 1; animation: u-wobble 1.6s ease-in-out infinite; }
.u-bigbox.shake { animation: u-shake .12s linear infinite !important; filter: drop-shadow(0 0 30px #ffd400); opacity: 1; }
.u-bigbox.pop { animation: u-pop .4s ease-out forwards !important; }
.u-box .u-buy { max-width: 320px; margin: 0 auto; display: block; width: 100%; }
.u-next { font-weight: 800; color: #e0001b; }
.u-odds { display: flex; justify-content: center; gap: 6px; margin: 14px 0 8px; flex-wrap: wrap; }
.u-odds span { display: flex; flex-direction: column; background: #fff; border-radius: 10px; padding: 6px 12px; font-size: 11px; color: var(--c); font-weight: 800; border-bottom: 3px solid var(--c); }
.u-odds b { font-size: 16px; }
.u-reveal { position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; background: #000a; overflow: hidden; }
.u-rays { position: absolute; width: 520px; height: 520px; max-width: 140vw; background: repeating-conic-gradient(var(--c) 0 10deg, transparent 10deg 22deg);
  border-radius: 50%; opacity: .35; animation: u-spin 6s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
.u-card-big { position: relative; background: #fff; border-radius: 18px; width: min(300px, 86vw); overflow: hidden; padding-bottom: 14px; box-shadow: 0 0 0 4px var(--c), 0 0 60px var(--c);
  animation: u-in .45s cubic-bezier(.2, 1.6, .4, 1); }
.u-card-big .u-pic { aspect-ratio: 4 / 3; } .u-card-big .u-rar { margin-top: 10px; }
.u-card-big h3 { margin: 6px 10px 2px; font-size: 20px; } .u-card-big p { margin: 2px 12px; font-size: 13px; color: #555; }
.u-card-big .u-dup { color: #0a8a3a; font-weight: 800; }
.u-card-big .u-actions { padding: 0 12px; }

/* sell + garage */
.u-line { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px; margin-bottom: 8px; text-align: left; }
.u-info { flex: 1; display: flex; flex-direction: column; min-width: 0; } .u-info small { color: var(--mute); font-size: 12px; }
.u-sellbtn { background: #222 !important; color: #fff !important; font-weight: 900; padding: 10px 16px !important; border-radius: 999px; white-space: nowrap; }
.u-sellbtn.sure { background: #e0001b !important; }
.u-namebox { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #555; text-align: left; margin: 8px 0; }
.u-namebox input { font: inherit; font-size: 17px; padding: 10px 12px; border-radius: 10px; border: 2px solid #ddd; outline-color: var(--o); -webkit-user-select: text; user-select: text; }
.u-preview { display: flex; justify-content: center; padding: 10px; background: #fff; border-radius: 12px; margin-bottom: 10px; }
.u-slot { background: #fff; border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; text-align: left; }
.u-slot-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.u-chips-row { display: flex; gap: 6px; flex-wrap: wrap; }
.u-chips-row button { padding: 6px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 700; }
.u-chips-row button.on { background: var(--o); color: #fff; }
.u-chips-row .u-shopmore { background: none; border: 2px dashed #ccc; color: var(--mute); }

.u-toast { position: absolute; left: 50%; bottom: 78px; transform: translate(-50%, 20px); background: #222; color: #fff; padding: 9px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 700; opacity: 0; transition: .25s; pointer-events: none; max-width: 92vw; text-align: center; z-index: 4; }
.u-toast.on { opacity: 1; transform: translate(-50%, 0); } .u-toast.good { background: #0a8a3a; } .u-toast.bad { background: #e0001b; }

@keyframes u-wobble { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-9deg) scale(1.05); } 20% { transform: rotate(8deg) scale(1.05); } 30% { transform: rotate(0); } }
@keyframes u-shake { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-6px, 2px) rotate(-6deg); } 50% { transform: translate(5px, -3px) rotate(5deg); } 75% { transform: translate(-3px, -2px) rotate(-3deg); } }
@keyframes u-pop { to { transform: scale(1.8); opacity: 0; } }
@keyframes u-in { from { transform: scale(.3) rotate(-8deg); opacity: 0; } }
@keyframes u-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes u-nope { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
@keyframes u-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #umet * { animation: none !important; } }

/* short sideways phones: slimmer header, two rows of cards on screen */
@media (max-height: 520px) {
  .u-top { padding-top: calc(4px + env(safe-area-inset-top)); padding-bottom: 4px; } .u-logo { font-size: 20px; padding: 2px 8px; }
  .u-search { height: 32px; } .u-ship-strip { display: none; } .u-chips { padding: 5px 12px; }
  .u-tabs button { flex-direction: row; justify-content: center; gap: 6px; font-size: 13px; padding: 5px 0; } .u-tabs button span { font-size: 16px; }
  .u-grid, .u-row { grid-auto-columns: minmax(130px, 1fr); } .u-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .u-bigbox { font-size: 80px; margin: 0 auto 6px; }
}
@media (max-width: 420px) { .u-coins { font-size: 14px; padding: 5px 9px; } .u-logo { font-size: 21px; } .u-grid { grid-template-columns: 1fr 1fr; } }

/* in-game: the banner next to the score, and the big one when you score */
#youBanner { position: absolute; top: 30px; left: 12px; pointer-events: none; }
#youBanner .u-banner { min-width: 0; max-width: none; transform: scale(.85); transform-origin: left top; }
#goalCard .u-banner { max-width: none; }
#goalCard { position: absolute; top: calc(28% + clamp(40px, 8vw, 80px)); left: 50%; transform: translateX(-50%); pointer-events: none; animation: u-in .45s cubic-bezier(.2, 1.6, .4, 1); }
#goalCard:empty { display: none; }
@media (pointer: coarse) and (orientation: portrait) { #youBanner { top: 46px; } }
