/* v2 ledgers (island, statistics): a framed dó-paper book with bookmark tabs down the left; the watch-list picker; the
   route editor; the lobby. */
.ledger {
  position: absolute;
  top: calc(var(--tb-h) + 12px);
  left: var(--stage-l, 86px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: var(--lg-w, 860px);
  max-height: var(--stage-h, 70%);
  overflow: hidden;
  container: ledger / inline-size;
}
.lg__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 10px 14px;
  border-bottom: 1px solid var(--paper-400);
}
.lg__seal {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red-btn);
  color: var(--vang-200);
  box-shadow: inset 0 0 0 1.5px var(--vang-500), 0 2px 4px rgba(9, 8, 6, 0.3);
}
.lg__t {
  flex: 1;
  min-width: 0;
}
.lg__t h2 {
  margin: 0;
  color: var(--title);
  font: 700 21px/1.15 var(--font-head);
}
.lg__sub {
  color: var(--text-muted);
  font-size: 12.5px;
}
.lg__switch .btn {
  min-height: max(32px, var(--tap));
  padding: 0 10px;
}
.lg__main {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
.lg__tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0 12px 10px;
  border-right: 1px solid var(--paper-400);
  background: rgba(213, 183, 143, 0.28);
}
.lg__tab {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: max(40px, var(--tap));
  padding: 0 10px;
  border-radius: 9px 0 0 9px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
}
.lg__tab.is-on {
  margin-right: -1px;
  background: var(--red);
  color: var(--vang-200);
  box-shadow: inset 0 0 0 1px var(--vang-500);
}
.lg__body {
  min-height: 0;
  overflow: auto;
  padding: 6px 16px 16px;
  scrollbar-width: thin;
}
@container ledger (max-width: 620px) {
  .lg__main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .lg__tabs {
    flex-direction: row;
    padding: 6px 10px 0;
    overflow-x: auto;
    scrollbar-width: none;
    border-right: 0;
    border-bottom: 1px solid var(--paper-400);
  }
  .lg__tab {
    flex: none;
    border-radius: 9px 9px 0 0;
  }
  .lg__tab.is-on {
    margin: 0 0 -1px;
  }
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 8px 0 2px;
  color: var(--text-2);
  font-size: 12.5px;
}
.chips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.jars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 8px;
}
.jar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 6px 8px;
  border: 1px solid var(--paper-300);
  border-radius: 9px;
  background: rgba(246, 232, 197, 0.85);
}
.jar__t {
  flex: 1;
  display: grid;
  gap: 1px;
  min-width: 0;
  font-size: 12.5px;
}
.jar__t > .num:first-of-type {
  font-size: 14px;
}
.jar__t small {
  color: var(--text-muted);
  font-size: 11px;
}
.jar.is-low {
  border-color: var(--bad);
  box-shadow: inset 0 0 0 1px rgba(163, 31, 18, 0.3);
}
.jar .pin {
  align-self: flex-start;
}
.tierblk {
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--paper-300);
}
.tierblk__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}
.tierblk__head b {
  color: var(--tone);
  font: 700 17px var(--font-head);
}
.tierblk__head span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.guild {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.guild__seal {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  color: var(--vang-300);
  box-shadow: inset 0 0 0 2px var(--vang-500);
}
.guild b {
  display: block;
  color: var(--title);
  font: 700 18px var(--font-head);
}
.guild small {
  color: var(--text-muted);
  font-size: 12px;
}
.order {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(121, 87, 123, 0.12);
  box-shadow: inset 0 0 0 1px rgba(121, 87, 123, 0.4);
  font-size: 12.5px;
}
.order > div {
  flex: 1;
  min-width: 160px;
  display: grid;
}
.order b {
  color: var(--lux);
}
.prices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px;
}
.price {
  display: grid;
  grid-template-columns: 30px 1fr auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 8px;
  padding: 5px 8px;
  border: 1px solid var(--paper-300);
  border-radius: 8px;
  background: rgba(246, 232, 197, 0.8);
  font-size: 12.5px;
}
.price img {
  grid-row: 1 / 3;
}
.price small {
  grid-column: 2;
  color: var(--text-muted);
  font-size: 11px;
}
.price__s,
.price__b {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.price__s {
  color: var(--good);
}
.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 4px 22px;
}
.offer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: max(40px, var(--tap));
  border-bottom: 1px solid var(--paper-300);
  font-size: 12.5px;
}
.offer__k {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 46px;
  font-weight: 700;
}
.offer__k.sell {
  color: var(--good);
}
.offer__k.buy {
  color: var(--info);
}
.offer__n {
  flex: 1;
  min-width: 0;
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: max(34px, var(--tap));
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
}
.switch__t {
  position: relative;
  flex: none;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: var(--paper-300);
  box-shadow: inset 0 0 0 1px var(--paper-400);
}
.switch__t::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--paper-50);
  box-shadow: 0 1px 2px rgba(36, 27, 18, 0.35);
}
.switch.is-on .switch__t {
  background: var(--son-400);
}
.switch.is-on .switch__t::after {
  left: 17px;
}
.sgoods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.sgood {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 8px;
  padding: 6px 10px;
  border: 1px solid var(--paper-300);
  border-radius: 9px;
  background: rgba(246, 232, 197, 0.8);
}
.sgood img {
  grid-row: 1 / 3;
}
.sgood__t {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 13px;
}
.sgood__f {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-2);
}
.sgood__f span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.sgood__f b {
  margin-left: auto;
}
.sgood.is-low {
  border-color: var(--bad);
}
.spark path {
  fill: none;
  stroke: var(--song-500);
  stroke-width: 1.5;
}
.spark .area {
  fill: rgba(70, 121, 138, 0.14);
  stroke: none;
}
.spark--wide {
  width: 100%;
  height: 60px;
}
.blist {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}
.bl {
  display: grid;
  grid-template-columns: 40px minmax(110px, 1.2fr) minmax(90px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 2px 4px;
  border-bottom: 1px solid var(--paper-300);
  font-size: 12.5px;
}
.bl__img {
  width: 40px;
  height: 36px;
  object-fit: contain;
}
.bl__img--good {
  width: 30px;
  height: 30px;
}
.bl__t {
  display: grid;
  min-width: 0;
}
.bl__t small {
  color: var(--text-muted);
}
.bl__p {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bl__p .bar {
  flex: 1;
}
.bl__idle {
  display: flex;
  gap: 8px;
}
.idle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--warn);
  font-weight: 700;
}
.fin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 52px;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-size: 12.5px;
}
.fin .bar {
  height: 8px;
}
.fin b {
  text-align: right;
}
.total {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(70, 125, 34, 0.12);
  font-weight: 700;
}
.total span {
  flex: 1;
}
.total b {
  font-size: 19px;
}
.tcards {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.tcard {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(150px, 0.8fr);
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--paper-300);
  border-left: 4px solid var(--tone);
  border-radius: 9px;
  background: rgba(246, 232, 197, 0.8);
}
.tcard__t {
  display: grid;
  gap: 2px;
}
.tcard__t b {
  color: var(--tone);
  font: 700 17px var(--font-head);
}
.tcard__t small {
  color: var(--text-2);
  font-size: 12px;
}
.tcard__def {
  font-style: italic;
}
.tcard__w {
  display: grid;
  gap: 2px;
  font-size: 12.5px;
}
.tcard__w small {
  color: var(--text-muted);
  font-size: 11px;
}
.tcard.is-locked {
  opacity: 0.75;
}
@container ledger (max-width: 520px) {
  .tcard {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .tcard__w {
    grid-column: 1 / -1;
  }
  .bl {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }
  .bl__p {
    display: none;
  }
}
.infot {
  display: inline-block;
  vertical-align: -2px;
}
.infot__b {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--info);
}

