/* ABADONIA · the game HUD */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { user-select: none; -webkit-user-select: none; }
#realm { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; cursor: grab; background: radial-gradient(80% 60% at 50% 70%, #3a0b08, #0b0710 60%, #050407); }
#realm:active { cursor: grabbing; }
.vign { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(130% 100% at 50% 45%, transparent 55%, rgba(4, 3, 6, .7)); }
.glass { background: linear-gradient(180deg, rgba(22, 16, 30, .78), rgba(11, 8, 15, .84)); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); box-shadow: 0 0 0 1px var(--line) inset, 0 24px 70px -24px rgba(0, 0, 0, .85); border-radius: 18px; }
input, textarea { user-select: text; -webkit-user-select: text; }

#gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--void); transition: opacity .9s .1s, visibility 0s 1s; }
#gate.off { opacity: 0; visibility: hidden; }
#gate .in { display: grid; justify-items: center; gap: 18px; }
#gate canvas, #gate img { width: 120px; height: 120px; animation: gp 2s ease-in-out infinite; }
#gate span { font-family: var(--serif); letter-spacing: .5em; font-size: .7rem; color: var(--gold); text-transform: uppercase; padding-left: .5em; }
#gate .bar { width: 160px; height: 1px; background: rgba(231, 184, 102, .15); overflow: hidden; }
#gate .bar i { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, transparent, var(--ember), transparent); animation: gs 1.2s ease-in-out infinite; }
@keyframes gs { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes gp { 50% { filter: drop-shadow(0 0 18px rgba(255, 77, 46, .7)); transform: scale(1.04); } }

/* top bar */
.top { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 16px; padding: 14px 18px; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-weight: 900; letter-spacing: .24em; font-size: .92rem; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(10, 7, 14, .55); backdrop-filter: blur(10px); box-shadow: 0 0 0 1px var(--line) inset; }
.brand canvas, .brand img { width: 34px; height: 34px; }
.chips { display: flex; gap: 8px; margin: 0 auto; }
.chip { display: flex; align-items: center; gap: 9px; padding: 6px 14px; border-radius: 999px; background: rgba(10, 7, 14, .6); backdrop-filter: blur(10px); box-shadow: 0 0 0 1px var(--line) inset; }
.chip img { width: 26px; height: 26px; }
.chip small { display: block; font-family: var(--serif); font-size: .56rem; letter-spacing: .2em; color: var(--mute); text-transform: uppercase; }
.chip b { display: block; font-size: .86rem; font-weight: 600; white-space: nowrap; }
.chip.pv b { color: var(--veil); }
#walletBtn { min-width: 132px; }
#walletBtn .wc { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .3); font-size: .66rem; letter-spacing: 0; }

.notice { position: fixed; z-index: 19; top: 70px; left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100% - 32px)); padding: 9px 16px; border-radius: 12px; font-size: .84rem; text-align: center; color: var(--gold2); background: rgba(40, 24, 10, .8); box-shadow: 0 0 0 1px rgba(231, 184, 102, .35) inset; backdrop-filter: blur(8px); }

