:root {
  --pet-size: 72px;
  font-family: Tahoma, 'Microsoft JhengHei', sans-serif;
  color: #1d2934;
  background: #1e1238;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
button {
  font: inherit;
}
.desktop {
  width: min(980px, 100%);
  margin: auto;
  padding: 10px;
  display: grid;
  gap: var(--card-gap);
}
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  padding: 2px 4px;
  text-shadow: 0 1px 2px #000;
}
.brand b {
  font-size: 20px;
}
.brand small {
  display: block;
  opacity: 0.8;
}
.lamp {
  background: #243426;
  border: 1px solid #7b9180;
  border-radius: 12px;
  padding: 5px 10px;
  font-size: 12px;
}
.lamp.online {
  background: #1e6239;
  color: #caffdb;
}
.quick-audio {
  margin: 0 5px;
  border: 1px solid #6d8094;
  background: linear-gradient(#fff, #d6dde2);
  color: #315d89;
  padding: 4px 6px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.quick-audio-icon {
  display: block;
  width: 16px;
  height: 16px;
}
.quick-audio-speaker {
  fill: currentColor;
}
.quick-audio-wave,
.quick-audio-mute {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quick-audio-mute {
  display: none;
}
.quick-audio[data-audio-state="muted"] {
  background: linear-gradient(#efe4e4, #cdbcbc);
  color: #8a4f4f;
}
.quick-audio[data-audio-state="muted"] .quick-audio-wave {
  display: none;
}
.quick-audio[data-audio-state="muted"] .quick-audio-mute {
  display: inline;
}
.window {
  border: 1px solid #273a51;
  background: #e9ece7;
  box-shadow: 2px 3px 9px #0b160caa;
}
.titlebar {
  min-height: 27px;
  padding: 4px 7px;
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  background: linear-gradient(#9bb0c9, #546d8b);
}
#game .titlebar > :first-child {
  margin-right: auto;
}
#game .titlebar > :not(:first-child) {
  margin-left: 7px;
}
.window-fold-button {
  width: 19px;
  min-width: 19px;
  height: 15px;
  align-self: center;
  padding: 0;
  border: 1px solid #405b79;
  background: #edf2f7 url('/ro/client/skin/default/scroll0up.png') center / 17px
    11px no-repeat;
  box-shadow:
    inset 1px 1px #fff,
    inset -1px -1px #9ba9b7;
  image-rendering: auto;
  cursor: pointer;
}
.window-fold-button.is-collapsed {
  background-image: url('/ro/client/skin/default/scroll0down.png');
}
.window-fold-button:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 2px;
}
#game .window.window-collapsed > :not(.titlebar) {
  display: none !important;
}
.basic {
  padding: 8px;
  display: grid;
  grid-template-columns: 58px 150px 1fr;
  gap: 8px;
  font-size: 12px;
}
.portrait {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid #8b968b;
  background: linear-gradient(#fff, #cfd6cc);
  font-size: 25px;
}
.identity {
  display: grid;
  gap: 3px;
  min-width: 0;
  align-content: start;
}
.identity b {
  font-size: 16px;
}
.identity b,
.identity span,
.identity small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.identity span {
  font-weight: bold;
  color: #465d77;
}
.vitals {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 4px 7px;
  align-items: center;
  min-width: 0;
}
.vitals label {
  display: flex;
  justify-content: flex-start;
  gap: 4px;
  white-space: nowrap;
  font-weight: bold;
  min-width: 0;
  overflow: hidden;
}
.bar {
  position: relative;
  overflow: hidden;
  height: 13px;
  border: 1px solid #6b7886;
  background: #bec5c8;
}
.bar i {
  display: block;
  width: 0;
  height: 100%;
  transition: width 0.25s;
}
.hp {
  background: linear-gradient(#ff9aa0, #d94850);
}
.sp {
  background: linear-gradient(#82caff, #3b91d9);
}
.level {
  background: linear-gradient(#a9c7e8, #668db9);
}
.exp-bar > span {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #15273d;
  font-size: 10px;
  font-weight: bold;
  line-height: 13px;
  text-align: center;
  text-shadow: 0 1px rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  pointer-events: none;
}
.money {
  grid-column: 2/-1;
}
.social-window {
  overflow: hidden;
}
.chat-channels {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
  border-bottom: 1px solid #748394;
  background: #cbd2d6;
}
.chat-channels button {
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 27px;
  padding: 3px 8px;
  border: 0;
  border-right: 1px solid #91a0aa;
  border-bottom: 2px solid transparent;
  background: linear-gradient(#eef1f2, #c4ccd1);
  color: #24394d;
  font-size: 12px;
}
.chat-channels button.active {
  border-bottom-color: #356da3;
  background: #fff;
  color: #173f70;
  font-weight: bold;
}
.chat-channels button[hidden] {
  display: none;
}
/* G8L-245 unread counter (chat-unread.js); fits the 27px tab on phones too. */
.chat-channels .chat-unread {
  display: inline-block;
  min-width: 16px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 8px;
  background: #c62f2f;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  line-height: 16px;
  text-align: center;
  vertical-align: 1px;
}
.chat-toolbar {
  display: grid;
  grid-template-columns: auto minmax(118px, 190px) 1fr;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-bottom: 1px solid #8c979f;
  background: #dce1e1;
  color: #344b62;
  font-size: 12px;
}
.chat-toolbar select,
.chat-toolbar button {
  min-height: 27px;
  border: 1px solid #65768a;
  background: linear-gradient(#fff, #cbd4dc);
  color: #1f3954;
  font: inherit;
}
.chat-toolbar button {
  justify-self: end;
  padding: 3px 8px;
  font-weight: bold;
}
.chat-channel-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 9px;
  padding: 5px 7px;
  border-bottom: 1px solid #8c979f;
  background: #eef0ed;
  font-size: 12px;
}
.chat-channel-settings label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 23px;
}
.chat-channel-settings input {
  appearance: none;
  width: 13px;
  height: 13px;
  margin: 0;
  background: transparent url('/ro/client/skin/default/checkbox_0.png') center /
    contain no-repeat;
}
.chat-channel-settings input:checked {
  background-image: url('/ro/client/skin/default/checkbox_1.png');
}
.social-window .window-fold-button {
  width: 24px;
  min-width: 24px;
  height: 24px;
  border: 0;
  background: transparent url('/ro/client/skin/default/chat_close.png') center /
    24px 24px no-repeat;
  box-shadow: none;
}
.social-window .window-fold-button.is-collapsed {
  background-image: url('/ro/client/skin/default/chat_open.png');
}
.chat-feed {
  height: 138px;
  overflow: auto;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}
/* One message per line in reading order: time, channel, name：message.
   Long text wraps back to the left edge instead of into a narrow column. */
.chat-line {
  display: block;
  padding: 3px 4px;
  border-bottom: 1px solid rgb(116 131 149 / 18%);
  color: #1f2c38;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.chat-line:last-child {
  border-bottom: 0;
}
.chat-line.own {
  border-radius: 2px;
  background: rgb(53 109 163 / 9%);
}
.chat-line time {
  margin-right: 5px;
  color: #778089;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.chat-line b {
  margin-left: 4px;
  color: #234f83;
}
.chat-line b:not(:empty)::after {
  content: '：';
  color: #778089;
  font-weight: normal;
}
.chat-channel-badge {
  display: inline-block;
  min-width: 32px;
  padding: 1px 3px;
  border: 1px solid #738395;
  border-radius: 2px;
  background: #edf1f4;
  color: #294761;
  font-size: 10px;
  font-weight: bold;
  line-height: 1.3;
  text-align: center;
  vertical-align: 1px;
  white-space: nowrap;
}
.chat-line.private .chat-channel-badge {
  border-color: #8f2f78;
  background: #f3ddec;
  color: #74215f;
}
.chat-line.party .chat-channel-badge {
  border-color: #285fa0;
  background: #dce9f7;
  color: #224f85;
}
.chat-line.guild .chat-channel-badge {
  border-color: #347c47;
  background: #dff0e3;
  color: #286439;
}
.chat-line.clan .chat-channel-badge {
  border-color: #008c78;
  background: #d8f0eb;
  color: #006f60;
}
.chat-line.battleground .chat-channel-badge {
  border-color: #ad3030;
  background: #f3dddd;
  color: #8e2323;
}
.chat-line.global .chat-channel-badge {
  border-color: #7c8791;
  background: #fff;
  color: #253746;
}
.chat-line.map .chat-channel-badge {
  border-color: #9e8b24;
  background: #ffff90;
  color: #574900;
}
.chat-line.trade .chat-channel-badge {
  border-color: #66a000;
  background: #b6ff00;
  color: #294300;
}
.chat-line.support .chat-channel-badge {
  border-color: #4194ad;
  background: #83cfe9;
  color: #123f50;
}
.chat-line.ally .chat-channel-badge {
  border-color: #1d8700;
  background: #28bf00;
  color: #fff;
}
.chat-line.system .chat-channel-badge {
  border-color: #a56d17;
  background: #f3e4c7;
  color: #79500f;
}
.chat-line.emotion span {
  color: #8b4d18;
  font-weight: bold;
}
.chat-line.error span {
  color: #a52626;
  font-weight: bold;
}
.chat-line.private b,
.chat-line.private span {
  color: #8f2f78;
}
.chat-line.party b,
.chat-line.party span {
  color: #285fa0;
}
.chat-line.guild b,
.chat-line.guild span,
.chat-line.ally b,
.chat-line.ally span {
  color: #347c47;
}
.chat-line.clan b,
.chat-line.clan span {
  color: #007a68;
}
.chat-line.battleground b,
.chat-line.battleground span {
  color: #a12626;
}
.chat-line.map b,
.chat-line.map span {
  color: #806b00;
}
.chat-line.trade b,
.chat-line.trade span {
  color: #4c7800;
}
.chat-line.support b,
.chat-line.support span {
  color: #20708b;
}
.chat-line.system b,
.chat-line.system span {
  color: #a56d17;
}
.chat-line.voice audio {
  display: block;
  width: min(280px, 100%);
  height: 27px;
  margin-top: 2px;
}
.chat-line.voice .voice-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 4px;
}
.chat-line .voice-action,
.voice-block-list .voice-action {
  min-height: 24px;
  padding: 0 6px;
  font-size: 11px;
}
.voice-block-list {
  margin: 0 0 4px;
  font-size: 12px;
}
.voice-block-list ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.voice-block-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 0;
}
.chat-line.pending {
  opacity: 0.62;
}
.chat-line.pending span::after {
  content: ' 傳送中';
  color: #6c7883;
  font-size: 11px;
}
.chat-empty {
  margin: 0;
  padding: 18px 4px;
  color: #727b80;
  text-align: center;
}
.chat-compose {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 4px;
  padding: 5px;
  border-top: 1px solid #8c979f;
  background: #dce1e1;
}
.chat-recipient {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-top: 1px solid #a2adb4;
  background: #eef0ed;
  font-size: 12px;
}
.chat-recipient input {
  min-width: 0;
  height: 26px;
  border: 1px solid #71808c;
  background: #fff;
}
.chat-compose input {
  min-width: 0;
  height: 29px;
  padding: 3px 6px;
  border: 1px solid #71808c;
  background: #fff;
  font: inherit;
}
.chat-compose button,
.emotion-palette button {
  min-height: 29px;
  border: 1px solid #65768a;
  background: linear-gradient(#fff, #cbd4dc);
  color: #1f3954;
  font-weight: bold;
}
.chat-compose button {
  min-width: 54px;
}
.chat-compose .voice-record {
  min-width: 48px;
}
.chat-compose .voice-record.recording {
  border-color: #8b2020;
  background: linear-gradient(#ffb3b3, #db5656);
  color: #5b0909;
}
.emotion-palette {
  display: grid;
  grid-template-columns: repeat(13, minmax(31px, 1fr));
  gap: 2px;
  padding: 4px 5px;
  border-top: 1px solid #a7afb4;
  background: #eef0ed;
}
.emotion-palette button {
  padding: 2px;
  font-size: 15px;
}
.chat-status {
  display: block;
  padding: 3px 6px 5px;
  color: #626d74;
  background: #eef0ed;
}
.skill-list {
  padding: 7px;
}
.skill-entry {
  display: grid;
  grid-template-columns: 1fr auto 34px;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 7px 9px;
  border: 1px solid #9ba6ad;
  background: rgba(247, 248, 245, 0.92);
}
.skill-entry small {
  display: block;
  color: #68747b;
}
.skill-description {
  margin-top: 4px;
  color: #31567e;
  font-size: 12px;
}
.skill-description summary {
  cursor: pointer;
}
.skill-description p {
  max-height: 180px;
  margin: 5px 0 0;
  padding: 6px;
  overflow: auto;
  color: #30383e;
  background: #fff;
  white-space: pre-line;
}
.skill-entry strong {
  color: #31567e;
}
.skill-entry button {
  width: 32px;
  height: 30px;
  border: 1px solid #657990;
  background: linear-gradient(#fff, #ccd7df);
  font-weight: bold;
}
.job-change-window {
  margin-top: 12px;
}
.first-job-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 7px;
}
.first-job-choices button {
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 6px;
  border: 1px solid #87949d;
  background: linear-gradient(#fff, #dce2e5);
  text-align: left;
}
.first-job-choices small {
  color: #64717a;
}
.first-job-choices .job-group-heading {
  grid-column: 1 / -1;
  padding-top: 3px;
  color: #506678;
  border-bottom: 1px solid #b4bec4;
  font-weight: bold;
}
.job-route-panel {
  padding: 7px;
  border-top: 1px solid #aab3b8;
  background: #eef1ee;
}
.job-route-panel p {
  margin: 0 0 6px;
}
.npc-dialog {
  margin: 7px;
  border: 2px solid #6d7f91;
  background: #f8f8f4;
}
.npc-name {
  padding: 4px 7px;
  color: #fff;
  background: linear-gradient(#90aac4, #557695);
  font-weight: bold;
}
.npc-dialog > p {
  max-height: 180px;
  margin: 0;
  padding: 9px;
  overflow: auto;
  white-space: pre-line;
}
.npc-actions {
  display: grid;
  gap: 4px;
  padding: 7px;
  border-top: 1px solid #aab3b8;
}
.npc-actions button {
  text-align: left;
}
@media (max-width: 520px) {
  .first-job-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: -9px;
  z-index: 1;
  padding-left: 8px;
}
.tabs button {
  min-height: 21px;
  border: 0;
  background-color: transparent;
  background-image:
    url('/ro/client/ui/original/tab/tab_l.png'),
    url('/ro/client/ui/original/tab/tab_r.png'),
    url('/ro/client/ui/original/tab/tab_m.png');
  background-position: left top, right top, left 4px top;
  background-repeat: no-repeat, no-repeat, repeat-x;
  background-size: auto 100%, auto 100%, 1px 100%;
  padding: 2px 18px;
  font-weight: bold;
  image-rendering: pixelated;
}
.skill-entry > div:first-child {
  min-width: 0;
}
.skill-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
  float: left;
  margin: 0 7px 3px 0;
}
.skill-tree-sections {
  display: grid;
  gap: 8px;
}
.skill-tree-section,
.skill-tree-tooltip,
.skill-detail-dialog {
  background-color: #fff;
  background-image:
    url('/ro/client/skin/default/sysbox_bg.png'),
    url('/ro/client/skin/default/sysbox_mu.png'),
    url('/ro/client/skin/default/sysbox_md.png'),
    url('/ro/client/skin/default/sysbox_lm.png'),
    url('/ro/client/skin/default/sysbox_rm.png'),
    url('/ro/client/skin/default/sysbox_lu.png'),
    url('/ro/client/skin/default/sysbox_ru.png'),
    url('/ro/client/skin/default/sysbox_ld.png'),
    url('/ro/client/skin/default/sysbox_rd.png');
  background-position:
    left top,
    left top, left bottom, left top, right top,
    left top, right top, left bottom, right bottom;
  background-repeat:
    repeat,
    repeat-x, repeat-x, repeat-y, repeat-y,
    no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: 14px 14px;
  image-rendering: pixelated;
  color: #26384f;
}
.skill-tree-section {
  min-width: 0;
  padding: 14px 14px 10px;
}
.skill-tree-section h3 {
  margin: 0 0 4px;
  padding: 0 1px 3px;
  border-bottom: 1px solid #aab5c1;
  font-size: 13px;
}
.skill-tree-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px 0;
  width: 100%;
}
.skill-tree-node,
.skill-tree-empty {
  position: relative;
  min-width: 0;
  min-height: 80px;
}
.skill-tree-node {
  display: grid;
  grid-template-rows: 20px 44px 16px;
  justify-items: center;
  align-items: center;
  padding: 1px;
  text-align: center;
}
.skill-tree-name {
  max-width: 100%;
  max-height: 20px;
  overflow: hidden;
  font-size: 11px;
  line-height: 10px;
  overflow-wrap: anywhere;
}
.skill-tree-node.is-selected { outline: 2px solid #315f8c; }
.skill-tree-node.is-prerequisite { outline: 2px solid #388253; }
.skill-tree-icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7b2929;
  font-size: 9px;
  cursor: help;
}
.skill-tree-icon-button img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
}
.skill-tree-icon-button:focus-visible,
.skill-tree-add:focus-visible {
  outline: 2px solid #35609a;
  outline-offset: 1px;
}
.skill-tree-level {
  color: #1d2e43;
  font-size: 11px;
  line-height: 15px;
}
.skill-tree-empty {
  display: grid;
  place-items: start center;
  padding-top: 24px;
  image-rendering: pixelated;
}
.skill-tree-empty img { width: 40px; height: 40px; }
.skill-tree-add {
  position: absolute;
  top: 55px;
  right: 1px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: url('/ro/client/ui/original/status/skill_up_a.png') center / 24px 24px no-repeat;
  image-rendering: pixelated;
  cursor: pointer;
}
.skill-tree-add:active {
  background-image: url('/ro/client/ui/original/status/skill_up_b.png');
}
.skill-tree-add:disabled {
  background-image: url('/ro/client/ui/original/status/skill_up_c.png');
  cursor: default;
}
.skill-tree-controls {
  margin-top: 8px;
}
.skill-tree-controls > summary {
  padding: 4px 6px;
  color: #294d75;
  cursor: pointer;
  font-weight: bold;
}
.skill-control-list {
  display: grid;
  gap: 3px;
}
.skill-tree-tooltip {
  position: fixed;
  z-index: 1700;
  width: min(350px, calc(100vw - 16px));
  max-height: calc(82dvh - 16px);
  overflow: auto;
  padding: 15px;
  pointer-events: auto;
  font: 12px/1.4 Tahoma, 'Microsoft JhengHei', sans-serif;
}
.skill-tree-tooltip[hidden] { display: none; }
.skill-detail-dialog {
  width: min(420px, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  margin: auto;
  padding: 15px;
  border: 0;
  font: 13px/1.4 Tahoma, 'Microsoft JhengHei', sans-serif;
}
.skill-detail-dialog::backdrop { background: #14203488; }
.skill-detail-body {
  display: grid;
  gap: 4px;
  max-height: calc(100dvh - 100px);
  overflow: auto;
}
.skill-detail-heading { font-size: 14px; }
.skill-detail-requirements {
  display: grid;
  gap: 2px;
  padding: 5px 0;
  border-top: 1px solid #aab5c1;
  border-bottom: 1px solid #aab5c1;
}
.skill-detail-requirements .met { color: #257239; }
.skill-detail-requirements .unmet { color: #a23829; }
.skill-detail-description {
  margin: 2px 0 0;
  white-space: pre-line;
}
.skill-detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #aab5c1;
}
.skill-detail-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: #1d395a;
  font: inherit;
  cursor: pointer;
}
.skill-detail-add::before {
  width: 24px;
  height: 24px;
  content: '';
  background: url('/ro/client/ui/original/status/skill_up_a.png') center / 24px 24px no-repeat;
  image-rendering: pixelated;
}
.skill-detail-add:active::before { background-image: url('/ro/client/ui/original/status/skill_up_b.png'); }
.skill-detail-add:disabled::before { background-image: url('/ro/client/ui/original/status/skill_up_c.png'); }
.skill-detail-add:disabled { cursor: default; }
@media (min-width: 700px) and (hover: hover) {
  .skill-tree-node,
  .skill-tree-empty { min-height: 96px; }
  .skill-tree-node { grid-template-rows: 20px 60px 16px; }
  .skill-tree-icon-button { width: 60px; height: 60px; }
  .skill-tree-icon-button img,
  .skill-tree-empty img { width: 56px; height: 56px; }
  .skill-tree-empty { padding-top: 22px; }
  .skill-tree-add { top: 71px; }
}
@media (max-width: 600px), (hover: none) {
  .skill-tree-add { display: none; }
  .skill-tree-node { min-height: 80px; }
  .skill-tree-tooltip { display: none; }
}
@media (max-width: 400px) {
  .skill-tree-section { padding: 14px 8px 8px; }
  .skill-tree-name { font-size: 10px; }
}
.tabs button.active {
  background-color: transparent;
  background-image:
    url('/ro/client/ui/original/tab/tab_a_l.png'),
    url('/ro/client/ui/original/tab/tab_a_r.png'),
    url('/ro/client/ui/original/tab/tab_a_m.png');
}
.panel {
  display: none;
}
.panel.active {
  display: grid;
  gap: var(--card-gap);
}
.ranking-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border-bottom: 1px solid #aab3b8;
}
.ranking-controls select {
  min-width: 150px;
  min-height: 34px;
  border: 1px solid #71859a;
  background: #fff;
}
.ranking-controls button {
  min-height: 34px;
  border: 1px solid #526a84;
  background: linear-gradient(#fff, #c6d1dc);
}
.ranking-rotation-hint {
  margin: -4px 8px 0;
  color: #4f6575;
  font-size: 11px;
  text-align: center;
}
.ranking-podium {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}
.ranking-card {
  min-width: 0;
  padding: 6px;
  border: 1px solid #9da8ad;
  background: linear-gradient(#fff, #e8ece9);
  text-align: center;
}
.ranking-card.rank-1 {
  border-color: #bd922e;
  background: linear-gradient(#fff9d8, #eee0a7);
}
.ranking-card.rank-2 {
  border-color: #82909c;
  background: linear-gradient(#fff, #d8dfe3);
}
.ranking-card.rank-3 {
  border-color: #a76c42;
  background: linear-gradient(#fff4ea, #e6c4ac);
}
.ranking-medal,
.ranking-card strong,
.ranking-card small {
  display: block;
}
.ranking-medal {
  color: #355675;
}
.ranking-card small {
  overflow: hidden;
  color: #5c696f;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ranking-character-viewport {
  position: relative;
  width: 96px;
  height: 154px;
  margin: 0 auto;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.ranking-character-viewport.dragging {
  cursor: grabbing;
}
.ranking-character-viewport:focus-visible {
  outline: 2px solid #3c78a8;
  outline-offset: 1px;
}
.ranking-character-sprite,
.ranking-character-layer {
  position: absolute;
  inset: 0;
  width: 96px;
  height: 160px;
}
.ranking-character-sprite {
  transform: scale(1.35);
  transform-origin: 50% 55%;
}
.ranking-character-layer {
  background-repeat: no-repeat;
  image-rendering: pixelated;
  contain: strict;
}
.ranking-character-unavailable {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 24px 4px;
  border: 1px dashed #9aa5a9;
  color: #69767b;
  font-size: 11px;
}
.ranking-pet-showcase {
  position: absolute;
  right: 0;
  bottom: 8px;
  width: 48px;
  height: 48px;
  background-repeat: no-repeat;
  background-size: 384px 384px;
  image-rendering: pixelated;
  pointer-events: none;
}
.ranking-appearance-unavailable .ranking-character-sprite {
  display: none;
}
.ranking-appearance-unavailable .ranking-character-unavailable {
  display: flex;
}
.ranking-card.compact .ranking-character-viewport {
  height: 110px;
}
.ranking-card.compact .ranking-character-sprite {
  transform: scale(1);
  transform-origin: 50% 20%;
}
.ranking-table-scroll {
  overflow-x: auto;
  border-top: 1px solid #aab3b8;
}
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.ranking-table th,
.ranking-table td {
  padding: 7px 9px;
  border: 1px solid #c0c7ca;
  text-align: left;
  white-space: nowrap;
}
.ranking-table th {
  background: #dce5eb;
  color: #294b68;
}
.ranking-empty {
  grid-column: 1/-1;
  padding: 20px;
  text-align: center;
}
.controls {
  display: flex;
  gap: 7px;
  padding: 8px;
}
.controls button {
  min-height: 40px;
  min-width: 130px;
  border: 1px solid #526a84;
  background: linear-gradient(#fff, #c6d1dc);
  font-weight: bold;
}
.controls .primary {
  background: linear-gradient(#dffff0, #86cfa6);
}
.controls button:disabled {
  opacity: 0.5;
}
.session-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #a0a9ad;
}
.session-grid div {
  padding: 7px 10px;
}
.session-grid span {
  display: block;
  font-size: 11px;
}
.session-grid b {
  font-size: 18px;
  color: #234765;
}
.console {
  height: 55vh;
  min-height: 390px;
  overflow: auto;
  background: #030603;
  color: #dbe9dc;
  padding: 9px;
  font:
    14px/1.48 Consolas,
    'Microsoft JhengHei',
    monospace;
}
.combat-window {
  position: relative;
  overflow: hidden;
}
.damage-float-layer {
  position: absolute;
  z-index: 6;
  inset: 29px 0 0;
  overflow: hidden;
  pointer-events: none;
  contain: layout paint;
}
.damage-float {
  position: absolute;
  z-index: 1;
  min-width: 2ch;
  color: #fff;
  font-family: var(--damage-float-family, Tahoma, Arial, sans-serif);
  font-size: var(--damage-float-size, 14px);
  font-weight: var(--damage-float-weight, 800);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    -1px -1px 0 #111,
    1px -1px 0 #111,
    -1px 1px 0 #111,
    1px 1px 0 #111;
  opacity: 0;
  transform: translate3d(-50%, 0, 0) scale(0.82);
  animation: damage-parabola 1.15s cubic-bezier(0.22, 0.7, 0.32, 1)
    var(--damage-delay, 0ms) forwards;
  will-change: transform, opacity;
}
.damage-float.total {
  z-index: 2;
  color: #ffd84d;
  text-shadow:
    -1px -1px 0 #5c3500,
    1px -1px 0 #5c3500,
    -1px 1px 0 #5c3500,
    1px 1px 0 #5c3500,
    0 0 6px rgb(255 188 30 / 75%);
}
.damage-float.critical {
  z-index: 3;
  min-width: 3.4em;
  padding: 0.7em 0.45em;
  color: #ffe253;
  font-size: calc(var(--damage-float-size, 14px) + 2px);
  text-shadow:
    -1px -1px 0 #371000,
    1px -1px 0 #371000,
    -1px 1px 0 #371000,
    1px 1px 0 #371000;
  isolation: isolate;
}
.damage-float.critical::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(145deg, #d43a22, #7e160f);
  clip-path: polygon(
    50% 0%,
    61% 22%,
    82% 8%,
    79% 34%,
    100% 43%,
    77% 55%,
    91% 79%,
    65% 74%,
    55% 100%,
    43% 76%,
    17% 91%,
    23% 63%,
    0 53%,
    24% 41%,
    8% 18%,
    37% 25%
  );
  filter: drop-shadow(0 2px 2px rgb(0 0 0 / 60%));
  content: '';
}
.damage-readable {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.official-damage-assets .has-official-digits {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: transparent;
  text-shadow: none;
}
.official-damage-assets .has-official-digits.critical {
  padding: 0;
  isolation: isolate;
}
.official-damage-assets .has-official-digits.critical::before {
  display: none;
}
.official-damage-digit {
  display: block;
  z-index: 1;
  width: auto;
  height: 1em;
  flex: 0 0 auto;
  object-fit: contain;
  image-rendering: auto;
}
.official-critical-background {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: auto;
  height: 3.6em;
  max-width: none;
  object-fit: contain;
  image-rendering: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.official-hit-rays {
  position: absolute;
  z-index: 2;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.official-hit-rays img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: calc(var(--damage-float-size, 14px) * 0.42);
  height: calc(var(--damage-float-size, 14px) * 7.5);
  max-width: none;
  opacity: 0;
  object-fit: fill;
  mix-blend-mode: screen;
  filter: brightness(1.65);
  transform: translateX(-50%) rotate(var(--hit-ray-angle)) scaleY(0.08);
  transform-origin: 50% 100%;
  animation: official-hit-ray var(--hit-ray-duration, 250ms) ease-out
    var(--hit-ray-delay, 0ms) forwards;
}
@keyframes official-hit-ray {
  0% {
    opacity: 0;
    transform: translateX(-50%) rotate(var(--hit-ray-angle)) scaleY(0.08);
  }
  18% {
    opacity: var(--damage-float-opacity, 1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) rotate(var(--hit-ray-angle)) scaleY(1);
  }
}
.damage-float.miss {
  color: #d2d7dc;
  font-style: italic;
}
@keyframes damage-parabola {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 0, 0) scale(0.82);
  }
  12% {
    opacity: var(--damage-float-opacity, 1);
  }
  56% {
    opacity: var(--damage-float-opacity, 1);
    transform: translate3d(
        calc(-50% + var(--damage-mid-x)),
        var(--damage-mid-y),
        0
      )
      scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate3d(
        calc(-50% + var(--damage-end-x)),
        var(--damage-end-y),
        0
      )
      scale(0.94);
  }
}
@media (prefers-reduced-motion: reduce) {
  .damage-float {
    animation-duration: 500ms;
  }
}
.event {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 7px;
}
.event small {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #59675e;
}
.event.route {
  color: #77dca1;
}
.event.hit {
  color: #bef4ff;
}
.event.passive-proc {
  color: #fff08a;
  font-weight: 700;
  text-shadow: 0 0 5px rgb(255 215 64 / 45%);
}
.event.active-skill {
  color: #67d7ff;
  font-weight: 700;
  text-shadow: 0 0 5px rgb(7 91 132 / 55%);
}
.event.hurt {
  color: #ff8888;
}
.event.loot {
  color: #cda9ff;
}
.event.exp {
  color: #ffe47a;
}
.event.system {
  color: #9aaba0;
}
.skill-passive-state,
.skill-quest-granted {
  display: block;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 6px;
  border: 1px solid #8d9cac;
  background: #e8edf2;
  color: #36526b;
  font-size: 11px;
}
.stat-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #aab2b7;
}
.stat-table div {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  background: #f0f1ed;
}
.notice {
  margin: 0;
  padding: 10px;
  font-size: 12px;
  color: #5f6870;
}
.hunt-action[hidden] {
  display: none !important;
}
.hunt-stats-window .notice {
  /* Keep the status row in flow while admission/Native messages change. */
  line-height: 1.5;
  min-block-size: calc(1lh + 20px);
}
.loot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #b4b9b6;
}
.loot div,
.loot p {
  margin: 0;
  padding: 12px;
  background: #f4f5f1;
}
.loot b {
  float: right;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
}
.service {
  padding: 10px;
  border: 1px solid #9da8a2;
  background: #fff;
}
.service i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b43b3b;
  margin-right: 6px;
}
.service.ok i {
  background: #28a35a;
}
.architecture {
  margin: 0 10px 10px;
  padding: 12px;
  background: #dce2dd;
}
.architecture code {
  display: block;
  margin: 8px 0;
  padding: 8px;
  background: #152019;
  color: #b6efc7;
  overflow: auto;
}
@media (max-width: 650px) {
  .desktop {
    padding: 5px var(--edge-x-right) var(--bottom-reserve) var(--edge-x);
  }
  .brand small {
    display: none;
  }
  .basic {
    grid-template-columns: 48px 1fr;
  }
  .portrait {
    width: 44px;
    height: 50px;
  }
  .vitals {
    grid-column: 1/-1;
    grid-template-columns: 128px 1fr;
  }
  .money {
    grid-column: 1/-1;
  }
  .chat-feed {
    height: 132px;
  }
  .emotion-palette {
    grid-template-columns: repeat(7, 1fr);
  }
  .chat-compose {
    gap: 2px;
    padding: 4px 3px;
  }
  .chat-compose button {
    min-width: 46px;
    padding-inline: 4px;
  }
  .tabs button {
    flex: 1;
    padding: 10px 2px;
  }
  .session-grid {
    grid-template-columns: 1fr 1fr;
  }
  .console {
    height: 57vh;
    min-height: 360px;
    font-size: 12.5px;
  }
  .stat-table,
  .loot,
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }
  .controls button {
    min-width: 0;
    flex: 1;
  }
  .event {
    grid-template-columns: max-content 1fr;
  }
}

.pet-companion-layer {
  --pet-size-effective: var(--pet-size, 72px);
  position: fixed;
  z-index: 24;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  contain: layout style paint;
}
.pet-companion-layer[hidden] {
  display: none;
}
.pet-companion {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: var(--pet-size-effective);
  height: var(--pet-size-effective);
  padding: 0;
  place-items: end center;
  border: 0;
  outline-offset: 2px;
  background: transparent;
  color: #f7fff2;
  filter: drop-shadow(0 7px 4px #14211566);
  transform-origin: 50% 100%;
  will-change: transform;
  pointer-events: none;
  touch-action: manipulation;
}
.pet-hitbox {
  grid-area: 1/1;
  align-self: end;
  justify-self: center;
  width: min(var(--pet-size-effective), 120px);
  height: min(var(--pet-size-effective), 120px);
  pointer-events: auto;
  cursor: pointer;
}
.pet-companion[data-pet-size-mode='showcase'] .pet-hitbox {
  align-self: start;
  justify-self: center;
  width: min(var(--pet-size-effective), 128px);
  height: min(var(--pet-size-effective), 128px);
  margin-top: var(--pet-hitbox-offset-y, 0);
}
.pet-companion[data-animation='walk'],
.pet-companion[data-animation='run'] {
  pointer-events: none;
}
.pet-facing {
  grid-area: 1/1;
  align-self: end;
  display: grid;
  width: var(--pet-size-effective);
  height: var(--pet-size-effective);
  place-items: end center;
  margin-bottom: 3px;
  transform-origin: 50% 100%;
  opacity: var(--pet-context-opacity, 1);
  transition: opacity 180ms ease;
}
.pet-companion[data-pet-retreating='true'] .pet-facing {
  opacity: 0.68;
}
.pet-companion[data-facing='left'] .pet-facing {
  transform: scaleX(-1);
}
.pet-shadow {
  grid-area: 1/1;
  align-self: end;
  width: 44px;
  height: 12px;
  margin-bottom: 1px;
  background: url('/assets/pets/bulbasaur/shadow.png') center / 44px 12px no-repeat;
  opacity: 0;
}
.pet-sprite {
  display: none;
  grid-area: 1/1;
  width: var(--pet-size-effective);
  height: var(--pet-size-effective);
  align-self: end;
  background-position: 0 calc(-6 * var(--pet-size-effective));
  background-repeat: no-repeat;
  background-size: calc(8 * var(--pet-size-effective)) calc(8 * var(--pet-size-effective));
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform-origin: 50% 100%;
  user-select: none;
  will-change: background-position;
}
.pet-symbol {
  display: block;
  grid-area: 1/1;
  align-self: end;
  font-size: calc(var(--pet-size-effective) * 0.61);
  line-height: 1;
  transform-origin: 50% 100%;
  user-select: none;
}
.pet-companion[data-pet-renderer='sprite'] .pet-sprite {
  display: block;
}
.pet-companion[data-pet-renderer='sprite'] .pet-symbol {
  display: none;
}
.pet-companion[data-pet-renderer='sprite'] .pet-shadow {
  opacity: 1;
}
.pet-companion[data-pet-species='terasoid'] .pet-shadow {
  display: none;
}
.pet-state {
  grid-area: 1/1;
  align-self: start;
  justify-self: end;
  min-width: 28px;
  min-height: 18px;
  color: #fff7a2;
  text-align: center;
  text-shadow: 1px 1px #223;
  font-size: 12px;
  font-weight: bold;
}
.pet-reaction-message {
  position: fixed;
  right: 12px;
  bottom: 12px;
  max-width: calc(100vw - 24px);
  padding: 5px 8px;
  border: 1px solid #40506a;
  border-radius: 4px;
  background: #f5f3e7ed;
  color: #26384f;
  box-shadow: 2px 3px 7px #18231b66;
  font-size: 12px;
}
.pet-companion[data-animation='idle'] .pet-sprite {
  background-image: var(--pet-sprite-image, url('/assets/pets/bulbasaur/idle.webp'));
  animation: pet-sprite-frames 600ms linear infinite;
}
.pet-companion[data-resting='true'][data-animation='idle'] .pet-sprite {
  animation:
    pet-sprite-frames 600ms linear infinite,
    pet-rest 3s ease-in-out infinite;
}
.pet-companion[data-animation='walk'] .pet-sprite {
  background-image: var(--pet-sprite-image, url('/assets/pets/bulbasaur/walk.webp'));
  animation: pet-sprite-frames 400ms linear infinite;
}
.pet-companion[data-pet-fallback='true'][data-animation='run'] .pet-symbol {
  animation: pet-run 0.25s ease-in-out infinite;
}
.pet-companion[data-pet-fallback='true'][data-animation='pant'] .pet-symbol {
  animation: pet-pant 0.38s ease-in-out infinite;
}
.pet-companion[data-pet-fallback='true'][data-animation='sleep'] .pet-symbol {
  animation: pet-sleep 2.8s ease-in-out infinite;
}
.pet-companion[data-pet-renderer-source='grok-v1'][data-animation='run'] .pet-sprite {
  background-image: var(--pet-sprite-image);
  animation: pet-sprite-frames 304ms linear infinite;
}
.pet-companion[data-pet-renderer-source='grok-v1'][data-animation='pant'] .pet-sprite {
  background-image: var(--pet-sprite-image);
  animation: pet-sprite-frames-6 600ms linear 1 forwards;
}
.pet-companion[data-pet-renderer-source='grok-v1'][data-animation='sleep'] .pet-sprite {
  background-image: var(--pet-sprite-image);
  animation: pet-sprite-frames-6 1800ms linear infinite;
}
.pet-companion[data-pet-species='terasoid'][data-animation='run'] .pet-sprite {
  background-image: var(--pet-sprite-image);
  animation: pet-sprite-frames 320ms linear infinite;
}
.pet-companion[data-pet-species='terasoid'][data-animation='pant'] .pet-sprite {
  background-image: var(--pet-sprite-image);
  animation: pet-sprite-frames 900ms linear infinite;
}
.pet-companion[data-pet-species='terasoid'][data-animation='sleep'] .pet-sprite {
  background-image: var(--pet-sprite-image);
  animation: pet-sprite-frames 1800ms linear infinite;
}
.pet-companion[data-animation='happy'] .pet-sprite {
  background-image: var(--pet-sprite-image, url('/assets/pets/bulbasaur/happy.webp'));
  animation: pet-sprite-frames 504ms linear 1 forwards;
}
.pet-companion[data-pet-variable-atlas='true'] .pet-sprite {
  background-size:
    calc(var(--pet-sheet-columns) * var(--pet-size-effective))
    calc(8 * var(--pet-size-effective));
}
.pet-companion[data-pet-variable-atlas='true'][data-pet-playback='loop'] .pet-sprite {
  animation: pet-sprite-variable var(--pet-animation-duration) steps(var(--pet-sheet-columns)) infinite;
}
.pet-companion[data-pet-variable-atlas='true'][data-pet-playback='once'] .pet-sprite,
.pet-companion[data-pet-variable-atlas='true'][data-pet-playback='hold'] .pet-sprite {
  animation: pet-sprite-variable var(--pet-animation-duration) steps(var(--pet-sheet-columns)) 1 forwards;
}
@keyframes pet-sprite-frames {
  0%, 12.499% { background-position-x: 0; }
  12.5%, 24.999% { background-position-x: calc(-1 * var(--pet-size-effective)); }
  25%, 37.499% { background-position-x: calc(-2 * var(--pet-size-effective)); }
  37.5%, 49.999% { background-position-x: calc(-3 * var(--pet-size-effective)); }
  50%, 62.499% { background-position-x: calc(-4 * var(--pet-size-effective)); }
  62.5%, 74.999% { background-position-x: calc(-5 * var(--pet-size-effective)); }
  75%, 87.499% { background-position-x: calc(-6 * var(--pet-size-effective)); }
  87.5%, 100% { background-position-x: calc(-7 * var(--pet-size-effective)); }
}
@keyframes pet-sprite-frames-6 {
  0%, 16.665% { background-position-x: 0; }
  16.666%, 33.332% { background-position-x: calc(-1 * var(--pet-size-effective)); }
  33.333%, 49.999% { background-position-x: calc(-2 * var(--pet-size-effective)); }
  50%, 66.665% { background-position-x: calc(-3 * var(--pet-size-effective)); }
  66.666%, 83.332% { background-position-x: calc(-4 * var(--pet-size-effective)); }
  83.333%, 100% { background-position-x: calc(-5 * var(--pet-size-effective)); }
}
@keyframes pet-sprite-variable {
  from { background-position-x: 0; }
  to { background-position-x: calc(-1 * var(--pet-sheet-columns) * var(--pet-size-effective)); }
}
@keyframes pet-idle {
  50% {
    translate: 0 -2px;
  }
}
@keyframes pet-rest {
  50% {
    scale: 1 0.92;
    translate: 0 2px;
  }
}
@keyframes pet-walk {
  50% {
    rotate: -3deg;
    translate: 0 -4px;
  }
}
@keyframes pet-run {
  50% {
    rotate: -7deg;
    translate: 0 -7px;
  }
}
@keyframes pet-pant {
  50% {
    scale: 1.04 0.96;
    translate: 0 2px;
  }
}
@keyframes pet-sleep {
  50% {
    scale: 1 0.94;
    opacity: 0.88;
  }
}
@keyframes pet-happy {
  to {
    rotate: 8deg;
    translate: 0 -9px;
  }
}
@media (max-width: 650px) {
  .pet-companion-layer {
    --pet-size-effective: min(var(--pet-size, 72px), 160px, calc(100vw - 32px));
    bottom: var(--bottom-reserve);
  }
  .pet-facing {
    margin-bottom: 3px;
  }
  .pet-reaction-message {
    right: 6px;
    bottom: var(--bottom-reserve);
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pet-companion .pet-symbol {
    animation: none !important;
  }
  .pet-companion[data-animation='idle'] .pet-sprite {
    animation: pet-sprite-frames 600ms linear infinite !important;
  }
  .pet-companion[data-animation='walk'] .pet-sprite {
    animation: pet-sprite-frames 400ms linear infinite !important;
  }
  .pet-companion[data-animation='happy'] .pet-sprite {
    animation: pet-sprite-frames 504ms linear 1 forwards !important;
  }
  .pet-companion[data-pet-variable-atlas='true'][data-pet-playback='loop'] .pet-sprite {
    animation: pet-sprite-variable var(--pet-animation-duration) steps(var(--pet-sheet-columns)) infinite !important;
  }
  .pet-companion[data-pet-variable-atlas='true'][data-pet-playback='once'] .pet-sprite,
  .pet-companion[data-pet-variable-atlas='true'][data-pet-playback='hold'] .pet-sprite {
    animation: pet-sprite-variable var(--pet-animation-duration) steps(var(--pet-sheet-columns)) 1 forwards !important;
  }
}
.hidden {
  display: none !important;
}

.world-map-overlay {
  position: fixed;
  z-index: 80;
  inset: 0;
  padding: 18px;
  background: rgb(12 20 27 / 88%);
}
.world-map-shell {
  display: grid;
  position: relative;
  width: min(1440px, 100%);
  height: 100%;
  margin: auto;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid #91a8bf;
  background: #e8edf0;
  box-shadow: 0 14px 46px #000b;
}
.world-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 5px 12px;
  color: #fff;
  background: linear-gradient(#7e9cbb, #536f8b);
}
.world-map-header h2 {
  margin: 0;
  font-size: 18px;
}
:root[data-ui-theme]:not([data-ui-theme='default']) .world-map-header {
  background: linear-gradient(var(--ui-theme-bar-top), var(--ui-theme-bar-bottom));
}
.world-map-notice {
  position: absolute;
  z-index: 2;
  top: 50px;
  right: 12px;
  max-width: min(420px, calc(100% - 24px));
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #9f655d;
  background: #fff2ef;
  color: #552c28;
  box-shadow: 0 2px 8px #0003;
  pointer-events: none;
}
.world-map-notice.hidden { display: none; }
.world-map-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 220px;
}
.world-map-stage {
  min-height: 0;
  overflow: auto;
  padding: 8px;
  background: #e8edf0;
}
.world-map-canvas {
  position: relative;
  width: min(100%, 820px);
  max-width: 1280px;
  aspect-ratio: 5 / 4;
  margin: auto;
  overflow: hidden;
  background: #d9c9a6;
  box-shadow: 0 0 0 1px #0b1611, 0 4px 18px #0008;
}
.world-map-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: none;
  user-select: none;
}
.world-map-regions {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}
.world-map-confirm {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #0009;
}
.world-map-confirm.hidden { display: none; }
.world-map-confirm-card {
  width: min(100%, 320px);
  color: #1d2a3a;
}
.world-map-confirm-body {
  padding: 12px 12px 4px;
  font-size: 13px;
}
.world-map-confirm-body p { margin: 0 0 8px; }
.world-map-confirm-question { font-weight: bold; }
.world-map-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding: 6px 8px;
  border-top: 1px solid #c3cad3;
  background: #eef1f4;
}
.world-map-arrival-toast {
  position: fixed;
  z-index: 1300;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100vw - 24px);
  padding: 9px 16px;
  background: #213329;
  color: #fff;
  border: 1px solid #c9b780;
}
.world-map-arrival-toast.hidden { display: none; }
.world-map-region {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
}
.world-map-region.selectable {
  z-index: 2;
  cursor: pointer;
}
.world-map-region[data-label-kind="red"] {
  z-index: 4;
}
.world-map-region.fogged {
  z-index: 1;
  cursor: not-allowed;
  filter: grayscale(1) brightness(0.42) saturate(0.35);
  opacity: 0.72;
}
.world-map-region-crop {
  position: absolute;
  display: none;
  overflow: hidden;
  inset: 0;
  pointer-events: none;
}
.world-map-region-preview {
  position: absolute;
  max-width: none;
  pointer-events: none;
  user-select: none;
}
.world-map-region.selectable::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 34px);
  height: max(100%, 34px);
  transform: translate(-50%, -50%);
  background: transparent;
}
.world-map-region.selectable:hover,
.world-map-region.selectable:focus-visible {
  z-index: 4;
  outline: 1px solid rgb(235 247 255 / 90%);
  outline-offset: 0;
  background: rgb(221 241 255 / 10%);
}
.world-map-region.selected {
  z-index: 3;
  outline: 2px solid #e7f5ff;
  outline-offset: -1px;
  background: transparent;
}
.world-map-region.selected .world-map-region-preview {
  filter: brightness(1.08);
}
.world-map-region.fogged .world-map-region-preview {
  filter: grayscale(1) brightness(0.42) saturate(0.35);
}
.world-map-region.current-target:not(.selected) {
  outline: 1px solid rgb(255 239 160 / 82%);
  outline-offset: -1px;
}
.world-map-region.current-location:not(.selected) {
  outline: 1px dashed rgb(255 255 255 / 75%);
  outline-offset: -2px;
}
.world-map-region[data-label-kind="red"].selected {
  z-index: 5;
}
.world-map-destinations {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 4px;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
  border: 1px solid #b7c4cd;
  background: #f6f8f9;
  color: #1d2a3a;
}
:root[data-ui-theme]:not([data-ui-theme='default']) .world-map-destinations {
  border-color: var(--ui-theme-bar-border);
  background: color-mix(in srgb, var(--ui-theme-bar-top) 14%, #f6f8f9);
}
.world-map-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.world-map-list-heading h3 {
  margin: 0;
  font-size: 15px;
}
.world-map-list-heading button {
  min-height: 32px;
  padding: 4px 9px;
}
.world-map-category-tabs {
  display: flex;
  gap: 4px;
}
.world-map-category-tabs button {
  min-width: 64px;
  min-height: 36px;
  border: 1px solid #9babb7;
  background: #e8edf0;
  color: #25394c;
}
.world-map-category-tabs button[aria-selected="true"] {
  border-color: #637e9b;
  background: #d3e2ef;
  font-weight: bold;
}
:root[data-ui-theme]:not([data-ui-theme='default'])
  .world-map-category-tabs button[aria-selected="true"] {
  border-color: var(--ui-theme-bar-border);
  background: color-mix(in srgb, var(--ui-theme-bar-top) 30%, #fff);
}
.world-map-destinations input {
  width: 100%;
  margin: 0;
}
.world-map-region-index-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 5px;
  min-height: 0;
  overflow: auto;
}
.world-map-destination {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 52px;
  padding: 5px 8px;
  text-align: center;
}
.world-map-destination[data-category="towns"] {
  min-height: 48px;
}
.world-map-destination span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.2;
}
.world-map-detail-backdrop {
  position: fixed;
  z-index: 1100;
  inset: 0;
  background: rgb(0 0 0 / 58%);
}
.world-map-detail {
  position: fixed;
  z-index: 1101;
  top: 50%;
  left: 50%;
  width: min(560px, calc(100vw - 24px));
  max-height: min(720px, calc(100dvh - 32px));
  overflow: auto;
  padding: 0 16px 16px;
  transform: translate(-50%, -50%);
  border: 1px solid #91a8bf;
  background: #f6f8f9;
  box-shadow: 0 14px 46px #0008;
}
.world-map-detail-heading {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -16px 12px;
  padding: 7px 12px;
  background: linear-gradient(#7e9cbb, #536f8b);
  color: #fff;
}
:root[data-ui-theme]:not([data-ui-theme='default']) .world-map-detail-heading {
  background: linear-gradient(var(--ui-theme-bar-top), var(--ui-theme-bar-bottom));
}
.world-map-detail-heading button {
  flex: none;
  min-height: 36px;
}
.world-map-detail h3 {
  margin: 0;
  font-size: 16px;
}
.world-map-floor-picker:empty {
  display: none;
}
.world-map-overlap-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 8px 0;
}
.world-map-overlap-choice {
  min-height: 38px;
  padding: 5px 7px;
  border: 1px solid #8ca0af;
  background: #edf2f5;
  color: #263d4c;
}
.world-map-overlap-choice[aria-pressed="true"] {
  border-color: #315f80;
  background: #527b98;
  color: #fff;
}
.world-map-floor-picker {
  margin: 10px 0;
}
.world-map-floor-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.world-map-floor-button {
  min-height: 38px;
  padding: 5px 7px;
  border: 1px solid #8ca0af;
  color: #263d4c;
  background: #edf2f5;
  font-size: 12px;
  text-align: left;
}
.world-map-floor-button:hover,
.world-map-floor-button:focus-visible {
  border-color: #4f7897;
  background: #dceaf2;
}
.world-map-floor-button.selected {
  border-color: #315f80;
  color: #fff;
  background: #527b98;
  box-shadow: inset 0 0 0 1px #c8e0ef;
}
.world-map-detail ul {
  padding-left: 20px;
}
.world-map-detail .controls {
  margin-top: 4px;
}
.world-map-teleport-info {
  margin: 6px 0 10px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
body.world-map-open {
  overflow: hidden;
}
/* Pending travel leaves every page control accessible, including on phones. */
#worldMapOverlay[data-travel-waiting='true'] {
  inset: auto 8px 8px auto;
  width: min(320px, calc(100% - 16px));
  padding: 0;
  background: transparent;
}
#worldMapOverlay[data-travel-waiting='true'] .world-map-shell {
  height: auto;
  grid-template-rows: auto auto;
}
#worldMapOverlay[data-travel-waiting='true'] .world-map-layout {
  display: none;
}
@media (max-width: 700px) {
  .world-map-overlay {
    padding: 0;
  }
  .world-map-header > button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .world-map-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(250px, 1fr) minmax(320px, 1.25fr);
  }
  .world-map-stage {
    padding: 4px;
  }
  .world-map-canvas {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .world-map-region.selectable::after {
    width: max(100%, 38px);
    height: max(100%, 38px);
  }
  .world-map-detail button {
    min-height: 44px;
    white-space: normal;
    touch-action: manipulation;
  }
  .world-map-destination {
    font-size: 12px;
  }
  .world-map-destination.long-name {
    font-size: 11px;
  }
}
/* Rainbow Bridge: Heimdall theme. Art and film live in the private
   assets/ui-themes/rainbow-bridge folder. The world map itself stays unobstructed. */
#worldMapOverlay,
#worldMapConfirm,
#worldMapDetail,
#worldMapArrivalToast {
  --bifrost-gold: #ecc97c;
  --bifrost-gold-soft: rgb(236 201 124 / 48%);
  --bifrost-ink: #fbf4e2;
  --bifrost-night: #12162e;
  --bifrost-violet: #34284f;
  --bifrost-art: url('/assets/ui-themes/rainbow-bridge/heim-musk-dall-idle.49fd488c8954.webp');
  --bifrost-glass: linear-gradient(180deg, rgb(255 255 255 / 11%), rgb(255 255 255 / 2%) 55%, rgb(255 255 255 / 5%));
  --bifrost-glass-hover: linear-gradient(180deg, rgb(255 226 160 / 24%), rgb(255 226 160 / 6%));
}
#worldMapOverlay {
  background:
    radial-gradient(ellipse at 50% -10%, rgb(120 86 168 / 45%), transparent 60%),
    rgb(7 9 20 / 93%);
}
#worldMapOverlay .world-map-shell {
  border: 1px solid var(--bifrost-gold-soft);
  background: var(--bifrost-night);
  box-shadow: 0 0 0 1px #000a, 0 18px 60px #000d, 0 0 42px rgb(236 201 124 / 12%);
}
#worldMapOverlay .world-map-header {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--bifrost-gold-soft);
  background: linear-gradient(90deg, #1a2044, var(--bifrost-violet) 50%, #1a2044);
}
#worldMapOverlay .world-map-header::after,
#worldMapConfirm .titlebar::after,
#worldMapDetail .world-map-detail-heading::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff9d9d, #ffcf7a, #fff194, #9ee7a4,
    #86cdff, #bba5ff, transparent);
  opacity: 0.7;
  pointer-events: none;
}
#worldMapOverlay .world-map-header h2 {
  color: var(--bifrost-gold);
  letter-spacing: 0.14em;
  text-shadow: 0 0 12px rgb(236 201 124 / 45%), 0 1px 0 #000;
}
#worldMapOverlay .world-map-stage {
  background:
    radial-gradient(ellipse at 50% 58%, rgb(255 196 120 / 14%), transparent 62%),
    linear-gradient(#151a36, #1c1832);
}
#worldMapOverlay .world-map-canvas {
  box-shadow: 0 0 0 1px rgb(236 201 124 / 55%), 0 0 0 4px #0009,
    0 10px 30px #000b, 0 0 38px rgb(236 201 124 / 16%);
}
#worldMapOverlay .world-map-destinations {
  position: relative;
  isolation: isolate;
  border: 0;
  border-top: 1px solid var(--bifrost-gold-soft);
  background: var(--bifrost-night);
  color: var(--bifrost-ink);
}
/* Sunset wash behind the whole panel, then Heimdall himself. */
#worldMapOverlay .world-map-destinations::before,
#worldMapOverlay .world-map-destinations::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
#worldMapOverlay .world-map-destinations::before {
  inset: -24px;
  background: var(--bifrost-art) center 12% / cover no-repeat;
  filter: blur(14px) saturate(1.25) brightness(0.72);
}
#worldMapOverlay .world-map-destinations::after {
  inset: 0;
  background:
    linear-gradient(90deg, rgb(14 17 38 / 62%) 0%, rgb(14 17 38 / 30%) 48%, rgb(14 17 38 / 0%) 76%),
    var(--bifrost-art) right 3% top -120px / 540px auto no-repeat;
}
#worldMapOverlay .world-map-list-heading h3 {
  color: var(--bifrost-gold);
  text-shadow: 0 1px 2px #000;
}
#worldMapOverlay .world-map-destination,
#worldMapOverlay .world-map-category-tabs button,
#worldMapOverlay .world-map-list-heading button,
#worldMapOverlay .world-map-header > button,
#worldMapDetail button:not(.official-skin-button) {
  border: 1px solid rgb(255 236 190 / 34%);
  border-radius: 5px;
  background: var(--bifrost-glass);
  color: var(--bifrost-ink);
  text-shadow: 0 1px 3px #000, 0 0 8px rgb(0 0 0 / 70%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 30%), inset 0 0 0 1px rgb(255 255 255 / 4%),
    0 2px 8px rgb(0 0 0 / 20%);
  backdrop-filter: blur(2.5px) saturate(1.3) brightness(1.08);
  -webkit-backdrop-filter: blur(2.5px) saturate(1.3) brightness(1.08);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
