@import url('./shared/tokens.css?h=62e4a2ce3af5');
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--paper);
  font: 16px/1.2 var(--font);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}

#gl {
  position: fixed; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated;
  display: block; touch-action: none;
}

#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }

#labels .tag {
  position: absolute; left: 0; top: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  will-change: transform;
}
#labels .tag .name {
  display: flex; flex-direction: column; align-items: center;
  padding: 3px 8px 4px;
  background: var(--ink);
  border: 2px solid var(--paper);
  border-radius: 6px;
  font-size: 14px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}
#labels .tag.me .name { border-color: var(--orange); }
#labels .tag .role { font-size: 11px; font-weight: 400; line-height: 1.1; color: #c0c6cb; }
body.studio .tag { visibility: hidden; }
#labels .tag .role.creator { color: #b98aff; }
#labels .tag .role.admin { color: #5ccb3a; }
#labels .tag .dmg {
  position: absolute; left: 50%; top: 0;
  font-size: 20px; font-weight: 700; color: var(--paper);
  text-shadow: 2px 2px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink);
  pointer-events: none; white-space: nowrap;
  animation: dmg 0.65s var(--ease) forwards;
}
#labels .tag .dmg.fin { font-size: 25px; color: var(--orange); }
#labels .tag .dmg.big { font-size: 28px; color: var(--orange); animation-duration: 0.9s; }
@keyframes dmg {
  0% { transform: translate(-50%, 0) scale(0.4); opacity: 1; }
  18% { transform: translate(calc(-50% + var(--dx) * 0.4), -26px) scale(1.35); }
  35% { transform: translate(calc(-50% + var(--dx) * 0.6), -34px) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), -58px) scale(0.9); opacity: 0; }
}
#labels .tag .hp {
  width: 58px; height: 9px; margin-top: -3px;
  background: var(--ink); border: 2px solid var(--ink); border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
#labels .tag .hp i { display: block; height: 100%; width: 100%; background: #5ccb3a; border-radius: 2px; transition: width 0.18s ease-out; }
#labels .tag .hp.mid i { background: var(--orange); }
#labels .tag .hp.low i { background: var(--red); }
#labels .tag .hp.hit { animation: hp-hit 0.3s; }
@keyframes hp-hit { 20% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 80% { transform: translateX(-1px); } }
#labels .tag .bubble {
  position: relative;
  max-width: 220px;
  padding: 7px 10px 8px;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-size: 15px; text-align: center;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45);
  overflow-wrap: anywhere;
  animation: u-pop var(--t-pop) var(--ease);
}
#labels .tag .bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -6px;
  border: 6px solid transparent; border-top-color: var(--ink); border-bottom: 0;
}
#labels .tag .bubble.out { animation: u-out var(--t-close) var(--ease) forwards; }

#table-overlay, #lesson-overlay {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: var(--z-page);
  border: 0; background: #07061a; color-scheme: dark;
  animation: table-in .3s ease-out;
}
#table-overlay[hidden], #lesson-overlay[hidden] { display: none; }
@keyframes table-in { from { opacity: 0; } }
body.seated #pad .zone { display: none; }
body.at-table #pad { display: none !important; }
body.at-table #gl, body.at-table #labels { display: none; }

#hurt { position: fixed; inset: 0; pointer-events: none; z-index: var(--z-fx); opacity: 0; box-shadow: inset 0 0 60px 10px rgb(254 95 85 / 0.7); }
#hurt.on { animation: hurt 0.35s ease-out; }
#hurt.big { animation-duration: 0.8s; box-shadow: inset 0 0 120px 30px rgb(254 95 85 / 0.85); }
@keyframes hurt { from { opacity: 1; } to { opacity: 0; } }

.suggest { display: flex; flex-direction: column; gap: 10px; text-shadow: 0 2px 0 rgb(0 0 0 / .45); }
.suggest .s-meta { display: flex; align-items: baseline; gap: 10px; min-height: 20px; font-size: 14px; }
.suggest .s-msg { flex: 1; color: var(--muted); }
.suggest .s-msg.good { color: var(--green); }
.suggest .s-msg.bad { color: var(--red); }
.suggest .s-count { color: var(--muted); }
.suggest .s-count.over { color: var(--red); }

