:root {
  --game-design-width: min(100vw, 480px);
  --cultivation-entry-accent: #d6b56b;
  --cultivation-entry-muted: #9f947a;
  --cultivation-entry-border: rgba(204, 164, 82, 0.48);
  color-scheme: dark;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  background: #090a08;
  color: #ddd2b8;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
[role="button"] {
  touch-action: manipulation;
}

@media all {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* 世界五域框架：仅以文字和边框表达地域结构，不承载地图玩法。 */
.region-selection-panel {
  display: grid;
  width: min(100%, 720px);
  margin: auto;
  padding: clamp(16px, 4vw, 26px);
  gap: 16px;
  border: 1px solid rgba(194, 151, 70, 0.28);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(35, 34, 26, 0.94), rgba(16, 19, 15, 0.97));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.region-selection-panel__heading {
  text-align: center;
}

.region-selection-panel__heading h2 {
  margin: 0 0 8px;
  color: #d8b66e;
  font-size: clamp(20px, 5vw, 26px);
}

.region-selection-panel__subtitle span {
  display: block;
}

.region-selection-panel__heading p,
.region-guidance,
.region-selection-status {
  margin: 0;
  color: #a9a18c;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.region-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  grid-template-areas:
    ". north ."
    "west central east"
    ". south .";
  gap: 9px 12px;
  padding: 12px;
  border: 1px solid rgba(194, 151, 70, 0.18);
  border-radius: 10px;
  background: rgba(8, 11, 8, 0.38);
}

.region-map-node {
  min-height: 46px;
  padding: 7px 8px;
  border: 1px solid rgba(178, 147, 88, 0.32);
  border-radius: 7px;
  background: rgba(31, 32, 25, 0.84);
  color: #bdb298;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.region-map-node:hover,
.region-map-node:focus-visible,
.region-map-node.is-selected {
  border-color: rgba(215, 174, 89, 0.72);
  background: rgba(107, 82, 37, 0.38);
  color: #f0d58f;
  outline: none;
}

.region-map-node.is-unavailable,
.region-map-node.is-unavailable:hover,
.region-map-node.is-unavailable:focus-visible {
  border-color: rgba(118, 115, 105, 0.2);
  background: rgba(24, 25, 22, 0.62);
  color: #66645e;
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.72;
}

.region-detail {
  padding: 13px 14px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 9px;
  background: rgba(21, 23, 18, 0.7);
}

.region-detail h4,
.region-detail p {
  margin: 0;
}

.region-detail p {
  margin-top: 6px;
  color: #aaa18b;
  font-size: 13px;
}

.region-detail h4 {
  margin-top: 0;
  color: #c7ad75;
  font-size: 13px;
}

.region-sect-slots {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.region-sect-slots li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  border-bottom: 1px solid rgba(151, 132, 92, 0.16);
  color: #aaa18b;
  font-size: 13px;
}

.region-sect-slots li:last-child {
  border-bottom: 0;
}

.region-sect-slot__position {
  color: #817967;
  text-align: right;
}

.region-sect-slot__name {
  color: #d3bd8b;
}

.region-sect-slot__specialty {
  color: #9f947a;
  white-space: nowrap;
}

.region-selection-status[data-state="error"] {
  color: #d88672;
}

.region-confirm-button {
  width: min(100%, 260px);
  justify-self: center;
}

@media all {
  .region-selection-panel {
    padding: 14px;
  }

  .region-map {
    grid-template-columns: repeat(3, minmax(66px, 1fr));
    gap: 7px;
    padding: 9px;
  }

  .region-map-node {
    min-height: 42px;
    padding-inline: 4px;
    font-size: 12px;
  }
}

body.is-battle-view-open {
  overflow: hidden;
}

.battle-view {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  overflow: hidden;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  background:
    radial-gradient(circle at 50% 42%, rgba(113, 88, 47, 0.22), transparent 32%),
    linear-gradient(180deg, rgba(7, 9, 8, 0.98), rgba(14, 12, 9, 0.99));
  place-items: center;
}

.battle-view.is-visible {
  animation: battle-view-enter 220ms ease-out both;
}

.battle-view__stage {
  position: relative;
  display: grid;
  width: min(100%, 480px);
  height: 100%;
  min-height: 100dvh;
  max-height: 100dvh;
  grid-template-rows: auto minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 7px;
  padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
  border-inline: 1px solid rgba(169, 137, 75, 0.2);
  background:
    linear-gradient(rgba(13, 15, 12, 0.8), rgba(13, 12, 10, 0.88)),
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(186, 146, 73, 0.025) 23px 24px);
  box-shadow: 0 0 48px rgba(0, 0, 0, 0.68);
}

.battle-view__header {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(189, 151, 80, 0.28);
  color: #a99b7d;
  font-size: 11px;
}

.battle-view__header strong {
  color: #dec486;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.battle-combatant {
  position: relative;
  display: grid;
  min-height: 0;
  align-items: center;
  gap: 7px 11px;
  padding: 10px 12px;
  border: 1px solid rgba(154, 129, 78, 0.3);
  border-radius: 10px;
  background: rgba(22, 23, 18, 0.76);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.battle-combatant--enemy {
  grid-template-columns: minmax(0, 1fr) minmax(78px, 26%);
}

.battle-combatant--player {
  grid-template-columns: minmax(78px, 26%) minmax(0, 1fr);
}

.battle-combatant--enemy .battle-combatant__identity,
.battle-combatant--enemy .battle-gauges {
  grid-column: 1;
}

.battle-combatant--enemy .battle-combatant__art {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.battle-combatant--player .battle-combatant__identity,
.battle-combatant--player .battle-gauges {
  grid-column: 2;
}

.battle-combatant--player .battle-combatant__art {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.battle-combatant__identity {
  align-self: end;
}

.battle-combatant__identity span,
.battle-combatant__identity strong {
  display: block;
}

.battle-combatant__identity span {
  color: #887e68;
  font-size: 10px;
}

.battle-combatant__identity strong {
  overflow: hidden;
  margin-top: 2px;
  color: #e2cf9f;
  font-size: clamp(15px, 4.5vw, 19px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-combatant__art {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 104px;
  aspect-ratio: 3 / 4;
  align-self: center;
  border: 1px solid rgba(190, 153, 82, 0.38);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 36%, rgba(187, 149, 75, 0.2), transparent 40%),
    #181914;
  color: #ae9668;
  font-size: 24px;
  place-items: center;
  transition: transform 140ms ease-out;
}

.battle-combatant__art img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.battle-combatant--enemy.is-attacking .battle-combatant__art {
  transform: translateY(12px) scale(1.02);
}

.battle-combatant--player.is-attacking .battle-combatant__art {
  transform: translateY(-12px) scale(1.02);
}

.battle-combatant.is-hit {
  border-color: rgba(190, 92, 73, 0.72);
  background: rgba(65, 29, 23, 0.74);
  animation: battle-hit-shake 260ms ease-in-out;
}

.battle-gauges {
  display: grid;
  align-self: start;
  gap: 8px;
}

.battle-gauge__track {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(157, 139, 103, 0.24);
  border-radius: 999px;
  background: #10110e;
}

.battle-gauge__track i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transition: width 240ms ease-out;
}

.battle-gauge--hp .battle-gauge__track i {
  background: linear-gradient(90deg, #782f2a, #bd5b45);
}

.battle-gauge--spirit .battle-gauge__track i {
  background: linear-gradient(90deg, #31557e, #5e91b9);
}

.battle-damage-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.battle-damage-number {
  position: absolute;
  top: 34%;
  left: 50%;
  color: #ff856c;
  font-family: system-ui, sans-serif;
  font-size: 19px;
  font-weight: 800;
  text-shadow: 0 2px 5px #000;
  transform: translateX(-50%);
  animation: battle-damage-float 520ms ease-out both;
}

.battle-damage-number--critical {
  color: #ffd56b;
  font-size: 22px;
  text-shadow: 0 2px 5px #000, 0 0 10px rgba(213, 155, 48, 0.72);
}

.battle-damage-number--miss {
  color: #c4c7c9;
  font-size: 16px;
  white-space: nowrap;
}

.battle-view__versus {
  color: #c8a65e;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 4px;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 14px rgba(190, 140, 51, 0.36);
}

.battle-view__result {
  position: absolute;
  z-index: 5;
  inset: 50% auto auto 50%;
  display: grid;
  width: min(270px, calc(100% - 44px));
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(204, 164, 79, 0.62);
  border-radius: 10px;
  background: rgba(17, 18, 14, 0.97);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.7);
  text-align: center;
  transform: translate(-50%, -50%);
  animation: battle-result-enter 180ms ease-out both;
}

.battle-view__result strong {
  color: #e6c875;
  font-size: 22px;
}

.battle-view__result.is-fail strong {
  color: #d98e7e;
}

.battle-view__result span {
  color: #aaa18e;
  font-size: 12px;
}

.battle-view__result button {
  min-height: 38px;
  margin-top: 4px;
}

@keyframes battle-view-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes battle-hit-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  55% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

@keyframes battle-damage-float {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.85); }
  20% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -34px) scale(1); }
}

@keyframes battle-result-enter {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-height: 680px) {
  .battle-view__stage {
    gap: 4px;
    padding-block: 6px;
  }

  .battle-combatant {
    padding: 7px 10px;
  }

  .battle-combatant__art {
    max-width: 76px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .battle-view *,
  .battle-view *::before,
  .battle-view *::after {
    scroll-behavior: auto !important;
    animation-duration: 20ms !important;
    transition-duration: 20ms !important;
  }
}

/* V1.6.1：上下对战表现层。战斗单位数据仍由 battleServer 提供。 */
.battle-view__stage {
  isolation: isolate;
  width: min(100vw, 480px, 56.25dvh);
  height: auto;
  min-height: 0;
  max-height: none;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: max(8px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom));
  background-color: #0d0e0b;
  background-image:
    linear-gradient(180deg, rgba(5, 7, 7, 0.42), rgba(9, 10, 8, 0.2) 45%, rgba(5, 6, 5, 0.5)),
    var(--battle-background-image, none),
    radial-gradient(circle at 50% 48%, rgba(128, 99, 48, 0.18), transparent 46%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.battle-team {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 0;
  place-items: center;
}

.battle-team--opponent {
  grid-row: 1 / span 2;
}

.battle-team--player {
  grid-row: 4 / span 2;
}

.battle-formation {
  display: grid;
  width: min(100%, 410px);
  height: 100%;
  min-height: 0;
  align-items: center;
  justify-items: center;
  transition: width 180ms ease;
}

.battle-formation[data-unit-count="0"] {
  visibility: hidden;
}

.battle-formation[data-unit-count="1"] {
  width: min(34%, 140px);
  grid-template-columns: minmax(0, 1fr);
}

.battle-formation[data-unit-count="2"] {
  width: min(68%, 280px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.battle-formation[data-unit-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.battle-formation[data-positioned="true"] {
  width: min(100%, 410px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.battle-formation[data-positioned="true"] .battle-combatant {
  grid-row: 1;
}

.battle-combatant {
  display: grid;
  width: 100%;
  max-width: 136px;
  min-height: 0;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto auto;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.battle-combatant .battle-gauges {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  gap: 3px;
  align-self: end;
}

.battle-combatant .battle-combatant__art {
  grid-column: 1;
  width: 58%;
  max-width: 78px;
  justify-self: center;
  border-color: rgba(190, 153, 82, 0.5);
  background: rgba(17, 19, 16, 0.76);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  transition: transform var(--battle-attack-duration, 140ms) ease-out;
}

.battle-combatant--opponent-side .battle-combatant__art {
  grid-row: 3;
}

.battle-combatant--player-side .battle-combatant__art {
  grid-row: 2;
  margin-top: 30px;
}

.battle-combatant__art img {
  transform: none;
}

.battle-combatant__art.is-empty {
  background:
    linear-gradient(180deg, rgba(148, 118, 63, 0.06), rgba(9, 11, 9, 0.38)),
    rgba(17, 19, 16, 0.7);
}

.battle-combatant__name {
  grid-column: 1;
  overflow: hidden;
  color: #ead7a5;
  font-size: clamp(11px, 3.4vw, 14px);
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 2px 5px #000;
  white-space: nowrap;
}

.battle-combatant--opponent-side .battle-combatant__name {
  grid-row: 2;
}

.battle-combatant--player-side .battle-combatant__name {
  grid-row: 3;
}

.battle-status-list {
  display: flex;
  min-width: 0;
  min-height: 19px;
  grid-column: 1;
  grid-row: 4;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-top: 2px;
}

.battle-status-list[hidden] {
  display: flex !important;
  visibility: hidden;
}

.battle-status-icon {
  position: relative;
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(213, 178, 105, 0.62);
  border-radius: 4px;
  background: rgba(82, 104, 71, 0.88);
  color: #f0e1b9;
  font: 700 10px/1 "Microsoft YaHei", sans-serif;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.42);
  cursor: pointer;
}

.battle-status-icon[data-category="debuff"] {
  border-color: rgba(201, 102, 82, 0.76);
  background: rgba(111, 49, 41, 0.9);
  color: #ffd1c4;
}

.battle-status-icon[data-category="special"] {
  border-color: rgba(119, 147, 190, 0.72);
  background: rgba(44, 62, 91, 0.9);
  color: #d7e4ff;
}

.battle-status-icon__remaining {
  position: absolute;
  right: -3px;
  bottom: -4px;
  min-width: 11px;
  padding: 1px 2px;
  border-radius: 6px;
  background: #161813;
  color: #f4e0a8;
  font-size: 8px;
  line-height: 1;
  text-align: center;
}

.battle-status-icon--overflow {
  width: auto;
  min-width: 22px;
  padding: 0 3px;
  font-size: 9px;
}

.battle-status-dialog {
  z-index: 330;
}

.battle-status-dialog__content {
  width: min(300px, calc(var(--game-design-width) - 36px));
}

.battle-status-dialog__content p {
  margin: 14px 0 8px;
  color: #c5bda8;
  font-size: 13px;
  line-height: 1.7;
}

.battle-status-dialog__content > span {
  display: block;
  color: #d8b665;
  font-size: 12px;
}

.battle-gauge__track {
  height: 6px;
  border-color: rgba(224, 208, 173, 0.3);
  background: rgba(5, 7, 6, 0.84);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.48);
}

.battle-view__controls {
  position: absolute;
  z-index: 6;
  top: max(10px, env(safe-area-inset-top));
  right: 10px;
  display: flex;
  align-items: center;
  gap: 0;
}

.battle-flee-control[hidden] {
  display: none;
}

.battle-flee-dialog {
  z-index: 320;
}

.battle-flee-dialog__content {
  width: min(290px, calc(var(--game-design-width) - 36px));
}

.battle-flee-dialog__content p {
  margin: 14px 0;
  color: #aaa18e;
  font-size: 12px;
  line-height: 1.65;
}

.battle-round-control,
.battle-flee-control,
.battle-skip-control,
.battle-speed-control {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(198, 159, 80, 0.26);
  border-radius: 999px;
  background: rgba(8, 10, 8, 0.68);
  color: #d7bd7d;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 4px #000;
}

.battle-speed-control {
  min-width: 42px;
  border-color: rgba(203, 168, 92, 0.4);
  color: #dec684;
}

.battle-flee-control {
  min-width: 48px;
  border-color: rgba(190, 140, 72, 0.58);
  color: #d8bd82;
}

.battle-skip-control {
  min-width: 48px;
  border-color: rgba(203, 168, 92, 0.24);
  color: rgba(215, 189, 125, 0.58);
}

.battle-skip-control:not(:disabled) {
  border-color: rgba(224, 183, 83, 0.82);
  background: rgba(117, 82, 17, 0.82);
  color: #ffe38f;
  box-shadow: 0 0 10px rgba(220, 172, 55, 0.28);
}

.battle-speed-control:disabled,
.battle-flee-control:disabled,
.battle-skip-control:disabled {
  cursor: default;
  opacity: 0.58;
}

.battle-damage-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.battle-view__action {
  position: absolute;
  z-index: 4;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.battle-action-label {
  position: absolute;
  top: var(--battle-action-y, 50%);
  left: var(--battle-action-x, 50%);
  min-width: max-content;
  padding: 3px 9px;
  border: 1px solid rgba(229, 192, 105, 0.52);
  border-radius: 999px;
  background: rgba(18, 16, 11, 0.82);
  color: #f0d78d;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 4px #000;
  animation: battle-action-pop 420ms ease-out both;
}

.battle-combatant.is-hit {
  border-color: transparent;
  background: transparent;
  animation: none;
}

.battle-combatant.is-hit .battle-combatant__art {
  filter: brightness(1.35) saturate(1.2);
  animation: battle-hit-shake var(--battle-hit-duration, 260ms) ease-in-out;
}

.battle-combatant--opponent-side.is-attacking .battle-combatant__art {
  transform: translateY(10px) scale(1.02);
}

.battle-combatant--player-side.is-attacking .battle-combatant__art {
  transform: translateY(-10px) scale(1.02);
}

.battle-damage-number {
  top: 32%;
  min-width: max-content;
  font-size: clamp(12px, 3.2vw, 15px);
  line-height: 1;
  white-space: nowrap;
}

.battle-damage-number--critical {
  font-size: clamp(13px, 3.6vw, 17px);
}

@keyframes battle-action-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) translateY(0) scale(0.88); }
  22% { opacity: 1; transform: translate(-50%, -50%) translateY(calc(var(--battle-action-travel-y) * 0.2)) scale(1.04); }
  72% { opacity: 1; transform: translate(-50%, -50%) translateY(calc(var(--battle-action-travel-y) * 0.7)) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) translateY(var(--battle-action-travel-y)) scale(0.96); }
}

@media (max-height: 680px) {
  .battle-view__stage {
    padding-block: 5px;
  }

  .battle-combatant {
    gap: 3px;
    padding: 0;
  }

}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(114, 86, 36, 0.18), transparent 36%),
    linear-gradient(180deg, #12130f, #080907);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

html[data-network-boot="pending"] #app {
  display: none !important;
}

html[data-network-boot="pending"] .network-gateway[hidden] {
  display: grid !important;
}

.network-gateway {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  overflow-y: auto;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 18%, rgba(147, 105, 45, 0.22), transparent 34%),
    linear-gradient(180deg, #12130f, #080907);
  place-items: center;
}

.network-gateway__panel,
.network-prologue__content {
  display: grid;
  width: min(100%, 430px);
  gap: 16px;
  padding: 28px 24px;
  border: 1px solid rgba(194, 151, 70, 0.34);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(35, 34, 26, 0.96), rgba(15, 18, 14, 0.98));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.52);
}

.network-gateway__panel h1,
.network-prologue h1 {
  margin: 0;
  color: #dec079;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
}

.network-gateway__eyebrow {
  margin: 0;
  color: #92876e;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-align: center;
}

.network-account-form {
  display: grid;
  gap: 13px;
}

.network-account-form[hidden],
.network-session-resume[hidden] {
  display: none;
}

.network-session-resume {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(194, 151, 70, 0.32);
  border-radius: 9px;
  background: rgba(12, 15, 11, 0.68);
  text-align: center;
}

.network-session-resume p,
.network-session-resume small {
  margin: 0;
  color: #a99f88;
}

.network-session-resume strong {
  color: #ead492;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.network-account-form > label {
  display: grid;
  gap: 7px;
  color: #b9ad92;
  font-size: 13px;
}

.network-account-form input[type="text"],
.network-account-form input[type="password"] {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #51482f;
  border-radius: 6px;
  outline: none;
  background: #10130f;
  color: #eee4cc;
}

.network-account-form input:focus {
  border-color: #ad8a45;
  box-shadow: 0 0 0 3px rgba(173, 138, 69, 0.12);
}

.network-register-entry {
  border-color: rgba(218, 174, 85, 0.72);
  background: linear-gradient(180deg, rgba(112, 79, 28, 0.72), rgba(64, 47, 21, 0.86));
  color: #f0d493;
  box-shadow: inset 0 0 0 1px rgba(255, 222, 145, 0.08);
}

.network-server-list {
  display: grid;
  gap: 10px;
}

.network-server-card {
  display: grid;
  min-height: 72px;
  padding: 12px 16px;
  border: 1px solid rgba(189, 150, 74, 0.4);
  border-radius: 8px;
  background: rgba(36, 35, 27, 0.86);
  color: #d8bd82;
  font: inherit;
  text-align: left;
}

.network-server-card strong {
  font-size: 17px;
}

.network-server-card span {
  color: #9c927b;
  font-size: 12px;
}

.network-prologue {
  display: grid;
  width: 100%;
  min-height: calc(100dvh - 48px);
  place-items: center;
}

.network-prologue__content {
  width: min(100%, 620px);
  padding-block: 34px;
}

.network-prologue__body {
  display: grid;
  gap: 9px;
}

.network-prologue__body p {
  margin: 0;
  color: #c0b79f;
  font-size: 14px;
  line-height: 1.9;
  text-align: center;
}

.network-prologue__enter {
  width: min(100%, 240px);
  margin-top: 8px;
  justify-self: center;
}

.network-character-create__portrait {
  display: grid;
  width: clamp(150px, 52vw, 210px);
  height: clamp(200px, 69.333vw, 280px);
  min-height: 0;
  aspect-ratio: 3 / 4;
  justify-self: center;
  overflow: hidden;
  border: 1px dashed rgba(194, 151, 70, 0.28);
  border-radius: 8px;
  background: rgba(9, 12, 9, 0.45);
  color: #6f6858;
  font-size: 13px;
  place-items: center;
}

.network-gender-options {
  display: grid;
  padding: 0;
  border: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.network-gender-options legend {
  margin-bottom: 8px;
  color: #b9ad92;
  font-size: 13px;
  grid-column: 1 / -1;
}

.network-gender-options label {
  padding: 10px;
  border: 1px solid rgba(194, 151, 70, 0.25);
  border-radius: 6px;
  color: #b9ad92;
  text-align: center;
}

.network-gateway__status {
  position: fixed;
  bottom: max(32px, calc(env(safe-area-inset-bottom) + 24px));
  left: 50%;
  width: min(calc(100% - 32px), 430px);
  margin: 0;
  color: #b3a78c;
  font-size: 13px;
  text-align: center;
  transform: translateX(-50%);
}

.network-gateway__filing {
  position: fixed;
  z-index: 1;
  bottom: max(7px, env(safe-area-inset-bottom));
  left: 50%;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  transform: translateX(-50%);
}

.network-gateway__filing a {
  color: #827967;
  text-decoration: none;
}

.network-gateway__filing a:hover,
.network-gateway__filing a:focus-visible {
  color: #c5a967;
  text-decoration: underline;
}

.network-gateway__status[data-state="error"] {
  color: #df8b78;
}

.network-gateway__status[data-state="success"] {
  color: #b9d58b;
}

.network-gateway.is-busy {
  cursor: progress;
}

.network-logout-button {
  min-width: 58px;
  padding: 3px 6px;
  border: 1px solid rgba(194, 151, 70, 0.3);
  border-radius: 999px;
  background: rgba(28, 28, 22, 0.84);
  color: #a89a7d;
  font-size: 9px;
  white-space: nowrap;
}

@media (max-width: 360px) {
  .network-gateway__panel,
  .network-prologue__content {
    padding-inline: 17px;
  }

  .network-prologue__body p {
    font-size: 13px;
  }
}

@media (max-height: 720px) {
  .network-gateway {
    place-items: start center;
  }
}

.notice-layer {
  position: fixed;
  z-index: 100;
  top: 46%;
  left: 50%;
  display: grid;
  width: min(calc(100% - 40px), 400px);
  pointer-events: none;
  transform: translate(-50%, -50%);
  place-items: center;
}

.game-notice {
  min-width: min(260px, 100%);
  max-width: 100%;
  padding: 16px 22px;
  border: 1px solid rgba(216, 181, 107, 0.58);
  border-radius: 9px;
  background: rgba(19, 20, 16, 0.96);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.52);
  color: #e6cf99;
  font-size: 17px;
  line-height: 1.7;
  text-align: center;
  white-space: pre-line;
  animation: notice-fade-in 280ms ease-out both;
}

.game-notice--success {
  border-color: rgba(207, 164, 72, 0.72);
  color: #f0cd78;
  box-shadow: 0 12px 38px rgba(140, 96, 24, 0.3);
}

.game-notice--fail {
  border-color: rgba(183, 91, 73, 0.7);
  color: #e3a092;
}

.game-notice--system {
  border-color: rgba(151, 139, 105, 0.58);
  color: #d8ccb0;
}

.game-notice--reward {
  border-color: rgba(112, 159, 94, 0.68);
  color: #b7d69d;
}

.game-notice--battle {
  border-color: rgba(143, 124, 178, 0.64);
  color: #cbbce2;
}

.game-notice.is-leaving {
  animation: notice-fade-out 280ms ease-in both;
}

@keyframes notice-fade-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes notice-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.98);
  }
}

.reward-notice-layer {
  position: fixed;
  z-index: 99;
  top: calc(82px + env(safe-area-inset-top));
  left: 50%;
  display: flex;
  width: min(100%, 480px);
  padding: 0 12px;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
  transform: translateX(-50%);
}

.toast-layer {
  top: calc(72px + env(safe-area-inset-top));
}

.reward-notice {
  width: fit-content;
  max-width: min(78%, 280px);
  padding: 8px 11px;
  border: 1px solid rgba(112, 159, 94, 0.46);
  border-radius: 7px;
  background: rgba(17, 23, 16, 0.94);
  box-shadow: 0 7px 22px rgba(0, 0, 0, 0.34);
  color: #b7d69d;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
  animation: reward-notice-in 220ms ease-out both;
}