#worldMapOverlay .world-map-destination:hover,
#worldMapOverlay .world-map-destination:focus-visible,
#worldMapOverlay .world-map-category-tabs button:hover,
#worldMapOverlay .world-map-list-heading button:hover,
#worldMapOverlay .world-map-header > button:hover,
#worldMapDetail button:not(.official-skin-button):hover {
  border-color: rgb(236 201 124 / 88%);
  background: var(--bifrost-glass-hover);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 34%), 0 0 14px rgb(236 201 124 / 38%);
}
#worldMapOverlay .world-map-category-tabs button[aria-selected="true"],
#worldMapDetail .world-map-floor-button.selected,
#worldMapDetail .world-map-overlap-choice[aria-pressed="true"] {
  border-color: var(--bifrost-gold);
  background: linear-gradient(180deg, rgb(236 201 124 / 58%), rgb(176 128 58 / 42%));
  color: #fffaf0;
  font-weight: bold;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 40%), 0 0 14px rgb(236 201 124 / 34%);
}
#worldMapOverlay .world-map-destinations input {
  border: 1px solid rgb(255 236 190 / 32%);
  border-radius: 5px;
  background: rgb(8 10 26 / 28%);
  color: var(--bifrost-ink);
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
}
#worldMapOverlay .world-map-destinations input::placeholder {
  color: rgb(251 244 226 / 62%);
}
#worldMapOverlay .world-map-region-index-list {
  scrollbar-color: rgb(236 201 124 / 50%) transparent;
}
#worldMapConfirm {
  background: rgb(5 7 18 / 64%);
}
#worldMapConfirm .world-map-confirm-card {
  width: min(100%, 340px);
  overflow: hidden;
  border: 1px solid rgb(236 201 124 / 72%);
  background: var(--bifrost-night);
  color: var(--bifrost-ink);
  box-shadow: 0 0 32px rgb(236 201 124 / 20%), 0 18px 50px #000d;
}
#worldMapConfirm .titlebar,
#worldMapDetail .world-map-detail-heading {
  position: relative;
  border-bottom: 1px solid var(--bifrost-gold-soft);
  background: linear-gradient(90deg, #1a2044, var(--bifrost-violet) 50%, #1a2044);
  color: var(--bifrost-gold);
}
#worldMapConfirm .world-map-confirm-body {
  min-height: 92px;
  padding: 16px 14px 10px;
  background:
    linear-gradient(90deg, rgb(18 22 46 / 96%) 42%, rgb(18 22 46 / 45%)),
    var(--bifrost-art) right -26px top 16% / 180px auto no-repeat;
}
#worldMapConfirm .world-map-confirm-question {
  color: #fffaf0;
  text-shadow: 0 1px 2px #000;
}
#worldMapConfirm #worldMapConfirmCost {
  color: var(--bifrost-gold);
}
#worldMapConfirm .world-map-confirm-actions {
  border-top: 1px solid rgb(236 201 124 / 32%);
  background: rgb(8 10 24 / 82%);
}
#worldMapDetail {
  border: 1px solid rgb(236 201 124 / 72%);
  background:
    linear-gradient(rgb(18 22 46 / 94%), rgb(18 22 46 / 90%)),
    var(--bifrost-art) right -40px top 10% / 260px auto no-repeat,
    var(--bifrost-night);
  color: var(--bifrost-ink);
  box-shadow: 0 0 32px rgb(236 201 124 / 18%), 0 14px 46px #000d;
}
#worldMapArrivalToast {
  border: 1px solid var(--bifrost-gold);
  background: linear-gradient(90deg, #1a2044, var(--bifrost-violet), #1a2044);
  color: var(--bifrost-gold);
  box-shadow: 0 0 20px rgb(236 201 124 / 25%);
}
.world-map-travel-cinematic {
  position: fixed;
  z-index: 1250;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
}
.world-map-travel-cinematic.hidden { display: none; }
.world-map-travel-cinematic video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}
.world-map-travel-cinematic-status {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 12%;
  margin: 0;
  transform: translateX(-50%);
  color: #ecc97c;
  letter-spacing: 0.12em;
  text-shadow: 0 0 12px rgb(236 201 124 / 55%);
  animation: bifrost-status-pulse 1.6s ease-in-out infinite;
}
.world-map-travel-cinematic-status.hidden { display: none; }
/* G8L-211 bridge-hold R4（使用者裁定，示意圖 shots-heimdall/E-3.5s-stern.png）：影片停在 3.5 秒等地圖時的讀取進度條——金色、底部 12%，
   上方一行「正在進入 <地圖>　NN%」（沿用過場狀態字，不閃）；app.js paintTravelHold 寫 data-hold 與 --travel-load。 */