/* oath (player) */
.oath { position: fixed; z-index: 10; top: 76px; left: 18px; width: 300px; padding: 18px; }
.oath h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.05rem; letter-spacing: .04em; }
.oath p { margin: 0 0 14px; color: var(--dim); font-size: .88rem; line-height: 1.5; }
.oath ul { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.oath li { display: flex; gap: 10px; font-size: .86rem; color: var(--dim); }
.oath li i { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; font-style: normal; font-size: .64rem; color: var(--ember2); background: rgba(255, 77, 46, .12); font-family: var(--serif); }
.who { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.who img { width: 54px; height: 54px; }
.who b { display: block; font-family: var(--serif); font-size: 1rem; letter-spacing: .03em; }
.who span { font-size: .8rem; color: var(--mute); }
.circ { padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .25); box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset; }
.circ .row { display: flex; align-items: baseline; gap: 10px; }
.circ .rn { font-family: var(--serif); font-weight: 900; font-size: 1.6rem; color: var(--ember2); text-shadow: 0 0 16px rgba(255, 90, 40, .6); min-width: 34px; }
.circ .cn { font-family: var(--serif); font-size: .92rem; }
.circ .cn small { display: block; font-family: var(--sans); color: var(--mute); font-size: .74rem; letter-spacing: .02em; }
.pbar { height: 6px; margin-top: 10px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff9a5c, #ff4d2e); box-shadow: 0 0 12px rgba(255, 77, 46, .8); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.circ .nx { margin-top: 7px; font-size: .74rem; color: var(--mute); }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.kv div { padding: 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.kv small { display: block; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); font-family: var(--serif); }
.kv b { display: block; margin-top: 3px; font-size: 1rem; }
.oath .acts { display: flex; gap: 8px; margin-top: 14px; }
.oath .acts .btn { flex: 1; }
.lnk { background: none; border: 0; padding: 0; cursor: pointer; color: var(--mute); font-size: .74rem; text-decoration: underline; text-underline-offset: 3px; }
.lnk:hover { color: var(--dim); }

/* inspector */
.insp { position: fixed; z-index: 11; top: 76px; right: 18px; width: 340px; max-height: calc(100vh - 170px); overflow: auto; padding: 18px; animation: pin .35s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes pin { from { opacity: 0; transform: translateX(20px); } }
.insp .x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; cursor: pointer; background: rgba(255, 255, 255, .05); color: var(--dim); font-size: 16px; }
.insp .reg { font-family: var(--serif); font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.insp h3 { margin: 4px 0 2px; font-family: var(--serif); font-size: 1.4rem; letter-spacing: .03em; }
.insp .meta { color: var(--mute); font-size: .78rem; }
.own { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, .25); box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset; }
.own img { width: 44px; height: 44px; }
.own b { display: block; font-family: var(--serif); font-size: .96rem; }
.own span { font-size: .8rem; color: var(--dim); }
.own .lv { margin-left: auto; text-align: right; font-size: .7rem; color: var(--mute); }
.own .lv b { font-size: .84rem; color: var(--gold2); }
.you { color: var(--ok); font-weight: 600; }
.fire { display: grid; gap: 9px; margin: 8px 0 4px; }
.fire .fr { display: grid; grid-template-columns: 62px 1fr 52px; align-items: center; gap: 10px; font-size: .78rem; }
.fire .fr span:last-child { text-align: right; color: var(--dim); }
.fire .tr { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.fire .tr i { display: block; height: 100%; border-radius: 99px; background: var(--c); box-shadow: 0 0 10px var(--c); }
.sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .06); }
.sec h5 { margin: 0 0 10px; font-family: var(--serif); font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--mute); font-weight: 500; }
.hint { font-size: .8rem; color: var(--dim); line-height: 1.5; margin: 8px 0 0; }
.hint.warn { color: var(--gold2); }
.amt { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px; background: rgba(0, 0, 0, .35); box-shadow: 0 0 0 1px var(--line2) inset; }
.amt input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: 600 1.1rem var(--sans); }
.amt span { font-size: .72rem; color: var(--mute); letter-spacing: .08em; }
.pre { display: flex; gap: 6px; margin: 8px 0 12px; flex-wrap: wrap; }
.pre button { flex: 1; padding: 7px 0; border: 0; border-radius: 8px; cursor: pointer; background: rgba(255, 255, 255, .05); color: var(--dim); font-size: .76rem; font-weight: 600; }
.pre button:hover { background: rgba(255, 77, 46, .15); color: var(--ink); }
.pre button.need { color: var(--ember2); box-shadow: 0 0 0 1px rgba(255, 120, 80, .4) inset; }