/* ---------------------------------------------------------------- route editor */
.rstops {
  display: grid;
  gap: 10px;
  margin: 8px 0 10px;
  padding: 0;
  list-style: none;
}
.rstop {
  padding: 10px;
  border: 1px solid var(--paper-400);
  border-radius: 10px;
  background: rgba(246, 232, 197, 0.85);
}
.rstop__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.rstop__head b {
  flex: 1;
}
.rstop__head small {
  color: var(--text-muted);
}
.rstop__head .orb {
  --orb: max(28px, var(--tap));
}
.ract {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  min-height: max(40px, var(--tap));
  border-top: 1px dashed var(--paper-400);
  font-size: 12.5px;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--paper-400);
  border-radius: 7px;
  overflow: hidden;
}
.seg button {
  min-height: max(28px, var(--tap));
  min-width: max(30px, var(--tap));
  padding: 0 8px;
  border: 0;
  background: var(--paper-50);
  font-size: 12px;
  font-weight: 600;
}
.seg button + button {
  border-left: 1px solid var(--paper-400);
}
.seg button.is-on {
  background: var(--son-400);
  color: var(--paper-50);
}
.ract__g {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.ract__n input {
  width: 52px;
  min-height: max(28px, var(--tap));
  border: 1px solid var(--paper-400);
  border-radius: 6px;
  background: var(--paper-50);
  font: 600 13px var(--font-num);
  text-align: center;
}
.muted {
  color: var(--text-muted);
}

/* ---------------------------------------------------------------- watch-list picker */
.mbox--watch {
  width: min(720px, 100%);
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: max(40px, var(--tap));
  margin: 6px 0 8px;
  padding: 0 12px;
  border: 1px solid var(--paper-400);
  border-radius: 9px;
  background: var(--paper-50);
  color: var(--text-2);
}
.search input {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 14px;
}
.wsum {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 12.5px;
  color: var(--text-2);
}
.wacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.wgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px;
}
.wcell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: max(48px, var(--tap));
  padding: 4px 8px;
  border: 1px solid var(--paper-400);
  border-radius: 9px;
  background: var(--paper-50);
  text-align: left;
}
.wcell__t {
  flex: 1;
  display: grid;
  min-width: 0;
  font-size: 12px;
  line-height: 1.2;
}
.wcell__t b {
  font-size: 13px;
}
.wcell__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px dashed var(--muc-500);
  color: var(--muc-500);
  font-size: 12px;
}
.wcell.is-on {
  border-color: var(--son-400);
  background: linear-gradient(180deg, #fff6e0, var(--paper-100));
  box-shadow: inset 0 0 0 1px var(--son-400);
}
.wcell.is-on .wcell__mark {
  border: 0;
  background: var(--red);
  color: var(--vang-200);
}
.wcell.is-low {
  box-shadow: inset 3px 0 0 var(--bad);
}
.wcell.is-on.is-low {
  box-shadow: inset 0 0 0 1px var(--son-400), inset 3px 0 0 var(--bad);
}

/* ---------------------------------------------------------------- lobby: plaque, three paper buttons, my worlds */
.lobby {
  position: absolute;
  inset: 0;
  overflow: auto;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 18px 16px 12px;
}
.lobby__col {
  display: grid;
  gap: 12px;
  align-content: center;
  justify-items: stretch;
  width: min(460px, 100%);
  margin: 0 auto;
}
.plaque {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 16px 24px 14px;
  border: 1px solid var(--then-900);
  border-radius: 12px;
  background: var(--red);
  color: var(--vang-300);
  overflow: hidden;
  text-align: center;
  box-shadow: inset 0 0 0 4px var(--son-600), inset 0 0 0 5px var(--vang-400), inset 0 0 0 8px var(--son-600), inset 0 0 0 9px rgba(239, 200, 112, 0.5), var(--shadow);
}
.plaque__drum {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 320px;
  height: 320px;
  transform: translate(-50%, -50%);
  opacity: 0.12;
}
.plaque__drum svg {
  width: 100%;
  height: 100%;
}
.plaque__cloud {
  position: absolute;
  bottom: 10px;
  width: 60px;
  color: var(--vang-400);
}
.plaque__cloud--l {
  left: 16px;
}
.plaque__cloud--r {
  right: 16px;
  transform: scaleX(-1);
}
.plaque h1 {
  position: relative;
  margin: 0;
  font: 400 clamp(46px, 9vw, 70px) / 1.1 var(--font-display);
  text-shadow: 0 2px 0 var(--son-700), 0 0 18px rgba(237, 184, 82, 0.25);
}
.plaque__year {
  position: relative;
  margin-top: -4px;
  color: var(--vang-200);
  font: 700 28px var(--font-title);
  letter-spacing: 0.3em;
  padding-left: 0.3em;
}
.lbtns {
  display: grid;
  gap: 8px;
}
.lbtn {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 8px 16px 8px 10px;
  border: 1px solid var(--son-frame);
  border-radius: 10px;
  background: var(--paper-100) var(--paper-tex);
  box-shadow: inset 0 0 0 1px var(--vang-400), inset 0 0 0 3px rgba(188, 148, 90, 0.25), 0 3px 8px rgba(9, 8, 6, 0.3);
}
.lbtn__medal {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red-btn);
  color: var(--vang-200);
  box-shadow: inset 0 0 0 1.5px var(--vang-500);
}
.lbtn__t {
  display: grid;
  min-width: 0;
}
.lbtn__t b {
  color: var(--muc-900);
  font: 700 19px var(--font-title);
}
.lbtn__t small {
  color: var(--text-muted);
  font-size: 12.5px;
}
.worlds {
  padding: 8px 12px 12px;
  border-width: 3px;
}
.worlds__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 4px;
  color: var(--title);
  font: 700 13px var(--font-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.worlds__title::before,
.worlds__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--muc-500));
}
.worlds__title::after {
  background: linear-gradient(90deg, var(--muc-500), transparent);
}
.wrow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 4px 2px;
  border-bottom: 1px solid var(--paper-300);
}
.wrow__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red-btn);
  color: var(--vang-200);
}
.wrow__t {
  flex: 1;
  display: grid;
  min-width: 0;
  line-height: 1.2;
}
.wrow__t b {
  font-size: 14px;
}
.wrow__t small {
  color: var(--text-muted);
  font-size: 11.5px;
}
.wrow__lock {
  display: inline-block;
  vertical-align: -1px;
  color: var(--text-2);
}
.wrow__lock .glyph {
  display: inline;
}
.wrow__s {
  display: grid;
  justify-items: end;
  color: var(--text-2);
  font-size: 12px;
  white-space: nowrap;
}
.wrow__s .coin {
  display: inline-block;
  vertical-align: -2px;
}
.wrow__go {
  color: var(--muc-500);
}
.worlds__join {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--paper-400);
  border-radius: 8px;
  background: var(--paper-50);
  color: var(--text-2);
}
.field input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--text);
}
.worlds__join .btn {
  min-height: 44px;
}
.field--block {
  display: grid;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
}
.field--block > small {
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 700;
}
.field--block > span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--paper-400);
  border-radius: 8px;
  background: var(--paper-50);
}
.field--block em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
}
.create {
  display: grid;
  gap: 12px;
  padding-top: 10px;
}
.create__facts {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(213, 183, 143, 0.35);
  color: var(--text-2);
  font-size: 12.5px;
}
.create__facts span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mbox--create {
  width: min(500px, 100%);
}
.lobby__name {
  position: absolute;
  left: 16px;
  bottom: 16px;
}
.namecard {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 260px;
  padding: 8px 12px 8px 8px;
  border-width: 3px;
}
.lobby__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper-300);
  color: var(--text-2);
  box-shadow: inset 0 0 0 1.5px var(--vang-600);
}
.namecard label {
  flex: 1;
  display: grid;
  min-width: 0;
}
.namecard small {
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 700;
}
.namecard input {
  min-height: 30px;
  padding: 0 6px;
  border: 0;
  border-bottom: 1px solid var(--paper-400);
  background: transparent;
  outline: none;
  font-size: 15px;
}
.lobby__corner {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: flex;
  gap: 10px;
}
.cbtn {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper-50);
  font-size: 11.5px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(9, 8, 6, 0.8);
}
.cbtn .orb {
  --orb: 44px;
}
.lobby__ver {
  justify-self: center;
  align-self: end;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(9, 8, 6, 0.45);
  color: var(--paper-50);
  font-size: 11.5px;
}
/* narrow / short: name card and corner buttons join the column's flow */
.lobby.is-flow .lobby__name,
.lobby.is-flow .lobby__corner {
  position: static;
}
.lobby.is-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.lobby.is-flow .lobby__col {
  align-content: start;
}
.lobby.is-flow .namecard {
  width: min(460px, calc(100vw - 32px));
}
.lobby.is-flow .lobby__corner {
  flex-wrap: wrap;
  justify-content: center;
}
@media (min-width: 1700px) and (min-height: 1000px) {
  .lobby__col {
    zoom: 1.15;
  }
}