.world-map-travel-cinematic[data-hold] .world-map-travel-cinematic-status { bottom: calc(12% + 16px); animation: none; white-space: nowrap; }
.world-map-travel-cinematic[data-hold]::before,
.world-map-travel-cinematic[data-hold]::after {
  content: '';
  position: absolute;
  z-index: 1;
  left: 17%;
  bottom: 12%;
  width: 66%;
  height: 6px;
  border-radius: 3px;
  pointer-events: none;
}
.world-map-travel-cinematic[data-hold]::before { background: rgb(20 12 4 / 55%); box-shadow: 0 0 0 1px rgb(236 201 124 / 70%); }
.world-map-travel-cinematic[data-hold]::after {
  background: linear-gradient(90deg, #b8893a, #ecc97c);
  transform-origin: left;
  transform: scaleX(var(--travel-load, 0));
  transition: transform 0.2s linear;
}
.world-map-travel-backdrop { display: none; }
/* Desktop plays its own 16:9 film, rendered with the same camera, so the sides move,
   flash and fade with the centre. Up to 16:9 the film covers the screen. On wider
   screens it is contained, and the still backdrops fill the side bars, blurred and
   dimmed, following the film's light. */
@media (min-aspect-ratio: 1/1) and (min-width: 701px) {
  .world-map-travel-cinematic video { object-fit: cover; }
}
@media (min-aspect-ratio: 1/1) and (min-width: 701px) and (min-aspect-ratio: 16/9) {
  .world-map-travel-cinematic video { object-fit: contain; }
  .world-map-travel-cinematic[data-presentation='playing'] .world-map-travel-backdrop {
    display: block;
    position: absolute;
    inset: -40px;
    background: #000 center / cover no-repeat;
    filter: blur(24px) brightness(calc(var(--heimdall-backdrop-light, 0) * 0.7));
  }
  /* Close-up continuation, faded in while the film pushes into the face. */
  .world-map-travel-cinematic[data-presentation='playing'] .world-map-travel-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--heimdall-closeup-art, none) center / cover no-repeat;
    opacity: var(--heimdall-backdrop-closeup, 0);
  }
}
@keyframes bifrost-status-pulse {
  50% { opacity: 0.45; }
}
@media (max-width: 700px) {
  #worldMapOverlay .world-map-destinations::after {
    background:
      linear-gradient(180deg, rgb(14 17 38 / 50%) 0%, rgb(14 17 38 / 18%) 38%, rgb(14 17 38 / 42%) 100%),
      var(--bifrost-art) center 16% / 100% auto no-repeat;
  }
  .world-map-travel-cinematic video {
    object-fit: contain;
  }
}
@media (prefers-reduced-motion: reduce) {
  .world-map-travel-cinematic-status { animation: none; }
}

