@font-face { font-family: "Cinzel"; font-weight: 500; font-display: swap; src: url("/activity/app/fonts/cinzel-500.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 700; font-display: swap; src: url("/activity/app/fonts/cinzel-700.woff2") format("woff2"); }

:root {
  --bg: #100d0a;
  --panel: #17120e;
  --panel-2: #1d1712;
  --line: #3a2f22;
  --line-hi: #6b5732;
  --text: #d6cbb8;
  --dim: #8d8271;
  --gold: #c9a95c;
  --blood: #9e2418;
  --cell: 40px;
  --serif: "Cinzel", "Trajan Pro", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.4 var(--sans); }
body { overflow-x: hidden; }
button, input, select { font: inherit; color: inherit; }

.bar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { font: 700 20px var(--serif); color: var(--gold); letter-spacing: .04em; }
.brand span { margin-left: 8px; font-weight: 500; font-size: 13px; color: var(--dim); }
.gold { font: 700 15px var(--serif); color: #e6c768; white-space: nowrap; }
.bar .gold { margin-left: 12px; }
.off-stash .gold { display: none; }
.gold small { font: 500 11px var(--sans); color: var(--dim); margin-right: 6px; letter-spacing: .08em; text-transform: uppercase; }

.stash { padding: 12px; max-width: 560px; margin: 0 auto; }
.tabs { display: flex; align-items: stretch; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs[hidden] { display: none; }
.tab { flex: none; padding: 9px 14px; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font: 500 15px var(--serif); color: var(--dim); position: relative; white-space: nowrap; touch-action: manipulation; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); }
.tab .dot { position: absolute; top: 7px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); opacity: .8; }
.pages .tab { padding: 6px 14px; font-size: 14px; }
.tabs select { flex: none; margin-left: auto; align-self: center; max-width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 5px 8px; color: var(--text); }
.note { color: var(--dim); font-size: 12px; margin: -2px 0 8px; }
.note:empty { display: none; }

.gridwrap { position: relative; display: block; max-width: 100%; }
.grid { position: relative; margin: 0 auto; width: calc(var(--cols) * var(--cell) + 2px); height: calc(var(--rows) * var(--cell) + 2px); background-color: #08070a;
  background-image: linear-gradient(#1f1b17 1px, transparent 1px), linear-gradient(90deg, #1f1b17 1px, transparent 1px);
  background-size: var(--cell) var(--cell); border: 1px solid var(--line-hi); box-sizing: border-box; }
.item { position: absolute; border: 0; padding: 0; background: transparent; cursor: pointer; outline-offset: -2px; transition: opacity .12s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.item .tint { position: absolute; inset: 1px 0 0 1px; opacity: .47; }
.item .pic { position: absolute; background-repeat: no-repeat; image-rendering: pixelated; }
.item.eth .pic { opacity: .55; }
.item .sock { position: absolute; inset: 0; pointer-events: none; }
.item .sock i { position: absolute; box-sizing: border-box; border-radius: 50%; background: #0a090c; border: 1px solid #6a6670; box-shadow: inset 0 1px 2px #000; }
.item .sock i.full { background: #0a090ccc; }
.item .sock i div { position: absolute; }
.item[aria-pressed="true"] { outline: 2px solid var(--gold); z-index: 3; }
.item:focus-visible { outline: 2px solid #fff; z-index: 4; }
.status { width: 100%; text-align: center; padding: 28px 12px; color: var(--dim); font-family: var(--serif); }
.status:empty { display: none; }
.status.err { color: #e08070; }
.status button { margin-top: 10px; padding: 8px 16px; background: var(--panel-2); border: 1px solid var(--gold); color: var(--gold); border-radius: 3px; cursor: pointer; font-family: var(--serif); }

.tip { background: #050408; border: 1px solid #2a2530; padding: 8px 12px; text-align: center; font: 500 14px/1.35 var(--serif); letter-spacing: .01em; }
.tip div { min-height: 1.35em; }
.tip .gap { height: .5em; min-height: 0; }
.float { position: fixed; z-index: 20; pointer-events: none; width: max-content; max-width: min(320px, calc(100vw - 16px)); box-shadow: 0 6px 24px #000c; }
.float[hidden] { display: none; }

.item.fresh { animation: arrive 1.6s ease-out; }
@keyframes arrive { 0% { box-shadow: 0 0 0 2px var(--gold), 0 0 18px 4px #c9a95c99; opacity: .2; } 40% { opacity: 1; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .item.fresh { animation: none; outline: 2px solid var(--gold); } }

.item.has-pouch .pic { filter: drop-shadow(0 0 3px #c9a95c88); }
.pouch { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: #000b; }
.pouch[hidden] { display: none; }
.pouch-card { width: min(100%, 352px); max-height: 100%; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-hi); border-radius: 4px; box-shadow: 0 10px 40px #000; }
.pouch-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 14px; border-bottom: 1px solid var(--line); }
.pouch-head h2 { margin: 0; font: 700 17px var(--serif); color: var(--gold); letter-spacing: .03em; }
.pouch-total { flex: 1; color: var(--dim); font-size: 13px; }
.pouch-x { flex: none; width: 44px; height: 44px; background: none; border: 0; color: var(--dim); font-size: 26px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.pouch-x:hover { color: var(--text); }
.pouch-card .tabs { margin: 0; padding: 0 6px; }
.pouch-card .tab { min-height: 44px; }
.pouch-pic { padding: 12px; display: flex; flex-direction: column; align-items: center; min-height: 120px; }
.pouch-pic img { display: block; width: 100%; max-width: 320px; height: auto; image-rendering: auto; }
.pouch-pic img[hidden] { display: none; }

/* The switch between the views (Stash, Ladder, Admin), in the header. */
.views { display: flex; gap: 2px; margin-left: auto; }
.view-sw { background: none; border: 1px solid var(--line); padding: 3px 12px; font: 500 13px var(--serif); color: var(--dim); cursor: pointer; touch-action: manipulation; }
.view-sw:first-child { border-radius: 3px 0 0 3px; }
.view-sw:last-child { border-radius: 0 3px 3px 0; }
.view-sw[aria-selected="true"] { color: var(--gold); border-color: var(--gold); background: var(--panel-2); }
@media (max-width: 380px) { .view-sw { padding: 3px 8px; } .brand span { display: none; } }

/* The Ladder view, after the game's ladder screen: gold rows, a dead hardcore hero grey, your own white. */
.ladder { padding: 12px; max-width: 560px; margin: 0 auto; }
.ladder[hidden] { display: none; }
.lad { display: flex; flex-direction: column; background: #08070a; border: 1px solid var(--line-hi); }
.lad:empty { display: none; }
.lad-row { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) 8.2em 2.4em 7.4em; gap: 6px; align-items: baseline; padding: 4px 8px; border-top: 1px solid #1f1b17; font: 500 13px/1.3 var(--serif); color: #c7b377; }
.lad-row:first-child { border-top: 0; }
.lad-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lad-row .r, .lad-row .l, .lad-row .x { text-align: right; font-variant-numeric: tabular-nums; }
.lad-row .n i { font-style: normal; color: inherit; opacity: .8; }
.lad-row.dead { color: #7d7d7d; }
.lad-row.you { color: #f0ece4; background: #1d1712; }
.lad-head span { overflow: visible; }
.lad-head { font: 700 11px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); background: var(--panel); }
@media (max-width: 420px) {
  .lad-row { grid-template-columns: 2.2em minmax(0, 1fr) 2em 6.6em; font-size: 12px; padding: 4px 6px; }
  .ladder .pages .tab { padding: 6px 7px; }
  .lad-row .c { display: none; }
}
