/* Lootle: town square (hub) and the persistent screens: Town, Relic Book, Bazaar, Guild, Community, Expedition */
.center { text-align: center; }
header.top { gap: 6px; }
.hgold { display: flex; align-items: center; gap: 3px; font-family: 'Silkscreen', monospace; font-size: 13px; color: var(--gold); min-width: 50px; justify-content: center; }
.gold { display: inline-flex; align-items: center; gap: 3px; color: var(--gold); font-family: 'Silkscreen', monospace; white-space: nowrap; }
.gold img { display: inline-block; }
.logo.small { font-size: clamp(34px, 10vw, 52px); text-align: center; margin-top: 8px; }
.hub .tagline { text-align: center; margin-bottom: 12px; }

.herocard { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 3px solid var(--edge); padding: 8px 10px; cursor: pointer; box-shadow: 0 4px 0 #120d1c; }
.hcsprites { display: flex; align-items: flex-end; }
.hcsprites .petimg { margin-left: -6px; }
.hcinfo { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hcinfo b { font-size: 18px; color: var(--ink); }
.hcinfo span { font-size: 12px; color: var(--muted); }
.hcinfo .hccode { font-family: 'Silkscreen', monospace; font-size: 10px; color: #6fd6f0; }
.hcgold .gold { font-size: 18px; }
.btn.big.done { border-color: var(--gold); color: var(--gold); font-size: 14px; }

.hubgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 10px; }
@media (max-width: 420px) { .hubgrid { grid-template-columns: repeat(2, 1fr); } }
.hubtile { background: var(--panel); border: 3px solid var(--edge); color: var(--ink); padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; font-family: 'Lootle Digits', 'Pixelify Sans', monospace; box-shadow: 0 4px 0 #120d1c; }
.hubtile:hover { border-color: #6fd6f0; }
.hubtile:active { transform: translateY(3px); box-shadow: 0 1px 0 #120d1c; }
.hubtile b { font-family: 'Silkscreen', monospace; font-weight: 400; font-size: 12px; }
.hubtile span { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; }

.projbar { background: var(--panel); border: 2px solid var(--edge); padding: 8px; cursor: pointer; }
.pbl { display: flex; justify-content: space-between; font-family: 'Silkscreen', monospace; font-size: 11px; margin-bottom: 4px; }
.pbl span { color: var(--gold); }
.pbar { height: 10px; background: #0a0812; border: 2px solid #1b1424; position: relative; margin: 4px 0; }
.pbar i { position: absolute; inset: 0; right: auto; background: linear-gradient(90deg, #a8761c, #f2c14e); }
.inbox { display: flex; flex-direction: column; gap: 4px; }
.msg { background: #1f2a1c; border-left: 3px solid #7ccf5a; padding: 6px 8px; font-size: 14px; }
.hublinks { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.hublinks .btn { white-space: nowrap; }

.mhead { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.mhead h2 { flex: 1; margin: 10px 0; }

/* town */
.town { display: flex; flex-direction: column; gap: 6px; }
.bld { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 2px solid var(--edge); padding: 8px; opacity: .8; }
.bld.built { opacity: 1; border-color: #5a4a2a; background: #241c14; }
.bicon { width: 48px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center; background: #120d1c; border: 2px solid #3a2f55; }
.binfo { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.binfo b { font-size: 16px; color: var(--ink); }
.binfo span { font-size: 12px; color: #d9cfe8; }
.binfo .nxt { color: var(--muted); }
.pips { display: flex; gap: 3px; }
.pips i { width: 14px; height: 6px; background: #2a2236; }
.pips i.on { background: var(--gold); }
.maxed { font-family: 'Silkscreen', monospace; color: var(--gold); padding: 0 8px; }
.bld .btn.small { line-height: 1.4; min-width: 78px; }
.petpick, .trophies { display: flex; gap: 8px; flex-wrap: wrap; }
.petbtn { background: var(--panel); border: 2px solid var(--edge); color: var(--muted); padding: 6px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center;
  font-family: 'Silkscreen', monospace; font-size: 10px; }
.petbtn.on { border-color: var(--gold); color: var(--gold); }
.petpick { justify-content: center; }
.petbtn { width: 92px; gap: 2px; text-align: center; font-size: 11px; }
.petbtn small { font-size: 9px; line-height: 1.15; color: var(--muted); }
.petbtn.locked { cursor: default; opacity: .85; border-style: dashed; }
.petbtn .sil { filter: brightness(0) invert(.25); opacity: .7; }
.pethead { margin: 12px 0 6px; font-family: 'Silkscreen', monospace; font-size: 12px; letter-spacing: 1px; color: var(--gold); text-align: center; }
.pethead span { color: var(--muted); }
.rar { font-style: normal; font-family: 'Silkscreen', monospace; font-size: 9px; letter-spacing: .5px; text-transform: uppercase; }
.rar.common { color: #b8b2c8; } .rar.uncommon { color: #7ccf5a; } .rar.rare { color: #6fb0ff; } .rar.epic { color: #c27cff; } .rar.legendary { color: #ffb347; text-shadow: 0 0 6px rgba(255,179,71,.6); }
.petfound { border: 2px solid #f2c14e; padding: 6px; background: rgba(242,193,78,.08); animation: fadein .4s; }

/* relic book */
.rset { background: var(--panel); border: 2px solid var(--edge); padding: 8px; margin-bottom: 6px; }
.rset.complete { border-color: var(--gold); box-shadow: 0 0 10px rgba(242,193,78,.3); }
.rsethead { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.rsethead b { font-family: 'Silkscreen', monospace; font-weight: 400; }
.rsethead span { color: var(--muted); font-size: 12px; text-align: right; }
.rslots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.rslot { background: #120d1c; border: 2px solid #2a2236; display: flex; flex-direction: column; align-items: center; padding: 4px 2px; position: relative; min-height: 70px; }
.rslot.have { border-color: #4a3d66; }
.rslot em { font-family: 'Silkscreen', monospace; font-style: normal; font-size: 22px; color: #3a2f55; line-height: 34px; }
.rslot span { font-size: 10px; text-align: center; color: var(--muted); line-height: 1.15; margin-top: 2px; }
.rslot.have span { color: var(--ink); }
.rslot i { position: absolute; top: 2px; right: 3px; font-style: normal; font-family: 'Silkscreen', monospace; font-size: 10px; color: var(--gold); }
.rname { font-weight: 600; }

/* bazaar */
.stalls { display: flex; flex-direction: column; gap: 4px; }
.stall { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 2px solid var(--edge); padding: 6px 8px; }
.sinfo { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sinfo span { font-size: 11px; color: var(--muted); }
input, .price { background: #0a0812; border: 2px solid var(--edge); color: var(--ink); font-family: 'Lootle Digits', 'Pixelify Sans', monospace; font-size: 15px; padding: 6px 8px; min-width: 0; }
.price { width: 76px; }
.recent { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.recent span { display: inline-flex; align-items: center; gap: 4px; }

/* guild, community, expedition */
.gcard { background: var(--panel); border: 2px solid var(--edge); padding: 10px; display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.gcard b { font-size: 17px; color: var(--ink); }
.gcard em { font-style: normal; color: #6fd6f0; font-family: 'Silkscreen', monospace; }
.gcard > span { font-size: 13px; color: #d9cfe8; }
.gcard.done { border-color: #3f6e33; }
.gcard.cur { border-color: var(--gold); }
.gcard.locked { opacity: .6; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row input { flex: 1; }
.board1 { display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 2px solid var(--edge); padding: 6px 8px; margin-bottom: 8px; }
.board1 > div { display: flex; justify-content: space-between; font-size: 14px; }
.board1 b { font-family: 'Silkscreen', monospace; font-weight: 400; color: var(--gold); font-size: 13px; }
.board1 em { color: var(--muted); font-style: normal; }
.kit { display: flex; flex-wrap: wrap; gap: 4px; }
.kit .tile { position: relative; inset: auto; width: 40px; height: 40px; }
.giftpick { display: flex; gap: 6px; flex-wrap: wrap; }
.gift { display: flex; flex-direction: column; align-items: center; background: #120d1c; border: 2px solid var(--edge); padding: 4px 6px; cursor: pointer; font-size: 11px; color: var(--muted); }
.gift input { display: none; }
.gift:has(input:checked) { border-color: var(--gold); color: var(--gold); }
.herokey { font-family: 'Silkscreen', monospace; font-size: 15px; letter-spacing: 1px; background: #0a0812; border: 2px dashed var(--gold); color: var(--gold); padding: 10px; margin: 8px 0;
  word-break: break-all; user-select: all; }

/* run additions: relic of the day, earnings, crowd */
.relicday { display: flex; align-items: center; gap: 10px; background: #1e1830; border: 2px solid #5d3a9a; padding: 8px; margin-bottom: 8px; font-size: 14px; }
.relicday span { display: block; font-size: 12px; color: var(--muted); }
.sf.relicfloor { outline: 2px solid #c27cff; box-shadow: 0 0 8px rgba(194,124,255,.6); }
.zfloors { flex-wrap: wrap; }
.earned { background: var(--panel); border: 2px solid var(--edge); padding: 8px 10px; margin: 10px 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; text-align: left; }
.found { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.found span { margin-right: 10px; }
.crowd { text-align: left; }
.crowd p { margin: 4px 0 8px; font-size: 15px; }
.waiting { padding-top: 80px; color: var(--muted); }
.waiting img { margin: 0 auto 10px; animation: bob 1s ease-in-out infinite; }
.dmcrowd { position: absolute; left: 1px; transform: translateY(-50%); z-index: 1; }
.depthbar.long i { width: 7px; }
