/* Chrome 61 基线层 +《Gambler's Table》原版 Godot 像素 UI 风格 (直角 1px 黑边 + 凹凸像素斜面) */

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-box {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-icon {
  display: block;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  margin-right: 8px;
  image-rendering: pixelated;
}

.brand-titles {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.main-title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #f4b41b;
  text-shadow: 2px 2px 0 #141013;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-title {
  display: block;
  font-size: 11px;
  color: #c8b8a6;
  margin: 3px 0 -5px 0;
  line-height: 1;
  transform: scale(0.55);
  transform-origin: left top;
  white-space: nowrap;
}

.top-btn-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.top-btn-group > * + * {
  margin-left: 4px;
}

.supports-flex-gap .top-btn-group {
  column-gap: 4px;
}

.supports-flex-gap .top-btn-group > * + * {
  margin-left: 0;
}

.mini-pill {
  border: 2px solid #141013;
  background: #4a3831;
  box-shadow: inset -2px -2px 0 #2b1f1b, inset 2px 2px 0 #6e554b;
  color: #f4ead5;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  padding: 5px 6px;
  cursor: pointer;
}

.mini-pill.accent-pill {
  background: #c83232;
  box-shadow: inset -2px -2px 0 #781818, inset 2px 2px 0 #f06464;
  color: #ffffff;
}

.mini-pill.yellow-pill {
  background: #f4b41b;
  box-shadow: inset -2px -2px 0 #9e6a06, inset 2px 2px 0 #fff394;
  color: #141013;
  font-weight: 900;
}

.mini-pill:disabled {
  opacity: 0.6;
  cursor: default;
}

.pk-challenge-bar {
  margin-top: 6px;
  padding: 5px 8px;
  background: #2b2118;
  border: 2px solid #f4b41b;
  color: #fff275;
  font-size: 11px;
  font-weight: 700;
}

/* HUD 像素资产栏 */
.hud-bar {
  display: flex;
  margin-bottom: 6px;
}

.hud-bar > * + * {
  margin-left: 6px;
}

.supports-flex-gap .hud-bar {
  column-gap: 6px;
}

.supports-flex-gap .hud-bar > * + * {
  margin-left: 0;
}

.hud-item {
  flex: 0.88;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #2b211d;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #1a1311, inset 2px 2px 0 #473730, 2px 2px 0 #0c090b;
  padding: 6px 6px;
  text-align: center;
}

.hud-item.wide-item {
  flex: 1.38;
}

.hud-tree-entry-btn {
  display: inline-block;
  width: 92%;
  margin-top: 3px;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  color: #ffffff;
  background: #8b3fd9;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #531e8a, inset 2px 2px 0 #c084fc;
  cursor: pointer;
  text-align: center;
}

.hud-label {
  display: block;
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  color: #b5a292;
}

.hud-val {
  display: block;
  width: 100%;
  margin: 4px 0;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  text-shadow: 1px 1px 0 #141013;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-val.gold { color: #f4b41b; }
.hud-val.cyan { color: #9badb7; }
.hud-val.purple { color: #c084fc; margin: 2px 0 1px; }

.hud-sub {
  display: block;
  width: 100%;
  font-size: 10px;
  line-height: 1.2;
  color: #8c7a6b;
  margin-top: 2px;
}

/* 状态与全桌抛币栏 */
.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #231b18;
  border: 2px solid #141013;
  box-shadow: inset 1px 1px 0 #382c27;
  padding: 5px 8px;
  margin-bottom: 6px;
}

.status-msg {
  font-size: 11px;
  color: #dfd1c1;
  flex: 1;
  min-width: 0;
  padding-right: 6px;
}

.act-sm-btn {
  flex-shrink: 0;
  font-family: inherit;
  background: #4a3831;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #2b1f1b, inset 2px 2px 0 #6e554b;
  color: #f4ead5;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.act-sm-btn.gold-sm-btn {
  background: #e09018;
  box-shadow: inset -2px -2px 0 #8f5208, inset 2px 2px 0 #ffd058;
  color: #141013;
}

/* 216x196 大范围纯像素桌面容器（严格 2x 像素放大至 432x392） */
.canvas-stage-wrap {
  position: relative;
  width: 100%;
  max-width: 432px;
  margin: 0 auto 6px;
  background: #141013;
  border: 3px solid #141013;
  box-shadow: 4px 4px 0 #0a080a;
  overflow: hidden;
}

.game-canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: pointer;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* 底部 4 大像素 Tab */
.nav-tabs {
  display: flex;
  margin-bottom: 7px;
}

.nav-tabs > * + * {
  margin-left: 5px;
}

.supports-flex-gap .nav-tabs {
  column-gap: 5px;
}

.supports-flex-gap .nav-tabs > * + * {
  margin-left: 0;
}

.nav-tab {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  background: #362823;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #211714, inset 2px 2px 0 #59433a, 2px 2px 0 #0c090b;
  color: #bda897;
  padding: 7px 4px;
  font-size: 11.5px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.nav-tab.active {
  background: #b86f28;
  box-shadow: inset -2px -2px 0 #6e3d12, inset 2px 2px 0 #f4b41b, 2px 2px 0 #0c090b;
  color: #141013;
}

/* 原版侧边栏风格像素面板 (shop_sidebar_panel) */
.panel-card {
  background: #362823;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #211714, inset 2px 2px 0 #59433a, 3px 3px 0 #0c090b;
  padding: 9px;
  margin-bottom: 8px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-bottom: 7px;
  padding-bottom: 5px;
  border-bottom: 2px solid #211714;
}

.panel-head-left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.panel-title {
  font-size: 13px;
  font-weight: 900;
  color: #f4b41b;
  text-shadow: 1px 1px 0 #141013;
  white-space: nowrap;
}

.panel-hint {
  font-size: 10.5px;
  color: #c8b8a6;
  white-space: nowrap;
}

/* 2行3列 紧凑固定行高滑动换页网格（一页展示6个方框，不足6项时自动留黑，所有卡片尺寸完全一致） */
.grid-2x2,
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, 74px);
  grid-gap: 5px;
  height: 153px;
  background: #140f0d;
}

.grid-2x2[hidden] {
  display: none;
}

.swipe-zone {
  touch-action: pan-y;
}

.compact-head {
  margin-bottom: 6px;
  padding-bottom: 4px;
}

.pager-ctrl {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.pager-ctrl > * + * {
  margin-left: 5px;
}

.supports-flex-gap .pager-ctrl {
  column-gap: 5px;
}

.supports-flex-gap .pager-ctrl > * + * {
  margin-left: 0;
}

.pager-btn {
  font-family: inherit;
  width: 24px;
  height: 22px;
  background: #4a3831;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #2b1f1b, inset 2px 2px 0 #6e554b;
  color: #f4b41b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.pager-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.pager-label {
  font-size: 11px;
  font-weight: 900;
  color: #f4ead5;
  min-width: 28px;
  text-align: center;
}

.swipe-dots-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 7px;
}

.swipe-dots-row > * + * {
  margin-left: 6px;
}

.supports-flex-gap .swipe-dots-row {
  column-gap: 6px;
}

.supports-flex-gap .swipe-dots-row > * + * {
  margin-left: 0;
}

.page-dot {
  width: 18px;
  height: 7px;
  background: #231916;
  border: 2px solid #141013;
  padding: 0;
  cursor: pointer;
}

.page-dot.active {
  background: #f4b41b;
  width: 26px;
}

.sub-switch-group {
  display: flex;
  align-items: center;
}

.sub-switch-group > * + * {
  margin-left: 4px;
}

.supports-flex-gap .sub-switch-group {
  column-gap: 4px;
}

.supports-flex-gap .sub-switch-group > * + * {
  margin-left: 0;
}

.mini-pill.active-sub {
  background: #b86f28;
  box-shadow: inset -2px -2px 0 #6e3d12, inset 2px 2px 0 #f4b41b;
  color: #141013;
}

.mini-pill.prestige-pill {
  background: #9c2848;
  box-shadow: inset -2px -2px 0 #5c1226, inset 2px 2px 0 #e0587c;
  color: #ffffff;
}

/* 扭蛋机面板：左侧扭蛋机图像+下方紫色按钮，右侧 2x2 帽子图鉴（与商店/强化/桌布 153px 完全等高） */
.gacha-panel-body {
  display: flex;
  height: 153px;
  background: #140f0d;
}

.gacha-machine-stand {
  width: 132px;
  height: 153px;
  flex-shrink: 0;
  margin-right: 5px;
  background: #231929;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #150e1a, inset 2px 2px 0 #42304d;
  padding: 5px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.gacha-panel-machine-canvas {
  display: block;
  width: 78px;
  height: 102px;
  margin: 0 auto;
  cursor: pointer;
  image-rendering: pixelated;
}

.gacha-under-btn {
  width: 100%;
  flex-shrink: 0;
  font-family: inherit;
  background: #8832a8;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #4d1961, inset 2px 2px 0 #c56ce6;
  padding: 4px 2px;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 1px 1px 0 #141013;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}

.gacha-under-btn:disabled {
  background: #382e3d;
  box-shadow: inset -2px -2px 0 #221b26, inset 2px 2px 0 #4e4054;
  color: #8c7d94;
  text-shadow: none;
  cursor: default;
}

.gacha-hats-grid {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 74px);
  grid-gap: 5px;
  height: 153px;
  background: #140f0d;
}

.shop-card {
  height: 74px;
  background: #2b201c;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #1b1310, inset 2px 2px 0 #47362f;
  padding: 4px 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.shop-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1px;
}

.shop-item-left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.item-sprite-canvas {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.shop-item-name {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  color: #f4ead5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-item-count {
  flex-shrink: 0;
  margin-left: 2px;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
  background: #141013;
  color: #f4b41b;
  padding: 0 4px;
}

.shop-item-desc {
  font-size: 9.5px;
  color: #c8b8a6;
  margin-bottom: 2px;
  line-height: 1.15;
  max-height: 22px;
  overflow: hidden;
}

.buy-btn {
  width: 100%;
  flex-shrink: 0;
  font-family: inherit;
  background: #2a7a3e;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #164723, inset 2px 2px 0 #58b86c;
  color: #ffffff;
  text-shadow: 1px 1px 0 #141013;
  padding: 2px 3px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buy-btn:disabled {
  background: #382e2a;
  box-shadow: inset -2px -2px 0 #241d1a, inset 2px 2px 0 #4a3e39;
  color: #786960;
  text-shadow: none;
  cursor: default;
}

/* 强化与天赋列表 */
.upgrade-list {
  display: flex;
  flex-direction: column;
}

.upg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2b201c;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #1b1310, inset 2px 2px 0 #47362f;
  padding: 7px 8px;
  margin-bottom: 6px;
}

.upg-row:last-child {
  margin-bottom: 0;
}

.upg-info {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

.upg-name {
  font-size: 12px;
  font-weight: 900;
  color: #f4ead5;
}

.upg-desc {
  font-size: 10.5px;
  color: #bca998;
  margin-top: 2px;
}

.upg-buy-btn {
  flex-shrink: 0;
  font-family: inherit;
  background: #c8741c;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #784108, inset 2px 2px 0 #f4b41b;
  color: #ffffff;
  text-shadow: 1px 1px 0 #141013;
  padding: 2px 4px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upg-buy-btn:disabled {
  background: #382e2a;
  box-shadow: inset -2px -2px 0 #241d1a, inset 2px 2px 0 #4a3e39;
  color: #786960;
  text-shadow: none;
  cursor: default;
}

/* 像素扭蛋机与帽子图鉴 */
.gacha-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #261d2b;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #18111c, inset 2px 2px 0 #483752;
  padding: 8px;
  margin-bottom: 9px;
}

.gacha-machine-canvas {
  width: 56px;
  height: 68px;
  flex-shrink: 0;
  margin-right: 8px;
  image-rendering: pixelated;
}

.gacha-info {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

.gacha-result {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 900;
  color: #f4b41b;
}

.gacha-roll-btn {
  flex-shrink: 0;
  width: 78px;
  font-family: inherit;
  background: #8832a8;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #4d1961, inset 2px 2px 0 #c56ce6;
  padding: 8px 4px;
  color: #ffffff;
  text-align: center;
  cursor: pointer;
}

.gacha-roll-btn:disabled {
  background: #382e3d;
  box-shadow: inset -2px -2px 0 #221b26, inset 2px 2px 0 #4e4054;
  color: #7d6e85;
  cursor: default;
}

.gacha-btn-title {
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.gacha-cost {
  display: block;
  font-size: 9.5px;
  margin-top: 2px;
}

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

.hat-cell {
  height: 74px;
  font-family: inherit;
  background: #2b201c;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #1b1310, inset 2px 2px 0 #47362f;
  padding: 4px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.hat-cell.owned {
  background: #3d2d22;
  box-shadow: inset -2px -2px 0 #241912, inset 2px 2px 0 #78583c;
}

.hat-cell.equipped {
  background: #1f3b2c;
  box-shadow: inset -2px -2px 0 #102419, inset 2px 2px 0 #52a874;
}

.hat-preview-canvas {
  width: 54px;
  height: 33px;
  display: block;
  margin: 1px auto 0;
  image-rendering: pixelated;
}

.hat-title {
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.15;
  color: #f4ead5;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.hat-tier {
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1.15;
  color: #f4b41b;
  display: block;
}

.hat-tier.tier-normal { color: #c8b8a6; }
.hat-tier.tier-rare { color: #f4b41b; }
.hat-tier.tier-epic { color: #f5a9ff; }

/* 屏幕中央：扭蛋机抽奖运作与开球展示动画弹窗 */
.gacha-anim-dialog {
  max-width: 320px;
}

.gacha-stage-box {
  background: #1a131f;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #100b14, inset 2px 2px 0 #34263d;
  padding: 10px;
  margin: 8px 0;
  text-align: center;
}

.gacha-anim-canvas {
  display: block;
  width: 204px;
  height: 192px;
  margin: 0 auto 8px;
  background: #120d16;
  border: 2px solid #141013;
  image-rendering: pixelated;
}

.gacha-reveal-info {
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gacha-reveal-rarity {
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  background: #141013;
  color: #f4b41b;
}

.gacha-reveal-name {
  font-size: 16px;
  font-weight: 900;
  color: #fff394;
  margin-top: 4px;
  text-shadow: 2px 2px 0 #141013;
}

.gacha-reveal-desc {
  font-size: 11px;
  color: #dfd1c1;
  margin-top: 2px;
}

/* 转生与桌布选择 */
.prestige-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2b1d2e;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #1a101c, inset 2px 2px 0 #523757;
  padding: 8px;
  margin-bottom: 8px;
}

.prestige-left {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

.prestige-action-btn {
  flex-shrink: 0;
  font-family: inherit;
  background: #9c2848;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #5c1226, inset 2px 2px 0 #e0587c;
  color: #ffffff;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.prestige-action-btn:disabled {
  background: #382c3a;
  box-shadow: inset -2px -2px 0 #241b26, inset 2px 2px 0 #4d3d4f;
  color: #7c6d80;
  cursor: default;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 6px;
}

.table-card {
  height: 74px;
  font-family: inherit;
  background: #2b201c;
  border: 2px solid #141013;
  box-shadow: inset -2px -2px 0 #1b1310, inset 2px 2px 0 #47362f;
  padding: 4px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  overflow: hidden;
}

.table-card.active-table {
  background: #1f3b2c;
  box-shadow: inset -2px -2px 0 #102419, inset 2px 2px 0 #52a874;
}

.table-thumb-canvas {
  width: 56px;
  height: 19px;
  display: block;
  margin: 0 auto;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.table-card-name {
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.15;
  color: #f4ead5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}

.table-card-desc {
  font-size: 9.5px;
  font-weight: 800;
  color: #f4b41b;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}

/* 像素战绩海报与分享 */
.poster-preview-wrap {
  width: 100%;
  max-width: 248px;
  margin: 0 auto 8px;
  border: 2px solid #141013;
  background: #141013;
}

.poster-canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.share-btn-row {
  display: flex;
}

.share-btn-row.second {
  margin-top: 6px;
}

.share-btn-row > * + * {
  margin-left: 6px;
}

.supports-flex-gap .share-btn-row {
  column-gap: 6px;
}

.supports-flex-gap .share-btn-row > * + * {
  margin-left: 0;
}

.share-action-btn {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  padding: 8px 6px;
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  border: 2px solid #141013;
}

.primary-red {
  background: #c83232;
  box-shadow: inset -2px -2px 0 #781818, inset 2px 2px 0 #f06464;
  color: #ffffff;
}

.soft-gold {
  background: #c8741c;
  box-shadow: inset -2px -2px 0 #784108, inset 2px 2px 0 #f4b41b;
  color: #ffffff;
}

.dark-outline {
  background: #4a3831;
  box-shadow: inset -2px -2px 0 #2b1f1b, inset 2px 2px 0 #6e554b;
  color: #f4ead5;
}

.gold-outline {
  background: #6e5218;
  box-shadow: inset -2px -2px 0 #3d2c0a, inset 2px 2px 0 #f4b41b;
  color: #fff275;
}

.share-modal-tip {
  margin-top: 7px;
  padding: 6px 8px;
  background: #221715;
  border: 2px solid #141013;
  color: #fff394;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

.share-modal-tip[hidden] {
  display: none;
}

/* 像素 Modal */
.modal-mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(12, 9, 11, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-mask[hidden] { display: none; }

.modal-dialog {
  width: 100%;
  max-width: 365px;
  background: #362823;
  border: 3px solid #141013;
  box-shadow: inset -2px -2px 0 #211714, inset 2px 2px 0 #59433a, 5px 5px 0 #080607;
  padding: 12px;
  color: #f4ead5;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 7px;
  border-bottom: 2px solid #211714;
}

.modal-title {
  font-size: 14px;
  font-weight: 900;
  color: #f4b41b;
}

.modal-close {
  font-family: inherit;
  border: 2px solid #141013;
  background: #9c2828;
  color: #ffffff;
  width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.modal-body {
  overflow: visible;
  padding: 8px 0 2px;
  font-size: 12px;
  line-height: 1.5;
}

/* 转生天赋树独立弹窗排版（无下拉，6项天赋直接完整展示） */
.skill-modal-dialog {
  max-width: 388px;
}

.skill-modal-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #231829;
  border: 2px solid #141013;
  padding: 6px 8px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #e9d5ff;
}

.purple-txt {
  color: #d8b4fe;
  font-size: 13px;
  font-weight: 900;
}

.skill-modal-hint {
  font-size: 10px;
  color: #bca998;
}

.skill-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, 74px);
  gap: 6px;
}

.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 6px;
  border-bottom: 1px dashed #4a3831;
}

.rank-pos { font-weight: 900; color: #f4b41b; width: 36px; }
.rank-nick { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-pts { font-weight: 800; color: #58b86c; margin-left: 8px; }

.modal-foot { padding-top: 8px; display: flex; }

.touchable:active {
  transform: translate(1px, 1px);
}
