/* The Weekly Loot (rpg/ui-loot.js): the Daily tracker's 🎁 chip and the Weekly Loot window: the week's bar with a 🎁
   at each draw, the reel (a strip of framed prizes sliding under a gold arrow; --tc is a tile's tier colour, rpg/loot.js TIERS),
   the prize's card, the odds and the rules. The website's navy, gold for what's yours. */

/* The chip, after the egg's: the points to the next draw, gold and glowing with a draw in hand. */
.daily-track .dt-loot { position: relative; flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 1px 4px 1px 3px; border-radius: 9px; white-space: nowrap; border: 1px solid rgba(255, 210, 63, 0.45); font-size: 14px; line-height: 1; color: #ffe9a6; }
.daily-track .dt-loot img { width: 16px; height: 16px; image-rendering: pixelated; }
.daily-track .dt-loot b { font-weight: 400; translate: 0 0.09em; }
.daily-track .dt-loot.ready { background: var(--gold); border-color: var(--gold); color: #1a1405; animation: lt-chip 1.4s ease-in-out infinite; }
@keyframes lt-chip { 50% { box-shadow: 0 0 9px rgba(255, 210, 63, 0.85); } }
@media (max-width: 760px) {
  .daily-track .dt-loot { gap: 1px; margin-left: 0; padding: 1px 3px 1px 2px; font-size: 12px; }
  .daily-track .dt-loot img { width: 14px; height: 14px; }
}
/* Keep the tracker's rounded edge visibly inside both phone layouts. Sideways, the chat owns the right column; upright,
   the whole row may grow past the minimap but never past the screen. */
@media (max-width: 760px) and (orientation: portrait) {
  .daily-track { max-width: calc(100vw - 16px); box-sizing: border-box; }
}
@media (orientation: landscape) and (max-height: 500px) and (min-width: 561px) {
  html:not(.chat-collapsed) .daily-track { max-width: calc(100vw - var(--sw-chat-edge) - var(--sw-l) - 24px); box-sizing: border-box; }
  html.chat-collapsed .daily-track { max-width: calc(100vw - var(--sw-l) - var(--sw-r) - 24px); box-sizing: border-box; }
  html:not(.chat-collapsed) .hud-tr { right: calc(var(--sw-chat-edge) + 48px); }
}
.dt-loot-tip { display: none; position: absolute; top: calc(100% + 8px); right: -8px; z-index: 20; width: 220px; box-sizing: border-box; padding: 8px 10px; border-radius: 10px; background: rgba(3, 10, 44, 0.96); border: 1px solid rgba(255, 210, 63, 0.6); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); font-size: 13px; line-height: 1.35; color: #fff; text-align: left; white-space: normal; }
@media (hover: hover) { .daily-track .dt-loot:hover .dt-loot-tip { display: block; } }

/* The window. */
.loot-book { position: relative; }
.loot-book h2 .lt-chest { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: -6px; }
.lt-head { margin: 4px 0 10px; }
/* 10px each side: the end ones' points stay inside the window. */
.lt-bar { position: relative; height: 12px; margin: 26px 10px 22px; border-radius: 6px; background: rgba(0, 0, 0, 0.45); border: 1px solid #2e3d74; }
.lt-bar > span { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, #ffb32a, #ffe36b); transition: width 0.6s; }
.lt-bar > i { position: absolute; top: -4px; width: 2px; height: 18px; margin-left: -1px; background: #2e3d74; font-style: normal; }
/* Every draw: its 🎁 over the tick, grey until it's yours, and its points under the bar. */
.lt-bar > i::before { content: "🎁"; position: absolute; bottom: 19px; left: 50%; translate: -50% 0; font-size: 13px; line-height: 1; filter: grayscale(1); opacity: 0.6; }
.lt-bar > i b { position: absolute; top: 20px; left: 50%; translate: -50% 0; font-weight: 400; font-size: 11px; line-height: 1; color: var(--muted); white-space: nowrap; }
.lt-bar > i.got { background: var(--gold); }
.lt-bar > i.got::before { filter: none; opacity: 1; }
.lt-bar > i.got b { color: var(--gold); }
/* A narrow bar (phones) names only the first step and every 500 (rpg/loot.js minorStep), and the 🎁 between them are
   smaller: with 14 steps to 3,000, 50 and 150 would run into each other. */
.lt-bar { container-type: inline-size; }
@container (max-width: 560px) { .lt-bar > i.minor b { display: none; } .lt-bar > i.minor::before { font-size: 9px; } }
.lt-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; margin: 0; font-size: 14px; color: #c9d4ff; }
.lt-line b { font-weight: 400; color: #fff; }
.lt-line span + span { color: var(--muted); font-size: 12px; }
.lt-hand { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.lt-hand.on { color: var(--gold); }
.lt-hand b { font-weight: 400; }

/* The reel: tiles in a row, the arrow at the middle, the sides fading out. At rest it drifts by (.idle). */
.lt-reel { position: relative; height: 112px; margin: 6px 0 10px; border-radius: 12px; overflow: hidden; border: 1px solid #2e3d74; background: radial-gradient(ellipse at 50% 50%, #1d2a66 0, #0b1240 70%, #070c2a 100%); box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.6); }
.lt-reel::before, .lt-reel::after { content: ""; position: absolute; top: 0; bottom: 0; width: 18%; z-index: 2; pointer-events: none; }
.lt-reel::before { left: 0; background: linear-gradient(90deg, #070c2a, transparent); }
.lt-reel::after { right: 0; background: linear-gradient(270deg, #070c2a, transparent); }
.lt-strip { display: flex; gap: 8px; padding: 10px 8px; width: max-content; will-change: transform; }
.lt-reel.idle .lt-strip { animation: lt-drift 70s linear infinite; }
@keyframes lt-drift { to { transform: translateX(-50%); } }
.lt-arrow { position: absolute; left: 50%; top: 0; z-index: 3; width: 0; height: 0; margin-left: -9px; border: 9px solid transparent; border-top: 12px solid var(--gold); border-bottom: 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.lt-arrow.down { top: auto; bottom: 0; border-top: 0; border-bottom: 12px solid var(--gold); }
.lt-tile { position: relative; flex: none; box-sizing: border-box; width: 78px; height: 90px; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 6px 4px 4px; border-radius: 9px; background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 22%, #0b1240), #0b1240 70%); border: 2px solid var(--tc); box-shadow: inset 0 0 12px color-mix(in srgb, var(--tc) 30%, transparent); }
.lt-tile img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }
.lt-tile.pack img { image-rendering: auto; height: 52px; filter: drop-shadow(0 0 6px rgba(255, 197, 49, 0.7)); }
.lt-tile small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.1; color: #fff; }
.lt-tile em { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 12px; color: #fff; text-shadow: 0 1px 0 #000; }
.lt-tile[data-tier="epic"], .lt-tile[data-tier="legendary"] { box-shadow: inset 0 0 14px color-mix(in srgb, var(--tc) 45%, transparent), 0 0 10px color-mix(in srgb, var(--tc) 55%, transparent); }
.lt-tile[data-tier="locked"] img { filter: drop-shadow(0 0 5px rgba(63, 214, 176, 0.6)); }
.lt-tile.win { animation: lt-win 0.9s cubic-bezier(0.2, 1.5, 0.4, 1) both; z-index: 1; }
@keyframes lt-win { 0% { scale: 1; } 40% { scale: 1.16; box-shadow: 0 0 22px var(--tc), inset 0 0 18px var(--tc); } 100% { scale: 1.1; box-shadow: 0 0 16px var(--tc), inset 0 0 14px color-mix(in srgb, var(--tc) 50%, transparent); } }
.lt-reel.done .lt-tile:not(.win) { opacity: 0.55; transition: opacity 0.4s; }

/* The prize's card. */
.lt-got { margin: 0 0 10px; }
.lt-card { display: grid; gap: 3px; padding: 10px 12px; border-radius: 10px; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 18%, #0b1240), #0b1240); border: 1px solid var(--tc); animation: lt-card 0.45s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes lt-card { from { scale: 0.85; opacity: 0; } }
.lt-card .lt-tier { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tc); }
.lt-card b { font-weight: 400; font-size: 19px; color: #fff; line-height: 1.15; }
.lt-card small { font-size: 13px; color: #c9d4ff; line-height: 1.35; }
.loot-book.boom .lt-reel { animation: lt-shake 0.5s; }
@keyframes lt-shake { 20% { translate: -4px 0; } 40% { translate: 4px 1px; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }

/* The odds and the rules. */
.lt-odds { margin: 10px 0 6px; border: 1px solid #2e3d74; border-radius: 10px; background: rgba(3, 10, 44, 0.5); }
.lt-odds summary { cursor: pointer; padding: 8px 12px; font-size: 14px; color: var(--gold); }
.lt-odds ul { list-style: none; margin: 0; padding: 0 8px 8px; display: grid; gap: 4px; }
.lt-odds li { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 8px; border-left: 3px solid var(--tc); background: rgba(0, 0, 0, 0.25); }
.lt-odds li img { flex: none; width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.lt-odds li.lt-jack img { image-rendering: auto; }
.lt-odds li span { flex: 1; min-width: 0; display: grid; gap: 1px; }
.lt-odds li b { font-weight: 400; font-size: 14px; color: #fff; }
.lt-odds li small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.lt-odds li em { flex: none; font-style: normal; font-size: 14px; color: var(--tc); }
.lt-rules { margin: 0; padding: 0 12px 4px 30px; font-size: 13px; line-height: 1.4; color: #c9d4ff; }
.lt-how .pane-note { margin: 4px 12px 10px; }
.lt-rules li + li { margin-top: 3px; }
@media (max-width: 520px) {
  .lt-bar > i::before { font-size: 11px; }
  .lt-bar > i b { font-size: 10px; }
  .lt-tile { width: 70px; height: 84px; }
  .lt-tile img { width: 42px; height: 42px; }
  .lt-reel { height: 104px; }
}
@media (prefers-reduced-motion: reduce) { .lt-reel.idle .lt-strip, .daily-track .dt-loot.ready { animation: none; } }