.toast-notice--system {
  border-color: rgba(151, 139, 105, 0.5);
  background: rgba(25, 25, 21, 0.96);
  color: #d8ccb0;
}

.toast-notice--success {
  border-color: rgba(197, 155, 72, 0.58);
  background: rgba(38, 31, 20, 0.96);
  color: #e7c878;
}

.toast-notice--fail {
  border-color: rgba(183, 91, 73, 0.58);
  background: rgba(39, 23, 20, 0.96);
  color: #dfa095;
}

.reward-notice.is-leaving {
  animation: reward-notice-out 280ms ease-in both;
}

@keyframes reward-notice-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reward-notice-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-notice,
  .game-notice.is-leaving,
  .reward-notice,
  .reward-notice.is-leaving {
    animation-duration: 1ms;
  }
}

.game-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: rgba(12, 14, 11, 0.94);
  border-inline: 1px solid rgba(194, 151, 70, 0.16);
  box-shadow: 0 0 48px rgba(0, 0, 0, 0.45);
}

.game-header {
  display: flex;
  min-height: 38px;
  padding: 6px 12px;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px solid rgba(194, 151, 70, 0.22);
  background: linear-gradient(145deg, rgba(50, 45, 29, 0.72), rgba(17, 20, 15, 0.92));
}

.label {
  margin: 0 0 6px;
  color: #9c8e70;
  font-size: 12px;
  letter-spacing: 0.2em;
}

.game-header h1 {
  flex: 0 0 auto;
  margin: 0;
  color: #d9b66f;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.game-header__subtitle {
  flex: 0 1 auto;
  margin: 0;
  color: #8f856f;
  font-size: 10px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.build-badge {
  display: inline-block;
  flex: 0 0 auto;
  padding: 2px 6px;
  margin: 0 0 0 auto;
  border: 1px solid rgba(194, 151, 70, 0.28);
  border-radius: 999px;
  color: #9e9277;
  font-size: 9px;
  line-height: 1.35;
  white-space: nowrap;
}

.status {
  margin: 0;
  color: #aaa086;
  font-size: 14px;
}

.status:empty {
  display: none;
}

.status[data-state="success"] {
  color: #9fbd85;
}

.status[data-state="error"] {
  color: #d88672;
}

.game-content {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.player-interface {
  display: grid;
  gap: 10px;
}

.role-card,
.page-panel {
  padding: 18px;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(35, 34, 26, 0.9), rgba(19, 22, 17, 0.94));
}

.role-card h2,
.page-panel h2 {
  margin: 0 0 10px;
  color: #d3ad62;
  font-size: 20px;
}

.role-card p,
.page-panel p {
  margin: 0;
  color: #aaa38f;
  line-height: 1.7;
}

.role-card--compact {
  padding: 10px 12px;
}

.cultivate-panel {
  padding: 12px;
}

.cultivate-character-stage {
  display: grid;
  width: 100%;
  height: 340px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 34%, rgba(183, 143, 66, 0.12), transparent 44%),
    rgba(8, 11, 8, 0.42);
  color: #706852;
  font-size: 14px;
  letter-spacing: 0.18em;
}

.cultivate-character-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cultivate-character-stage > span {
  pointer-events: none;
}

.breakthrough-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.breakthrough-actions.is-guaranteed {
  grid-template-columns: minmax(0, 1fr);
}

.manual-cultivation-button {
  display: grid;
  width: 100%;
  min-height: 52px;
  margin-top: 10px;
  place-content: center;
  gap: 3px;
  text-align: center;
}

.manual-cultivation-button small {
  color: rgba(255, 245, 219, 0.72);
  font-size: 11px;
}

.breakthrough-action-button {
  display: grid;
  min-height: 64px;
  padding: 9px 10px;
  place-content: center;
  text-align: center;
}

.breakthrough-action-button strong,
.breakthrough-action-button small {
  display: block;
}

.breakthrough-action-button strong {
  font-size: 16px;
  font-weight: 600;
}

.breakthrough-action-button small {
  margin-top: 4px;
  color: rgba(255, 245, 219, 0.72);
  font-size: 11px;
}

.breakthrough-action-button small b {
  font-weight: 500;
}

.cultivate-info-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(194, 151, 70, 0.18);
  border-radius: 9px;
  background: rgba(10, 13, 10, 0.38);
}

.cultivate-info-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cultivate-info-heading h2 {
  margin: 0;
  font-size: 17px;
}

.cultivation-progress-block {
  margin-top: 16px;
}

.cultivation-progress-block .progress-label strong {
  color: #c6ad73;
  font-size: 13px;
  font-weight: 500;
}

.cultivation-progress-block progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #0d100c;
}

.cultivation-progress-block progress::-webkit-progress-bar {
  background: #0d100c;
}

.cultivation-progress-block progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #7e5c24, #d0a653);
}

.cultivation-progress-block progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #7e5c24, #d0a653);
}

.qi-sea-progress-block progress::-webkit-progress-value {
  background: linear-gradient(90deg, #485f50, #8fae82);
}

.qi-sea-progress-block progress::-moz-progress-bar {
  background: linear-gradient(90deg, #485f50, #8fae82);
}

.cultivate-support-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.cultivate-support-stats > div {
  padding: 10px;
  border: 1px solid rgba(194, 151, 70, 0.13);
  border-radius: 7px;
  background: rgba(15, 17, 13, 0.52);
}

.cultivate-support-stats span,
.cultivate-support-stats strong {
  display: block;
}

.cultivate-support-stats span {
  color: #857d69;
  font-size: 11px;
}

.cultivate-support-stats strong {
  margin-top: 5px;
  color: #cbb47e;
  font-size: 14px;
  font-weight: 500;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-heading .label {
  display: block;
}

.section-heading h2 {
  margin-bottom: 0;
}

.cultivate-state {
  max-width: 9.5rem;
  padding: 5px 8px;
  border: 1px solid #4f4a34;
  border-radius: 999px;
  color: #9fab88;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.cultivate-state[data-state="full"] {
  border-color: #936b36;
  color: #e1b666;
}

.cultivate-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.cultivate-metrics > div {
  padding: 12px;
  border: 1px solid rgba(194, 151, 70, 0.16);
  border-radius: 7px;
  background: rgba(12, 15, 11, 0.48);
}

.cultivate-metrics span,
.progress-label,
.pill-panel span {
  color: #857d69;
  font-size: 12px;
}

.cultivate-metrics strong {
  display: block;
  margin-top: 6px;
  color: #dbc388;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.cultivate-progress-block {
  margin-top: 18px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress-label b {
  color: #b9a575;
  font-weight: 500;
}

.cultivate-progress-block progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #0d100c;
}

.cultivate-progress-block progress::-webkit-progress-bar {
  background: #0d100c;
}

.cultivate-progress-block progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #7e5c24, #d0a653);
}

.cultivate-progress-block progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #7e5c24, #d0a653);
}

.offline-message {
  min-height: 1.5em;
  margin-top: 12px !important;
  color: #9fbd85 !important;
  font-size: 13px;
}

.breakthrough-card {
  margin-top: 12px;
}

.breakthrough-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a99f86;
}

.breakthrough-row strong {
  color: #deb866;
  font-size: 20px;
}

.pill-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.pill-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
}

.pill-status b {
  color: #c9aa68;
  font-weight: 500;
}

.barrier-pill-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(201, 170, 104, 0.28);
  border-radius: 8px;
  background: rgba(20, 22, 20, 0.72);
}

.barrier-pill-status {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
  color: #a99f86;
  font-size: 11px;
}

.barrier-pill-status strong,
.barrier-pill-status b {
  color: #c9aa68;
  font-weight: 500;
}

.use-barrier-pill-button {
  min-height: 36px;
  padding: 6px 10px;
  white-space: nowrap;
}

.use-pill-button,
.heart-demon-button {
  width: 100%;
}

.heart-demon-button {
  width: 100%;
  margin-top: 14px;
}

.breakthrough-button {
  width: 100%;
}

.use-pill-button:disabled,
.use-barrier-pill-button:disabled,
.heart-demon-button:disabled,
.breakthrough-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.breakthrough-result {
  min-height: 1.5em;
  margin-top: 10px !important;
  font-size: 13px;
}

.breakthrough-result[data-state="success"] {
  color: #9fbd85;
}

.breakthrough-result[data-state="error"] {
  color: #d88672;
}

.heart-demon-report {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(150, 76, 66, 0.4);
  border-radius: 7px;
  background: rgba(55, 24, 24, 0.3);
}

.heart-demon-report summary {
  color: #d0a673;
  cursor: pointer;
}

.heart-demon-report > p {
  margin-top: 10px;
  color: #aebd91;
  font-size: 12px;
}

.heart-demon-report ol {
  max-height: 220px;
  padding-left: 24px;
  margin: 12px 0 0;
  overflow-y: auto;
  color: #a99f8d;
  font-size: 12px;
  line-height: 1.7;
}

.attribute-status {
  min-height: 1.5em;
  margin-top: 8px !important;
  color: #817965 !important;
  font-size: 12px;
}

.attribute-status:empty {
  display: none;
}

.attribute-status[data-state="error"] {
  color: #d88672 !important;
}

.attribute-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.attribute-panel .attribute-panel-heading h2 {
  margin: 0;
  font-size: 18px;
}