.auth {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px 16px;
  isolation: isolate;
  overflow: auto;
  background: #f6f7f3;
}
.auth::before,
.auth::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
}
.auth::before {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.auth.login-background-lofi-01::before {
  background-image: url('/ro/client/ui/login-background-lofi-01-wide.webp');
}
.auth.login-background-lofi-02::before {
  background-image: url('/ro/client/ui/login-background-lofi-02-wide.webp');
}
.auth.login-background-lofi-03::before {
  background-image: url('/ro/client/ui/login-background-lofi-03-wide.webp');
}
.auth.login-background-lofi-04::before {
  background-image: url('/ro/client/ui/login-background-lofi-04-wide.webp');
}
.auth.login-background-lofi-05::before {
  background-image: url('/ro/client/ui/login-background-lofi-05-wide.webp');
}
.auth.login-background-lofi-06::before {
  background-image: url('/ro/client/ui/login-background-lofi-06-wide.webp');
}
.auth.login-background-lofi-07::before {
  background-image: url('/ro/client/ui/login-background-lofi-07-wide.webp');
}
.auth.login-background-lofi-08::before {
  background-image: url('/ro/client/ui/login-background-lofi-08-wide.webp');
}
.auth.login-background-lofi-09::before {
  background-image: url('/ro/client/ui/login-background-lofi-09-wide.webp');
}
.auth.login-background-lofi-10::before {
  background-image: url('/ro/client/ui/login-background-lofi-10-wide.webp');
}
/* Lo-fi scenes: portrait phones get a dedicated tall composition. */
@media (orientation: portrait) and (max-aspect-ratio: 4/5) {
  .auth.login-background-lofi-01::before {
    background-image: url('/ro/client/ui/login-background-lofi-01-tall.webp');
  }
  .auth.login-background-lofi-02::before {
    background-image: url('/ro/client/ui/login-background-lofi-02-tall.webp');
  }
  .auth.login-background-lofi-03::before {
    background-image: url('/ro/client/ui/login-background-lofi-03-tall.webp');
  }
  .auth.login-background-lofi-04::before {
    background-image: url('/ro/client/ui/login-background-lofi-04-tall.webp');
  }
  .auth.login-background-lofi-05::before {
    background-image: url('/ro/client/ui/login-background-lofi-05-tall.webp');
  }
  .auth.login-background-lofi-06::before {
    background-image: url('/ro/client/ui/login-background-lofi-06-tall.webp');
  }
  .auth.login-background-lofi-07::before {
    background-image: url('/ro/client/ui/login-background-lofi-07-tall.webp');
  }
  .auth.login-background-lofi-08::before {
    background-image: url('/ro/client/ui/login-background-lofi-08-tall.webp');
  }
  .auth.login-background-lofi-09::before {
    background-image: url('/ro/client/ui/login-background-lofi-09-tall.webp');
  }
  .auth.login-background-lofi-10::before {
    background-image: url('/ro/client/ui/login-background-lofi-10-tall.webp');
  }
}
.auth[class*='login-background-lofi-']::after {
  background: transparent;
}
.auth-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.auth::after {
  z-index: -1;
  background: rgba(255, 255, 255, 0.3);
}
.auth-card {
  width: min(390px, 100%);
  border-color: #58697c;
  box-shadow:
    0 0 0 1px #fff,
    5px 7px 18px #27374c66;
}
.auth-body {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  background: rgba(244, 246, 243, 0.94);
}
.auth-body h1,
.auth-body p {
  margin: 0;
}
.auth-body label {
  display: grid;
  gap: 5px;
  font-weight: bold;
}
.server-picker {
  border: 1px solid #788898;
  background: #fff;
  box-shadow: inset 1px 1px #d7e0e8;
}
.server-picker-title {
  padding: 3px 7px;
  color: #fff;
  background: linear-gradient(#a8b9ce, #657d99);
  font-size: 12px;
  font-weight: bold;
}
.server-row {
  min-height: 34px;
  padding: 6px 8px;
  grid-template-columns: 18px 1fr auto !important;
  align-items: center;
  gap: 6px !important;
  background: #dce9fb;
}
.server-row input {
  width: 14px !important;
  min-height: 14px !important;
  margin: 0;
}
.server-row small {
  color: #39704b;
}
.login-fields {
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid #aeb6bc;
  background: #eef0ed;
}
.login-fields label {
  grid-template-columns: 45px 1fr;
  align-items: center;
}
.auth-body input {
  width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid #667a8d;
  background: white;
}
.auth-body fieldset {
  display: flex;
  gap: 20px;
  border: 1px solid #9aa6af;
}
.auth-body .registration-settings {
  align-items: center;
  padding: 5px 8px 7px;
  font-size: 12px;
}
.registration-settings > span {
  color: #59656e;
}
.auth-body fieldset label {
  display: flex;
  align-items: center;
  gap: 5px;
}
.auth-body fieldset input {
  width: auto;
  min-height: 0;
}
.auth-body button {
  min-height: 32px;
  border: 1px solid #37674c;
  background: linear-gradient(#dffff0, #86cfa6);
  font-weight: bold;
}
.login-actions {
  display: flex;
  justify-content: flex-end;
}
.login-actions button {
  min-width: 76px;
}
.discord-login-button {
  display: block;
  margin: 8px auto 0;
  width: auto !important;
  min-width: 160px !important;
  min-height: 28px;
  padding: 4px 10px;
  color: #315d89;
  font-size: 13px;
}
.discord-account-settings {
  display: grid;
  gap: 8px;
  padding: 10px;
}
.discord-account-settings > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.discord-avatar {
  border-radius: 50%;
  object-fit: cover;
}
.auth-body strong {
  color: #a02323;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.logout {
  margin-left: 6px;
  background: #d5dcd6;
  border: 1px solid #819086;
  padding: 5px 8px;
}
.portrait {
  overflow: hidden;
  font-size: 0;
}
.portrait img {
  max-width: 44px;
  max-height: 60px;
  image-rendering: pixelated;
}
.equipment-window {
  background: #eceee9;
}
.paperdoll-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
}
.equip-column {
  display: grid;
  gap: 5px;
  align-content: start;
}
.equip-slot {
  position: relative;
  min-height: 49px;
  padding: 6px 7px 6px 48px;
  border: 1px solid #a8b0b3;
  background: linear-gradient(#fff, #dfe3df);
  box-shadow: inset 1px 1px #fff;
}
.equip-slot::before {
  content: attr(data-icon-fallback);
  position: absolute;
  left: 6px;
  top: 6px;
  width: 34px;
  height: 34px;
  border: 1px solid #b6bcb8;
  background: #d4d9d5;
  color: #667078;
  font-size: 16px;
  line-height: 34px;
  text-align: center;
}
.equip-slot img {
  position: absolute;
  left: 7px;
  top: 7px;
  width: 32px;
  height: 32px;
  z-index: 1;
  image-rendering: pixelated;
}
.equip-slot span,
.equip-slot b {
  display: block;
}
.equip-slot span {
  font-size: 11px;
  color: #6b7478;
}
.equip-slot b {
  font-size: 13px;
  line-height: 1.35;
}
.equip-slot.equipped {
  border-color: #7187a0;
  background: linear-gradient(#fff, #d8e4ee);
}
.paperdoll-stage {
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #aab1b0;
  background: radial-gradient(circle, #fff 0, #edf0eb 58%, #d7dcd7 100%);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  overflow: hidden;
}
.paperdoll-rotation-controls {
  position: absolute;
  z-index: 2;
  top: 82px;
  left: 5px;
  right: 5px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.paperdoll-rotation-controls button {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 1px solid #87949b;
  background: linear-gradient(#fff, #d5dcdd);
  box-shadow: inset 1px 1px #fff;
  cursor: pointer;
  pointer-events: auto;
}
.paperdoll-rotation-controls button:active {
  background: #c5ced1;
}
.paperdoll-rotation-controls img {
  width: auto;
  height: auto;
  image-rendering: pixelated;
}
.paperdoll-stage:focus-visible {
  outline: 2px solid #537aa2;
  outline-offset: -3px;
}
.paperdoll-stage.dragging {
  cursor: grabbing;
}
.paperdoll-viewport {
  position: relative;
  width: 126px;
  height: 190px;
  overflow: hidden;
}
.paperdoll-sprite {
  position: absolute;
  left: 15px;
  top: -6px;
  width: 96px;
  height: 160px;
  transform: scale(1.28);
  transform-origin: 50% 50%;
}
.paperdoll-layer {
  position: absolute;
  inset: 0;
  width: 96px;
  height: 160px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  will-change: background-position;
  contain: strict;
}
.paperdoll-stage.hide-showcase-equipment .paperdoll-equipment-layer {
  visibility: hidden;
}
.paperdoll-fallback {
  display: none;
  width: auto;
  height: 164px;
  margin: 8px auto 0;
  image-rendering: pixelated;
  object-fit: contain;
}
.paperdoll-stage.showcase-fallback .paperdoll-sprite {
  display: none;
}
.paperdoll-stage.showcase-fallback .paperdoll-fallback {
  display: block;
}
.paperdoll-actions {
  display: flex;
  gap: 2px;
  margin-top: -15px;
  z-index: 1;
}
.paperdoll-actions button {
  min-width: 34px;
  padding: 2px 4px;
  border: 1px solid #89979e;
  background: linear-gradient(#fff, #d8dddc);
  color: #43505a;
  font-size: 10px;
}
.paperdoll-actions button.active {
  border-color: #54779a;
  background: linear-gradient(#dceaf6, #bfcfdf);
  color: #173e64;
}
.paperdoll-equipment-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  color: #52616a;
  font-size: 10px;
  cursor: pointer;
}
.paperdoll-equipment-toggle input {
  width: 12px;
  height: 12px;
  margin: 0;
}
.paperdoll-stage strong {
  margin-top: 4px;
}
.paperdoll-stage small {
  color: #68747a;
}
.paperdoll-stage .paperdoll-hint {
  margin-top: 2px;
  color: #7c878c;
  font-size: 10px;
}
@media (max-width: 650px) {
  .paperdoll-layout {
    grid-template-columns: 1fr 126px 1fr;
    padding: 6px;
    gap: 4px;
  }
  .paperdoll-stage {
    min-height: 265px;
  }
  .paperdoll-fallback {
    height: 135px;
  }
  .paperdoll-viewport {
    width: 116px;
    height: 178px;
  }
  .paperdoll-sprite {
    left: 10px;
    top: -4px;
    transform: scale(1.18);
  }
  .paperdoll-actions button {
    min-width: 27px;
    padding-inline: 2px;
    font-size: 9px;
  }
  .equip-slot {
    min-height: 51px;
    padding: 5px 4px 5px 38px;
  }
  .equip-slot::before {
    left: 3px;
    top: 8px;
    width: 30px;
    height: 30px;
  }
  .equip-slot img {
    left: 4px;
    top: 9px;
    width: 28px;
    height: 28px;
  }
  .equip-slot b {
    font-size: 12px;
  }
}
.window {
  background-color: #fff;
  background-image: url('/ro/client/skin/default/sysbox_bg.png');
  image-rendering: pixelated;
}
.audio-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}
.audio-settings.compact {
  grid-template-columns: 1fr auto;
  padding: 8px;
  border: 1px solid #9aa6af;
  background: #f3f4f1;
}
.audio-settings label {
  display: grid;
  grid-template-columns: 90px minmax(100px, 1fr) 44px;
  align-items: center;
  gap: 8px;
  font-weight: bold;
}
.audio-settings.compact label {
  grid-template-columns: 42px minmax(100px, 1fr) 40px;
}
.audio-settings input[type='range'] {
  accent-color: #6086b2;
}
.audio-settings select {
  min-height: 30px;
  border: 1px solid #7c8994;
  background: #fff;
  color: #263746;
}
.audio-settings output {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.audio-settings button {
  min-height: 32px;
  border: 1px solid #707b86;
  background: linear-gradient(#fff, #d4d9dd);
  font-weight: bold;
}
.audio-settings .audio-check {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 28px;
  font-weight: normal;
}
.audio-settings .audio-check input[type='checkbox'] {
  appearance: none;
  width: 13px;
  height: 13px;
  min-height: 13px;
  padding: 0;
  border: 0;
  background: transparent url('/ro/client/skin/default/checkbox_0.png')
    center/13px 13px no-repeat;
}
.audio-settings .audio-check input[type='checkbox']:checked {
  background-image: url('/ro/client/skin/default/checkbox_1.png');
}
.combat-visual-settings p {
  grid-column: 1 / -1;
  margin: 0;
  color: #52606d;
  font-size: 12px;
}
.combat-visual-settings .visual-select {
  grid-template-columns: 90px minmax(100px, 1fr);
}
.pet-settings .pet-size-setting {
  grid-column: 1 / -1;
}
.pet-settings .visual-select {
  grid-template-columns: 110px minmax(100px, 1fr);
}
.pet-settings-note {
  grid-column: 1 / -1;
  margin: 0;
  color: #52606d;
  font-size: 12px;
}
.pet-showcase-size-note {
  color: #7a4b14;
  font-weight: 700;
}
.damage-float-preview {
  grid-column: 1 / -1;
  position: relative;
  height: 420px;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid #435d72;
  background: #030603;
  contain: layout paint;
}
.damage-float-preview::after {
  position: absolute;
  z-index: 0;
  inset: 7px;
  border: 1px dashed rgb(161 190 211 / 58%);
  content: '';
  pointer-events: none;
}
.damage-preview-boundary {
  position: absolute;
  z-index: 5;
  top: 10px;
  left: 12px;
  padding: 2px 5px;
  color: #a8c2d5;
  background: rgb(3 6 3 / 82%);
  font-size: 12px;
  line-height: 1.2;
}
.damage-preview-marker {
  position: absolute;
  z-index: 4;
  width: 9px;
  height: 9px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #63d7ff;
  box-shadow: 0 0 5px rgb(99 215 255 / 90%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.damage-preview-marker.apex {
  background: #ffe052;
}
.damage-preview-marker.end {
  background: #ff7b64;
}
.damage-preview-path {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.damage-preview-path polyline {
  fill: none;
  stroke: rgb(131 215 255 / 72%);
  stroke-dasharray: 5 5;
  stroke-width: 1.5;
}
.damage-preview-reference {
  position: absolute;
  z-index: 1;
  min-width: 2ch;
  color: #6a7a6a;
  font-family: var(--damage-float-family, Tahoma, Arial, sans-serif);
  font-size: var(--damage-float-size, 14px);
  font-weight: var(--damage-float-weight, 800);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  opacity: var(--damage-float-opacity, 1);
  filter: brightness(0.56);
  transform: translateX(-50%);
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}
.damage-preview-reference:active,
.damage-float-preview.is-direct-editing .damage-preview-reference {
  cursor: grabbing;
  filter: brightness(0.9);
}
.damage-preview-resize-handle {
  position: absolute;
  z-index: 7;
  width: 28px;
  height: 28px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #315d78;
  box-shadow: 0 0 0 2px rgb(3 6 3 / 75%);
  cursor: nwse-resize;
  touch-action: none;
  transform: translate(-50%, -50%);
  user-select: none;
}
.damage-preview-resize-handle::before {
  color: #fff;
  content: '↘';
  font: 700 17px/26px Arial, sans-serif;
}
.damage-preview-reference:focus-visible,
.damage-preview-resize-handle:focus-visible {
  outline: 2px solid #63d7ff;
  outline-offset: 2px;
}
.damage-preview {
  position: absolute;
  z-index: 2;
  min-width: 2ch;
  color: #fff;
  font-family: var(--damage-float-family, Tahoma, Arial, sans-serif);
  font-size: var(--damage-float-size, 14px);
  font-weight: var(--damage-float-weight, 800);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow:
    -1px -1px 0 #111,
    1px -1px 0 #111,
    -1px 1px 0 #111,
    1px 1px 0 #111;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(-50%, 0, 0) scale(0.82);
  pointer-events: none;
}
.damage-preview.preview-running {
  animation: damage-preview-cycle 3.9s cubic-bezier(0.22, 0.7, 0.32, 1) infinite;
}
.damage-preview.preview-running.total {
  animation-delay: 1.3s;
}
.damage-preview.preview-running.critical {
  animation-delay: 2.6s;
}
@keyframes damage-preview-cycle {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 0, 0) scale(0.82);
  }
  4% {
    opacity: var(--damage-float-opacity, 1);
  }
  18% {
    opacity: var(--damage-float-opacity, 1);
    transform: translate3d(
        calc(-50% + var(--damage-mid-x)),
        var(--damage-mid-y),
        0
      )
      scale(1.08);
  }
  31% {
    opacity: 0;
    transform: translate3d(
        calc(-50% + var(--damage-end-x)),
        var(--damage-end-y),
        0
      )
      scale(0.94);
  }
  32%,
  100% {
    opacity: 0;
    transform: translate3d(
        calc(-50% + var(--damage-end-x)),
        var(--damage-end-y),
        0
      )
      scale(0.94);
  }
}
.damage-preview.total {
  color: #ffd84d;
  text-shadow:
    -1px -1px 0 #5c3500,
    1px -1px 0 #5c3500,
    -1px 1px 0 #5c3500,
    1px 1px 0 #5c3500,
    0 0 6px rgb(255 188 30 / 75%);
}
.damage-preview.critical {
  z-index: 1;
  min-width: 3.4em;
  padding: 0.7em 0.45em;
  color: #ffe253;
  font-size: calc(var(--damage-float-size, 14px) + 2px);
  text-align: center;
  isolation: isolate;
}
.damage-preview.critical::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(145deg, #d43a22, #7e160f);
  clip-path: polygon(
    50% 0%,
    61% 22%,
    82% 8%,
    79% 34%,
    100% 43%,
    77% 55%,
    91% 79%,
    65% 74%,
    55% 100%,
    43% 76%,
    17% 91%,
    23% 63%,
    0 53%,
    24% 41%,
    8% 18%,
    37% 25%
  );
  content: '';
}
.official-damage-assets .damage-preview.has-official-digits,
.official-damage-assets .damage-preview-reference.has-official-digits {
  display: flex;
}
.official-damage-assets .damage-preview.critical.has-official-digits::before {
  display: none;
}
.auth-body input[type='radio'] {
  appearance: none;
  width: 10px;
  height: 10px;
  min-height: 10px;
  border: 0;
  padding: 0;
  background: transparent url('/ro/client/skin/default/radiobtn_off.png')
    center/10px 10px no-repeat;
}
.auth-body input[type='radio']:checked {
  background-image: url('/ro/client/skin/default/radiobtn_on.png');
}
button:active {
  transform: translateY(1px);
}
.official-skin-button {
  width: 42px !important;
  min-width: 42px !important;
  height: 20px !important;
  min-height: 20px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: transparent !important;
  font-size: 0 !important;
  background-color: transparent !important;
  background-position: center !important;
  background-size: 42px 20px !important;
  background-repeat: no-repeat !important;
  image-rendering: pixelated;
}
.official-ok {
  background-image: url('/ro/client/skin/default/BTN_OK_A.png') !important;
}
.official-ok:active {
  background-image: url('/ro/client/skin/default/BTN_OK_B.png') !important;
}
.official-use {
  background-image: url('/ro/client/skin/default/BTN_use_a.png') !important;
}
.official-use:active {
  background-image: url('/ro/client/skin/default/BTN_use_b.png') !important;
}
.official-cancel {
  background-image: url('/ro/client/skin/default/btn_cancel_a.png') !important;
}
.official-cancel:active {
  background-image: url('/ro/client/skin/default/btn_cancel_b.png') !important;
}
.official-send {
  background-image: url('/ro/client/skin/default/btn_send_a.png') !important;
}
.official-send:active {
  background-image: url('/ro/client/skin/default/btn_send_b.png') !important;
}
.official-next {
  background-image: url('/ro/client/skin/default/btn_next_a.png') !important;
}
.official-next:active {
  background-image: url('/ro/client/skin/default/btn_next_b.png') !important;
}
.official-close {
  background-image: url('/ro/client/skin/default/btn_close_a.png') !important;
}
.official-close:active {
  background-image: url('/ro/client/skin/default/btn_close_b.png') !important;
}
.official-back {
  background-image: url('/ro/client/skin/default/btn_back_a.png') !important;
}
.official-back:active {
  background-image: url('/ro/client/skin/default/btn_back_b.png') !important;
}
.official-skin-button:disabled {
  opacity: 0.48;
  transform: none;
}
.npc-actions .official-skin-button {
  justify-self: end;
  text-align: center;
}
@media (max-width: 650px) {
  .audio-settings {
    grid-template-columns: 1fr;
  }
  .audio-settings label {
    grid-template-columns: 82px minmax(90px, 1fr) 42px;
  }
  .combat-visual-settings .visual-select {
    grid-template-columns: 82px minmax(90px, 1fr);
  }
  .audio-settings.compact {
    grid-template-columns: 1fr;
  }
  .audio-settings.compact label {
    grid-template-columns: 42px minmax(90px, 1fr) 40px;
  }
}
html {
  -webkit-text-size-adjust: 100%;
}
.character-create {
  grid-template-columns: 130px 1fr;
  align-items: center;
}
.create-preview {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #9ba7aa;
  background: radial-gradient(circle, #fff, #dfe3df);
}
.create-preview img {
  height: 130px;
  image-rendering: pixelated;
}
.create-fields {
  display: grid;
  gap: 12px;
}
.auth-body .create-sex {
  padding: 5px 8px 7px;
  font-size: 12px;
}
.auth-body .create-job {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px 8px;
  padding: 6px 8px 8px;
  font-size: 12px;
}
.job-group-heading {
  grid-column: 1 / -1;
  padding-top: 3px;
  color: #506678;
  border-bottom: 1px solid #b4bec4;
  font-weight: bold;
}
.create-job label {
  white-space: nowrap;
}
.character-select {
  width: min(480px, 100%);
}
.character-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.character-slot {
  position: relative;
  min-height: 226px;
  display: flex !important;
  flex-direction: column;
  align-items: center !important;
  justify-content: center;
  gap: 5px !important;
  padding: 7px;
  border: 1px solid #7e8b94;
  background: linear-gradient(#f7f8f5, #d8dedb);
  text-align: center;
}
.character-slot.selected {
  outline: 2px solid #6f91b7;
  outline-offset: -3px;
  background: radial-gradient(circle, #fff, #dce6ee);
}
.character-slot input {
  position: absolute;
  top: 7px;
  left: 7px;
  width: auto;
  min-height: 0;
}
.character-slot img {
  width: auto;
  height: 136px;
  image-rendering: pixelated;
}
.select-character-paperdoll {
  position: relative;
  width: 96px;
  height: 160px;
  overflow: hidden;
  transform: scale(1.12);
  transform-origin: 50% 55%;
}
.select-character-paperdoll .ranking-character-layer {
  display: block;
}
.character-slot span {
  display: grid;
  gap: 2px;
}
.character-slot small {
  color: #52606a;
}
.character-slot.empty {
  color: #8a9296;
  background: #d8ddda;
}
.character-select-actions {
  gap: 6px;
}
.event.drop-event {
  color: #d7b4ff;
  background: transparent !important;
}
.event.drop-event > * {
  background: transparent !important;
}
.loot-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #b4b9b6;
}
.loot-summary div,
.loot-summary p {
  margin: 0;
  padding: 7px 10px;
  background: #f4f5f1;
}
.loot-summary b {
  float: right;
}
.supply-form {
  padding: 8px;
}
.supply-form input[type='number'] {
  width: 72px;
  min-height: 32px;
  border: 1px solid #7a8b99;
  background: #fff;
  text-align: right;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.check-row input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: #4f7194;
}
.supply-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.supply-grid > label {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid #b2bcc1;
  background: #f2f3ef;
}
.supply-route,
.supply-window .notice {
  margin: 7px 0 0;
  color: #53616b;
}
.supply-rules {
  margin-top: 8px;
  border: 1px solid #9ba9b2;
  background: #f8f8f4;
}
.supply-rules > summary {
  padding: 7px;
  color: #2868a7;
  cursor: pointer;
  font-weight: bold;
}
#supplyRuleList {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 300px;
  overflow: auto;
  border-top: 1px solid #b2bcc1;
}
.supply-rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  align-items: center;
  gap: 5px;
  padding: 6px;
  border-right: 1px solid #c1c8cb;
  border-bottom: 1px solid #c1c8cb;
}
.supply-rule-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.supply-rule-row select {
  min-height: 32px;
  min-width: 0;
}
.config-editor {
  padding: 8px;
}
.config-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.config-panel h4,
.config-group h5 {
  margin: 0;
}
.config-editor-status {
  color: #53616b;
  font-size: 12px;
  text-align: left;
}
.config-tabs {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.config-panel {
  padding: 7px;
  border: 1px solid #9ba9b2;
  background: #f8f8f4;
}
.config-panel h4 {
  padding-bottom: 5px;
  color: #31567e;
  border-bottom: 1px solid #b2bcc1;
}
.config-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}
.config-group h5 {
  grid-column: 1 / -1;
  color: #53616b;
  font-size: 12px;
}
.config-field,
.config-array-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 34px;
  padding: 4px 6px;
  border: 1px solid #c1c8cb;
  background: #eef1ee;
}
.config-field input:not([type='checkbox']),
.config-field select,
.config-array-field input {
  min-width: 0;
  width: 112px;
  min-height: 28px;
  border: 1px solid #7a8b99;
  background: #fff;
}
.config-field input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: #4f7194;
}
.config-array {
  margin-top: 8px;
  border: 1px solid #9ba9b2;
  background: #f2f3ef;
}
.config-array > summary,
.config-migration > summary {
  padding: 7px;
  color: #2868a7;
  cursor: pointer;
  font-weight: bold;
}
.config-array-list {
  display: grid;
  gap: 5px;
  padding: 6px;
  border-top: 1px solid #b2bcc1;
}
.config-array-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 4px;
  padding: 5px;
  border: 1px solid #c1c8cb;
  background: #fff;
}
.config-array-field {
  display: grid;
  align-items: start;
  justify-content: stretch;
  font-size: 11px;
}
.config-array-field input {
  width: 100%;
  box-sizing: border-box;
}
.config-add,
.config-remove,
.config-profile-apply {
  min-height: 29px;
  margin: 6px;
  border: 1px solid #65768a;
  background: linear-gradient(#fff, #cbd4dc);
  color: #1f3954;
  font: inherit;
  font-weight: bold;
}
.config-remove {
  align-self: end;
  margin: 0;
}
.config-migration {
  margin-top: 8px;
  border: 1px solid #9ba9b2;
  background: #fff;
}
.config-migration p {
  margin: 0;
  padding: 4px 7px;
  border-top: 1px solid #d2d7d8;
  font-size: 11px;
}
.config-warning {
  color: #a12c24;
  font-weight: bold;
}
.config-disabled {
  color: #68727a;
  background: #e5e8e7;
}
.config-disabled input,
.config-disabled select,
.config-disabled button {
  cursor: not-allowed;
  opacity: 0.7;
}
.config-capability-status {
  color: #8a3d25;
  font-size: 11px;
  margin: 3px 6px;
}
.config-editor-actions {
  justify-content: flex-end;
  margin-top: 8px;
}
@media (max-width: 560px) {
  .supply-grid,
  #supplyRuleList {
    grid-template-columns: 1fr 1fr;
  }
  .supply-rule-row {
    grid-template-columns: minmax(0, 1fr) 112px;
  }
}
.status-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #aab2b7;
}
.base-stats,
.derived-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #aab2b7;
}
.base-stats div,
.derived-stats div {
  min-height: 39px;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  background: #f0f1ed;
}
.base-stats small {
  color: #6a7378;
}
.base-stats button {
  width: 28px;
  height: 26px;
  border: 1px solid #657990;
  background: linear-gradient(#fff, #ccd7df);
  font-weight: bold;
}
.derived-stats div {
  grid-template-columns: 1fr auto;
}
.inventory-tabs {
  display: flex;
  border-bottom: 1px solid #7f8b94;
  background: #d9dddf;
}
.inventory-tabs button {
  padding: 7px 15px;
  border: 0;
  border-right: 1px solid #8c969d;
  background: #cbd1d4;
}
.inventory-tabs button.active {
  background: #fff;
  font-weight: bold;
}
.inventory-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #aeb5b7;
  min-height: 90px;
}
.inventory-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  background: #f7f8f5;
}
.inventory-item img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
}
.inventory-item .item-icon {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid #b6bcb8;
  background: #e1e5e1;
  color: #667078;
  font-size: 15px;
  line-height: 30px;
  text-align: center;
}
.item-icon-missing {
  background:
    linear-gradient(135deg, transparent 46%, #c2c8c4 47% 53%, transparent 54%),
    #e9ece9;
  color: #59636b;
  font-weight: 700;
}
.inventory-item .item-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #f7f8f5;
}
.card-art-trigger {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  margin: -1px;
  padding: 1px;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: zoom-in;
}
.card-art-trigger .item-icon {
  flex: none;
  pointer-events: none;
}
.card-art-trigger:focus-visible {
  outline: 1px dotted #243d5c;
  outline-offset: 1px;
}
.card-art-preview {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}
/* Original RO description frame: Default Skin sysbox 9-slice pieces
   (14x14 corners/edges + tiled center). Verified official client assets. */
.card-art-preview-panel {
  position: fixed;
  display: flex;
  flex-direction: column;
  width: min(300px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  padding: 14px 14px 16px;
  border: 0;
  background-color: #f4f5f1;
  background-image:
    url('/ro/client/skin/default/sysbox_bg.png'),
    url('/ro/client/skin/default/sysbox_mu.png'),
    url('/ro/client/skin/default/sysbox_md.png'),
    url('/ro/client/skin/default/sysbox_lm.png'),
    url('/ro/client/skin/default/sysbox_rm.png'),
    url('/ro/client/skin/default/sysbox_lu.png'),
    url('/ro/client/skin/default/sysbox_ru.png'),
    url('/ro/client/skin/default/sysbox_ld.png'),
    url('/ro/client/skin/default/sysbox_rd.png');
  background-position:
    left top,
    left top, left bottom, left top, right top,
    left top, right top, left bottom, right bottom;
  background-repeat:
    repeat,
    repeat-x, repeat-x, repeat-y, repeat-y,
    no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: 14px 14px;
  image-rendering: pixelated;
  color: #26384f;
}
.card-art-preview-titlebar {
  min-height: 20px;
  margin: 0 0 6px;
}
.ro-item-detail-body {
  display: grid;
  gap: 5px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(72dvh, 520px);
  overflow: auto;
}
.ro-item-detail-name {
  margin: 0;
  color: #1c3b64;
  font: 700 13px/1.35 Tahoma, 'Microsoft JhengHei', sans-serif;
  word-break: break-word;
}
.ro-item-detail-stats,
.ro-item-detail-requirements {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #26384f;
  font: 11px/1.4 Tahoma, 'Microsoft JhengHei', sans-serif;
}
.ro-item-detail-stats[hidden],
.ro-item-detail-requirements[hidden],
.ro-item-detail-art[hidden] {
  display: none;
}
.ro-item-detail-stats li {
  display: flex;
  gap: 6px;
}
.ro-item-detail-stats li > span {
  min-width: 62px;
  color: #52606a;
}
.ro-item-detail-requirements li {
  color: #6b5126;
}
.ro-item-detail-art {
  display: grid;
  justify-items: center;
  gap: 3px;
}
.ro-item-detail-art--dedicated .ro-item-detail-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(300px, 44dvh);
  object-fit: contain;
  background: #fff;
  image-rendering: auto;
}
.ro-item-detail-art--fallback .ro-item-detail-image {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
  background: #f7f8f5;
}
.ro-item-detail-art--missing .ro-item-detail-image {
  display: none;
}
.ro-item-detail-art-badge {
  display: block;
  padding: 1px 6px 2px;
  background: rgb(38 56 79 / 8%);
  color: #52606a;
  font: 10px/1.3 Tahoma, 'Microsoft JhengHei', sans-serif;
}
.ro-item-detail-art-badge[hidden] {
  display: none;
}
.card-art-preview-close {
  display: none;
  width: 42px;
  height: 20px;
  min-width: 42px;
  padding: 0;
  border: 0;
  background: transparent url('/ro/client/skin/default/btn_close_a.png') center / 42px 20px no-repeat;
  box-shadow: none;
}
.card-art-preview-close:active {
  background-image: url('/ro/client/skin/default/btn_close_b.png');
}
.card-art-preview small {
  display: block;
  padding: 4px 6px 0;
  color: #52606a;
  font: 11px/1.35 Tahoma, 'Microsoft JhengHei', sans-serif;
}
.item-detail-description {
  max-height: 132px;
  margin: 0;
  padding: 7px 8px 3px;
  overflow: auto;
  white-space: pre-line;
  color: #23354a;
  font: 12px/1.45 Tahoma, 'Microsoft JhengHei', sans-serif;
}
.card-art-preview:not(.mobile) .item-detail-description:empty,
.card-art-preview:not(.mobile) #cardArtPreviewAction {
  display: none;
}
.card-art-preview.mobile #cardArtPreviewAction {
  display: block;
  margin: 6px auto 2px;
  /* G8L-201: show the action label on the unchanged skin button; !important only to beat
     .official-skin-button's own !important color: transparent / font-size: 0. */
  color: #23354a !important;
  font-size: 10px !important;
  line-height: 20px;
  white-space: nowrap;
}
.card-art-preview.mobile {
  display: grid;
  place-items: center;
  padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  background: rgb(0 0 0 / 58%);
  pointer-events: auto;
}
.card-art-preview.mobile .card-art-preview-panel {
  position: relative;
  left: auto !important;
  top: auto !important;
  width: min(300px, 82vw);
  max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
.card-art-preview.mobile .card-art-preview-close {
  display: block;
  width: 44px;
  height: 44px;
  min-width: 44px;
  background-size: 42px 20px;
}
.card-art-preview.mobile img {
  max-height: calc(100dvh - 76px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
.card-merge-dialog {
  position: fixed;
  inset: 0;
  z-index: 1210;
  display: grid;
  place-items: center;
  padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  background: rgb(0 0 0 / 58%);
}
.card-merge-dialog.hidden {
  display: none;
}
.card-merge-panel {
  width: min(420px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: hidden;
  border: 1px solid #657990;
  background: #f4f5f1;
  color: #26384f;
}
.card-merge-titlebar {
  min-height: 20px;
}
.card-merge-titlebar .card-art-preview-close {
  display: block;
  margin-left: auto;
}
.card-merge-help {
  margin: 0;
  padding: 8px;
  border-bottom: 1px solid #aeb8be;
  font-size: 12px;
}
.card-merge-list {
  display: grid;
  max-height: min(420px, calc(100dvh - 150px));
  overflow: auto;
}
.card-merge-candidate {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 5px 8px;
  border: 0;
  border-bottom: 1px solid #b7c0c5;
  background: #f7f8f5;
  color: #142940;
  text-align: left;
}
.card-merge-candidate:active,
.card-merge-candidate:focus-visible {
  background: #dbe8f1;
}
.card-merge-candidate .item-icon {
  position: relative;
  flex: 0 0 34px;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border: 1px solid #b6bcb8;
  line-height: 30px;
  text-align: center;
}
.card-merge-candidate .item-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  background: #f7f8f5;
}
.card-merge-candidate span,
.card-merge-candidate small {
  display: block;
}
.card-merge-empty {
  margin: 0;
  padding: 20px 12px;
  text-align: center;
}
.card-merge-panel footer {
  display: flex;
  justify-content: center;
  padding: 7px;
  border-top: 1px solid #aeb8be;
}
.inventory-item span,
.inventory-item small {
  display: block;
}
.inventory-empty {
  grid-column: 1/-1;
  padding: 20px;
  text-align: center;
  background: #f7f8f5;
  color: #687278;
}
.appearance-controls {
  align-items: start;
}
.appearance-control {
  display: grid;
  gap: 4px;
}
.appearance-stepper {
  display: grid;
  grid-template-columns: 38px minmax(54px, 1fr) 38px;
  align-items: center;
  gap: 4px;
}
.appearance-stepper output {
  text-align: center;
  font-weight: bold;
  white-space: nowrap;
}
.auth-body .skin-step {
  width: 38px;
  height: 24px;
  padding: 0;
  border: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  image-rendering: pixelated;
}
.auth-body .skin-step-left {
  background-image: url('/ro/client/skin/default/btn_back_a.png');
}
.auth-body .skin-step-left:active {
  background-image: url('/ro/client/skin/default/btn_back_b.png');
}
.auth-body .skin-step-right {
  background-image: url('/ro/client/skin/default/btn_next_a.png');
}
.auth-body .skin-step-right:active {
  background-image: url('/ro/client/skin/default/btn_next_b.png');
}
.quest-controls {
  border-top: 0;
}
.eden-milestones {
  display: grid;
  gap: 1px;
  padding: 1px 1px 1px 18px;
  background: #aab2b7;
}
.eden-milestone {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid transparent;
  background: #f5f6f2;
  color: inherit;
  text-align: left;
}
.eden-milestone:not(:disabled) {
  cursor: pointer;
}
.eden-milestone.selected {
  border-color: #4f759a;
  background: #dce9f5;
}
.eden-milestone > span {
  color: #315d89;
  font-weight: bold;
}
.eden-milestone > small {
  color: #6a747b;
}
.eden-milestone > .eden-milestone-detail,
.eden-milestone > .eden-milestone-reward {
  grid-column: 1 / -1;
  white-space: normal;
  line-height: 1.35;
}
.eden-milestone > .eden-milestone-reward {
  color: #4d674d;
}
.eden-milestone > b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #777;
  font-weight: normal;
}
.eden-milestone.complete > b {
  color: #39794a;
  font-weight: bold;
}
.eden-milestone.available > b {
  color: #315d89;
  font-weight: bold;
}
.eden-controls {
  border-top: 0;
}
@media (max-width: 650px) {
  .desktop {
    font-size: 13px;
  }
  .brand b {
    font-size: 16px;
  }
  .brand > div:last-child {
    display: flex;
    align-items: center;
    gap: 3px;
  }
  .quick-audio,
  .logout {
    margin-left: 0;
    padding: 5px 7px;
  }
  .quick-audio {
    min-width: 32px;
    min-height: 32px;
  }
  .basic {
    padding: 5px;
    grid-template-columns: 44px 126px 1fr;
    gap: 5px;
  }
  .identity b {
    font-size: 14px;
  }
  .vitals {
    grid-column: auto;
    grid-template-columns: 105px 1fr;
    gap: 2px 5px;
  }
  .money {
    grid-column: 2/-1;
  }
  .controls button {
    min-height: 34px;
  }
  .session-grid div {
    padding: 5px 7px;
  }
  .session-grid b {
    font-size: 16px;
  }
  .console {
    height: 50vh;
    min-height: 330px;
    padding: 6px;
    font-size: 12px;
  }
  .loot-summary,
  .inventory-list {
    grid-template-columns: 1fr 1fr;
  }
  .config-group {
    grid-template-columns: 1fr;
  }
  .config-array-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .config-remove {
    grid-column: 1 / -1;
  }
  .status-layout {
    grid-template-columns: 1fr;
  }
  .character-create {
    grid-template-columns: 105px 1fr;
  }
  .create-preview {
    min-height: 160px;
  }
  .create-preview img {
    height: 110px;
  }
  .event {
    grid-template-columns: max-content 1fr;
    gap: 5px;
  }
}
.minimap-wrap {
  position: relative;
  background: #050805;
  padding: 6px;
}
.minimap-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.map-legend {
  position: absolute;
  left: 10px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: calc(100% - 20px);
  padding: 3px 6px;
  background: #071009cc;
  color: #ccd7cf;
  font-size: 11px;
}
.map-legend .you {
  color: #50ffb1;
}
.map-legend .monster {
  color: #f4a7d2;
}
.map-legend .engaged {
  color: #ff4f62;
}
.map-legend .player {
  color: #70b8ff;
}
.map-legend .npc {
  color: #c873ff;
}
.map-legend .portal {
  color: #ff9854;
}
.map-info-source {
  padding: 7px 9px;
  border-bottom: 1px solid #9ea8ad;
  background: #eef1ee;
  color: #52606a;
  font-size: 12px;
}
.map-monster-list {
  display: grid;
  gap: 1px;
  background: #aab2b7;
}
.monster-entry,
.drop-entry {
  background: #f5f6f2;
}
.monster-entry > summary,
.drop-entry > summary {
  cursor: pointer;
  list-style: none;
}
.monster-entry > summary::-webkit-details-marker,
.drop-entry > summary::-webkit-details-marker {
  display: none;
}
.monster-entry > summary {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
}
.monster-entry > summary::before,
.drop-entry > summary::before {
  content: '＋';
  color: #315d89;
  font-weight: bold;
}
.monster-entry[open] > summary::before,
.drop-entry[open] > summary::before {
  content: '－';
}
.monster-entry > summary {
  grid-template-columns: 16px 38px minmax(100px, 1fr) auto auto;
}
.monster-icon-slot {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #69747b;
}
.monster-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
}
.monster-entry > summary small {
  color: #58636b;
}
.monster-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 8px 8px;
  background: #b4b9bc;
}
.monster-stats span {
  padding: 5px 7px;
  background: #fff;
  font-size: 12px;
}
.monster-drops {
  margin: 0 8px 8px;
  border: 1px solid #9ca8ae;
}
.drop-entry + .drop-entry {
  border-top: 1px solid #c2c7c9;
}
.drop-entry > summary {
  display: grid;
  grid-template-columns: 16px 30px minmax(100px, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 38px;
  padding: 4px 8px;
}
.drop-entry img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
}
.drop-entry .item-icon {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  border: 1px solid #b6bcb8;
  background: #e1e5e1;
  color: #667078;
  font-size: 13px;
  line-height: 26px;
  text-align: center;
}
.drop-entry .item-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #fff;
}
[data-stat] {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
[data-stat][data-stat-hold='active'] {
  filter: brightness(0.92);
}
.drop-rate {
  color: #315d89;
  font-weight: bold;
}
.drop-description {
  padding: 8px 12px 10px 60px;
  border-top: 1px solid #d0d4d5;
  background: #fff;
  white-space: pre-line;
}
.drop-description p {
  margin: 0 0 5px;
}
.drop-description small {
  color: #52606a;
}
@media (max-width: 650px) {
  .card-art-trigger {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    margin: -6px;
    padding: 6px;
  }
  .tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 4px 4px max(4px, env(safe-area-inset-bottom));
    margin: 0;
    overflow: visible;
  }
  .tabs button {
    min-width: 0;
    padding: 8px 2px;
  }
  .desktop {
    padding-bottom: var(--bottom-reserve);
  }
  .monster-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .drop-description {
    padding-left: 12px;
  }
}
.inventory-item[data-bin-id] {
  cursor: pointer;
}
.inventory-item.pending {
  opacity: 0.55;
  pointer-events: none;
}
.inventory-item.card-selected {
  outline: 2px solid #3a6ea5;
  outline-offset: -2px;
  background: #dbeaff;
}
.basic {
  grid-template-columns: 150px 1fr;
}
.money {
  grid-column: 1/-1;
}
.stat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
}
.stat-actions button {
  min-height: 32px;
  border: 1px solid #657990;
  background: linear-gradient(#fff, #ccd7df);
  font-weight: bold;
}
.stat-actions .notice {
  padding: 0;
}
.skill-reset-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 7px;
  font: 12px/1.4 'Microsoft JhengHei', sans-serif;
}
.skill-reset-action button {
  width: 119px;
  height: 60px;
  border: 0;
  background: transparent url('/ro/client/ui/original/status/reset-a.png') 0 0 / 119px 60px no-repeat;
  color: transparent;
  image-rendering: pixelated;
  cursor: pointer;
}
.skill-reset-action button:active {
  background-image: url('/ro/client/ui/original/status/reset-b.png');
}
.skill-reset-action button:disabled {
  background-image: url('/ro/client/ui/original/status/reset-c.png');
  cursor: default;
}
.skill-reset-action output { font-weight: bold; }
.character-reset-confirm {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 8px;
}
.character-reset-confirm.hidden { display: none; }
.character-reset-confirm-window {
  position: relative;
  width: 280px;
  height: 120px;
  max-width: 100%;
  transform: scale(2);
  background: #fff url('/ro/client/skin/default/win_msgbox.png') center / 280px 120px no-repeat;
  color: #263954;
  image-rendering: pixelated;
  font: 11px/1.3 Tahoma, 'Microsoft JhengHei', sans-serif;
}
.character-reset-confirm-copy {
  position: absolute;
  top: 24px;
  left: 14px;
  right: 14px;
  display: grid;
  gap: 3px;
}
.character-reset-confirm-copy strong { font-weight: bold; }
.character-reset-confirm-actions {
  position: absolute;
  right: 12px;
  bottom: 3px;
  display: flex;
  gap: 6px;
}
.character-reset-confirm-actions button:focus-visible {
  outline: 1px solid #244c8a;
  outline-offset: 1px;
}
@media (max-width: 600px) {
  .character-reset-confirm-window { transform: scale(1.25); }
}
@media (max-width: 360px) {
  .character-reset-confirm-window { transform: scale(1.05); }
}
.base-stats button {
  touch-action: none;
  user-select: none;
}
@media (max-width: 650px) {
  .basic {
    grid-template-columns: 106px minmax(0, 1fr);
    align-items: start;
  }
  .vitals {
    grid-column: auto;
    grid-template-columns: 110px minmax(0, 1fr);
    font-size: 11px;
  }
  .exp-bar > span {
    font-size: 9px;
    letter-spacing: -0.15px;
  }
  .identity b {
    font-size: 12px;
  }
  .money {
    grid-column: 1/-1;
  }
  .auth {
    align-items: center;
    padding: 9px;
  }
  .auth::before {
    background-size: auto 100%;
  }
  .auth-card {
    max-height: calc(100vh - 18px);
    overflow: auto;
  }
  .ranking-podium {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ranking-card.rank-1 {
    grid-column: 1/-1;
  }
  .ranking-controls {
    display: grid;
    grid-template-columns: auto 1fr auto;
  }
  .ranking-controls select {
    min-width: 0;
    width: 100%;
  }
  #loginSubmit {
    width: 84px !important;
    min-width: 84px !important;
    height: 40px !important;
    min-height: 40px !important;
    background-size: 84px 40px !important;
    touch-action: manipulation;
  }
}

