* {
  box-sizing: border-box;
}
:root {
  color-scheme: light;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: #203332;
  background: #eef2ef;
  --ink: #203332;
  --muted: #526962;
  --line: #d3ddd7;
  --teal: #096455;
  --soft: #eaf4ef;
  --pad: clamp(12px, 1.35vw, 21px);
}
.icon-lookup { margin-top: 16px; }
.icon-lookup summary { cursor: pointer; margin-bottom: 8px; }
#deliveryDesk { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 9px; }
.delivery-tabs { display: flex; gap: 5px; }
.delivery-tabs button[aria-pressed="true"] { color: white; background: var(--teal); }
#deliveryCompose { display: grid; flex: 1; min-height: 0; gap: 14px; grid-template-columns: minmax(280px, 0.8fr) minmax(340px, 1.2fr); }
#deliveryCompose .catalog-foot { align-items: center; }
#catalogPaging { margin-inline-start: auto; flex: none; }
#catalogRecent { flex: 1; flex-wrap: nowrap; min-width: 0; margin: 0; overflow-x: auto; }
#catalogRecent > * { flex: none; }
#catalogRows button[aria-pressed="true"] { background: var(--soft); border-color: var(--teal); }
#deliveryForm input:user-invalid { border-color: #a94230; }
.recipient-picker { position: relative; min-width: 0; }
#grantRoleQuery { width: 100%; padding-inline-end: 2rem; }
#grantRoleToggle { position: absolute; inset: auto 1px 1px auto; padding: 0 8px; min-height: 0; height: 30px; border: 0; background: transparent; }
#grantRolePopup { position: absolute; top: 100%; inset-inline: 0; margin-top: 3px; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 4px 12px #20333225; }
#grantRoles { max-height: min(210px, 30dvh); overflow: auto; overscroll-behavior: contain; }
#grantRoles [role="option"] { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 3px 8px; padding: 7px 9px; cursor: pointer; overflow-wrap: anywhere; }
#grantRoles [role="option"]:hover, #grantRoles .active { background: var(--soft); }
#grantRoles [aria-selected="true"] { color: var(--teal); font-weight: 600; }
#grantRoles small { color: var(--muted); }
#grantRoleNotice { margin: 0; padding: 5px 8px; }
#grantRoleNotice:empty { display: none; }
#grantReview .actions { margin-top: 12px; }
@media (max-width: 759px) {
  #deliveryCompose { display: flex; flex-direction: column; overflow: auto; }
  #deliveryCompose > .pane { flex: 0 0 auto; }
  #deliveryCompose .catalog-body { height: clamp(235px, 38dvh, 360px); flex: none; }
  #deliveryCompose .pane-body { overflow: visible; }
}
.catalog-body { display: flex; flex: 1; flex-direction: column; gap: 8px; }
#catalogMessage { display: block; min-height: 1.55em; margin: 0; }
.catalog-list, .receipt-list { list-style: none; margin: 0; padding: 0; }
.catalog-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.catalog-list button {
  width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center; gap: 10px; text-align: left; border-color: transparent;
  border-bottom-color: var(--line); border-radius: 0;
}
.catalog-list button b { font-weight: 600; overflow-wrap: anywhere; }
.item-thumb { height: 32px; display: grid; place-items: center; border-radius: 4px; background: var(--soft); }
.item-thumb img, .item-card img { image-rendering: pixelated; }
.catalog-list small, .item-card small { color: var(--muted); }
.catalog-foot { display: flex; justify-content: space-between; gap: 8px; }
.item-card { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--soft); border-radius: 6px; margin-bottom: 14px; }
.item-card small { display: block; margin-top: 3px; }
#appraisalDetails { margin: 0 0 12px; }
#appraisalDetails summary { cursor: pointer; color: #5b4176; font-weight: 600; }
#deliveryForm { display: grid; gap: 10px; }
#deliveryForm > button, #catalogFolder { align-self: start; justify-self: start; }
.receipt-list > li { padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.receipt-list summary { cursor: pointer; font-weight: 600; }
.receipt-list p { margin: 5px 0; font-size: 13px; }
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
[hidden] {
  display: none !important;
}
button,
input,
select {
  font: inherit;
}
button {
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #bdcec5;
  background: white;
  border-radius: 5px;
  min-height: 32px;
  padding: 5px 11px;
}
button:hover:enabled {
  border-color: var(--teal);
  background: var(--soft);
}
button:disabled {
  opacity: 0.57;
  cursor: default;
}
button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}
button.primary:hover:enabled {
  background: #054d42;
  color: white;
}
:focus-visible {
  outline: 3px solid #cd7b18;
  outline-offset: 2px;
}
h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}
h1 {
  font-size: clamp(22px, 2.1vw, 31px);
  letter-spacing: -0.03em;
}
h2 {
  font-size: 16px;
  letter-spacing: 0.035em;
}
h3,
label {
  font-size: 13px;
  font-weight: 650;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 17px;
  min-height: 53px;
  padding: 7px clamp(14px, 2.1vw, 34px);
  color: #f5fbf6;
  background: #172e2c;
  border-bottom: 3px solid #82bd9d;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font:
    750 20px/1 "Segoe UI",
    sans-serif;
  letter-spacing: -0.045em;
}
.brand strong {
  color: #acddbc;
  font-weight: 600;
}
.brand-mark {
  width: 23px;
  height: 23px;
  display: inline-block;
  border: 3px solid #b6e8c8;
  border-radius: 6px;
  transform: rotate(-10deg);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid #b6e8c8;
  border-right-color: transparent;
  border-radius: 2px;
}
.top-context {
  font-size: 12px;
  color: #cbdbd2;
  padding-left: 15px;
  border-left: 1px solid #4a6059;
}
.topbar nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.topbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: #e5f0e8;
  border-color: #577068;
  font-size: 13px;
}
.topbar button:last-child {
  background: #c5e6d2;
  color: #163b2f;
  border-color: #c5e6d2;
}
.topbar button:hover:enabled {
  background: #e1f3e7;
  color: #173b2f;
}
.folder-icon,
.db-icon {
  width: 14px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  display: inline-block;
  position: relative;
}
.folder-icon::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  border: 1px solid currentColor;
  border-bottom: 0;
  top: -4px;
  left: -1px;
}
.db-icon {
  height: 13px;
  border-radius: 50% / 24%;
}
.db-icon::after {
  content: "";
  position: absolute;
  inset: 0 0 5px;
  border-bottom: 1px solid currentColor;
  border-radius: 50% / 25%;
}
main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(12px, 2.1vw, 34px) 13px;
}
.workhead {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: clamp(51px, 7.5vh, 78px);
}
.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-size: 12px;
  background: #f9fbf9;
  border: 1px solid #cad6ce;
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.session-badge::before,
.local-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #86958c;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.session-badge.on::before,
.local-dot::before {
  background: #368260;
}
.online-population {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-inline-start: clamp(0px, 2vw, 36px);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.online-population strong {
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 759px) {
  .online-population { margin-inline-start: 0; }
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr) minmax(0, 0.88fr);
  gap: clamp(9px, 1.1vw, 17px);
  flex: 1;
  min-height: 0;
}
.desk-nav {
  margin-left: auto;
  display: flex;
  gap: 3px;
  padding: 2px;
  background: #e2ebe4;
  border-radius: 6px;
}
.desk-nav button {
  min-height: 26px;
  border: 0;
  background: transparent;
  font-size: 12px;
}
.desk-nav button[aria-pressed="true"] {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 1px 3px #132d231f;
}
.account-desk {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.acct-search {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 6px 14px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: #f9fbf9;
  border-radius: 6px;
}
.acct-search form {
  flex: 1 1 240px;
  max-width: 420px;
}
.acct-search .message {
  margin: 0 0 5px;
}
#activationDialog { width: min(660px, calc(100% - 24px)); }
#activationDialog textarea {
  box-sizing: border-box;
  width: 100%;
  resize: vertical;
  padding: 7px 9px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 5px;
}
#activationDialog .table-scroll { max-height: min(38dvh, 320px); margin-top: 8px; }
#activationDialog th, #activationDialog td { overflow-wrap: anywhere; }
.account-panes {
  display: grid;
  grid-template-columns: 1.03fr 1.12fr 0.87fr;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.account-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.account-metric h3 {
  margin: 0;
  font-size: 13px;
}
.account-metric strong {
  grid-column: 1;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  color: var(--teal);
}
.account-metric small {
  grid-column: 1/-1;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.account-metric button {
  grid-column: 2;
  grid-row: 1/3;
  min-height: 28px;
  padding: 3px 7px;
  font-size: 12px;
}
#accountEditForm label {
  margin-bottom: 9px;
}
#accountBefore {
  display: block;
  background: var(--soft);
  padding: 6px;
}
#launcherEndpoint {
  margin-top: 8px;
}
#launcherEndpoint > div {
  margin-bottom: 8px;
}
@media (max-width: 759px) {
  .account-panes {
    display: flex;
  }
  .account-panes > .pane:not(.chosen) {
    display: none;
  }
  .workhead {
    flex-wrap: wrap;
    gap: 4px 8px;
    padding-block: 4px;
  }
  .acct-search {
    padding: 7px 10px;
  }
  .acct-search form {
    max-width: none;
  }
  .account-desk .mobile-switch {
    margin: 0;
  }
}
.pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #fff;
  border: 1px solid #cad7ce;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 3px #122f2010;
}
.pane-head {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 43px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  background: #f9fbf9;
  flex: none;
}
.pane-mark {
  width: 4px;
  height: 16px;
  background: #427761;
  border-radius: 2px;
}
.edit-entry {
  margin-left: auto;
  min-height: 27px;
  padding: 2px 9px;
  color: var(--teal);
  font-size: 12px;
}
#editDialog { width: min(50rem, calc(100% - 24px)); }
#roleAuditDialog { width: min(54rem, calc(100% - 24px)); }
#roleAuditList { max-height: 52vh; }
#roleAuditList th { position: sticky; top: 0; background: #f0f5ef; }
#roleAuditList td:last-child { min-width: 13rem; white-space: normal; overflow-wrap: anywhere; }
.guild-audit-detail { margin-block-start: .35rem; }
.guild-audit-detail summary { cursor: pointer; color: var(--teal); }
.guild-audit-detail ul { margin: .35rem 0; padding-inline-start: 1.25rem; font-variant-numeric: tabular-nums; }
#editFields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
  gap: 12px 10px;
}
#editFields label { display: grid; gap: 4px; min-width: 0; }
#editFields :is(input, select) {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#editFields .edited :is(input, select) { border-color: var(--teal); background: var(--soft); }
#editFields input[readonly] { background: #f4f6f4; color: var(--ink); }
#editFields :is(input, select):user-invalid { border-color: #a33525; }
#editFields > div > label + label { margin-top: 4px; }
.edit-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
}
#editRange { margin: 0; }
.edit-scroll {
  margin-block: 8px 12px;
  max-block-size: min(29rem, 55dvh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.edit-table { table-layout: fixed; font-size: 13px; }
.edit-table thead th {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  background: #f0f5ef;
}
.edit-table td, .edit-table th { padding: 4px 8px; }
.edit-table tbody th { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 440px) {
  #editFields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); }
  .edit-table td, .edit-table th { padding-inline: 4px; }
  #editSummary .edit-table { table-layout: auto; }
  #editSummary .edit-table td { white-space: normal; overflow-wrap: anywhere; }
}
@media (pointer: coarse) {
  #editFields :is(input, select) { min-height: 48px; font-size: 16px; }
}
.pane-body,
.dialog-body {
  padding: var(--pad);
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
.pane-body {
  flex: 1;
}
.role-card {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #f4fbf7;
  padding: 10px;
  background: #254d43;
  border-radius: 6px;
}
.role-card > div {
  min-width: 0;
  flex: 1;
}
.role-card strong,
.role-card small {
  display: block;
  overflow-wrap: anywhere;
}
.role-card strong {
  font-size: 17px;
}
.role-card small {
  color: #c7ded0;
  margin-top: 2px;
  font:
    12px/1.45 Consolas,
    monospace;
}
.role-card > span {
  font-size: 11px;
  background: #ffffff16;
  padding: 3px 5px;
  border: 1px solid #759389;
  border-radius: 4px;
}
.portrait {
  width: 36px;
  height: 36px;
  flex: none;
  position: relative;
  border: 1px solid #739484;
  border-radius: 5px;
  background: #355d4d;
  overflow: hidden;
}
.portrait::before,
.portrait::after {
  content: "";
  display: block;
  position: absolute;
  background: #c1d9bf;
  left: 50%;
  transform: translateX(-50%);
}
.portrait::before {
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.portrait::after {
  bottom: 5px;
  width: 21px;
  height: 10px;
  border-radius: 10px 10px 3px 3px;
}
.pane-body h3 {
  margin: 15px 0 7px;
}
.pane-body section > :first-child,
.pane-body > h3:first-child {
  margin-top: 0;
}
.info-lines > div {
  display: grid;
  grid-template-columns: minmax(6em, 0.85fr) minmax(0, 1.35fr);
  align-items: baseline;
  gap: 6px;
  border-bottom: 1px solid #e3eae5;
  padding: 5px 2px;
}
dt {
  color: var(--muted);
  font-size: 12px;
}
dd {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13px;
  overflow-wrap: anywhere;
  text-align: right;
}
.asset-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.asset-actions button {
  padding: 4px 7px;
  flex: 1 0 auto;
  font-size: 12px;
  background: #f5f8f5;
}
.tabs {
  display: flex;
  flex: none;
  overflow-x: auto;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
}
.tabs button {
  border: none;
  border-radius: 0;
  padding: 9px 9px 7px;
  min-height: 36px;
  flex: none;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 3px solid transparent;
}
.tabs button[aria-selected="true"] {
  color: var(--teal);
  border-bottom-color: var(--teal);
}
.tabs :focus-visible {
  outline-offset: -3px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #f1f6f1;
  border: 1px solid #ceddcf;
  border-radius: 6px;
}
.stat-grid > div {
  padding: 8px 10px;
}
.stat-grid > div:nth-child(-n + 3) {
  border-bottom: 1px solid #d9e4d9;
}
.stat-grid > div:not(:nth-child(3n)) {
  border-right: 1px solid #d9e4d9;
}
.stat-grid dd {
  text-align: left;
  font:
    650 20px/1.25 "Segoe UI",
    sans-serif;
  color: #264f3c;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
label,
.field {
  display: block;
  min-width: 0;
}
label {
  color: #425b50;
}
input:not([type="checkbox"]),
select {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  min-height: 33px;
  border: 1px solid #b9c9bf;
  background: #fff;
  border-radius: 4px;
  color: var(--ink);
}
input:disabled,
select:disabled {
  background: #f4f6f4;
  color: #687970;
}
label > input:not([type="checkbox"]),
label > select,
label + input,
label + select {
  margin-top: 4px;
}
#lookupFields > label:not(:first-of-type) {
  margin-top: 9px;
}
.search-line,
.path-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.search-line button,
.path-row button {
  flex: none;
}
.realm-picker {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.realm-picker select { flex: 1; min-width: 0; }
.recent-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 7px;
  font-size: 12px;
}
.recent-searches > span { color: var(--muted); margin-right: 3px; }
.recent-searches button {
  max-width: min(14ch, 100%);
  padding: 3px 7px;
  min-height: 24px;
  font-size: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-searches .recent-clear { border-color: transparent; background: transparent; }
#roleRecent { grid-column: 1 / -1; }
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0 8px;
  margin-top: 13px;
  border-top: 1px solid var(--line);
}
.list-head h3 {
  margin: 0;
}
.list-head span {
  font-size: 12px;
  color: var(--muted);
}
.empty {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 74px;
  padding: 12px;
  border: 1px dashed #cad7cf;
  border-radius: 5px;
  font-size: 12px;
  color: var(--muted);
}
.role-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.role-list li + li {
  margin-top: 4px;
}
.role-list button {
  width: 100%;
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 5px;
}
.role-list b,
.role-list small {
  display: block;
  overflow-wrap: anywhere;
}
.role-list small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.role-list button[aria-current="true"] {
  background: #edf6ee;
  border-color: #75a489;
  box-shadow: inset 3px 0 #427b57;
}
.state {
  flex: none;
  color: var(--muted);
  font-size: 11px;
}
.state.online {
  color: #086442;
}
.message,
.hint {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.message:not(:empty),
.hint {
  margin: 9px 0;
}
.message:empty {
  display: none;
}
.message.error,
.field-error {
  color: #9a3025;
}
.field-error {
  font-size: 12px;
}
.table-scroll {
  width: 100%;
  overflow: auto;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
th,
td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid #e3e9e4;
}
thead {
  background: #f0f5ef;
  color: #435f4e;
}
tbody tr:last-child > * {
  border-bottom: 0;
}
#slotDialog .dialog-head > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#slotThumb {
  padding: 4px;
  border-radius: 5px;
  background: var(--soft);
}
#slotThumb img { display: block; image-rendering: pixelated; }
#slotRaw dd { overflow-wrap: anywhere; }
footer {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 26px;
  padding: 3px clamp(14px, 2.1vw, 34px);
  border-top: 1px solid #c6d3c9;
  color: #4d6558;
  background: #e4ece5;
  font-size: 11px;
}
.local-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
#dbInfo {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#readTime {
  margin-left: auto;
  white-space: nowrap;
}
dialog {
  width: min(500px, calc(100% - 24px));
  padding: 0;
  border: 1px solid #99b4a5;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  max-height: calc(100dvh - 28px);
  box-shadow: 0 15px 70px #0f241e4a;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog::backdrop {
  background: rgb(17 34 30 / 0.48);
}
.dialog-head {
  flex: none;
  display: flex;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f0f5ef;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 18px;
}
.dialog-head small {
  color: var(--muted);
}
.dialog-body {
  padding: 16px;
}
.close {
  width: 29px;
  min-height: 28px;
  font:
    22px/1 Arial,
    sans-serif;
  padding: 1px;
}
#assetDialog {
  width: min(640px, calc(100% - 24px));
}
#bankBoard {
  position: relative;
  width: min(302px, 100%, max(238px, calc(60.4dvh - 90px)));
  aspect-ratio: 302 / 500;
  margin-inline: auto;
  background: url(/bank/window.png) center / 100% 100% no-repeat;
}
#bankGrid {
  position: absolute; left: 4.97%; top: 8.2%; width: 90.07%; height: 72%;
  display: grid; align-content: space-between;
}
.bank-block { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
.bank-cell {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 1; min-width: 0; min-height: 0; padding: 0; border: 0;
  color: #273734; background: transparent; font: bold 10px/1 sans-serif;
}
button.bank-cell:hover:enabled, button.bank-cell:focus-visible {
  background: url(/bank/highlight.png) center / 100% 100% no-repeat;
}
.bank-cell img { position: absolute; width: 86%; height: 86%; object-fit: contain; image-rendering: pixelated; }
.bank-cell img:not([src]) { visibility: hidden; }
.bank-cell:has(img[src]:not([hidden])) span { visibility: hidden; }
.bank-cell.unavailable { background: url(/bank/locked.png) center / 100% no-repeat; opacity: 0.58; }
#bankPages { position: absolute; inset: 80.5% 0 auto; width: 100%; height: 7%; }
#bankPages button, .bank-close {
  position: absolute; border: 0; padding: 0; min-height: 0;
  background: transparent center / contain no-repeat;
}
#bankPages button { top: 0; width: 12.6%; height: 100%; background-image: url(/bank/tab-off.png); }
#bankPages button:nth-child(1) { left: 9.94%; }
#bankPages button:nth-child(2) { left: 45.4%; }
#bankPages button:nth-child(3) { left: 62%; }
#bankPages button:nth-child(4) { left: 78.8%; }
#bankPages button[aria-pressed=true] { background-image: url(/bank/tab-on.png); }
#bankPages button:hover:enabled { background-color: transparent; filter: brightness(1.15); }
#bankBoard .bank-close { left: 89.74%; top: 1.6%; width: 7.29%; height: 4.4%; background-image: url(/bank/close.png); }
.bank-balances { position: absolute; inset: 89.2% 49.8% 2.1% 18.5%; display: grid; align-items: center; text-align: right; color: #38251b; font: 700 12px/1 monospace; }
.bank-deliver { position: absolute; right: 4%; bottom: 3%; min-height: 24px; padding: 4px 10px; border-color: #8e665a; color: #563c2b; background: #fff7e4; }
.bank-cell .slot-quantity, .bag-cell .slot-quantity {
  position: absolute; z-index: 1; bottom: 1px; right: 2px;
  font: 700 11px/1.1 "Segoe UI",sans-serif; color: white;
  text-shadow: -1px -1px 1px #201609, 1px -1px 1px #201609, -1px 1px 1px #201609, 1px 1px 1px #201609;
  pointer-events: none;
}
#itemHint {
  position: fixed; inset: auto; margin: 0; z-index: 50;
  width: min(280px,calc(100vw - 12px)); max-height: calc(100dvh - 12px); overflow: auto;
  background: #d1bca7; color: #392b20; border: 1px solid #fff0d8; border-radius: 7px;
  padding: 11px 12px; box-shadow: 0 2px 8px #34251342; font: 13px/1.35 "Microsoft YaHei",sans-serif;
  overflow-wrap: anywhere;
}
.game-meta,.game-muted { display:block; color:#534335; font-size:11px; }
.game-meta { display:flex; flex-wrap:wrap; gap:1px 8px; margin-bottom:5px; font-variant-numeric:tabular-nums; }
.game-item { font:13px/1.35 "Microsoft YaHei",sans-serif; color:#30251b; overflow-wrap:anywhere; }
.game-name { display:block; margin-bottom:9px; }
.game-item section,.game-item p,.game-price { margin:9px 0 0; }
.game-item section strong { display:block; font-size:inherit; }
.game-values { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px 6px; font-variant-numeric:tabular-nums; }
.game-equipped { color:#923909; font-weight:bold; }
.game-special { color:#196421; }
.game-kind,.game-appraisal { color:#67257b; }
.game-base { color:#243e94; }
.game-set,.game-skill { color:#902518; }
/* SealLauncher's SpringGradeColors, including its fallback for other grades. */
[data-spring-grade] { --spring-ink: #c80000; --spring-backing: #fff8ef; }
[data-spring-grade="1"] { --spring-ink: #646464; }
[data-spring-grade="2"] { --spring-ink: #66b2ff; --spring-backing: #261d19; }
[data-spring-grade="3"] { --spring-ink: #cc6600; --spring-backing: #211710; }
[data-spring-grade="4"] { --spring-ink: #ff66b2; --spring-backing: #261d19; }
[data-spring-grade="5"] { --spring-ink: #ff007f; --spring-backing: #211710; }
.game-spring, #slotDisplaySpring dd {
  color: var(--spring-ink);
}
#slotGameCard { margin-top:12px; background:#d1bca7; padding:12px; border:1px solid #b09b83; border-radius:6px; }
.item-description { white-space: pre-line; overflow-wrap: anywhere; }
.ink-R { color: #8f2620; } .ink-B { color: #234785; } .ink-G { color: #205d35; }
.calc-grid, .slot-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,125px),1fr)); gap: 6px 10px; }
#calcGrades { grid-template-columns: repeat(auto-fit,minmax(65px,1fr)); margin-block: 8px; }
#calculatorForm { display: grid; gap: 12px; }
#calculatorForm label, #slotEditForm label { margin: 0; }
#slotEditForm .actions { margin-top: 12px; }
.calc-result { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border: 1px solid #bdd4cb; border-radius: 5px; background: #edf4ef; }
.calc-result output { font: 700 20px/1.2 Consolas,monospace; color: #175043; user-select: all; }
#slotOptionsDialog { width: min(460px, calc(100% - 16px)); }
#slotOptionsForm fieldset + fieldset { margin-top: 14px; }
#slotOptionsForm legend { font-weight: 700; margin-bottom: 5px; }
#slotOptionsForm label { margin: 0; }
.spring-grade { max-width: 10rem; }
#springGrade, #springGrade option { color: var(--spring-ink); background-color: var(--spring-backing); }
.spring-lines tbody th { border-inline-start: 3px solid var(--spring-ink); }
.spring-lines { width: 100%; margin-top: 6px; table-layout: fixed; }
.spring-lines th:first-child { width: 3em; }
.spring-lines th:nth-child(2) { width: 43%; }
.spring-lines th, .spring-lines td { padding: 3px; }
.spring-lines td input, .spring-lines td select { padding-inline: 4px; }
.calc-import summary { cursor: pointer; color: var(--muted); }
.calc-import .search-line { margin-top: 6px; }
#calcNotice:empty, #slotEditStatus:empty { display: none; }
#grantDetails { margin-bottom: 10px; }
#grantDetails summary { cursor: pointer; }
#coreFields > div > small { display: block; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
@media (max-width: 660px) { .workhead { flex-wrap: wrap; padding-block: 6px; } .desk-nav { flex-wrap: wrap; } }
.grant-target { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 5px 9px 8px; border: 1px solid var(--line); border-radius: 4px; }
.grant-target legend { font-size: 13px; font-weight: 600; }
.grant-target label { display: inline-flex; gap: 4px; align-items: center; }
.grant-target input[type=radio] { margin: 0; width: auto; min-height: 0; accent-color: var(--teal); }
.fields,
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fields {
  grid-template-columns: 2fr 1fr;
}
#fields > * + * {
  margin-top: 10px;
}
.check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
}
input[type="checkbox"] {
  accent-color: var(--teal);
}
.account-config {
  padding: 7px 0;
  border-block: 1px solid var(--line);
}
summary {
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.account-config[open] summary {
  margin-bottom: 8px;
}
.actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.saved-tools {
  margin-top: 9px;
}
.text-button {
  padding: 3px 0;
  border: 0;
  color: var(--teal);
  font-size: 12px;
}
#previewForm .pair {
  grid-template-columns: 1fr;
}
.preview-result {
  margin-top: 14px;
}
.preview-result img {
  image-rendering: pixelated;
  background: #eff4ef;
}
.mobile-switch {
  display: none;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (min-width: 1100px) and (min-height: 730px) {
  .pane-head {
    height: 49px;
  }
  .info-lines > div {
    padding-block: 8px;
  }
  .role-card {
    padding: 15px;
  }
  .stat-grid > div {
    padding: 12px 15px;
  }
}
@media (min-width: 760px) and (max-height: 660px) {
  .attributes .info-lines > div {
    padding-block: 3px;
  }
  .attributes .stat-grid > div {
    padding-block: 7px;
  }
}
@media (max-width: 759px) {
  .top-context {
    display: none;
  }
  .topbar {
    gap: 7px;
    padding-inline: 12px;
  }
  .topbar button {
    padding-inline: 8px;
  }
  main {
    padding: 0 10px 8px;
  }
  .workhead {
    min-height: 50px;
  }
  .mobile-switch {
    display: flex;
    margin-bottom: 8px;
    gap: 4px;
  }
  .mobile-switch button {
    flex: 1;
  }
  .mobile-switch button[aria-pressed="true"] {
    background: #254d43;
    color: white;
  }
  .workspace {
    display: flex;
  }
  .pane {
    width: 100%;
  }
  body:not([data-mobile="identity"]) .identity,
  body:not([data-mobile="attributes"]) .attributes,
  body:not([data-mobile="lookup"]) .lookup {
    display: none;
  }
  footer {
    gap: 8px;
    padding-inline: 10px;
  }
}
@media (max-width: 370px) {
  .brand {
    font-size: 16px;
    gap: 6px;
  }
  .topbar button {
    font-size: 12px;
  }
  .topbar button i {
    display: none;
  }
}

#roleDesk .pane-head { height: 38px; }
#roleDesk .role-card { padding: 8px 10px; }
#roleDesk .pane-body h3 { margin-block: 10px 5px; }
#roleDesk .stat-grid > div { padding: 5px 8px; }
#roleDesk .stat-grid dd { font-size: 17px; }
.identity, .attributes { container: role-data / inline-size; }
#identityFields, #progressFields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}
#identityFields > div, #progressFields > div {
  display: block;
  min-width: 0;
  padding: 4px 6px;
  background: #fbfcfa;
  border: 0;
}
#identityFields dd, #progressFields dd { margin-top: 1px; text-align: left; font-size: 12px; }
@container role-data (min-width: 32rem) {
  #identityFields, #progressFields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #coreFields { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  #coreFields > div { border-bottom: 0; }
  #coreFields > div:not(:last-child) { border-right: 1px solid #d9e4d9; }
}
#assetActions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 6rem), 1fr)); }
.lookup { container: role-lookup / inline-size; }
@container role-lookup (min-width: 24rem) {
  #lookupFields {
    display: grid;
    grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 1.8fr);
    grid-template-areas: "mode-label term-label" "mode term" "error error";
    gap: 3px 8px;
  }
  #lookupFields label[for="mode"] { grid-area: mode-label; }
  #lookupFields > #termLabel { grid-area: term-label; margin: 0; }
  #lookupFields > #mode { grid-area: mode; margin: 0; }
  #lookupFields > .search-line { grid-area: term; margin: 0; }
  #lookupFields > #termError { grid-area: error; }
}

#assetDialog.container-dialog { width: min(1080px,calc(100vw - 24px)); }
#assetDialog.container-dialog > .dialog-body { overflow-y: auto; padding: 12px; }
.asset-split { display: grid; grid-template-columns: minmax(240px,302px) minmax(0,1fr); align-items: start; gap: 16px; }
.asset-toolbar { display: flex; align-items: center; gap: 12px; }
#storePicker { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
#storePicker select { width: auto; }
.asset-switch { display: none; }
.asset-table-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 10px; align-items: center; }
.asset-table-head h3 { margin: 0; }
#assetAddControls:not([hidden]) { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
#assetAddControls label { display: flex; gap: 4px; align-items: center; margin: 0; }
#assetAddControls select, #assetAddControls button, .asset-row-actions button { min-height: 26px; padding: 2px 5px; }
#assetDraftCount { color: var(--muted); font-size: 12px; }
.asset-editor, .asset-game { min-width: 0; }
#assetScroll { max-height: min(59dvh,550px); overflow: auto; scrollbar-gutter: stable; }
#assetScroll table { min-width: 640px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
#assetScroll th, #assetScroll td { padding: 4px; }
#assetScroll thead { position: sticky; inset-block-start: 0; z-index: 2; }
#assetScroll th:first-child { width: 40px; position: sticky; inset-inline-start: 0; background: #edf3ef; z-index: 1; }
#assetScroll th:nth-child(2) { width: 40px; }
#assetScroll th:nth-child(3) { width: 22%; }
#assetSerialHead { width: 23%; }
.asset-actions-head { width: 74px; }
.asset-row-actions button { margin-block: 1px; white-space: nowrap; }
#realmFolders { margin-block: 8px; }
#realmFolders form { margin-top: 8px; }
#realmFolderName { overflow-wrap: anywhere; }
#assetScroll th:nth-child(4) { width: 14%; }
#assetScroll .asset-name { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
#assetScroll input { min-width: 0; width: 100%; min-height: 27px; padding: 3px 5px; font: 13px/1.3 Consolas, monospace; }
#assetScroll input[readonly] { color: #4b5a56; background: #f4f6f3; }
#assetScroll tr.dirty td { background: #fff4cf; }
.asset-icon { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; background: var(--soft); }
.asset-icon img { image-rendering: pixelated; }
#assetBatchForm .actions { justify-content: flex-end; margin-top: 10px; }
#batchReviewList { overflow: auto; max-height: 50dvh; }
#batchReviewList p { display: grid; gap: 4px; padding: 6px 0; margin: 0; border-bottom: 1px solid var(--line); }
#batchReviewList p span { font-variant-numeric: tabular-nums; color: var(--muted); }
#batchDialog label { margin-block: 10px; }
#skinBoard { position: relative; width: min(302px,100%); margin-inline: auto; background: center/100% 100% no-repeat; }
#skinBoard > * { position: absolute; }
.skin-control { display: grid; place-items: center; min-height: 0; margin: 0; padding: 0; border: 0; font: bold 12px/1 "Microsoft YaHei",sans-serif; color: #4d3526; background: transparent center/100% 100% no-repeat; }
.skin-control:enabled:hover { background-color: transparent; filter: brightness(1.1); }
.skin-control:disabled { opacity: .55; }
#skinBoard input.skin-filter { min-height: 0; padding: 1px 5px; background: transparent; border: 0; }
#skinBoard .skin-money { justify-content: end; }
.skin-cell.dim-item { opacity: .25; }
.bank-cell.linked-slot { outline: 2px solid #bd801b; outline-offset: -2px; }
#skinPaging { justify-content: center; gap: 4px; }
#skinPaging [aria-pressed=true],.asset-switch [aria-pressed=true] { background: var(--teal); color: white; }
#assetDialog.container-dialog #assetFields:empty, #batchStatus:empty { display: none; }
#assetDialog.container-dialog:has(#bankBoard:not([hidden])) #assetFields { display: none; }
@media (max-width: 800px) {
  #assetDialog.container-dialog { width: calc(100vw - 12px); }
  .asset-split { display: block; }
  .asset-toolbar { flex-wrap: wrap; justify-content: space-between; margin-bottom: 8px; }
  .asset-switch { display: flex; gap: 4px; }
  #assetWorkspace[data-view=game] .asset-editor, #assetWorkspace[data-view=table] .asset-game { display:none; }
}

#connectionModes { margin-block: 10px; }
#connectionModes [aria-pressed=true] { background: var(--teal); color: white; }
#gatewayLogin fieldset { display: grid; gap: 9px; }
#gatewayLogin fieldset > label:first-of-type { margin-bottom: -7px; }
#gatewayLogDialog { width: min(56rem, 95vw); }
.gateway-log-scroll { min-width: 0; max-height: 52vh; overflow: auto; }
#gatewayLogDialog table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .85rem; }
#gatewayLogTable { min-width: 36rem; }
#gatewayDeliveryDetail table { min-width: 29rem; }
#gatewayLogDialog th, #gatewayLogDialog td { padding: .4rem; border-bottom: 1px solid var(--line); text-align: start; }
#gatewayLogDialog th { position: sticky; top: 0; z-index: 1; white-space: nowrap; background: var(--soft); }
#gatewayLogDialog td { overflow-wrap: anywhere; }
#gatewayLogDialog td button { white-space: nowrap; }
.gateway-log-tools { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
.gateway-log-tools label { display: grid; gap: .2rem; }
#gatewayDeliveryDetail { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; margin-top: .6rem; }
#gatewayDeliveryDetail caption { text-align: start; font-weight: 700; padding-block: .2rem .4rem; }
.gateway-delivery-summary { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.gateway-delivery-summary div { min-width: 0; }
.gateway-delivery-summary dt { font-size: .75rem; color: var(--muted); }
.gateway-delivery-summary dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
#gatewayDeliveryDetail .gateway-log-scroll { max-height: 35vh; }
.gateway-delivery-item { display: flex; align-items: center; gap: .35rem; }
.gateway-delivery-item img { object-fit: contain; image-rendering: pixelated; }
.launcher-wallet { display: contents; }
#currencyForm { display: grid; gap: .65rem; }
#currencyForm > button { justify-self: start; }
@media (pointer: coarse) { #gatewayLogin input:not([type=checkbox]) { min-height: 48px; font-size: 1rem; } }
.container-clear { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; margin-block-end: .4rem; }
.container-clear[hidden], .container-clear [hidden], .clear-slot-check[hidden] { display: none; }
.container-clear label { display: inline-flex; align-items: center; gap: .3rem; }
.container-clear .clear-preview { color: #922b1d; border-color: #cc978f; }
.container-clear .clear-notice { color: #922b1d; font-size: .8rem; }
.container-clear input[type=checkbox], #assetScroll .clear-slot-check, #guildStoreForm input.clear-slot-check {
  inline-size: 1rem; block-size: 1rem; min-height: 0; padding: 0; margin: 0; vertical-align: middle; accent-color: #a23223;
}
#assetScroll .clear-slot-check, #guildStoreForm input.clear-slot-check { margin-inline-end: .25rem; }
.clear-picking #assetAddControls:not([hidden]), .clear-picking form > .actions { display: none; }
.clear-picking #assetScroll th:first-child { width: 66px; }
.clear-picking tr[data-slot] { cursor: pointer; }
.clear-picking tr.clear-marked > *, .clear-picking #assetScroll tr.clear-marked > * { background: #ffebdc; }
.clear-picking button.bank-cell[aria-pressed=true] { outline: 2px solid #ae331e; outline-offset: -2px; }
.clear-picking button.bank-cell[aria-pressed=true]::after {
  content: "✓"; position: absolute; top: 0; left: 0; padding: 1px 2px; border-radius: 2px;
  background: #922b1d; color: white; font: bold 11px/1 sans-serif; pointer-events: none;
}
.clear-picking button.bank-cell[aria-disabled=true] { cursor: default; }
.clear-picking button.bank-cell:focus-visible { outline: 2px solid #164e63; outline-offset: 1px; }
.clear-picking .asset-game:has(#skinBoard:not([hidden]) .skin-filter) .asset-recent-strip {
  block-size: 2.7rem; overflow-x: auto;
}
.clear-picking #assetRecent { flex-wrap: nowrap; width: max-content; }