.talk { text-shadow: 0 2px 0 rgb(0 0 0 / .45); }
.talk .d-title {
  position: absolute; top: -16px; left: 14px; padding: 3px 10px 4px; border-radius: 8px;
  font: 400 15px/1.2 var(--font); color: var(--ink); text-shadow: none;
  background: var(--orange); box-shadow: 0 3px 0 var(--orange-d);
}
.talk .d-text { margin: 6px 0 0; font: 400 20px/1.35 var(--font); color: var(--text); white-space: pre-wrap; }
.talk .d-next { position: absolute; right: 10px; bottom: 2px; display: grid; visibility: hidden; color: var(--orange); }
.talk.done .d-next { visibility: visible; animation: d-blink 1s steps(2) infinite; }
.talk.last .d-next { right: 14px; bottom: 9px; width: 10px; height: 10px; background: var(--orange); }
.talk.last .d-next .u-sym { display: none; }
@keyframes d-blink { 50% { opacity: 0; } }
.u-layer:has(.talk.tone-gold) { border-color: var(--gold); }
.talk.tone-gold .d-text { color: var(--gold); text-align: center; font-size: 24px; margin-top: 14px; }
.talk.tone-gold .d-title { background: var(--gold); box-shadow: 0 3px 0 var(--gold-d); }

body.at-table #bag-btn { display: none; }

body.photo > :not(#gl):not(#photo):not(script) { display: none !important; }
#photo { position: fixed; inset: 0; pointer-events: none; z-index: var(--z-photo); }
#photo button { pointer-events: auto; cursor: pointer; }
#photo .close {
  position: absolute; top: calc(12px + var(--safe-top, 0px)); right: calc(12px + var(--safe-right));
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  border: 2px solid var(--paper); background: rgb(0 0 0 / 0.35); color: var(--paper);
}
#photo .shutter {
  position: absolute; left: 50%; bottom: calc(24px + var(--safe-bottom)); margin-left: -36px;
  width: 72px; height: 72px; border-radius: 50%;
  border: 4px solid var(--paper); background: rgb(255 255 255 / 0.25);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}