.support-debug-banner {
  align-items: center;
  background: #402b13;
  border: 1px solid #d99a3d;
  border-radius: 6px;
  color: #ffe7bd;
  display: flex;
  gap: 0.75rem;
  margin: 0.5rem 0;
  padding: 0.55rem 0.8rem;
}
.support-debug-banner button { margin-left: auto; }

/* Second-level tabs (掛機 監控/設定, 掛機設定 categories, 系統設定).
   Same RO look as the chat channel strip; scrolls horizontally on phones. */
.ro-subtabs {
  display: flex;
  overflow-x: auto;
  /* Size from the parent so eight tabs scroll instead of widening the page. */
  contain: inline-size;
  min-width: 0;
  scrollbar-width: thin;
  border: 1px solid #748394;
  background: #cbd2d6;
}
.ro-subtabs button {
  flex: 0 0 auto;
  min-width: 64px;
  min-height: 32px;
  padding: 4px 14px;
  border: 0;
  border-right: 1px solid #91a0aa;
  border-bottom: 2px solid transparent;
  background: linear-gradient(#eef1f2, #c4ccd1);
  color: #24394d;
  font-size: 13px;
  cursor: pointer;
}
.ro-subtabs button.active {
  border-bottom-color: #356da3;
  background: #fff;
  color: #173f70;
  font-weight: bold;
}
[data-subtab-group][hidden],
.config-panel[hidden] {
  display: none !important;
}
.config-setting-tabs {
  margin-top: 0;
}
/* 掛機 toolbar: 監控/設定 on the left, hunting actions on the right. */
.hunt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border: 1px solid #748394;
  background: #cbd2d6;
}
.hunt-toolbar > .ro-subtabs {
  contain: none;
  flex: 0 0 auto;
  border: 0;
}
.hunt-actions {
  display: flex;
  gap: 4px;
  padding: 3px 4px;
}
.hunt-action {
  min-height: 24px;
  padding: 1px 10px;
  border: 1px solid #405b79;
  background: linear-gradient(#fff, #cbd4dc);
  color: #1f3954;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
}
.hunt-action.primary {
  background: linear-gradient(#e9fff2, #9fd8b7);
}
.hunt-action:disabled {
  opacity: 0.55;
  cursor: default;
}
#game .log-titlebar > span:not(:first-child) {
  font-weight: normal;
  font-size: 12px;
}
.log-map-position {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hunt-stats-window .session-grid {
  border-top: 0;
}
/* 本次掛機統計: target lives in the titlebar; eight stats in two rows of four. */
#game .hunt-stats-window .titlebar > .hunt-target {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: normal;
  font-size: 12px;
}
#game .hunt-stats-window .session-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
#game .hunt-stats-window .session-grid div {
  padding: 4px 8px;
  min-width: 0;
}
#game .hunt-stats-window .session-grid span {
  font-size: 11px;
  color: #5f6870;
}
#game .hunt-stats-window .session-grid b {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Loot cells: long names truncate before the amount. Phones use three
   columns; wide screens use eight, aligned with the stat row above. */