/* feed + ranks */
.feed { position: fixed; z-index: 9; left: 18px; bottom: 18px; width: 300px; padding: 14px 14px 8px; }
.ph { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ph b { font-family: var(--serif); font-size: .7rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; }
.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: gp 2s infinite; }
.feed ol, .ranks ol { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 4px; font-size: .8rem; line-height: 1.4; color: var(--dim); border-top: 1px solid rgba(255, 255, 255, .04); cursor: pointer; border-radius: 6px; }
.feed li:hover { background: rgba(255, 255, 255, .03); }
.feed li.new { animation: fnew 1.2s; }
@keyframes fnew { from { background: rgba(255, 120, 60, .18); } }
.feed li i { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.feed li b { color: var(--ink); font-weight: 600; }
.feed li em { font-style: normal; color: var(--ember2); font-weight: 600; }
.feed li time { margin-left: auto; flex: none; color: var(--mute); font-size: .7rem; }
.ranks { position: fixed; z-index: 9; right: 18px; bottom: 18px; width: 290px; padding: 12px 12px 8px; }
.tabs { display: flex; gap: 4px; padding: 3px; margin-bottom: 8px; border-radius: 10px; background: rgba(0, 0, 0, .3); }
.tabs button { flex: 1; padding: 7px 0; border: 0; border-radius: 8px; cursor: pointer; background: none; color: var(--mute); font-family: var(--serif); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; }
.tabs button.on { background: rgba(255, 255, 255, .07); color: var(--gold2); }
.ranks li { display: grid; grid-template-columns: 22px 22px 1fr auto; align-items: center; gap: 8px; padding: 6px 4px; font-size: .8rem; border-top: 1px solid rgba(255, 255, 255, .04); }
.ranks li .n { color: var(--mute); font-size: .72rem; text-align: center; }
.ranks li img { width: 22px; height: 22px; }
.ranks li .c { font-family: var(--serif); color: var(--ember2); font-size: .72rem; margin-left: 6px; }
.ranks li b { font-weight: 600; text-align: right; }
.ranks li.me { background: rgba(79, 209, 139, .08); border-radius: 8px; }
.ranks .hr { grid-template-columns: 30px 1fr auto; }
.ranks .hr img { width: 30px; height: 30px; }
.ranks .hr small { display: block; color: var(--mute); font-size: .7rem; }

/* controls + tooltip */
.ctrl { position: fixed; z-index: 9; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 2px; padding: 5px; border-radius: 14px; }
.ctrl button { width: 40px; height: 38px; border: 0; border-radius: 10px; cursor: pointer; background: none; color: var(--dim); font-size: 1.05rem; }
.ctrl button:hover { background: rgba(255, 255, 255, .07); color: var(--ink); }
.only-s { display: none; }
@media (min-width: 821px) { body.insp-open .ranks { opacity: 0; pointer-events: none; transform: translateY(10px); } .ranks { transition: .3s; } }
.tip { position: fixed; z-index: 30; pointer-events: none; padding: 9px 12px; border-radius: 10px; font-size: .78rem; line-height: 1.35; background: rgba(12, 9, 16, .92); box-shadow: 0 0 0 1px var(--line2) inset, 0 10px 30px rgba(0, 0, 0, .6); white-space: nowrap; transform: translate(14px, 14px); }
.tip b { display: block; font-family: var(--serif); font-size: .9rem; letter-spacing: .03em; }
.tip span { color: var(--dim); }
.help { position: fixed; z-index: 8; left: 50%; bottom: 66px; transform: translateX(-50%); font-size: .72rem; color: var(--mute); white-space: nowrap; transition: opacity 1s; pointer-events: none; }
.help.off { opacity: 0; }

/* house picker */
.hp { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 16px; }
.hpc { --c: #fff; position: relative; padding: 18px 12px 16px; border: 0; border-radius: 14px; cursor: pointer; text-align: center; background: rgba(255, 255, 255, .03); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset; transition: .25s; }
.hpc:hover { background: color-mix(in srgb, var(--c) 8%, transparent); }
.hpc.on { background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: 0 0 0 1.5px var(--c) inset, 0 20px 50px -20px var(--c); transform: translateY(-3px); }
.hpc img { width: 84px; height: 84px; }
.hpc b { display: block; margin-top: 8px; font-family: var(--serif); font-size: .92rem; }
.hpc i { display: block; margin-top: 4px; font-size: .78rem; color: var(--c); }
.hpc p { margin: 8px 0 0; font-size: .76rem; color: var(--dim); line-height: 1.45; }
.hpc small { display: block; margin-top: 10px; font-size: .7rem; color: var(--mute); }
@media (max-width: 720px) { .hp { grid-template-columns: 1fr 1fr; } .hpc p { display: none; } }

/* small screens */
@media (max-width: 980px) { .hide-s { display: none; } }
@media (max-width: 820px) {
  .top { padding: 10px; gap: 8px; }
  .brand span { display: none; } .brand { padding: 5px; }
  .chips { gap: 6px; } .chip { padding: 5px 10px; } .chip img { width: 22px; height: 22px; }
  #landsChip { font-size: .8rem; }
  #walletBtn { min-width: 0; padding: .6em .9em; }
  .oath { top: auto; bottom: 74px; left: 10px; right: 10px; width: auto; padding: 14px; }
  .oath.compact .full { display: none; }
  .oath.min { display: none; }
  .insp { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 62vh; border-radius: 20px 20px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 25; animation: pup .35s cubic-bezier(.2, .9, .3, 1.1); }
  @keyframes pup { from { transform: translateY(40px); opacity: 0; } }
  .feed, .ranks { display: none; }
  body.panel .feed, body.panel .ranks { display: block; left: 10px; right: 10px; width: auto; z-index: 24; }
  body.panel .feed { bottom: auto; top: 64px; max-height: 38vh; overflow: auto; }
  body.panel .ranks { bottom: 74px; max-height: 36vh; overflow: auto; }
  body.panel .oath { display: none; }
  .only-s { display: block; }
  .ctrl { bottom: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .help { display: none; }
  .notice { top: 60px; }
}
@media (max-width: 420px) { .chip:nth-child(2) small { display: none; } }
@media (max-width: 820px) {
  .chip.pv { display: none; }
  .chips { min-width: 0; margin: 0 auto 0 0; }
  .chip small { font-size: .5rem; }
  #walletBtn { font-size: .62rem; letter-spacing: .06em; }
  .ab-toasts { bottom: auto; top: 62px; }
}

.iart { position: relative; height: 150px; margin: -6px -6px 10px; display: grid; place-items: end center; border-radius: 14px; overflow: hidden; background: radial-gradient(70% 70% at 50% 85%, color-mix(in srgb, var(--c) 30%, transparent), transparent 72%); }
.iart img { max-height: 140px; max-width: 92%; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .8)); animation: iup .5s cubic-bezier(.2, .9, .3, 1.1); }
.iart.free img { max-height: 120px; margin-bottom: 8px; }
@keyframes iup { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@media (max-width: 820px) { .iart { height: 96px; } .iart img { max-height: 90px; } }

.icon-btn { width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer; background: rgba(10, 7, 14, .6); box-shadow: 0 0 0 1px var(--line) inset; font-size: 15px; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); }
.tg { white-space: nowrap; }
@media (max-width: 820px) { .tg { padding: .6em .8em; font-size: .6rem; } }
@media (max-width: 480px) { .tg { display: none; } }
.debt { margin-top: 12px; padding: 12px; border-radius: 12px; background: rgba(255, 60, 40, .12); box-shadow: 0 0 0 1px rgba(255, 90, 60, .45) inset; display: grid; gap: 6px; }
.debt b { font-family: var(--serif); color: #ff8a6a; letter-spacing: .06em; }
.debt span { font-size: .8rem; color: var(--dim); }
.sharebar { position: fixed; z-index: 60; left: 50%; top: 74px; transform: translate(-50%, -20px); opacity: 0; transition: .35s cubic-bezier(.2, .9, .3, 1.2); display: flex; gap: 14px; align-items: center; padding: 10px 10px 10px 18px; border: 0; border-radius: 999px; cursor: pointer; color: var(--ink); background: rgba(16, 12, 22, .94); box-shadow: 0 0 0 1px var(--line2) inset, 0 20px 50px rgba(0, 0, 0, .6); font: 500 .86rem var(--sans); }
.sharebar.on { opacity: 1; transform: translate(-50%, 0); }
.sharebar b { padding: 7px 14px; border-radius: 999px; background: #fff; color: #000; font-weight: 700; }