#photo .shutter:active { background: rgb(255 255 255 / 0.6); }
#photo.flash::after { content: ''; position: absolute; inset: 0; background: #fff; animation: photo-flash 0.35s ease-out forwards; }
@keyframes photo-flash { from { opacity: 0.8; } to { opacity: 0; } }
body {
  --map-k: 1.4; --map-room: calc(var(--pad-map-r, 14px) + 96px * var(--pad-map-s, 1) * var(--map-k));
  --feed-room: calc(100vw - var(--pad-feed-l, 8px) - max(var(--map-room), var(--pad-icons-r, 12px) + var(--icons-w, 100px) - var(--badge-out)) - var(--rim) - var(--safe-left) - var(--safe-right));
}
body:is([data-o-minimap="off"], :has(#wmap[hidden])) { --map-room: 0px; }
body[data-chat-anchor^="b"] { --feed-room: 320px; }
body[data-o-minimap="s"] { --map-k: 1; }
body[data-o-minimap="l"] { --map-k: 1.9; }
#wmap {
  --map-z: calc(var(--pad-map-s, 1) * var(--map-k));
  opacity: var(--pad-map-o, 1);
  position: fixed; right: calc(var(--pad-map-r, 14px) + var(--safe-right)); top: calc(var(--pad-map-t, 58px) + var(--safe-top)); z-index: var(--z-hud);
  width: calc(96px * var(--map-z)); display: grid; gap: var(--rim);
}
#wmap[hidden], body[data-o-minimap="off"] #wmap { display: none; }
#wmap .m-box {
  position: relative; height: calc(72px * var(--map-z)); cursor: pointer;
  background: var(--map-fog); border: 2px solid var(--edge); border-radius: var(--rim-radius); box-shadow: 0 4px 0 var(--drop);
}
#wmap canvas { display: block; width: 100%; height: 100%; border-radius: 8px; image-rendering: pixelated; }
#wmap .m-n { position: absolute; left: 50%; top: 6px; margin-left: -5px; font: 400 13px/1 var(--font); color: var(--red); text-shadow: 2px 2px 0 #000; pointer-events: none; }
#wmap .m-box:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
#wmap .m-grip {
  position: absolute; left: 0; bottom: 0; width: 18px; height: 18px; border-radius: 5px; cursor: nesw-resize; touch-action: none; display: none;
  background: var(--gold); border: 2px solid var(--ink); box-shadow: 2px 2px 0 #000; opacity: 0; transition: opacity .15s;
}
#wmap .m-tools { position: absolute; left: var(--rim); top: var(--rim); display: grid; gap: 4px; opacity: 0; visibility: hidden; transition: opacity var(--t-close) var(--ease) .4s, visibility 0s calc(.4s + var(--t-close)); }
#wmap .m-tools button {
  display: grid; place-items: center; width: 30px; height: 26px; padding: 0; border: 0; border-radius: 7px; cursor: pointer;
  background: var(--panel-2); color: #fff; box-shadow: 0 3px 0 var(--drop);
}
@media (hover: hover) and (pointer: fine) {
  #wmap .m-grip { display: block; }
  #wmap:hover .m-grip, #wmap.sizing .m-grip { opacity: 1; }
  #wmap:hover .m-tools, #wmap:focus-within .m-tools { opacity: 1; visibility: visible; transition: opacity var(--t-open) var(--ease), visibility 0s; }
}
#wmap .m-line { display: flex; gap: 6px; align-items: center; justify-content: flex-end; min-width: 0; font: 400 14px/1 var(--font); }
#wmap .m-here {
  display: none; flex: none; white-space: nowrap;
  padding: 3px 8px 4px; border-radius: 7px; background: var(--hud); color: #fff; text-shadow: 2px 2px 0 #000; pointer-events: none;
}
#wmap .m-ppl {
  flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 2px 6px; cursor: pointer;
  background: var(--panel); color: #fff; border: 2px solid var(--edge); border-radius: 7px; box-shadow: 0 3px 0 var(--drop); font: inherit;
}
#wmap .m-ppl i { width: 8px; height: 8px; border-radius: 2px; background: var(--green); box-shadow: 0 2px 0 var(--green-d); }
.p-party {
  position: fixed; right: calc(var(--pad-party-r, 14px) + var(--safe-right)); bottom: calc(var(--pad-party-b, 72px) + var(--safe-bottom)); z-index: var(--z-hud);
  width: var(--pad-party-w, 240px); max-height: min(40vh, var(--pad-party-h, 260px)); padding: 8px; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 4px;
  transform: scale(var(--pad-party-s, 1)); transform-origin: bottom right;
}
body[data-party-at="tr"] .p-party { bottom: auto; top: calc(var(--pad-party-t) + var(--safe-top)); transform-origin: top right; }
.p-fold { color: var(--muted); }
.p-party:is(.fold, [data-fold]:not([data-open])) .p-fold { rotate: -90deg; }
.p-party:is(.fold, [data-fold]:not([data-open])) { gap: 0; }
.p-party:is(.fold, [data-fold]:not([data-open])) .p-prows { display: none; }
.p-party.small { padding: 2px 5px 4px; gap: 2px; }
.p-party.small .p-cap { display: none; }
.p-party.small header { min-height: 30px; font-size: 13px; }
.p-party.small .p-prows { gap: 0; }
.p-party.small .p-prow { grid-template-columns: minmax(0, 1fr) auto 10px; gap: 5px; padding: 2px 3px; font-size: 13px; line-height: 1.1; border-radius: 5px; }
.p-party.small .p-prow small { font-size: 13px; }
.p-party.small .p-prow .dir .u-sym { width: calc(var(--icon-s) * .75); height: calc(var(--icon-s) * .75); }
.p-party.small .p-grp { margin: 4px 2px 0; }
.p-party[hidden], body[data-o-party="off"] .p-party, body.at-table .p-party { display: none; }
.p-party.big { max-height: min(70vh, 520px); }
.p-party header { display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 2px; font: 400 15px/1.2 var(--font); cursor: pointer; }
.p-party header b { flex: 1; color: var(--muted); }
.p-cap { font: 400 13px/1 var(--font); font-style: normal; padding: 3px 6px 4px; border-radius: 6px; background: var(--panel-2); box-shadow: 0 2px 0 var(--drop); color: #fff; }
.p-prows { overflow: hidden auto; display: grid; gap: 2px; align-content: start; overscroll-behavior: contain; }
.p-prow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; gap: 8px; align-items: center; width: 100%; padding: 4px 6px; margin: 0;
  border: 0; border-radius: 7px; background: none; color: #fff; text-align: left; cursor: pointer; font: 400 15px/1.2 var(--font);
}
.p-prow:hover { background: var(--panel-2); }
.p-prow.on { background: rgb(245 177 67 / .16); box-shadow: inset 0 0 0 2px var(--gold); }
.p-prow.off { cursor: default; color: var(--muted); }
.p-prow.off:hover { background: none; }
.p-prow .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-prow small { font: 400 14px/1 var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.p-prow .dir { display: grid; justify-self: center; color: #fff; }
.p-prow .dir .u-sym { translate: 0 18%; rotate: -45deg; }
.p-prow .dir[hidden] { display: none; }
.p-grp { display: block; margin: 6px 4px 0; font: 400 13px/1.2 var(--font); color: var(--muted); }
.w-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.w-canvas:active { cursor: grabbing; }
.w-layers { position: absolute; left: 12px; top: 12px; display: grid; gap: 6px; justify-items: start; }
.w-lay {
  display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 2px 8px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--panel); color: var(--muted); font: 400 14px/1 var(--font); box-shadow: inset 0 0 0 2px var(--edge), 0 3px 0 var(--drop);
}
.w-lay i { width: 10px; height: 10px; border-radius: 3px; background: #fff; opacity: .3; }
.w-lay.places i { background: var(--edge); }
.w-lay.portals i { background: var(--orange); }
.w-lay.pins i { background: var(--gold); }
.w-lay[aria-pressed=true] { color: #fff; }
.w-lay[aria-pressed=true] i { opacity: 1; }
.w-tools { position: absolute; top: 12px; right: 12px; display: grid; gap: 8px; }
.w-tools .u-btn { min-width: 44px; height: 44px; }
.w-scale { position: absolute; left: 12px; bottom: 12px; display: grid; gap: 2px; font-size: 13px; color: #fff; text-shadow: 2px 2px 0 #000; pointer-events: none; }
.w-scale i { width: var(--w, 60px); height: 6px; border: 2px solid #fff; border-top: 0; box-shadow: 2px 2px 0 #000; }
.w-explored { position: absolute; right: 12px; bottom: 12px; font-size: 13px; color: #fff; text-shadow: 2px 2px 0 #000; pointer-events: none; }
.w-explored:empty { display: none; }
.w-pick { position: absolute; z-index: 3; display: flex; gap: 4px; padding: 6px; translate: -50% calc(-100% - 12px); }
.w-pick[hidden] { display: none; }
.w-pick button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; cursor: pointer; background: var(--panel-2); color: #fff; box-shadow: 0 3px 0 var(--drop); }
.w-pick button:hover { background: var(--tile); }
.w-row { width: 100%; border: 0; font: inherit; color: var(--text); text-align: left; margin: 0 0 6px; }
button.w-row { cursor: pointer; }
.w-row b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-row small { font-variant-numeric: tabular-nums; }
.w-glyph { flex: none; display: grid; place-items: center; width: 28px; color: #fff; }
.w-glyph.portal { color: var(--orange); }
.p-find {
  position: fixed; right: calc(var(--pad-find-r) + var(--safe-right)); top: calc(var(--pad-find-t) + var(--safe-top)); z-index: var(--z-hud);
  width: var(--pad-find-w, 180px); padding: 8px 8px 8px 10px; border-color: var(--gold); transform: scale(var(--pad-find-s, 1)); transform-origin: top right;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: baseline;
}
.p-find .n { font: 400 17px/1.1 var(--font); color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 2px 2px 0 #000; }
.p-find .d { font: 400 18px/1 var(--font); font-variant-numeric: tabular-nums; text-shadow: 2px 2px 0 #000; }
.p-find .w { grid-column: 1 / 3; font: 400 13px/1.2 var(--font); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-find .a { grid-column: 1 / 3; display: flex; gap: 6px; margin-top: 6px; }
.p-find .a .u-btn:first-child { flex: 1; }
.p-find .a .u-btn[hidden] { display: none; }
.p-find[data-fold] { cursor: pointer; }
.p-find[data-fold]:not([data-open]) :is(.w, .a) { display: none; }
.p-arrow {
  position: fixed; left: 0; top: 0; z-index: var(--z-hud); display: grid; margin: -19px 0 0 -16px; pointer-events: none;
  color: var(--gold); filter: drop-shadow(0 3px 0 var(--ink));
}
.p-arrow .u-sym { translate: 0 18%; rotate: -45deg; }
.p-arrow[hidden] { display: none; }
.p-list { display: grid; }
.p-list .u-h:first-child { margin-top: 4px; }
.p-row > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-me { margin-top: 14px; }