#game .hunt-stats-window .loot-summary div {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
  border-bottom: 1px solid #dde1e3;
}
#game .hunt-stats-window .loot-summary {
  gap: 0;
  background: #f4f5f1;
}
#game .hunt-stats-window .loot-summary span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#game .hunt-stats-window .loot-summary b {
  float: none;
  white-space: nowrap;
}
#game .hunt-stats-window .loot-summary p {
  grid-column: 1 / -1;
}
@media (max-width: 720px) {
  #game .hunt-stats-window .loot-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #game .hunt-stats-window .loot-summary div {
    padding: 5px 6px;
  }
  #game .hunt-stats-window .loot-summary div:not(:nth-child(3n + 1)) {
    border-left: 1px solid #dde1e3;
  }
}
@media (min-width: 721px) {
  #game .hunt-stats-window .session-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  #game .hunt-stats-window .session-grid div + div {
    border-left: 1px solid #dde1e3;
  }
  #game .hunt-stats-window .loot-summary {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  #game .hunt-stats-window .loot-summary div,
  #game .hunt-stats-window .loot-summary p {
    padding: 3px 8px;
  }
  #game .hunt-stats-window .loot-summary div:not(:nth-child(8n + 1)) {
    border-left: 1px solid #dde1e3;
  }
}
.hunt-stats-window .loot-summary {
  border-top: 1px solid #a0a9ad;
}
@media (max-width: 520px) {
  .hunt-action {
    min-height: 32px;
    padding: 2px 8px;
  }
  .ro-subtabs button {
    min-width: 48px;
    padding: 4px 6px;
  }
  /* Eight setting categories as a 4x2 grid: no sideways scrolling. */
  .config-setting-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }
  .config-setting-tabs button {
    min-width: 0;
    padding: 4px 2px;
  }
  .config-setting-tabs button:nth-child(n + 5) {
    border-top: 1px solid #91a0aa;
  }
}
body.heimdall-transfer-active { overflow: hidden; overscroll-behavior: none; }
.world-map-travel-cinematic { touch-action: none; overscroll-behavior: none; }
.world-map-travel-cinematic-status { max-width: 90vw; width: max-content; text-align: center; overflow-wrap: anywhere; }