.attribute-detail-button {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(194, 151, 70, 0.38);
  border-radius: 50%;
  background: rgba(70, 57, 30, 0.5);
  color: #c6ad73;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.attribute-detail-button:hover,
.attribute-detail-button:focus-visible {
  border-color: #bd9446;
  color: #ebca82;
}

.attribute-list {
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid rgba(194, 151, 70, 0.16);
  border-radius: 8px;
  background: rgba(10, 13, 10, 0.38);
}

.attribute-list__row {
  display: flex;
  min-height: 30px;
  padding: 4px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(194, 151, 70, 0.1);
}

.attribute-list__row:last-child {
  border-bottom: 0;
}

.attribute-list__row span {
  color: #948a73;
  font-size: 12px;
}

.attribute-list__row strong {
  color: #dbc388;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

.attribute-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.attribute-summary-grid .attribute-list__row {
  display: flex;
  min-width: 0;
  min-height: 48px;
  padding: 6px 5px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border-right: 1px solid rgba(194, 151, 70, 0.1);
  text-align: center;
}

.attribute-summary-grid .attribute-list__row:nth-child(3n) {
  border-right: 0;
}

.attribute-summary-grid .attribute-list__row:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.attribute-summary-grid .attribute-list__row span,
.attribute-summary-grid .attribute-list__row strong {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.attribute-summary-grid .attribute-list__row span {
  color: #8e846e;
  font-size: 10px;
  line-height: 1.2;
}

.attribute-summary-grid .attribute-list__row strong {
  color: #e0c372;
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attribute-source-section {
  margin-top: 18px;
  padding: 12px 8px 8px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 8px;
  background: rgba(10, 13, 10, 0.3);
}

.attribute-source-section h3 {
  width: fit-content;
  min-width: 88px;
  padding: 3px 16px;
  margin: -24px auto 9px;
  border: 1px solid rgba(194, 151, 70, 0.34);
  border-radius: 5px;
  background: #151810;
  color: #b9a575;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.reserved-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.reserved-slot-grid--kungfu {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.reserved-slot-card {
  display: grid;
  min-width: 0;
  min-height: 58px;
  padding: 2px 1px;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  justify-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: center;
  cursor: pointer;
}

.reserved-slot-card:hover,
.reserved-slot-card:focus-visible {
  background: transparent;
  outline: none;
}

.reserved-slot-card:hover .reserved-slot-card__icon,
.reserved-slot-card:focus-visible .reserved-slot-card__icon {
  border-color: rgba(205, 166, 86, 0.72);
  background: rgba(61, 51, 29, 0.5);
}

.reserved-slot-card__icon {
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 6px;
  background: rgba(18, 21, 16, 0.72);
  color: #5f5a4c;
  font-size: 11px;
}

.reserved-slot-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.equipment-slot-card[data-equipped="true"] {
  box-shadow: none;
}

.equipment-slot-card[data-equipped="true"] .reserved-slot-card__icon {
  border-color: var(--equipment-quality-color, rgba(205, 166, 86, 0.68));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--equipment-quality-color, #cda656) 38%, transparent),
    inset 0 0 10px color-mix(in srgb, var(--equipment-quality-color, #cda656) 18%, transparent);
}

.kungfu-slot-card[data-equipped="true"] .reserved-slot-card__icon {
  border-color: rgba(205, 166, 86, 0.68);
  background: rgba(61, 51, 29, 0.42);
  color: #dfc27e;
  box-shadow: inset 0 0 10px rgba(205, 166, 86, 0.16);
}

.kungfu-slot-card[data-equipped="true"] .reserved-slot-card__name {
  color: #c9ad73;
}

.reserved-slot-card__content {
  width: 100%;
  min-width: 0;
}

.reserved-slot-card__label,
.reserved-slot-card__name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reserved-slot-card__label {
  color: #9c8e70;
  font-size: 10px;
}

.reserved-slot-card__name {
  margin-top: 2px;
  color: #615c4e;
  font-size: 9px;
  font-weight: 500;
}

.reserved-slot-card__name:empty {
  display: none;
}

.attribute-modal {
  width: fit-content;
  min-width: min(calc(var(--game-design-width) - 32px), 240px);
  max-width: 420px;
  max-height: 540px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(204, 164, 82, 0.5);
  border-radius: 10px;
  background: #141710;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.68);
  color: #ddd2b8;
}

.attribute-modal::backdrop {
  background: rgba(3, 4, 3, 0.76);
  backdrop-filter: blur(3px);
}

.attribute-modal__content {
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  max-height: inherit;
  padding: 16px;
  overflow-y: auto;
}

.attribute-modal__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.attribute-modal__heading h2 {
  margin: 0;
  color: #d3ad62;
  font-size: 18px;
}

.attribute-modal__close {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(194, 151, 70, 0.24);
  border-radius: 50%;
  background: rgba(31, 32, 25, 0.9);
  color: #ab9d7e;
  font-size: 20px;
  line-height: 1;
}

.cultivation-speed-modal__content {
  display: grid;
  width: min(20rem, calc(var(--game-design-width) - 2rem));
  gap: 0.8rem;
  text-align: center;
}

.cultivation-speed-modal__heading {
  position: relative;
  min-height: 32px;
  justify-content: center;
}

.cultivation-speed-modal__heading .attribute-modal__close {
  position: absolute;
  top: 0;
  right: 0;
}

.cultivation-speed-detail-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.cultivation-speed-detail-list > div {
  padding: 0.55rem 0.5rem;
  border: 1px solid rgba(194, 151, 70, 0.14);
  border-radius: 7px;
  background: rgba(30, 32, 24, 0.56);
}

.cultivation-speed-detail-list dt {
  color: #8f8877;
  font-size: 0.74rem;
}

.cultivation-speed-detail-list dd {
  margin: 0.2rem 0 0;
  color: #dfc27e;
  font-size: 1rem;
  font-weight: 600;
}

.advanced-attribute-board:empty {
  display: none;
}

.advanced-attribute-modal {
  width: min(280px, calc(var(--game-design-width) - 32px));
  min-width: 0;
  max-width: min(280px, calc(var(--game-design-width) - 32px));
}

.advanced-attribute-modal__content {
  display: grid;
  box-sizing: border-box;
  width: 100%;
  gap: 10px;
}

.advanced-attribute-modal__heading {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  gap: 8px;
}

.advanced-attribute-modal__heading h2 {
  grid-column: 2;
  text-align: center;
}

.advanced-attribute-modal__heading .attribute-modal__close {
  grid-column: 3;
}

.advanced-attribute-modal .advanced-attribute-board {
  width: 100%;
  margin-top: 0;
}

.advanced-attribute-rule {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(194, 151, 70, 0.18);
  border-radius: 8px;
  color: #8f8877;
  font-size: 12px;
  line-height: 1.55;
}

.advanced-attribute-empty {
  padding: 24px 10px;
  margin: 0;
  border: 1px dashed rgba(194, 151, 70, 0.18);
  border-radius: 8px;
  color: #736d5d;
  font-size: 13px;
  text-align: center;
}

.bag-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bag-panel .bag-heading h2 {
  margin: 0;
}

.bag-heading span {
  color: #8e846e;
  font-size: 11px;
}

.bag-heading__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bag-batch-sell-entry {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 11px;
}

.bag-categories {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.bag-categories::-webkit-scrollbar {
  display: none;
}

.bag-category-button {
  min-width: 0;
  min-height: 34px;
  padding: 6px 10px;
  flex: 1 0 56px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 6px;
  background: rgba(17, 19, 15, 0.72);
  color: #827a67;
  font-size: 12px;
}

.bag-category-button.is-active {
  border-color: rgba(199, 156, 72, 0.68);
  background: linear-gradient(180deg, rgba(134, 99, 39, 0.72), rgba(83, 61, 26, 0.78));
  color: #f0d494;
}

.bag-category-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.bag-status {
  min-height: 1.4em;
  margin-top: 8px !important;
  color: #807966 !important;
  font-size: 11px;
}

.bag-status:empty {
  display: none;
}

.bag-status[data-state="error"] {
  color: #d88672 !important;
}

.bag-grid-empty {
  margin: 8px 0 0;
  color: #716b5c;
  font-size: 10px;
  text-align: center;
}

.bag-slot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.bag-slot {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  padding: 4px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 6px;
  background: rgba(10, 13, 10, 0.46);
  color: inherit;
}

.bag-slot--empty {
  border-style: dashed;
  background: rgba(7, 9, 7, 0.3);
}

.bag-slot--empty::after {
  width: 36%;
  aspect-ratio: 1;
  border: 1px solid rgba(194, 151, 70, 0.08);
  border-radius: 4px;
  content: "";
}

.bag-slot--occupied {
  border-color: transparent;
  background: transparent;
  cursor: pointer;
}

.bag-slot--occupied:hover,
.bag-slot--occupied:focus-visible {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.bag-slot--occupied:hover .bag-slot__icon,
.bag-slot--occupied:focus-visible .bag-slot__icon {
  box-shadow: 0 0 8px color-mix(in srgb, var(--item-tier-color, #cda656) 42%, transparent);
}

.bag-panel.is-batch-selling .bag-slot--occupied.is-batch-protected {
  opacity: 0.48;
}

.bag-panel.is-batch-selling .bag-slot--occupied.is-batch-selected .bag-slot__icon {
  border-color: #e2ba61;
  box-shadow: 0 0 0 2px rgba(226, 186, 97, 0.3), 0 0 12px rgba(226, 186, 97, 0.36);
}

.bag-slot__selected-badge {
  position: absolute;
  z-index: 4;
  top: 2px;
  right: 2px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(255, 230, 166, 0.78);
  border-radius: 50%;
  background: #9b6a20;
  color: #fff2c8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.bag-slot__icon,
.bag-item-detail__icon {
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 6px;
  background: rgba(18, 21, 16, 0.78);
  color: #6d6554;
}

.bag-slot__icon {
  position: relative;
  width: 72%;
  aspect-ratio: 1;
  overflow: visible;
  border-color: var(--item-tier-color, rgba(194, 151, 70, 0.22));
  font-size: 9px;
  transform: translateY(-4px);
}

.bag-slot__icon img,
.bag-item-detail__icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.bag-slot__name,
.bag-slot__count {
  position: absolute;
  max-width: calc(100% - 6px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bag-slot__name {
  right: 3px;
  bottom: 1px;
  left: 3px;
  padding: 1px 2px;
  border-radius: 3px;
  background: rgba(8, 10, 8, 0.76);
  color: var(--item-tier-color, #bca873);
  font-size: 8px;
  text-align: center;
}

.bag-slot__count {
  z-index: 2;
  top: -4px;
  right: -4px;
  padding: 1px 3px;
  border-radius: 999px;
  background: rgba(111, 78, 29, 0.92);
  color: #f0d494;
  font-size: 8px;
  font-weight: 500;
  line-height: 1.35;
}

.bag-slot__quality {
  position: absolute;
  top: 2px;
  left: 2px;
  max-width: calc(100% - 28px);
  overflow: hidden;
  padding: 1px 3px;
  border-radius: 999px;
  background: rgba(12, 13, 13, 0.82);
  color: #dfc77f;
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 400px) {
  .bag-slot-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.bag-item-detail {
  display: flex;
  padding: 12px;
  margin-top: 14px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(194, 151, 70, 0.16);
  border-radius: 8px;
  background: rgba(9, 12, 9, 0.45);
}

.bag-item-detail__icon {
  width: 54px;
  aspect-ratio: 1;
  flex: 0 0 54px;
  border-color: var(--item-tier-color, rgba(194, 151, 70, 0.22));
  font-size: 14px;
}

.bag-item-detail__identity {
  min-width: 0;
}

.bag-item-detail__identity strong,
.bag-item-detail__identity span {
  display: block;
}

.bag-item-detail__identity strong {
  color: #d6b977;
  font-size: 17px;
  font-weight: 500;
}

.bag-item-detail__identity span {
  margin-top: 5px;
  color: #8d846f;
  font-size: 12px;
}

.bag-item-detail__identity b {
  color: #bcaa80;
  font-weight: 500;
}

.bag-item-meta {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(194, 151, 70, 0.14);
  border-radius: 7px;
  background: rgba(7, 10, 7, 0.34);
}

.bag-item-meta__row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #817967;
  font-size: 11px;
}

.bag-item-meta__row dt,
.bag-item-meta__row dd {
  margin: 0;
}

.bag-item-meta__row dd {
  overflow: hidden;
  color: #b8aa89;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bag-item-detail__description {
  min-height: 3em;
  margin: 12px 0 0;
  color: #a09885;
  font-size: 12px;
  line-height: 1.65;
}

.bag-item-attributes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.bag-item-attributes[hidden] {
  display: none;
}

.bag-item-attributes span {
  padding: 6px 8px;
  border: 1px solid rgba(194, 151, 70, 0.14);
  border-radius: 6px;
  background: rgba(7, 10, 7, 0.34);
  color: #c5b081;
  font-size: 11px;
  text-align: center;
}

.bag-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.bag-detail-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.storage-bag-modal__content {
  width: min(22rem, calc(var(--game-design-width) - 2rem));
  gap: 0.8rem;
}

.bag-quantity-modal__content {
  width: min(22rem, calc(var(--game-design-width) - 2rem));
  gap: 0.8rem;
}

.bag-quantity-modal__content > strong {
  color: #d7bb7a;
  font-size: 1.08rem;
}

.bag-quantity-modal__content > p {
  margin: 0;
  color: #8d8778;
  line-height: 1.7;
}

.bag-quantity-modal__field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  color: #a09885;
}

.bag-quantity-modal__field input {
  width: 100%;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(194, 151, 70, 0.34);
  border-radius: 7px;
  outline: none;
  background: rgba(7, 10, 7, 0.72);
  color: #dfc47f;
  font: inherit;
}

.bag-quantity-modal__field input:focus {
  border-color: rgba(214, 177, 93, 0.72);
}

.bag-quantity-modal__summary {
  min-height: 1.7em;
}

.bag-batch-sell-bar {
  position: sticky;
  z-index: 8;
  bottom: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  margin-top: 12px;
  border: 1px solid rgba(203, 160, 75, 0.42);
  border-radius: 9px;
  background: rgba(15, 16, 12, 0.97);
  box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.28);
}

.bag-batch-sell-bar[hidden] {
  display: none;
}

.bag-batch-sell-bar__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bag-batch-sell-bar__summary strong {
  color: #dfc27a;
  font-size: 12px;
}

.bag-batch-sell-bar__summary span {
  color: #b7aa8b;
  font-size: 11px;
}

.bag-batch-sell-bar__actions {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.2fr;
  gap: 6px;
}

.bag-batch-sell-bar__actions button {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 11px;
}

.bag-batch-sell-modal__content {
  width: min(25rem, calc(var(--game-design-width) - 2rem));
  gap: 0.8rem;
}

.bag-batch-sell-modal__hint {
  margin: 0;
  color: #968c76;
  font-size: 0.86rem;
}

.bag-batch-sell-list {
  display: grid;
  max-height: 22rem;
  overflow-y: auto;
  border-block: 1px solid rgba(194, 151, 70, 0.16);
}

.bag-batch-sell-list__row,
.bag-batch-sell-modal__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bag-batch-sell-list__row {
  min-height: 38px;
  padding: 7px 3px;
  border-bottom: 1px solid rgba(194, 151, 70, 0.1);
  color: #b8ad94;
  font-size: 0.86rem;
}

.bag-batch-sell-list__row:last-child {
  border-bottom: 0;
}

.bag-batch-sell-list__row strong,
.bag-batch-sell-modal__total strong {
  color: #dfc27a;
  white-space: nowrap;
}

.bag-batch-sell-modal__total {
  color: #aaa087;
}

@media (max-width: 0px) {
  .bag-heading__actions {
    gap: 5px;
  }

  .bag-batch-sell-entry {
    padding-inline: 7px;
  }

  .bag-batch-sell-bar__summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .bag-batch-sell-bar__actions button {
    padding-inline: 4px;
    font-size: 10px;
  }
}

.storage-bag-modal__content > strong {
  color: #d7bb7a;
  font-size: 1.08rem;
}

.storage-bag-modal__content > p {
  margin: 0;
  color: #8d8778;
  line-height: 1.7;
}

.storage-bag-modal__content > p b {
  color: #d8d2c2;
}

.storage-bag-modal__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.cultivation-pill-modal__content {
  width: min(24rem, calc(var(--game-design-width) - 2rem));
  gap: 0.75rem;
}

.cultivation-pill-modal__content > strong {
  font-size: 1.08rem;
}

.cultivation-pill-modal__warning {
  margin: 0;
  color: #dfbd76;
  line-height: 1.65;
}

.cultivation-pill-modal__meta {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.cultivation-pill-modal__meta > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(194, 151, 70, 0.12);
}

.cultivation-pill-modal__meta dt {
  color: #8d8778;
}

.cultivation-pill-modal__meta dd {
  margin: 0;
  color: #d8d2c2;
  text-align: right;
}

.cultivation-pill-modal__note {
  margin: 0;
  color: #a47b70;
  font-size: 0.78rem;
  line-height: 1.6;
}

.disguise-elixir-modal__content {
  width: min(22rem, calc(var(--game-design-width) - 2rem));
  gap: 0.8rem;
}

.disguise-elixir-modal__hint,
.disguise-elixir-empty {
  margin: 0;
  color: #9f9785;
  line-height: 1.65;
  text-align: center;
}

.disguise-elixir-options {
  display: grid;
  gap: 0.55rem;
}

.disguise-elixir-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(194, 151, 70, 0.3);
  border-radius: 7px;
  background: rgba(15, 17, 13, 0.74);
  color: #d8c28f;
  cursor: pointer;
}

.disguise-elixir-option:has(input:checked) {
  border-color: #bd9446;
  background: rgba(116, 84, 34, 0.35);
}

.disguise-elixir-option input {
  accent-color: #bd9446;
}

.disguise-elixir-confirm:disabled {
  border-color: #4d493e;
  background: #292a25;
  color: #777469;
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

.rename-talisman-modal__content {
  width: min(22rem, calc(var(--game-design-width) - 2rem));
  gap: 0.7rem;
}

.rename-talisman-modal__current,
.rename-talisman-modal__hint,
.rename-talisman-modal__error {
  margin: 0;
  text-align: center;
}

.rename-talisman-modal__current {
  color: #b8aa8c;
}

.rename-talisman-modal__current strong {
  color: #e0bd70;
}

.rename-talisman-modal__field {
  display: grid;
  gap: 0.45rem;
  color: #c8b98f;
}

.rename-talisman-modal__field input {
  min-height: 42px;
  border: 1px solid rgba(194, 151, 70, 0.42);
  border-radius: 7px;
  background: rgba(12, 14, 11, 0.88);
  color: #efe1bb;
  padding: 0.55rem 0.7rem;
  text-align: center;
}

.rename-talisman-modal__hint {
  color: #8f8878;
  font-size: 0.82rem;
}

.rename-talisman-modal__error {
  min-height: 1.35em;
  color: #d98676;
  font-size: 0.82rem;
}

.rename-talisman-confirm:disabled {
  border-color: #4d493e;
  background: #292a25;
  color: #777469;
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

.cultivate-entry-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  column-gap: 8px;
  row-gap: 10px;
  margin-top: 10px;
}

/* 宗门选择与内部场景共用唯一页面；加入后移除功能卡外框。 */
.sect-page {
  align-content: start;
}

.sect-page.is-scene-mode {
  display: grid;
  height: 100%;
  min-height: 0;
  padding: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sect-page.is-scene-mode > .feature-page-heading {
  padding: 0 2px;
}

.sect-membership-summary {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
}

.sect-membership-summary[hidden] {
  display: none;
}

.sect-position-badge {
  color: #cbb982;
  font-size: 12px;
  line-height: 1.3;
}

.sect-contribution-badge {
  color: #9f957d;
  font-size: 10px;
  line-height: 1.3;
}

.game-shell.is-sect-scene-open {
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

.game-shell.is-sect-scene-open .game-content {
  padding-bottom: 0;
  overflow: hidden;
}

.game-shell.is-sect-scene-open .player-interface {
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
}

.sect-selection-view,
.sect-interior-view {
  display: grid;
  gap: 12px;
  text-align: center;
}

.sect-interior-view {
  height: 100%;
  min-height: 0;
}

.sect-scene-view {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.sect-selection-view h3,
.sect-interior-view h3 {
  margin: 0;
  color: #d8b96f;
  font-size: 18px;
}

.sect-selection-media {
  position: relative;
  display: grid;
  width: min(100%, 360px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(194, 151, 70, 0.3);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(45, 41, 29, 0.94), rgba(19, 22, 17, 0.98));
  color: #847b67;
}

.sect-selection-media > img {
  position: absolute;
  pointer-events: none;
}

.sect-selection-background {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sect-selection-image {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sect-selection-logo {
  right: 12px;
  bottom: 12px;
  width: 25%;
  max-height: 35%;
  object-fit: contain;
}

.sect-selection-media > span {
  z-index: 1;
  font-size: 13px;
  letter-spacing: 0.12em;
}

.sect-selection-view > p,
.sect-status {
  margin: 0;
  color: #9f967f;
  font-size: 12px;
  line-height: 1.65;
}

.sect-selection-empty {
  color: #7f7767 !important;
}

.sect-inheritance {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #938972;
  font-size: 12px;
}

.sect-inheritance strong {
  color: #d8b96f;
  font-size: 16px;
}

.sect-selection-navigation {
  display: grid;
  width: min(100%, 280px);
  margin: 0 auto;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 12px;
}

.sect-selection-navigation button {
  min-height: 36px;
  padding: 0;
  font-size: 18px;
}

.sect-selection-navigation span {
  color: #bca977;
  font-size: 12px;
}

.sect-join-button {
  width: min(100%, 180px);
  margin: 0 auto;
}

.sect-join-button:disabled {
  border-color: rgba(132, 123, 103, 0.25);
  background: linear-gradient(145deg, #2d2c27, #20211d);
  color: #7f7868;
  opacity: 0.72;
}

.sect-scene {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 540px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(194, 151, 70, 0.32);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(43, 39, 28, 0.96), rgba(18, 20, 16, 0.98));
}

.sect-background-layer,
.sect-building-layer {
  position: absolute;
  inset: 0;
}

.sect-background-layer {
  z-index: 1;
  pointer-events: none;
}

.sect-building-layer {
  z-index: 2;
}

.sect-scene-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.sect-building-action {
  position: absolute;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 3px;
  padding: 5px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(205, 168, 86, 0.45);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(103, 82, 45, 0.14), rgba(26, 28, 22, 0.93)),
    rgba(35, 32, 24, 0.94);
  color: #d4b66f;
  box-shadow: inset 0 0 18px rgba(187, 145, 70, 0.05);
  overflow: hidden;
}

.sect-building-media {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(195, 159, 80, 0.16);
  border-radius: 5px;
  background: rgba(8, 10, 8, 0.2);
}

.sect-building-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sect-building-image-placeholder {
  color: rgba(208, 177, 109, 0.45);
  font-size: clamp(15px, 4vw, 22px);
  line-height: 1;
}

.sect-building-name {
  display: block;
  overflow: hidden;
  color: #d4b66f;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sect-building-action[data-building-id="mainHall"] .sect-building-name {
  font-size: 12px;
  letter-spacing: 0.08em;
}

.sect-building-action[data-building-id="square"] {
  border-color: rgba(215, 177, 96, 0.58);
  background:
    radial-gradient(circle at 50% 45%, rgba(151, 116, 54, 0.2), transparent 64%),
    rgba(29, 30, 24, 0.96);
}

.sect-building-action[data-building-id="square"] .sect-building-name {
  font-size: 13px;
  letter-spacing: 0.12em;
}

.sect-building-page {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 12px;
  grid-template-rows: minmax(0, 3fr) minmax(150px, 2fr);
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(160deg, rgba(43, 39, 28, 0.7), rgba(18, 20, 16, 0.32));
  text-align: center;
}

.sect-building-page__media {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(194, 151, 70, 0.3);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 42%, rgba(131, 102, 48, 0.14), transparent 58%),
    rgba(15, 18, 14, 0.72);
}

.sect-building-page__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sect-building-page__media span {
  color: #8f8368;
  font-size: 12px;
  letter-spacing: 0.16em;
}

.sect-building-page__functions {
  display: grid;
  min-height: 0;
  padding: 14px;
  align-content: start;
  border: 1px solid rgba(194, 151, 70, 0.24);
  border-radius: 10px;
  background: rgba(15, 17, 13, 0.68);
}

.sect-building-function-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sect-building-function-list .sect-building-function {
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 5px 4px;
  font-size: 11px;
}

.sect-building-function-list .sect-building-function--danger {
  border-color: rgba(164, 83, 70, 0.48);
  background: linear-gradient(180deg, rgba(91, 45, 39, 0.62), rgba(52, 30, 27, 0.76));
  color: #cf988e;
}

.sect-building-function-list .sect-building-function--danger:hover:not(:disabled) {
  border-color: rgba(181, 97, 81, 0.68);
  background: linear-gradient(180deg, rgba(104, 52, 45, 0.72), rgba(61, 34, 30, 0.82));
}

.sect-building-function-empty {
  margin: 0;
  align-self: center;
  color: #9f967f;
  font-size: 13px;
  line-height: 1.7;
}

.sect-building-function-page {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 20px;
  place-items: center;
  border: 0;
  background: linear-gradient(160deg, rgba(43, 39, 28, 0.7), rgba(18, 20, 16, 0.32));
  text-align: center;
}

.sect-building-function-page p {
  margin: 0;
  color: #9f967f;
  font-size: 13px;
  line-height: 1.7;
}

.sect-building-function-page[data-sect-building-function-id="arenaCompetition"] {
  padding: 0;
  place-items: stretch;
  align-content: stretch;
  text-align: left;
}

.sect-building-function-page[data-sect-building-function-id="arenaCompetition"] > [data-role="sect-building-function-page-message"] {
  display: none;
}

.sect-building-function-page[data-sect-building-function-id="sectShop"] {
  padding: 12px;
  place-items: stretch;
  align-content: stretch;
  text-align: left;
}

.sect-building-function-page[data-sect-building-function-id="sectShop"] > [data-role="sect-building-function-page-message"] {
  display: none;
}

.sect-shop {
  display: grid;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
  gap: 10px;
}

.sect-shop[hidden] {
  display: none;
}

.sect-shop-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sect-shop-tab {
  min-height: 36px;
  padding: 6px 8px;
}

.sect-shop-tab.is-active {
  border-color: rgba(207, 167, 74, 0.88);
  background: linear-gradient(180deg, rgba(135, 96, 32, 0.82), rgba(77, 55, 24, 0.9));
  color: #f2d68a;
  box-shadow: inset 0 0 0 1px rgba(235, 200, 111, 0.14);
}

.sect-building-function-page .sect-shop-contribution {
  margin: 0;
  color: #b9ad8a;
  text-align: right;
}

.sect-shop-contribution strong {
  color: #dfc274;
}

.sect-shop-list.shop-product-list {
  display: grid;
  min-height: 0;
  padding-right: 2px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
  overflow-y: auto;
}

.sect-shop-list .sect-shop-product {
  min-height: 116px;
  grid-template-rows: auto minmax(1.25em, auto) auto;
}

.sect-shop-list .sect-shop-product .shop-product-tile__art {
  width: min(100%, 58px);
}

.sect-shop-list .sect-shop-product__name {
  display: block;
  min-height: 1.25em;
  overflow: hidden;
  color: #e0c77f;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: clip;
  white-space: nowrap;
  -webkit-line-clamp: unset;
}

.sect-shop-product__tile-price {
  color: #c8a85b;
  font-size: 9px;
  white-space: nowrap;
}

.sect-building-function-page .sect-shop-empty {
  align-self: center;
  color: #8e8773;
  text-align: center;
}

.sect-shop-purchase-dialog {
  width: fit-content;
  min-width: min(calc(var(--game-design-width) - 32px), 260px);
  max-width: min(calc(var(--game-design-width) - 32px), 296px);
}

.sect-shop-purchase-dialog__content {
  display: grid;
  width: min(260px, calc(var(--game-design-width) - 64px));
  gap: 10px;
  text-align: center;
}

.sect-shop-purchase-dialog__content h2,
.sect-shop-purchase-dialog__content p {
  margin: 0;
}

.sect-shop-purchase-dialog__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sect-shop-purchase-product {
  width: 100%;
}

.sect-shop-purchase-product .shop-purchase-product__description {
  width: 100%;
  text-align: center;
}

@media all {
  .sect-shop-list .sect-shop-product__name {
    font-size: 9px;
  }
}

.sect-kungfu-library-dialog {
  width: min(calc(var(--game-design-width) - 32px), 356px);
  height: fit-content;
  min-height: 0;
  max-width: 356px;
  max-height: 520px;
}

.sect-kungfu-library-dialog__content,
.sect-kungfu-exchange-dialog__content,
.sect-kungfu-detail-dialog__content {
  display: grid;
  width: 100%;
  gap: 12px;
}

.sect-kungfu-library-dialog__content {
  height: fit-content;
  min-height: 0;
  padding: 12px;
  align-content: start;
  gap: 8px;
}

.sect-kungfu-library-dialog__content .sect-detail-dialog__heading h2 {
  margin: 0;
  line-height: 1.2;
  text-align: center;
}

.sect-kungfu-detail-dialog__content .sect-detail-dialog__heading h2 {
  text-align: center;
}

.sect-kungfu-library {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 8px;
}

.sect-kungfu-library__summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #958c78;
  font-size: 12px;
}

.sect-kungfu-library__summary strong {
  color: #d9bd7b;
  font-size: 13px;
}

.sect-kungfu-library__list {
  display: grid;
  max-height: 352px;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  scrollbar-color: rgba(194, 151, 70, 0.32) transparent;
}

.sect-kungfu-row {
  display: grid;
  min-height: 40px;
  padding: 4px 5px;
  grid-template-columns: 44px minmax(0, 1fr) 104px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(194, 151, 70, 0.24);
  border-radius: 8px;
  background: rgba(27, 29, 23, 0.76);
}

.sect-kungfu-row__type {
  display: grid;
  min-height: 28px;
  place-items: center;
  border-right: 1px solid rgba(194, 151, 70, 0.2);
  color: #a99a78;
  font-size: 11px;
}

.sect-kungfu-row__name {
  min-width: 0;
  min-height: 32px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: #dfc27d;
  font-size: 14px;
  text-align: left;
}

.sect-kungfu-row__name:hover,
.sect-kungfu-row__name:focus-visible {
  color: #f0d58f;
  background: rgba(194, 151, 70, 0.08);
}

.sect-kungfu-row .sect-kungfu-row__exchange {
  width: 100%;
  min-height: 32px;
  padding: 5px 6px;
  white-space: nowrap;
  font-size: 10px;
}

.sect-kungfu-row__exchange.is-owned:disabled {
  border-color: rgba(111, 104, 88, 0.3);
  background: #24251f;
  color: #777469;
  opacity: 0.78;
}

.sect-kungfu-library__status {
  min-height: 0;
  margin: 0;
  color: #9fbd85;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.sect-kungfu-library__status:empty {
  display: none;
}

.sect-kungfu-library__status[data-state="error"] {
  color: #d88672;
}

.sect-kungfu-exchange-dialog,
.sect-kungfu-detail-dialog {
  width: min(calc(var(--game-design-width) - 36px), 340px);
  max-width: 340px;
}

.sect-kungfu-exchange-dialog__content {
  text-align: center;
}

.sect-kungfu-exchange__name {
  color: #e0c47d;
  font-size: 17px;
}

.sect-kungfu-exchange__requirements {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(194, 151, 70, 0.25);
  border-radius: 8px;
  background: rgba(25, 27, 21, 0.68);
}

.sect-kungfu-exchange__requirements p,
.sect-kungfu-exchange__message {
  margin: 0;
  color: #b9ae96;
  font-size: 12px;
  line-height: 1.55;
}

.sect-kungfu-exchange__requirements [data-state="met"] {
  color: #adc38c;
}

.sect-kungfu-exchange__requirements [data-state="unmet"] {
  color: #c88678;
}

.sect-kungfu-exchange__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 104px));
  justify-content: center;
  gap: 10px;
}

.sect-kungfu-exchange__actions button {
  min-height: 34px;
  padding: 6px 8px;
}

.sect-kungfu-detail-dialog {
  max-height: 600px;
}

.sect-kungfu-detail__body {
  display: grid;
  gap: 10px;
  color: #b9ae96;
  font-size: 12px;
  line-height: 1.55;
}

.sect-kungfu-detail__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #d4ba79;
}

.sect-kungfu-detail__description,
.sect-kungfu-detail__resource {
  margin: 0;
}

.sect-kungfu-detail__description {
  color: #c9bea5;
}

.sect-kungfu-detail__section {
  display: grid;
  gap: 4px;
  padding-top: 9px;
  border-top: 1px solid rgba(194, 151, 70, 0.18);
}

.sect-kungfu-detail__section strong {
  color: #d4ba79;
}

.sect-kungfu-detail__section ul {
  display: grid;
  margin: 0;
  padding-left: 18px;
  gap: 3px;
}

.sect-kungfu-detail__resource {
  color: #9f967f;
}

.sect-kungfu-detail__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.sect-kungfu-detail__actions button {
  min-height: 32px;
  padding: 5px 7px;
  font-size: 10px;
}

.sect-task-hall {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  gap: 14px;
}

.sect-task-hall[hidden] {
  display: none;
}

.sect-task-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 150px));
  gap: 10px;
  justify-content: center;
}

.sect-task-tab {
  width: 100%;
  min-height: 38px;
}

.sect-task-tab.is-active {
  border-color: rgba(222, 197, 121, 0.82);
  background: linear-gradient(180deg, rgba(122, 93, 37, 0.92), rgba(83, 61, 26, 0.96));
  color: #f0d98e;
  box-shadow: 0 0 10px rgba(202, 159, 68, 0.16);
}

.sect-task-hall__content {
  display: grid;
  min-height: 0;
  place-items: start center;
  overflow: hidden;
}

.sect-task-view {
  display: grid;
  width: min(100%, 430px);
  max-height: 100%;
  padding: 16px;
  gap: 14px;
  align-content: start;
  border: 1px solid rgba(194, 151, 70, 0.3);
  border-radius: 10px;
  background: rgba(15, 18, 14, 0.76);
  color: #c9bfa8;
  overflow-y: auto;
}

.sect-task-view[hidden] {
  display: none;
}

.sect-duty-list {
  display: grid;
  width: 100%;
  gap: 8px;
}

.sect-duty-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(194, 151, 70, 0.28);
  border-radius: 8px;
  background: rgba(32, 31, 23, 0.72);
  text-align: left;
}

.sect-duty-card.is-running {
  border-color: rgba(222, 197, 121, 0.58);
  background: rgba(53, 45, 25, 0.82);
}

.sect-duty-card.is-locked {
  border-color: rgba(95, 91, 80, 0.32);
  background: rgba(31, 32, 29, 0.66);
}

.sect-duty-card__info {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.sect-duty-card__info strong {
  color: #dec579;
  font-size: 14px;
}

.sect-duty-card__info p {
  color: #b4aa94;
  font-size: 11px;
  line-height: 1.45;
}

.sect-duty-card__info span {
  color: #9e947d;
  font-size: 11px;
}

.sect-duty-card.is-locked .sect-duty-card__info strong,
.sect-duty-card.is-locked .sect-duty-card__info p,
.sect-duty-card.is-locked .sect-duty-card__info span {
  color: #777469;
}

.sect-duty-card__action {
  display: grid;
  min-width: 78px;
  gap: 6px;
  justify-items: center;
}

.sect-duty-card__countdown,
.sect-construction-remaining {
  color: #b9ae96 !important;
  font-size: 11px !important;
  white-space: nowrap;
}

.sect-duty-card__countdown b,
.sect-construction-remaining b {
  color: #dec579;
}

.sect-duty-card__button {
  box-sizing: border-box;
  width: 74px;
  height: 34px;
  min-height: 34px;
  max-height: 34px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.sect-duty-card__button:disabled {
  border-color: #4d493e;
  background: #292a25;
  color: #777469;
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

.sect-duty-card.is-running .sect-duty-card__button:disabled {
  border-color: rgba(194, 151, 70, 0.48);
  background: rgba(105, 79, 32, 0.82);
  color: #e2ca83;
}

.sect-task-section {
  display: grid;
  gap: 7px;
}

.sect-task-section h3 {
  margin: 0;
  color: #d0b86f;
  font-size: 14px;
}

.sect-task-section ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  gap: 6px 12px;
  list-style: none;
}

.sect-task-section li {
  color: #c9bfa8;
  font-size: 12px;
  line-height: 1.5;
}

.sect-task-section li.is-insufficient {
  color: #a66f66;
}

.sect-task-action {
  width: 112px;
  min-height: 36px;
  justify-self: center;
}

.sect-task-action:disabled {
  border-color: #4d493e;
  background: #292a25;
  color: #777469;
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

.sect-arena {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.sect-arena[hidden] {
  display: none;
}

.sect-arena__content {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.sect-arena-view {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 16px;
  gap: 12px;
  align-content: start;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: rgba(15, 18, 14, 0.76);
  color: #c9bfa8;
}

.sect-arena-view[hidden] {
  display: none;
}

.sect-arena-view h3,
.sect-arena-view p {
  margin: 0;
}

.sect-arena-view h3 {
  color: #dec579;
  font-size: 16px;
  font-weight: 600;
}

.sect-arena-phase {
  display: grid;
  min-height: 46px;
  padding: 8px 12px;
  place-items: center;
  gap: 4px;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 8px;
  background: rgba(31, 31, 24, 0.72);
  text-align: center;
}

.sect-arena-phase[hidden] {
  display: none;
}

.sect-arena-phase strong {
  color: #d8c07a;
  font-size: 14px;
  font-weight: 600;
}

.sect-arena-countdown {
  color: #f0d98b;
  font-size: 28px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(221, 178, 65, 0.3);
}

.sect-arena-countdown[hidden] {
  display: none;
}

.sect-arena-match-list {
  display: grid;
  width: 100%;
  gap: 7px;
}

.sect-arena-match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) minmax(68px, 0.88fr);
  min-height: 46px;
  padding: 5px;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 8px;
  background: rgba(25, 27, 22, 0.72);
  color: #c7bca4;
  font-size: 11px;
}

.sect-arena-match-card.is-entering {
  animation: sect-arena-card-enter 180ms ease both;
}

.sect-arena-match-card.is-result-entering .sect-arena-match-card__result {
  animation: sect-arena-result-enter 180ms ease-out both;
}

@keyframes sect-arena-card-enter {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sect-arena-result-enter {
  from {
    opacity: 0.35;
    transform: translateY(-3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sect-arena-competitor,
.sect-arena-match-card__result {
  display: grid;
  min-width: 0;
  min-height: 34px;
  padding: 5px 6px;
  place-items: center;
  border: 1px solid rgba(184, 157, 96, 0.22);
  border-radius: 6px;
  background: rgba(11, 14, 11, 0.52);
  text-align: center;
}

.sect-arena-competitor span,
.sect-arena-match-card__result strong {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sect-arena-match-card__vs {
  color: #817863;
  font-size: 10px;
  text-align: center;
}

.sect-arena-match-card__result {
  color: #958b75;
  font-size: 9px;
  line-height: 1.35;
}

.sect-arena-match-card__result strong {
  color: #cfc09d;
  font-size: 10px;
  font-weight: 600;
}

.sect-arena-match-card.is-running {
  border-color: rgba(222, 185, 92, 0.52);
  box-shadow: inset 0 0 12px rgba(211, 168, 64, 0.08);
}

.sect-arena-match-card.is-completed .sect-arena-match-card__result {
  border-color: rgba(198, 162, 76, 0.4);
  background: rgba(54, 45, 25, 0.48);
}

.sect-arena-player-name {
  color: #e1bd60 !important;
  font-weight: 700;
}

.sect-arena-advancement {
  display: grid;
  padding: 10px;
  gap: 8px;
  border: 1px solid rgba(194, 151, 70, 0.25);
  border-radius: 8px;
  background: rgba(42, 37, 24, 0.58);
}

.sect-arena-advancement[hidden] {
  display: none;
}

.sect-arena-advancement > strong {
  color: #dec579;
  font-size: 13px;
  text-align: center;
}

.sect-arena-advancement > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.sect-arena-advancement-name {
  padding: 4px 8px;
  border: 1px solid rgba(181, 151, 82, 0.22);
  border-radius: 999px;
  color: #bfb39a;
  font-size: 10px;
}

.sect-arena-ranking-list {
  display: grid;
  width: 100%;
  gap: 7px;
}

.sect-arena-final-result-dialog__content {
  width: min(340px, calc(var(--game-design-width) - 32px));
  gap: 12px;
}

.sect-arena-final-result-dialog__content h2 {
  margin: 0;
  color: #dec579;
  font-size: 17px;
  text-align: center;
}

.sect-arena-final-result-list {
  display: grid;
  gap: 8px;
}

.sect-arena-final-result-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 42px;
  padding: 8px 10px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(194, 151, 70, 0.24);
  border-radius: 8px;
  background: rgba(31, 31, 24, 0.76);
}

.sect-arena-final-result-row > strong {
  color: #d9bf72;
  font-size: 12px;
  text-align: center;
}

.sect-arena-final-result-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: #c9bfa8;
  font-size: 12px;
}

.sect-arena-final-result-dialog__content > .primary-button {
  justify-self: center;
  min-width: 108px;
}

.sect-arena-ranking-dialog {
  width: min(calc(var(--game-design-width) - 32px), 360px);
  max-width: 360px;
}

.sect-arena-ranking-dialog__content {
  position: relative;
  display: grid;
  width: 100%;
  padding: 18px 14px 14px;
  gap: 9px;
}

.sect-arena-ranking-dialog__content > .attribute-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
}

.sect-arena-ranking-date {
  margin: 0;
  padding: 4px 34px 5px 2px;
  color: #c8b98e;
  font-size: 12px;
  line-height: 1.5;
}

.sect-arena-ranking-header,
.sect-arena-ranking-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 0.9fr) minmax(78px, 1.25fr) 38px;
  align-items: center;
  gap: 6px;
}

.sect-arena-ranking-header {
  padding: 0 9px;
  color: #7f7869;
  font-size: 10px;
  text-align: center;
}

.sect-arena-ranking-row {
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 7px;
  color: #a99d83;
  font-size: 11px;
  text-align: center;
}

.sect-arena-ranking-name {
  color: #d5c7a6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sect-arena-ranking-realm {
  color: #b9ae96;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sect-arena-ranking-age {
  color: #a99d83;
  white-space: nowrap;
}

.sect-arena-dialog {
  width: min(calc(var(--game-design-width) - 36px), 320px);
  max-width: 320px;
}

.sect-arena-dialog__content {
  display: grid;
  width: 100%;
  padding: 16px;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.sect-arena-dialog__content h2,
.sect-arena-dialog__content p {
  margin: 0;
}

.sect-arena-dialog__hint {
  color: #968b74;
  font-size: 11px;
  line-height: 1.6;
}

.sect-arena-dialog__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 10px;
}

.sect-duty-switch-dialog {
  width: min(calc(var(--game-design-width) - 36px), 310px);
  max-width: 310px;
}

.sect-duty-switch-dialog__content {
  display: grid;
  width: 100%;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.sect-duty-switch-dialog__content h2,
.sect-duty-switch-dialog__content p {
  margin: 0;
}

.sect-duty-switch-dialog__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.sect-retreat-dialog {
  width: min(calc(var(--game-design-width) - 36px), 310px);
  max-width: 310px;
}

.sect-retreat-dialog__content {
  display: grid;
  width: 100%;
  gap: 14px;
  justify-items: center;
  padding: 16px;
  text-align: center;
}

.sect-retreat-dialog__content .sect-detail-dialog__heading {
  width: 100%;
}

.sect-retreat-summary {
  display: grid;
  width: 100%;
  gap: 10px;
  padding: 8px 4px;
  color: #b8ac91;
}

.sect-retreat-summary p {
  margin: 0;
}

.sect-retreat-summary strong {
  color: #dec68d;
}

.sect-retreat-action {
  display: grid;
  width: 144px;
  min-height: 48px;
  padding: 7px 12px;
  place-items: center;
  gap: 2px;
}

.sect-retreat-action strong {
  font-size: 15px;
}

.sect-retreat-action small {
  font-size: 10px;
  color: inherit;
}

.sect-retreat-action:disabled {
  border-color: #4d493e;
  background: #292a25;
  color: #777469;
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

.sect-retreat-progress {
  display: grid;
  width: 100%;
  gap: 7px;
  justify-items: center;
  color: #d3ad62;
}

.sect-retreat-progress[hidden] {
  display: none;
}

.sect-retreat-progress progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #2b2c25;
}

.sect-retreat-progress progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #2b2c25;
}

.sect-retreat-progress progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #806126, #d3ad62);
}

.sect-retreat-progress progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #806126, #d3ad62);
}

.sect-retreat-progress span {
  color: #a99d83;
  font-size: 11px;
}

.sect-status[data-state="error"] {
  color: #bd786b;
}

.sect-join-dialog {
  width: min(calc(var(--game-design-width) - 36px), 290px);
  max-width: 290px;
}

.sect-join-dialog__content {
  display: grid;
  width: 100%;
  padding: 16px;
  gap: 14px;
  text-align: center;
}

.sect-join-dialog__content h2,
.sect-join-dialog__content p {
  margin: 0;
}

.sect-join-dialog__actions {
  display: grid;
  grid-template-columns: repeat(2, 84px);
  justify-content: center;
  gap: 12px;
}

.sect-join-dialog__actions button {
  min-height: 34px;
  padding: 6px 10px;
}

.sect-detail-dialog {
  width: min(calc(var(--game-design-width) - 36px), 320px);
  max-width: 320px;
}

.sect-detail-dialog__content {
  display: grid;
  width: 100%;
  padding: 16px;
  gap: 12px;
  text-align: center;
}

.sect-detail-dialog__content h2,
.sect-detail-dialog__content p,
.sect-detail-dialog__content h3 {
  margin: 0;
}

.sect-detail-dialog__content h2 {
  color: #d3ad62;
  font-size: 18px;
}

.sect-detail-dialog__heading {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
}

.sect-detail-dialog__heading h2 {
  grid-column: 2;
}

.sect-detail-dialog__heading .attribute-modal__close {
  grid-column: 3;
  grid-row: 1;
}

.sect-detail-panel {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(194, 151, 70, 0.26);
  border-radius: 8px;
  background: rgba(25, 27, 21, 0.68);
}

.sect-info-content {
  display: grid;
  min-height: 0;
  gap: 14px;
  text-align: left;
}

.sect-info-section {
  display: grid;
  gap: 7px;
}

.sect-info-section h3 {
  color: #d3ad62;
  font-size: 15px;
  font-weight: 600;
}

.sect-info-section p {
  color: #c9bea5;
  font-size: 13px;
  line-height: 1.7;
}

.sect-info-section--origin p {
  white-space: pre-line;
}

.sect-info-founder {
  color: #f1c85e;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(225, 176, 62, 0.28);
}

.sect-info-section ul {
  display: grid;
  margin: 0;
  padding-left: 20px;
  gap: 4px;
  color: #c9bea5;
  font-size: 13px;
  line-height: 1.55;
}

.sect-info-section--leader p {
  color: #dfc270;
  font-size: 15px;
  font-weight: 600;
}

.sect-position-content {
  display: grid;
  gap: 18px;
}

.sect-position-relation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #c4b696;
}

.sect-position-relation strong {
  color: #dfc270;
  font-size: 15px;
  font-weight: 600;
}

.sect-position-relation span {
  color: #8f866f;
  font-size: 18px;
}

.sect-position-requirements {
  display: grid;
  gap: 5px;
  color: #b8ac91;
  font-size: 13px;
  line-height: 1.5;
}

.sect-position-requirements h3,
.sect-salary-content h3 {
  margin-bottom: 2px;
  color: #d1ba7d;
  font-size: 13px;
  font-weight: 600;
}

.sect-detail-primary-action {
  width: 92px;
  min-height: 34px;
  padding: 6px 12px;
  justify-self: center;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.sect-detail-primary-action:disabled {
  border-color: #4d493e;
  background: #292a25;
  color: #777469;
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

.sect-salary-position {
  color: #b8ac91;
  font-size: 13px;
}

.sect-salary-position strong {
  color: #dfc270;
}

.sect-salary-content {
  display: grid;
  min-height: 90px;
  align-content: start;
  gap: 8px;
}

.sect-salary-reward {
  display: grid;
  gap: 4px;
  color: #d9ccb0;
  font-size: 13px;
  line-height: 1.55;
}

.sect-leave-dialog {
  width: min(calc(var(--game-design-width) - 32px), 340px);
  max-width: 340px;
}

.sect-leave-dialog__content {
  display: grid;
  width: 100%;
  padding: 18px;
  gap: 12px;
  text-align: center;
}

.sect-leave-dialog__content h2,
.sect-leave-dialog__content p,
.sect-leave-dialog__content ol {
  margin: 0;
}

.sect-leave-dialog__warning {
  padding: 10px 12px;
  border: 1px solid rgba(169, 95, 78, 0.3);
  border-radius: 8px;
  background: rgba(62, 29, 24, 0.28);
  color: #b9aa91;
  font-size: 12px;
  line-height: 1.65;
  text-align: left;
}

.sect-leave-dialog__warning ol {
  margin-top: 6px;
  padding-left: 20px;
}

.sect-leave-dialog__actions {
  display: grid;
  grid-template-columns: repeat(2, 84px);
  justify-content: center;
  gap: 12px;
}

.sect-leave-dialog__actions button {
  min-height: 34px;
  padding: 6px 10px;
}

.cultivate-entry-button {
  position: relative;
  display: grid;
  width: 100%;
  height: 44px;
  min-width: 0;
  min-height: 44px;
  padding: 6px 4px;
  place-content: center;
  border: 1px solid var(--cultivation-entry-border);
  border-radius: 9px;
  background: linear-gradient(145deg, #302a1c, #1c1d16);
  color: var(--cultivation-entry-accent);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 170, 0.04);
}

.cultivate-entry-red-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  border: 2px solid #171810;
  border-radius: 50%;
  background: #e54135;
  box-shadow: 0 0 7px rgba(229, 65, 53, 0.72);
}

.newcomer-activity-page {
  grid-template-rows: max-content minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.activity-center-layout {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid rgba(193, 149, 74, 0.34);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(35, 34, 26, 0.92), rgba(20, 22, 17, 0.95));
  overflow: hidden;
}

.activity-center-list {
  display: grid;
  grid-auto-rows: max-content;
  justify-items: center;
  align-content: start;
  gap: 9px;
  min-height: 0;
  overflow-y: auto;
}

.activity-center-entry {
  position: relative;
  width: 36px;
  min-height: 108px;
  padding: 8px 7px;
  border: 1px solid rgba(193, 149, 74, 0.3);
  border-radius: 8px;
  color: #b9aa88;
  background: linear-gradient(145deg, #26251d, #191b16);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-orientation: upright;
  writing-mode: vertical-rl;
}

.activity-center-entry.is-active {
  border-color: #c99b48;
  color: #f1d795;
  background: linear-gradient(145deg, #433621, #28251b);
}

.activity-center-entry[hidden] {
  display: none;
}

.activity-center-entry.is-placeholder {
  border-style: dashed;
  color: #736c5c;
  background: rgba(24, 25, 20, 0.65);
  opacity: 0.62;
}

.activity-center-entry.has-claimable::after {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 9px;
  height: 9px;
  border: 2px solid #171810;
  border-radius: 50%;
  background: #e54135;
  box-shadow: 0 0 6px rgba(229, 65, 53, 0.65);
  content: "";
}

.activity-center-content {
  display: grid;
  grid-template-rows: max-content max-content max-content minmax(0, 1fr) max-content;
  gap: 8px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.online-reward-panel {
  align-content: start;
  overflow-y: auto;
}

.server-opening-competition-panel {
  grid-template-rows: max-content max-content minmax(0, 1fr) max-content;
}

.server-opening-competition-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 110px));
  justify-content: center;
  gap: 8px;
}

.server-opening-competition-tabs button {
  min-height: 34px;
  border: 1px solid rgba(194, 151, 70, 0.28);
  border-radius: 999px;
  color: #a99d83;
  background: rgba(22, 24, 18, 0.78);
}

.server-opening-competition-tabs button.is-active {
  border-color: rgba(215, 172, 79, 0.76);
  color: #f0d494;
  background: rgba(103, 77, 31, 0.76);
}

.server-opening-competition-summary {
  margin: 0;
  color: #a99d83;
  font-size: 12px;
  text-align: center;
}

.server-opening-competition-view {
  display: grid;
  grid-template-rows: max-content minmax(0, 1fr) max-content max-content;
  min-height: 0;
  gap: 7px;
}

.server-opening-competition-view[hidden] {
  display: none;
}

.server-opening-competition-table-header,
.server-opening-competition-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.7fr);
  align-items: center;
  gap: 8px;
  text-align: center;
}

.server-opening-competition-table-header {
  padding: 0 10px;
  color: #857c69;
  font-size: 11px;
}

.server-opening-competition-rank-heading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.server-opening-competition-rank-heading button {
  display: inline-grid;
  width: 20px;
  height: 20px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(208, 170, 89, 0.58);
  border-radius: 50%;
  color: #e1c373;
  background: rgba(45, 39, 25, 0.82);
  font-weight: 700;
}

.server-opening-competition-list {
  display: grid;
  min-height: 0;
  gap: 7px;
  align-content: start;
  overflow-y: auto;
}

.server-opening-competition-row {
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 8px;
  color: #d5c7a6;
  background: rgba(18, 20, 15, 0.58);
}

.server-opening-competition-row strong {
  color: #c9a95e;
  font-weight: 600;
}

.server-opening-competition-row.is-current-player,
.server-opening-competition-row--self {
  border-color: rgba(216, 181, 107, 0.68);
  background: rgba(89, 67, 29, 0.4);
}

.server-opening-competition-self {
  padding-top: 7px;
  border-top: 1px solid rgba(194, 151, 70, 0.2);
}

.server-opening-competition-empty {
  margin: 16px 0;
  color: #777161;
  text-align: center;
}

.server-opening-competition-rewards {
  grid-template-rows: max-content minmax(0, 1fr);
  align-content: start;
  text-align: left;
}

.server-opening-competition-reward-note {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 8px;
  color: #a99d83;
  background: rgba(22, 24, 18, 0.64);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.server-opening-competition-reward-list {
  display: grid;
  min-height: 0;
  gap: 7px;
  align-content: start;
  overflow-y: auto;
}

.server-opening-competition-reward-card {
  display: grid;
  gap: 4px;
  padding: 9px 11px;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 8px;
  background: rgba(18, 20, 15, 0.58);
}

.server-opening-competition-reward-card strong {
  color: #dfc27e;
  font-size: 14px;
}

.server-opening-competition-reward-card p {
  margin: 0;
  color: #b7aa8c;
  font-size: 12px;
  line-height: 1.55;
}

.server-opening-competition-rules-dialog {
  width: min(calc(var(--game-design-width) - 36px), 340px);
  max-width: 340px;
}

.server-opening-competition-rules-dialog__content {
  text-align: left;
}

.server-opening-competition-rules-dialog__content .sect-detail-dialog__heading h2 {
  text-align: center;
}

.server-opening-competition-rules {
  display: grid;
  margin: 0;
  padding-left: 22px;
  gap: 10px;
  color: #c7b99a;
  font-size: 13px;
  line-height: 1.65;
}

.online-reward-summary {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid rgba(201, 155, 72, 0.3);
  border-radius: 9px;
  color: #cbbd9d;
  background: rgba(22, 24, 18, 0.72);
}

.online-reward-summary strong {
  color: #f0d393;
}

.online-reward-task-list {
  display: grid;
  gap: 9px;
}

.online-reward-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(201, 155, 72, 0.32);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(47, 41, 28, 0.9), rgba(25, 27, 21, 0.95));
}

.online-reward-task.is-claimable {
  border-color: rgba(111, 190, 105, 0.72);
  box-shadow: inset 0 0 14px rgba(75, 145, 70, 0.1);
}

.online-reward-task.is-claimed {
  opacity: 0.66;
}

.online-reward-task-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.online-reward-task-copy strong {
  color: #ead09a;
  font-size: 15px;
}

.online-reward-task-copy span {
  color: #b9ad91;
  font-size: 13px;
}

.online-reward-task .primary-button {
  min-width: 0;
  padding-inline: 8px;
}

.newcomer-lifecycle {
  grid-row: 3;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(193, 149, 74, 0.32);
  border-radius: 9px;
  color: #d6c6a2;
  background: rgba(29, 27, 20, 0.72);
  font-size: 13px;
  line-height: 1.5;
}

.newcomer-content-tabs {
  display: grid;
  grid-row: 2;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.newcomer-content-tabs button {
  position: relative;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(193, 149, 74, 0.28);
  border-radius: 8px;
  color: #aaa087;
  background: #202019;
  font-size: 14px;
}

.newcomer-content-tabs button.is-active {
  border-color: #c99b48;
  color: #f1d795;
  background: #3a3020;
}

.newcomer-content-view {
  grid-row: 4;
  min-height: 0;
}

.newcomer-content-view[hidden] {
  display: none;
}

.newcomer-task-view {
  display: grid;
  grid-template-rows: max-content minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
}

.newcomer-progress-view {
  overflow: hidden;
}

.newcomer-sign-in-view {
  display: grid;
  min-height: 0;
}

.newcomer-sign-in-placeholder {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 24px 16px;
  border: 1px solid rgba(193, 149, 74, 0.32);
  border-radius: 10px;
  color: #8f856f;
  background: rgba(24, 25, 20, 0.58);
  text-align: center;
}

.newcomer-sign-in-placeholder strong {
  color: #d8bf82;
  font-size: 16px;
}

.newcomer-sign-in-placeholder span {
  color: #c7b993;
  font-size: 14px;
  line-height: 1.5;
}

.newcomer-sign-in-placeholder .newcomer-claim-button {
  justify-self: center;
  width: 112px;
}

.newcomer-progress-list {
  display: grid;
  align-content: start;
  gap: 7px;
  height: 100%;
  min-height: 0;
  padding-right: 3px;
  overflow-x: hidden;
  overflow-y: scroll;
  overflow-anchor: none;
  overscroll-behavior-y: contain;
  scrollbar-color: rgba(194, 151, 70, 0.48) rgba(20, 21, 17, 0.45);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.newcomer-progress-list::-webkit-scrollbar {
  width: 6px;
}

.newcomer-progress-list::-webkit-scrollbar-track {
  border-radius: 6px;
  background: rgba(20, 21, 17, 0.45);
}

.newcomer-progress-list::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: rgba(194, 151, 70, 0.48);
}

.newcomer-section-heading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  color: #e1c684;
}

.newcomer-section-heading span {
  font-variant-numeric: tabular-nums;
}

.newcomer-day-tabs {
  display: grid;
  grid-row: 1;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.newcomer-day-tab {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 34px;
  padding: 6px 2px;
  border: 1px solid rgba(193, 149, 74, 0.3);
  border-radius: 7px;
  color: #b9aa88;
  background: #202019;
}

.newcomer-day-tab strong {
  font-size: 12px;
  white-space: nowrap;
}

.newcomer-day-tab.is-active {
  border-color: #c99b48;
  color: #f1d795;
  background: #3a3020;
}

.newcomer-day-tab:disabled {
  opacity: 0.38;
}

.newcomer-mini-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e54135;
}

.newcomer-day-heading h3 {
  margin: 1px 0 0;
  color: #dfc687;
  font-size: 16px;
}

.newcomer-task-list {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 0;
  padding-right: 3px;
  overflow-x: hidden;
  overflow-y: scroll;
  overflow-anchor: none;
  overscroll-behavior-y: contain;
  scrollbar-color: rgba(194, 151, 70, 0.48) rgba(20, 21, 17, 0.45);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.newcomer-task-list::-webkit-scrollbar {
  width: 6px;
}

.newcomer-task-list::-webkit-scrollbar-track {
  border-radius: 6px;
  background: rgba(20, 21, 17, 0.45);
}

.newcomer-task-list::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: rgba(194, 151, 70, 0.48);
}

.newcomer-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 66px;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 8px 9px;
  border: 1px solid rgba(202, 173, 110, 0.2);
  border-radius: 8px;
  background: rgba(27, 27, 21, 0.82);
}

.newcomer-task-row.is-completed {
  border-color: rgba(114, 169, 102, 0.45);
}

.newcomer-task-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.newcomer-task-copy strong {
  color: #ded2b3;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.newcomer-task-copy small {
  display: block;
  min-width: 0;
  color: #9f957d;
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.newcomer-task-progress {
  color: #b9a776;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.newcomer-claim-button {
  width: 66px;
  min-width: 66px;
  min-height: 30px;
  padding: 5px 7px;
  font-size: 11px;
  white-space: nowrap;
  word-break: keep-all;
}

.newcomer-activity-status {
  grid-row: 5;
  min-height: 0;
  margin: 0;
  color: #cb6d62;
  text-align: center;
}

@media (max-width: 480px) {
  .activity-center-layout {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px;
  }

  .activity-center-entry {
    width: 32px;
    min-height: 102px;
    padding: 7px 6px;
    font-size: 12px;
  }

  .newcomer-day-tabs {
    gap: 3px;
  }

  .newcomer-day-tab strong {
    font-size: 10px;
  }

  .newcomer-content-tabs {
    gap: 5px;
  }

  .newcomer-task-row {
    grid-template-columns: minmax(0, 1fr) 42px 54px;
    gap: 4px;
    padding: 7px 6px;
  }

  .newcomer-task-row > * {
    min-width: 0;
  }

  .newcomer-task-copy strong {
    font-size: 12px;
    line-height: 1.25;
  }

  .newcomer-task-copy small {
    font-size: 10px;
    line-height: 1.25;
  }

  .newcomer-task-progress {
    font-size: 10px;
  }

  .newcomer-claim-button {
    width: 54px;
    min-width: 54px;
    padding: 4px 3px;
    font-size: 10px;
  }
}

.cultivate-entry-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.cultivate-entry-button strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.formation-modal {
  width: min(calc(var(--game-design-width) - 28px), 370px);
  max-width: 370px;
  max-height: 360px;
}

.formation-modal__content {
  box-sizing: border-box;
  display: grid;
  width: 100%;
  padding: 16px;
  gap: 12px;
  text-align: center;
}

.formation-modal__hint,
.formation-status {
  margin: 0;
  color: #9f947a;
  font-size: 12px;
  line-height: 1.5;
}

.formation-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.formation-slot {
  display: grid;
  min-width: 0;
  aspect-ratio: 0.9;
  padding: 8px 5px;
  place-content: center;
  gap: 9px;
  border: 1px solid rgba(204, 164, 82, 0.36);
  border-radius: 9px;
  background: linear-gradient(155deg, rgba(48, 42, 28, 0.96), rgba(23, 25, 19, 0.98));
  color: #b6a785;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 170, 0.03);
}

.formation-slot small {
  color: #887f69;
  font-size: 10px;
}

.formation-slot strong {
  overflow: hidden;
  font-size: 27px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.formation-slot[data-main-character="true"] {
  border-color: rgba(224, 181, 89, 0.68);
  color: #e2bd6a;
}

.formation-slot[data-main-character="true"] strong {
  font-size: 20px;
}

.formation-slot:hover,
.formation-slot:focus-visible,
.formation-slot.is-selected {
  border-color: #d6a84d;
  box-shadow: 0 0 0 2px rgba(214, 168, 77, 0.14), inset 0 0 18px rgba(214, 168, 77, 0.08);
}

.formation-slot:disabled {
  cursor: wait;
  opacity: 0.62;
}

.formation-status {
  min-height: 18px;
}

.formation-status[data-state="success"] {
  color: #c8ad68;
}

.formation-status[data-state="error"] {
  color: #b9796d;
}

.formation-status[data-state="selected"] {
  color: #d6b56b;
}

.kungfu-page {
  height: 100%;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  align-content: stretch;
  overflow: hidden;
}

.kungfu-page__summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(194, 151, 70, 0.16);
  border-radius: 7px;
  color: #a89f8b;
  font-size: 12px;
}

.kungfu-page__summary b {
  color: #d9bd7b;
}

.kungfu-page__hint,
.kungfu-empty,
.kungfu-status {
  margin: 0;
  color: #807a6c;
  font-size: 11px;
  line-height: 1.55;
}

.kungfu-categories {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.kungfu-categories::-webkit-scrollbar {
  display: none;
}

.kungfu-category-button {
  min-width: 78px;
  min-height: 36px;
  padding: 7px 10px;
  flex: 1 0 auto;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 7px;
  background: rgba(18, 20, 15, 0.78);
  color: #918a79;
  font-size: 12px;
}

.kungfu-category-button.is-active {
  border-color: rgba(199, 156, 72, 0.68);
  background: linear-gradient(180deg, rgba(134, 99, 39, 0.72), rgba(83, 61, 26, 0.78));
  color: #f0d494;
}

.kungfu-library {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.kungfu-library::-webkit-scrollbar {
  display: none;
}

.kungfu-list {
  display: grid;
  align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 6px;
  height: auto;
  scrollbar-color: rgba(194, 151, 70, 0.32) transparent;
}

.kungfu-list:empty {
  display: none;
}

.kungfu-empty:not([hidden]) {
  display: grid;
  min-height: 120px;
  place-items: center;
  text-align: center;
}

.kungfu-card {
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid rgba(194, 151, 70, 0.18);
  border-radius: 8px;
  background: rgba(38, 39, 30, 0.66);
}

.kungfu-card__heading,
.kungfu-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kungfu-card__heading strong {
  color: #d8b96f;
}

.kungfu-card__heading span,
.kungfu-card > small,
.kungfu-card__footer span {
  color: #918a79;
  font-size: 11px;
}

.kungfu-card p {
  margin: 0;
  color: #d1c9b7;
  font-size: 12px;
}

.kungfu-card .kungfu-card__description {
  color: #9f9786;
  font-size: 11px;
  line-height: 1.45;
}

.kungfu-card .kungfu-card__progression {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.kungfu-card__progression strong {
  flex: 0 0 auto;
  color: #cbb57b;
  font-size: 11px;
  font-weight: 500;
}

.kungfu-card__progression-current,
.kungfu-card__progression-next {
  color: #d8c8a5;
}

.kungfu-card__progression-arrow {
  color: #8f866f;
}

.kungfu-card__progression-maximum {
  color: #9b927e;
  font-size: 10px;
}

.kungfu-card__current-effect {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border-left: 2px solid rgba(194, 151, 70, 0.55);
  background: rgba(16, 17, 13, 0.28);
  color: #c9c0ac;
  font-size: 11px;
  line-height: 1.45;
}

.kungfu-card__current-effect strong {
  color: #e0c581;
  font-size: 12px;
  font-weight: 600;
}

.kungfu-card__milestones {
  display: grid;
  gap: 2px;
}

.kungfu-card .kungfu-card__milestone {
  color: #817b6e;
  font-size: 10px;
  line-height: 1.45;
}

.kungfu-card .kungfu-card__milestone[data-unlocked="true"] {
  color: #e2c575;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(210, 172, 83, 0.18);
}

.kungfu-card .kungfu-card__next {
  color: #8f8879;
  font-size: 10px;
}

.kungfu-card .kungfu-upgrade-button {
  width: auto;
  min-width: 58px;
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1.2;
}

.kungfu-status[data-state="error"] {
  color: #d88672;
}

.kungfu-status[data-state="success"] {
  color: #9fbd85;
}

.physique-content {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 10px;
  scrollbar-color: rgba(194, 151, 70, 0.32) transparent;
}

.physique-panel-section,
.physique-framework-block {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 8px;
  background: rgba(30, 32, 24, 0.66);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.physique-panel-section > h3,
.physique-framework-block h3 {
  margin: 0;
  color: #d8b96f;
  font-size: 14px;
}

.physique-card {
  position: relative;
  display: grid;
  box-sizing: border-box;
  min-height: 142px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 7px;
  padding: 11px;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 8px;
  background: rgba(18, 20, 15, 0.86);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.physique-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.physique-card__heading strong {
  color: var(--physique-quality-color);
  font-size: 14px;
}

.physique-card__heading span,
.physique-card__active,
.physique-framework-block span {
  color: #918a79;
  font-size: 10px;
}

.physique-card__effect {
  display: grid;
  align-content: start;
  gap: 4px;
}

.physique-card__effect > small {
  color: #8f856f;
  font-size: 10px;
}

.physique-effect-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 1.25rem;
  color: #c8c0ae;
  font-size: 11px;
  line-height: 1.5;
}

.physique-refinement-list {
  display: grid;
  gap: 6px;
}

.physique-refinement-panel {
  display: grid;
  align-content: start;
  gap: 8px;
}

.physique-refinement-summary {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 6px;
  background: rgba(30, 32, 24, 0.58);
  color: #918a79;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.physique-refinement-summary[data-state="ready"] {
  color: #d8b96f;
}

.physique-refinement-summary[data-state="shortage"] {
  color: #847f75;
}

.physique-refinement-row {
  display: flex;
  box-sizing: border-box;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 7px 5px 10px;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 7px;
  background: rgba(18, 20, 15, 0.86);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.13);
}

.physique-refinement-name {
  overflow: hidden;
  color: var(--physique-quality-color);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.physique-refine-button {
  flex: 0 0 auto;
  min-width: 62px;
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11px;
}

.physique-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.physique-confirm-actions > button {
  flex: 1;
}

.physique-empty__title {
  color: #c8c0ae;
  font-size: 13px;
}

.physique-content--advance {
  align-content: start;
}

.physique-page[data-active-physique-panel="advance"] {
  scrollbar-width: none;
}

.physique-page[data-active-physique-panel="advance"]::-webkit-scrollbar {
  display: none;
}

.physique-advance-layout {
  display: grid;
  align-content: start;
  grid-template-rows: auto auto;
  gap: 10px;
}

.physique-advance-section {
  display: grid;
  padding: 9px;
  grid-template-rows: auto auto;
  gap: 7px;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 9px;
  background: rgba(30, 32, 24, 0.66);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.physique-subpanel-title {
  width: fit-content;
  min-width: 112px;
  padding: 5px 14px;
  margin: 0 auto;
  border: 1px solid rgba(194, 151, 70, 0.34);
  border-radius: 6px;
  background: rgba(47, 42, 28, 0.82);
  color: #d8b96f;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.physique-origin-exchange,
.physique-advancement {
  display: grid;
  align-content: start;
  gap: 7px;
}

.physique-origin-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.physique-origin-slot,
.physique-origin-output,
.physique-advance-node {
  display: grid;
  min-width: 0;
  padding: 7px 8px;
  gap: 2px;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 7px;
  background: rgba(17, 20, 15, 0.82);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.physique-origin-slot {
  color: inherit;
  cursor: pointer;
}

.physique-origin-slot:hover,
.physique-origin-slot:focus-visible {
  border-color: rgba(216, 185, 111, 0.66);
  outline: none;
}

.physique-origin-slot.is-selected {
  border-color: rgba(216, 185, 111, 0.62);
  background: rgba(54, 47, 29, 0.78);
}

.physique-origin-slot:disabled {
  cursor: default;
  opacity: 0.68;
}

.physique-origin-slot small,
.physique-origin-output small,
.physique-advance-node small {
  color: #7f7868;
  font-size: 9px;
}

.physique-origin-slot strong,
.physique-origin-output strong,
.physique-advance-node strong {
  overflow: hidden;
  color: #cfb36f;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.physique-origin-slot,
.physique-origin-output {
  min-height: 42px;
  align-content: center;
  gap: 1px;
  padding: 5px 7px;
}

.physique-origin-slot span,
.physique-origin-output span,
.physique-advance-node span {
  color: #958c79;
  font-size: 9px;
}

.physique-origin-output {
  width: min(68%, 210px);
  margin: 0 auto;
}

.physique-flow-arrow {
  color: #9d8148;
  font-size: 16px;
  line-height: 1;
  text-align: center;
}

.physique-exchange-button,
.physique-advance-button {
  min-height: 34px;
  padding-block: 7px;
}

.physique-exchange-button {
  width: 100%;
}

.physique-advancement-flow {
  display: grid;
  gap: 4px;
}

.physique-advance-node {
  border-color: rgba(194, 151, 70, 0.22);
}

.physique-advance-node strong {
  color: var(--physique-quality-color, #9e9582);
}

.physique-advance-material {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(13, 15, 12, 0.52);
  color: #a79e8a;
  font-size: 10px;
}

.physique-advance-material strong {
  color: #d2b66f;
  font-weight: 500;
}

.physique-advance-button {
  width: 100%;
}

.physique-advance-button:disabled,
.physique-exchange-button:disabled,
.physique-refine-button:disabled {
  border-color: #4d493e;
  background: #292a25;
  color: #777469;
  cursor: default;
  opacity: 1;
}

.physique-action-modal {
  width: min(calc(var(--game-design-width) - 32px), 360px);
}

.physique-action-modal__content {
  box-sizing: border-box;
  display: grid;
  width: 100%;
  gap: 12px;
}

.physique-rules-modal {
  width: min(calc(var(--game-design-width) - 32px), 340px);
  max-width: 340px;
}

.physique-rules-modal__content {
  width: 100%;
  min-width: 0;
  padding: 15px;
}

.physique-rules-list {
  display: grid;
  gap: 7px;
}

.physique-rules-list section {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(194, 151, 70, 0.18);
  border-radius: 7px;
  background: rgba(20, 22, 17, 0.72);
}

.physique-rules-list strong {
  color: #d8b96f;
  font-size: 11px;
}

.physique-rules-list p {
  margin: 0;
  color: #a49b88;
  font-size: 10px;
  line-height: 1.55;
}

.physique-action-hint,
.physique-confirm-text {
  margin: 0;
  color: #a49b88;
  font-size: 11px;
  line-height: 1.65;
  text-align: center;
}

.physique-confirm-text {
  white-space: pre-line;
}

.physique-refine-confirm-modal {
  width: min(calc(var(--game-design-width) - 32px), 310px);
  min-width: min(calc(var(--game-design-width) - 40px), 260px);
  max-width: 310px;
}

.physique-refine-confirm-modal__content {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 15px 18px 16px;
  gap: 12px;
  text-align: center;
}

.physique-refine-confirm-modal__content .attribute-modal__heading {
  position: relative;
  min-height: 28px;
  justify-content: center;
}

.physique-refine-confirm-modal__content .attribute-modal__heading h2 {
  font-size: 18px;
}

.physique-refine-confirm-modal__content .attribute-modal__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  font-size: 18px;
}

.physique-refine-confirm-modal__content .physique-confirm-text {
  color: #c8bda6;
  font-size: 14px;
  line-height: 1.5;
}

.physique-refine-confirm-detail {
  display: grid;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(17, 19, 15, 0.58);
  text-align: left;
}

.physique-refine-confirm-detail .physique-effect-list {
  font-size: 12px;
  line-height: 1.5;
}

.physique-refine-confirm-cost {
  margin: 0;
  color: #d8b96f;
  font-size: 12px;
  text-align: center;
}

.physique-refine-confirm-modal__content .physique-confirm-actions {
  justify-content: center;
  gap: 10px;
}

.physique-refine-confirm-modal__content .physique-confirm-actions > button {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 7px 16px;
  font-size: 12px;
}

.physique-origin-options {
  display: grid;
  max-height: 320px;
  gap: 7px;
  overflow-y: auto;
}

.physique-origin-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 7px;
  background: rgba(25, 27, 21, 0.84);
  color: #bcb39f;
}

.physique-origin-option.is-selected {
  border-color: rgba(216, 185, 111, 0.72);
  background: rgba(72, 57, 29, 0.6);
}

.physique-origin-option:disabled {
  color: #69675f;
  opacity: 0.62;
}

.physique-origin-option strong {
  margin-right: auto;
  font-size: 12px;
}

.physique-origin-option span {
  font-size: 10px;
}

.physique-origin-option .physique-origin-option__icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(194, 151, 70, 0.28);
  border-radius: 50%;
  background: rgba(54, 45, 27, 0.72);
  color: #d6b66d;
  font-size: 12px;
}

.physique-action-confirm {
  width: 100%;
}

.physique-empty,
.physique-framework-block p {
  margin: 0;
  color: #918a79;
  font-size: 11px;
  line-height: 1.65;
}

.physique-framework-block span {
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid rgba(143, 136, 121, 0.22);
  border-radius: 999px;
}

.artifact-page {
  align-content: start;
}

.artifact-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.artifact-tabs button {
  min-height: 34px;
  border: 1px solid rgba(190, 157, 84, 0.24);
  border-radius: 7px;
  background: rgba(32, 30, 25, 0.88);
  color: #9f947a;
}

.artifact-tabs button.is-active {
  border-color: rgba(214, 181, 107, 0.72);
  background: linear-gradient(145deg, #463a21, #28251a);
  color: #e4c978;
}

.artifact-panel {
  display: grid;
  min-height: 0;
  align-content: start;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.artifact-panel[hidden] {
  display: none;
}

.artifact-card {
  display: grid;
  min-height: 76px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border: 1px solid rgba(190, 157, 84, 0.24);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(46, 41, 31, 0.95), rgba(29, 29, 24, 0.95));
  color: #c9b98f;
}

.artifact-card[data-equipped="true"] {
  border-color: rgba(224, 186, 91, 0.72);
  box-shadow: inset 0 0 0 1px rgba(246, 212, 126, 0.08);
}

.artifact-card__info {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.artifact-card__info strong {
  color: #e2cb88;
  font-size: 0.9rem;
}

.artifact-card__info span {
  color: #a89b80;
  font-size: 0.75rem;
}

.artifact-card__equip {
  width: 68px;
  min-height: 32px;
  padding: 6px 8px;
  white-space: nowrap;
}

.artifact-empty {
  grid-column: 1 / -1;
  margin: 24px 8px;
  color: #8f856f;
  font-size: 0.78rem;
  line-height: 1.7;
  text-align: center;
}

[data-role="artifact-cultivation"] {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.artifact-cultivation-header,
.artifact-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(190, 157, 84, 0.22);
  border-radius: 8px;
  background: rgba(36, 33, 27, 0.88);
}

.artifact-cultivation-header strong,
.artifact-progress strong {
  color: #e2ca83;
}

.artifact-cultivation-header span,
.artifact-progress span {
  color: #a79a7e;
  font-size: 0.76rem;
}

.artifact-attributes-panel {
  display: grid;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(190, 157, 84, 0.22);
  border-radius: 8px;
  background: rgba(36, 33, 27, 0.88);
}

.artifact-attributes-panel h3 {
  margin: 0;
  color: #d8be76;
  font-size: 0.82rem;
  text-align: center;
}

.artifact-attribute-group {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.artifact-attribute-group > strong {
  color: #9f947a;
  font-size: 0.7rem;
  line-height: 1.65;
}

.artifact-attribute-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
  color: #cbb575;
  font-size: 0.7rem;
  line-height: 1.65;
}

.artifact-attribute-potential,
.artifact-attribute-pending {
  grid-column: 1 / -1;
  text-align: center;
}

.artifact-attribute-potential {
  color: #c8b47c;
}

.artifact-attribute-pending {
  color: #837b6a;
  font-size: 0.66rem;
}

.artifact-attribute-speed {
  padding-top: 7px;
  border-top: 1px solid rgba(190, 157, 84, 0.14);
  color: #d8bd75;
  font-size: 0.72rem;
  text-align: center;
}

.artifact-progress {
  display: grid;
  grid-template-columns: 1fr auto;
}

.artifact-progress__bar {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #171812;
}

.artifact-progress__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #866727, #e1ba5c);
}

.artifact-costs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.artifact-cost-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid rgba(190, 157, 84, 0.16);
  border-radius: 6px;
  background: rgba(36, 33, 27, 0.7);
  color: #a89b80;
  font-size: 0.68rem;
}

.artifact-cost-row strong {
  color: #d5bd78;
  white-space: nowrap;
}

.artifact-cost-row.is-insufficient strong {
  color: #817c72;
}

.artifact-cultivation-actions,
.artifact-action-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.artifact-nourish-state,
.artifact-status,
.artifact-action-summary {
  margin: 0;
  color: #968b74;
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: center;
}

.artifact-status[data-state="success"] {
  color: #cdb56e;
}

.artifact-status[data-state="error"] {
  color: #b97b6c;
}

.artifact-action-dialog {
  width: min(340px, calc(var(--game-design-width) - 32px));
  max-width: 340px;
  height: auto;
  max-height: 640px;
  margin: auto;
}

.artifact-action-dialog__content {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  gap: 10px;
  padding: 14px;
}

[data-role="artifact-custom-dialog"] .attribute-modal__heading h2 {
  flex: 1;
  padding-left: 26px;
  text-align: center;
}

.artifact-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #d3bd7c;
}

[data-role="artifact-detail-content"] {
  display: grid;
  gap: 9px;
}

[data-role="artifact-detail-content"] p {
  margin: 0;
  color: #9f947c;
  font-size: 0.74rem;
  line-height: 1.55;
}

.artifact-field {
  display: grid;
  gap: 6px;
  color: #a89b80;
  font-size: 0.76rem;
}

.artifact-field select {
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid rgba(190, 157, 84, 0.28);
  border-radius: 6px;
  background: #24231d;
  color: #d5bf7d;
}

.artifact-choice-section {
  min-width: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(190, 157, 84, 0.2);
  border-radius: 8px;
}

.artifact-choice-section legend {
  margin: 0 auto;
  padding: 0 5px;
  color: #b8aa8a;
  font-size: 0.74rem;
}

.artifact-choice-grid,
.artifact-sub-fields > div {
  display: grid;
  gap: 6px;
}

.artifact-choice-grid--appearance {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.artifact-choice-grid--main,
.artifact-sub-fields > div {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.artifact-choice-grid label,
.artifact-sub-fields label {
  position: relative;
  min-width: 0;
}

.artifact-choice-grid input,
.artifact-sub-fields input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.artifact-choice-grid label span,
.artifact-sub-fields label span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 3px;
  border: 1px solid rgba(190, 157, 84, 0.18);
  border-radius: 6px;
  background: rgba(29, 29, 24, 0.9);
  color: #a79a80;
  font-size: 0.68rem;
  text-align: center;
}

.artifact-choice-grid input:checked + span,
.artifact-sub-fields input:checked + span {
  border-color: rgba(224, 186, 91, 0.75);
  background: linear-gradient(145deg, #4a3b20, #2b271a);
  color: #ebcc76;
  box-shadow: inset 0 0 0 1px rgba(247, 217, 135, 0.08);
}

.artifact-sub-fields label.is-disabled span {
  color: #625e54;
  opacity: 0.62;
}

.artifact-result-dialog {
  width: min(290px, calc(var(--game-design-width) - 40px));
  min-width: 0;
  max-width: 290px;
  height: auto;
  margin: auto;
}

.artifact-result-dialog__content {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  gap: 10px;
  padding: 18px;
  text-align: center;
}

.artifact-result-dialog__content h2,
.artifact-result-dialog__content p {
  margin: 0;
}

.artifact-result-dialog__content h2 {
  color: #dcbf70;
  font-size: 1rem;
}

.artifact-result-dialog__content p {
  color: #b4a688;
  font-size: 0.76rem;
  line-height: 1.55;
}

.artifact-result-dialog__content button {
  min-width: 88px;
  justify-self: center;
}

.guide-dialog {
  width: min(300px, calc(var(--game-design-width) - 40px));
  min-width: 0;
  max-width: 300px;
  height: auto;
  margin: auto;
}

.guide-dialog__content {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  gap: 12px;
  padding: 18px;
  text-align: center;
}

.guide-dialog__content h2,
.guide-dialog__content p {
  margin: 0;
}

.guide-dialog__content h2 {
  color: #dcbf70;
  font-size: 1rem;
}

.guide-dialog__content p {
  color: #b4a688;
  font-size: 0.78rem;
  line-height: 1.65;
  white-space: pre-line;
}

.guide-dialog__content button {
  min-width: 88px;
  justify-self: center;
}

@media (max-width: 0px) {
  .artifact-panel,
  .artifact-costs {
    grid-template-columns: minmax(0, 1fr);
  }
}

.bag-sell-note {
  margin: 10px 0 0;
  color: #716b5c;
  font-size: 10px;
  text-align: center;
}

.slot-selection-context {
  display: flex;
  padding: 12px;
  margin-top: 14px;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(194, 151, 70, 0.16);
  border-radius: 8px;
  background: rgba(9, 12, 9, 0.45);
}

.slot-selection-context__icon {
  display: grid;
  width: 46px;
  aspect-ratio: 1;
  flex: 0 0 46px;
  place-items: center;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 7px;
  background: rgba(20, 23, 17, 0.8);
  color: #665f50;
  font-size: 11px;
}

.slot-selection-context span,
.slot-selection-context strong {
  display: block;
}

.slot-selection-context span {
  color: #807865;
  font-size: 11px;
}

.slot-selection-context strong {
  margin-top: 4px;
  color: #c9ad73;
  font-size: 15px;
  font-weight: 500;
}

.slot-selection-board {
  display: grid;
  max-height: 340px;
  padding: 12px;
  margin-top: 12px;
  gap: 8px;
  overflow-y: auto;
  border: 1px dashed rgba(194, 151, 70, 0.2);
  border-radius: 8px;
  color: #766f5e;
  text-align: center;
}

.equipment-choice {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 7px;
  background: rgba(12, 15, 11, 0.72);
  color: #a99d82;
  text-align: left;
  cursor: pointer;
}

.equipment-choice:hover,
.equipment-choice:focus-visible {
  border-color: rgba(205, 166, 86, 0.66);
  background: rgba(57, 48, 29, 0.42);
  outline: none;
}

.equipment-choice:disabled {
  cursor: default;
  opacity: 0.62;
}

.equipment-choice--current {
  border-color: rgba(205, 166, 86, 0.52);
  background: rgba(57, 48, 29, 0.32);
  cursor: default;
}

.equipment-choice span,
.equipment-choice strong,
.equipment-choice small {
  display: block;
  min-width: 0;
}

.equipment-choice span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.equipment-choice strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-choice small {
  margin: 0;
  color: #817967;
  font-size: 10px;
}

.equipment-unequip-button {
  width: 100%;
}

.slot-selection-empty {
  padding: 18px 8px;
}

.slot-selection-board p {
  margin: 0;
  color: #91866f;
  font-size: 13px;
}

.slot-selection-board small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.5;
}

.dungeon-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dungeon-heading h2 {
  margin: 0;
}

.dungeon-sweep-compact {
  padding: 4px 8px;
  border: 1px solid rgba(194, 151, 70, 0.28);
  border-radius: 999px;
  background: rgba(40, 34, 22, 0.58);
  color: #93866c;
  font-size: 10px;
  white-space: nowrap;
}

.dungeon-sweep-compact b {
  margin-left: 3px;
  color: #c9ad70;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.dungeon-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.dungeon-category-button {
  min-width: 0;
  min-height: 34px;
  padding: 5px 3px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 6px;
  background: rgba(20, 22, 17, 0.72);
  color: #92876f;
  cursor: pointer;
  font-size: 10px;
}

.dungeon-category-button span,
.dungeon-category-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dungeon-category-button small {
  margin-top: 1px;
  color: #625e53;
  font-size: 8px;
}

.dungeon-category-button.is-active {
  border-color: rgba(194, 151, 70, 0.6);
  background: linear-gradient(180deg, rgba(119, 87, 34, 0.72), rgba(66, 50, 24, 0.74));
  color: #ead49f;
}

.dungeon-category-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.dungeon-active-run {
  display: none !important;
  margin-top: 10px;
  padding: 9px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(174, 133, 57, 0.34);
  border-radius: 7px;
  background: rgba(61, 47, 24, 0.45);
}

.dungeon-active-run[hidden] {
  display: none;
}

.dungeon-active-run span,
.dungeon-active-run strong,
.dungeon-active-run small {
  display: block;
}

.dungeon-active-run span {
  color: #7f7662;
  font-size: 8px;
}

.dungeon-active-run strong {
  margin-top: 2px;
  color: #cfb475;
  font-size: 13px;
  font-weight: 500;
}

.dungeon-active-run small {
  margin-top: 3px;
  color: #91856c;
  font-size: 9px;
}

.dungeon-active-run small b {
  color: #bca575;
  font-weight: 500;
}

.dungeon-active-run button {
  min-width: 72px;
  padding: 6px 8px;
  font-size: 9px;
}

.dungeon-active-run__actions {
  display: grid;
  gap: 5px;
  min-width: 94px;
}

.dungeon-status {
  min-height: 1.5em;
  margin-top: 9px !important;
  color: #817a68 !important;
  font-size: 10px;
}

.dungeon-status:empty {
  display: none;
}

.dungeon-status[data-state="ready"] {
  color: #9aad7b !important;
}

.dungeon-status[data-state="error"] {
  color: #d88672 !important;
}

.dungeon-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.dungeon-category-empty {
  margin: 0;
  padding: 18px 10px;
  border: 1px dashed rgba(194, 151, 70, 0.18);
  border-radius: 7px;
  color: #736d5e;
  text-align: center;
  font-size: 11px;
}

.dungeon-card {
  display: grid;
  grid-template-columns: minmax(56px, 20fr) minmax(0, 55fr) minmax(70px, 25fr);
  gap: 6px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(28, 29, 20, 0.74), rgba(9, 12, 9, 0.54));
}

.dungeon-card.is-locked {
  border-color: rgba(118, 116, 106, 0.22);
  background: linear-gradient(135deg, rgba(31, 31, 28, 0.68), rgba(14, 15, 14, 0.56));
}

.dungeon-card.is-locked .dungeon-card__art {
  border-color: rgba(118, 116, 106, 0.3);
  filter: grayscale(1);
}

.dungeon-card.is-locked .dungeon-card__body h3,
.dungeon-card.is-locked .dungeon-card__recommendation,
.dungeon-card.is-locked .dungeon-card__daily {
  color: #77756d !important;
}

.dungeon-card__art {
  display: grid;
  width: 100%;
  aspect-ratio: 3 / 4;
  align-self: center;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(190, 145, 66, 0.36);
  border-radius: 7px;
  background: radial-gradient(circle, rgba(148, 103, 43, 0.22), #10130f 72%);
  color: #c09a55;
  font-size: 14px;
}

.dungeon-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dungeon-card__body {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.dungeon-card__body h3 {
  width: 100%;
  margin: 0;
  overflow: hidden;
  color: #d5b66f;
  font-size: 16px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dungeon-card__body > p {
  width: 100%;
  margin: 4px 0 0;
  color: #817a68;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.dungeon-card__recommendation {
  color: #aa9569 !important;
}

.dungeon-card__difficulty-selector {
  min-height: 26px;
  margin-top: 5px;
  padding: 3px 9px;
  border: 1px solid rgba(194, 151, 70, 0.36);
  border-radius: 5px;
  background: rgba(92, 67, 27, 0.22);
  color: #c9a75d;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.25;
  cursor: pointer;
}

.dungeon-card__difficulty-selector::after {
  content: " ▾";
  color: #8f7849;
}

.dungeon-card__difficulty-selector:hover,
.dungeon-card__difficulty-selector:focus-visible {
  border-color: rgba(221, 180, 91, 0.65);
  color: #e0bf75;
}

.dungeon-card__daily {
  color: #c3a665 !important;
  font-weight: 500;
}

.dungeon-difficulty-modal__content {
  width: min(270px, calc(var(--game-design-width) - 40px));
}

.dungeon-difficulty-options {
  display: grid;
  max-height: 330px;
  gap: 8px;
  padding: 4px 1px 1px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dungeon-difficulty-option {
  width: 100%;
  min-height: 38px;
  font-size: 13px;
}

.dungeon-difficulty-option.is-selected {
  border-color: #b99243;
  background: linear-gradient(135deg, rgba(117, 84, 29, 0.72), rgba(72, 53, 22, 0.72));
  color: #efd18a;
}

.dungeon-card__actions {
  display: grid;
  grid-template-rows: repeat(2, minmax(32px, 36px));
  gap: 6px;
  min-width: 0;
  align-content: center;
}

.dungeon-card__action-button {
  width: 100%;
  min-height: 32px;
  padding: 4px;
  font-size: 9px;
  line-height: 1.25;
}

.dungeon-card__action-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.dungeon-card__sweep-button.is-running,
.dungeon-card__sweep-button.is-settling {
  border-color: #4b4a40;
  background: #282923;
  color: #999486;
  opacity: 1;
  padding: 3px;
}

.dungeon-card__sweep-button span,
.dungeon-card__sweep-button strong {
  display: block;
  line-height: 1;
}

.dungeon-card__sweep-button span {
  font-size: 8px;
}

.dungeon-card__sweep-button strong {
  margin-top: 2px;
  color: #c1b18e;
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.dungeon-sweep-modal__content {
  width: 100%;
  padding: 14px;
  text-align: left;
}

.dungeon-sweep-modal {
  width: min(280px, calc(var(--game-design-width) - 32px));
  min-width: 0;
  max-width: 280px;
}

.dungeon-sweep-modal .attribute-modal__heading h2 {
  flex: 1;
  padding-left: 0;
  text-align: left;
}

.dungeon-sweep-stepper {
  display: grid;
  grid-template-columns: 40px 72px 40px 52px;
  margin-top: 14px;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dungeon-sweep-stepper button {
  width: 40px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(194, 151, 70, 0.32);
  border-radius: 6px;
  background: #25251d;
  color: #d2b572;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.dungeon-sweep-stepper .dungeon-sweep-stepper__max {
  width: 52px;
  font-size: 12px;
}

.dungeon-sweep-stepper button:disabled {
  border-color: #414139;
  color: #706e64;
  cursor: not-allowed;
  opacity: 0.65;
}

.dungeon-sweep-stepper strong {
  display: grid;
  min-height: 36px;
  place-items: center;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 6px;
  background: rgba(13, 16, 12, 0.72);
  color: #e0c17b;
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.dungeon-sweep-modal__meta {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #918773;
  font-size: 11px;
  line-height: 1.4;
}

.dungeon-sweep-modal__meta b {
  color: #c7ad72;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.dungeon-sweep-confirm {
  width: 100%;
  margin-top: 12px;
}

.dungeon-sweep-confirm:disabled {
  border-color: #4a493f;
  background: #292a26;
  color: #858278;
  cursor: not-allowed;
  opacity: 0.68;
}

.map-status {
  min-height: 1.5em;
  margin-top: 10px !important;
  color: #9f9a86 !important;
  font-size: 13px;
}

.map-status[data-state="success"] {
  color: #9fbd85 !important;
}

.map-status[data-state="error"] {
  color: #d88672 !important;
}

.monster-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.monster-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 8px;
  background: rgba(12, 15, 11, 0.5);
}

.monster-card__art {
  display: grid;
  width: 76px;
  aspect-ratio: 3 / 4;
  place-items: center;
  overflow: hidden;
  border: 1px solid #4b432d;
  border-radius: 7px;
  background: radial-gradient(circle, rgba(141, 94, 46, 0.2), #10130f 70%);
  color: #b99554;
  font-size: 24px;
}

.monster-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.monster-card__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.monster-card__heading h3 {
  margin: 0;
  color: #d3ad62;
  font-size: 16px;
}

.monster-card__heading span {
  color: #94876d;
  font-size: 11px;
  white-space: nowrap;
}

.monster-card__body > p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.monster-card__stats,
.monster-card__drops {
  color: #8c846f !important;
}

.monster-card__button {
  width: 100%;
  margin-top: 10px;
  padding-block: 8px;
}

.monster-card__button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.battle-report {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(194, 151, 70, 0.25);
  border-radius: 8px;
  background: rgba(22, 20, 14, 0.72);
}

.battle-report summary {
  color: #d3ad62;
  cursor: pointer;
}

.battle-report > p {
  margin-top: 9px;
  font-size: 12px;
}

.battle-report h3 {
  margin: 14px 0 7px;
  color: #b9a575;
  font-size: 14px;
}

.battle-rewards,
.battle-log {
  margin: 0;
  color: #a99f8d;
  font-size: 12px;
  line-height: 1.7;
}

.battle-log {
  max-height: 240px;
  padding-left: 24px;
  overflow-y: auto;
}

/* 副本战斗事件只供结算与调试使用，不向正式玩家界面展示。 */
.dungeon-panel .battle-report--internal {
  display: none !important;
}

@media (max-width: 0px) {
  .monster-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .monster-card__art {
    width: 64px;
  }

  .dungeon-card {
    grid-template-columns: minmax(52px, 20fr) minmax(0, 54fr) minmax(66px, 26fr);
    gap: 5px;
    padding: 7px;
  }

  .dungeon-card__art {
    width: 100%;
  }

  .dungeon-card__body h3 {
    font-size: 14px;
  }

  .dungeon-card__body > p {
    margin-top: 3px;
    font-size: 10px;
  }

  .dungeon-card__action-button {
    font-size: 9px !important;
  }
}

.alchemy-panel[hidden],
.forging-panel[hidden],
.cave-industry-panel[hidden],
.spirit-root-panel[hidden],
.alchemy-status[hidden],
.forging-status[hidden] {
  display: none;
}

.alchemy-panel {
  display: grid;
  gap: 9px;
}

.forging-panel {
  display: grid;
  gap: 9px;
}

.alchemy-selector-bar {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 9px;
}

.alchemy-selector-button {
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid rgba(190, 157, 84, 0.32);
  border-radius: 9px;
  background: rgba(35, 32, 27, 0.94);
  color: #a99d81;
  text-align: left;
}

.alchemy-selector-button:last-child {
  text-align: right;
}

.alchemy-selector-button span,
.alchemy-selector-button strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alchemy-selector-button span {
  font-size: 0.68rem;
}

.alchemy-selector-button strong {
  margin-top: 3px;
  color: #e0c77c;
  font-size: 0.86rem;
}

.alchemy-selector-button:disabled {
  opacity: 0.58;
}

.alchemy-visual-stage {
  min-height: 300px;
  height: 350px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(190, 157, 84, 0.24);
  border-radius: 11px;
  background:
    radial-gradient(circle at 50% 50%, rgba(129, 96, 36, 0.12), transparent 43%),
    rgba(27, 25, 21, 0.92);
}

.alchemy-furnace-zone {
  min-height: 0;
  display: grid;
  place-items: start center;
}

.alchemy-furnace-art {
  position: relative;
  width: min(58%, 220px);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(205, 168, 78, 0.36);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(52, 45, 32, 0.98), rgba(25, 23, 20, 0.98));
  color: #847963;
  box-shadow: inset 0 0 24px rgba(147, 108, 38, 0.1);
}

.alchemy-furnace-art > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.alchemy-furnace-art > span {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.alchemy-product-slot {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: clamp(50px, 30%, 70px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(212, 177, 87, 0.48);
  border-radius: 9px;
  background: rgba(18, 18, 16, 0.9);
  color: #766e60;
  font-size: 0.68rem;
}

.alchemy-product-slot.is-ready {
  border-color: rgba(230, 190, 82, 0.92);
  background: rgba(67, 51, 24, 0.96);
  color: #f0d783;
  box-shadow: 0 0 18px rgba(207, 157, 48, 0.28);
}

.alchemy-product-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.alchemy-material-slot {
  min-width: 0;
  width: 100%;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  padding: 7px 4px 6px;
  border: 1px solid rgba(190, 157, 84, 0.2);
  border-radius: 8px;
  background: rgba(37, 34, 28, 0.82);
  color: #bfb392;
  text-align: center;
}

.alchemy-material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.alchemy-material-slot__art {
  width: clamp(50px, 14vw, 64px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(190, 157, 84, 0.34);
  border-radius: 8px;
  background: rgba(41, 37, 30, 0.96);
  color: #807665;
  font-size: 0.66rem;
}

.alchemy-material-slot__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.alchemy-material-slot > strong {
  width: 100%;
  min-height: 2.1em;
  font-size: 0.68rem;
  line-height: 1.05;
}

.alchemy-material-slot > small {
  color: #817765;
  font-size: 0.61rem;
}

.alchemy-material-slot.is-insufficient > small {
  color: #bd746b;
}

.alchemy-control-panel {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 11px;
  border: 1px solid rgba(190, 157, 84, 0.24);
  border-radius: 10px;
  background: rgba(29, 26, 23, 0.9);
}

.alchemy-quantity-control {
  display: grid;
  grid-template-columns: 34px minmax(58px, auto) 34px;
  align-items: center;
  gap: 13px;
}

.alchemy-quantity-control strong {
  color: #e4cb80;
  font-size: 1.18rem;
  text-align: center;
}

.alchemy-quantity-control button {
  width: 34px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(190, 157, 84, 0.4);
  border-radius: 7px;
  background: rgba(57, 49, 34, 0.95);
  color: #dfc77f;
  font-size: 1rem;
}

.alchemy-quantity-control button:disabled {
  border-color: rgba(105, 98, 84, 0.24);
  background: #292823;
  color: #686356;
}

.crafting-rules-entry {
  width: min(100%, 360px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 5px auto -2px;
}

.crafting-rules-button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(190, 157, 84, 0.38);
  border-radius: 7px;
  background: rgba(57, 49, 34, 0.82);
  color: #dfc77f;
  font-size: 0.66rem;
}

.alchemy-primary-action {
  width: min(100%, 260px);
  min-height: 45px;
  font-size: 0.92rem;
}

.alchemy-primary-action[data-state="completed"] {
  box-shadow: 0 0 16px rgba(211, 165, 55, 0.2);
}

.alchemy-primary-action:disabled,
.alchemy-primary-action[data-state="disabled"] {
  border-color: rgba(105, 98, 84, 0.28);
  background: #33312b;
  color: #777164;
  opacity: 1;
}

.alchemy-status {
  margin: 0;
  color: #b9ae91;
  font-size: 0.7rem;
  text-align: center;
}

.alchemy-status[data-state="error"] {
  color: #d58a80;
}

.alchemy-status[data-state="success"] {
  color: #d5bf7b;
}

.alchemy-selection-modal {
  width: min(calc(var(--game-design-width) - 32px), 280px);
  max-width: 280px;
}

.alchemy-yield-modal {
  width: min(calc(var(--game-design-width) - 32px), 360px);
  max-width: 360px;
}

.alchemy-yield-modal__content {
  width: 100%;
  min-width: 0;
  padding: 16px;
}

.alchemy-yield-rule-summary {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid rgba(190, 157, 84, 0.22);
  border-radius: 9px;
  background: rgba(25, 23, 20, 0.78);
}

.alchemy-yield-rule-summary p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: #aaa18b;
  font-size: 0.7rem;
}

.alchemy-yield-rule-summary strong {
  color: #ddc477;
  text-align: right;
}

.alchemy-yield-outcomes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.alchemy-yield-outcome {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(190, 157, 84, 0.16);
  border-radius: 7px;
  color: #bcb29a;
  font-size: 0.66rem;
}

.alchemy-yield-outcome strong {
  color: #dfc77f;
}

.alchemy-yield-rule-note {
  margin: 10px 0 0;
  color: #948d7c;
  font-size: 0.64rem;
  line-height: 1.55;
  text-align: center;
}

.alchemy-selection-modal__content {
  width: 100%;
  min-width: 0;
  padding: 14px;
}

.alchemy-selection-modal__content .attribute-modal__heading {
  margin-bottom: 10px;
}

.alchemy-selection-modal__content .attribute-modal__heading h2 {
  font-size: 20px;
}

.alchemy-selection-list {
  width: 100%;
  max-height: 440px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
}

.alchemy-selection-list--scroll {
  overflow-x: hidden;
  overflow-y: auto;
}

.alchemy-selection-option {
  width: 100%;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 108px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 9px 13px;
  border: 1px solid rgba(190, 157, 84, 0.28);
  border-radius: 8px;
  background: rgba(41, 37, 30, 0.96);
  color: #cbbd99;
  text-align: left;
}

.alchemy-selection-option.is-active {
  border-color: rgba(220, 181, 86, 0.72);
  background: rgba(74, 59, 31, 0.9);
  color: #efd587;
}

.alchemy-selection-option--name-only {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  text-align: center;
}

.alchemy-selection-option__art {
  width: 84px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(190, 157, 84, 0.25);
  border-radius: 7px;
  background: #27251f;
  color: #7f7664;
  font-size: 0.65rem;
}

.alchemy-selection-option__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.alchemy-selection-option strong,
.alchemy-selection-option small {
  display: block;
}

.alchemy-selection-option strong {
  color: #e0c373;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.alchemy-selection-option small {
  margin-top: 3px;
  color: #8d826d;
  font-size: 0.67rem;
}

.forging-visual-stage {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(190, 157, 84, 0.24);
  border-radius: 11px;
  background:
    radial-gradient(circle at 50% 34%, rgba(129, 96, 36, 0.14), transparent 38%),
    rgba(27, 25, 21, 0.92);
}

.forging-furnace-zone {
  width: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
}

.forging-furnace-art {
  position: relative;
  width: min(62%, 230px);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(205, 168, 78, 0.36);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(52, 45, 32, 0.98), rgba(25, 23, 20, 0.98));
  color: #847963;
  box-shadow: inset 0 0 24px rgba(147, 108, 38, 0.1);
}

.forging-furnace-art > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.forging-furnace-art > span {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.forging-product-slot {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: clamp(52px, 29%, 72px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(212, 177, 87, 0.48);
  border-radius: 9px;
  background: rgba(18, 18, 16, 0.9);
  color: #766e60;
  font-size: 0.68rem;
}

.forging-product-slot.is-ready {
  border-color: rgba(230, 190, 82, 0.92);
  background: rgba(67, 51, 24, 0.96);
  color: #f0d783;
  box-shadow: 0 0 18px rgba(207, 157, 48, 0.28);
}

.forging-product-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.forging-core-slot {
  width: min(100%, 250px);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid rgba(190, 157, 84, 0.26);
  border-radius: 8px;
  background: rgba(37, 34, 28, 0.86);
  color: #bfb392;
}

.forging-core-slot[hidden] {
  display: none;
}

.forging-core-slot__art {
  width: 48px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(190, 157, 84, 0.3);
  border-radius: 7px;
  background: rgba(41, 37, 30, 0.96);
  color: #807665;
  font-size: 0.62rem;
}

.forging-core-slot__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.forging-core-slot > div:last-child,
.forging-core-slot > div:last-child > * {
  display: block;
  min-width: 0;
}

.forging-core-slot small {
  color: #817765;
  font-size: 0.61rem;
}

.forging-core-slot strong {
  margin: 2px 0;
  color: #d9c27d;
  font-size: 0.76rem;
}

.forging-core-slot span {
  font-size: 0.65rem;
}

.forging-core-slot.is-insufficient > div:last-child > span {
  color: #bd746b;
}

.forging-preview {
  margin: 0;
  color: #b9ac8a;
  font-size: 0.7rem;
  text-align: center;
}

.forging-material-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.forging-material-slot {
  min-width: 0;
  width: 100%;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  padding: 7px 4px 6px;
  border: 1px solid rgba(190, 157, 84, 0.25);
  border-radius: 8px;
  background: rgba(37, 34, 28, 0.82);
  color: #bfb392;
  text-align: center;
}

.forging-material-slot:not(:disabled):hover,
.forging-material-slot:not(:disabled):focus-visible {
  border-color: rgba(220, 181, 86, 0.62);
  outline: none;
}

.forging-material-slot:disabled {
  opacity: 0.74;
}

.forging-material-slot.is-fixed:disabled {
  opacity: 1;
  cursor: default;
}

.forging-material-slot__art {
  width: clamp(50px, 14vw, 64px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(190, 157, 84, 0.34);
  border-radius: 8px;
  background: rgba(41, 37, 30, 0.96);
  color: #807665;
  font-size: 0.66rem;
}

.forging-material-slot__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.forging-material-slot > strong {
  width: 100%;
  min-height: 2.1em;
  color: #c7b890;
  font-size: 0.68rem;
  line-height: 1.05;
}

.forging-material-slot > small {
  color: #817765;
  font-size: 0.61rem;
}

.forging-material-slot.is-insufficient > small {
  color: #bd746b;
}

.forging-control-panel {
  display: grid;
  justify-items: center;
  padding: 11px;
  border: 1px solid rgba(190, 157, 84, 0.24);
  border-radius: 10px;
  background: rgba(29, 26, 23, 0.9);
}

.forging-primary-action {
  width: min(100%, 260px);
  min-height: 45px;
  font-size: 0.92rem;
}

.forging-primary-action[data-state="completed"] {
  box-shadow: 0 0 16px rgba(211, 165, 55, 0.2);
}

.forging-primary-action:disabled,
.forging-primary-action[data-state="disabled"] {
  border-color: rgba(105, 98, 84, 0.28);
  background: #33312b;
  color: #777164;
  opacity: 1;
}

.forging-status {
  margin: 0;
  color: #b9ae91;
  font-size: 0.7rem;
  text-align: center;
}

.forging-status[data-state="error"] {
  color: #d58a80;
}

.forging-status[data-state="success"] {
  color: #d5bf7b;
}

.forging-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.forging-dialog-heading h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  text-align: left;
}

.forging-dialog-heading .attribute-modal__close {
  flex: 0 0 32px;
  margin-left: auto;
}

.forging-dialog-back {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(190, 157, 84, 0.28);
  border-radius: 50%;
  background: rgba(35, 32, 27, 0.94);
  color: #d4bc75;
}

.forging-dialog-back[hidden] {
  display: none;
}

.alchemy-selection-option:disabled {
  border-color: rgba(105, 98, 84, 0.2);
  color: #6f695c;
  opacity: 0.58;
}

@media all {
  .alchemy-visual-stage {
    min-height: 292px;
    height: 321px;
    padding: 8px;
  }

  .alchemy-selector-button {
    padding: 8px 10px;
  }

  .alchemy-furnace-art {
    width: 56%;
  }

  .alchemy-material-grid {
    gap: 5px;
  }

  .alchemy-material-slot {
    padding-inline: 2px;
  }

  .forging-visual-stage {
    padding: 8px;
  }

  .forging-furnace-art {
    width: 59%;
  }

  .forging-material-grid {
    gap: 5px;
  }

  .forging-material-slot {
    padding-inline: 2px;
  }
}

.create-form {
  margin-top: 16px;
}

.create-form label {
  display: block;
  margin-bottom: 8px;
  color: #c3b89e;
  font-size: 14px;
}

.create-form > input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #51482f;
  border-radius: 6px;
  outline: none;
  background: #10130f;
  color: #eee4cc;
}

.create-form > input:focus {
  border-color: #ad8a45;
  box-shadow: 0 0 0 3px rgba(173, 138, 69, 0.12);
}

.primary-button,
.secondary-button {
  padding: 10px 14px;
  border-radius: 6px;
}

.primary-button {
  border: 1px solid #bd9446;
  background: linear-gradient(180deg, #aa813a, #775621);
  color: #fff5db;
}

.secondary-button {
  border: 1px solid #625537;
  background: #25251d;
  color: #cabd9f;
}

.page-back-button {
  display: grid;
  width: 76px;
  height: 36px;
  flex: 0 0 76px;
  margin-left: auto;
  padding: 0;
  place-items: center;
  justify-self: end;
  font-size: 13px;
  line-height: 1;
}

@keyframes action-ready-breathe {
  0%, 100% {
    box-shadow: 0 0 0 rgba(172, 130, 58, 0);
  }
  50% {
    box-shadow: 0 0 9px rgba(172, 130, 58, 0.16);
  }
}

button[data-action-state="enabled"] {
  border-color: #a98240 !important;
  background: linear-gradient(180deg, #8e6b31, #62471f) !important;
  color: #f1dfb2 !important;
  opacity: 1 !important;
  filter: none !important;
  animation: action-ready-breathe 2.8s ease-in-out infinite;
}

button[data-action-state="disabled"] {
  border-color: #4b4a43 !important;
  background: #2b2c28 !important;
  color: #85837b !important;
  opacity: 0.72 !important;
  filter: saturate(0.35) !important;
  box-shadow: none !important;
  animation: none !important;
  cursor: not-allowed !important;
}

button[data-action-state="normal"] {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  button[data-action-state="enabled"] {
    animation: none;
  }
}

.use-pill-button:not(:disabled) {
  border-color: #bd9446;
  background: linear-gradient(180deg, #aa813a, #775621);
  color: #fff5db;
}

.create-button {
  width: 100%;
  margin-top: 18px;
}

.gender-fieldset {
  padding: 0;
  margin: 18px 0 0;
  border: 0;
}

.gender-fieldset legend {
  margin-bottom: 10px;
  color: #c3b89e;
  font-size: 14px;
}

.gender-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gender-option {
  position: relative;
  display: grid;
  gap: 8px;
  color: #a99d82;
  text-align: center;
  cursor: pointer;
}

.gender-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.gender-portrait {
  display: grid;
  width: 100%;
  aspect-ratio: 3 / 4;
  place-items: center;
  overflow: hidden;
  border: 1px solid #4b432d;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 28%, rgba(195, 158, 82, 0.12), transparent 48%),
    #121510;
  color: #c5a765;
  font-size: 30px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.gender-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gender-option input:checked + .gender-portrait {
  border-color: #c99f4d;
  box-shadow: 0 0 0 3px rgba(201, 159, 77, 0.14);
  transform: translateY(-2px);
}

.gender-option input:focus-visible + .gender-portrait {
  outline: 2px solid #e2bd71;
  outline-offset: 2px;
}

.player-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.player-identity strong {
  display: block;
  color: #e3c98e;
  font-size: 17px;
}

.player-summary {
  min-width: 0;
  flex: 1;
}

.player-summary__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.player-summary__identity {
  min-width: 0;
}

.player-summary strong,
.player-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-currencies {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.player-summary .player-currencies span {
  min-width: 0;
  margin-top: 0;
  padding: 4px 7px;
  border: 1px solid rgba(194, 151, 70, 0.18);
  border-radius: 6px;
  background: rgba(10, 13, 10, 0.3);
  color: #bbae8e;
  text-align: center;
}

.player-currencies b {
  color: #e3c98e;
  font-weight: 600;
}

.player-summary span {
  display: block;
  margin-top: 4px;
  color: #91866f;
  font-size: 12px;
}

.player-summary .player-character-age {
  flex: 0 0 auto;
  margin-top: 0;
  color: #bca36d;
  text-align: right;
}

.player-character-age b {
  color: #e3c98e;
  font-weight: 600;
}

.gender-portrait--compact {
  width: 52px;
  height: 52px;
  aspect-ratio: 1;
  flex: 0 0 52px;
  font-size: 18px;
}

.future-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.future-grid span {
  padding: 14px;
  border: 1px solid #403b2b;
  border-radius: 7px;
  color: #bbae8e;
  text-align: center;
}

.future-grid small {
  display: block;
  margin-top: 5px;
  color: #716b5b;
}

.more-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.more-menu-entry {
  display: grid;
  min-height: 72px;
  padding: 12px;
  place-content: center;
  gap: 5px;
  border: 1px solid #4a422f;
  border-radius: 7px;
  background: rgba(31, 31, 24, 0.86);
  color: #d7c59f;
  text-align: center;
}

.more-menu-entry small {
  color: #8e846d;
  font-size: 11px;
}

.more-menu-entry:disabled {
  cursor: default;
  opacity: 0.58;
}

.redeem-code-modal__content {
  display: grid;
  gap: 14px;
}

.mail-dialog {
  box-sizing: border-box;
  width: min(calc(var(--game-design-width) - 20px), calc(100vw - 20px));
  max-width: 430px;
  height: min(620px, calc(100dvh - 30px));
  max-height: 620px;
}

.mail-dialog__content {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: max-content minmax(0, 1fr);
  width: 100%;
  height: 100%;
  padding: 12px;
  gap: 10px;
  overflow: hidden;
}

.mail-dialog__heading {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
}

.mail-dialog__heading h2 {
  grid-column: 2;
  margin: 0;
  text-align: center;
}

.mail-dialog__heading .attribute-modal__close {
  grid-column: 3;
}

.mail-list-view,
.mail-detail-view {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.mail-list-summary {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid rgba(194, 151, 70, 0.24);
  border-radius: 7px;
  background: rgba(19, 21, 16, 0.97);
  color: #b9aa87;
  font-size: 12px;
}

.mail-list {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.mail-list-item {
  display: grid;
  width: 100%;
  padding: 11px 12px;
  gap: 5px;
  border: 1px solid rgba(194, 151, 70, 0.27);
  border-radius: 9px;
  background: rgba(22, 24, 18, 0.92);
  color: #d7c8a3;
  text-align: left;
}

.mail-list-item.is-unread {
  border-color: rgba(219, 169, 70, 0.72);
  box-shadow: inset 3px 0 0 #dba946;
}

.mail-list-item.is-claimed {
  opacity: 0.62;
}

.mail-list-item__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mail-list-item__heading strong {
  color: #e2bd72;
  font-size: 13px;
}

.mail-list-item__state,
.mail-list-item__time {
  color: #8f8879;
  font-size: 11px;
}

.mail-list-item__title {
  overflow: hidden;
  color: #d8ccb0;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-empty,
.mail-status,
.mail-detail-status {
  margin: 12px 0 0;
  color: #8f8879;
  font-size: 12px;
  text-align: center;
}

.mail-status[data-state="error"],
.mail-detail-status[data-state="error"] {
  color: #e28275;
}

.mail-detail-status[data-state="success"] {
  color: #85b779;
}

.mail-detail-view {
  display: grid;
  align-content: start;
  gap: 12px;
}

.mail-detail-view[hidden] {
  display: none;
}

.mail-detail-back {
  justify-self: start;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: #bfa462;
  font: inherit;
  font-size: 12px;
}

.mail-detail-heading {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(194, 151, 70, 0.28);
  border-radius: 9px;
  background: rgba(22, 24, 18, 0.92);
}

.mail-detail-heading h3 {
  margin: 0;
  color: #e2bd72;
  font-size: 17px;
}

.mail-detail-type,
.mail-detail-heading time {
  color: #8f8879;
  font-size: 11px;
}

.mail-detail-content {
  min-height: 72px;
  margin: 0;
  padding: 12px;
  border-radius: 9px;
  background: rgba(14, 16, 12, 0.62);
  color: #c9bea3;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.mail-reward-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(194, 151, 70, 0.28);
  border-radius: 9px;
  background: rgba(36, 31, 19, 0.72);
  color: #d8c79e;
}

.mail-rewards {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 6px;
  list-style: none;
}

.mail-rewards li {
  padding: 7px 9px;
  border-radius: 6px;
  background: rgba(194, 151, 70, 0.1);
  font-size: 13px;
}

.mail-claim-button {
  width: 100%;
  min-height: 42px;
}

.redeem-code-form {
  display: grid;
  gap: 9px;
}

.redeem-code-form label {
  color: #b9aa87;
  font-size: 13px;
}

.redeem-code-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(194, 151, 70, 0.42);
  border-radius: 6px;
  outline: 0;
  background: #0e100c;
  color: #eee1c4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.redeem-code-form input:focus {
  border-color: #c79a45;
  box-shadow: 0 0 0 2px rgba(194, 151, 70, 0.14);
}

.redeem-code-status {
  min-height: 20px;
  margin: 0;
  color: #938970;
  font-size: 13px;
  text-align: center;
}

.redeem-code-status[data-state="error"] {
  color: #df9d8f;
}

.redeem-code-status[data-state="success"] {
  color: #ddbc73;
}

.redeem-code-rewards {
  display: grid;
  padding: 10px 12px;
  margin: 0;
  gap: 6px;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 7px;
  background: rgba(12, 14, 10, 0.56);
  color: #cbbd9d;
  font-size: 13px;
  list-style: none;
}

.redeem-code-rewards li[data-pending="true"] {
  color: #d6a06d;
}

.feature-page-panel {
  display: grid;
  gap: 12px;
  grid-auto-rows: max-content;
  align-content: start;
}

.feature-page-heading {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 10px;
}

.feature-page-heading h2 {
  grid-column: 2;
  margin: 0;
  text-align: center;
}

.feature-page-heading__leading {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  justify-self: start;
}

.feature-page-heading__leading .crafting-rules-entry {
  width: auto;
  margin: 0;
  justify-content: flex-start;
}

.feature-page-heading__leading .crafting-rules-button {
  width: 76px;
  min-height: 32px;
  padding: 5px 4px;
  font-size: 0.66rem;
  white-space: nowrap;
}

.feature-page-heading .page-back-button {
  grid-column: 3;
  grid-row: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 聊天作为修炼页底部横条入口，保留功能入口下方的扩展留白。 */
.cultivate-chat-entry {
  position: relative;
  width: 100%;
  min-height: 34px;
  margin-top: auto;
  padding: 6px 12px;
  flex: 0 0 auto;
  border: 1px solid rgba(194, 151, 70, 0.38);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(73, 57, 29, 0.9), rgba(39, 34, 22, 0.94));
  color: #e1c478;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.18em;
}

.cultivate-chat-unread-dot {
  position: absolute;
  top: 5px;
  right: 8px;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255, 238, 205, 0.92);
  border-radius: 50%;
  background: #e54135;
  box-shadow: 0 0 7px rgba(229, 65, 53, 0.75);
}

.cultivate-chat-unread-dot[hidden] {
  display: none;
}

.cultivate-chat-entry:active {
  transform: translateY(1px);
}

.world-chat-dialog {
  box-sizing: border-box;
  width: min(calc(var(--game-design-width) - 20px), calc(100vw - 20px));
  max-width: 430px;
  height: min(620px, calc(100dvh - 30px));
  max-height: 620px;
}

.world-chat-dialog__content {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: max-content max-content minmax(0, 1fr) max-content;
  width: 100%;
  height: 100%;
  padding: 12px;
  gap: 9px;
  overflow: hidden;
}

.world-chat-dialog__heading {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
}

.world-chat-dialog__heading h2 {
  grid-column: 2;
  margin: 0;
  text-align: center;
}

.world-chat-dialog__heading .attribute-modal__close {
  grid-column: 3;
}

.world-chat-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.world-chat-tabs button {
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid rgba(194, 151, 70, 0.24);
  border-radius: 7px;
  background: rgba(22, 24, 18, 0.88);
  color: #8f8879;
  font: inherit;
  font-size: 12px;
}

.world-chat-tabs button.is-active {
  border-color: rgba(203, 159, 76, 0.65);
  background: linear-gradient(180deg, rgba(119, 88, 36, 0.76), rgba(68, 51, 25, 0.82));
  color: #f0d494;
}

.world-chat-view {
  grid-row: 3;
  min-height: 0;
}

.world-chat-view[hidden],
.world-chat-composer[hidden] {
  display: none;
}

.world-chat-announcements,
.world-chat-world-view {
  position: relative;
  display: grid;
  min-height: 0;
}

.world-chat-announcement-list,
.world-chat-log {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 8px;
  background: rgba(12, 15, 11, 0.72);
  scrollbar-width: thin;
}

.world-chat-announcement-empty,
.world-chat-empty {
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  margin: 0;
  color: #716c60;
  font-size: 12px;
  pointer-events: none;
}

.world-chat-announcement-list,
.world-chat-log {
  grid-column: 1;
  grid-row: 1;
}

.world-chat-announcement {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(194, 151, 70, 0.18);
  border-radius: 7px;
  background: rgba(35, 35, 27, 0.72);
}

.world-chat-announcement__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
}

.world-chat-announcement__heading strong {
  color: #e2c47f;
  font-size: 13px;
}

.world-chat-announcement__heading time {
  color: #716b60;
  font-size: 9px;
}

.world-chat-announcement p {
  margin: 0;
  color: #bdb4a3;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.world-chat-log {
  height: 100%;
  box-sizing: border-box;
}

.world-chat-message {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(194, 151, 70, 0.14);
  border-radius: 7px;
  background: rgba(35, 35, 27, 0.72);
}

.world-chat-message.is-current-player {
  border-color: rgba(202, 166, 92, 0.42);
  background: rgba(66, 52, 26, 0.46);
}

.world-chat-message__heading {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.world-chat-message__heading strong {
  color: #e2c47f;
  font-size: 12px;
}

.world-chat-message__heading span {
  overflow: hidden;
  color: #7f786b;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-chat-message__heading time {
  color: #655f54;
  font-size: 9px;
}

.world-chat-message__content {
  margin: 0;
  color: #d5cdbd;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.world-chat-composer {
  grid-row: 4;
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 8px;
  background: rgba(20, 22, 17, 0.9);
}

.world-chat-composer textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  max-height: 78px;
  padding: 8px 9px;
  resize: none;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 6px;
  outline: none;
  background: rgba(9, 12, 9, 0.82);
  color: #dfd7c8;
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.world-chat-composer textarea:focus {
  border-color: rgba(203, 159, 76, 0.62);
}

.world-chat-composer__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  align-items: center;
  gap: 8px;
}

.world-chat-composer__footer span {
  color: #716b60;
  font-size: 10px;
}

.world-chat-composer__footer button {
  min-height: 32px;
  padding: 5px 8px;
  white-space: nowrap;
}

.world-chat-status {
  min-height: 16px;
  margin: 0;
  color: #8f8879;
  font-size: 10px;
  text-align: center;
}

.world-chat-status[data-state="error"] {
  color: #d98172;
}

/* 天骄榜：三榜共用紧凑列表，长副本名保持单行并允许页面纵向滚动。 */
.rank-page {
  align-content: start;
}

.rank-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.rank-tab {
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid rgba(194, 151, 70, 0.22);
  border-radius: 7px;
  background: rgba(18, 20, 15, 0.78);
  color: #918a79;
  font: inherit;
  font-size: 12px;
}

.rank-tab.is-active {
  border-color: rgba(199, 156, 72, 0.68);
  background: linear-gradient(180deg, rgba(134, 99, 39, 0.72), rgba(83, 61, 26, 0.78));
  color: #f0d494;
}

.rank-table {
  display: grid;
  gap: 7px;
}

.rank-table__header,
.rank-table__row {
  display: grid;
  grid-template-columns: 40px minmax(58px, 0.78fr) 44px minmax(108px, 1.45fr);
  align-items: center;
  gap: 7px;
  text-align: center;
}

.rank-table__header {
  padding: 0 9px;
  color: #7f7869;
  font-size: 10px;
}

.rank-table__body {
  display: grid;
  gap: 7px;
}

.rank-table__row {
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid rgba(194, 151, 70, 0.2);
  border-radius: 7px;
  background: rgba(18, 20, 15, 0.5);
  color: #a99d83;
  font-size: 11px;
}

.rank-table__row.is-current-player {
  border-color: rgba(216, 181, 107, 0.64);
  background: rgba(89, 67, 29, 0.36);
}

.rank-table__rank {
  color: #c7a85e;
  font-variant-numeric: tabular-nums;
}

.rank-table__name,
.rank-table__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-table__name {
  color: #d5c7a6;
}

.rank-player-button {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: center;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(220, 178, 85, 0.45);
  text-underline-offset: 3px;
}

.rank-player-button:hover,
.rank-player-button:focus-visible {
  color: #f0d28b;
  outline: none;
  text-decoration-color: #dcb255;
}

.async-duel-dialog__content {
  width: min(92vw, 460px);
  max-height: min(88vh, 720px);
  overflow-y: auto;
}

.async-duel-profile {
  min-height: 0;
}

.async-duel-status {
  min-height: 22px;
  margin: 0;
  color: #b9ae96;
  text-align: center;
}

.async-duel-identity {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.async-duel-avatar {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(205, 164, 82, 0.35);
  border-radius: 8px;
  color: #716958;
  background: rgba(24, 24, 18, 0.72);
  font-size: 11px;
}

.async-duel-identity__details,
.async-duel-stats {
  display: grid;
  gap: 7px;
  margin: 0;
}

.async-duel-identity__details > div,
.async-duel-stats > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}

.async-duel-identity dt,
.async-duel-stats dt {
  color: #8f856f;
}

.async-duel-identity dd,
.async-duel-stats dd {
  margin: 0;
  color: #dec993;
}

.async-duel-section {
  margin-top: 14px;
  padding: 10px;
  border: 1px solid rgba(194, 151, 70, 0.18);
  border-radius: 8px;
  background: rgba(30, 29, 22, 0.62);
}

.async-duel-section--stats {
  margin-top: 10px;
}

.async-duel-section h3,
.async-duel-result h3 {
  margin: 0 0 9px;
  color: #dfc27e;
  font-size: 15px;
}

.async-duel-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.async-duel-stats > div {
  grid-template-columns: 1fr;
  gap: 2px;
}

.async-duel-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.async-duel-list li {
  min-width: 0;
  color: #c8bea8;
  overflow-wrap: anywhere;
}

.async-duel-list li.is-empty {
  grid-column: 1 / -1;
  color: #766f61;
}

.async-duel-challenge-button {
  width: 100%;
  margin-top: 0;
}

.async-duel-actions {
  position: sticky;
  bottom: -1px;
  z-index: 2;
  margin-top: 12px;
  padding-top: 8px;
  padding-bottom: 2px;
  background: linear-gradient(180deg, rgba(18, 18, 14, 0), #12120e 30%);
}

.async-duel-result {
  text-align: center;
}

.async-duel-battle-log {
  max-height: 300px;
  margin: 12px 0;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(194, 151, 70, 0.18);
  border-radius: 7px;
  text-align: left;
  background: rgba(20, 20, 16, 0.72);
}

.async-duel-battle-log p {
  margin: 0;
  padding: 5px 2px;
  color: #bdb39f;
  font-size: 11px;
  line-height: 1.45;
}

.world-chat-message.is-arena-defeat {
  border-color: rgba(224, 177, 69, 0.62);
  background: linear-gradient(135deg, rgba(86, 60, 18, 0.52), rgba(46, 37, 21, 0.72));
}

.world-chat-message__arena-badge {
  margin-right: 5px;
  color: #efc65d;
  font-size: 10px;
  font-weight: 700;
}

@media (max-width: 420px) {
  .async-duel-dialog__content {
    width: 94vw;
  }

  .async-duel-identity {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .async-duel-list {
    grid-template-columns: 1fr;
  }
}

.rank-table__age {
  white-space: nowrap;
}

.rank-table__value {
  color: #b9ae96;
}

.rank-self {
  display: grid;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid rgba(194, 151, 70, 0.2);
}

.rank-self > strong {
  color: #d8b96f;
  font-size: 12px;
}

.rank-table__row--self {
  width: 100%;
}

.rank-empty,
.rank-status {
  padding: 16px 0;
  font-size: 12px;
  text-align: center;
}

.rank-status:empty {
  display: none;
}

.rank-status[data-state="error"] {
  color: #d88672;
}

.shop-currency-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.shop-currency {
  display: inline-flex;
  min-width: 92px;
  padding: 7px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(194, 151, 70, 0.3);
  border-radius: 7px;
  background: rgba(20, 21, 16, 0.82);
}

.shop-currency small {
  color: #91866d;
}

.shop-currency strong {
  color: #d9b865;
}

.shop-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.shop-tab {
  min-height: 42px;
  padding: 8px;
  border: 1px solid #4a422f;
  border-radius: 7px;
  background: rgba(31, 31, 24, 0.86);
  color: #b8aa89;
}

.shop-tab.is-active {
  border-color: #b8883c;
  background: rgba(91, 66, 27, 0.52);
  color: #f0d28a;
  box-shadow: inset 0 0 0 1px rgba(206, 163, 75, 0.16);
}

.shop-category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.shop-category-tabs::-webkit-scrollbar {
  display: none;
}

.shop-category-button {
  min-width: 64px;
  min-height: 32px;
  padding: 5px 12px;
  flex: 0 0 auto;
  border: 1px solid #403a2b;
  border-radius: 999px;
  background: rgba(23, 24, 19, 0.82);
  color: #948a72;
  font-size: 12px;
}

.shop-category-button.is-active {
  border-color: #a97a34;
  background: rgba(91, 66, 27, 0.4);
  color: #e5c779;
}

.shop-status,
.shop-empty {
  min-height: 20px;
  margin: 4px 0;
  color: #938970;
  font-size: 13px;
  text-align: center;
}

.shop-empty {
  padding: 28px 12px;
  border: 1px dashed rgba(194, 151, 70, 0.26);
  border-radius: 8px;
  background: rgba(16, 17, 13, 0.46);
}

.shop-product-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 6px;
}

.black-market-root {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.black-market-root[hidden] {
  display: none;
}

.black-market-toolbar,
.black-market-own-heading,
.black-market-view-tabs,
.black-market-category-tabs,
.black-market-pagination,
.black-market-dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.black-market-toolbar,
.black-market-own-heading {
  justify-content: space-between;
}

.black-market-own-heading {
  justify-content: flex-start;
}

.black-market-listing-entry-button {
  width: auto;
  min-width: 0;
  min-height: 30px;
  padding: 5px 12px;
  font-size: 12px;
}

.black-market-toolbar {
  display: flex;
  justify-content: center;
  width: 100%;
}

.black-market-view-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  width: auto;
  margin-inline: auto;
}

.black-market-view-button {
  min-width: 82px;
  min-height: 34px;
  padding: 6px 15px;
  flex: 0 0 auto;
  border: 1px solid #403a2b;
  border-radius: 999px;
  background: rgba(23, 24, 19, 0.82);
  color: #a79b7f;
  font-size: 13px;
  white-space: nowrap;
}

.black-market-category-tabs {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.black-market-category-tabs::-webkit-scrollbar {
  display: none;
}

.black-market-category-tabs > button {
  min-width: 50px;
  padding-inline: 10px;
  flex: 0 0 auto;
}

.black-market-reserved-tab:disabled {
  opacity: 0.72;
  color: #bfb18a;
  border-color: rgba(190, 157, 82, 0.3);
  background: rgba(22, 24, 18, 0.62);
}

.black-market-view-tabs .is-active,
.black-market-category-tabs .is-active {
  border-color: #d9b85f;
  color: #f4dfaa;
  background: rgba(139, 99, 29, 0.3);
}

.black-market-filter-button {
  position: relative;
}

.black-market-filter-button.is-filtered::after {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d8b357;
  box-shadow: 0 0 5px rgba(216, 179, 87, 0.75);
  content: "";
}

.black-market-filter-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.black-market-filter-option {
  display: inline-flex;
  min-width: 0;
  min-height: 30px;
  padding: 5px 4px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(190, 157, 82, 0.34);
  border-radius: 7px;
  background: rgba(18, 22, 16, 0.72);
  color: #bfb18a;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.black-market-filter-option.is-selected {
  border-color: #d9b85f;
  background: rgba(139, 99, 29, 0.32);
  color: #f4dfaa;
  box-shadow: inset 0 0 0 1px rgba(217, 184, 95, 0.28);
}

.black-market-list {
  display: grid;
  gap: 10px;
}

.black-market-list--market {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 6px;
}

.black-market-scroll-list {
  max-height: min(56vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
  scrollbar-width: thin;
}

.black-market-list--market .shop-empty {
  grid-column: 1 / -1;
}

.black-market-product-tile .shop-product-tile__art > span {
  font-size: 9px;
  line-height: 1.25;
}

.black-market-product-tile[style*="--black-market-quality-color"] {
  border-color: var(--black-market-quality-color);
  border-color: color-mix(in srgb, var(--black-market-quality-color) 70%, #4a422f);
  box-shadow: inset 0 0 10px color-mix(in srgb, var(--black-market-quality-color) 12%, transparent);
}

.black-market-product-tile[style*="--black-market-quality-color"] .shop-product-tile__art {
  border-color: var(--black-market-quality-color);
}

.black-market-quality-name {
  color: var(--black-market-quality-color, #d8ccb0);
}

.black-market-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(190, 157, 82, 0.34);
  border-radius: 10px;
  background: rgba(12, 18, 13, 0.62);
}

.black-market-row[style*="--black-market-quality-color"] {
  border-color: var(--black-market-quality-color);
  border-color: color-mix(in srgb, var(--black-market-quality-color) 58%, rgba(190, 157, 82, 0.34));
}

.black-market-row > div,
.black-market-row__price {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.black-market-row small {
  color: #9e9b8d;
}

.black-market-row__price {
  text-align: right;
}

.black-market-pagination {
  justify-content: center;
  margin-top: 12px;
}

.black-market-status {
  margin: 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(119, 85, 29, 0.24);
}

.black-market-status[data-kind="error"] {
  color: #efaa9f;
  background: rgba(119, 35, 29, 0.25);
}

.black-market-dialog__content {
  display: grid;
  gap: 12px;
  width: min(92vw, 470px);
  max-height: min(88vh, 680px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.black-market-listing-dialog .black-market-dialog__content {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 9px;
  overflow: hidden;
}

.black-market-listing-heading {
  position: relative;
  min-height: 32px;
  justify-content: center;
}

.black-market-listing-heading h2 {
  text-align: center;
}

.black-market-listing-heading .attribute-modal__close {
  position: absolute;
  top: 0;
  right: 0;
}

.black-market-listing-scroll {
  display: grid;
  min-height: 0;
  gap: 8px;
  overflow: visible;
}

.black-market-listing-categories {
  padding: 0;
  border: 0;
  background: transparent;
}

.black-market-listing-categories .black-market-choice {
  min-height: 31px;
  padding-block: 4px;
}

.black-market-listing-panel {
  padding: 9px;
  border: 1px solid rgba(190, 157, 82, 0.2);
  border-radius: 9px;
  background: rgba(12, 18, 13, 0.38);
}

.black-market-listing-settings {
  display: grid;
  gap: 7px;
  padding: 7px 8px;
}

.black-market-listing-field {
  display: grid;
  gap: 6px;
}

.black-market-listing-field h3 {
  margin: 0;
  color: #c7b995;
  font-size: 13px;
  font-weight: 500;
}

.black-market-listing-inline-field {
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.black-market-listing-inline-field h3 {
  white-space: nowrap;
}

.black-market-choice-row,
.black-market-price-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.black-market-quantity-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.black-market-quantity-options .black-market-choice {
  min-height: 28px;
  padding: 3px 5px;
}

.black-market-price-options {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.black-market-listing-inline-field > .black-market-choice-row .black-market-choice,
.black-market-listing-price-field .black-market-choice {
  min-height: 28px;
  padding: 3px 5px;
  font-size: 11px;
  white-space: nowrap;
}

.black-market-choice,
.black-market-item-choice {
  min-width: 0;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(190, 157, 82, 0.42);
  border-radius: 8px;
  background: rgba(18, 22, 16, 0.82);
  color: #bfb18a;
  font: inherit;
  cursor: pointer;
}

.black-market-choice.is-selected,
.black-market-item-choice.is-selected {
  border-color: #d9b85f;
  background: rgba(139, 99, 29, 0.32);
  color: #f4dfaa;
  box-shadow: inset 0 0 0 1px rgba(217, 184, 95, 0.24);
}

.black-market-item-options {
  --black-market-listing-item-row-height: 34px;
  display: grid;
  height: calc((var(--black-market-listing-item-row-height) * 2) + 10px);
  min-height: calc((var(--black-market-listing-item-row-height) * 2) + 10px);
  max-height: calc((var(--black-market-listing-item-row-height) * 2) + 10px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: var(--black-market-listing-item-row-height);
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 4px 2px 0;
  scrollbar-width: thin;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.black-market-item-choice {
  display: flex;
  min-height: 34px;
  padding: 5px 6px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.black-market-item-choice strong {
  overflow: hidden;
  color: var(--black-market-quality-color, inherit);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.black-market-item-choice[style*="--black-market-quality-color"] {
  border-color: var(--black-market-quality-color);
  box-shadow: inset 0 0 10px color-mix(in srgb, var(--black-market-quality-color) 14%, transparent);
}

.black-market-item-choice.is-selected[style*="--black-market-quality-color"] {
  border-color: var(--black-market-quality-color);
  outline: 1px solid #d9b85f;
  outline-offset: 1px;
}

.black-market-listing-preview {
  display: flex;
  margin: 0;
  padding: 6px 8px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(190, 157, 82, 0.22);
  border-radius: 8px;
  background: rgba(12, 18, 13, 0.55);
  color: #9e9784;
  font-size: 12px;
}

.black-market-listing-preview[hidden] {
  display: none;
}

.black-market-listing-preview strong {
  color: #e1c16f;
}

.black-market-cancel-dialog .black-market-dialog__content {
  width: min(86vw, 360px);
  overflow: visible;
}

.black-market-cancel-dialog .attribute-modal__heading {
  position: relative;
  justify-content: center;
}

.black-market-cancel-dialog .attribute-modal__close {
  position: absolute;
  top: 0;
  right: 0;
}

.black-market-cancel-message {
  margin: 2px 0;
  color: #c2b99f;
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
}

.black-market-cancel-dialog .black-market-dialog-actions {
  justify-content: center;
  flex-wrap: nowrap;
}

.black-market-cancel-dialog .black-market-dialog-actions button {
  width: 100px;
}

.black-market-dialog-actions {
  justify-content: flex-end;
}

.black-market-listing-actions {
  z-index: 2;
  justify-content: center;
  flex-wrap: nowrap;
  padding: 8px 0 1px;
  border-top: 1px solid rgba(190, 157, 82, 0.16);
  background: #0d120d;
}

.black-market-listing-actions button {
  width: 88px;
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
}

.black-market-purchase-dialog .black-market-dialog__content {
  width: min(86vw, 330px);
  gap: 11px;
}

.black-market-purchase-dialog .attribute-modal__heading {
  position: relative;
  min-height: 32px;
  justify-content: center;
}

.black-market-purchase-dialog .attribute-modal__heading h2 {
  margin: 0;
  text-align: center;
}

.black-market-purchase-dialog .attribute-modal__close {
  position: absolute;
  top: 0;
  right: 0;
}

.black-market-purchase-detail {
  display: grid;
  gap: 8px;
  padding: 4px 2px;
}

.black-market-purchase-detail p {
  margin: 0;
}

.black-market-purchase-detail__meta,
.black-market-purchase-detail__price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #bfb79e !important;
  font-size: 13px;
}

.black-market-purchase-detail__meta > strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.black-market-purchase-detail__attributes {
  display: grid;
  gap: 6px;
  padding: 8px 0;
  border-top: 1px solid rgba(190, 157, 82, 0.16);
  border-bottom: 1px solid rgba(190, 157, 82, 0.16);
}

.black-market-purchase-detail__attributes p {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  color: #9e9784;
  font-size: 12px;
}

.black-market-purchase-detail__attributes strong {
  color: #d8ccb0;
  font-weight: 500;
  line-height: 1.45;
  text-align: right;
}

.black-market-purchase-detail__price {
  padding-top: 7px;
  border-top: 1px solid rgba(190, 157, 82, 0.2);
}

.black-market-purchase-detail__price strong {
  color: #e1c16f;
  font-weight: 600;
}

.black-market-purchase-dialog .black-market-dialog-actions {
  justify-content: center;
  flex-wrap: nowrap;
}

.black-market-purchase-dialog .black-market-dialog-actions button {
  width: 88px;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 13px;
}

.black-market-rules-content {
  display: grid;
  gap: 8px;
  color: #bfb79e;
  font-size: 13px;
  line-height: 1.65;
}

.black-market-rules-content p,
.black-market-rules-content ul {
  margin: 0;
}

.black-market-rules-content ul {
  padding-left: 1.35em;
}

@media (max-width: 560px) {
  .black-market-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .black-market-row > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .black-market-toolbar,
  .black-market-own-heading {
    align-items: stretch;
  }

  .black-market-view-tabs {
    gap: 6px;
  }

  .black-market-view-button {
    min-width: 76px;
    padding-inline: 12px;
  }

  .black-market-category-tabs > button {
    min-width: 48px;
    padding-inline: 8px;
  }

  .black-market-filter-options {
    gap: 5px;
  }

  .black-market-filter-option {
    padding-inline: 2px;
    font-size: 11px;
  }

  .black-market-price-options {
    gap: 3px;
  }

  .black-market-price-options .black-market-choice {
    padding-inline: 3px;
    font-size: 11px;
  }

  .black-market-item-options {
    --black-market-listing-item-row-height: 32px;
    height: calc((var(--black-market-listing-item-row-height) * 2) + 9px);
    min-height: calc((var(--black-market-listing-item-row-height) * 2) + 9px);
    max-height: calc((var(--black-market-listing-item-row-height) * 2) + 9px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .black-market-listing-select-panel,
  .black-market-listing-settings {
    padding: 7px;
  }

  .black-market-item-choice {
    min-height: 32px;
    padding-inline: 4px;
  }

  .black-market-item-choice strong {
    font-size: 10px;
  }

  .black-market-listing-preview {
    gap: 5px;
    font-size: 11px;
  }
}

.shop-product-tile {
  display: grid;
  min-width: 0;
  min-height: 0;
  padding: 5px;
  grid-template-rows: auto auto;
  align-self: start;
  align-content: start;
  gap: 4px;
  border: 1px solid #4a422f;
  border-radius: 8px;
  background: rgba(25, 25, 20, 0.9);
  color: #bbae8e;
  text-align: center;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.shop-product-tile:not(:disabled):hover,
.shop-product-tile:not(:disabled):focus-visible {
  border-color: #b8883c;
  background: rgba(61, 48, 25, 0.88);
  transform: translateY(-1px);
}

.shop-product-tile:disabled,
.shop-product-tile.is-sold-out,
.shop-product-tile.is-owned {
  border-color: #363329;
  background: rgba(19, 20, 17, 0.66);
  color: #716b5b;
  opacity: 0.58;
}

.shop-product-tile__art {
  display: grid;
  width: min(100%, 52px);
  aspect-ratio: 1;
  margin: 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(194, 151, 70, 0.3);
  border-radius: 7px;
  background: rgba(11, 13, 10, 0.78);
  color: #6e6756;
  font-size: 9px;
}

.shop-product-tile__art img,
.shop-purchase-product__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shop-product-tile__name {
  display: -webkit-box;
  min-height: 0;
  overflow: hidden;
  color: #dbc78f;
  font-size: 10px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.shop-purchase-modal__content {
  width: min(296px, calc(var(--game-design-width) - 48px));
}

.shop-purchase-product {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 6px 0 2px;
  text-align: center;
}

.shop-purchase-product__art {
  display: grid;
  width: 88px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(194, 151, 70, 0.32);
  border-radius: 8px;
  background: rgba(12, 14, 11, 0.76);
  color: #756e5d;
  font-size: 12px;
}

.shop-purchase-product strong {
  color: #e3c98e;
  font-size: 17px;
}

.shop-purchase-product__description {
  margin: 0;
  color: #aaa087;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
}

.shop-purchase-product > span {
  color: #d9b45f;
}

.shop-purchase-product small {
  min-height: 16px;
  color: #8f856e;
}

.shop-purchase-quantity {
  display: grid;
  grid-template-columns: 1fr 36px 48px 36px 50px;
  width: 100%;
  align-items: center;
  gap: 6px;
  color: #aaa087;
  font-size: 12px;
  text-align: left;
}

.shop-purchase-quantity button {
  width: 36px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(194, 151, 70, 0.42);
  border-radius: 6px;
  background: rgba(37, 36, 28, 0.95);
  color: #d9b45f;
}

.shop-purchase-quantity .shop-purchase-quantity__max {
  width: 50px;
  font-size: 12px;
}

.shop-purchase-quantity button:disabled {
  border-color: rgba(108, 106, 98, 0.28);
  background: rgba(34, 35, 31, 0.72);
  color: #68665e;
}

.shop-purchase-quantity strong {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(194, 151, 70, 0.28);
  border-radius: 6px;
  color: #f0d89e;
  font-size: 15px;
}

.shop-purchase-question {
  margin: 8px 0 12px;
  color: #aaa087;
  text-align: center;
}

.shop-purchase-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  gap: 8px;
}

.shop-product-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  min-width: 0;
  padding: 10px;
  align-items: center;
  gap: 9px;
  border: 1px solid #4a422f;
  border-radius: 8px;
  background: rgba(27, 28, 22, 0.88);
}

.shop-product-card__art {
  display: grid;
  width: 58px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(194, 151, 70, 0.32);
  border-radius: 7px;
  background: rgba(13, 14, 11, 0.72);
  color: #716a58;
  font-size: 11px;
}

.shop-product-card__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shop-product-card__info {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.shop-product-card__info strong {
  overflow: hidden;
  color: #d8c7a3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-product-card__info small {
  color: #817864;
}

.shop-buy-button {
  display: grid;
  min-width: 84px;
  padding: 8px 10px;
  gap: 2px;
}

.shop-buy-button small {
  color: inherit;
  font-size: 10px;
  opacity: 0.82;
}

@media all {
  .shop-currency-bar {
    justify-content: stretch;
  }

  .shop-currency {
    flex: 1 1 0;
  }

  .shop-product-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .shop-product-tile {
    min-height: 0;
    padding: 4px;
  }

  .shop-product-tile__art {
    width: min(100%, 46px);
  }

  .shop-product-card {
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }

  .shop-product-card__art {
    width: 52px;
  }
}

.reset-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(194, 151, 70, 0.18);
}

.reset-section h3 {
  margin: 0 0 8px;
  color: #c9b485;
  font-size: 16px;
}

.reset-section > p {
  margin-bottom: 14px;
}

.danger-button {
  padding: 10px 14px;
  border: 1px solid #8c4e40;
  border-radius: 6px;
  background: #43251f;
  color: #e6b2a6;
}

.reset-confirmation {
  padding: 14px;
  border: 1px solid rgba(181, 91, 70, 0.48);
  border-radius: 7px;
  background: rgba(73, 35, 28, 0.45);
}

.reset-confirmation strong {
  display: block;
  margin-bottom: 12px;
  color: #e1aa9e;
  font-size: 14px;
  font-weight: 500;
}

.reset-actions {
  display: flex;
  gap: 10px;
}

.bottom-nav {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(var(--bottom-nav-count, 5), minmax(0, 1fr));
  width: min(100%, 480px);
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateX(-50%);
  border-top: 1px solid rgba(194, 151, 70, 0.25);
  background: rgba(16, 18, 14, 0.97);
  backdrop-filter: blur(12px);
}

.bottom-nav button {
  min-height: 64px;
  border: 0;
  background: transparent;
  color: #807967;
  font-size: 14px;
}

.bottom-nav button.is-active {
  color: #dfbd76;
  background: linear-gradient(180deg, rgba(179, 136, 56, 0.12), transparent);
}

.bottom-nav button:disabled {
  color: #4f4b42;
  cursor: default;
  opacity: 0.62;
}

/* V1.3 修炼页骨架：固定视口，立绘与修炼信息并排。 */
html,
body {
  height: 100%;
  overflow: hidden;
}

.game-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
}

.game-header {
  flex: 0 0 auto;
}

.game-content {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow-y: auto;
}

.player-interface {
  display: grid;
  min-height: 100%;
  flex: 1 1 auto;
  grid-template-rows: auto minmax(0, 1fr);
}

.page-panel {
  min-height: 0;
  overflow-y: auto;
}

.cultivate-panel {
  display: flex;
  height: 100%;
  min-height: 0;
  padding: 10px;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.cultivate-overview {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(100px, 0.4fr) minmax(0, 0.6fr);
  gap: 9px;
  align-items: stretch;
}

.cultivate-character-stage {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 3 / 4;
  align-self: start;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.cultivate-info-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 9px;
  margin-top: 0;
  flex-direction: column;
}

.cultivate-info-heading h2 {
  margin-bottom: 0;
  font-size: 15px;
}

.cultivation-progress-block {
  margin-top: 8px;
}

.cultivate-info-panel > .cultivation-progress-block:first-child {
  margin-top: 0;
}

.cultivation-progress-block .progress-label {
  gap: 5px;
  margin-bottom: 4px;
  font-size: 11px;
}

.cultivation-progress-block .progress-label strong {
  font-size: 12px;
  white-space: nowrap;
}

.cultivation-progress-block progress {
  display: block;
  height: 7px;
}

.cultivate-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(194, 151, 70, 0.1);
  color: #857d69;
  font-size: 11px;
}

.cultivate-compact-row strong {
  color: #c6ad73;
  font-size: 12px;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.cultivate-speed-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cultivate-speed-info {
  display: inline-grid;
  width: 18px;
  height: 18px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(194, 151, 70, 0.42);
  border-radius: 50%;
  background: rgba(34, 32, 23, 0.88);
  color: #d7b96e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.cultivate-speed-info:focus-visible,
.cultivate-speed-info:hover {
  border-color: rgba(222, 181, 91, 0.82);
  color: #f0d38c;
  outline: none;
}

.cultivate-info-panel .breakthrough-actions {
  gap: 6px;
  padding-top: 7px;
  margin-top: auto;
}

.cultivate-info-panel .breakthrough-action-button {
  min-height: 42px;
  padding: 4px 5px;
}

.cultivate-info-panel .breakthrough-action-button strong {
  font-size: 13px;
}

.cultivate-info-panel .breakthrough-action-button small {
  margin-top: 1px;
  font-size: 9px;
}

.qi-sea-progress-block .cultivate-state {
  display: block;
  max-width: none;
  padding: 0;
  margin-top: 4px;
  border: 0;
  border-radius: 0;
  font-size: 9px;
  line-height: 1.35;
  text-align: left;
}

.offline-message {
  min-height: 0;
  margin-top: 4px !important;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.35 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.offline-message:empty,
.breakthrough-result:empty {
  display: none;
}

/* 洞府产业 */
.cave-panel {
  display: grid;
  gap: 10px;
  scrollbar-width: none;
}

.cave-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.cave-panel[hidden] {
  display: none;
}

.cave-building-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cave-operation-bar h3 {
  margin: 0;
}

.cave-status {
  min-height: 20px;
  margin: 0;
  color: #cabb94;
  font-size: 0.82rem;
}

.cave-status[data-state="error"] {
  color: #e99683;
}

.cave-status[data-state="success"] {
  color: #d8c27a;
}

.cave-locked-panel {
  min-height: 180px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  border: 1px solid rgba(190, 157, 84, 0.32);
  border-radius: 12px;
  background: rgba(28, 25, 22, 0.88);
  color: #d8c27a;
}

.cave-locked-panel[hidden],
[data-role="cave-content"][hidden] {
  display: none;
}

.cave-module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.cave-module-button {
  min-width: 0;
  padding: 8px 4px;
  border: 1px solid rgba(190, 157, 84, 0.28);
  border-radius: 9px;
  background: rgba(37, 33, 28, 0.9);
  color: #cdbf9c;
}

.cave-module-button strong,
.cave-module-button small,
.cave-servant-actions button small,
.cave-assignment-option strong,
.cave-assignment-option small {
  display: block;
}

.cave-module-button small {
  margin-top: 2px;
  font-size: 0.67rem;
  color: #8e8268;
}

.cave-module-button.is-active {
  border-color: rgba(220, 181, 86, 0.7);
  background: linear-gradient(180deg, rgba(98, 77, 35, 0.72), rgba(48, 40, 27, 0.96));
  color: #f1d991;
}

.cave-module-button.is-locked {
  opacity: 0.62;
}

.cave-industry-panel {
  display: grid;
  gap: 9px;
}

.spirit-root-panel {
  display: grid;
  gap: 9px;
}

.spirit-root-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.spirit-root-summary-card,
.spirit-formation-upgrade,
.spirit-root-table-wrap,
.spirit-root-auto-upgrade {
  border: 1px solid rgba(190, 157, 84, 0.24);
  border-radius: 10px;
  background: rgba(29, 26, 23, 0.9);
}

.spirit-root-summary-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px;
}

.spirit-root-summary-card > span {
  color: #9a8d73;
  font-size: 0.7rem;
}

.spirit-root-summary-card > strong {
  color: #e1ca86;
  font-size: 1rem;
}

.spirit-root-summary-card > small {
  color: #b9aa88;
  font-size: 0.67rem;
}

.spirit-root-summary-card progress {
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: #24231f;
  accent-color: #b9974f;
}

.spirit-root-summary-card progress::-webkit-progress-bar {
  border-radius: inherit;
  background: #24231f;
}

.spirit-root-summary-card progress::-webkit-progress-value,
.spirit-root-summary-card progress::-moz-progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, #8c6c2f, #d0aa4d);
}

.spirit-formation-upgrade {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  align-items: stretch;
  gap: 7px;
  padding: 8px;
}

.spirit-formation-materials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.spirit-formation-material {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "art"
    "name"
    "amount";
  justify-items: center;
  gap: 3px;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(190, 157, 84, 0.2);
  border-radius: 8px;
  background: rgba(40, 36, 30, 0.76);
}

.spirit-formation-material.is-insufficient {
  opacity: 0.58;
}

.spirit-formation-material__art {
  grid-area: art;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(190, 157, 84, 0.23);
  border-radius: 6px;
  color: #9d8c67;
  font-size: 0.66rem;
}

.spirit-formation-material__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spirit-formation-material strong {
  grid-area: name;
  overflow: hidden;
  color: #dcc57d;
  font-size: 0.66rem;
  text-align: center;
}

.spirit-formation-material small {
  grid-area: amount;
  overflow: hidden;
  color: #a99b7d;
  font-size: 0.59rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.spirit-formation-upgrade-button {
  min-width: 0;
  padding: 6px;
  font-size: 0.68rem;
  line-height: 1.35;
}

.spirit-root-auto-upgrade {
  padding: 8px 10px;
  color: #cdbf9c;
  font-size: 0.72rem;
}

.spirit-root-table-wrap {
  overflow-x: auto;
}

.spirit-root-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  color: #cdbf9c;
  font-size: 0.7rem;
}

.spirit-root-table th,
.spirit-root-table td {
  padding: 9px 4px;
  border-bottom: 1px solid rgba(190, 157, 84, 0.16);
  text-align: center;
  vertical-align: middle;
}

.spirit-root-table thead th {
  color: #9f9173;
  font-size: 0.64rem;
  font-weight: 500;
}

.spirit-root-table tbody th {
  color: #e0c573;
  font-weight: 600;
}

.spirit-root-table tbody tr:last-child th,
.spirit-root-table tbody tr:last-child td {
  border-bottom: 0;
}

.spirit-root-table th:nth-child(1) { width: 19%; }
.spirit-root-table th:nth-child(2) { width: 14%; }
.spirit-root-table th:nth-child(3) { width: 24%; }
.spirit-root-table th:nth-child(4) { width: 25%; }
.spirit-root-table th:nth-child(5) { width: 18%; }

.spirit-root-upgrade-button {
  min-width: 48px;
  min-height: 30px;
  padding: 5px 7px;
  font-size: 0.68rem;
}

.cave-operation-bar,
.cave-building-card {
  border: 1px solid rgba(190, 157, 84, 0.24);
  border-radius: 10px;
  background: rgba(29, 26, 23, 0.9);
}

.cave-operation-bar {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 9px 10px;
}

.cave-building-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.cave-operation-status h3 {
  color: #e1ca86;
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
}

.cave-operation-status > b {
  display: block;
  margin-top: 3px;
  color: #e6cb77;
  font-size: 1rem;
  line-height: 1;
  text-align: center;
}

.cave-cycle-progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: #24231f;
  accent-color: #b9974f;
}

.cave-cycle-progress::-webkit-progress-bar {
  border-radius: inherit;
  background: #24231f;
}

.cave-cycle-progress::-webkit-progress-value {
  border-radius: inherit;
  background: linear-gradient(90deg, #8c6c2f, #d0aa4d);
}

.cave-cycle-progress::-moz-progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, #8c6c2f, #d0aa4d);
}

.cave-servant-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.cave-servant-actions button {
  min-width: 0;
  min-height: 42px;
  padding: 6px 7px;
  font-size: 0.72rem;
}

.cave-servant-actions button small {
  margin-top: 2px;
  font-size: 0.6rem;
}

.cave-auto-upgrade-button.is-locked {
  border-color: rgba(122, 112, 90, 0.36);
  background: #292823;
  color: #8d856f;
  cursor: not-allowed;
}

.cave-building-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 80px 88px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
}

.cave-building-card.is-active {
  border-color: rgba(220, 181, 86, 0.62);
  box-shadow: inset 0 0 16px rgba(162, 119, 37, 0.12);
}

.cave-building-card__icon {
  width: 50px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(190, 157, 84, 0.32);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(70, 59, 39, 0.8), rgba(28, 26, 23, 0.95));
  color: #d7bd72;
  font-size: 1.25rem;
}

.cave-building-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cave-building-card__information {
  min-width: 0;
}

.cave-building-card__heading strong {
  color: #dfc77f;
  font-size: 0.88rem;
}

.cave-building-card__heading small {
  color: #a99b7d;
  font-size: 0.7rem;
}

.cave-building-card__heading small[data-state="active"] {
  color: #e0bd60;
}

.cave-building-card dl {
  display: grid;
  gap: 2px;
  margin: 5px 0 0;
}

.cave-building-card dl div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.cave-building-card dt {
  flex: 0 0 auto;
  color: #8f836b;
  white-space: nowrap;
}

.cave-building-card dd {
  min-width: 0;
  margin: 0;
  color: #cdbf9c;
  text-align: right;
  white-space: nowrap;
}

.cave-building-card__countdown {
  display: block;
  margin-top: 4px;
  color: #bca974;
  font-size: 0.68rem;
  line-height: 1.25;
}

.cave-building-card__countdown[data-estimate-direction="depletion"] {
  color: #c98b72;
}

.cave-building-card__staffing {
  text-align: center;
}

.cave-building-card__staffing > small,
.cave-building-card__upgrade > small {
  display: block;
  color: #8f836b;
  font-size: 0.64rem;
}

.cave-building-card__staffing > strong {
  display: block;
  margin-top: 4px;
  color: #d7c48f;
  font-size: 0.74rem;
  white-space: nowrap;
}

.cave-building-card__staffing-controls {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 5px;
}

.cave-building-card__staffing button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(190, 157, 84, 0.38);
  border-radius: 6px;
  background: rgba(56, 48, 35, 0.94);
  color: #e0c573;
  font: inherit;
  line-height: 1;
  touch-action: manipulation;
  user-select: none;
}

.cave-building-card__staffing button.is-long-pressing {
  border-color: #e8c968;
  background: #756027;
  color: #fff1b1;
  box-shadow: 0 0 0 2px rgba(232, 201, 104, 0.18);
  transform: scale(0.94);
}

.cave-building-card__staffing button:disabled {
  border-color: rgba(112, 104, 87, 0.28);
  background: #292823;
  color: #716c5e;
  opacity: 0.72;
}

.cave-building-card__upgrade {
  min-width: 0;
  text-align: center;
}

.cave-upgrade-button {
  width: 100%;
  min-height: 34px;
  padding: 6px;
  font-size: 0.72rem;
}

.cave-building-card__upgrade > small {
  margin-top: 4px;
  line-height: 1.25;
}

.cave-building-card__upgrade > small span,
.cave-building-card__upgrade > small strong {
  display: block;
}

.cave-building-card__upgrade > small strong {
  margin-top: 2px;
  color: #cdbf9c;
  font-size: 0.7rem;
}

.cave-assignment-modal__content {
  width: min(300px, calc(var(--game-design-width) - 48px));
}

.spirit-formation-dialog__content {
  width: min(300px, calc(var(--game-design-width) - 48px));
}

.spirit-formation-level-change {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 4px 0 12px;
  color: #cdbf9c;
  font-size: 0.9rem;
}

.spirit-formation-level-change b {
  color: #e4ca77;
}

.spirit-formation-dialog-costs {
  display: grid;
  gap: 6px;
}

.spirit-formation-dialog-costs > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px;
  border: 1px solid rgba(190, 157, 84, 0.18);
  border-radius: 7px;
  background: rgba(38, 34, 29, 0.78);
  color: #bcae8e;
  font-size: 0.76rem;
}

.spirit-formation-dialog-costs > div strong {
  color: #dcc57d;
}

.spirit-formation-dialog-costs > div.is-insufficient strong {
  color: #9a9285;
}

.spirit-formation-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.cave-assignment-modal__content > p {
  margin: 0 0 10px;
  color: #a99b7d;
  font-size: 0.78rem;
  line-height: 1.55;
}

.cave-assignment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cave-assignment-option {
  padding: 10px 6px;
}

.cave-assignment-option small {
  margin-top: 3px;
  color: #958970;
}

@media all {
  .cave-building-card {
    grid-template-columns: 42px minmax(0, 1fr) 64px 68px;
    gap: 5px;
    padding: 8px;
  }

  .cave-building-card__icon {
    width: 40px;
  }

  .cave-building-card dl div {
    font-size: 0.66rem;
  }

  .cave-building-card__staffing button {
    width: 22px;
    height: 22px;
  }

  .cave-upgrade-button {
    min-height: 32px;
    padding-inline: 3px;
  }
}

@media (max-width: 0px) {
  .cave-module-grid {
    gap: 4px;
  }

  .cave-servant-actions {
    gap: 4px;
  }

  .cave-servant-actions button {
    padding-inline: 4px;
    font-size: 0.68rem;
  }

  .cave-operation-bar {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 7px;
    padding-inline: 7px;
  }

  .cave-building-card {
    grid-template-columns: 38px minmax(0, 1fr) 60px 62px;
    gap: 4px;
    padding: 6px;
  }

  .cave-building-card__icon {
    width: 36px;
  }
}

.breakthrough-card {
  margin-top: 0;
}

.breakthrough-actions {
  gap: 8px;
}

.breakthrough-action-button {
  min-height: 58px;
  padding: 7px 8px;
}

.breakthrough-action-button strong {
  font-size: 15px;
}

.pill-panel {
  gap: 6px;
  margin-top: 6px;
}

  .pill-status {
    font-size: 10px;
  }

  .barrier-pill-panel {
    margin-top: 6px;
    padding: 6px 8px;
  }

  .barrier-pill-status {
    font-size: 10px;
  }

.heart-demon-button {
  min-height: 48px;
  margin-top: 6px;
}

.breakthrough-result {
  min-height: 0;
  margin-top: 6px !important;
  font-size: 11px;
  line-height: 1.35 !important;
}

  .use-pill-button:disabled,
  .use-barrier-pill-button:disabled,
  .heart-demon-button:disabled,
.breakthrough-button:disabled {
  border-color: #4a493f;
  background: #292a26;
  color: #8b897f;
  opacity: 0.62;
}

/* Fixed-canvas scaling supersedes the former short-screen compression rules. */
@media (max-height: 0px) {
  .game-header {
    min-height: 34px;
    padding: 4px 10px;
  }

  .game-header h1 {
    font-size: 18px;
  }

  .game-header__subtitle {
    margin-top: 0;
    font-size: 9px;
  }

  .game-content {
    gap: 7px;
    padding: 7px 8px;
  }

  .player-interface {
    gap: 7px;
  }

  .role-card--compact {
    padding: 6px 9px;
  }

  .gender-portrait--compact {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .player-identity strong {
    font-size: 15px;
  }

  .player-summary span {
    margin-top: 2px;
    font-size: 10px;
  }

  .player-currencies {
    gap: 4px;
    margin-top: 4px;
  }

  .player-summary .player-currencies span {
    padding: 3px 4px;
    font-size: 9px;
  }

  .cultivate-panel {
    padding: 7px;
    gap: 6px;
  }

  .cultivate-overview {
    grid-template-columns: minmax(100px, 0.4fr) minmax(0, 0.6fr);
    gap: 7px;
  }

  .cultivate-info-panel {
    padding: 7px;
  }

  .cultivate-info-heading h2 {
    font-size: 13px;
  }

  .cultivation-progress-block {
    margin-top: 6px;
  }

  .cultivate-compact-row {
    padding: 4px 0;
  }

  .breakthrough-action-button {
    min-height: 42px;
    padding: 5px 7px;
  }

  .breakthrough-action-button strong {
    font-size: 14px;
  }

  .breakthrough-action-button small {
    margin-top: 2px;
    font-size: 9px;
  }
}