/* G8L-211 r13b: push stream dropped -> full-viewport lock; the screen underneath stays visible but inert. */
.connection-lock {
  position: fixed; inset: 0; z-index: 2147483000; box-sizing: border-box; width: 100%; height: 100dvh; max-width: 100vw;
  display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden;
  background: rgba(8, 12, 20, 0.55); pointer-events: auto; cursor: wait; outline: none;
}
.connection-lock.hidden { display: none; }
.connection-lock-box {
  box-sizing: border-box; width: min(92vw, 420px); max-width: 100%; padding: 22px 20px; text-align: center;
  color: #f4f7fb; background: rgba(18, 24, 38, 0.92); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 10px;
  overflow-wrap: anywhere; word-break: break-word;
}
.connection-lock-box strong { display: block; margin: 12px 0 6px; font-size: 1.1rem; line-height: 1.4; }
.connection-lock-box p { margin: 0; font-size: 0.95rem; line-height: 1.5; }
.connection-lock-dots { display: inline-flex; gap: 8px; height: 14px; align-items: center; }
.connection-lock-dots i {
  display: block; width: 10px; height: 10px; border-radius: 50%; background: #8fc6ff;
  animation: connection-lock-dot 1.2s ease-in-out infinite;
}
.connection-lock-dots i:nth-child(2) { animation-delay: 0.2s; }
.connection-lock-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes connection-lock-dot { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) {
  .connection-lock-dots i { animation: none; opacity: 0.8; }
}

/* G8L-211 full-bleed: with black-translucent the page sits behind the status bar, so the login-page top-right
   controls keep clear of it. `body` raises specificity because ro-ui-kit.css (protected, unchanged) loads after this file. */
body .auth-audio { top: calc(12px + env(safe-area-inset-top)); }
body .auth-server-status { top: calc(18px + env(safe-area-inset-top)); }

/* G8L-211 bottom gap: iOS 26 lays a black-translucent home-screen app out one status bar short of the screen while the page is shorter than
   the screen, and fixed content stops at that short edge. A page one status bar taller gets the full screen; 100lvh caps it so nothing scrolls.
   Not gated on display-mode: WebKit answers it from the manifest, which says "browser", so `standalone` never matches here. */
html { min-height: min(100lvh, calc(100% + env(safe-area-inset-top))); }
